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

:root {
    /* Light Theme */
    --bg: #f6f3ef;
    --bg-2: rgba(255, 255, 255, 0.6);
    --card: rgba(255, 255, 255, 0.85);
    --ink: #111216;
    --muted: #5b616b;
    --accent: #ff6b35; /* Orange accent */
    --accent-2: #1f6f78; /* Teal accent */
    --accent-3: #f5b700;
    --line: rgba(17, 18, 22, 0.12);
    --line-glow: rgba(31, 111, 120, 0.15);
    --shadow-sm: 0 4px 15px rgba(17, 18, 22, 0.04);
    --shadow-md: 0 8px 24px rgba(17, 18, 22, 0.06);
    --shadow-lg: 0 16px 40px rgba(17, 18, 22, 0.08);
    --radius: 24px;
    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
    
    --glow-1: rgba(255, 107, 53, 0.18);
    --glow-2: rgba(31, 111, 120, 0.16);
    --glow-3: rgba(245, 183, 0, 0.12);
    --grid-color: rgba(17, 18, 22, 0.08);
    --header-bg: rgba(246, 243, 239, 0.85);
}

[data-theme="dark"] {
    --bg: #050505;
    --bg-2: rgba(15, 15, 20, 0.4);
    --card: rgba(20, 20, 25, 0.35);
    --ink: #f0f0f5;
    --muted: #9ba1b0;
    --accent: #ff6b35; /* Orange accent */
    --accent-2: #00f0ff; /* Cyan tech accent */
    --accent-3: #f5b700;
    --line: rgba(255, 255, 255, 0.08); /* subtle light border */
    --line-glow: rgba(0, 240, 255, 0.15);
    --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 45px rgba(0, 0, 0, 0.4);
    
    --glow-1: rgba(255, 107, 53, 0.08);
    --glow-2: rgba(0, 240, 255, 0.05);
    --glow-3: rgba(0, 0, 0, 0.4);
    --grid-color: rgba(255, 255, 255, 0.03);
    --header-bg: rgba(5, 5, 5, 0.6);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', system-ui, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
}

body.no-scroll {
    overflow: hidden;
}

/* Vanta background element */
#vanta-bg {
    position: fixed;
    inset: 0;
    z-index: -3; /* behind everything */
    width: 100%;
    height: 100vh;
}

/* Base gradients and grid overlay for extra texture */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 15% 10%, var(--glow-1), transparent 50%),
        radial-gradient(circle at 85% 20%, var(--glow-2), transparent 45%),
        radial-gradient(circle at 50% 80%, var(--glow-3), transparent 60%);
    pointer-events: none;
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(var(--grid-color) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: -1;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}
button {
    cursor: pointer;
}

input, textarea {
    cursor: text;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-14px);
    }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes typingDot {
    0%, 80%, 100% {
        opacity: 0.25;
        transform: translateY(0);
    }
    40% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

@keyframes timelineIn {
    0% {
        opacity: 0;
        transform: translateX(var(--from-x)) translateY(18px) scale(0.93);
        filter: blur(8px);
    }
    55% {
        opacity: 1;
        transform: translateX(0) translateY(-12px) scale(1.05);
        filter: blur(2px);
    }
    72% {
        transform: translateX(0) translateY(8px) scale(0.985);
        filter: blur(0.5px);
    }
    86% {
        transform: translateX(0) translateY(-4px) scale(1.015);
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: translateX(0) translateY(0) scale(1);
        filter: blur(0);
    }
}

/* Header Glassmorphism - Floating Capsule Pill Redesign */
.site-header {
    position: fixed;
    top: 1.2rem;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 2.5rem);
    max-width: 1100px;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--line);
    border-radius: 999px;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    transition: all 0.3s var(--ease);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 0.45rem 1.6rem;
}

.site-header .btn {
    padding: 0.45rem 1.1rem;
    font-size: 0.82rem;
    box-shadow: none;
}

.site-header .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.logo img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--line);
    background: var(--card);
    padding: 0;
}

