* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-main: #0b0820;
    --bg-secondary: #15122b;
    --bg-tertiary: #1d1838;
    --text-main: #f5f3ff;
    --text-soft: #cbd5e1;
    --accent: #8b5cf6;
    --accent-light: #c4b5fd;
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(139, 92, 246, 0.18), transparent 30%),
        radial-gradient(circle at top right, rgba(167, 139, 250, 0.12), transparent 25%),
        linear-gradient(180deg, #090714 0%, #0b0820 100%);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.6;
}

/* Global text */

h1 {
    font-size: clamp(2.4rem, 5vw, 4.5rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
    color: var(--text-main);
}

h2 {
    font-size: 1.45rem;
    line-height: 1.2;
    margin-bottom: 0.85rem;
    color: var(--text-main);
}

p {
    color: var(--text-soft);
    font-size: 1rem;
}

a {
    transition: 0.2s ease;
}

.eyebrow {
    color: var(--accent-light);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.75rem;
}

/* Header / Navbar */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    backdrop-filter: blur(14px);
    background: rgba(11, 8, 32, 0.78);
    border-bottom: 1px solid var(--border);
    overflow: visible;
}

.navbar {
    max-width: 1150px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    overflow: visible;
}

.logo {
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    flex-shrink: 0;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    overflow: visible;
}

.nav-links li {
    list-style: none;
    position: relative;
}

.nav-links a,
.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-soft);
    text-decoration: none;
    background: transparent;
    border: none;
    font: inherit;
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.25s ease;
    white-space: nowrap;
}

.nav-links a:hover,
.dropdown-toggle:hover,
.nav-links a.active,
.dropdown-toggle.active {
    color: var(--text-main);
    background: rgba(139, 92, 246, 0.12);
}

.nav-link-inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Dropdown desktop */

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 180px;
    list-style: none;
    background: rgba(21, 18, 43, 0.98);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 0.5rem;
    display: none;
    z-index: 2000;
}

.dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu li a {
    display: block;
    width: 100%;
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
}

/* Main layout */

main {
    width: 100%;
}

.page-content {
    max-width: 1150px;
    margin: 0 auto;
    padding: 3rem 1.5rem 5rem;
}

.content-section {
    padding: 3rem 0;
}

.section-heading {
    margin-bottom: 2rem;
}

/* Hero */

.hero {
    max-width: 1150px;
    margin: 0 auto;
    min-height: calc(100vh - 84px);
    padding: 5rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
}

.hero-text {
    max-width: 650px;
    font-size: 1.1rem;
    color: var(--text-soft);
}

.hero img,
.hero-image {
    width: 100%;
    max-width: 360px;
    height: auto;
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    object-fit: cover;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 700;
    padding: 0.9rem 1.3rem;
    border-radius: 14px;
    transition: 0.25s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    box-shadow: 0 8px 22px rgba(139, 92, 246, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(139, 92, 246, 0.45);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

/* Projects */

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.project-card {
    background: rgba(21, 18, 43, 0.9);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 1.25rem;
    box-shadow: var(--shadow);
    transition: 0.25s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: rgba(139, 92, 246, 0.35);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42);
}

.project-card h2 {
    font-size: 1.3rem;
    margin-bottom: 0.35rem;
    color: var(--text-main);
}

.project-card h3 {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-light);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.project-card p {
    font-size: 0.95rem;
    color: var(--text-soft);
    margin-bottom: 1rem;
}

.project-image {
    width: 100%;
    height: 240px;
    object-fit: contain;
    object-position: center;
    border-radius: 16px;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    background: #0f0b24;
    padding: 0.4rem;
}

.project-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.project-links a {
    color: var(--accent-light);
    text-decoration: none;
    font-weight: 600;
}

.project-links a:hover {
    color: white;
}

.project-details {
    width: 100%;
}

.project-details summary {
    list-style: none;
    cursor: pointer;
}

.project-details summary::-webkit-details-marker {
    display: none;
}

.project-summary {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-preview-text h2 {
    color: var(--text-main);
    margin-bottom: 0.35rem;
}

.project-preview-text h3 {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-light);
    margin-bottom: 0.6rem;
    font-weight: 600;
}

.project-preview-text p {
    color: var(--text-soft);
    margin-bottom: 0;
}

.project-expanded {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.project-expanded p {
    margin-bottom: 1rem;
}

.expand-hint {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--accent-light);
    opacity: 0.85;
}

/* Skills */

.skills-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.skill-box {
    background: rgba(21, 18, 43, 0.9);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 1.4rem;
    box-shadow: var(--shadow);
}

.skill-box h2 {
    margin-bottom: 0.75rem;
}

/* Experience */

.experience-list {
    display: grid;
    gap: 1rem;
}

.experience-card {
    background: rgba(21, 18, 43, 0.9);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.3rem 1.4rem;
    box-shadow: var(--shadow);
}

.meta {
    color: var(--accent-light);
    font-weight: 600;
    margin-top: 0.25rem;
}

/* Contact */

#contact {
    margin-top: 120px;
    padding: 60px 0 40px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#contact h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: rgba(21, 18, 43, 0.9);
    border: 1px solid var(--border);
    font-size: 1.6rem;
    color: var(--text-soft);
    text-decoration: none;
    transition: all 0.25s ease;
}

.contact-item:hover {
    color: white;
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.4),
        0 0 12px rgba(139, 92, 246, 0.35);
}

.contact-item i {
    transition: color 0.25s ease;
}

.contact-item:hover .bi-linkedin {
    color: #0a66c2;
}

.contact-item:hover .bi-envelope {
    color: #8b5cf6;
}

.contact-item:hover .bi-github {
    color: #ffffff;
}

/* Footer */

footer {
    max-width: 1150px;
    margin: 0 auto;
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

footer p {
    color: var(--text-soft);
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Responsive */

@media (max-width: 860px) {
    .navbar {
        align-items: flex-start;
        gap: 1rem;
    }

    .logo {
        flex-shrink: 0;
    }

    .nav-links {
        margin-left: auto;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: visible;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 0.5rem;
        align-items: flex-start;
        max-width: 100%;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-links > li {
        flex: 0 0 auto;
    }

    .nav-links a,
    .dropdown-toggle {
        flex: 0 0 auto;
    }

    /* Mobile dropdown fix */
    .dropdown {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .dropdown-menu {
        position: static;
        display: none;
        margin-top: 0.5rem;
        min-width: 160px;
        width: max-content;
    }

    .dropdown.open .dropdown-menu {
        display: block;
    }

    .hero {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    .hero img,
    .hero-image {
        max-width: 300px;
    }
}

@media (max-width: 560px) {
    .nav-links a,
    .dropdown-toggle {
        padding: 0.65rem 0.8rem;
        font-size: 0.95rem;
    }

    .dropdown-menu {
        min-width: 160px;
    }

    .project-image {
        height: 200px;
    }

    .hero img,
    .hero-image {
        max-width: 100%;
    }

    #contact {
        margin-top: 90px;
        padding-top: 50px;
    }

    .project-links a {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        color: var(--accent-light);
        text-decoration: none;
        font-weight: 600;
    }

    .project-links a:hover {
        color: white;
    }

    .project-links i {
        font-size: 1.1rem;
    }
}

/* Tech stack container */

.item-box {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

/* Individual tech tags */

.item {
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.25);
    color: var(--accent-light);
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
}

/* Hover effect */

.item:hover {
    background: rgba(139, 92, 246, 0.25);
    border-color: rgba(139, 92, 246, 0.45);
    color: white;
}