/* ==========================================================================
   Ahmed Habib Mezni — portfolio
   Aurora pastel, light by default. No framework, no build step.
   Type: Petrona (display) · Archivo (body) · Geist Mono (labels)
   ========================================================================== */

/* ============== TOKENS ============== */
:root{
  color-scheme: light;

  --bg:#FAF9FC;
  --panel:rgba(255,255,255,.68);
  --panel-2:rgba(255,255,255,.88);
  --panel-3:rgba(255,255,255,.55);

  --ink:#171426;
  --ink-2:#453F5C;
  --ink-3:#5F5878;

  --line:rgba(23,20,38,.11);
  --line-2:rgba(23,20,38,.06);

  --accent:#5343CC;
  --accent-2:#453ABD;
  --accent-ink:#ffffff;
  --accent-soft:rgba(83,67,204,.11);

  --shadow:0 1px 2px rgba(23,20,38,.04), 0 10px 30px -14px rgba(23,20,38,.16);
  --shadow-lg:0 2px 6px rgba(23,20,38,.05), 0 30px 64px -24px rgba(23,20,38,.24);

  /* aurora blobs */
  --au-1:#F5C6D8;   /* rose  */
  --au-2:#C6DAF5;   /* sky   */
  --au-3:#D6C9F0;   /* lilac */
  --au-4:#C9E8DC;   /* mint  */
  --au-5:#FCE3CE;   /* peach */
  --au-op:.78;

  --shell:1180px;
  --r:20px;
  --r-sm:13px;
  --r-pill:999px;

  --f-display:'Petrona', Georgia, 'Times New Roman', serif;
  --f-sans:'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono:'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* AHMED + slot + HABIB is ~8.2em wide on one unbreakable line. sized from
     the viewport so the whole word always clears the screen, phone included. */
  --t-boot:clamp(2rem, 10vw, 11rem);
  --t-h1:clamp(2.45rem, 5.6vw, 4.4rem);
  --t-h2:clamp(1.95rem, 3.9vw, 3rem);
  --t-h3:clamp(1.1rem, 1.7vw, 1.35rem);
  --t-lead:clamp(1rem, 1.35vw, 1.12rem);
  --t-body:clamp(.945rem, 1.02vw, 1rem);
  --t-sm:.875rem;
  --t-lbl:.715rem;

  --ease:cubic-bezier(.16,1,.3,1);
  --ease-q:cubic-bezier(.25,1,.5,1);

  /* the whole entrance timeline hangs off this. it drops to 0s once the boot has played. */
  --boot-delay:6.45s;
}

[data-theme="dark"]{
  color-scheme: dark;

  --bg:#100E1A;
  --panel:rgba(255,255,255,.045);
  --panel-2:rgba(255,255,255,.075);
  --panel-3:rgba(255,255,255,.03);

  --ink:#F2F0F8;
  --ink-2:#BEB8D0;
  --ink-3:#A79FC0;

  --line:rgba(255,255,255,.11);
  --line-2:rgba(255,255,255,.06);

  --accent:#A99BFF;
  --accent-2:#C4BAFF;
  --accent-ink:#15122A;
  --accent-soft:rgba(169,155,255,.14);

  --shadow:0 1px 2px rgba(0,0,0,.30), 0 12px 34px -16px rgba(0,0,0,.60);
  --shadow-lg:0 2px 6px rgba(0,0,0,.35), 0 34px 70px -26px rgba(0,0,0,.75);

  --au-1:#3E2442;
  --au-2:#1B2C4B;
  --au-3:#2C2154;
  --au-4:#173A34;
  --au-5:#40291F;
  --au-op:.95;
}

html[data-boot="done"]{--boot-delay:0s}

/* ============== RESET ============== */
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--f-sans);
  font-size:var(--t-body);
  font-weight:400;
  line-height:1.68;
  letter-spacing:-.003em;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  overflow-x:hidden;
}
img,video,svg{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
h1,h2,h3,h4{margin:0;font-weight:400;letter-spacing:-.02em;line-height:1.1}
p{margin:0 0 1.05em}
p:last-child{margin-bottom:0}
::selection{background:var(--accent);color:var(--accent-ink)}

:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:6px}

/* ============== AURORA ============== */
body::before{
  content:'';
  position:fixed;
  inset:-25%;
  z-index:-2;
  pointer-events:none;
  opacity:var(--au-op);
  background:
    radial-gradient(30% 26% at 14% 6%,  var(--au-1) 0%, transparent 62%),
    radial-gradient(26% 24% at 86% 2%,  var(--au-2) 0%, transparent 60%),
    radial-gradient(32% 28% at 74% 34%, var(--au-3) 0%, transparent 64%),
    radial-gradient(28% 26% at 16% 52%, var(--au-4) 0%, transparent 60%),
    radial-gradient(30% 28% at 62% 74%, var(--au-5) 0%, transparent 62%),
    radial-gradient(26% 24% at 8%  92%, var(--au-3) 0%, transparent 60%);
  filter:blur(26px) saturate(1.08);
  animation:drift 40s var(--ease-q) infinite alternate;
  will-change:transform;
}
@keyframes drift{
  from{transform:translate3d(0,0,0) scale(1)}
  to{transform:translate3d(-2.5%,1.8%,0) scale(1.08)}
}