.logo-name {
    font-size: 1rem;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--ink);
    font-weight: 500;
    position: relative;
    padding: 0.25rem 0;
    transition: color 0.2s var(--ease);
}

.main-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transition: width 0.2s var(--ease);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--accent-2);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-actions .btn {
    padding: 0.7rem 1.4rem;
    font-size: 0.95rem;
}

.theme-toggle {
    width: 38px;
    height: 38px;
    padding: 0 !important;
    min-width: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    color: var(--ink);
    border: 1px solid transparent;
    transition: background 0.3s, border-color 0.3s;
}

.theme-toggle:hover {
    background: var(--bg-2);
    border-color: var(--line);
}

.theme-toggle svg {
    transition: transform 0.3s var(--ease);
}

.theme-toggle:hover svg {
    transform: rotate(15deg) scale(1.1);
}

:root .theme-toggle .sun-icon { display: none; }
:root .theme-toggle .moon-icon { display: block; }

[data-theme="dark"] .theme-toggle .sun-icon { display: block; }
[data-theme="dark"] .theme-toggle .moon-icon { display: none; }

.mobile-nav-toggle {
    display: none;
    flex-direction: column;
    border: none;
    background: transparent;
    cursor: pointer;
    gap: 5px;
    padding: 0.5rem;
}

.mobile-nav-toggle span {
    width: 26px;
    height: 3px;
    background: var(--ink);
    border-radius: 999px;
    transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.mobile-nav-toggle.is-active span:nth-of-type(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-nav-toggle.is-active span:nth-of-type(2) {
    opacity: 0;
}

.mobile-nav-toggle.is-active span:nth-of-type(3) {
    transform: translateY(-8px) rotate(-45deg);
}

main {
    padding-top: 90px;
}

/* Hero */
.hero {
    position: relative;
    padding: 6rem 0 4rem;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.2), transparent 70%);
    top: -220px;
    right: -220px;
    z-index: -1;
}

.hero::after {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(31, 111, 120, 0.2), transparent 70%);
    bottom: -200px;
    left: -200px;
    z-index: -1;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    align-items: center;
}

.hero-text {
    animation: rise 0.9s var(--ease) both;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-2);
    margin-bottom: 0.9rem;
}

.hero-text h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3.6rem;
    line-height: 1.05;
    margin-bottom: 1.2rem;
}

.text-rotate {
    display: inline-block;
    position: relative;
    color: var(--accent-2);
    min-width: 14ch;
    transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.text-rotate::after {
    content: '|';
    margin-left: 0.15rem;
    color: var(--accent);
    animation: blink 1s steps(2) infinite;
}

.text-rotate.is-out {
    opacity: 0;
    transform: translateY(8px);
}

.lead {
    font-size: 1.15rem;
    color: var(--muted);
}

.highlight {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 600;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.6rem;
    border-radius: 999px;
    border: 1px solid transparent;
    text-decoration: none;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 16px 30px rgba(255, 107, 53, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(255, 107, 53, 0.3);
}

.btn-ghost {
    background: transparent;
    border-color: var(--line);
}

.btn-ghost:hover {
    transform: translateY(-2px);
    border-color: var(--ink);
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 2rem;
    width: 100%;
}

.metric {
    background: var(--card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid var(--line);
    padding: 0.85rem 1rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.metric:hover {
    transform: translateY(-4px);
    border-color: var(--accent-2);
    box-shadow: 0 8px 24px rgba(0, 240, 255, 0.08);
}

.metric small {
    color: var(--muted);
}

.hero-card {
    background: var(--bg-2);
    border-radius: 28px;
    padding: 1.2rem;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: rise 0.9s var(--ease) 0.15s both;
}

.hero-card img {
    border-radius: 20px;
    animation: float 6s ease-in-out infinite;
}

.hero-badges {
    position: absolute;
    left: 1.2rem;
    bottom: 1.2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.badge {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--line);
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* Sections */
.section {
    padding: 4.5rem 0;
}

.section-head {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 2.5rem;
}

.section-kicker {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-2);
    margin-bottom: 0.6rem;
}

.section-head h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.6rem;
    margin-bottom: 0.8rem;
}

.section-subtitle {
    color: var(--muted);
}

/* Skills */
.skills {
    background: var(--bg-2);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background: var(--card);
    backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 1.6rem;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
}

.skill-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 4px;
    width: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    opacity: 0.7;
    transition: opacity 0.3s;
}

.skill-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 240, 255, 0.1);
    border-color: var(--line-glow);
}
.skill-card:hover::after {
    opacity: 1;
}

