/* =========================================================
   Yousef Alaa Adel — Portfolio
   Palette pulled from the portrait: navy suit, blue tie, gold pin.
   ========================================================= */

:root {
  --bg: #070b14;
  --bg-2: #0a101d;
  --surface: #0e1627;
  --surface-2: #121c31;
  --line: rgba(160, 176, 214, 0.12);
  --line-strong: rgba(160, 176, 214, 0.22);
  --text: #e9edf6;
  --muted: #a4aec4;
  --faint: #6f7a94;

  --blue: #5b9bff;
  --blue-2: #9cc2ff;
  --blue-soft: rgba(91, 155, 255, 0.14);
  --gold: #e8b54d;
  --gold-2: #f2cf86;
  --gold-soft: rgba(232, 181, 77, 0.14);
  --green: #3ddc97;
  --green-soft: rgba(61, 220, 151, 0.14);
  --red: #ff7b7b;
  --red-soft: rgba(255, 123, 123, 0.14);
  --amber: #f5b14c;

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --maxw: 1180px;
  --gutter: 24px;
  --radius: 20px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
code, pre { font-family: var(--mono); }
p code, figcaption code, li code {
  font-size: .86em;
  padding: .1em .38em;
  border-radius: 6px;
  background: rgba(156, 194, 255, .08);
  border: 1px solid rgba(156, 194, 255, .12);
  color: var(--blue-2);
  white-space: nowrap;
}
::selection { background: rgba(232, 181, 77, .35); color: #fff; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.nowrap { white-space: nowrap; }
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--gold); color: #111; padding: 10px 14px; border-radius: 10px; font-weight: 600;
  transition: top .2s;
}
.skip:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  --h: 46px;
  display: inline-flex; align-items: center; gap: 10px;
  height: var(--h); padding: 0 20px;
  border-radius: 999px;
  font: 500 15px/1 var(--sans);
  letter-spacing: -.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s var(--ease), background .25s, border-color .25s, color .25s, box-shadow .25s;
  white-space: nowrap;
}
.btn .ic { width: 17px; height: 17px; flex: none; }
.btn-primary { background: var(--text); color: #0a0f1c; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px rgba(233, 237, 246, .45); }
.btn-primary .ic { transition: transform .25s var(--ease); }
.btn-primary:hover .ic { transform: translate(2px, -2px); }
.btn-ghost { background: rgba(255, 255, 255, .03); color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: rgba(232, 181, 77, .55); color: var(--gold-2); transform: translateY(-2px); }
.btn-sm { --h: 38px; padding: 0 16px; font-size: 14px; }
.btn-lg { --h: 54px; padding: 0 26px; font-size: 16px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(7, 11, 20, .72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--line);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
  height: 68px; display: flex; align-items: center; gap: 28px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; letter-spacing: -.01em; }
.brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px;
  font: 400 19px/1 var(--serif); color: var(--gold-2);
  background: linear-gradient(145deg, #15203a, #0c1324);
  border: 1px solid rgba(232, 181, 77, .35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.brand-name { font-size: 15px; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  position: relative; padding: 8px 12px; border-radius: 999px;
  font-size: 14px; color: var(--muted); transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,.04); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold); transform: translateX(-50%);
}
.nav-links-cta { display: none; }
.nav-toggle {
  display: none; margin-left: auto; width: 42px; height: 42px; border-radius: 12px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line-strong); cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute; left: 12px; right: 12px; height: 1.6px; background: var(--text); border-radius: 2px;
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.nav-toggle span:first-child { top: 16px; }
.nav-toggle span:last-child { top: 24px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 20px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 20px; transform: rotate(-45deg); }

/* ---------- Shared bits ---------- */
.live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 0 rgba(61, 220, 151, .6); animation: pulse 2.4s infinite;
  flex: none;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 220, 151, .55); }
  70% { box-shadow: 0 0 0 9px rgba(61, 220, 151, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); }
}
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--gold);
}
.kicker::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .7; }

.card {
  position: relative;
  background:
    radial-gradient(420px circle at var(--mx, 50%) var(--my, -20%), rgba(91, 155, 255, .07), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.028), rgba(255,255,255,.012));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color .3s, transform .4s var(--ease);
  overflow: hidden;
}
.card:hover { border-color: var(--line-strong); }
.card h3 { font: 600 19px/1.3 var(--sans); letter-spacing: -.015em; }
.card p { color: var(--muted); font-size: 15.5px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  font: 500 12.5px/1 var(--mono); color: var(--blue-2);
  padding: 8px 11px; border-radius: 999px;
  background: var(--blue-soft); border: 1px solid rgba(91, 155, 255, .22);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  font-size: 13px; line-height: 1.2; color: var(--muted);
  padding: 7px 11px; border-radius: 999px;
  background: rgba(255,255,255,.03); border: 1px solid var(--line);
}
.chips li code { background: none; border: 0; padding: 0; color: var(--blue-2); font-size: 12px; }
.chips li.hot { color: var(--gold-2); border-color: rgba(232, 181, 77, .32); background: var(--gold-soft); }
.chips-lg li { font-size: 14px; padding: 9px 13px; color: var(--text); }