/* ============== LAYOUT ============== */
.shell{width:min(100% - 2.5rem, var(--shell));margin-inline:auto}
.section{padding:clamp(4.5rem,9vw,8rem) 0}

.skip-link{
  position:absolute;left:-9999px;top:0;z-index:400;
  background:var(--ink);color:var(--bg);
  padding:.7rem 1.15rem;border-radius:0 0 var(--r-sm) 0;
  font-size:var(--t-sm);
}
.skip-link:focus{left:0}

.progress{
  position:fixed;top:0;left:0;height:2px;width:0;z-index:120;
  background:var(--accent);
  transition:width .1s linear;
}

/* ============== PRELOADER ==============
   The whole lifecycle is CSS keyframes, not JS. If script.js never runs, the
   overlay still opens the slot and still gets out of the way. Restraint is the
   point here: a flat field, two corner labels, one rule, one card. */
.boot{
  position:fixed;inset:0;z-index:300;
  display:grid;place-items:center;
  background:var(--bg);
  animation:bootOut 1s var(--ease) 6.4s forwards;
}
@keyframes bootOut{to{opacity:0;visibility:hidden}}
html[data-boot="done"] .boot{display:none}

/* CSS animations keep running in a background tab. Freeze the whole entrance
   while the tab is hidden so a visitor who opens the site in a new tab still
   gets the intro from frame one when they switch to it. */
html[data-tabhidden] .boot,
html[data-tabhidden] .boot-meta,
html[data-tabhidden] .boot-part,
html[data-tabhidden] .boot-slot,
html[data-tabhidden] .boot-card,
html[data-tabhidden] .boot-bar i,
html[data-tabhidden] .boot-skip,
html[data-tabhidden] .rise{animation-play-state:paused}

.boot-meta{
  position:absolute;top:0;left:0;right:0;
  display:flex;justify-content:space-between;gap:1rem;
  padding:1.7rem clamp(1.25rem,4vw,3.25rem);
  font-family:var(--f-mono);
  font-size:var(--t-lbl);
  letter-spacing:.18em;
  text-transform:uppercase;
  color:var(--ink-3);
  opacity:0;
  animation:bootIn 1s var(--ease) .45s forwards;
}

.boot-word{
  display:flex;align-items:center;justify-content:center;
  font-family:var(--f-display);
  font-size:var(--t-boot);
  font-weight:300;
  line-height:1;
  letter-spacing:-.012em;
  text-transform:uppercase;
  color:var(--ink);
  white-space:nowrap;
}
.boot-part{opacity:0;animation:bootIn 1.1s var(--ease) .1s forwards}
.boot-part:last-child{animation-delay:.28s}
@keyframes bootIn{
  from{opacity:0;transform:translateY(.12em)}
  to{opacity:1;transform:none}
}

/* the slot between the two halves of the name. it opens, the card lives inside. */
.boot-slot{
  display:inline-block;
  width:0;
  overflow:hidden;
  animation:slotOpen 1.3s var(--ease) .9s forwards;
}
@keyframes slotOpen{to{width:min(1.72em, 34vw)}}

/* the card fills the slot, so its em units still resolve against the big
   display size. the small label font lives on .boot-txt instead: setting
   font-size here would shrink width and height along with the text. */
.boot-card{
  display:flex;align-items:center;justify-content:center;
  width:100%;
  height:.86em;
  margin-inline:.12em;
  border-radius:.05em;
  background:#3E2C4A;
  transition:background .8s var(--ease-q);
  color:#fff;
  opacity:0;
  animation:cardIn .8s var(--ease) 1.3s forwards;
}
@keyframes cardIn{
  from{opacity:0;transform:scale(.92)}
  to{opacity:1;transform:none}
}
/* Five near-black tones rather than five saturated hues: the shift reads as a
   change of mood, not a change of brand. Dark theme flips to pale cards so the
   block stays legible against the near-black page. */
