/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
    --bg: #eef1fa;
    --bg-elevated: #dde3f5;
    --bg-elevated-2: #c7d1ed;
    --text-primary: #161a2e;
    --text-secondary: #4a4f6b;
    --text-muted: #7c81a1;
    --accent: #6d28d9;
    --accent-2: #2563eb;
    --accent-gradient: linear-gradient(135deg, #6d28d9, #2563eb);
    --accent-dim: #4c1d95;
    --accent-contrast: #ffffff;
    --accent-glow: rgba(109, 40, 217, .16);
    --accent-on-dark: #b79bfa;
    --border: rgba(16, 20, 46, .12);
    --border-hover: rgba(109, 40, 217, .4);
    --shadow-soft: 0 20px 50px rgba(16, 20, 46, .15);
    --radius: 14px;
    --radius-sm: 8px;
    --radius-pill: 999px;
    --nav-h: 84px;
    --container-w: 1200px;
    --ease: cubic-bezier(.16, 1, .3, 1);
}

/* ==========================================================================
   Reset & base
   ========================================================================== */
* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body.premium {
    margin: 0;
    background: var(--bg);
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

body.premium.menu-open { overflow: hidden; }

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }

.container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 32px;
}

.section { padding: clamp(64px, 10vw, 140px) 0; position: relative; }
.section--tight { padding: clamp(48px, 6vw, 90px) 0; }
.section--alt { background: var(--bg-elevated); }

.section__head { max-width: 640px; margin-bottom: 56px; }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}
.eyebrow::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--accent);
}
.section__title {
    font-size: clamp(1.8rem, 2.6vw, 2.6rem);
    line-height: 1.2;
    color: var(--text-primary);
}
.section__title span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Reveal-on-scroll */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > * { animation: revealStagger .7s var(--ease) both; }
.reveal-stagger.is-visible > *:nth-child(1) { animation-delay: .05s; }
.reveal-stagger.is-visible > *:nth-child(2) { animation-delay: .12s; }
.reveal-stagger.is-visible > *:nth-child(3) { animation-delay: .19s; }
.reveal-stagger.is-visible > *:nth-child(4) { animation-delay: .26s; }
.reveal-stagger > * { opacity: 0; transform: translateY(20px); }
@keyframes revealStagger {
    to { opacity: 1; transform: translateY(0); }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 28px;
    border-radius: var(--radius-pill);
    font-size: .9rem;
    font-weight: 500;
    letter-spacing: .02em;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease);
}
.btn--primary {
    background: var(--accent-gradient);
    color: var(--accent-contrast);
}
.btn--primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px var(--accent-glow);
}
.btn--ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--text-primary);
}
.btn--ghost:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
}
.btn svg { width: 16px; height: 16px; }

/* ==========================================================================
   Nav
   ========================================================================== */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 500;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background .4s var(--ease), border-color .4s var(--ease);
}
.nav.scrolled {
    background: rgba(8, 8, 14, .78);
    backdrop-filter: blur(14px);
    border-color: rgba(255, 255, 255, .1);
}
.nav__inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.05rem;
    color: #fff;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color .4s var(--ease);
}
.nav__logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--accent-gradient);
    color: var(--accent-contrast);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .85rem;
}
.nav__links {
    display: flex;
    align-items: center;
    gap: 22px;
}
.nav__link {
    font-size: .85rem;
    font-weight: 400;
    color: rgba(255, 255, 255, .72);
    position: relative;
    padding: 6px 0;
    white-space: nowrap;
    transition: color .3s var(--ease);
}
.nav__link::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 0; height: 1px;
    background: var(--accent);
    transition: width .3s var(--ease);
}
.nav__link:hover, .nav__link.active { color: #fff; }
.nav__link:hover::after, .nav__link.active::after { width: 100%; }
.nav__cta.btn { margin-left: 4px; padding: 12px 20px; font-size: .82rem; white-space: nowrap; flex-shrink: 0; }

.nav__langswitch {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, .25);
    flex-shrink: 0;
}
.nav__lang {
    padding: 5px 11px;
    border-radius: var(--radius-pill);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .03em;
    color: rgba(255, 255, 255, .6);
    transition: background .3s var(--ease), color .3s var(--ease);
}
.nav__lang:hover:not(.active) { color: #fff; }
.nav__lang.active {
    background: var(--accent-gradient);
    color: var(--accent-contrast);
}
body.menu-open .nav__lang { color: var(--text-muted); }
body.menu-open .nav__lang.active { color: var(--accent-contrast); }

.nav__langswitch--mobile {
    margin-top: 12px;
    padding: 5px;
}
.nav__langswitch--mobile .nav__lang {
    padding: 9px 18px;
    font-size: .9rem;
}

.nav__toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, .3);
    background: transparent;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}