.code {
  margin: 0; padding: 16px 18px; border-radius: 14px;
  background: #060a13; border: 1px solid var(--line);
  font-size: 13px; line-height: 1.7; color: #c9d3e8;
  overflow-x: auto; white-space: pre;
}
.code .k { color: var(--blue-2); }
.code .v { color: var(--gold-2); }

/* ---------- Reveal ---------- */
/* Only sections that start below the fold are hidden, and only until they scroll in.
   Anything on screen at load is visible immediately; the hero animates in on its own. */
.reveal { transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.reveal.pending { opacity: 0; transform: translateY(18px); }
.hero .reveal { animation: rise .9s var(--ease) backwards; animation-delay: calc(var(--d, 0) * 90ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* =========================================================
   HERO
   ========================================================= */
.hero { position: relative; padding: 148px 0 56px; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(160, 176, 214, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(160, 176, 214, .07) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 60% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 60% 30%, #000 30%, transparent 75%);
}
.glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; }
.glow-blue { width: 560px; height: 560px; right: -80px; top: -120px; background: radial-gradient(circle, rgba(91,155,255,.55), transparent 65%); animation: drift 18s ease-in-out infinite alternate; }
.glow-gold { width: 420px; height: 420px; left: -140px; top: 260px; background: radial-gradient(circle, rgba(232,181,77,.28), transparent 65%); animation: drift 22s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(-40px, 40px) scale(1.08); } }

.hero-inner {
  display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr);
  gap: 56px; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 12px; border-radius: 999px;
  background: rgba(255,255,255,.035); border: 1px solid var(--line-strong);
  font: 500 13px/1.3 var(--mono); color: var(--muted);
}
.hero-name {
  margin-top: 26px;
  font: 400 clamp(56px, 8.2vw, 116px)/.94 var(--serif);
  letter-spacing: -.02em;
  background: linear-gradient(180deg, #ffffff 30%, #b9c4dc 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: .06em;
}
.hero-tag {
  margin-top: 22px;
  font-size: clamp(21px, 2.3vw, 27px); line-height: 1.3; letter-spacing: -.02em; color: var(--text);
  font-weight: 450;
}
.hero-tag em { font: italic 400 1.18em/1 var(--serif); color: var(--gold-2); letter-spacing: 0; }
.hero-lede { margin-top: 18px; max-width: 590px; color: var(--muted); font-size: 17px; line-height: 1.65; }
.hero-actions { position: relative; z-index: 3; margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.socials { margin-top: 28px; display: flex; gap: 10px; }
.socials a {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  color: var(--muted); border: 1px solid var(--line); background: rgba(255,255,255,.02);
  transition: color .2s, border-color .2s, transform .25s var(--ease);
}
.socials a:hover { color: var(--text); border-color: var(--line-strong); transform: translateY(-2px); }
.socials svg { width: 18px; height: 18px; }

/* Arch portrait — echoes the arches behind him in the photo */
.hero-visual { position: relative; justify-self: center; width: min(100%, 420px); }
.arch-wrap { position: relative; padding: 16px; }
.arch-wrap::before {
  content: ""; position: absolute; inset: 0;
  border: 1px solid rgba(232, 181, 77, .42);
  border-radius: 50% 50% 28px 28px / 37% 37% 28px 28px;
}
.arch-wrap::after {
  content: ""; position: absolute; inset: 12% -8% -4% -8%; z-index: -1;
  background: radial-gradient(closest-side, rgba(91, 155, 255, .35), transparent);
  filter: blur(30px);
}
.arch {
  position: relative; overflow: hidden;
  aspect-ratio: 7 / 9;
  border-radius: 50% 50% 22px 22px / 38.9% 38.9% 22px 22px;
  background: #d9dde3;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7);
}
.arch img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.arch::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(7, 11, 20, .55) 0%, rgba(7, 11, 20, 0) 34%);
}

.float-card {
  position: absolute; z-index: 2;
  display: flex; flex-direction: column; gap: 4px;
  padding: 11px 14px; border-radius: 14px;
  background: rgba(12, 19, 34, .78);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line-strong);
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.8);
  font-family: var(--mono); white-space: nowrap;
  animation: bob 7s ease-in-out infinite;
}
.fc-label { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; color: var(--faint); letter-spacing: .02em; }
.fc-label .live-dot { width: 6px; height: 6px; }
.fc-value { font-size: 13px; color: var(--text); }
.fc-value s { color: var(--red); text-decoration-thickness: 1.5px; opacity: .85; }
.fc-value .good, .good { color: var(--green); font-weight: 500; }
.fc-arrow { color: var(--faint); }
.fc-1 { top: 13%; left: -12%; }
.fc-2 { top: 50%; right: -16%; animation-delay: -2.5s; }
.fc-3 { bottom: 8%; left: -12%; animation-delay: -4.5s; }
@keyframes bob { 50% { transform: translateY(-8px); } }