.boot-card[data-w="0"]{background:#3E2C4A}
.boot-card[data-w="1"]{background:#47331F}
.boot-card[data-w="2"]{background:#26305A}
.boot-card[data-w="3"]{background:#1F3B2E}
.boot-card[data-w="4"]{background:#3A3A46}
[data-theme="dark"] .boot-card{color:#15122A}
[data-theme="dark"] .boot-card[data-w="0"]{background:#D8C7E4}
[data-theme="dark"] .boot-card[data-w="1"]{background:#E4D2BC}
[data-theme="dark"] .boot-card[data-w="2"]{background:#C4CEE8}
[data-theme="dark"] .boot-card[data-w="3"]{background:#C3DDCE}
[data-theme="dark"] .boot-card[data-w="4"]{background:#D2D2DC}

.boot-txt{
  font-family:var(--f-sans);
  font-size:.235em;
  font-weight:500;
  letter-spacing:.005em;
  text-transform:none;
  white-space:nowrap;
}
.boot-card .w{display:inline-block;transition:opacity .32s linear}
.boot-card .w.out{opacity:0}
/* decorative full stop, marked aria-hidden. it carries no information, so it is
   not held to the AA text rule. */
/* the card is dark in light theme and pale in dark theme, so the accent dot has
   to run the opposite way round or it disappears into the card. */
.boot-card .d{color:#A99BFF;margin-left:.06em}
[data-theme="dark"] .boot-card .d{color:#5343CC}

/* a hairline that fills over the intro, so the visitor can see it is finite */
.boot-bar{
  position:absolute;
  left:clamp(1.25rem,4vw,3.25rem);right:clamp(1.25rem,4vw,3.25rem);
  bottom:4.2rem;
  height:1px;
  background:var(--line);
  overflow:hidden;
}
.boot-bar i{
  display:block;height:100%;width:100%;
  background:var(--ink);
  transform:scaleX(0);transform-origin:left center;
  animation:bootBar 6.4s linear forwards;
}
@keyframes bootBar{to{transform:scaleX(1)}}

/* On a phone the single line forces the display size down until the card label
   is ~9px. Stack the name instead: three rows, everything twice the size. */
@media (max-width:640px){
  :root{--t-boot:clamp(2.4rem, 19vw, 5.5rem)}
  .boot-word{flex-direction:column;gap:.06em}
  .boot-slot{animation-name:slotOpenStacked}
  .boot-card{margin-inline:0;height:.82em;border-radius:.06em}
  .boot-txt{font-size:.26em}
}
@keyframes slotOpenStacked{to{width:min(4.4em, 74vw)}}
.boot-skip{
  position:absolute;bottom:2.1rem;left:50%;transform:translateX(-50%);
  padding:.35rem .8rem;
  font-family:var(--f-mono);
  font-size:var(--t-lbl);
  letter-spacing:.18em;
  text-transform:uppercase;
  color:var(--ink-3);
  opacity:0;
  animation:bootIn .8s var(--ease) 2.2s forwards;
}
.boot-skip:hover{color:var(--ink)}

/* ============== ENTRANCE ============== */
@keyframes rise{
  from{opacity:0;transform:translateY(20px)}
  to{opacity:1;transform:none}
}
.rise{
  opacity:0;
  animation:rise .85s var(--ease) forwards;
  animation-delay:calc(var(--boot-delay) + var(--d,0s));
}
.reveal{
  opacity:0;transform:translateY(24px);
  transition:opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.in{opacity:1;transform:none}

/* Reduced motion still governs the long page reveals and the drifting aurora.
   The intro itself is deliberately exempt, on Ahmed's call: its motion is
   opacity fades and one width reveal, and SKIP is on screen throughout. */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .rise,.reveal{opacity:1;transform:none;animation:none;transition:none}
  body::before{animation:none}
}

/* ============== TOPBAR ============== */
.topbar{
  position:fixed;top:0;left:0;right:0;z-index:110;
  padding:.9rem 0;
  transition:padding .35s var(--ease);
}
.topbar.scrolled{padding:.5rem 0}
.topbar-inner{
  width:min(100% - 2.5rem, var(--shell));
  margin-inline:auto;
  display:flex;align-items:center;justify-content:space-between;gap:1rem;
  padding:.55rem .55rem .55rem 1.15rem;
  border-radius:var(--r-pill);
  border:1px solid transparent;
  transition:background .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.topbar.scrolled .topbar-inner{
  background:var(--panel-2);
  border-color:var(--line);
  box-shadow:var(--shadow);
  -webkit-backdrop-filter:blur(16px) saturate(1.6);
  backdrop-filter:blur(16px) saturate(1.6);
}

.brand{
  font-family:var(--f-display);
  font-size:clamp(1.5rem,1.9vw,1.78rem);
  font-weight:600;
  letter-spacing:-.018em;
  line-height:1;
  color:var(--ink);
}
.brand i{color:var(--accent);font-style:normal;font-weight:700}

.nav{display:flex;align-items:center;gap:.15rem}
.nav a{
  position:relative;
  padding:.5rem .78rem;
  border-radius:var(--r-pill);
  font-size:var(--t-sm);
  font-weight:500;
  color:var(--ink-2);
  transition:color .25s, background .25s;
}
.nav a:hover{color:var(--ink);background:var(--panel-3)}
.nav a.active{color:var(--ink)}
.nav a.active::after{
  content:'';position:absolute;left:50%;bottom:.22rem;
  width:3px;height:3px;margin-left:-1.5px;
  border-radius:50%;background:var(--accent);
}

.controls{display:flex;align-items:center;gap:.4rem}
.icon-btn{
  display:grid;place-items:center;
  height:38px;min-width:38px;padding:0 .6rem;
  border-radius:var(--r-pill);
  border:1px solid var(--line);
  background:var(--panel-3);
  color:var(--ink-2);
  font-family:var(--f-mono);
  font-size:var(--t-lbl);
  letter-spacing:.06em;
  transition:color .25s, background .25s;
}
.icon-btn:hover{color:var(--ink);background:var(--panel-2)}
.theme-btn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.theme-btn .moon{display:none}
[data-theme="dark"] .theme-btn .sun{display:none}
[data-theme="dark"] .theme-btn .moon{display:block}

.cta-pill{
  display:inline-flex;align-items:center;gap:.5rem;
  height:38px;padding:0 1.05rem;
  border-radius:var(--r-pill);
  background:var(--ink);color:var(--bg);
  font-size:var(--t-sm);font-weight:500;
  transition:transform .25s var(--ease), opacity .25s;
}
.cta-pill:hover{transform:translateY(-1px);opacity:.9}
.cta-pill .arr{transition:transform .3s var(--ease)}
.cta-pill:hover .arr{transform:translate(2px,-2px)}

.burger{display:none;width:38px;height:38px;border-radius:var(--r-pill);border:1px solid var(--line);background:var(--panel-3);position:relative}
.burger span{
  position:absolute;left:11px;width:16px;height:1.5px;background:var(--ink);
  transition:transform .3s var(--ease), opacity .2s;
}
.burger span:nth-child(1){top:14px}
.burger span:nth-child(2){top:18.5px}
.burger span:nth-child(3){top:23px}
.burger.open span:nth-child(1){transform:translateY(4.5px) rotate(45deg)}
.burger.open span:nth-child(2){opacity:0}
.burger.open span:nth-child(3){transform:translateY(-4.5px) rotate(-45deg)}

.mob-overlay{
  position:fixed;inset:0;z-index:105;
  background:var(--bg);
  display:grid;place-items:center;
  opacity:0;visibility:hidden;
  transition:opacity .35s var(--ease), visibility .35s;
}
.mob-overlay.open{opacity:1;visibility:visible}
.mob-overlay-inner{display:flex;flex-direction:column;gap:.35rem;text-align:center}
.mob-overlay a{
  font-family:var(--f-display);
  font-size:clamp(1.6rem,6.5vw,2.2rem);
  font-weight:400;
  color:var(--ink);
  padding:.2rem 1rem;
}
.mob-overlay a:hover{color:var(--accent)}

/* ============== SHARED BITS ============== */
.eyebrow{
  display:inline-block;
  font-family:var(--f-mono);
  font-size:var(--t-lbl);
  font-weight:500;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--ink-3);
}
.sec-head{text-align:center;max-width:44rem;margin:0 auto clamp(2.5rem,5vw,4rem)}
.sec-title{
  font-family:var(--f-display);
  font-size:var(--t-h2);
  font-weight:400;
  letter-spacing:-.024em;
  margin:.55rem 0 0;
}
.sec-sub{margin:.9rem auto 0;max-width:36rem;color:var(--ink-2)}

.card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--r);
  box-shadow:var(--shadow);
  -webkit-backdrop-filter:blur(14px) saturate(1.4);
  backdrop-filter:blur(14px) saturate(1.4);
}

.btn{
  display:inline-flex;align-items:center;gap:.55rem;
  padding:.78rem 1.35rem;
  border-radius:var(--r-pill);
  background:var(--ink);color:var(--bg);
  font-size:var(--t-sm);font-weight:500;
  border:1px solid var(--ink);
  transition:transform .28s var(--ease), opacity .25s;
}
.btn:hover{transform:translateY(-2px);opacity:.9}
.btn .arr{transition:transform .3s var(--ease)}
.btn:hover .arr{transform:translateX(3px)}
.btn.ghost{
  background:var(--panel-2);color:var(--ink);border-color:var(--line);
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
}
.btn.ghost:hover{opacity:1;border-color:var(--ink-3)}
/* no fill/stroke here: each symbol carries its own paint, and a blanket
   fill would flatten the stroke icons (mail, file) into solid blobs. */
.btn-ico{flex:none}

.acc{color:var(--accent)}

/* technology icons */
.proj-tags,.chips{display:flex;flex-wrap:wrap;gap:.4rem}
.chip{
  display:inline-flex;align-items:center;gap:.42rem;
  padding:.34rem .68rem;
  border-radius:var(--r-pill);
  border:1px solid var(--line);
  background:var(--panel-3);
  font-size:.78rem;
  font-weight:500;
  color:var(--ink-2);
  line-height:1.4;
  white-space:nowrap;
}
.chip i{font-size:.95rem;line-height:1}
.chip.hot{border-color:var(--accent-soft);background:var(--accent-soft);color:var(--ink)}
.ico-img{width:.95rem;height:.95rem;flex:none;object-fit:contain}
.ico-mask{
  width:.95rem;height:.95rem;flex:none;background:currentColor;
  -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
  -webkit-mask-position:center;mask-position:center;
  -webkit-mask-size:contain;mask-size:contain;
}
.ico-celery{-webkit-mask-image:url("Files/Images/Logo/celery.svg");mask-image:url("Files/Images/Logo/celery.svg")}
.ico-fluentbit{-webkit-mask-image:url("Files/Images/Logo/fluent-bit.svg");mask-image:url("Files/Images/Logo/fluent-bit.svg")}

/* ============== HERO ============== */
.hero{
  min-height:100svh;
  display:grid;place-items:center;
  padding:7.5rem 0 4rem;
  text-align:center;
}
.hero-inner{width:min(100% - 2.5rem, 54rem);margin-inline:auto}

.hero-avatar{
  width:clamp(76px,9vw,104px);
  height:clamp(76px,9vw,104px);
  margin:0 auto 1.5rem;
  border-radius:50%;
  overflow:hidden;
  border:3px solid var(--panel-2);
  box-shadow:var(--shadow-lg);
  position:relative;
}
.hero-avatar img{width:100%;height:100%;object-fit:cover;object-position:center top}

.hero-hi{
  display:inline-flex;align-items:center;gap:.55rem;
  font-size:var(--t-lead);
  color:var(--ink-2);
  margin-bottom:.75rem;
}
.hero-hi b{font-weight:600;color:var(--ink)}
.hero-hi .pulse{
  width:7px;height:7px;border-radius:50%;flex:none;
  background:#2E9E6B;
  box-shadow:0 0 0 0 rgba(46,158,107,.6);
  animation:pulse 2.4s ease-out infinite;
}
@keyframes pulse{
  70%{box-shadow:0 0 0 9px rgba(46,158,107,0)}
  100%{box-shadow:0 0 0 0 rgba(46,158,107,0)}
}

.hero-title{
  font-family:var(--f-display);
  font-size:var(--t-h1);
  font-weight:300;
  letter-spacing:-.032em;
  line-height:1.06;
  margin:0 0 1.3rem;
}
.hero-title .em{font-weight:500;color:var(--accent)}

.hero-lead{
  max-width:38rem;margin:0 auto 2rem;
  color:var(--ink-2);
  font-size:var(--t-lead);
  line-height:1.72;
}
.hero-cta{display:flex;flex-wrap:wrap;gap:.7rem;justify-content:center;margin-bottom:2.6rem}

.hero-proof{display:flex;flex-wrap:wrap;justify-content:center;gap:.55rem}
.hero-proof .pf{
  display:inline-flex;align-items:baseline;gap:.45rem;
  padding:.5rem .95rem;
  border-radius:var(--r-pill);
  border:1px solid var(--line);
  background:var(--panel);
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
  font-size:var(--t-sm);
  color:var(--ink-2);
}
.hero-proof .pf b{
  font-family:var(--f-display);
  font-size:1.12rem;font-weight:500;
  color:var(--ink);
}

/* ============== FEATURED ============== */
/* ShiftWise opens the Work section, so it carries the gap down to the grid */
.feat{overflow:hidden;padding:clamp(1.5rem,3vw,2.4rem);margin-bottom:clamp(1.6rem,3vw,2.4rem)}
.feat-head{
  display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;
  gap:1rem;margin-bottom:1.5rem;
}
.feat-name{
  font-family:var(--f-display);
  font-size:clamp(2rem,4vw,2.9rem);
  font-weight:400;
  letter-spacing:-.028em;
  margin-top:.4rem;
}
.feat-badge{
  display:inline-flex;align-items:center;gap:.45rem;
  padding:.4rem .85rem;
  border-radius:var(--r-pill);
  background:var(--accent-soft);
  color:var(--accent);
  font-family:var(--f-mono);
  font-size:var(--t-lbl);
  letter-spacing:.1em;
  text-transform:uppercase;
  font-weight:500;
}
.feat-meta{text-align:right;font-size:var(--t-sm);color:var(--ink-3)}
.feat-grid{display:grid;grid-template-columns:1.12fr .88fr;gap:clamp(1.5rem,3vw,2.4rem);align-items:start}
.feat-lead{font-size:var(--t-lead);color:var(--ink-2);line-height:1.7}
.feat-lead b{color:var(--ink);font-weight:600}

.pipeline{
  display:flex;flex-wrap:wrap;align-items:center;gap:.3rem;
  margin:1.3rem 0;
  font-family:var(--f-mono);
  font-size:var(--t-lbl);
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--ink-3);
}
.pipeline span{
  padding:.3rem .6rem;
  border-radius:var(--r-pill);
  border:1px solid var(--line);
  background:var(--panel-3);
}
.pipeline i{color:var(--accent);font-style:normal;opacity:.7}

.facts{margin:1.4rem 0}
.fact{
  display:grid;
  grid-template-columns:8.5rem 1fr;
  gap:1rem;
  padding:.72rem 0;
  border-top:1px solid var(--line-2);
  font-size:var(--t-sm);
}
.fact:last-child{border-bottom:1px solid var(--line-2)}
.fact dt{
  font-family:var(--f-mono);
  font-size:var(--t-lbl);
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--ink-3);
  padding-top:.16rem;
}
.fact dd{margin:0;color:var(--ink-2)}
.fact dd b{color:var(--ink);font-weight:600}

.feat-links{display:flex;flex-wrap:wrap;gap:.7rem;margin-top:1.5rem}

/* ============== CAROUSEL ==============
   the frame owns the ratio. putting aspect-ratio on the flex items lets their
   intrinsic height win and blows the carousel up to full image height. */
.shot{
  position:relative;
  border-radius:var(--r-sm);
  overflow:hidden;
  border:1px solid var(--line);
  background:var(--panel-3);
  aspect-ratio:16/10;
}
.shot .slides{display:flex;height:100%;transition:transform .55s var(--ease)}
.shot .slides>*{flex:0 0 100%;width:100%;height:100%;object-fit:cover;background:var(--panel-3)}
.shot .slides>img{cursor:zoom-in;object-position:top center}
.shot .slides>video{object-fit:contain;background:#0C0A14}

.cnav{
  position:absolute;top:50%;transform:translateY(-50%);
  width:34px;height:34px;
  display:grid;place-items:center;
  border-radius:50%;
  background:var(--panel-2);
  border:1px solid var(--line);
  color:var(--ink);
  font-size:1.15rem;line-height:1;
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
  opacity:0;
  transition:opacity .3s, transform .3s var(--ease);
}
.shot:hover .cnav,.cnav:focus-visible{opacity:1}
.cnav.prev{left:.6rem}
.cnav.next{right:.6rem}
.cnav:hover{transform:translateY(-50%) scale(1.08)}
.shot.vid-on .cnav{opacity:1}

.dots{
  position:absolute;bottom:.7rem;left:50%;transform:translateX(-50%);
  display:flex;align-items:center;gap:.3rem;
  padding:.35rem .55rem;
  border-radius:var(--r-pill);
  background:var(--panel-2);
  border:1px solid var(--line);
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
  max-width:calc(100% - 5rem);
  overflow-x:auto;
  scrollbar-width:none;
}
.dots::-webkit-scrollbar{display:none}
.dots button{
  width:5px;height:5px;border-radius:50%;flex:none;
  background:var(--ink-3);opacity:.4;
  transition:opacity .25s, width .25s var(--ease), background .25s;
}
.dots button.on{opacity:1;width:14px;border-radius:var(--r-pill);background:var(--accent)}

/* ============== ABOUT ============== */
.about-grid{
  display:grid;
  grid-template-columns:.82fr 1.18fr;
  gap:clamp(1.8rem,4vw,3.2rem);
  align-items:start;
}
.about-photo{
  border-radius:var(--r);
  overflow:hidden;
  border:1px solid var(--line);
  box-shadow:var(--shadow-lg);
  aspect-ratio:3/4;
  background:var(--panel-3);
}
.about-photo img{width:100%;height:100%;object-fit:cover;object-position:center 30%}
.about-lead{
  font-family:var(--f-display);
  font-size:clamp(1.25rem,2.1vw,1.62rem);
  font-weight:400;
  line-height:1.42;
  letter-spacing:-.018em;
  color:var(--ink);
  margin-bottom:1.2rem;
}
.about-body p{color:var(--ink-2)}
.about-body b{color:var(--ink);font-weight:600}
.about-actions{display:flex;flex-wrap:wrap;gap:.7rem;margin-top:1.6rem}

.edu-title{margin:2.4rem 0 1rem}
.edu-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr));gap:.9rem}
.edu{display:flex;gap:.9rem;align-items:flex-start;padding:1.05rem 1.15rem}
.edu-ico{
  flex:none;width:34px;height:34px;
  display:grid;place-items:center;
  border-radius:10px;
  background:var(--accent-soft);
  color:var(--accent);
}
.edu-ico svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.edu h4{font-size:.95rem;font-weight:600;letter-spacing:-.01em}
.edu p{font-size:var(--t-sm);color:var(--ink-3);margin:.2rem 0 0;line-height:1.55}
.edu .yr{font-family:var(--f-mono);font-size:var(--t-lbl);color:var(--ink-3);letter-spacing:.06em}

/* ============== STACK ============== */
.stack-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(290px,100%),1fr));gap:.9rem}
.stack-card{padding:1.25rem 1.35rem}
.stack-head{display:flex;align-items:center;gap:.6rem;margin-bottom:.9rem}
.stack-head .dot{
  width:8px;height:8px;border-radius:2px;flex:none;
  background:var(--accent);
  transform:rotate(45deg);
}
.stack-head h3{font-size:.95rem;font-weight:600;letter-spacing:-.008em}

/* ============== WORK ============== */
/* 420px min gives two columns at the 1180px shell, so four projects land 2x2
   instead of a 3+1 orphan row. */
.work-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(420px,100%),1fr));gap:1.1rem}
.proj{display:flex;flex-direction:column;overflow:hidden;transition:transform .4s var(--ease), box-shadow .4s var(--ease)}
.proj:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg)}
.proj .shot{border:0;border-radius:0;border-bottom:1px solid var(--line)}
.proj-body{padding:1.2rem 1.3rem 1.35rem;display:flex;flex-direction:column;flex:1}
.proj-top{display:flex;align-items:baseline;justify-content:space-between;gap:.75rem}
.proj-name{font-family:var(--f-display);font-size:var(--t-h3);font-weight:500;letter-spacing:-.02em}
.proj-kind{font-family:var(--f-mono);font-size:var(--t-lbl);letter-spacing:.08em;text-transform:uppercase;color:var(--ink-3);text-align:right}
.proj-body>p{font-size:var(--t-sm);color:var(--ink-2);margin:.6rem 0 1rem;line-height:1.62}
.proj-body .proj-tags{margin-top:auto}
.proj-foot{
  display:flex;align-items:center;justify-content:space-between;gap:1rem;
  margin-top:1rem;padding-top:.9rem;
  border-top:1px solid var(--line-2);
  font-family:var(--f-mono);font-size:var(--t-lbl);letter-spacing:.06em;color:var(--ink-3);
}
.proj-foot a{display:inline-flex;align-items:center;gap:.4rem;color:var(--ink-2);transition:color .25s}
.proj-foot a:hover{color:var(--accent)}
.proj-foot svg{fill:currentColor}