.nav__toggle span {
    width: 18px;
    height: 1.5px;
    background: #fff;
    transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.menu-open .nav__toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-open .nav__toggle span:nth-child(2) { opacity: 0; }
.menu-open .nav__toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Nav is dark-glass at all times now (transparent over the hero, dark-translucent once
   scrolled) since nearly every section is dark — only the mobile overlay (light) needs
   its own dark-text override below. */
body.menu-open .nav__toggle { border-color: var(--border); }
body.menu-open .nav__toggle span { background: var(--text-primary); }
body.menu-open .nav__logo { color: var(--text-primary); }

.nav__mobile {
    position: fixed;
    inset: 0;
    z-index: 1;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.menu-open .nav__mobile {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.nav__mobile a {
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--text-primary);
}
.nav__mobile a:hover { color: var(--accent); }

/* Deliberate glowing seam between alternating dark sections — makes the boundary
   a design element instead of fighting to hide it. */
.section-divider {
    position: relative;
    z-index: 5;
    height: 3px;
    background: linear-gradient(90deg, #6d28d9, #2563eb, #10b981, #2563eb, #6d28d9);
    box-shadow: 0 0 16px 1px rgba(109, 40, 217, .55), 0 0 16px 1px rgba(16, 185, 129, .45);
}

/* ==========================================================================
   Hero
   ========================================================================== */
/* Two alternating dark palettes (violet-blue and emerald). Each fades to the SAME
   near-black tone at its own top/bottom edge, so wherever they meet — regardless
   of which two are adjacent, or section height — the seam blends through darkness
   instead of hard-cutting from one hue straight into the other. */
.hero,
.section--skills-dark,
.section--work-dark,
.section--freelance-dark,
.section--emerald-dark,
.story-hero {
    background:
        radial-gradient(circle at 18% 20%, rgba(109, 40, 217, .38) 0%, transparent 55%),
        radial-gradient(circle at 82% 78%, rgba(37, 99, 235, .32) 0%, transparent 55%),
        linear-gradient(180deg, #050608 0%, #0a0912 12%, #0a0912 88%, #050608 100%);
}

.section--emerald-dark {
    position: relative;
    overflow: hidden;
}
.section--emerald-dark .section__title { color: #fff; }
.section--emerald-dark .section__title span {
    background: linear-gradient(135deg, #a78bfa, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
}
.section--emerald-dark .eyebrow { color: var(--accent-on-dark); }
.section--emerald-dark .eyebrow::before { background: var(--accent-on-dark); }

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-h);
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    z-index: 0;
    top: -20%; right: -14%;
    width: max(65vw, 480px); height: max(65vw, 480px);
    max-width: 900px; max-height: 900px;
    background:
        radial-gradient(circle at 32% 30%, rgba(139, 92, 246, .3) 0%, transparent 60%),
        radial-gradient(circle at 68% 68%, rgba(59, 130, 246, .26) 0%, transparent 60%);
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    z-index: 3;
    inset: 0;
    opacity: .05;
    pointer-events: none;
    mix-blend-mode: screen;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' fill='white'/%3E%3C/svg%3E");
}
.particle-canvas {
    position: absolute;
    z-index: 1;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.hero__grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    align-items: center;
    gap: 48px;
}
.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: .82rem;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .68);
    margin-bottom: 26px;
}
.hero__eyebrow .dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--accent-gradient);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, .28);
    animation: dotBlink 1.8s ease-in-out infinite;
}
@keyframes dotBlink {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 4px rgba(139, 92, 246, .28); }
    50% { opacity: .35; box-shadow: 0 0 0 4px rgba(139, 92, 246, .08); }
}
.hero__title {
    position: relative;
    font-size: clamp(2.6rem, 5vw, 4.4rem);
    line-height: 1.08;
    color: #fff;
    margin-bottom: 24px;
}
.hero__title .line { display: block; }
.hero__title.is-dispersing .line { opacity: 0; }
.hero__title-canvas {
    position: absolute;
    left: 0;
    top: 0;
    pointer-events: none;
}
.hero__title .accent {
    background: linear-gradient(135deg, #a78bfa, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero__tagline {
    font-size: 1.05rem;
    font-weight: 300;
    color: rgba(255, 255, 255, .62);
    max-width: 520px;
    margin-bottom: 40px;
}
.hero .btn--ghost {
    border-color: rgba(255, 255, 255, .28);
    color: #fff;
}
.hero .btn--ghost:hover { border-color: rgba(255, 255, 255, .55); }
.hero__cta {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 56px;
    flex-wrap: wrap;
}
.hero__stats {
    display: flex;
    gap: 40px;
}
.hero__stat-num {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
}
.hero__stat-label {
    font-size: .78rem;
    color: rgba(255, 255, 255, .45);
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-top: 4px;
}

.hero__photo {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .14);
    box-shadow: 0 30px 70px rgba(0, 0, 0, .45), 0 0 60px rgba(76, 55, 200, .2);
    background: #14121c;
}
.hero__photo-layer {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.4s ease-in-out;
}
.hero__photo-layer.is-active { opacity: 1; }
.hero__photo-layer img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.hero__photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.55) 100%);
}
.hero__photo-badge {
    position: absolute;
    left: 20px; bottom: 20px;
    z-index: 2;
    background: rgba(10, 9, 14, .72);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: .78rem;
    color: rgba(255, 255, 255, .85);
}