/* Stats */
.stats {
  margin-top: 72px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; padding: 26px 24px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat dd { font: 400 clamp(44px, 5vw, 60px)/1 var(--serif); letter-spacing: -.01em; color: var(--text); }
.stat dd i { font-style: normal; color: var(--gold); margin-left: 2px; }
.stat dt { color: var(--muted); font-size: 14px; line-height: 1.4; max-width: 230px; }

/* =========================================================
   SECTIONS
   ========================================================= */
.section { padding: 120px 0 0; }
.section-tight { padding-top: 110px; }
.section-head { max-width: 820px; margin-bottom: 44px; }
.section-head h2 {
  margin-top: 18px;
  font: 400 clamp(36px, 5vw, 62px)/1.04 var(--serif);
  letter-spacing: -.015em;
  text-wrap: balance;
}
.section-head h2 em { font-style: italic; color: var(--gold-2); }
.section-lede { margin-top: 18px; color: var(--muted); font-size: 17.5px; max-width: 700px; }

/* ---------- Experience ---------- */
.role { display: grid; grid-template-columns: 280px 1fr; gap: 44px; padding: 36px; }
.role-side { display: flex; flex-direction: column; gap: 20px; padding-right: 36px; border-right: 1px solid var(--line); }
.role-logo {
  width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center;
  font: 700 17px/1 var(--sans); letter-spacing: .06em; color: #0a0f1c;
  background: linear-gradient(140deg, var(--gold-2), var(--gold));
  box-shadow: 0 10px 30px -10px rgba(232, 181, 77, .55);
}
.role-title { font: 400 30px/1.1 var(--serif) !important; letter-spacing: -.01em !important; }
.role-company { margin-top: 4px; color: var(--gold-2); font-weight: 500; }
.role-meta { display: flex; flex-direction: column; gap: 2px; font: 13px/1.6 var(--mono); color: var(--faint); }
.role-summary { font-size: 17px !important; line-height: 1.7; color: var(--text) !important; opacity: .9; }
.role-areas { margin: 28px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-areas a {
  display: flex; flex-direction: column; gap: 3px; height: 100%;
  padding: 14px 16px; border-radius: 14px;
  background: rgba(255,255,255,.025); border: 1px solid var(--line);
  transition: border-color .25s, background .25s, transform .25s var(--ease);
}
.role-areas a:hover { border-color: rgba(232, 181, 77, .4); background: rgba(232, 181, 77, .05); transform: translateY(-2px); }
.role-areas b { font-weight: 600; font-size: 15px; }
.role-areas span { color: var(--muted); font-size: 13.5px; }

/* ---------- Migration ---------- */
.facts {
  display: grid; grid-template-columns: repeat(4, auto) 1fr; gap: 0;
  margin-bottom: 28px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  background: rgba(255,255,255,.015);
}
.facts > div { padding: 14px 22px; }
.facts > div + div { border-left: 1px solid var(--line); }
.facts dt { font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.facts dd { margin-top: 7px; font-weight: 500; font-size: 15px; }

.pipeline-fig { margin-bottom: 20px; }
.pipeline {
  position: relative;
  display: grid; grid-template-columns: minmax(0,1fr) 56px minmax(0,1.5fr) 56px minmax(0,1fr);
  align-items: center;
  padding: 36px;
  border: 1px solid var(--line); border-radius: 24px;
  background:
    radial-gradient(600px circle at 50% 0%, rgba(91, 155, 255, .10), transparent 60%),
    linear-gradient(180deg, #0b1222, #080d18);
  overflow: hidden;
}
.pipeline::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(160, 176, 214, .12) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}
.pl-node {
  position: relative; z-index: 1;
  padding: 20px; border-radius: 18px;
  background: rgba(14, 22, 39, .92); border: 1px solid var(--line-strong);
  box-shadow: 0 20px 50px -30px rgba(0,0,0,.9);
}
.pl-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.pl-icon {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: var(--blue-soft); color: var(--blue-2); border: 1px solid rgba(91,155,255,.25);
}
.pl-icon svg { width: 22px; height: 22px; }
.pl-src .pl-icon { background: rgba(255,255,255,.04); color: var(--muted); border-color: var(--line-strong); }
.pl-dst .pl-icon { background: var(--green-soft); color: var(--green); border-color: rgba(61,220,151,.3); }
.pl-icon-spin svg { animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pipeline.paused .pl-icon-spin svg { animation-play-state: paused; }
.pl-title { font-weight: 600; font-size: 16px; letter-spacing: -.01em; }
.pl-sub { font: 12px/1.4 var(--mono); color: var(--faint); }
.pl-list li {
  position: relative; padding-left: 16px; font-size: 13.5px; color: var(--muted); line-height: 1.5;
}
.pl-list li + li { margin-top: 6px; }
.pl-list li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 2px; background: var(--line-strong); }
.pl-dst .pl-list li::before { background: rgba(61,220,151,.55); }

.pl-engine { border-color: rgba(91, 155, 255, .38); box-shadow: 0 0 0 1px rgba(91,155,255,.08), 0 30px 60px -30px rgba(91,155,255,.35); }
.pl-cursor {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; border-radius: 10px; background: #060a13; border: 1px solid var(--line);
  font: 12px/1.2 var(--mono);
}
.pl-cursor span { color: var(--faint); }
.pl-cursor code { color: var(--gold-2); font-size: 12px; }
.pl-stages { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0; counter-reset: st; }
.pl-stages li {
  position: relative;
  font: 500 12px/1 var(--mono); padding: 7px 9px; border-radius: 8px;
  color: var(--muted); background: rgba(255,255,255,.03); border: 1px solid var(--line);
  transition: color .3s, background .3s, border-color .3s, box-shadow .3s;
}
.pl-stages li:not(:last-child)::after { content: "→"; position: absolute; right: -11px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 10px; }
.pl-stages li { margin-right: 6px; }
.pl-stages li.done { color: var(--green); border-color: rgba(61,220,151,.3); background: var(--green-soft); }
.pl-stages li.active { color: #fff; border-color: rgba(91,155,255,.6); background: rgba(91,155,255,.22); box-shadow: 0 0 18px -4px rgba(91,155,255,.7); }
.pl-transform { font-size: 12.5px; color: var(--faint); line-height: 1.5; }
.pl-status {
  margin-top: 12px; display: flex; align-items: center; gap: 8px;
  font: 500 12.5px/1.2 var(--mono); color: var(--text);
}
.pl-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); flex: none; transition: background .3s, box-shadow .3s; }
.pipeline.paused .pl-status .dot { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.pipeline.paused .pl-status { color: var(--amber); }

.pl-link { position: relative; height: 2px; align-self: center; background: linear-gradient(90deg, rgba(91,155,255,.12), rgba(91,155,255,.55), rgba(91,155,255,.12)); }
.pl-link::after {
  content: ""; position: absolute; right: -2px; top: 50%; width: 7px; height: 7px;
  border-top: 2px solid rgba(91,155,255,.6); border-right: 2px solid rgba(91,155,255,.6);
  transform: translateY(-50%) rotate(45deg);
}
.pkt {
  position: absolute; top: 50%; left: 0; width: 8px; height: 8px; border-radius: 50%;
  background: var(--blue-2); box-shadow: 0 0 12px var(--blue), 0 0 2px #fff;
  transform: translate(-50%, -50%);
  animation: pkt-x 2.4s linear infinite; animation-delay: calc(var(--i) * -0.8s);
}
@keyframes pkt-x { 0% { left: 0; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
@keyframes pkt-y { 0% { top: 0; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
.pipeline.paused .pkt { animation-play-state: paused; opacity: .18 !important; }
.pipeline.paused .pl-link { filter: grayscale(1) brightness(.7); }

.pipeline-fig figcaption { margin-top: 16px; color: var(--faint); font-size: 14.5px; max-width: 860px; line-height: 1.6; }

.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.cards-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.detail { display: flex; flex-direction: column; gap: 14px; }
.detail-k { font: 500 12px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--blue-2); }
.detail .code { margin-top: auto; }

.checkpoints { margin-top: auto; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding-top: 4px; }
.cp { height: 34px; border-radius: 8px; background: rgba(255,255,255,.04); border: 1px solid var(--line); position: relative; }
.cp.done { background: var(--green-soft); border-color: rgba(61,220,151,.35); }
.cp.done::after { content: ""; position: absolute; inset: 0; margin: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.cp.fail { background: var(--red-soft); border-color: rgba(255,123,123,.4); }
.cp.fail::after { content: "↻"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--red); font-size: 14px; }
.cp.resume { background: var(--blue-soft); border-color: rgba(91,155,255,.5); overflow: hidden; }
.cp.resume::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(91,155,255,.45); animation: fill 2.6s var(--ease) infinite; }
@keyframes fill { 0% { width: 0; } 70%, 100% { width: 100%; } }
.cp-legend { display: flex; gap: 16px; font: 11.5px/1 var(--mono); color: var(--faint); }
.cp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cp-legend span::before { content: ""; width: 8px; height: 8px; border-radius: 3px; }
.cp-legend span:nth-child(1)::before { background: var(--green); }
.cp-legend span:nth-child(2)::before { background: var(--red); }
.cp-legend span:nth-child(3)::before { background: var(--blue); }

.resolve { margin-top: auto; display: grid; grid-template-columns: 1fr 34px auto; align-items: center; gap: 10px; }
.resolve-in { display: flex; flex-direction: column; gap: 6px; }
.resolve-in li {
  font: 13px/1 var(--mono); color: var(--muted); padding: 8px 10px; border-radius: 9px;
  background: rgba(255,255,255,.03); border: 1px dashed var(--line-strong); white-space: pre;
}
.resolve-in li[lang="ar"] { font-family: var(--sans); font-size: 14px; text-align: right; }
.resolve-arrow { height: 2px; background: linear-gradient(90deg, var(--line-strong), var(--green)); position: relative; }
.resolve-arrow::after { content: ""; position: absolute; right: -1px; top: 50%; width: 6px; height: 6px; border-top: 2px solid var(--green); border-right: 2px solid var(--green); transform: translateY(-50%) rotate(45deg); }
.resolve-out {
  font: 500 14px/1 var(--sans); color: var(--green); padding: 11px 13px; border-radius: 10px;
  background: var(--green-soft); border: 1px solid rgba(61,220,151,.35); white-space: nowrap;
}
.resolve-steps { display: flex; gap: 6px; font: 11.5px/1 var(--mono); color: var(--faint); counter-reset: s; }
.resolve-steps li { counter-increment: s; }
.resolve-steps li::before { content: counter(s) ". "; color: var(--gold); }
.resolve-steps li:not(:last-child)::after { content: "  →"; color: var(--faint); }

/* ---------- Performance ---------- */
.perf { display: flex; flex-direction: column; gap: 18px; }
.perf-head { display: flex; flex-direction: column; gap: 6px; }
.perf-metric {
  font: 400 44px/1 var(--serif); letter-spacing: -.01em;
  background: linear-gradient(90deg, var(--gold-2), var(--blue-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.perf-metric small { font-size: .5em; font-family: var(--sans); letter-spacing: 0; }
.perf .code { margin-top: 0; }

.plan { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: stretch; margin-top: auto; }
.plan-col { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); }
.plan-col code { font-size: 14px; font-weight: 500; }
.plan-col small { color: var(--faint); font-size: 12.5px; line-height: 1.35; }
.plan-k { font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.plan-col.bad { background: var(--red-soft); border-color: rgba(255,123,123,.28); }
.plan-col.bad code { color: var(--red); }
.plan-col.good { background: var(--green-soft); border-color: rgba(61,220,151,.3); }
.plan-col.good code { color: var(--green); }
.plan-arrow { align-self: center; color: var(--faint); }

.nplus { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.nplus-row, .pool-row { display: grid; grid-template-columns: 60px 1fr; gap: 12px; align-items: center; }
.nplus-k, .pool-k { font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.q-grid { display: grid; grid-template-columns: repeat(18, 1fr); gap: 4px; }
.q-grid span { aspect-ratio: 1; border-radius: 3px; background: rgba(255,123,123,.16); border: 1px solid rgba(255,123,123,.22); }
.in .q-grid span { animation: qflash 3.6s infinite; animation-delay: calc(var(--i) * 70ms); }
@keyframes qflash { 0%, 6% { background: rgba(255,123,123,.16); } 3% { background: var(--red); } }
.q-one { height: 22px; border-radius: 6px; background: rgba(61,220,151,.1); border: 1px solid rgba(61,220,151,.3); overflow: hidden; }
.q-one span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, rgba(61,220,151,.55), var(--green)); border-radius: 5px; }
.in .q-one span { animation: qone 3.6s var(--ease) infinite; }
@keyframes qone { 0% { width: 0; } 18%, 100% { width: 100%; } }

.pool { display: flex; flex-direction: column; gap: 12px; margin-top: auto; }
.slots { display: grid; grid-template-columns: repeat(20, 1fr); gap: 4px; }
.slots span { height: 22px; border-radius: 4px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.slots-bad span { background: repeating-linear-gradient(135deg, rgba(245,177,76,.45) 0 3px, rgba(245,177,76,.18) 3px 6px); border-color: rgba(245,177,76,.4); }
.slots-good span.busy { animation: blip 2.8s infinite; animation-delay: var(--dl, 0s); }
@keyframes blip { 0%, 100% { background: rgba(255,255,255,.04); border-color: var(--line); } 8%, 20% { background: var(--green); border-color: var(--green); } 30% { background: rgba(255,255,255,.04); border-color: var(--line); } }

.mem-chart { position: relative; margin-top: auto; height: 150px; padding: 0 0 20px 22px; }
.mem-chart svg { width: 100%; height: 100%; overflow: visible; }
.mem-chart .axis { stroke: var(--line-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.mem-chart .line-bad { fill: none; stroke: var(--red); stroke-width: 2; stroke-dasharray: 6 5; opacity: .85; vector-effect: non-scaling-stroke; }
.mem-chart .line-good { fill: none; stroke: var(--green); stroke-width: 2.6; stroke-linecap: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 6px rgba(61,220,151,.5)); transform-box: fill-box; transform-origin: left center; }
.in .mem-chart .line-good { animation: grow 1.4s .3s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }
.mc { position: absolute; font: 500 11.5px/1 var(--mono); white-space: nowrap; }
.mc-bad { color: var(--red); right: 34%; top: 26%; }
.mc-good { color: var(--green); right: 1%; top: 61%; }
.mc-x { color: var(--faint); right: 0; bottom: 0; font-weight: 400; }
.mc-y { color: var(--faint); left: 2px; top: 50%; font-weight: 400; transform: rotate(-90deg) translateX(-50%); transform-origin: left top; }

.flow { display: flex; flex-wrap: wrap; gap: 6px 4px; align-items: center; }
.flow li { font: 12px/1 var(--mono); color: var(--muted); padding: 7px 9px; border-radius: 8px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.flow li:not(:last-child)::after { content: "→"; margin-left: 9px; color: var(--faint); }
.flow li:not(:last-child) { padding-right: 9px; }

/* ---------- Systems bento ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.bento .card { display: flex; flex-direction: column; gap: 12px; }
.bento-a, .bento-b { grid-column: span 3; }
.bento-c, .bento-d, .bento-e { grid-column: span 2; }
.bento-f { grid-column: span 3; }
.bento-g { grid-column: span 3; }
.bento-c p, .bento-d p, .bento-e p { color: var(--text); opacity: .86; font-size: 16px; }

.awb { margin-top: auto; border-radius: 14px; background: #060a13; border: 1px solid var(--line); padding: 12px 14px; font-family: var(--mono); }
.awb-head { display: flex; justify-content: space-between; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.awb-list { height: 132px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.awb-list li { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 13px; color: var(--muted); border-bottom: 1px dashed rgba(160,176,214,.08); animation: slideIn .5s var(--ease); }
.awb-list li b { color: var(--gold-2); font-weight: 500; letter-spacing: .04em; }
.awb-list li .w { display: inline-flex; align-items: center; gap: 8px; }
.awb-list li .w::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--wc, var(--blue)); }
@keyframes slideIn { from { opacity: 0; transform: translateY(10px); } }

.ndjson { margin-top: auto; border-radius: 14px; background: #060a13; border: 1px solid var(--line); padding: 12px 14px; }
.nd-lines li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 5px 0; }
.nd-lines code { background: none; border: 0; padding: 0; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nd-lines .ok, .nd-lines .no { display: inline-flex; align-items: center; gap: 4px; font: 11.5px var(--mono); flex: none; }
.nd-lines svg { width: 14px; height: 14px; }
.nd-lines .ok { color: var(--green); }
.nd-lines .no { color: var(--red); }
.nd-progress { margin-top: 10px; height: 6px; border-radius: 999px; background: rgba(255,255,255,.06); overflow: hidden; }
.nd-progress span { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--blue-2)); transition: width .25s linear; }
.nd-meta { margin-top: 8px; display: flex; justify-content: space-between; font: 11.5px var(--mono); color: var(--faint); }
.nd-lock { display: inline-flex; align-items: center; gap: 6px; }
.nd-lock i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold); }

.suites { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.suites li { display: inline-flex; align-items: center; gap: 6px; font: 12.5px/1 var(--mono); color: var(--green); padding: 8px 11px; border-radius: 999px; background: var(--green-soft); border: 1px solid rgba(61,220,151,.28); }
.suites svg { width: 13px; height: 13px; }

/* ---------- Journey ---------- */
.activity { padding: 28px 28px 22px; overflow: visible; }
.activity-stats { display: flex; flex-wrap: wrap; gap: 12px 40px; margin-bottom: 26px; }
.activity-stats dt { font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.activity-stats dd { margin-top: 8px; font: 400 40px/1 var(--serif); }
.heatmap-scroll { overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.heatmap-wrap { min-width: 880px; }
.heatmap-months, .heatmap {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  column-gap: 3px;
}
.heatmap { grid-template-rows: repeat(7, auto); row-gap: 3px; }
.heatmap-months { margin-bottom: 8px; height: 14px; font: 11px/1 var(--mono); color: var(--faint); grid-template-rows: 14px; }
.heatmap-months span { white-space: nowrap; }
.heatmap i {
  display: block; aspect-ratio: 1; border-radius: 2.5px;
  background: rgba(255,255,255,.045);
  transition: transform .15s;
}
.heatmap i[data-c] { cursor: crosshair; }
.heatmap i:hover { transform: scale(1.35); outline: 1px solid rgba(255,255,255,.5); }
.heatmap i.out { visibility: hidden; }
.l1 { background: rgba(91,155,255,.28) !important; }
.l2 { background: rgba(91,155,255,.5) !important; }
.l3 { background: rgba(91,155,255,.78) !important; }
.l4 { background: var(--blue-2) !important; box-shadow: 0 0 8px rgba(156,194,255,.6); }
.heatmap-foot { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between; align-items: center; font: 12px/1 var(--mono); color: var(--faint); }
.heatmap-foot b { color: var(--gold-2); font-weight: 500; }
.legend { display: inline-flex; align-items: center; gap: 4px; }
.legend i { width: 11px; height: 11px; border-radius: 2.5px; display: inline-block; }
.legend .l0 { background: rgba(255,255,255,.045); }
.heat-tip {
  position: absolute; z-index: 5; pointer-events: none; opacity: 0;
  padding: 7px 10px; border-radius: 8px; white-space: nowrap;
  background: #f4f6fb; color: #0a0f1c; font: 500 12px/1.2 var(--mono);
  transform: translate(-50%, calc(-100% - 10px)); transition: opacity .12s;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.6);
}
.heat-tip.show { opacity: 1; }

.milestones { margin-top: 40px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 48px; position: relative; }
.milestones li {
  position: relative; display: grid; grid-template-columns: 92px 1fr; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.milestones time { font: 500 13px/1.6 var(--mono); color: var(--gold); }
.milestones p { color: var(--muted); font-size: 15.5px; line-height: 1.55; }

/* ---------- Toolbox ---------- */
.toolbox { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 28px; }
.tool-group h3 { font: 500 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }

/* ---------- Beyond ---------- */
.beyond .card { display: flex; flex-direction: column; gap: 14px; }
.beyond-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; color: var(--gold-2); background: var(--gold-soft); border: 1px solid rgba(232,181,77,.3); }
.beyond-icon svg { width: 22px; height: 22px; }
.list li { position: relative; padding-left: 18px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.list li + li { margin-top: 9px; }
.list li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); opacity: .7; }
.list b { color: var(--text); font-weight: 600; }
.posts li + li { border-top: 1px solid var(--line); }
.posts a { display: grid; grid-template-columns: 1fr auto 18px; align-items: center; gap: 12px; padding: 12px 0; transition: color .2s; }
.posts a span { color: var(--text); font-size: 15px; line-height: 1.4; }
.posts a time { font: 12px var(--mono); color: var(--faint); }
.posts a .ic { width: 16px; height: 16px; color: var(--faint); transition: transform .25s var(--ease), color .2s; }
.posts a:hover span { color: var(--gold-2); }
.posts a:hover .ic { transform: translate(2px, -2px); color: var(--gold-2); }

/* ---------- Contact ---------- */
.contact { position: relative; margin-top: 140px; padding: 120px 0; isolation: isolate; border-top: 1px solid var(--line); }
.contact-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(700px 360px at 50% 0%, rgba(91,155,255,.18), transparent 70%),
    radial-gradient(500px 300px at 50% 100%, rgba(232,181,77,.10), transparent 70%);
}
.contact-bg::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(160,176,214,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(160,176,214,.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 60% 70% at 50% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 40%, #000 20%, transparent 75%);
}
.contact-inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.contact h2 { margin-top: 20px; font: 400 clamp(40px, 6.4vw, 80px)/1.02 var(--serif); letter-spacing: -.02em; max-width: 900px; text-wrap: balance; }
.contact h2 em { font-style: italic; color: var(--gold-2); }
.contact p { margin-top: 18px; color: var(--muted); font-size: 18px; }
.contact-actions { position: relative; z-index: 3; margin-top: 36px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.copy-btn.copied { color: var(--green); border-color: rgba(61,220,151,.5); }

/* Email menu: works even where mailto: links do nothing */
.mail-menu { position: relative; display: inline-flex; }
.mail-menu.open { z-index: 30; }
.mail-pop {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 30;
  width: 260px; padding: 6px; border-radius: 16px;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--surface-2); border: 1px solid var(--line-strong);
  box-shadow: 0 28px 60px -20px rgba(0, 0, 0, .85);
  text-align: left;
  animation: pop .18s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }
.mail-addr {
  margin: 0 0 4px !important; padding: 9px 12px 11px; border-bottom: 1px solid var(--line);
  font: 12.5px/1.3 var(--mono) !important; color: var(--muted) !important; user-select: all; word-break: break-all;
}
.mail-pop a, .mail-pop button {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 11px 12px; border: 0; border-radius: 10px; background: none; cursor: pointer;
  font: 500 14.5px/1.2 var(--sans); color: var(--text); text-align: left;
  transition: background .15s, color .15s;
}
.mail-pop a:hover, .mail-pop button:hover, .mail-pop a:focus-visible, .mail-pop button:focus-visible { background: rgba(255, 255, 255, .06); outline-offset: -2px; }
.mail-pop .ic { width: 16px; height: 16px; flex: none; color: var(--faint); }
.mail-pop .ic-end { margin-left: auto; width: 14px; height: 14px; }
.mail-pop .copy-btn.copied, .mail-pop .copy-btn.copied .ic { color: var(--green); }
.contact .mail-pop { left: 50%; translate: -50% 0; }
.contact-links { margin-top: 36px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; }
.contact-links a { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: 14.5px; transition: color .2s; }
.contact-links a:hover { color: var(--text); }
.contact-links svg { width: 16px; height: 16px; }

.footer { border-top: 1px solid var(--line); padding: 26px 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; font: 12.5px/1.4 var(--mono); color: var(--faint); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .nav-links a { padding: 8px 9px; }
  .fc-1 { left: -6%; }
  .fc-2 { right: -8%; }
  .fc-3 { left: -4%; }
}

@media (max-width: 980px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column; gap: 2px;
    position: absolute; top: 68px; left: 12px; right: 12px;
    padding: 10px; border-radius: 18px;
    background: rgba(10, 16, 29, .97); border: 1px solid var(--line-strong);
    box-shadow: 0 30px 60px -20px rgba(0,0,0,.8);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  }
  .nav-links.open a { padding: 13px 14px; font-size: 16px; border-radius: 12px; }
  .nav-links.open a.active::after { left: auto; right: 16px; bottom: 50%; transform: translateY(50%); }
  .nav-links.open .nav-links-cta { display: block; margin-top: 6px; background: var(--text); color: #0a0f1c; text-align: center; font-weight: 500; }
  .nav.menu-open { background: rgba(7, 11, 20, .92); }

  .hero { padding-top: 116px; }
  .hero-inner { grid-template-columns: 1fr; gap: 44px; }
  .hero-visual { order: -1; width: min(72%, 340px); }
  .fc-1 { top: auto; bottom: 30%; left: -18%; }
  .fc-2 { top: auto; bottom: 9%; right: -18%; }
  .fc-3 { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }

  .role { grid-template-columns: 1fr; gap: 28px; }
  .role-side { padding-right: 0; border-right: 0; padding-bottom: 24px; border-bottom: 1px solid var(--line); flex-direction: row; flex-wrap: wrap; align-items: center; }
  .role-meta { margin-left: auto; text-align: right; }

  .facts { grid-template-columns: repeat(3, 1fr); }
  .facts > div:nth-child(4) { border-left: 0; }
  .facts > div:nth-child(n+4) { border-top: 1px solid var(--line); }

  .pipeline { grid-template-columns: 1fr; padding: 22px; }
  .pl-link { width: 2px; height: 52px; justify-self: center; background: linear-gradient(180deg, rgba(91,155,255,.12), rgba(91,155,255,.55), rgba(91,155,255,.12)); }
  .pl-link::after { right: auto; left: 50%; top: auto; bottom: -1px; transform: translateX(-50%) rotate(135deg); }
  .pkt { top: 0; left: 50%; animation-name: pkt-y; }

  .cards-3 { grid-template-columns: 1fr; }
  .bento-a, .bento-b, .bento-f, .bento-g { grid-column: span 6; }
  .bento-c, .bento-d, .bento-e { grid-column: span 6; }
  .toolbox { grid-template-columns: repeat(2, 1fr); }
  .milestones { grid-template-columns: 1fr; }
}

@media (min-width: 640px) and (max-width: 980px) {
  .bento-c, .bento-d { grid-column: span 3; }
}

@media (max-width: 760px) {
  .cards-2 { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 15.5px; }
  .section { padding-top: 88px; }
  .section-tight { padding-top: 80px; }
  .section-head { margin-bottom: 32px; }
  .card { padding: 22px; border-radius: 18px; }
  .hero { padding-top: 100px; padding-bottom: 36px; }
  .hero-visual { width: min(78%, 300px); }
  .float-card { padding: 8px 11px; border-radius: 12px; }
  .fc-label { font-size: 10px; }
  .fc-value { font-size: 11.5px; }
  .fc-1 { left: -15%; bottom: 31%; }
  .fc-2 { right: -15%; bottom: 8%; }
  .eyebrow { font-size: 12px; }
  .hero-lede { font-size: 16px; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .hero-actions .mail-menu { flex: 1 1 auto; }
  .hero-actions .mail-menu .btn { width: 100%; }
  .hero-actions .mail-pop { left: auto; right: 0; }
  .stats { margin-top: 48px; }
  .stat { padding: 20px 14px; }
  .stat dt { font-size: 13px; }

  .role { padding: 22px; }
  .role-side { flex-direction: column; align-items: flex-start; gap: 14px; }
  .role-meta { margin-left: 0; text-align: left; flex-direction: row; gap: 14px; }
  .role-areas { grid-template-columns: 1fr; }

  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts > div { padding: 12px 16px; }
  .facts > div:nth-child(n) { border-left: 0; border-top: 1px solid var(--line); }
  .facts > div:nth-child(even) { border-left: 1px solid var(--line); }
  .facts > div:nth-child(-n+2) { border-top: 0; }
  .facts > div:last-child { grid-column: span 2; border-left: 0; }

  .pipeline { padding: 16px; border-radius: 20px; }
  .pl-node { padding: 16px; }
  .plan { grid-template-columns: 1fr; }
  .plan-arrow { justify-self: center; transform: rotate(90deg); }
  .resolve { grid-template-columns: 1fr; }
  .resolve-arrow { width: 2px; height: 22px; justify-self: center; background: linear-gradient(180deg, var(--line-strong), var(--green)); }
  .resolve-arrow::after { right: auto; left: 50%; top: auto; bottom: -1px; transform: translateX(-50%) rotate(135deg); }
  .resolve-out { justify-self: center; }
  .nplus-row, .pool-row { grid-template-columns: 1fr; gap: 8px; }
  .slots { gap: 3px; }
  .q-grid { gap: 3px; }

  .pl-stages { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .pl-stages li { margin-right: 0; display: flex; align-items: center; gap: 7px; counter-increment: st; }
  .pl-stages li::before { content: counter(st); font-size: 10.5px; color: var(--faint); }
  .pl-stages li.active::before, .pl-stages li.done::before { color: inherit; opacity: .7; }
  .pl-stages li:not(:last-child)::after { content: none; }
  .activity-stats { display: grid; grid-template-columns: 1fr 1fr; }
  .chips-lg li { border-radius: 12px; }
  .bento { gap: 16px; }
  .bento-c, .bento-d, .bento-e { grid-column: span 6; }
  .toolbox { grid-template-columns: 1fr; gap: 26px; }
  .activity { padding: 22px 18px 18px; }
  .activity-stats { gap: 14px 28px; }
  .activity-stats dd { font-size: 32px; }
  .milestones li { grid-template-columns: 1fr; gap: 4px; }
  .posts a { grid-template-columns: 1fr 18px; }
  .posts a time { grid-column: 1; grid-row: 2; }
  .posts a .ic { grid-row: 1 / span 2; grid-column: 2; }
  .contact { margin-top: 100px; padding: 88px 0; }
  .contact-actions .btn { width: 100%; justify-content: center; }
  .contact-actions .mail-menu { width: 100%; }
  .btn-lg { font-size: 15px; padding: 0 18px; }
  .footer-inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal.pending { opacity: 1; transform: none; }
  .pkt { display: none; }
}