/* ============== SERVICES ============== */
.svc-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(400px,100%),1fr));gap:1rem}
.svc{padding:1.5rem 1.6rem;display:flex;flex-direction:column;transition:transform .4s var(--ease), box-shadow .4s var(--ease)}
.svc:hover{transform:translateY(-3px);box-shadow:var(--shadow-lg)}
.svc-ico{
  width:38px;height:38px;
  display:grid;place-items:center;
  border-radius:11px;
  background:var(--accent-soft);
  color:var(--accent);
  margin-bottom:1rem;
}
.svc-ico svg{width:19px;height:19px}
.svc h3{font-size:1.05rem;font-weight:600;letter-spacing:-.012em;margin-bottom:.55rem}
.svc p{font-size:var(--t-sm);color:var(--ink-2);line-height:1.66;margin-bottom:1.1rem}
.svc .chips{margin-top:auto}

/* ============== JOURNEY ============== */
.timeline{position:relative;padding-left:1.9rem}
.tl-rail{position:absolute;left:5px;top:.5rem;bottom:.5rem;width:1px;background:var(--line)}
.tl-rail::after{
  content:'';position:absolute;left:0;top:0;width:1px;
  height:var(--tl-prog,0%);
  background:var(--accent);
  transition:height .18s linear;
}
.tl-entry{position:relative;padding-bottom:2.2rem}
.tl-entry:last-child{padding-bottom:0}
.tl-entry::before{
  content:'';position:absolute;left:-1.9rem;top:.52rem;
  width:11px;height:11px;border-radius:50%;
  background:var(--bg);
  border:2px solid var(--accent);
}
.tl-date{font-family:var(--f-mono);font-size:var(--t-lbl);letter-spacing:.1em;text-transform:uppercase;color:var(--ink-3)}
.tl-role{font-size:1.05rem;font-weight:600;letter-spacing:-.012em;margin:.35rem 0 .5rem}
.tl-role .at{color:var(--accent);font-weight:500}
.tl-desc{font-size:var(--t-sm);color:var(--ink-2);line-height:1.66;max-width:52rem}
.tl-desc b{color:var(--ink);font-weight:600}