.hero__scroll {
    position: absolute;
    left: 32px; bottom: 36px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .74rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .45);
    z-index: 2;
}
.hero__scroll-line {
    width: 1px; height: 40px;
    background: linear-gradient(rgba(255, 255, 255, .45), transparent);
    position: relative;
    overflow: hidden;
}
.hero__scroll-line::after {
    content: '';
    position: absolute;
    top: -100%; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(#a78bfa, #60a5fa);
    animation: scrollLine 2.2s ease-in-out infinite;
}
@keyframes scrollLine {
    0% { top: -100%; }
    60% { top: 100%; }
    100% { top: 100%; }
}

/* ==========================================================================
   About
   ========================================================================== */
.about__grid {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 64px;
    align-items: center;
}
.about__photo {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: 3 / 4;
}
.about__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: photoFloat 6s ease-in-out infinite;
}
.about__photo-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-self: start;
}
.about__photo-stack .about__photo { aspect-ratio: 4 / 3; }
@keyframes photoFloat {
    0%, 100% { transform: scale(1.08) translateY(0); }
    50% { transform: scale(1.08) translateY(-14px); }
}
.about__bio {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 36px;
}
.about__name { font-size: 1.1rem; color: var(--text-primary); margin-bottom: 2px; }
.about__role { font-size: .85rem; color: var(--accent); letter-spacing: .04em; }

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}
.stat__num {
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.stat__label {
    margin-top: 8px;
    font-size: .8rem;
    color: var(--text-muted);
    letter-spacing: .03em;
}

.about__grid--reverse .about__photo { order: 2; }
.about__photo--wide { aspect-ratio: 16 / 9; }
.about__photo--wide img { animation: none; }

.tag-pill-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 36px; }
.tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 9px 16px;
    border-radius: var(--radius-pill);
    background: rgba(109, 40, 217, .08);
    border: 1px solid rgba(109, 40, 217, .28);
    color: var(--accent);
    font-size: .85rem;
    font-weight: 500;
}
.section--work-dark .tag-pill {
    background: rgba(139, 92, 246, .14);
    border-color: rgba(139, 92, 246, .32);
    color: #cdbdfb;
}

