/* ==========================================
   RESET & BASE STYLES
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e40af 50%, #0f172a 100%);
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==========================================
   NAVIGATION BAR
   ========================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem; /* BIG on desktop */
    font-weight: bold;
    background: linear-gradient(90deg, #60a5fa 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

/* Medium screens (tablets) */
@media (max-width: 1024px) {
    .logo {
        font-size: 1.3rem;
    }
}

/* Small screens (mobile landscape) */
@media (max-width: 768px) {
    .logo {
        font-size: 1.1rem;
    }
}

/* Very small screens (mobile portrait) */
@media (max-width: 520px) {
    .logo {
        font-size: 0.9rem;
    }
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    color: #60a5fa;
}


.nav-link.active {
    color: #38bdf8; /* light blue */
    position: relative;
}

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 2px;
    background: #38bdf8;
    border-radius: 2px;
}
/* ==========================================
   HERO/HOME SECTION
   ========================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 2rem;
    text-align: center;
}

.hero-content {
    max-width: 900px;
    animation: fadeInUp 1s ease;
}

.welcome-badge {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: rgba(96, 165, 250, 0.2);
    border-radius: 50px;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(90deg, #60a5fa 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.1rem;
    color: #9ca3af;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.btn {
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.5);
}

.btn-secondary {
    border: 2px solid #60a5fa;
    color: #ffffff;
    background: transparent;
}

.btn-secondary:hover {
    background: rgba(96, 165, 250, 0.1);
}

.btn-full {
    width: 100%;
    padding: 1rem 2rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.social-icon {
    color: #ffffff;
    transition: all 0.3s ease;
    display: flex;
}

.social-icon:hover {
    color: #60a5fa;
    transform: scale(1.1);
}

/* ==========================================
   ABOUT SECTION
   ========================================== */
.about {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 4rem 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.section-title {
    font-size: 3rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 3rem;
}

.section-description {
    color: #d1d5db;
    font-size: 1.05rem;
    line-height: 1.7;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 2rem auto;
    padding: 0 1.5rem; 
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-paragraph {
    color: #d1d5db;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.skills-box {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    padding: 2rem;
    border: 1px solid rgba(96, 165, 250, 0.2);
}

.skills-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #60a5fa;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    padding: 0.5rem 1rem;
    background: linear-gradient(90deg, rgba(96, 165, 250, 0.2), rgba(6, 182, 212, 0.2));
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    border: 1px solid rgba(96, 165, 250, 0.3);
    transition: border-color 0.3s ease;
}

.skill-tag:hover {
    border-color: #60a5fa;
}

/* ==========================================
   EXPERIENCE SECTION
   ========================================== */
.experience {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 4rem 2rem;
}

.timeline {
    position: relative;
    padding: 40px 0;
    max-width: 1100px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: rgba(96, 165, 250, 0.3);
    top: 0;
}

.timeline-item {
    position: relative;
    margin-bottom: 80px;
    display: flex;
    align-items: center;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: auto;
    margin-left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: auto;
    margin-right: 0;
}

.timeline-content {
    width: 45%;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 1.5rem;
    border: 1px solid rgba(96, 165, 250, 0.3);
    position: relative;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    border-color: rgba(96, 165, 250, 0.6);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(96, 165, 250, 0.2);
}

.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: rgba(30, 41, 59, 0.9);
    border: 3px solid #60a5fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 6px rgba(96, 165, 250, 0.2);
    z-index: 10;
}

.timeline-marker svg {
    color: #60a5fa;
}

.timeline-date {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    top: -50px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4)
}

.timeline-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #ffffff;
}

.timeline-company {
    color: #60a5fa;
    font-size: 15px;
    margin-bottom: 15px;
    font-weight: 500;
}

.timeline-description {
    color: #d1d5db;
    line-height: 1.7;
    font-size: 1rem;
}

/* ==========================================
   PROJECTS (ONE CARD PER DOT)
   ========================================== */
.carousel-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    overflow: hidden;
    padding: 20px 0 60px;
}