/* ============== CREDENTIALS ============== */
.cred-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(340px,100%),1fr));gap:.9rem}
.cred{padding:1.15rem 1.25rem;display:flex;flex-direction:column;gap:.3rem}
.cred .issuer{font-family:var(--f-mono);font-size:var(--t-lbl);letter-spacing:.1em;text-transform:uppercase;color:var(--ink-3)}
.cred h3{font-size:.98rem;font-weight:600;letter-spacing:-.01em;line-height:1.4}
.cred .yr{font-family:var(--f-mono);font-size:var(--t-sm);color:var(--accent);margin-top:.15rem}
.cred.hl{background:var(--accent-soft)}

/* ============== CONTACT ============== */
.contact-grid{display:grid;grid-template-columns:.9fr 1.1fr;gap:clamp(1.5rem,3.5vw,2.8rem);align-items:start}
.contact-pull{font-size:var(--t-lead);color:var(--ink-2);line-height:1.7}
.contact-list{display:flex;flex-direction:column;gap:.55rem;margin-top:1.5rem}
.contact-item{
  display:flex;align-items:center;gap:.85rem;
  padding:.85rem 1.05rem;
  border-radius:var(--r-sm);
  border:1px solid var(--line);
  background:var(--panel);
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
  font-size:var(--t-sm);
  color:var(--ink-2);
  transition:border-color .28s, transform .28s var(--ease), color .28s;
}
a.contact-item:hover{border-color:var(--accent);transform:translateX(3px);color:var(--ink)}
.ci-ico{
  flex:none;width:30px;height:30px;display:grid;place-items:center;
  border-radius:9px;background:var(--accent-soft);color:var(--accent);
}
.ci-ico svg{fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.contact-item .v{flex:1;min-width:0;overflow-wrap:anywhere}
.contact-item .arrow{color:var(--ink-3)}

.socials{display:flex;gap:.5rem;margin-top:1.1rem}
.soc{
  width:40px;height:40px;display:grid;place-items:center;
  border-radius:var(--r-pill);
  border:1px solid var(--line);
  background:var(--panel);
  color:var(--ink-2);
  transition:color .25s, border-color .25s, transform .25s var(--ease);
}
.soc svg{width:17px;height:17px;fill:currentColor}
.soc:hover{color:var(--accent);border-color:var(--accent);transform:translateY(-2px)}

.contact-form{padding:clamp(1.35rem,2.6vw,1.9rem)}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:.75rem}
.fg{position:relative;margin-bottom:.75rem}
.fg input,.fg textarea{
  width:100%;
  padding:1.35rem .95rem .55rem;
  border-radius:var(--r-sm);
  border:1px solid var(--line);
  background:var(--panel-2);
  color:var(--ink);
  font-family:inherit;font-size:var(--t-sm);
  transition:border-color .25s;
  resize:vertical;
}
.fg textarea{min-height:120px;line-height:1.6}
.fg label{
  position:absolute;left:.98rem;top:.95rem;
  font-size:var(--t-sm);color:var(--ink-3);
  pointer-events:none;
  transition:transform .22s var(--ease), color .22s;
  transform-origin:left top;
}
.fg input:focus,.fg textarea:focus{border-color:var(--accent);outline:none}
.fg input:focus+label,.fg textarea:focus+label,
.fg input:not(:placeholder-shown)+label,.fg textarea:not(:placeholder-shown)+label{
  transform:translateY(-.62rem) scale(.78);
}
.fg input[aria-invalid="true"],.fg textarea[aria-invalid="true"]{border-color:#B32B42}
.err-msg{display:block;min-height:1rem;margin:.2rem 0 0 .2rem;font-size:.76rem;color:#B32B42}
[data-theme="dark"] .fg input[aria-invalid="true"],[data-theme="dark"] .fg textarea[aria-invalid="true"]{border-color:#FF9DAE}
[data-theme="dark"] .err-msg{color:#FF9DAE}
.submit{
  display:inline-flex;align-items:center;justify-content:center;gap:.55rem;
  width:100%;
  padding:.85rem 1.4rem;
  margin-top:.4rem;
  border-radius:var(--r-pill);
  background:var(--ink);color:var(--bg);
  font-size:var(--t-sm);font-weight:500;
  transition:transform .28s var(--ease), opacity .25s;
}
.submit:hover:not(:disabled){transform:translateY(-2px);opacity:.92}
.submit:disabled{opacity:.55;cursor:not-allowed}

.toast{
  position:fixed;left:50%;bottom:1.6rem;transform:translateX(-50%);
  z-index:350;
  max-width:min(92vw,28rem);
  padding:.85rem 1.25rem;
  border-radius:var(--r-pill);
  background:var(--ink);color:var(--bg);
  font-size:var(--t-sm);
  box-shadow:var(--shadow-lg);
}
.toast.err{background:#B32B42;color:#fff}

/* ============== FOOTER ============== */
footer{padding:3rem 0 2.5rem;border-top:1px solid var(--line-2);text-align:center}
.foot-brand{font-family:var(--f-display);font-size:1.6rem;font-weight:500;letter-spacing:-.025em}
.foot-brand i{color:var(--accent);font-style:normal}
.foot-mail{display:inline-block;margin-top:.5rem;font-size:var(--t-sm);color:var(--ink-2)}
.foot-mail:hover{color:var(--accent)}
.foot-bar{
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.8rem;
  margin-top:2rem;padding-top:1.4rem;
  border-top:1px solid var(--line-2);
  font-family:var(--f-mono);font-size:var(--t-lbl);letter-spacing:.06em;color:var(--ink-3);
}
.foot-bar a:hover{color:var(--accent)}
.foot-links{display:flex;gap:1.1rem}

/* ============== LIGHTBOX ============== */
.lightbox{
  position:fixed;inset:0;z-index:360;
  background:rgba(12,10,20,.93);
  -webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);
  display:grid;place-items:center;
  opacity:0;visibility:hidden;
  transition:opacity .3s, visibility .3s;
}
.lightbox.open{opacity:1;visibility:visible}
body.lb-open{overflow:hidden}
.lb-stage{position:relative;width:min(94vw,1500px);display:grid;place-items:center}
.lb-stage img{max-width:94vw;max-height:84vh;object-fit:contain;border-radius:var(--r-sm)}
.lb-nav,.lb-close{
  position:absolute;
  width:42px;height:42px;display:grid;place-items:center;
  border-radius:50%;
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.22);
  color:#fff;font-size:1.3rem;line-height:1;
}
.lb-nav:hover,.lb-close:hover{background:rgba(255,255,255,.26)}
.lb-nav.prev{left:-1rem;top:50%;transform:translateY(-50%)}
.lb-nav.next{right:-1rem;top:50%;transform:translateY(-50%)}
.lb-close{top:-3rem;right:0;font-size:1rem}
.lb-counter{
  position:absolute;bottom:-2.4rem;left:50%;transform:translateX(-50%);
  font-family:var(--f-mono);font-size:var(--t-lbl);letter-spacing:.1em;color:rgba(255,255,255,.72);
}

/* ============== RESPONSIVE ============== */
@media (max-width:1040px){
  .feat-grid{grid-template-columns:1fr}
  .about-grid{grid-template-columns:1fr}
  .about-photo{max-width:22rem;aspect-ratio:4/5}
  .contact-grid{grid-template-columns:1fr}
}
@media (max-width:860px){
  .nav{display:none}
  .burger{display:block}
  .cta-pill{display:none}
  .feat-meta{text-align:left}
  .fact{grid-template-columns:1fr;gap:.15rem}
  .fact dt{padding-top:0}
}
@media (max-width:560px){
  .shell,.topbar-inner{width:min(100% - 1.6rem, var(--shell))}
  .hero{min-height:auto;padding:6.5rem 0 3.5rem}
  .form-row{grid-template-columns:1fr}
  .hero-cta .btn{flex:1 1 100%;justify-content:center}
  .proj-top{flex-direction:column;gap:.15rem}
  .proj-kind{text-align:left}
  .lb-nav.prev{left:.3rem}
  .lb-nav.next{right:.3rem}
  .foot-bar{justify-content:center;text-align:center}
}