/* Dark-emerald override for About (and shared by Journey/Clients further down) */
.section--emerald-dark .about__photo { border-color: rgba(255, 255, 255, .14); }
.section--emerald-dark .about__bio { color: rgba(255, 255, 255, .65); }
.section--emerald-dark .about__name { color: #fff; }
.section--emerald-dark .about__role { color: var(--accent-on-dark); }
.section--emerald-dark .stats { border-top-color: rgba(255, 255, 255, .12); }
.section--emerald-dark .stat__label { color: rgba(255, 255, 255, .45); }

/* ==========================================================================
   Skills
   ========================================================================== */
.section--skills-dark {
    position: relative;
    overflow: hidden;
}
.section--skills-dark .container { position: relative; z-index: 2; }
.section--skills-dark .section__title { color: #fff; }
.section--skills-dark .section__title span {
    background: linear-gradient(135deg, #a78bfa, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
}
.section--skills-dark .eyebrow { color: var(--accent-on-dark); }
.section--skills-dark .eyebrow::before { background: var(--accent-on-dark); }

.skills__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.skill-card {
    position: relative;
    padding: 36px 30px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .08);
    transition: transform .4s var(--ease), border-color .4s var(--ease), background .4s var(--ease);
    perspective: 600px;
}
.skill-card:hover {
    transform: translateY(-6px);
    border-color: rgba(139, 92, 246, .4);
    background: rgba(255, 255, 255, .05);
}
.skill-card__icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    background: #dcece2;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    transition: transform .7s var(--ease);
    transform-style: preserve-3d;
}
.skill-card:hover .skill-card__icon {
    transform: rotateY(360deg);
}
.skill-card__icon img { width: 26px; height: 26px; }
.skill-card__title {
    font-size: 1.05rem;
    color: #fff;
    margin-bottom: 10px;
    letter-spacing: .02em;
}
.skill-card__desc {
    font-size: .88rem;
    color: rgba(255, 255, 255, .65);
    line-height: 1.7;
}

/* ==========================================================================
   Journey / timeline
   ========================================================================== */
.timeline { position: relative; max-width: 920px; }
.timeline::before {
    content: '';
    position: absolute;
    left: 26px; top: 8px; bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, rgba(109, 40, 217, .4), rgba(37, 99, 235, .4));
}
.timeline__item {
    position: relative;
    margin-bottom: 28px;
    padding: 34px 34px 34px 68px;
    border-radius: var(--radius);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    transition: transform .4s var(--ease), border-color .4s var(--ease), background .4s var(--ease);
}
.timeline__item:last-child { margin-bottom: 0; }
.timeline__item:hover {
    transform: translateX(6px);
    border-color: var(--border-hover);
    background: var(--bg-elevated-2);
}
.timeline__marker {
    position: absolute;
    left: 19px; top: 38px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--accent);
    transform: scale(0);
    opacity: 0;
    transition: transform .5s var(--ease) .15s, opacity .5s var(--ease) .15s;
}
.timeline__item.is-visible .timeline__marker {
    transform: scale(1);
    opacity: 1;
}
.timeline__head {
    display: flex;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.timeline__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #fff;
    padding: 6px;
    flex-shrink: 0;
    overflow: hidden;
}
.timeline__logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.timeline__logo--dark { background: #14121c; }
.timeline__year {
    font-size: .92rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: .06em;
}
.timeline__company {
    font-size: 1.5rem;
    color: var(--text-primary);
    font-weight: 600;
}
.timeline__role {
    display: block;
    font-size: .95rem;
    color: var(--text-muted);
    margin-bottom: 14px;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.timeline__desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.75;
    max-width: 680px;
}
.timeline__projects {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}
.timeline__project {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: var(--radius-pill);
    background: rgba(109, 40, 217, .08);
    border: 1px solid rgba(109, 40, 217, .28);
    color: var(--accent);
    font-size: .88rem;
    font-weight: 500;
    transition: background .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
a.timeline__project:hover {
    background: rgba(109, 40, 217, .14);
    border-color: rgba(109, 40, 217, .5);
    transform: translateX(3px);
}
span.timeline__project {
    background: var(--bg-elevated-2);
    border-color: var(--border);
    color: var(--text-muted);
    cursor: default;
}
.timeline__project svg { width: 14px; height: 14px; }
span.timeline__project svg { display: none; }
/* Completed project, no detail page yet — still show the accent highlight. */
span.timeline__project--highlight {
    background: rgba(109, 40, 217, .08);
    border-color: rgba(109, 40, 217, .28);
    color: var(--accent);
}
span.timeline__project--highlight svg { display: inline-block; }

/* Journey sits on the dark-emerald backdrop — override the timeline for dark context */
.section--emerald-dark .timeline::before {
    background: linear-gradient(180deg, rgba(167, 139, 250, .5), rgba(96, 165, 250, .5));
}
.section--emerald-dark .timeline__item {
    background: rgba(255, 255, 255, .03);
    border-color: rgba(255, 255, 255, .08);
}
.section--emerald-dark .timeline__item:hover {
    border-color: rgba(139, 92, 246, .4);
    background: rgba(255, 255, 255, .05);
}
.section--emerald-dark .timeline__marker {
    background: #0a0912;
    border-color: var(--accent-on-dark);
}
.section--emerald-dark .timeline__year { color: var(--accent-on-dark); }
.section--emerald-dark .timeline__company { color: #fff; }
.section--emerald-dark .timeline__role { color: rgba(255, 255, 255, .5); }
.section--emerald-dark .timeline__desc { color: rgba(255, 255, 255, .68); }
.section--emerald-dark .timeline__project {
    background: rgba(139, 92, 246, .14);
    border-color: rgba(139, 92, 246, .32);
    color: #cdbdfb;
}
.section--emerald-dark a.timeline__project:hover {
    background: rgba(139, 92, 246, .24);
    border-color: rgba(139, 92, 246, .6);
}
.section--emerald-dark span.timeline__project {
    background: rgba(255, 255, 255, .05);
    border-color: rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .55);
}
.section--emerald-dark span.timeline__project--highlight {
    background: rgba(139, 92, 246, .14);
    border-color: rgba(139, 92, 246, .32);
    color: #cdbdfb;
}

/* ==========================================================================
   Journey photo cards
   ========================================================================== */
.journey-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.journey-card {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .1);
    background: #14121c;
    transition: transform .45s var(--ease), border-color .45s var(--ease);
}
.journey-card:hover { transform: translateY(-6px); border-color: var(--border-hover); }
.journey-card__photo { aspect-ratio: 4 / 3; overflow: hidden; }
.journey-card__photo img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .6s var(--ease);
}
.journey-card:hover .journey-card__photo img { transform: scale(1.06); }
.journey-card__body { padding: 24px; }
.journey-card__company {
    font-size: .8rem;
    letter-spacing: .03em;
    color: rgba(255, 255, 255, .5);
    margin-bottom: 6px;
}
.journey-card__role {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 12px;
}
.journey-card__desc {
    font-size: .9rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, .6);
}
.journey-card--more { display: none; }
.journey-card--more.is-visible { display: block; }
.journey-cards__more-wrap { display: flex; justify-content: center; margin-top: 40px; }
.journey-cards__more-btn { border-color: rgba(255, 255, 255, .28); color: #fff; }
.journey-cards__more-btn:hover { border-color: rgba(255, 255, 255, .55); }

/* ==========================================================================
   Work / portfolio grid
   ========================================================================== */
.section--work-dark {
    position: relative;
    overflow: hidden;
}
.section--work-dark .container { position: relative; z-index: 2; }
.section--work-dark .section__title { color: #fff; }
.section--work-dark .section__title span {
    background: linear-gradient(135deg, #a78bfa, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
}
.section--work-dark .eyebrow { color: var(--accent-on-dark); }
.section--work-dark .eyebrow::before { background: var(--accent-on-dark); }
.section--work-dark .about__photo { border-color: rgba(255, 255, 255, .14); }
.section--work-dark .about__bio { color: rgba(255, 255, 255, .65); }
.section--work-dark .about__name { color: #fff; }
.section--work-dark .about__role { color: var(--accent-on-dark); }

.work__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.work-card {
    position: relative;
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    aspect-ratio: 4 / 3;
    transition: transform .45s var(--ease), border-color .45s var(--ease);
}
.section--work-dark .work-card { border-color: rgba(255, 255, 255, .1); background: #14121c; }
.work-card:hover { transform: translateY(-6px); border-color: var(--border-hover); }
.work-card__img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .6s var(--ease);
    backface-visibility: hidden;
}
.work-card:hover .work-card__img {
    transform: scale(1.06);
}
.work-card__dim {
    position: absolute; inset: 0;
    background: rgba(6, 6, 7, .4);
    transition: opacity .45s var(--ease);
}
.work-card:hover .work-card__dim { opacity: .15; }
.work-card__overlay {
    position: absolute; inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 22px;
    background: linear-gradient(180deg, transparent 40%, rgba(6,6,7,.92) 100%);
}
.work-card__cat {
    font-size: .7rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--accent-on-dark);
    margin-bottom: 6px;
}
.work-card__title {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 6px;
}
.work-card__stack {
    font-size: .76rem;
    color: rgba(255, 255, 255, .62);
    opacity: 0;
    max-height: 0;
    transition: opacity .4s var(--ease), max-height .4s var(--ease);
}
.work-card:hover .work-card__stack { opacity: 1; max-height: 40px; }
.work-card__arrow {
    position: absolute;
    top: 18px; right: 18px;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(10, 9, 14, .55);
    border: 1px solid rgba(255, 255, 255, .16);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .35s var(--ease), transform .35s var(--ease), background .35s var(--ease);
}
.work-card:hover .work-card__arrow {
    opacity: 1;
    transform: translateY(0);
    background: var(--accent-gradient);
}
.work-card__arrow svg { width: 14px; height: 14px; stroke: #fff; }
.work-card:hover .work-card__arrow svg { stroke: var(--accent-contrast); }

.work__more { text-align: center; margin-top: 48px; }

/* ==========================================================================
   Clients
   ========================================================================== */
.clients__grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.client-logo {
    position: relative;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 26px;
    transition: background .35s var(--ease), transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .35s var(--ease);
}
.client-logo:hover {
    background: var(--bg-elevated);
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(16, 20, 46, .18);
    z-index: 3;
}
.section--emerald-dark .clients__grid { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .08); }
.section--emerald-dark .client-logo { background: #eef1f8; }
.section--emerald-dark .client-logo:hover {
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .45), 0 0 0 1px rgba(109, 40, 217, .25);
}
.client-logo img {
    max-height: 112px;
    max-width: 100%;
    width: auto;
    transition: transform .4s cubic-bezier(.34, 1.56, .64, 1);
}
/* Some official logos are very wide/short wordmarks — keep the same box
   as every other logo, just trim the side padding so the wordmark gets
   as much of that box's width as possible. */
.client-logo--wide { padding-left: 10px; padding-right: 10px; }
.client-logo:hover img {
    transform: scale(1.1) rotate(-1deg);
}

/* Custom tooltip (replaces the browser's native title-attribute tooltip) */
.client-logo::after {
    content: attr(data-name);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translate(-50%, 6px);
    white-space: nowrap;
    padding: 7px 13px;
    border-radius: var(--radius-sm);
    background: #0a0912;
    color: #fff;
    font-size: .78rem;
    font-weight: 500;
    letter-spacing: .01em;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
    opacity: 0;
    pointer-events: none;
    z-index: 4;
    transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.client-logo::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    border: 6px solid transparent;
    border-top-color: #0a0912;
    opacity: 0;
    pointer-events: none;
    z-index: 4;
    transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.client-logo:hover::after,
.client-logo:hover::before {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ==========================================================================
   Freelance
   ========================================================================== */
.section--freelance-dark {
    position: relative;
    overflow: hidden;
}
.section--freelance-dark .container { position: relative; z-index: 2; }
.section--freelance-dark .section__title { color: #fff; }
.section--freelance-dark .section__title span {
    background: linear-gradient(135deg, #a78bfa, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
}
.section--freelance-dark .eyebrow { color: var(--accent-on-dark); }
.section--freelance-dark .eyebrow::before { background: var(--accent-on-dark); }

.freelance__list {
    max-width: 720px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.freelance-card {
    padding: 30px 34px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .08);
    transition: transform .4s var(--ease), border-color .4s var(--ease), background .4s var(--ease);
}
.freelance-card:hover {
    transform: translateX(6px);
    border-color: rgba(139, 92, 246, .4);
    background: rgba(255, 255, 255, .05);
}
.freelance-card__title {
    font-size: 1.15rem;
    color: #fff;
    font-weight: 600;
    margin-bottom: 10px;
}
.freelance-card__desc {
    font-size: .95rem;
    color: rgba(255, 255, 255, .65);
    line-height: 1.7;
}
.freelance-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    font-size: .85rem;
    font-weight: 500;
    color: var(--accent-on-dark);
    transition: gap .3s var(--ease);
}
.freelance-card__link:hover { gap: 10px; }
.freelance-card__link svg { width: 14px; height: 14px; }

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta-band__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
    padding: 56px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--bg-elevated), var(--bg-elevated-2));
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
.cta-band__inner::before {
    content: '';
    position: absolute;
    top: -30%; left: -10%;
    width: 40%; height: 160%;
    background: radial-gradient(circle, var(--accent-glow), transparent 70%);
}
.cta-band__label {
    font-size: .8rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
}
.cta-band__title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: var(--text-primary);
    max-width: 560px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    border-top: 1px solid var(--border);
    padding: 56px 0 32px;
}
.footer__inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}
.footer__brand { max-width: 320px; }
.footer__logo { font-size: 1.05rem; font-weight: 600; margin-bottom: 12px; }
.footer__tag { font-size: .88rem; color: var(--text-muted); line-height: 1.7; }
.footer__contact { display: flex; flex-direction: column; gap: 10px; }
.footer__contact a {
    font-size: .92rem;
    color: var(--text-secondary);
    transition: color .3s var(--ease);
}
.footer__contact a:hover { color: var(--accent); }
.footer__social { display: flex; gap: 14px; }
.footer__social a {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .76rem;
    color: var(--text-secondary);
    transition: border-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
}
.footer__social a:hover {
    border-color: var(--border-hover);
    color: var(--accent);
    transform: translateY(-3px);
}
.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: .78rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Back to top
   ========================================================================== */
.back-to-top {
    position: fixed;
    right: 28px; bottom: 28px;
    z-index: 300;
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity .35s var(--ease), transform .35s var(--ease), border-color .35s var(--ease);
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { border-color: var(--border-hover); }
.back-to-top svg { width: 16px; height: 16px; }

/* Anchor offset so fixed nav doesn't cover section titles */
#about, #skills, #journey, #work, #clients, #freelance, #contact {
    scroll-margin-top: var(--nav-h);
}

/* ==========================================================================
   Story page (about.php)
   ========================================================================== */
.story-hero {
    position: relative;
    overflow: hidden;
    min-height: 62vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-h);
}
.story-hero__inner {
    position: relative;
    z-index: 2;
    max-width: 760px;
    text-align: center;
    margin: 0 auto;
}
.story-hero .eyebrow { justify-content: center; color: var(--accent-on-dark); }
.story-hero .eyebrow::before { background: var(--accent-on-dark); }
.story-hero__title {
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    line-height: 1.15;
    color: #fff;
    margin-bottom: 20px;
}
.story-hero__tagline {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, .62);
    max-width: 520px;
    margin: 0 auto;
}

