/* ------------------------------------------------------------------
   Abdelaziz Awad — portfolio v3
   Editorial-Apple: white ground, hairline rules, two-tone headlines,
   tabbed media "showcases", captions under media, no heavy cards.
------------------------------------------------------------------- */
:root {
  --bg: #ffffff; --bg-2: #f5f5f7; --bg-3: #fafafa;
  --ink: #1d1d1f; --ink-2: #6e6e73; --ink-3: #86868b; --ink-4: #a1a1a6;
  --line: rgba(0,0,0,0.1); --line-2: rgba(0,0,0,0.06);
  --blue: #0071e3; --blue-2: #0077ed;
  --r: 20px; --r-m: 14px; --r-s: 10px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
  --nav: 52px; --w: 1240px; --wn: 980px;
  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; overflow-x: clip; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.47; letter-spacing: -0.02em; -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01", "ss03"; }
img, video, canvas, iframe { display: block; max-width: 100%; }
a { color: var(--blue); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.02em; }
button { font: inherit; }
::selection { background: rgba(0,113,227,0.18); }

/* ---- type ---- */
.t-hero { font-size: clamp(48px, 6.4vw, 92px); line-height: 0.98; letter-spacing: -0.04em; font-weight: 700; overflow-wrap: anywhere; }
.t-hero--sub { font-size: clamp(26px, 3vw, 40px); line-height: 1.1; letter-spacing: -0.03em; font-weight: 600; color: var(--ink-3); margin-top: 14px; }
.t-hero .g { color: var(--ink-3); }
.t-display { font-size: clamp(36px, 4.8vw, 64px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 700; }
.t-title { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 700; }
.t-head { font-size: clamp(21px, 2.2vw, 26px); line-height: 1.2; letter-spacing: -0.02em; font-weight: 600; }
.t-lead { font-size: clamp(19px, 1.8vw, 24px); line-height: 1.35; letter-spacing: -0.02em; color: var(--ink); font-weight: 400; }
.t-body { font-size: 17px; line-height: 1.5; color: var(--ink-2); }
.t-small { font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.t-meta { font-size: 15px; line-height: 1.6; color: var(--ink-3); }
.eyebrow { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.eyebrow--blue { color: var(--blue); }
.c { text-align: center; } .mx { margin-inline: auto; }
.maxw { max-width: 640px; } .maxw-l { max-width: 820px; }

/* ---- layout ---- */
.wrap { width: min(100% - 48px, var(--w)); margin-inline: auto; }
.narrow { width: min(100% - 48px, var(--wn)); margin-inline: auto; }
.sec { padding-block: clamp(72px, 9vw, 128px); }
.sec--s { padding-block: clamp(40px, 5vw, 64px); }
.rule { height: 1px; background: var(--line); }
.mt-1 { margin-top: 12px; } .mt-2 { margin-top: 24px; } .mt-3 { margin-top: 40px; } .mt-4 { margin-top: 64px; } .mt-5 { margin-top: 96px; }
.mb-2 { margin-bottom: 24px; } .mb-3 { margin-bottom: 40px; } .mb-4 { margin-bottom: 56px; }
.grid { display: grid; gap: 18px; } .g2 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

/* ---- nav (white) ---- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--nav); background: rgba(255,255,255,0.8); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line-2); }
.nav__in { height: 100%; display: flex; align-items: center; justify-content: space-between; width: min(100% - 48px, var(--w)); margin-inline: auto; }
.nav__brand { color: var(--ink); font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.nav__brand:hover { text-decoration: none; }
.nav__links { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav__links a { color: var(--ink-2); font-size: 13px; letter-spacing: -0.01em; }
.nav__links a:hover { color: var(--ink); text-decoration: none; }
.nav__links .pill { background: var(--ink); color: #fff; padding: 6px 13px; border-radius: 980px; font-size: 12px; font-weight: 500; }
.nav__links .pill:hover { background: #000; }
@media (max-width: 640px) { .nav__links { gap: 14px; } .nav__links li.hide-m { display: none; } .nav__brand { font-size: 13px; } .theme { width: 30px; height: 30px; } }

/* ---- buttons / links ---- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 12px 22px; border-radius: 980px; font-size: 15px; font-weight: 500; letter-spacing: -0.01em; background: var(--ink); color: #fff; border: 0; cursor: pointer; transition: background .2s var(--ease), transform .2s var(--ease); }
.btn:hover { background: #000; text-decoration: none; } .btn:active { transform: scale(.98); }
.btn--blue { background: var(--blue); } .btn--blue:hover { background: var(--blue-2); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px rgba(0,0,0,.22); } .btn--ghost:hover { background: rgba(0,0,0,.04); }
.btn--sm { padding: 8px 15px; font-size: 13px; }
.link { color: var(--blue); font-size: 17px; font-weight: 500; } .link.dn::after { content: "  ↓"; } .link.ext::after { content: "  ↗"; } .link.ar::after { content: " ›"; }
.link--s { font-size: 14px; }
.cta { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }

/* ---- showcase: text | tabbed media ---- */
.show { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.show--rev > .show__copy { order: 2; }
.show__copy .t-lead { margin-top: 20px; max-width: 480px; }
.show__copy .t-meta { margin-top: 22px; }
.show__copy .cta { margin-top: 30px; }
.show__stage { text-align: center; min-width: 0; }
.show__copy { min-width: 0; }
.show__media { position: relative; border-radius: var(--r); overflow: hidden; background: #fff; aspect-ratio: 4 / 3; display: grid; place-items: center; }
.show__media--grey { background: var(--bg-2); }
.show__media--dark { background: #0b0b0c; }
.show__media--tall { aspect-ratio: 4 / 4.2; }
.show__media--916 { aspect-ratio: 9 / 16; height: auto; width: min(100%, calc(min(72vh, 660px) * 9 / 16)); margin-inline: auto; background: #fff; }
.show__media--45 { aspect-ratio: 4 / 5; height: auto; width: min(100%, calc(min(72vh, 640px) * 4 / 5)); margin-inline: auto; background: #fff; }
.show__media > .zoom { transform: scale(1.22); transform-origin: center; }
.show__media > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .45s var(--ease); }
.show__media > .on { opacity: 1; }
.show__media > .cover { object-fit: cover; }
.show__media > .pad { padding: 20px; }
.show__cap { margin-top: 18px; font-size: 14px; color: var(--ink-2); min-height: 1.4em; }
.seg { display: inline-flex; flex-wrap: wrap; justify-content: center; max-width: 100%; gap: 2px; margin-top: 16px; padding: 4px; border-radius: 24px; background: var(--bg-2); }
.seg button { border: 0; background: transparent; color: var(--ink-2); font-size: 15px; letter-spacing: -0.01em; padding: 9px 20px; border-radius: 980px; cursor: pointer; transition: background .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease); }
.seg button:hover { color: var(--ink); }
.seg button.on { background: #fff; color: var(--ink); font-weight: 500; box-shadow: 0 1px 6px rgba(0,0,0,.12); }
.show__link { display: block; margin-top: 16px; font-size: 14px; color: var(--ink-3); }
.show__link:hover { color: var(--ink); text-decoration: none; }
.show__link::after { content: "  ↗"; }
.show__num { font-size: 13px; letter-spacing: 0.1em; color: var(--ink-3); font-weight: 600; }
@media (max-width: 900px) { .show { grid-template-columns: 1fr; gap: 32px; } .show--rev > .show__copy { order: 0; } .show__copy .t-lead { max-width: none; } }
@media (max-width: 600px) { .seg button { padding: 8px 14px; font-size: 14px; } }

/* ---- home hero ---- */
.hero { min-height: 100svh; padding-top: var(--nav); display: grid; align-items: center; }
.hero .show { padding-block: 56px 48px; }
.hero .t-lead { font-size: clamp(20px, 2vw, 26px); }

/* ---- work list ---- */
.work-item { padding-block: clamp(64px, 8vw, 112px); border-top: 1px solid var(--line); }
.work-item .t-title { margin-top: 10px; }

/* ---- galleries: media with captions below ---- */
.gal { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px 18px; }
.g { grid-column: span 3; }
.g--2 { grid-column: span 2; } .g--3 { grid-column: span 3; } .g--4 { grid-column: span 4; } .g--6 { grid-column: span 6; }
.g .m { border-radius: var(--r-m); overflow: hidden; background: var(--bg-2); aspect-ratio: 4 / 3; box-shadow: inset 0 0 0 1px var(--line-2); }
.g--sq .m { aspect-ratio: 1; } .g--wide .m { aspect-ratio: 16 / 9; } .g--tall .m { aspect-ratio: 3 / 4; } .g--6 .m { aspect-ratio: 21 / 9; }
.g .m img, .g .m video { width: 100%; height: 100%; object-fit: cover; display: block; }
.g--fit .m { background: #fff; } .g--fit .m img, .g--fit .m video { object-fit: contain; padding: 12px; }
.g--dark .m { background: var(--bg-2); }
.g .cap { margin-top: 10px; font-size: 13px; line-height: 1.4; color: var(--ink-3); }
.g .cap b { color: var(--ink); font-weight: 600; }
@media (max-width: 900px) { .gal { grid-template-columns: repeat(2, 1fr); } .g, .g--2, .g--3, .g--4, .g--6 { grid-column: span 1; } .g--6 { grid-column: span 2; } .g--6 .m { aspect-ratio: 16 / 9; } }
@media (max-width: 560px) { .gal { grid-template-columns: 1fr; } .g--6 { grid-column: span 1; } }
[data-zoom] { cursor: zoom-in; }

/* section rule + pipe grid + 6-step list */
.sec--line { border-top: 1px solid var(--line); }
.gal--5 { grid-template-columns: repeat(5, 1fr); } .gal--5 .g { grid-column: auto; } .gal--5 .g .m { aspect-ratio: 1; }
@media (max-width: 900px) { .gal--5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .gal--5 { grid-template-columns: repeat(2, 1fr); } }
.steps--6 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 800px) { .steps--6 { grid-template-columns: repeat(2, 1fr); } }
.show .show__media img.pad, .show .show__media video.pad { padding: 20px; }
/* chapter heading */
.chap { display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px 48px; align-items: end; margin-bottom: 36px; }
.chap .t-title { margin-top: 8px; }
.chap .t-body { max-width: 560px; }
@media (max-width: 800px) { .chap { grid-template-columns: 1fr; } }

/* steps list */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; border-top: 1px solid var(--line); }
.steps li { padding-top: 22px; font-size: 15px; color: var(--ink-2); }
.steps b { display: block; color: var(--ink); font-size: 19px; margin: 6px 0 8px; font-weight: 600; letter-spacing: -0.02em; }
.steps .n { font-size: 12px; letter-spacing: .12em; color: var(--ink-3); font-weight: 600; }
@media (max-width: 800px) { .steps { grid-template-columns: repeat(2, 1fr); } }

/* ---- STF panel embed ---- */
.panel { position: relative; background: #0a0c0e; border-radius: 18px; overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,.18), inset 0 0 0 1px rgba(0,0,0,.08); }
.panel iframe { width: 100%; height: 720px; border: 0; background: #0a0c0e; }
.panel__bar { display: flex; gap: 8px; align-items: center; padding: 10px 12px; background: #0f1215; border-bottom: 1px solid rgba(255,255,255,.08); }
.panel__bar span { width: 10px; height: 10px; border-radius: 50%; background: #2e343c; }
.panel__bar b { margin-left: 8px; font-size: 11px; color: #7f8792; font-weight: 500; letter-spacing: .04em; font-family: var(--mono); }
.prompts { display: flex; flex-wrap: wrap; gap: 8px; }
.prompts button { font: inherit; font-size: 14px; padding: 9px 15px; border-radius: 980px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; transition: background .2s, border-color .2s; }
.prompts button:hover { background: var(--bg-2); border-color: rgba(0,0,0,.2); }
@media (max-width: 860px) { .panel iframe { height: 640px; } }

/* ---- demo cards (kept dark; used on façade + ray-cast) ---- */
.demo { border-radius: var(--r); overflow: hidden; background: #0b0b0c; color: #f5f5f7; background-image: radial-gradient(rgba(255,255,255,.09) 1px, transparent 1px); background-size: 22px 22px; }
.demo__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 22px 26px 0; flex-wrap: wrap; }
.demo__title { font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.demo__title small { display: block; font-size: 13px; color: #a1a1a6; font-weight: 400; margin-top: 2px; }
.demo__badge { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #2997ff; padding: 4px 9px; border: 1px solid rgba(41,151,255,.4); border-radius: 980px; }
.demo__stage { margin-top: 18px; } .demo__stage canvas { width: 100%; height: auto; }
.demo__ctl { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; padding: 18px 26px 22px; border-top: 1px solid rgba(255,255,255,.08); background: rgba(0,0,0,.35); font-family: var(--mono); font-size: 12px; }
.demo__ctl label { display: flex; align-items: center; gap: 10px; color: #a1a1a6; }
.demo__ctl input[type=range] { width: 140px; accent-color: #2997ff; }
.demo__ctl select { font: inherit; padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.18); }
.demo__ctl .btn--sm { font-family: var(--mono); font-size: 12px; background: var(--blue); }
.readout { display: flex; gap: 22px; margin-left: auto; } .readout span { color: #a1a1a6; } .readout b { color: #fff; font-weight: 600; }
.demo__log { font-family: var(--mono); font-size: 12px; line-height: 1.6; padding: 18px 26px; height: 300px; overflow: auto; white-space: pre-wrap; background: rgba(0,0,0,.5); }
.demo__log .k-tool { color: #6ee7b7; } .demo__log .k-arg { color: #93c5fd; } .demo__log .k-res { color: #a1a1a6; } .demo__log .k-txt { color: #f5f5f7; } .demo__log .k-sys { color: #fbbf24; }
.demo__split { display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 800px) { .demo__split { grid-template-columns: 1fr; } .readout { margin-left: 0; } }

/* ---- scroller ---- */
.scroller { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 24px; padding: 4px 24px 20px; margin-inline: -24px; scrollbar-width: none; }
.scroller::-webkit-scrollbar { display: none; }
.scroller > * { flex: 0 0 min(80vw, 620px); scroll-snap-align: start; }
.scroller .m { border-radius: var(--r-m); overflow: hidden; background: var(--bg-2); aspect-ratio: 2000 / 1415; box-shadow: inset 0 0 0 1px var(--line-2); }
.scroller .m img { width: 100%; height: 100%; object-fit: cover; }
.scroller .cap { margin-top: 10px; font-size: 13px; color: var(--ink-3); } .scroller .cap b { color: var(--ink); }

/* ---- about ---- */
.about { display: grid; grid-template-columns: 300px 1fr; gap: 64px; align-items: start; }
.about__photo { border-radius: var(--r-m); overflow: hidden; background: var(--bg-2); }
.about__photo img { filter: grayscale(1); }
.tbl { display: grid; grid-template-columns: 1fr 1fr; gap: 36px 48px; }
.tbl h3 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.tbl ul { list-style: none; margin: 0; padding: 0; }
.tbl li { display: grid; grid-template-columns: 88px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; line-height: 1.4; }
.tbl li span:first-child { font-size: 12px; color: var(--ink-3); padding-top: 2px; }
.tbl li b { font-weight: 600; } .tbl li small { display: block; color: var(--ink-2); }
@media (max-width: 960px) { .about { grid-template-columns: 1fr; gap: 32px; } .about__photo { max-width: 300px; } }
@media (max-width: 640px) { .tbl { grid-template-columns: 1fr; } }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { font-size: 13px; padding: 6px 12px; border-radius: 980px; background: var(--bg-2); color: var(--ink-2); }

/* ---- next / footer ---- */
.next { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; border-top: 1px solid var(--line); padding-top: 28px; }
.next a { color: var(--ink); }
.next a:hover { text-decoration: none; } .next a:hover .t-head { color: var(--blue); }
.next .eyebrow { margin-bottom: 8px; }
.next .t-head::after { content: " ›"; color: var(--blue); }
.footer { padding: 32px 0 40px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
.footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer a { color: var(--ink-2); }

/* ---- reveal / lightbox ---- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; } .reveal[data-delay="2"] { transition-delay: .16s; } .reveal[data-delay="3"] { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }
.lb { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.92); display: none; place-items: center; padding: 24px; cursor: zoom-out; }
.lb.open { display: grid; } .lb img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }

/* ---- agent build: transcript + model states in sync ---- */
.ab { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.ab__panel { background: #0a0c0e; color: #e9ecef; border-radius: var(--r); display: flex; flex-direction: column; min-height: 560px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); overflow: hidden; }
.ab__head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 13px; }
.ab__head b { font-weight: 600; letter-spacing: .02em; }
.ab__dot { width: 8px; height: 8px; border-radius: 50%; background: #4da3ff; box-shadow: 0 0 10px #4da3ff; }
.ab__meta { color: #7f8792; font-size: 12px; }
.ab__pct { margin-left: auto; font-family: var(--mono); font-size: 12px; color: #c4cad2; }
.ab__rail { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; padding: 14px 20px 0; }
.ab__rail i { font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #5b636d; padding-top: 8px; border-top: 2px solid #22262c; transition: color .3s, border-color .3s; }
.ab__rail i.done { color: #7f8792; border-color: #4da3ff; }
.ab__rail i.now { color: #fff; border-color: #fff; }
.ab__log { flex: 1; padding: 16px 20px; font-family: var(--mono); font-size: 12.5px; line-height: 1.7; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.ab__line { opacity: 0; transform: translateY(6px); transition: opacity .35s var(--ease), transform .35s var(--ease); cursor: pointer; padding: 1px 0; white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.ab__line.on { opacity: 1; transform: none; }
.ab__line.user { color: #fff; font-family: var(--font); font-size: 15px; line-height: 1.45; margin-bottom: 10px; letter-spacing: -.01em; }
.ab__line.user::before { content: "You  "; color: #7f8792; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; }
.ab__line.agent { color: #c4cad2; font-family: var(--font); font-size: 14px; margin: 6px 0; }
.ab__line.tool { color: #98a1ac; }
.ab__line.tool b { color: #6ee7b7; font-weight: 500; }
.ab__line.tool em { color: #7cbcff; font-style: normal; }
.ab__line.tool .r { color: #7f8792; }
.ab__line.now { color: #fff; }
.ab__line.now b { color: #a7f3d0; }
.ab__cursor::after { content: "▍"; color: #4da3ff; animation: abblink 1s steps(2) infinite; }
@keyframes abblink { 50% { opacity: 0; } }
.ab__foot { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; border-top: 1px solid rgba(255,255,255,.08); }
.ab__replay { border: 1px solid rgba(255,255,255,.2); background: transparent; color: #e9ecef; font-size: 12px; padding: 6px 12px; border-radius: 980px; cursor: pointer; }
.ab__replay:hover { background: rgba(255,255,255,.08); }
.ab__hint { font-family: var(--mono); font-size: 11px; color: #5b636d; letter-spacing: .08em; text-transform: uppercase; }
.ab__stage { position: relative; background: #fff; border-radius: var(--r); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line-2); cursor: ew-resize; touch-action: pan-y; user-select: none; min-height: 560px; }
.ab__stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ab__bar { position: absolute; left: 16%; right: 16%; bottom: 14px; height: 3px; border-radius: 3px; background: rgba(0,0,0,.08); overflow: hidden; }
.ab__bar i { display: block; height: 100%; width: 0; background: var(--ink); }
@media (max-width: 900px) { .ab { grid-template-columns: 1fr; } .ab__panel { min-height: 420px; order: 2; } .ab__stage { min-height: 70vh; } }

/* ---- night theme ---- */
html[data-theme="dark"] {
  --bg: #000000; --bg-2: #1c1c1e; --bg-3: #0a0a0a;
  --ink: #f5f5f7; --ink-2: #a1a1a6; --ink-3: #86868b; --ink-4: #6e6e73;
  --line: rgba(255,255,255,0.14); --line-2: rgba(255,255,255,0.08);
  --blue: #2997ff; --blue-2: #4daaff;
  color-scheme: dark;
}
html[data-theme="dark"] body { background: var(--bg); color: var(--ink); }
html[data-theme="dark"] .nav { background: rgba(0,0,0,0.72); border-bottom-color: var(--line-2); }
html[data-theme="dark"] .nav__links .pill { background: #f5f5f7; color: #000; }
html[data-theme="dark"] .nav__links .pill:hover { background: #fff; }
html[data-theme="dark"] .btn { background: #f5f5f7; color: #000; } html[data-theme="dark"] .btn:hover { background: #fff; }
html[data-theme="dark"] .seg { background: #1c1c1e; }
html[data-theme="dark"] .seg button.on { background: #3a3a3c; color: #fff; box-shadow: none; }
html[data-theme="dark"] .show__media, html[data-theme="dark"] .show__media--916, html[data-theme="dark"] .show__media--45 { background: #fff; }
html[data-theme="dark"] .show__media--grey { background: #1c1c1e; }
html[data-theme="dark"] .g .m { background: #1c1c1e; box-shadow: inset 0 0 0 1px var(--line-2); }
html[data-theme="dark"] .g--fit .m { background: #fff; }
html[data-theme="dark"] .phone { background: #1c1c1e; }
html[data-theme="dark"] .panel { box-shadow: 0 30px 60px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.08); }
html[data-theme="dark"] .prompts button { background: #1c1c1e; color: #f5f5f7; border-color: var(--line); }
html[data-theme="dark"] .prompts button:hover { background: #2c2c2e; }
html[data-theme="dark"] .tags span { background: #1c1c1e; color: var(--ink-2); }
html[data-theme="dark"] .about__photo { background: #1c1c1e; }
html[data-theme="dark"] .ab__stage { background: #fff; }
html[data-theme="dark"] .ab__bar { background: rgba(0,0,0,.08); } html[data-theme="dark"] .ab__bar i { background: #000; }
html[data-theme="dark"] .scroller .m { background: #1c1c1e; }
html[data-theme="dark"] .pages figure .media { background: #1c1c1e; }
html[data-theme="dark"] .bk-hero__cover { box-shadow: 0 30px 70px rgba(0,0,0,.7); }
html[data-theme="dark"] .next a:hover .t-head { color: var(--blue); }
html[data-theme="dark"] ::selection { background: rgba(41,151,255,0.3); }
/* theme toggle */
.theme { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center; padding: 0; transition: background .2s, border-color .2s; }
.theme:hover { background: var(--bg-2); }
.theme svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme .moon { display: none; }
html[data-theme="dark"] .theme .sun { display: none; }
html[data-theme="dark"] .theme .moon { display: block; }
html, body { transition: background-color .3s var(--ease), color .3s var(--ease); }