html.js .skill-card {
    opacity: 0;
    transform: translateY(20px);
}

html.js .skill-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.skill-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 0.6rem;
}

.skill-card p {
    color: var(--muted);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}


.skill-tags span {
    background: var(--bg-2);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.4rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.skill-tags span:hover {
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-2);
    border-color: var(--accent-2);
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 2.5rem;
    align-items: center;
}

.about-media {
    display: flex;
    justify-content: center;
}

.about-media img {
    width: clamp(200px, 30vw, 280px);
    height: clamp(200px, 30vw, 280px);
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
}

.about-card {
    background: var(--card);
    backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 2rem;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.about-card p {
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.about-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.about-list div {
    background: var(--bg-2);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.7rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.about-caption {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-2);
    margin-bottom: 0.6rem;
}

.about-tags {
    margin-bottom: 1.8rem;
}

.about-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Journey */
.journey {
    background: var(--bg-2);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.journey-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
}

.journey-col {
    display: grid;
    gap: 1rem;
    position: relative;
    padding-left: 1.6rem;
}

.journey-col::before {
    content: '';
    position: absolute;
    top: 2.4rem;
    bottom: 0.6rem;
    left: 0.5rem;
    width: 2px;
    background: linear-gradient(180deg, rgba(255, 107, 53, 0.6), rgba(31, 111, 120, 0.35));
    border-radius: 999px;
}

.journey-col h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
}

.journey-card {
    background: var(--card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.4rem;
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 0.4rem;
    position: relative;
    transition: transform 0.3s, border-color 0.3s;
}
.journey-card:hover {
    transform: translateX(6px);
    border-color: var(--line-glow);
}

.journey-card::before {
    content: '';
    position: absolute;
    left: -1.3rem;
    top: 1.4rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 6px rgba(255, 107, 53, 0.18);
}

.journey-date {
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-2);
}

.journey-card h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
}

.journey-card p {
    color: var(--muted);
}

/* Projects */
.projects-timeline {
    margin-top: 2rem;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
    display: grid;
    gap: 1.6rem;
    border-left: 2px solid var(--line);
    padding-left: 2.5rem;
}

.timeline-item {
    position: relative;
    background: var(--card);
    backdrop-filter: blur(12px);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 0.8rem;
    max-width: 720px;
    margin: 0 auto;
    min-height: 240px;
    align-content: start;
    overflow: hidden;
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.3s;
}

.timeline-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(0, 240, 255, 0.12);
    border-color: var(--line-glow);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: calc(-2.5rem - 6px);
    top: 1.6rem;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 6px rgba(255, 107, 53, 0.18);
}

.timeline-item::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    border: 1px solid transparent;
    background: linear-gradient(120deg, rgba(255, 107, 53, 0.35), rgba(31, 111, 120, 0.25)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.timeline-item .timeline-date {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 107, 53, 0.12);
    color: var(--accent-2);
    border: 1px solid rgba(255, 107, 53, 0.25);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    width: fit-content;
}

.timeline-item .timeline-content {
    position: relative;
    padding-left: 0.8rem;
}

.timeline-item .timeline-content::before {
    content: '';
    position: absolute;
    left: -0.2rem;
    top: 0.1rem;
    width: 4px;
    height: 2.2rem;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.timeline-date {
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-2);
}

.timeline-content h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.35rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: 3.2rem;
}

.timeline-content p {
    color: var(--muted);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: 3rem;
}

