/* =========================================================
   Mohamed Yasser Bakr — Portfolio
   Aurora Dark + Glass design system
   ========================================================= */

/* ===================== Design Tokens ===================== */
:root {
    --bg: #03060f;
    --bg-2: #0a1430;
    --bg-3: #0d1b3e;
    --surface: rgba(255, 255, 255, 0.035);
    --surface-2: rgba(255, 255, 255, 0.065);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(150, 180, 255, 0.20);
    --border-gold: rgba(184, 134, 11, 0.42);
    --text: #e8eefb;
    --text-dim: #a6b2cc;
    --muted: #6f7c98;
    /* legacy aliases remapped to the midnight-blue + gold palette */
    --indigo: #3b82f6;
    --violet: #4f86ff;   /* primary blue accent */
    --cyan: #7aa7ff;     /* light steel-blue accent */
    --pink: #b8860b;     /* deep brass / antique-gold accent */
    --gold: #b8860b;     /* dark goldenrod — lines, frames, underlines */
    --gold-mid: #c79a2e;
    --gold-light: #d6ad4e; /* readable gold for small text */
    --gold-deep: #8a6508;  /* antique deep — borders / shadows */
    --blue-deep: #1b3a85;
    --panel: #0a162f;     /* solid card surface (no glass) */
    --panel-2: #0d1c3c;   /* solid card surface — hover */
    --grad: linear-gradient(125deg, #5b8cff 0%, #3461d6 52%, #1b3a85 100%);
    --grad-text: linear-gradient(115deg, #a8c5ff 0%, #dbe7ff 42%, #c79a2e 100%);
    --grad-soft: linear-gradient(120deg, rgba(91, 140, 255, .15), rgba(184, 134, 11, .16));
    --grad-gold: linear-gradient(120deg, #d6ad4e, #936c09);
    --radius: 22px;
    --radius-sm: 14px;
    --shadow: 0 24px 60px -22px rgba(0, 0, 0, .7);
    --ring: 0 0 0 1px var(--border);
    --maxw: 1180px;
    --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: rgba(59, 130, 246, .35); color: #fff; }

.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 999;
    background: var(--violet); color: #fff; padding: 10px 18px; border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }

/* ===================== Aurora Background ===================== */
.aurora {
    position: fixed; inset: 0; z-index: -2; overflow: hidden;
    /* cinematic vertical midnight wash — deep at top & bottom, lifted navy mid */
    background:
        radial-gradient(120% 80% at 50% -10%, #11244f 0%, transparent 55%),
        radial-gradient(130% 90% at 50% 112%, #0a1838 0%, transparent 55%),
        linear-gradient(180deg, #03060f 0%, #061027 42%, #050c1f 70%, #03060f 100%);
}
.aurora::before {
    content: ""; position: absolute; inset: -10%;
    background:
        radial-gradient(40% 34% at 14% 14%, rgba(59, 130, 246, .30), transparent 60%),
        radial-gradient(36% 30% at 86% 18%, rgba(122, 167, 255, .18), transparent 60%),
        radial-gradient(44% 38% at 72% 86%, rgba(184, 134, 11, .14), transparent 62%),
        radial-gradient(40% 36% at 20% 82%, rgba(27, 58, 133, .34), transparent 60%);
    filter: blur(48px); animation: drift 26s ease-in-out infinite alternate;
}
/* vignette to frame the page and deepen the corners */
.aurora::after {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(120% 100% at 50% 40%, transparent 52%, rgba(0, 0, 0, .55) 100%);
    pointer-events: none;
}
.grid-overlay {
    position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(circle at 50% 0, #000 0, transparent 78%);
    -webkit-mask-image: radial-gradient(circle at 50% 0, #000 0, transparent 78%);
}
@keyframes drift {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(-3%, 2%, 0) scale(1.08); }
    100% { transform: translate3d(3%, -2%, 0) scale(1.04); }
}

/* ===================== Classic framed border ===================== */
.page-frame {
    position: fixed; z-index: 90; pointer-events: none;
    inset: clamp(12px, 1.6vw, 22px);
    border: 1px solid var(--border-gold);
    border-radius: 8px;
    /* the modern part: a soft inner glow + a hairline second rule */
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, .025),
        inset 0 0 60px rgba(3, 6, 15, .55),
        0 0 0 1px rgba(0, 0, 0, .35);
}
/* the second (classic double) rule */
.page-frame::before {
    content: ""; position: absolute; inset: 5px; border: 1px solid rgba(184, 134, 11, .18); border-radius: 5px;
}
/* gilded corner ornaments */
.fc { position: absolute; width: 26px; height: 26px; }
.fc::before, .fc::after { content: ""; position: absolute; background: var(--grad-gold); }
.fc::before { width: 100%; height: 1.5px; }
.fc::after { width: 1.5px; height: 100%; }
.fc-tl { top: -1px; left: -1px; }
.fc-tr { top: -1px; right: -1px; }
.fc-tr::after { right: 0; }
.fc-bl { bottom: -1px; left: -1px; }
.fc-bl::before { bottom: 0; }
.fc-br { bottom: -1px; right: -1px; }
.fc-br::before { bottom: 0; }
.fc-br::after { right: 0; }
@media (max-width: 600px) { .page-frame::before { inset: 4px; } .fc { width: 18px; height: 18px; } }

/* keep the floating nav clear of the frame */
nav { top: clamp(26px, 3vw, 38px); }

/* ===================== Layout helpers ===================== */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
section { padding: 96px 0; position: relative; }
.eyebrow {
    font-family: var(--mono); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
    color: var(--gold-light); display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--gold); opacity: .8; }
.sec-head { max-width: 640px; margin-bottom: 52px; }
.sec-title { font-family: var(--serif); font-size: clamp(2rem, 4.2vw, 3.05rem); font-weight: 600; line-height: 1.1; letter-spacing: -.005em; }
.sec-sub { color: var(--text-dim); margin-top: 14px; font-size: 1.05rem; }
.grad-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ===================== Nav ===================== */
nav {
    position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
    width: calc(100% - 32px); max-width: var(--maxw); z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 20px; border-radius: 18px;
    background: rgba(10, 15, 29, .55); border: 1px solid var(--border);
    backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
    transition: background .3s, box-shadow .3s, transform .3s;
}
nav.scrolled { background: rgba(8, 12, 22, .82); box-shadow: var(--shadow); }
.logo { font-weight: 700; font-size: 1.15rem; letter-spacing: .04em; display: flex; align-items: center; gap: 9px; }
.logo .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 14px var(--violet); }
.nav-links { display: flex; gap: 6px; list-style: none; }
.nav-links a {
    font-size: .92rem; color: var(--text-dim); padding: 8px 4px; margin: 0 9px; border-radius: 0; transition: color .2s; position: relative;
}
.nav-links a::after {
    content: ""; position: absolute; left: 0; bottom: 2px; width: 100%; height: 1px;
    background: var(--gold); transform: scaleX(0); transform-origin: right; transition: transform .3s cubic-bezier(.2, .7, .2, 1);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta {
    font-size: .88rem; padding: 9px 18px; border-radius: 11px;
    background: var(--grad); color: #fff; font-weight: 600; transition: transform .2s, box-shadow .2s;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -8px rgba(59, 130, 246, .6); }
.burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.burger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===================== Hero ===================== */
.hero { min-height: 100svh; display: flex; align-items: center; padding-top: 120px; }
.badge {
    display: inline-flex; align-items: center; gap: 9px; font-size: .85rem; color: var(--text-dim);
    padding: 8px 16px; border-radius: 100px; background: var(--surface); border: 1px solid var(--border);
    backdrop-filter: blur(10px);
}
.badge .pulse { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .5); } 70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.hero h1 {
    font-family: var(--serif); font-size: clamp(2.7rem, 7vw, 5.3rem); font-weight: 600; line-height: 1.04; letter-spacing: -.01em;
    margin: 26px 0 18px;
}
.hero h1 .line2 { font-style: italic; }
.hero h1 .line2 { display: block; }
.hero-desc { font-size: clamp(1.02rem, 2vw, 1.22rem); color: var(--text-dim); max-width: 600px; }
.rotator { color: var(--text); font-weight: 500; border-bottom: 2px solid var(--gold); }
.hero-btns { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.btn {
    display: inline-flex; align-items: center; gap: 10px; font-size: .98rem; font-weight: 600;
    padding: 14px 26px; border-radius: 13px; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s; border: 1px solid transparent;
}
.btn-primary { background: var(--grad); color: #fff; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -12px rgba(59, 130, 246, .65); }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); transform: translateY(-3px); }
.btn svg { width: 18px; height: 18px; }
.hero-stats { display: flex; gap: 14px; margin-top: 56px; flex-wrap: wrap; }
.stat {
    flex: 1; min-width: 130px; padding: 20px 22px; border-radius: var(--radius-sm);
    background: var(--surface); border: 1px solid var(--border); backdrop-filter: blur(12px);
}
.stat .num { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 700; line-height: 1; }
.stat .num .grad-text { display: inline; }
.stat .lbl { font-size: .82rem; color: var(--muted); margin-top: 8px; font-family: var(--mono); letter-spacing: .02em; }

/* ===================== Hero two-column + Phone mockup ===================== */
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 48px; align-items: center; width: 100%; }
.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; min-height: 540px; }

.phone {
    position: relative; width: 286px; aspect-ratio: 9 / 19.2; border-radius: 44px;
    background: linear-gradient(160deg, #11182b, #070b15); padding: 12px;
    border: 1px solid var(--border-strong);
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .8), inset 0 0 0 2px rgba(255, 255, 255, .03);
    animation: floatY 6s ease-in-out infinite; z-index: 2;
}
@keyframes floatY { 0%, 100% { transform: translateY(0) rotate(-1.2deg); } 50% { transform: translateY(-14px) rotate(.6deg); } }
.phone-notch { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 116px; height: 26px; background: #04060c; border-radius: 0 0 16px 16px; z-index: 3; }
.phone-screen {
    width: 100%; height: 100%; border-radius: 34px; overflow: hidden; position: relative;
    background: linear-gradient(180deg, #0c1326 0%, #0a1020 60%, #0b1430 100%);
    display: flex; flex-direction: column; padding: 16px 16px 14px;
}
.phone-screen::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 40% at 80% 8%, rgba(59, 130, 246, .35), transparent 60%), radial-gradient(60% 36% at 10% 92%, rgba(184, 134, 11, .22), transparent 60%); pointer-events: none; }
.ph-status { display: flex; align-items: center; justify-content: space-between; font-size: .72rem; font-family: var(--mono); color: #cdd5e8; padding: 6px 6px 0; position: relative; z-index: 1; }
.ph-status-icons { display: inline-flex; gap: 5px; }
.ph-status-icons svg { width: 13px; height: 13px; }
.ph-greeting { padding: 16px 6px 12px; position: relative; z-index: 1; }
.ph-hi { font-size: .68rem; color: var(--muted); font-family: var(--mono); }
.ph-greeting h4 { font-size: 1.3rem; font-weight: 600; color: #fff; letter-spacing: -.01em; }
.ph-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 6px; padding: 6px; position: relative; z-index: 1; }
.ph-app { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.ph-ico {
    width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 1.4rem;
    background: linear-gradient(150deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .04));
    border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .6);
}
.ph-app b { font-size: .56rem; font-weight: 500; color: #b9c2d8; }
.ph-widget { margin: 12px 6px 0; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); position: relative; z-index: 1; }
.ph-widget-row { display: flex; align-items: center; justify-content: space-between; }
.ph-rate { font-weight: 700; color: #fcd34d; font-size: .82rem; }
.ph-installs { font-size: .56rem; color: var(--muted); font-family: var(--mono); }
.ph-bar { height: 5px; border-radius: 4px; background: rgba(255, 255, 255, .08); margin-top: 9px; overflow: hidden; }
.ph-bar i { display: block; height: 100%; width: 86%; border-radius: 4px; background: var(--grad); }
.ph-dock { margin-top: auto; display: flex; justify-content: space-around; padding: 10px 14px 4px; background: rgba(255, 255, 255, .05); border-radius: 18px; border: 1px solid rgba(255, 255, 255, .08); position: relative; z-index: 1; font-size: 1.15rem; }

.phone-glow { position: absolute; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, rgba(59, 130, 246, .45), transparent 65%); filter: blur(30px); z-index: 1; }
.float-chip {
    position: absolute; z-index: 4; font-family: var(--mono); font-size: .78rem; font-weight: 500;
    padding: 8px 14px; border-radius: 12px; background: rgba(12, 18, 32, .8); color: var(--text);
    border: 1px solid var(--border-strong); backdrop-filter: blur(8px); box-shadow: var(--shadow);
    animation: floatChip 5s ease-in-out infinite;
}
.float-chip.chip-a { top: 12%; right: 2%; animation-delay: .2s; }
.float-chip.chip-b { bottom: 22%; left: 0; animation-delay: 1.1s; }
.float-chip.chip-c { bottom: 8%; right: 6%; animation-delay: .6s; }
@keyframes floatChip { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ===================== Cards / Glass ===================== */
.glass {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%);
    position: relative; overflow: hidden;
}
.glass::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
    background: linear-gradient(140deg, rgba(255, 255, 255, .22), transparent 40%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude; opacity: .5;
}

/* ===================== Projects ===================== */
.proj-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 22px; }
.proj { grid-column: span 4; display: flex; flex-direction: column; padding: 26px; transition: transform .3s, border-color .3s; }
.proj.feature { grid-column: span 6; }
.proj:hover { transform: translateY(-6px); border-color: var(--border-gold); }
/* gilded sweep that crosses the card on hover */
.proj::before {
    content: ""; position: absolute; top: 0; left: -60%; width: 45%; height: 100%; z-index: 1;
    background: linear-gradient(100deg, transparent, rgba(214, 173, 78, .10), transparent);
    transform: skewX(-18deg); transition: left .7s cubic-bezier(.2, .7, .2, 1); pointer-events: none;
}
.proj:hover::before { left: 130%; }
/* deco corner ticks reveal on hover */
.proj::after {
    content: ""; position: absolute; top: 14px; right: 14px; width: 16px; height: 16px; z-index: 2;
    border-top: 1px solid var(--gold); border-right: 1px solid var(--gold);
    opacity: 0; transform: translate(-4px, 4px); transition: opacity .35s, transform .35s; pointer-events: none;
}
.proj:hover::after { opacity: .7; transform: none; }
.proj > * { position: relative; z-index: 3; }
.proj-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.proj-icon {
    width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 1.7rem;
    background: var(--grad-soft); border: 1px solid var(--border);
}
.proj-type { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan); }
.proj h3 { font-size: 1.35rem; font-weight: 600; margin: 4px 0 10px; letter-spacing: -.01em; }
.proj.feature h3 { font-size: 1.7rem; }
.proj p { color: var(--text-dim); font-size: .95rem; flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.chip { font-size: .76rem; font-family: var(--mono); color: var(--text-dim); padding: 5px 11px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); }
.proj-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.plink {
    display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 500;
    padding: 10px 16px; border-radius: 11px; transition: .2s; border: 1px solid var(--border-strong); color: var(--text);
}
.plink:hover { background: var(--surface-2); transform: translateY(-2px); }
.plink.primary { background: var(--grad); color: #fff; border-color: transparent; font-weight: 600; }
.plink.primary:hover { box-shadow: 0 12px 26px -10px rgba(59, 130, 246, .6); }
.plink.muted { opacity: .55; cursor: default; }
.plink.muted:hover { transform: none; background: transparent; }
.plink svg { width: 17px; height: 17px; }
.ribbon {
    display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 600; font-family: var(--mono);
    padding: 5px 11px; border-radius: 100px; background: rgba(184, 134, 11, .16); color: var(--gold-light); border: 1px solid rgba(184, 134, 11, .45);
}
.ribbon.live { background: rgba(91, 140, 255, .14); color: #9cc0ff; border-color: rgba(91, 140, 255, .32); }

/* ===================== Skills ===================== */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; counter-reset: skl; }
.skill {
    padding: 26px 24px; counter-increment: skl; position: relative; overflow: hidden;
    background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
    transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .35s, background .35s, box-shadow .35s;
}
.skill > * { position: relative; z-index: 2; }
.skill::after {
    content: ""; position: absolute; left: 24px; right: 24px; top: 0; height: 2px; z-index: 3;
    background: var(--grad-gold); transform: scaleX(0); transform-origin: left;
    transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.skill:hover { transform: translateY(-6px); border-color: var(--border-gold); background: var(--panel-2); box-shadow: 0 22px 44px -26px rgba(0,0,0,.7); }
.skill:hover::after { transform: scaleX(1); }
/* numbered index, top-right */
.skill .sidx {
    position: absolute; top: 20px; right: 22px; z-index: 2;
    font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; color: var(--gold);
}
.skill .sidx::before { content: counter(skl, decimal-leading-zero); }
.skill .sicon {
    font-size: 1.55rem; width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
    background: var(--grad-soft); border: 1px solid var(--border-gold); margin-bottom: 18px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 8px 18px -10px rgba(184,134,11,.4);
    transition: transform .35s;
}
.skill:hover .sicon { transform: translateY(-2px) rotate(-3deg); }
.skill h3 { font-family: var(--serif); font-size: 1.16rem; font-weight: 600; margin-bottom: 8px; letter-spacing: -.005em; }
.skill p { color: var(--muted); font-size: .9rem; margin-bottom: 16px; }
.skill .chips { margin: 0; }

/* ===================== Experience — gilded stepper ===================== */
.timeline { position: relative; max-width: 780px; padding-left: 8px; counter-reset: step; }
/* the spine: a soft gilded gradient rail */
.timeline::before {
    content: ""; position: absolute; left: 21px; top: 14px; bottom: 14px; width: 2px;
    background: linear-gradient(180deg, var(--gold) 0%, var(--gold-deep) 50%, transparent 100%);
    opacity: .5;
}
.tl-item { position: relative; padding-left: 64px; padding-bottom: 26px; counter-increment: step; }
.tl-item:last-child { padding-bottom: 0; }
/* numbered node on the spine */
.tl-dot {
    position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, var(--bg-2), #060d1e);
    border: 1px solid var(--border-gold); display: grid; place-items: center; z-index: 2;
    box-shadow: 0 0 0 5px rgba(5,10,22,1), 0 0 22px -6px rgba(184,134,11,.5);
    font-family: var(--mono); font-size: .8rem; color: var(--gold-light); transition: transform .35s, box-shadow .35s;
}
.tl-dot::before { content: counter(step, decimal-leading-zero); }
/* the most recent role glows */
.tl-item:first-child .tl-dot {
    border-color: var(--gold); color: var(--gold-light);
    box-shadow: 0 0 0 5px rgba(5,10,22,1), 0 0 26px -2px rgba(214,173,78,.7);
    animation: nodePulse 2.6s ease-in-out infinite;
}
@keyframes nodePulse {
    0%,100% { box-shadow: 0 0 0 5px rgba(5,10,22,1), 0 0 24px -4px rgba(214,173,78,.55); }
    50% { box-shadow: 0 0 0 5px rgba(5,10,22,1), 0 0 32px 0 rgba(214,173,78,.85); }
}
/* the step body as a solid panel */
.tl-card {
    background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 20px 22px; transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .35s, background .35s, box-shadow .35s;
    position: relative; overflow: hidden;
}
.tl-item:hover .tl-card { transform: translateX(5px); border-color: var(--border-gold); background: var(--panel-2); box-shadow: 0 20px 40px -26px rgba(0,0,0,.7); }
.tl-item:hover .tl-dot { transform: scale(1.06); }
/* gilded connector from spine to card */
.tl-card::before {
    content: ""; position: absolute; left: -22px; top: 22px; width: 22px; height: 1px; background: var(--border-gold);
}
.tl-date {
    display: inline-block; font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; color: var(--gold-light);
    border: 1px solid var(--border-gold); border-radius: 100px; padding: 4px 12px; margin-bottom: 12px;
}
.tl-title { font-family: var(--serif); font-size: 1.28rem; font-weight: 600; margin: 0 0 2px; letter-spacing: -.005em; }
.tl-company { color: var(--text-dim); font-size: .92rem; margin-bottom: 14px; font-family: var(--mono); }
.tl-item ul { list-style: none; display: grid; gap: 9px; }
.tl-item li { position: relative; padding-left: 22px; color: var(--text-dim); font-size: .94rem; }
.tl-item li::before { content: "✦"; position: absolute; left: 0; top: 1px; color: var(--gold); font-size: .72rem; }

/* ===================== Résumé / CV ===================== */
.cv-card {
    display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(28px, 5vw, 60px); align-items: center;
    background: var(--panel); border: 1px solid var(--border-gold); border-radius: var(--radius);
    padding: clamp(30px, 5vw, 56px); position: relative; overflow: hidden;
}
/* inner classic gold frame, matching the feature cards */
.cv-card::before { content: ""; position: absolute; inset: 13px; border: 1px solid var(--border-gold); border-radius: 14px; opacity: .4; pointer-events: none; }
.cv-left { position: relative; z-index: 2; }
.cv-title { font-family: var(--serif); font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 600; letter-spacing: -.005em; }
.cv-text { color: var(--text-dim); margin: 14px 0 22px; max-width: 440px; }
.cv-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 26px; font-family: var(--mono); font-size: .76rem; color: var(--muted); }
.cv-meta b { color: var(--gold-light); font-weight: 400; }
.cv-btns { display: flex; gap: 14px; flex-wrap: wrap; }

/* decorative document preview */
.cv-doc { position: relative; z-index: 2; display: grid; place-items: center; }
.cv-sheet {
    width: min(220px, 70vw); aspect-ratio: 1 / 1.31; background: linear-gradient(160deg, #0f1f40, #0a1530);
    border: 1px solid var(--border-gold); border-radius: 6px; padding: 26px 22px;
    display: flex; flex-direction: column; gap: 11px;
    box-shadow: 0 26px 54px -24px rgba(0,0,0,.8), inset 0 0 0 1px rgba(255,255,255,.03);
    transform: rotate(-3deg); transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.cv-card:hover .cv-sheet { transform: rotate(0deg) translateY(-4px); }
.cvs-line { height: 7px; border-radius: 3px; background: rgba(166,178,204,.18); }
.cvs-line.accent { background: var(--grad-gold); opacity: .85; }
.cvs-rule { height: 1px; background: var(--border-gold); margin: 4px 0; opacity: .6; }
.w35 { width: 35%; } .w40 { width: 40%; } .w50 { width: 50%; } .w60 { width: 60%; }
.w70 { width: 70%; } .w80 { width: 80%; } .w85 { width: 85%; } .w90 { width: 90%; }
.cv-stamp {
    position: absolute; right: -6px; bottom: -10px; font-family: var(--serif); font-style: italic; font-weight: 600;
    font-size: 2.6rem; color: transparent; -webkit-text-stroke: 1px var(--border-gold); opacity: .8; transform: rotate(-8deg);
}

/* ===================== Contact ===================== */
.contact-card { padding: clamp(34px, 6vw, 64px); text-align: center; }
.contact-card h2 { font-family: var(--serif); font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 600; letter-spacing: -.005em; }
.contact-card p { color: var(--text-dim); max-width: 480px; margin: 16px auto 32px; font-size: 1.05rem; }
.contact-links { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.clink {
    display: inline-flex; align-items: center; gap: 10px; font-size: .95rem; font-weight: 500;
    padding: 14px 24px; border-radius: 13px; background: var(--surface); border: 1px solid var(--border-strong); transition: .2s;
}
.clink:hover { background: var(--surface-2); transform: translateY(-3px); border-color: var(--violet); }
.clink svg { width: 19px; height: 19px; }

/* ===================== Footer ===================== */
footer { text-align: center; padding: 40px 24px 56px; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--border); }
footer .heart { color: var(--pink); }

/* ===================== Reveal animation ===================== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ===================== Mobile menu sheet ===================== */
.sheet {
    position: fixed; inset: 0; z-index: 99; background: rgba(6, 9, 18, .92); backdrop-filter: blur(20px);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    opacity: 0; pointer-events: none; transition: opacity .3s;
}
.sheet.open { opacity: 1; pointer-events: auto; }
.sheet a { font-size: 1.5rem; font-weight: 500; color: var(--text-dim); padding: 12px 24px; }
.sheet a:hover { color: var(--text); }

/* ===================== Atelier details ===================== */
/* scroll progress — thin gilded thread at the very top */
.scroll-progress {
    position: fixed; top: 0; left: 0; height: 2px; width: 0;
    background: linear-gradient(90deg, var(--gold-deep), var(--gold-light), var(--blue-deep));
    z-index: 200; box-shadow: 0 0 12px rgba(184, 134, 11, .5); transition: width .1s linear;
}

/* giant ghost figure behind each section — editorial signature */
section[data-fig] { overflow: clip; }
section[data-fig]::before {
    content: attr(data-fig); position: absolute; top: clamp(20px, 4vw, 56px); right: -.4vw; z-index: 0;
    font-family: var(--serif); font-weight: 600; font-style: italic; line-height: .8;
    font-size: clamp(7rem, 22vw, 20rem); letter-spacing: -.04em;
    color: transparent; -webkit-text-stroke: 1px rgba(168, 197, 255, .07);
    pointer-events: none; user-select: none;
}
section[data-fig] > .wrap { position: relative; z-index: 1; }

/* living shimmer across the gradient display text */
.grad-text {
    background-size: 220% 100%;
    animation: shimmer 9s ease-in-out infinite;
}
@keyframes shimmer { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }


/* fine grain overlay for analog texture */
body::after {
    content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    opacity: .055; mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* optical sizing for the display serif */
.hero h1, .sec-title, .contact-card h2 { font-optical-sizing: auto; }

/* engineering index on each project: 01 / 02 / ... */
.proj-grid { counter-reset: pcount; }
.proj { counter-increment: pcount; }
.proj-type::before { content: counter(pcount, decimal-leading-zero) "  /  "; color: var(--gold); font-weight: 600; }

/* classic inner gold frame on hero feature + contact cards */
.proj.feature::before, .contact-card::before {
    content: ""; position: absolute; inset: 13px; border: 1px solid var(--border-gold);
    border-radius: 14px; pointer-events: none; opacity: .55;
}

/* orchestrated hero entrance */
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.hero-text > * { opacity: 0; animation: rise .85s cubic-bezier(.2, .7, .2, 1) forwards; }
.hero-text > *:nth-child(1) { animation-delay: .08s; }
.hero-text > *:nth-child(2) { animation-delay: .18s; }
.hero-text > *:nth-child(3) { animation-delay: .28s; }
.hero-text > *:nth-child(4) { animation-delay: .38s; }
.hero-text > *:nth-child(5) { animation-delay: .48s; }
.hero-visual { opacity: 0; animation: rise 1s cubic-bezier(.2, .7, .2, 1) .42s forwards; }

/* ===================== Responsive ===================== */
@media (max-width: 980px) {
    .proj, .proj.feature { grid-column: span 6; }
    .hero-grid { grid-template-columns: 1fr; gap: 30px; }
    .hero-text { order: 1; }
    .hero-visual { order: 2; min-height: auto; margin-top: 8px; }
    .phone { transform: scale(.94); animation: none; }
    .cv-card { grid-template-columns: 1fr; gap: 34px; }
    .cv-doc { order: -1; }
    .cv-sheet { transform: rotate(-2deg); }
}
@media (max-width: 720px) {
    section { padding: 72px 0; }
    .nav-links, .nav-cta { display: none; }
    .burger { display: flex; }
    .proj, .proj.feature { grid-column: span 12; }
    .hero { padding-top: 104px; min-height: auto; }
    .hero-stats { gap: 10px; }
    .stat { min-width: calc(50% - 6px); }
    .float-chip.chip-a { right: 6%; }
    .float-chip.chip-b { left: 4%; }
    /* stepper tightens on phones */
    .tl-item { padding-left: 54px; }
    .tl-dot { width: 38px; height: 38px; font-size: .72rem; }
    .timeline::before { left: 18px; }
    .cv-btns .btn { flex: 1; justify-content: center; }
    /* keep ghost numerals from crowding headings */
    section[data-fig]::before { font-size: clamp(5rem, 26vw, 10rem); top: 12px; opacity: .8; }
}
@media (max-width: 380px) {
    .phone { width: 248px; }
    .float-chip { display: none; }
    .hero h1 { font-size: clamp(2.3rem, 11vw, 3rem); }
    .cv-meta { gap: 12px; }
    .cv-sheet { width: min(180px, 64vw); }
}
@media (prefers-reduced-motion: reduce) {
    .aurora::before, .phone, .float-chip, .grad-text { animation: none; }
    .proj::before, .proj:hover::before { transition: none; left: -200%; }
    .reveal { transition: none; opacity: 1; transform: none; }
    .hero-text > *, .hero-visual { opacity: 1 !important; animation: none !important; }
    html { scroll-behavior: auto; }
}
