    :root {
    /* Light theme colors */
    --light-bg: #ffffff;
    --light-text: #333333;
    --light-text-secondary: #666666;
    --light-card-bg: #ffffff;
    --light-section-bg: #f8f9fa;
    --light-border: #e9ecef;
    --light-shadow: rgba(0, 0, 0, 0.1);
    --light-shadow-hover: rgba(0, 0, 0, 0.15);
    --light-skill-bg: #f8f9fa;
    --light-skill-text: #666666;
    --light-tech-bg: #e9ecef;
    --light-tech-text: #495057;
    
    /* Dark theme colors */
    --dark-bg: #1a1a1a;
    --dark-text: #e0e0e0;
    --dark-text-secondary: #a0a0a0;
    --dark-card-bg: #2d2d2d;
    --dark-section-bg: #242424;
    --dark-border: #404040;
    --dark-shadow: rgba(0, 0, 0, 0.3);
    --dark-shadow-hover: rgba(0, 0, 0, 0.5);
    --dark-skill-bg: #333333;
    --dark-skill-text: #b0b0b0;
    --dark-tech-bg: #404040;
    --dark-tech-text: #d0d0d0;
    
    /* Gradient colors (remain the same) */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #667eea;
    --primary-hover: #5a6fd8;
}

    /* Default to light theme */
    :root {
        --bg-color: var(--light-bg);
        --text-color: var(--light-text);
        --text-secondary: var(--light-text-secondary);
        --card-bg: var(--light-card-bg);
        --section-bg: var(--light-section-bg);
        --border-color: var(--light-border);
        --shadow-color: var(--light-shadow);
        --shadow-hover: var(--light-shadow-hover);
        --skill-bg: var(--light-skill-bg);
        --skill-text: var(--light-skill-text);
        --tech-bg: var(--light-tech-bg);
        --tech-text: var(--light-tech-text);
    }
    
    /* Auto dark mode based on system preference */
    @media (prefers-color-scheme: dark) {
        :root {
            --bg-color: var(--dark-bg);
            --text-color: var(--dark-text);
            --text-secondary: var(--dark-text-secondary);
            --card-bg: var(--dark-card-bg);
            --section-bg: var(--dark-section-bg);
            --border-color: var(--dark-border);
            --shadow-color: var(--dark-shadow);
            --shadow-hover: var(--dark-shadow-hover);
            --skill-bg: var(--dark-skill-bg);
            --skill-text: var(--dark-skill-text);
            --tech-bg: var(--dark-tech-bg);
            --tech-text: var(--dark-tech-text);
        }
    }
    
    /* Light theme */
    [data-theme="light"] {
        --bg-color: var(--light-bg);
        --text-color: var(--light-text);
        --text-secondary: var(--light-text-secondary);
        --card-bg: var(--light-card-bg);
        --section-bg: var(--light-section-bg);
        --border-color: var(--light-border);
        --shadow-color: var(--light-shadow);
        --shadow-hover: var(--light-shadow-hover);
        --skill-bg: var(--light-skill-bg);
        --skill-text: var(--light-skill-text);
        --tech-bg: var(--light-tech-bg);
        --tech-text: var(--light-tech-text);
    }
    
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
    
    body {
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        line-height: 1.6;
        color: var(--text-color);
        background: var(--primary-gradient);
        min-height: 100vh;
        transition: all 0.3s ease;
    }
    
    .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 20px;
    }
    
    /* Theme Toggle Button */
    .theme-toggle {
        position: fixed;
        top: 20px;
        right: 20px;
        z-index: 1001;
        background: var(--card-bg);
        border: 2px solid var(--border-color);
        border-radius: 50%;
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 2px 10px var(--shadow-color);
    }
    
    .theme-toggle:hover {
        transform: scale(1.1);
        box-shadow: 0 4px 20px var(--shadow-hover);
    }
    
    .theme-toggle i {
        font-size: 1.2rem;
        color: var(--text-color);
        transition: all 0.3s ease;
    }
    
    /* Header */
    header {
        background: var(--card-bg);
        backdrop-filter: blur(10px);
        box-shadow: 0 2px 20px var(--shadow-color);
        position: fixed;
        width: 100%;
        top: 0;
        z-index: 1000;
        transition: all 0.3s ease;
        border-bottom: 1px solid var(--border-color);
    }
    
    nav {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 1.25rem;
        padding: 1rem 0;
    }
    
    .logo {
        font-size: 1.5rem;
        font-weight: bold;
        color: var(--primary-color);
        margin-right: auto;
        white-space: nowrap;
    }
    
    .nav-links {
        display: flex;
        list-style: none;
        gap: 2rem;
    }
    
    .nav-links a {
        text-decoration: none;
        color: var(--text-color);
        font-weight: 500;
        transition: color 0.3s ease;
    }
    
    .nav-links a:hover {
        color: var(--primary-color);
    }


    .mobile-nav-toggle {
        display: none;
        align-items: center;
        justify-content: center;
        width: 50px;
        height: 50px;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: var(--text-color);
        cursor: pointer;
        box-shadow: none;
        transition: color 0.3s ease, opacity 0.2s ease;
        position: relative;
        z-index: 1002;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-nav-toggle i {
        pointer-events: none;
        font-size: 1.35rem;
    }

    .mobile-nav-toggle:hover {
        color: var(--primary-color);
    }

    .mobile-nav-toggle.menu-open {
        opacity: 0;
        pointer-events: none;
    }

    .mobile-menu {
        display: none;
    }

    .mobile-nav-close {
        align-self: flex-end;
        width: 38px;
        height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 0;
        border-radius: 8px;
        background: transparent;
        color: var(--text-color);
        cursor: pointer;
        font-size: 1.05rem;
        margin-bottom: 0.15rem;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-nav-close:hover {
        background: var(--section-bg);
        color: var(--primary-color);
    }

    .mobile-menu a {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.8rem 0.9rem;
        color: var(--text-color);
        text-decoration: none;
        background: transparent;
        border: 0;
        border-radius: 10px;
        font: inherit;
        font-weight: 500;
        cursor: pointer;
        text-align: left;
    }

    .mobile-menu a:hover {
        background: var(--section-bg);
        color: var(--primary-color);
    }
    
    /* Hero Section */
    .hero {
        position: relative;
        overflow: hidden;
        padding: clamp(5rem, 10vw, 5rem) 0 clamp(5rem, 8vw, 7rem);
        color: white;
        background:
            radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.08), transparent 24%),
            radial-gradient(circle at 82% 18%, rgba(118, 75, 162, 0.18), transparent 28%),
            radial-gradient(circle at 50% 90%, rgba(102, 126, 234, 0.22), transparent 32%),
            linear-gradient(135deg, #242746 0%, #433c73 48%, #6876d9 100%);
    }

    .hero::before {
        content: '';
        position: absolute;
        inset: 0;
        opacity: 0.14;
        background-image:
            linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
        background-size: 42px 42px;
        pointer-events: none;
    }

    .hero-content {
        position: relative;
        z-index: 1;
        max-width: 1280px;
        margin: 0 auto;
        display: grid;
        grid-template-columns: minmax(320px, 1.1fr) minmax(320px, 0.9fr);
        gap: clamp(2.5rem, 5vw, 5rem);
        align-items: center;
        min-width: 0;
    }

    .hero-main {
        max-width: 760px;
        min-width: 0;
    }

    .hero-eyebrow {
        margin: 0 0 1rem;
        color: rgba(255, 255, 255, 0.78);
        font-size: 0.84rem;
        font-weight: 800;
        letter-spacing: 0.14em;
        text-transform: uppercase;
    }

    .hero h1 {
        margin: 0 0 1.25rem;
        font-size: clamp(2rem, 5vw, 5rem);
        line-height: 0.98;
        font-weight: 850;
        color: #ffffff;
        letter-spacing: -0.055em;
        text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.34);
    }

    .hero p {
        margin: 0 0 0.9rem;
        font-size: clamp(1.05rem, 2vw, 1.22rem);
        line-height: 1.5;
    }

    .hero-role {
        max-width: 43rem;
        font-size: clamp(1.08rem, 2vw, 1.28rem);
        font-weight: 700;
        color: rgba(255, 255, 255, 0.95);
        white-space: normal !important;
    }

    .hero-tagline {
        max-width: 44rem;
        color: rgba(255, 255, 255, 0.82);
        white-space: normal !important;
    }

    .hero-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.9rem;
        align-items: center;
        margin-top: 1.45rem;
    }

    .hero-service-link {
        display: inline-flex;
        align-items: center;
        gap: 0.6rem;
        padding: 0.82rem 1.4rem;
        border-radius: 999px;
        color: rgba(255, 255, 255, 0.94);
        text-decoration: none;
        font-weight: 700;
        font-size: 0.98rem;
        background: rgba(255, 255, 255, 0.10);
        border: 1px solid rgba(255, 255, 255, 0.20);
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
        backdrop-filter: blur(10px);
        transition: all 0.25s ease;
    }

    .hero-service-link:hover {
        transform: translateY(-2px);
        background: rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 255, 255, 0.30);
        color: #ffffff;
    }

    .hero-service-link i {
        font-size: 0.9rem;
        opacity: 0.9;
    }

    /* Hero profile card */
    .hero-profile-card {
        width: min(100%, 420px);
        justify-self: end;
        padding: 1.35rem;
        border-radius: 28px;
        background: rgba(255, 255, 255, 0.09);
        border: 1px solid rgba(255, 255, 255, 0.16);
        box-shadow: 0 28px 70px rgba(0, 0, 0, 0.22);
        backdrop-filter: blur(18px);
    }

    .hero-profile-header {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding-bottom: 1.35rem;
        margin-bottom: 1.25rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    }

    .hero-profile-header-centered {
        justify-content: center;
    }

    .hero-profile-img {
        width: 250px;
        height: 250px;
        border-radius: 36px;
        object-fit: cover;
        border: 3px solid rgba(255, 255, 255, 0.24);
        box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
    }

    .hero-focus-list {
        display: grid;
        gap: 0.65rem;
    }

    .hero-focus-item {
        display: grid;
        grid-template-columns: 2rem 1fr;
        gap: 0.75rem;
        align-items: start;
        padding: 0.7rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.11);
    }

    .hero-focus-item span {
        color: rgba(255, 255, 255, 0.45);
        font-size: 0.8rem;
        font-weight: 800;
    }

    .hero-focus-item p {
        margin: 0;
        color: rgba(255, 255, 255, 0.88);
        font-size: 0.95rem;
        line-height: 1.42;
    }

    .hero-proof-strip {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
        margin-top: 1.1rem;
    }

    .hero-proof-strip div {
        padding: 0.9rem;
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.12);
    }

    .hero-proof-strip strong,
    .hero-proof-strip span {
        display: block;
    }

    .hero-proof-strip strong {
        color: #ffffff;
        font-size: 1rem;
        margin-bottom: 0.2rem;
    }

    .hero-proof-strip span {
        color: rgba(255, 255, 255, 0.68);
        font-size: 0.84rem;
        line-height: 1.35;
    }

    /* Hero responsive layout */
    @media (max-width: 1180px) {
        .hero-content {
            grid-template-columns: 1fr;
            gap: 2.5rem;
        }

        .hero-main {
            width: min(100%, 820px);
            max-width: 820px;
            margin-left: auto;
            margin-right: auto;
            text-align: center;
            padding-left: 1rem;
            padding-right: 1rem;
        }

        .hero p {
            margin-left: auto;
            margin-right: auto;
        }

        .hero-actions {
            justify-content: center;
        }

        .hero-profile-card {
            justify-self: center;
        }
    }

    @media (max-width: 760px) {
        .hero {
            padding: 7.25rem 0 3.5rem;
            overflow-x: hidden;
        }

        .hero-content {
            width: 100%;
            max-width: 100%;
            gap: 1.75rem;
            overflow-x: hidden;
        }

        .hero-main {
            width: min(100%, calc(100vw - 2rem));
            max-width: calc(100vw - 2rem);
            margin-left: auto;
            margin-right: auto;
            padding-left: 1rem;
            padding-right: 1rem;
            text-align: center;
        }

        .hero h1 {
            font-size: clamp(2.65rem, 11vw, 4rem);
            line-height: 1.02;
        }

        .hero p {
            font-size: 1.02rem;
            margin-left: auto;
            margin-right: auto;
        }

        .hero-role,
        .hero-tagline {
            max-width: 100%;
            white-space: normal !important;
        }

        .hero-actions {
            flex-direction: column;
            align-items: stretch;
        }

        .hero-service-link {
            justify-content: center;
            font-size: 0.92rem;
            padding: 0.75rem 1.2rem;
        }

        .hero-profile-card {
            width: min(100%, calc(100vw - 2rem));
            padding: 0;
            border: 0;
            border-radius: 0;
            background: transparent;
            box-shadow: none;
            backdrop-filter: none;
        }

        .hero-profile-header {
            padding-bottom: 0;
            margin-bottom: 1.1rem;
            border-bottom: 0;
        }

        .hero-profile-img {
            width: 200px;
            height: 200px;
            border-radius: 32px;
        }

        .hero-focus-list {
            display: none;
        }

        .hero-proof-strip {
            display: none;
        }
    }
    
    /* Main Content */
    main {
        background: var(--bg-color);
        margin-top: -50px;
        border-radius: 20px 20px 0 0;
        position: relative;
        z-index: 1;
        transition: background 0.3s ease;
    }
    
    .section {
        padding: 80px 0;
    }
    
    .section:nth-child(even) {
        background: var(--section-bg);
    }
    
    .section h2 {
        text-align: center;
        font-size: 2.5rem;
        margin-bottom: 3rem;
        color: var(--text-color);
        position: relative;
    }
    
    .section h2::after {
        content: '';
        position: absolute;
        bottom: -10px;
        left: 50%;
        transform: translateX(-50%);
        width: 80px;
        height: 3px;
        background: var(--primary-gradient);
    }
    
    /* About Section */
    .about-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
        align-items: center;
    }
    
    .about-text {
        font-size: 1.1rem;
        line-height: 1.8;
        color: var(--text-secondary);
    }
    
    .skills-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .skill-category {
        background: var(--skill-bg);
        padding: 1.5rem;
        border-radius: 10px;
        border-left: 4px solid var(--primary-color);
        transition: background 0.3s ease;
    }
    
    .skill-category h3 {
        margin-bottom: 1rem;
        color: var(--primary-color);
    }
    
    .skill-category ul {
        list-style: none;
    }
    
    .skill-category li {
        padding: 0.3rem 0;
        color: var(--skill-text);
    }
    
    /* Certifications Section */
    .certifications-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 2rem;
        justify-content: center;
    }
    
    .certifications-grid .certification-card {
        flex: 0 1 400px;
        max-width: 500px;
    }
    
    .certification-card {
        background: var(--card-bg);
        border-radius: 15px;
        padding: 2rem;
        box-shadow: 0 10px 30px var(--shadow-color);
        transition: all 0.3s ease;
        border: 1px solid var(--border-color);
        position: relative;
        overflow: hidden;
    }
    
    .certification-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: var(--primary-gradient);
    }
    
    .certification-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 20px 40px var(--shadow-hover);
    }
    
    .certification-icon {
        width: 60px;
        height: 60px;
        background: var(--primary-gradient);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 1.5rem;
        color: white;
        font-size: 1.5rem;
    }
    
    .certification-title {
        font-size: 1.3rem;
        font-weight: bold;
        color: var(--text-color);
        margin-bottom: 0.5rem;
    }
    
    .certification-issuer {
        color: var(--primary-color);
        font-weight: 500;
        margin-bottom: 1rem;
    }
    
    .certification-description {
        color: var(--text-secondary);
        line-height: 1.6;
        margin-bottom: 1.5rem;
    }
    
    .certification-skills {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }
    
    .skill-badge {
        background: var(--tech-bg);
        padding: 0.3rem 0.8rem;
        border-radius: 20px;
        font-size: 0.9rem;
        color: var(--tech-text);
        transition: background 0.3s ease;
    }
    
    .certification-link {
        display: inline-block;
        padding: 0.5rem 1rem;
        background: var(--primary-color);
        color: white;
        text-decoration: none;
        border-radius: 5px;
        transition: background 0.3s ease;
    }
    
    .certification-link:hover {
        background: var(--primary-hover);
    }
    
    /* Projects Section */
    .projects-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 2rem;
        justify-content: center;
    }
    
    .projects-grid .project-card {
        flex: 0 1 350px;
        max-width: 450px;
    }
    
    .project-card {
        background: var(--card-bg);
        border-radius: 15px;
        overflow: hidden;
        box-shadow: 0 10px 30px var(--shadow-color);
        transition: all 0.3s ease;
        border: 1px solid var(--border-color);
    }
    
    .project-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 20px 40px var(--shadow-hover);
    }
    
    .project-header {
        padding: 1.5rem;
        background: var(--primary-gradient);
        color: white;
    }
    
    .project-header h3 {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
    }
    
    .project-content {
        padding: 1.5rem;
    }
    
    .project-description {
        margin-bottom: 1.5rem;
        color: var(--text-secondary);
    }
    
    .tech-stack {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }
    
    .tech-tag {
        background: var(--tech-bg);
        padding: 0.3rem 0.8rem;
        border-radius: 20px;
        font-size: 0.9rem;
        color: var(--tech-text);
        transition: background 0.3s ease;
    }
    
    .project-links {
        display: flex;
        gap: 1rem;
    }
    
    .project-links a {
        padding: 0.5rem 1rem;
        background: var(--primary-color);
        color: white;
        text-decoration: none;
        border-radius: 5px;
        transition: background 0.3s ease;
    }
    
    .project-links a:hover {
        background: var(--primary-hover);
    }
    
    /* Experience Section */
    .experience-timeline {
        position: relative;
        display: grid;
        grid-template-columns: 90px 2px 1fr;
        /* Line spans full height via the pseudo-element on the wrapper */
    }

    /* Full-height line sits behind everything */
    .experience-timeline::before {
        content: '';
        position: absolute;
        left: 90px;
        top: 0;
        bottom: 0;
        width: 2px;
        background: var(--primary-gradient);
        z-index: 0;
    }

    /* Hide the separate line element — line is now on the wrapper */
    .experience-timeline-line {
        display: none;
    }

    .tl-role {
        display: contents;
    }

    .tl-dates {
        grid-column: 1;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        padding-right: 1rem;
        position: relative;
        z-index: 1;
    }

    /* End date at top (leaving date = top of card) */
    .tl-date-end {
        font-size: 0.68rem;
        color: var(--text-secondary);
        white-space: nowrap;
        line-height: 1.2;
        padding-top: 1.5rem;
        text-align: right;
    }

    .tl-present {
        display: block;
        font-size: 0.62rem;
        opacity: 0.9;
        margin-top: 0.15rem;
    }

    /* Start date at bottom */
    .tl-date-start {
        font-size: 0.68rem;
        font-weight: 600;
        color: var(--primary-color);
        white-space: nowrap;
        line-height: 1.2;
        margin-top: auto;
        padding-bottom: 1.5rem;
        text-align: right;
    }

    /* Tick marks on the line */
    .tl-dates::before,
    .tl-dates::after {
        content: '';
        position: absolute;
        right: -0.35rem;
        width: 8px;
        height: 2px;
        background: var(--primary-color);
        z-index: 2;
    }

    .tl-dates::before {
        top: 1.6rem;
    }

    .tl-dates::after {
        bottom: 1.6rem;
    }

    /* Subtle experience timeline hover */
    .experience-item:hover {
        transform: translateY(-3px);
        border-color: rgba(102, 126, 234, 0.55);
        box-shadow: 0 12px 28px var(--shadow-hover);
    }

    /* Highlight the date block immediately before the hovered card */
    .tl-dates:has(+ .experience-item:hover) .tl-date-end,
    .tl-dates:has(+ .experience-item:hover) .tl-date-start {
        color: var(--primary-color);
        opacity: 1;
        transform: translateX(-3px);
    }

    /* Highlight the tick marks for the active role */
    .tl-dates:has(+ .experience-item:hover)::before,
    .tl-dates:has(+ .experience-item:hover)::after {
        width: 14px;
        background: var(--primary-color);
        box-shadow: 0 0 12px rgba(102, 126, 234, 0.45);
    }

    .tl-dates,
    .tl-date-end,
    .tl-date-start,
    .tl-dates::before,
    .tl-dates::after {
        transition: all 0.25s ease;
    }

    .experience-item {
        grid-column: 3;
        position: relative;
        margin-bottom: 1.5rem;
        margin-left: 1.25rem;
        background: var(--card-bg);
        padding: 1.5rem;
        border-radius: 10px;
        box-shadow: 0 5px 15px var(--shadow-color);
        border: 1px solid var(--border-color);
        transition: all 0.3s ease;
        z-index: 2;
        isolation: isolate;
    }

    .experience-item::before {
        display: none;
    }

    .experience-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 1rem;
    }

    .experience-title {
        font-size: 1.2rem;
        font-weight: bold;
        color: var(--text-color);
    }

    .experience-company {
        color: var(--primary-color);
        font-weight: 500;
    }

    .experience-date {
        display: none;
    }

    /* Month/year stacking within date labels */
    .tl-month,
    .tl-year {
        display: inline;
    }

    /* Mobile: stack month above year */
    @media (max-width: 600px) {
        .experience-timeline {
            grid-template-columns: 52px 2px 1fr;
        }

        .tl-month,
        .tl-year {
            display: block;
            line-height: 1.4;
        }

        .tl-date-end,
        .tl-date-start {
            font-size: 0.58rem;
        }

        .tl-dates {
            padding-right: 0.6rem;
        }

        .experience-item {
            padding: 1rem;
            margin-left: 0.75rem;
            z-index: 2;
            isolation: isolate;
        }

        .experience-title {
            font-size: 1rem;
        }
    }

    /* Portrait mobile: drop the timeline chrome entirely, stack cards cleanly */
    @media (max-width: 480px) {
        /* Single column — no side dates, no vertical line */
        .experience-timeline {
            display: block;
        }

        /* Hide the vertical line */
        .experience-timeline::before {
            content: none;
            width: 0;
            background: transparent;
        }

        /* Hide date column */
        .tl-dates {
            display: none;
        }

        /* Cards go full width */
        .experience-item {
            margin-left: 0;
            margin-bottom: 1.25rem;
            padding: 1rem;
        }

        /* Show a small date range at the top of each card via data attribute */
        .experience-item[data-dates]::after {
            content: attr(data-dates);
            display: block;
            font-size: 0.72rem;
            color: var(--primary-color);
            font-weight: 600;
            margin-bottom: 0.6rem;
            letter-spacing: 0.02em;
        }
    }
    
    .experience-description {
        color: var(--text-secondary);
        line-height: 1.6;
    }

    .experience-description ul li {
        color: var(--text-secondary);
        padding-left: 0.25rem;
    }

    .experience-description ul li strong {
        color: var(--text-secondary);
        font-weight: 600;
    }

    .experience-description p {
        color: var(--text-secondary);
    }

    /* Collapsible experience details */
    .details-toggle {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        margin-top: 0.6rem;
        padding: 0.3rem 0.85rem 0.3rem 0.6rem;
        background: var(--tech-bg);
        border: 1px solid var(--border-color);
        border-radius: 20px;
        cursor: pointer;
        font-size: 0.82rem;
        font-family: inherit;
        color: var(--text-secondary);
        transition: background 0.2s, color 0.2s, border-color 0.2s;
        user-select: none;
    }
    .details-toggle:hover {
        background: var(--primary-color);
        color: #fff;
        border-color: var(--primary-color);
    }
    .details-toggle .toggle-icon {
        font-size: 0.75rem;
        transition: transform 0.25s ease;
        display: inline-block;
    }
    .details-toggle.open .toggle-icon {
        transform: rotate(90deg);
    }
    .details-toggle .toggle-label-show { display: inline; }
    .details-toggle .toggle-label-hide { display: none; }
    .details-toggle.open .toggle-label-show { display: none; }
    .details-toggle.open .toggle-label-hide { display: inline; }
    .collapsible-list {
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.35s ease, opacity 0.3s ease;
        opacity: 0;
    }
    .collapsible-list.open {
        max-height: 1200px;
        opacity: 1;
    }
    
    /* Contact Section */
    .contact-content {
        text-align: center;
        max-width: 640px;
        margin: 0 auto;
    }

    .contact-content p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
        color: var(--text-secondary);
    }

    /* Contact form */
    .contact-form {
        max-width: 540px;
        margin: 0 auto 2rem;
        text-align: left;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .contact-form label {
        display: block;
        margin-bottom: 0.35rem;
        font-weight: 600;
        color: var(--text-color);
    }

    .contact-form input,
    .contact-form textarea {
        width: 100%;
        padding: 0.85rem 1rem;
        border: 1px solid var(--border-color);
        border-radius: 10px;
        background: var(--card-bg);
        color: var(--text-color);
        font: inherit;
        box-shadow: 0 3px 10px var(--shadow-color);
    }

    .contact-form input::placeholder,
    .contact-form textarea::placeholder {
        color: var(--text-secondary);
        opacity: 0.7;
    }

    .contact-form input:focus,
    .contact-form textarea:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.18);
    }

    .contact-form textarea {
        resize: vertical;
        min-height: 140px;
    }

    .contact-submit {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        width: auto;
        min-width: 170px;
        padding: 0.75rem 1.4rem;
        background: var(--primary-color);
        color: white;
        border: none;
        border-radius: 25px;
        font: inherit;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .form-submit-row {
        text-align: center;
        margin-top: 1.25rem;
    }

    .contact-submit:hover {
        background: var(--primary-hover);
        transform: translateY(-2px);
    }

    .contact-honeypot {
        display: none;
    }

    /* Contact profile links */
    .contact-links {
        display: flex;
        justify-content: center;
        gap: 1rem;
        flex-wrap: wrap;
        margin-top: 1.5rem;
    }

    .contact-links a {
        display: inline-flex;
        align-items: center;
        gap: 0.45rem;
        padding: 12px 24px;
        background: #0077b5;
        color: white;
        text-decoration: none;
        border-radius: 25px;
        transition: all 0.3s ease;
    }

    .contact-links a:hover {
        background: #005885;
        transform: translateY(-2px);
    }

    .professional-site-callout {
        max-width: 640px;
        margin: 0 auto 2rem;
        padding: 0;
        text-align: center;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .professional-site-callout p {
        font-size: 1.1rem;
        margin: 0;
        color: var(--text-secondary);
    }

    .professional-site-callout a,
    .professional-site-callout a:visited,
    .professional-site-callout a:hover,
    .professional-site-callout a:active {
        color: #0066cc;
        text-decoration: none;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

 

    @media (max-width: 480px) {
        .contact-form {
            max-width: 100%;
        }

        .contact-links {
            flex-direction: row;
            justify-content: center;
            align-items: center;
            gap: 0.7rem;
        }

        .contact-links a {
            justify-content: center;
            flex: 0 0 auto;
            padding: 10px 18px;
            font-size: 0.95rem;
        }
    }
    
    
    /* Footer */
    footer {
        background: var(--card-bg);
        color: var(--text-color);
        text-align: center;
        padding: 2rem 0;
        border-top: 1px solid var(--border-color);
        transition: all 0.3s ease;
    }
    
    /* Responsive Design */
    @media (max-width: 1300px) {
        nav {
            position: relative;
        }

        .nav-links {
            display: none;
        }

        .mobile-nav-toggle {
            display: inline-flex;
            margin-right: 64px;
        }

        .mobile-menu {
            position: absolute;
            top: calc(100% + 0.6rem);
            right: 84px;
            left: auto;
            width: min(260px, calc(100vw - 110px));
            display: none;
            flex-direction: column;
            gap: 0.25rem;
            padding: 0.65rem;
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 16px;
            box-shadow: 0 12px 35px var(--shadow-hover);
        }

        .mobile-menu.open {
            display: flex;
        }
    }

    @media (max-width: 768px) {
        .hero h1 {
            font-size: 2rem;
        }
    
        .about-content {
            grid-template-columns: 1fr;
        }
    
        .certifications-grid {
            grid-template-columns: 1fr;
        }
    
        .projects-grid {
            grid-template-columns: 1fr;
        }
    
        .experience-header {
            flex-direction: column;
            align-items: flex-start;
        }
    
        .section {
            padding: 60px 0;
        }
    
        .theme-toggle {
            width: 42px;
            height: 42px;
        }
    
        .konami-code {
            position: fixed;
            top: -100px;
            left: -100px;
            opacity: 0;
            pointer-events: none;
        }
    }
    
    /* Animations */
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .fade-in {
        animation: fadeInUp 0.6s ease-out;
    }
    
    /* Theme transition */
    * {
        transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    }

    .btn-gallery {
        display: inline-flex;
        align-items: center;
        gap: 0.45rem;
        padding: 0.5rem 1rem;
        background: var(--primary-color);
        color: white;
        border: none;
        border-radius: 5px;
        font-size: 1rem;
        font-family: inherit;
        cursor: pointer;
        text-decoration: none;
        transition: background 0.3s ease;
    }
    .btn-gallery:hover {
        background: var(--primary-hover);
    }

    /* ── Carousel Overlay ── */
    .carousel-overlay {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 9000;
        background: rgba(0, 0, 0, 0.75);
        backdrop-filter: blur(4px);
        align-items: center;
        justify-content: center;
        padding: 1rem;
    }
    .carousel-overlay.open {
        display: flex;
    }

    .carousel-modal {
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 16px;
        box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
        width: 100%;
        max-width: 820px;
        max-height: 90vh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        position: relative;
    }

    .carousel-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1rem 1.25rem 0.75rem;
        border-bottom: 1px solid var(--border-color);
        flex-shrink: 0;
    }
    .carousel-header h3 {
        font-size: 1rem;
        font-weight: 600;
        color: var(--text-color);
        margin: 0;
    }
    .carousel-close {
        background: none;
        border: none;
        cursor: pointer;
        color: var(--text-secondary);
        font-size: 1.25rem;
        line-height: 1;
        padding: 0.25rem;
        border-radius: 4px;
        transition: color 0.2s, background 0.2s;
    }
    .carousel-close:hover {
        color: var(--text-color);
        background: var(--section-bg);
    }

    /* Main image area */
    .carousel-stage {
        position: relative;
        flex: 1;
        min-height: 0;
        background: #000;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }
    .carousel-stage img {
        max-width: 100%;
        max-height: 65vh;
        object-fit: contain;
        display: block;
        transition: opacity 0.25s ease;
    }
    .carousel-stage img.fading {
        opacity: 0;
    }

    /* Prev / Next arrows */
    .carousel-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(0, 0, 0, 0.45);
        color: #fff;
        border: none;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        font-size: 1rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.2s;
        z-index: 2;
        flex-shrink: 0;
    }
    .carousel-arrow:hover { background: rgba(0,0,0,0.7); }
    .carousel-arrow.prev { left: 0.75rem; }
    .carousel-arrow.next { right: 0.75rem; }

    /* Caption + counter */
    .carousel-caption {
        padding: 0.6rem 1.25rem 0.5rem;
        font-size: 0.85rem;
        color: var(--text-secondary);
        text-align: center;
        flex-shrink: 0;
        min-height: 2.2rem;
        border-top: 1px solid var(--border-color);
    }

    /* Thumbnail strip */
    .carousel-thumbs {
        display: flex;
        gap: 0.5rem;
        padding: 0.6rem 1rem;
        overflow-x: auto;
        scrollbar-width: thin;
        border-top: 1px solid var(--border-color);
        flex-shrink: 0;
        scroll-behavior: smooth;
    }
    .carousel-thumbs::-webkit-scrollbar { height: 4px; }
    .carousel-thumbs::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 2px; }
    .carousel-thumb {
        flex-shrink: 0;
        width: 56px;
        height: 44px;
        border-radius: 6px;
        overflow: hidden;
        cursor: pointer;
        border: 2px solid transparent;
        transition: border-color 0.2s;
        opacity: 0.6;
        transition: opacity 0.2s, border-color 0.2s;
    }
    .carousel-thumb.active {
        border-color: var(--primary-color);
        opacity: 1;
    }
    .carousel-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    /* No images state */
    .carousel-empty {
        padding: 3rem 1.5rem;
        text-align: center;
        color: var(--text-secondary);
        font-size: 0.95rem;
    }
    .carousel-empty i { font-size: 2rem; margin-bottom: 0.75rem; display: block; }

    /* Keyboard hint */
    .carousel-hint {
        font-size: 0.75rem;
        color: var(--text-secondary);
        opacity: 0.6;
        text-align: center;
        padding: 0 1rem 0.5rem;
        flex-shrink: 0;
    }

    @media (max-width: 480px) {
        .carousel-arrow { width: 34px; height: 34px; font-size: 0.85rem; }
        .carousel-thumbs { display: none; }
        .carousel-hint { display: none; }
    }