html.js .timeline-item {
    opacity: 0;
    transform: translateX(-36px) translateY(12px) scale(0.96);
    filter: blur(6px);
    --from-x: -36px;
}

html.js .timeline-item:nth-child(even) {
    transform: translateX(36px) translateY(12px) scale(0.96);
    --from-x: 36px;
}

html.js .timeline-item.is-visible {
    animation: timelineIn 0.85s var(--ease) forwards;
}

html.js .timeline-item:nth-child(1) { transition-delay: 0.05s; }
html.js .timeline-item:nth-child(2) { transition-delay: 0.12s; }
html.js .timeline-item:nth-child(3) { transition-delay: 0.18s; }
html.js .timeline-item:nth-child(4) { transition-delay: 0.24s; }
html.js .timeline-item:nth-child(5) { transition-delay: 0.3s; }

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.4rem;
    min-height: 52px;
}

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

.project-link {
    text-decoration: none;
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--accent-2);
    border: 1px solid rgba(31, 111, 120, 0.3);
    background: rgba(31, 111, 120, 0.08);
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}

.project-link:hover {
    transform: translateY(-2px);
    border-color: rgba(31, 111, 120, 0.6);
    box-shadow: 0 10px 20px rgba(31, 111, 120, 0.15);
}

.project-tags span {
    background: var(--bg-2); /* Fix for white container texts */
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.4rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.project-footer {
    margin-top: auto;
}

.project-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent-2);
    font-weight: 600;
}

/* Contact */
.contact {
    background: var(--bg-2);
    border-top: 1px solid var(--line);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2rem;
}

.contact-card,
.contact-form {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
}

.contact-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 0.8rem;
}

.contact-card p {
    color: var(--muted);
}

.contact-list {
    margin: 1.5rem 0 2rem;
    display: grid;
    gap: 0.8rem;
}

.contact-actions {
    margin-top: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-2); /* Fix for white container texts */
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
}

.contact-item a {
    text-decoration: none;
    font-weight: 600;
    color: var(--accent-2);
    overflow-wrap: anywhere;
    text-align: right;
}

.contact-form label {
    font-weight: 600;
    margin-bottom: 0.4rem;
    display: block;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    margin-bottom: 1rem;
    font-family: 'Outfit', sans-serif;
    color: var(--ink); /* explicit color */
    background: var(--bg-2); /* Fix for hardcoded white */
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ai-chat {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 1200;
    display: grid;
    justify-items: end;
    gap: 0.85rem;
}

.ai-chat-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: rgba(20, 20, 25, 0.95);
    color: #fff;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    position: relative;
    cursor: pointer;
    transition: transform 0.25s var(--ease), background-color 0.25s;
}

.ai-chat-toggle:hover {
    transform: scale(1.08);
    background: var(--accent);
}

.ai-chat-toggle svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    display: block;
}

.ai-chat-toggle-status {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #55d66b;
    box-shadow: 0 0 0 3px rgba(85, 214, 107, 0.18);
    border: 1.5px solid rgba(20, 20, 25, 0.95);
}

.ai-chat-panel {
    width: min(390px, calc(100vw - 2rem));
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    overflow: hidden;
}

.ai-chat-panel[hidden] {
    display: none;
}

.ai-chat-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 1.25rem 1rem;
    border-bottom: 1px solid var(--line);
}

.ai-chat-kicker {
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.72rem;
    color: var(--accent-2);
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.ai-chat-head h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.15rem;
}

.ai-chat-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    font-size: 1.3rem;
    line-height: 1;
}

.ai-chat-messages {
    max-height: 320px;
    overflow-y: auto;
    display: grid;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
}

.ai-message {
    max-width: 88%;
    padding: 0.85rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.ai-message p {
    white-space: pre-wrap;
}

.ai-message.is-awaiting {
    min-width: 88px;
}

.ai-typing {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 1.2rem;
}

.ai-typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    animation: typingDot 1.1s ease-in-out infinite;
}