/* Continuous dark → emerald backdrop spanning every section after the hero,
   so the color itself tracks the arc of the story instead of hard-cutting per block. */
.story-flow {
    position: relative;
    background:
        radial-gradient(circle at 18% 20%, rgba(109, 40, 217, .38) 0%, transparent 55%),
        radial-gradient(circle at 82% 78%, rgba(37, 99, 235, .32) 0%, transparent 55%),
        linear-gradient(180deg, #050608 0%, #0a0912 12%, #0a0912 88%, #050608 100%);
}

.story-block__inner {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    padding: 40px 44px;
    border-radius: 22px;
}
.story-block__label {
    display: inline-block;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: 20px;
}
.story-block__text {
    font-size: 1.2rem;
    line-height: 1.9;
}

.story-quote { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.story-quote__text {
    margin: 0 auto;
    max-width: 780px;
    text-align: center;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    line-height: 1.5;
    font-weight: 500;
    padding: 36px 48px;
    border-radius: 24px;
}
.story-quote__text span {
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Frosted scrim behind each text block guarantees contrast regardless of exactly
   where it lands on the continuous gradient — safer than hand-tuning color stops
   against variable content length (translations run different lengths). */
.zone-dark .story-block__inner,
.zone-dark .story-quote__text {
    background: rgba(8, 6, 14, .32);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.zone-light .story-block__inner {
    background: rgba(221, 227, 245, .6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Dark zone (the fall, recovery, quote) — light text on the dark/emerald backdrop */
.zone-dark .story-block__label { color: var(--accent-on-dark); }
.zone-dark .story-block__text { color: rgba(255, 255, 255, .72); }
.zone-dark .story-quote__text { color: rgba(255, 255, 255, .92); }
.zone-dark .story-quote__text span { background: linear-gradient(135deg, #a78bfa, #60a5fa); }

/* Light zone (SPM onward) */
.zone-light .story-block__label { color: var(--accent); }
.zone-light .story-block__text { color: var(--text-primary); }

/* Photo + text intro block (About-grid pattern) sitting inside the dark zone */
.about__bio p + p { margin-top: 16px; }
.zone-dark .about__grid > div:last-child {
    background: rgba(8, 6, 14, .32);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 22px;
    padding: 36px 40px;
}
.zone-dark .about__photo { border-color: rgba(255, 255, 255, .14); }
.zone-dark .about__bio { color: rgba(255, 255, 255, .72); }
.zone-dark .eyebrow { color: var(--accent-on-dark); }
.zone-dark .eyebrow::before { background: var(--accent-on-dark); }
.zone-dark .section__title { color: #fff; }

.achievement-card {
    max-width: 460px;
    margin: 40px auto 0;
    padding: 32px;
    border-radius: var(--radius);
    background: rgba(221, 227, 245, .7);
    border: 1px solid var(--border);
}
.achievement-card__label {
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 18px;
}
.achievement-card__grades {
    display: flex;
    justify-content: center;
    gap: 28px;
}
.achievement-card__grade {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}
.achievement-card__grade span {
    display: block;
    font-size: 2.4rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media screen and (max-width: 1024px) {
    .hero__grid { grid-template-columns: 1fr; }
    .hero__photo { max-width: 420px; margin: 0 auto; }
    .about__grid, .about__grid--reverse { grid-template-columns: 1fr; }
    .about__grid--reverse .about__photo { order: 0; }
    .about__photo { max-width: 360px; margin: 0 auto; }
    .about__photo--wide { max-width: 100%; }
    .skills__grid { grid-template-columns: repeat(2, 1fr); }
    .work__grid { grid-template-columns: repeat(2, 1fr); }
    .journey-cards { grid-template-columns: repeat(2, 1fr); }
    .clients__grid { grid-template-columns: repeat(4, 1fr); }
}

@media screen and (max-width: 860px) {
    .nav__links { display: none; }
    .nav__toggle { display: flex; }
}

@media screen and (max-width: 640px) {
    .container { padding: 0 22px; }
    .hero__cta { flex-direction: column; align-items: flex-start; }
    .hero__stats { gap: 28px; }
    .hero__scroll { display: none; }
    .skills__grid { grid-template-columns: 1fr; }
    .work__grid { grid-template-columns: 1fr; }
    .journey-cards { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .stat__num { font-size: 1.8rem; }
    .clients__grid { grid-template-columns: repeat(3, 1fr); }
    .cta-band__inner { padding: 36px 24px; flex-direction: column; align-items: flex-start; }
    .footer__inner { flex-direction: column; }
}