.carousel-wrapper {
    display: flex;
    flex-wrap: nowrap;
    gap: 30px;
    padding: 0;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card {
    min-width: 100%;
    max-width: 100%;
    height: 540px;
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(96, 165, 250, 0.3);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.github-link {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: rgba(15, 23, 42, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60a5fa;
    transition: all 0.3s ease;
    z-index: 10;
    border: 1px solid rgba(96, 165, 250, 0.3);
}

.github-link:hover {
    background: #60a5fa;
    color: #ffffff;
    transform: scale(1.1);
    border-color: #60a5fa;
}

.project-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(96, 165, 250, 0.1) 0%, transparent 70%);
}

.project-image svg {
    position: relative;
    z-index: 1;
    opacity: 0.8;
}

.project-content {
    padding: 30px;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #ffffff;
}

.project-description {
    color: #d1d5db;
    margin-bottom: 20px;
    line-height: 1.7;
    font-size: 0.95rem;
    min-height: 80px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tag {
    padding: 6px 14px;
    background: rgba(96, 165, 250, 0.2);
    border-radius: 50px;
    font-size: 0.85rem;
    color: #ffffff;
    border: 1px solid rgba(96, 165, 250, 0.3);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 30px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(96, 165, 250, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.dot:hover {
    background: rgba(96, 165, 250, 0.5);
    transform: scale(1.2);
}

.dot.active {
    background: #60a5fa;
    transform: scale(1.3);
    border-color: rgba(96, 165, 250, 0.6);
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
}

/* ===== EXPERIENCE + CV SIDE PANEL ===== */
.experience-layout {
    display: grid;
    grid-template-columns: 1.6fr 0.9fr; /* timeline | cv box */
    gap: 2rem;
    align-items: start;
}

.cv-side {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    padding: 2rem;
    border: 1px solid rgba(96, 165, 250, 0.2);
    position: sticky;
    top: 110px; /* stays visible while scrolling timeline */
}

.cv-side-title {
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
}

.cv-side-text {
    color: #d1d5db;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

/* Mobile: stack */
@media (max-width: 900px) {
    .experience-layout {
        grid-template-columns: 1fr;
    }

    .cv-side {
        position: static;
        top: auto;
    }
}

/* ===== ABOUT: kicker above title ===== */
.about-kicker {
    text-align: center;
    letter-spacing: 0.28em;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 0.75rem;
}

/* ===== ABOUT: paragraphs ===== */
.about-paragraph {
    max-width: 560px;
    font-size: 1.05rem;
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.80);
}

/* ===== ABOUT: quick stats chips ===== */
.about-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
    max-width: 560px;
}

.about-stat {
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(96, 165, 250, 0.25);
    backdrop-filter: blur(8px);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.about-stat:hover {
    transform: translateY(-2px);
    border-color: rgba(96, 165, 250, 0.55);
}

/* ===== SKILLS BOX: gradient border + glow ===== */
.skills-box {
    position: relative;
    border-radius: 1.5rem;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(30, 41, 59, 0.42);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
}

/* gradient border */
.skills-box::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: 1.5rem;
    background: linear-gradient(90deg, rgba(96, 165, 250, 0.65), rgba(6, 182, 212, 0.55));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* glow behind box */
.skills-box::after {
    content: "";
    position: absolute;
    inset: -18px;
    border-radius: 1.8rem;
    background:
        radial-gradient(circle at 30% 20%, rgba(96, 165, 250, 0.18), transparent 55%),
        radial-gradient(circle at 80% 60%, rgba(6, 182, 212, 0.14), transparent 60%);
    filter: blur(10px);
    z-index: -1;
}

.skills-title {
    color: rgba(96, 165, 250, 0.95);
}

/* ===== SKILLS: pill style ===== */
.skill-tag {
    background: linear-gradient(90deg, rgba(96, 165, 250, 0.18), rgba(6, 182, 212, 0.14));
    border: 1px solid rgba(96, 165, 250, 0.28);
    color: rgba(255, 255, 255, 0.88);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.skill-tag:hover {
    transform: translateY(-2px);
    border-color: rgba(96, 165, 250, 0.6);
    background: linear-gradient(90deg, rgba(96, 165, 250, 0.28), rgba(6, 182, 212, 0.22));
}

/* ===== Mobile tweak ===== */
@media (max-width: 768px) {
    .about-kicker {
        text-align: left;
    }

    .about-paragraph,
    .about-stats {
        max-width: 100%;
    }
}

/* ==========================================
   CONTACT SECTION
   ========================================== */
.contact {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 4rem 2rem;
}

.contact-description {
    color: #d1d5db;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    text-align: center;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: start;
}

.contact-info {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    padding: 2.5rem;
    border: 1px solid rgba(96, 165, 250, 0.2);
}

.contact-info-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.contact-info-text {
    color: #9ca3af;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-detail {
    margin-bottom: 1rem;
}

.contact-link {
    color: #d1d5db;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.contact-link:hover,
.contact-link:focus {
    color: #60a5fa;
    text-decoration: underline;
    outline: none;
}

.contact-form-container {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    padding: 2.5rem;
    border: 1px solid rgba(96, 165, 250, 0.2);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-input {
    padding: 1rem 1.5rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 0.75rem;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(15, 23, 42, 0.7);
}

.form-input::placeholder {
    color: #6b7280;
}

.form-textarea {
    padding: 1rem 1.5rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 0.75rem;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    resize: vertical;
}

.form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(15, 23, 42, 0.7);
}

.form-textarea::placeholder {
    color: #6b7280;
}

.form-status {
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-weight: 700;
}

.form-status.success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #bbf7d0;
}

.form-status.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fecaca;
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
    border-top: 1px solid rgba(96, 165, 250, 0.2);
    padding: 2rem;
    text-align: center;
    color: #9ca3af;
}

/* ==========================================
   ANIMATIONS
   ========================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeInUp 0.8s ease;
}

/* ==========================================
   RESPONSIVE DESIGN (Mobile)
   ========================================== */
@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .hero-buttons { flex-direction: column; }
    .about-content { grid-template-columns: 1fr; }
    .contact-layout { grid-template-columns: 1fr; }

    .logo {
        font-size: 1.2rem; /* Also make it smaller on mobile */
    }

    .timeline::before { left: 30px; }
    /* CHANGED: removed this because it breaks the hamburger menu
       .nav-links { display: none; }
    */
    .section-title { font-size: 2rem; }

    /* Timeline Mobile Styles */
    .timeline::before { left: 30px; }
    .timeline-item { flex-direction: column; }

    .timeline-content {
        width: calc(100% - 80px);
        margin-left: 70px !important;
        margin-right: 0 !important;
        text-align: left !important;
    }

    .timeline-marker { left: 30px; }
    .timeline-date { left: 30px; font-size: 11px; padding: 6px 15px; }

    .timeline-item:nth-child(odd) .timeline-content { text-align: left; }

    /* Carousel */
    .project-card { height: 500px; }
    .project-image { height: 180px; }
    .github-link { width: 40px; height: 40px; }
}

@media (max-width: 520px) {
    .logo-subtitle {
        display: none;
    }
    
    .logo {
        font-size: 1.1rem;
    }
}

/* ==========================================
   BACK TO TOP BUTTON
   ========================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.8), rgba(6, 182, 212, 0.8));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.5);
}

.back-to-top:hover::before {
    opacity: 1;
}

.back-to-top:active {
    transform: translateY(-2px);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* Mobile adjustment */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
}

/* Hamburger button (hidden on desktop) */
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  width: 48px;
  height: 48px;
  padding: 12px;
  z-index: 2001;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background: #ffffff;
  border-radius: 999px;
  margin: 7px 0;
}

/* Overlay behind the menu */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: transparent; /* optional dim when visible */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;        /* IMPORTANT: doesn't capture taps while hidden */
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 2000;
}



/* still used for click-outside-to-close, but invisible */
.nav-open .nav-overlay {
  opacity: 1;
  visibility: visible;
}

/* Mobile menu panel (we reuse your ul.nav-links) */
@media (max-width: 520px) {
  .nav-toggle { display: block; }

   .nav-links {
    position: fixed;
    top: 90px;
    right: 18px;
    width: min(320px, 85vw);
    padding: 18px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #1e293b; 
    border: 1px solid rgba(96, 165, 250, 0.25);
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s ease;
    z-index: 2002; 
    pointer-events: auto; 
  }

  body.nav-open .nav-links {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-overlay {
    /* keep overlay invisible but clickable to close nav */
    opacity: 0;
    visibility: hidden;
  }

  body.nav-open .nav-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: none;  
  }
}

/* Hamburger -> X animation */
body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
body.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}
body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ==========================================
   SCROLL MARGIN FOR ANCHORED SECTIONS
   ========================================== */
:root {
  --nav-offset: 110px; 
}

#home, #about, #projects, #experience, #contact {
  scroll-margin-top: var(--nav-offset);
}