.ai-typing span:nth-child(2) {
    animation-delay: 0.18s;
}

.ai-typing span:nth-child(3) {
    animation-delay: 0.36s;
}

.ai-message-bot {
    justify-self: start;
    background: var(--bg-2);
}

.ai-message-user {
    justify-self: end;
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.ai-message.is-pending {
    opacity: 0.72;
}

.ai-chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    padding: 0 1.25rem 1rem;
}

.ai-chip {
    border-radius: 999px;
    border: 1px solid rgba(31, 111, 120, 0.35);
    background: rgba(31, 111, 120, 0.08);
    color: var(--accent-2);
    padding: 0.45rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
}

.ai-chat-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    padding: 0 1.25rem 1rem;
    align-items: center;
}

.ai-chat-form input {
    margin-bottom: 0;
}

.ai-chat-form button {
    min-width: 110px;
}

.ai-chat-note {
    color: var(--muted);
    font-size: 0.78rem;
    padding: 0 1.25rem 1.25rem;
}

/* Footer */
.site-footer {
    padding: 3rem 0 2rem;
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 2rem;
    align-items: start;
    margin-bottom: 2rem;
}

.site-footer h3 {
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 0.6rem;
}

.footer-links {
    display: grid;
    gap: 0.6rem;
}

.footer-links a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-links svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.footer-links svg.icon-fill {
    fill: currentColor;
    stroke: none;
}

.footer-note {
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}

/* Mobile */
@media (max-width: 1150px) {
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 78%;
        max-width: 320px;
        height: 100vh;
        background: var(--card);
        padding: 6rem 2rem 2rem;
        box-shadow: -20px 0 40px rgba(17, 18, 22, 0.2);
        transition: right 0.3s var(--ease);
        border-left: 1px solid var(--line);
        z-index: 999;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 1.2rem;
    }

    .main-nav a {
        font-size: 1.1rem;
    }

    .main-nav.nav-open {
        right: 0;
    }

    .mobile-nav-toggle {
        display: flex;
    }

    .header-actions {
        margin-left: auto;
    }
    
    .header-actions .btn:not(.theme-toggle) {
        display: none;
    }

    .hero-grid,
    .about-grid,
    .contact-grid,
    .journey-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .ai-chat {
        right: 1rem;
        bottom: 1rem;
    }

}

@media (max-width: 768px) {
    .hero-text h1 {
        font-size: 2.6rem;
    }

    .section-head h2 {
        font-size: 2rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .projects-timeline {
        padding-left: 2rem;
    }

    .timeline-item::before {
        left: calc(-2rem - 6px);
    }

    .about-list {
        grid-template-columns: 1fr;
    }

    .ai-chat {
        right: 1rem;
        bottom: 1rem;
        left: auto;
        justify-items: end;
    }

    .ai-chat-panel {
        width: min(390px, calc(100vw - 2rem));
    }

    .ai-chat-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 4.5rem 0 3rem;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .metric {
        min-width: 120px;
    }

    .contact-card,
    .contact-form {
        padding: 1.5rem;
    }

    .projects-timeline {
        padding-left: 1.5rem;
    }

    .timeline-item::before {
        left: calc(-1.5rem - 6px);
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    html.js .timeline-item {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        animation: none !important;
    }
}

/* Redesign Ingénieur - Nouveaux Composants */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-2);
    border: 1px solid var(--line);
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 1.2rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-family: 'Space Grotesk', sans-serif;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981; /* pulsing green */
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* IDE Code Window */
.code-window {
    background: rgba(10, 10, 15, 0.75);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.82rem;
    color: #e2e8f0;
    overflow: hidden;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    animation: rise 0.9s var(--ease) 0.15s both;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.code-window-header {
    background: rgba(15, 15, 20, 0.9);
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}

.code-window-controls {
    display: flex;
    gap: 6px;
}

.code-window-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.code-window-dot.red { background: #ef4444; }
.code-window-dot.yellow { background: #f59e0b; }
.code-window-dot.green { background: #10b981; }

.code-window-title {
    font-size: 0.7rem;
    color: var(--muted);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
}

.code-window-tabs {
    display: flex;
    background: rgba(8, 8, 12, 0.9);
    border-bottom: 1px solid var(--line);
    font-size: 0.75rem;
    font-family: 'Space Grotesk', sans-serif;
}

.code-window-tab {
    padding: 0.4rem 0.8rem;
    border-right: 1px solid var(--line);
    color: var(--muted);
    background: rgba(15, 15, 20, 0.5);
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

.code-window-tab.active {
    background: rgba(10, 10, 15, 0.75);
    color: var(--accent-2);
    border-bottom: 2px solid var(--accent-2);
}

.code-window-body {
    padding: 1rem;
    overflow-x: auto;
    white-space: pre;
    line-height: 1.45;
}

.code-line {
    display: flex;
    gap: 0.8rem;
}

.code-line-number {
    color: #475569;
    text-align: right;
    min-width: 1.2rem;
    user-select: none;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding-right: 0.4rem;
}

.code-content {
    flex-grow: 1;
}

/* Syntax Highlighting */
.code-keyword { color: #ff6b35; font-weight: 600; } /* Orange accent */
.code-property { color: #00f0ff; } /* Cyan tech accent */
.code-string { color: #10b981; } /* Emerald */
.code-number { color: #f5b700; } /* Yellow accent */
.code-comment { color: var(--muted); font-style: italic; }

/* Repositories elements */
.repo-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 0.6rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
}

.repo-icon {
    display: inline-flex;
    align-items: center;
    color: var(--accent-2);
}

.repo-status {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
    padding: 0.15rem 0.5rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.repo-status.live {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.2);
}

.repo-status.code {
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-2);
    border-color: rgba(0, 240, 255, 0.2);
}

.repo-status.pwa {
    background: rgba(245, 183, 0, 0.1);
    color: #f5b700;
    border-color: rgba(245, 183, 0, 0.2);
}

.repo-status.desktop {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
    border-color: rgba(168, 85, 247, 0.2);
}

/* Redesign Ingénieur - Mises à jour esthétiques complètes */

.logo-name {
    font-size: 0.95rem;
    white-space: nowrap;
    transition: opacity 0.3s;
}

.main-nav ul {
    gap: 1.1rem; /* tighter gaps for mid-sized screens */
}

/* Hero Technical Metrics styling and fix */
.metric-label {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.65rem;
    letter-spacing: 1px;
    color: var(--accent-2);
    font-weight: 600;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.metric-value {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.metric-bar {
    width: 100%;
    height: 4px;
    background: var(--line);
    border-radius: 99px;
    overflow: hidden;
}

.metric-bar .fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 99px;
}

/* Skill Card Module Index */
.card-num {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.7rem;
    color: var(--accent-2);
    font-weight: 600;
    letter-spacing: 1.5px;
    margin-bottom: 0.4rem;
    opacity: 0.75;
}

/* About Section Console Logs */
.about-console {
    background: rgba(10, 10, 12, 0.6);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1.2rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    color: #e2e8f0;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.8rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.console-line {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    line-height: 1.6;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.console-line:last-child {
    border-bottom: none;
}

.console-prefix {
    color: #10b981;
    font-weight: 700;
    white-space: nowrap;
}

/* Journey Timeline commit details */
.commit-hash {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.68rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.4rem;
    opacity: 0.85;
}

/* Unified Timeline Layouts (Journey & Projects) */
.journey-timeline-unified,
.projects-timeline-unified {
    position: relative;
    padding-left: 2.2rem;
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    margin-top: 1.5rem;
}

.journey-timeline-unified::before,
.projects-timeline-unified::before {
    content: '';
    position: absolute;
    top: 0.5rem;
    bottom: 0.5rem;
    left: 12px;
    width: 2px;
    background: linear-gradient(180deg, var(--accent), var(--accent-2) 50%, rgba(0, 240, 255, 0.05));
    border-radius: 99px;
}

.timeline-category {
    position: relative;
    margin: 1.2rem 0 0.2rem;
    z-index: 2;
}

.category-tag {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    display: inline-block;
}

.timeline-node {
    position: absolute;
    left: -30px;
    top: 1.8rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--bg);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.15);
    z-index: 3;
    transition: transform 0.3s var(--ease), background-color 0.3s, box-shadow 0.3s;
}

.projects-timeline-unified .timeline-node {
    background: var(--accent-2);
    box-shadow: 0 0 0 4px rgba(0, 240, 255, 0.15);
}

.journey-card:hover .timeline-node {
    transform: scale(1.3);
    background: var(--accent-2);
    box-shadow: 0 0 0 6px rgba(0, 240, 255, 0.25);
}

.project-repo-card:hover .timeline-node {
    transform: scale(1.3);
    background: var(--accent);
    box-shadow: 0 0 0 6px rgba(255, 107, 53, 0.25);
}

.project-repo-card {
    background: var(--card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.6rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
}

.project-repo-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
    opacity: 0.6;
    transition: opacity 0.3s;
}

.repo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.repo-body {
    flex-grow: 1;
    margin-bottom: 1.25rem;
}

.repo-body h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
    color: var(--ink);
}

.repo-body p {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.repo-date {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--bg-2);
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--line);
}

.repo-footer {
    border-top: 1px solid var(--line);
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Form Console Panel */
.form-console {
    background: var(--card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.form-console-header {
    background: rgba(15, 15, 20, 0.9);
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}

.cmd-prompt {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.78rem;
    color: #10b981;
    font-weight: 600;
}

.form-console .contact-form {
    padding: 1.8rem;
    border: none;
    background: transparent;
    box-shadow: none;
}

/* Surprise Entrance Animations (3D Tilt Reveal) */
html.js .skill-card,
html.js .project-repo-card,
html.js .journey-card,
html.js .metric {
    opacity: 0;
    transform: translateY(50px) scale(0.92) rotateX(12deg);
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: opacity 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html.js .skill-card.is-visible,
html.js .project-repo-card.is-visible,
html.js .journey-card.is-visible,
html.js .metric.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0deg);
}

/* 3D Depth Hover Realism for Cards */
.skill-card,
.project-repo-card,
.journey-card {
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
                box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
                border-color 0.4s;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.skill-card:hover,
.project-repo-card:hover {
    transform: translateY(-8px) scale(1.02) translateZ(10px);
    box-shadow: 0 15px 35px rgba(0, 240, 255, 0.05);
    border-color: var(--accent-2);
}

.journey-card:hover {
    transform: translateX(8px) scale(1.01) translateZ(5px);
    border-color: var(--accent);
    box-shadow: 0 10px 24px rgba(255, 107, 53, 0.05);
}

/* Media Query Adaptations & Layout Overflows */
@media (max-width: 1100px) {
    .logo-name {
        display: none;
    }
    
    .nav-wrap {
        padding: 0.5rem 1.25rem;
    }
}

@media (max-width: 900px) {
    .hero-metrics {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .metric {
        padding: 1rem;
    }
    
    .site-header {
        top: 0.8rem;
        width: calc(100% - 1.5rem);
    }
}

@media (max-width: 500px) {
    .journey-timeline-unified,
    .projects-timeline-unified {
        padding-left: 1.5rem;
        gap: 1.4rem;
    }
    
    .journey-timeline-unified::before,
    .projects-timeline-unified::before {
        left: 8px;
    }
    
    .timeline-node {
        left: -21px;
        width: 10px;
        height: 10px;
        top: 1.6rem;
    }
}

/* Sticky top blur overlay behind floating capsule header */
.top-blur-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 6.5rem;
    background: linear-gradient(to bottom, rgba(11, 12, 16, 0.4) 15%, rgba(11, 12, 16, 0));
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: none;
    z-index: 999;
    mask-image: linear-gradient(to bottom, black 45%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, black 45%, transparent);
}



