/* =========================================================
   Faisal Ibn Aziz — portfolio styles
   Dark terminal / dev-console. Lime accent. Restrained.
   ========================================================= */

:root {
  --bg:          #0a0b0a;
  --bg-2:        #0f1110;
  --bg-3:        #141614;
  --panel:       #11130f;
  --line:        rgba(163, 255, 18, 0.08);
  --line-2:      rgba(255, 255, 255, 0.06);
  --fg:          #e7e9e3;
  --fg-2:        #b6b9ad;
  --fg-3:        #7a7d72;
  --muted:       #5a5d53;
  --accent:      #a3ff12;   /* lime */
  --accent-2:    #6fbf00;
  --accent-soft: rgba(163, 255, 18, 0.14);
  --warn:        #ffb020;
  --red:         #ff6b6b;

  --f-mono:    'JetBrains Mono', 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  --f-display: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;
  --f-text:    'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;

  --maxw: 1240px;
  --pad:  clamp(20px, 4vw, 64px);

  --ease: cubic-bezier(.22,.8,.2,1);
}

/* ----- Tweak: accents ----- */
html[data-accent="lime"]    { --accent:#a3ff12; --accent-2:#6fbf00; --accent-soft: rgba(163,255,18,0.14); }
html[data-accent="cyan"]    { --accent:#5eead4; --accent-2:#14b8a6; --accent-soft: rgba(94,234,212,0.16); }
html[data-accent="amber"]   { --accent:#ffb020; --accent-2:#d88800; --accent-soft: rgba(255,176,32,0.16); }
html[data-accent="violet"]  { --accent:#a78bfa; --accent-2:#7c5cf5; --accent-soft: rgba(167,139,250,0.18); }
html[data-accent="crimson"] { --accent:#ff6b6b; --accent-2:#e24545; --accent-soft: rgba(255,107,107,0.18); }

/* ----- Tweak: mode ----- */
html[data-mode="light"] {
  --bg:       #f4f4ef;
  --bg-2:     #ecedE6;
  --bg-3:     #e3e4dc;
  --panel:    #ffffff;
  --fg:       #14150f;
  --fg-2:     #3e403a;
  --fg-3:     #6b6e63;
  --muted:    #8b8e82;
  --line:     rgba(20, 21, 15, 0.08);
  --line-2:   rgba(20, 21, 15, 0.06);
  --accent-2: #4d8900;
}
html[data-mode="light"][data-accent="lime"]    { --accent:#4d8900; --accent-soft: rgba(77,137,0,0.10); }
html[data-mode="light"][data-accent="cyan"]    { --accent:#0d8a7a; --accent-soft: rgba(13,138,122,0.10); }
html[data-mode="light"][data-accent="amber"]   { --accent:#b57400; --accent-soft: rgba(181,116,0,0.12); }
html[data-mode="light"][data-accent="violet"]  { --accent:#6b4bdd; --accent-soft: rgba(107,75,221,0.12); }
html[data-mode="light"][data-accent="crimson"] { --accent:#c93333; --accent-soft: rgba(201,51,51,0.12); }

/* ----- Tweak: font ----- */
html[data-font="grotesk"] {
  --f-display: 'Space Grotesk', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --f-text:    'Inter', ui-sans-serif, system-ui, sans-serif;
}
html[data-font="serif"] {
  --f-display: 'Instrument Serif', 'Times New Roman', Georgia, serif;
  --f-text:    'Inter', ui-sans-serif, system-ui, sans-serif;
}

/* ========== Base ========== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; color-scheme: dark; }
html[data-mode="light"] { color-scheme: light; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  font-feature-settings: 'ss02','calt','liga';
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: #000; }

.accent { color: var(--accent); }
.muted  { color: var(--fg-3); }
.hl     { color: var(--accent); }

/* ========== NAV ========== */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--pad);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: 13px;
}
.nav__logo { display: flex; align-items: center; gap: 8px; font-weight: 600; letter-spacing: -0.01em; }
.nav__logo .caret { color: var(--accent); font-weight: 700; }
.nav__name { color: var(--fg); }
.nav__links { display: flex; gap: 22px; color: var(--fg-3); }
.nav__links a { position: relative; padding: 4px 0; transition: color .2s var(--ease); }
.nav__links a:hover { color: var(--accent); }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px;
  height: 1px; background: var(--accent); transition: right .3s var(--ease);
}
.nav__links a:hover::after { right: 0; }
.nav__meta { display: flex; align-items: center; gap: 12px; color: var(--fg-3); }

/* Mode toggle switch */
.mode-toggle {
  appearance: none; background: transparent; border: 0;
  padding: 0; margin-left: 4px; cursor: pointer;
  display: inline-flex; align-items: center;
  color: var(--fg-2);
}
.mode-toggle__track {
  position: relative;
  width: 46px; height: 22px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  display: inline-block;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.mode-toggle:hover .mode-toggle__track { border-color: var(--accent); }
.mode-toggle__thumb {
  position: absolute;
  top: 1px; left: 1px;
  width: 18px; height: 18px;
  background: var(--accent);
  color: #000;
  display: grid; place-items: center;
  transition: transform .25s var(--ease), background .25s var(--ease);
}
html[data-mode="light"] .mode-toggle__thumb { transform: translateX(24px); }
.mode-toggle__i { width: 11px; height: 11px; position: absolute; transition: opacity .2s var(--ease), transform .25s var(--ease); }
.mode-toggle__i--moon { opacity: 1; }
.mode-toggle__i--sun  { opacity: 0; transform: rotate(-40deg); }
html[data-mode="light"] .mode-toggle__i--moon { opacity: 0; transform: rotate(40deg); }
html[data-mode="light"] .mode-toggle__i--sun  { opacity: 1; transform: rotate(0); }

@media (max-width: 560px) {
  .nav__status { display: none; }
}
.status-dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 60%, transparent); }
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@media (max-width: 880px) {
  .nav__links { display: none; }
}

/* ========== HERO ========== */
.hero {
  position: relative;
  padding: clamp(48px, 8vw, 96px) var(--pad) clamp(36px, 6vw, 72px);
  max-width: var(--maxw); margin: 0 auto;
  overflow: hidden;
}
.hero__grid-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 30% 0%, #000 0%, transparent 70%);
}
.hero__inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; }
}

.hero__prompt {
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--fg-3);
  margin-bottom: 14px;
}
.prompt-user   { color: var(--accent); }
.prompt-colon  { color: var(--fg-3); }
.prompt-path   { color: var(--fg-2); }
.prompt-dollar { color: var(--accent); margin: 0 6px; }
.prompt-cmd    { color: var(--fg); }

.hero__code {
  font-family: var(--f-mono);
  font-size: clamp(14px, 1.25vw, 17px);
  line-height: 1.75;
  margin: 0 0 28px;
  color: var(--fg-2);
  white-space: pre-wrap;
  min-height: 330px;
  letter-spacing: -0.005em;
}
.hero__code .tk-key  { color: var(--fg); }
.hero__code .tk-str  { color: var(--accent); }
.hero__code .tk-num  { color: var(--warn); }
.hero__code .tk-pun  { color: var(--fg-3); }
.hero__code .tk-cm   { color: var(--muted); font-style: italic; }
.hero__code .cursor  {
  display: inline-block; width: 10px; height: 1.1em; vertical-align: -3px;
  background: var(--accent); margin-left: 2px; animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 16px;
  font-family: var(--f-mono); font-size: 13px; font-weight: 500;
  border: 1px solid var(--line);
  border-radius: 2px;
  transition: all .22s var(--ease);
  position: relative; overflow: hidden;
}
.btn--primary {
  background: var(--accent); color: #000;
  border-color: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-soft);
}
.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px -10px var(--accent-soft), 0 0 0 4px var(--accent-soft);
}
.btn--primary .btn__arrow { transition: transform .25s var(--ease); }
.btn--primary:hover .btn__arrow { transform: translateX(4px); }
.btn--ghost {
  color: var(--fg-2); background: transparent;
  border-color: var(--line-2);
}
.btn--ghost:hover { color: var(--accent); border-color: var(--accent); }

/* Portrait */
.portrait { margin: 0; }
.portrait__frame {
  position: relative;
  border: 1px solid var(--line);
  padding: 10px; background: var(--bg-2);
  transition: border-color .3s var(--ease);
}
.portrait__frame::before {
  content: ""; position: absolute; inset: 3px; border: 1px solid var(--line); pointer-events: none;
}
.portrait__frame::after {
  content: "● FAISAL.JPG  ·  3024×4032  ·  ONLINE";
  position: absolute; top: -9px; left: 16px;
  background: var(--bg); color: var(--fg-3);
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.1em;
  padding: 1px 8px;
}
.portrait__frame img {
  width: 100%; aspect-ratio: 4/5; object-fit: cover;
  filter: saturate(0.85) contrast(1.05);
  transition: filter .4s var(--ease);
}
.portrait__frame:hover img { filter: saturate(1) contrast(1.05); }
.portrait__scan {
  position: absolute; inset: 10px; pointer-events: none; mix-blend-mode: overlay; opacity: .35;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgba(255,255,255,0.05) 2px 3px
  );
}
html[data-mode="light"] .portrait__scan { mix-blend-mode: multiply; opacity: .12; }

.portrait__cap {
  margin-top: 14px;
  display: grid; gap: 4px;
  font-family: var(--f-mono); font-size: 11.5px;
  color: var(--fg-3);
}
.portrait__cap-row { display: grid; grid-template-columns: 60px 1fr; gap: 10px; }
.portrait__cap-row span { color: var(--muted); }
.portrait__cap-row b { color: var(--fg); font-weight: 500; }

/* Metrics row */
.metrics {
  position: relative; z-index: 1;
  margin-top: clamp(48px, 7vw, 96px);
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 780px) { .metrics { grid-template-columns: repeat(2, 1fr); } }
.metric {
  background: var(--bg);
  padding: 28px 20px;
  display: flex; flex-direction: column; gap: 4px;
}
.metric__num {
  font-family: var(--f-display);
  font-size: clamp(36px, 4.8vw, 64px);
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.03em;
  line-height: 1;
}
html[data-font="serif"] .metric__num { font-style: italic; letter-spacing: -0.02em; }
.metric__unit { font-family: var(--f-mono); font-size: 12px; color: var(--accent); margin-top: 2px; }
.metric__label {
  font-family: var(--f-mono); font-size: 11.5px; color: var(--fg-3);
  margin-top: 8px; letter-spacing: 0.02em;
}

.hero__scroll {
  position: absolute; right: var(--pad); bottom: 20px;
  display: flex; align-items: center; gap: 12px;
  font-family: var(--f-mono); font-size: 11px;
  color: var(--fg-3); letter-spacing: 0.2em; text-transform: uppercase;
  opacity: .7;
}
.hero__scroll-line {
  width: 48px; height: 1px; background: var(--fg-3); position: relative;
  overflow: hidden;
}
.hero__scroll-line::before {
  content: ""; position: absolute; inset: 0; background: var(--accent);
  animation: scrollbar 2.4s var(--ease) infinite;
  transform: translateX(-100%);
}
@keyframes scrollbar { 0%{transform:translateX(-100%);} 60%{transform:translateX(100%);} 100%{transform:translateX(100%);} }

/* ========== SECTION shell ========== */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(64px, 10vw, 128px) var(--pad);
  position: relative;
}
.section__head {
  display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
  margin-bottom: clamp(32px, 4vw, 56px);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.section__num {
  font-family: var(--f-mono); color: var(--accent);
  font-size: 13px; letter-spacing: 0.05em;
}
.section__title {
  font-family: var(--f-display);
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 600; letter-spacing: -0.02em;
  margin: 0; color: var(--fg);
}
html[data-font="serif"] .section__title { font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.section__rule { flex: 1 1 60px; height: 1px; background: var(--line); min-width: 24px; }
.section__link {
  font-family: var(--f-mono); font-size: 12px; color: var(--fg-3); letter-spacing: 0.02em;
  transition: color .2s;
}
a.section__link:hover { color: var(--accent); }

/* ========== ABOUT ========== */
.about__grid {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(24px, 4vw, 56px);
}
@media (max-width: 880px) { .about__grid { grid-template-columns: 1fr; } }
.about__copy p { margin: 0 0 16px; color: var(--fg-2); max-width: 64ch; }
.about__copy .lede {
  font-family: var(--f-display);
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.35;
  color: var(--fg); letter-spacing: -0.01em;
  margin-bottom: 24px;
}
html[data-font="serif"] .about__copy .lede { font-style: italic; }
.about__copy b { color: var(--fg); font-weight: 600; }
.inline-link {
  color: var(--accent); border-bottom: 1px dashed var(--accent-soft);
  transition: border-color .2s;
}
.inline-link:hover { border-bottom-color: var(--accent); }

.about__meta { display: grid; gap: 16px; align-content: start; }
.meta-card {
  border: 1px solid var(--line);
  padding: 20px; background: var(--bg-2);
  font-family: var(--f-mono); font-size: 12.5px;
}
.meta-card__h { color: var(--accent); margin-bottom: 12px; font-size: 11.5px; letter-spacing: 0.06em; }
.meta-card__row {
  display: grid; grid-template-columns: 80px 1fr; gap: 12px;
  padding: 6px 0; border-top: 1px dashed var(--line);
}
.meta-card__row:first-of-type { border-top: 0; }
.meta-card__row span { color: var(--fg-3); }
.meta-card__row b { color: var(--fg); font-weight: 500; }
.signals { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; color: var(--fg-2); }
.signals li { display: flex; gap: 10px; align-items: baseline; }
.signals .dot {
  width: 6px; height: 6px; border-radius: 2px; background: var(--accent); flex-shrink: 0; margin-top: 6px;
}

/* ========== XCLOUD ========== */
.xcloud__intro { max-width: 70ch; color: var(--fg-2); margin-bottom: clamp(28px, 4vw, 48px); font-size: 16px; }
.xcloud__diagram { margin-bottom: clamp(28px, 4vw, 56px); }
.arch {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1.4fr 1.1fr 1fr;
  align-items: stretch;
  gap: 0;
  min-height: 300px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  padding: 20px;
  position: relative;
}
@media (max-width: 880px) {
  .arch { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto auto; min-height: 0; gap: 16px; }
  .arch__flow { display: none; }
  .arch__core { grid-column: 1 / -1; }
  .arch__col--right { grid-column: 2; }
}
.arch__col { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; justify-content: center; }
.arch__col--right { align-items: flex-end; }
.arch__h {
  font-family: var(--f-mono); font-size: 10.5px; color: var(--fg-3);
  letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 6px;
}
.pill {
  font-family: var(--f-mono); font-size: 12px; color: var(--fg);
  padding: 5px 10px; border: 1px solid var(--line);
  background: var(--bg);
  transition: all .2s var(--ease);
}
.pill:hover { border-color: var(--accent); color: var(--accent); }
.arch__flow { position: relative; }
.arch__flow svg { width: 100%; height: 100%; display: block; }
.flow-path { fill: none; stroke: var(--accent); stroke-width: 1; opacity: .35; stroke-dasharray: 3 4; }
.arch__core {
  display: flex; align-items: center; justify-content: center;
  padding: 20px; position: relative;
}
.arch__core-inner {
  position: relative;
  border: 1px solid var(--accent);
  padding: 22px 28px;
  background: var(--bg);
  text-align: center;
  z-index: 2;
  box-shadow: 0 0 0 1px var(--bg-2), 0 0 40px -10px var(--accent-soft);
}
.arch__core-label { font-family: var(--f-mono); font-size: 10.5px; color: var(--accent); letter-spacing: 0.14em; text-transform: uppercase; }
.arch__core-title {
  font-family: var(--f-display); font-size: 32px; font-weight: 600; letter-spacing: -0.02em; color: var(--fg); margin-top: 4px;
}
.arch__core-sub { font-family: var(--f-mono); font-size: 11px; color: var(--fg-3); margin-top: 4px; }
.arch__core-ring, .arch__core-ring--2 {
  position: absolute; inset: -14px; border: 1px solid var(--accent-soft); pointer-events: none;
  animation: ringPulse 4s ease-in-out infinite;
}
.arch__core-ring--2 { inset: -28px; animation-delay: 1s; opacity: .5; }
@keyframes ringPulse { 50% { transform: scale(1.02); opacity: .5; } }

.xcloud__pillars {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
}
@media (max-width: 780px) { .xcloud__pillars { grid-template-columns: 1fr; } }
.pillar {
  background: var(--bg-2); padding: 28px;
  transition: background .25s var(--ease);
}
.pillar:hover { background: var(--bg-3); }
.pillar__tag { font-family: var(--f-mono); font-size: 10.5px; color: var(--accent); letter-spacing: 0.14em; margin-bottom: 12px; }
.pillar h3 {
  font-family: var(--f-display); font-size: 22px; font-weight: 600;
  margin: 0 0 10px; letter-spacing: -0.01em; color: var(--fg);
}
html[data-font="serif"] .pillar h3 { font-style: italic; font-weight: 400; }
.pillar p { margin: 0 0 14px; color: var(--fg-2); font-size: 14px; }
.pillar ul {
  list-style: none; margin: 0; padding: 0;
  font-family: var(--f-mono); font-size: 12px; color: var(--fg-3);
  display: grid; gap: 4px;
}
.pillar ul li::before { content: "→ "; color: var(--accent); }

/* ========== STACK ========== */
.stack__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
}
@media (max-width: 880px) { .stack__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .stack__grid { grid-template-columns: 1fr; } }
.stack__col { background: var(--bg-2); padding: 24px; }
.stack__h {
  font-family: var(--f-mono); font-size: 10.5px; color: var(--accent);
  letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 16px;
}
.stack__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.stack__list li {
  display: flex; justify-content: space-between; gap: 12px; padding: 10px 0;
  border-top: 1px dashed var(--line);
  font-family: var(--f-mono); font-size: 13px;
}
.stack__list li:first-child { border-top: 0; }
.stack__list span { color: var(--fg); }
.stack__list i { color: var(--fg-3); font-style: normal; font-size: 11px; }

/* ========== WORK STYLE / FLOW ========== */
.ws__top {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(24px, 4vw, 56px);
  margin-bottom: clamp(36px, 5vw, 64px);
}
@media (max-width: 880px) { .ws__top { grid-template-columns: 1fr; } }
.ws__headline {
  margin: 0;
  font-family: var(--f-display);
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 600; letter-spacing: -0.03em; line-height: 1.05;
  color: var(--fg);
}
html[data-font="serif"] .ws__headline { font-style: italic; font-weight: 400; }
.ws__lede {
  margin: 0; align-self: end;
  font-size: 16px; line-height: 1.55; color: var(--fg-2); max-width: 52ch;
}

.flow {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  background: var(--line);
  position: relative;
  counter-reset: none;
}
@media (max-width: 1100px) { .flow { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .flow { grid-template-columns: 1fr; } }

.flow__step {
  list-style: none;
  background: var(--bg-2);
  padding: 24px 22px 26px;
  position: relative;
  display: flex; flex-direction: column; gap: 10px;
  transition: background .25s var(--ease);
}
.flow__step::marker { content: ""; }
.flow__step:hover { background: var(--bg-3); }

/* Connector arrows between cards */
.flow__step::after {
  content: "";
  position: absolute;
  top: 44px;
  right: -9px;
  width: 16px; height: 16px;
  border-top: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
  transform: rotate(45deg);
  background: var(--bg-2);
  z-index: 2;
  opacity: .7;
}
.flow__step:last-child::after { display: none; }
@media (max-width: 1100px) {
  .flow__step::after { display: none; }
  .flow__step:nth-child(odd):not(:last-child)::after {
    display: block; top: 44px;
  }
}
@media (max-width: 600px) {
  .flow__step::after {
    display: none !important;
  }
  .flow__step:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 50%; bottom: -9px;
    width: 16px; height: 16px;
    border-right: 1px solid var(--accent);
    border-bottom: 1px solid var(--accent);
    transform: translateX(-50%) rotate(45deg);
    background: var(--bg-2);
    z-index: 2;
    opacity: .7;
  }
}

.flow__head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 6px;
}
.flow__num {
  font-family: var(--f-mono);
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.02em;
}
html[data-font="serif"] .flow__num { font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400; font-size: 34px; }
.flow__tag {
  font-family: var(--f-mono); font-size: 10.5px; color: var(--fg-3);
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 3px 8px; border: 1px solid var(--line); background: var(--bg);
}
.flow__step:hover .flow__tag { color: var(--accent); border-color: var(--accent-soft); }

.flow__h {
  margin: 4px 0 4px;
  font-family: var(--f-display);
  font-size: 17px; font-weight: 600; letter-spacing: -0.005em;
  color: var(--fg);
  line-height: 1.25;
}
html[data-font="serif"] .flow__h { font-style: italic; font-weight: 400; font-size: 20px; }
.flow__step p { margin: 0; color: var(--fg-2); font-size: 13.5px; line-height: 1.5; }

/* ========== EXPERIENCE (timeline) ========== */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 140px; top: 10px; bottom: 10px; width: 1px;
  background: linear-gradient(to bottom, transparent, var(--line) 15%, var(--line) 85%, transparent);
}
@media (max-width: 780px) { .timeline::before { left: 8px; } }
.t-item {
  position: relative;
  display: grid; grid-template-columns: 140px 1fr; gap: 32px;
  padding: 16px 0 40px;
}
@media (max-width: 780px) { .t-item { grid-template-columns: 1fr; gap: 4px; padding-left: 32px; } }
.t-marker {
  position: absolute; left: 134px; top: 24px;
  width: 13px; height: 13px; border: 1px solid var(--accent);
  background: var(--bg); transform: rotate(45deg);
  box-shadow: 0 0 0 4px var(--bg);
}
.t-marker::after { content: ""; position: absolute; inset: 3px; background: var(--accent); }
@media (max-width: 780px) { .t-marker { left: 2px; } }
.t-date {
  font-family: var(--f-mono); font-size: 12px; color: var(--accent); letter-spacing: 0.02em;
  padding-top: 24px;
}
@media (max-width: 780px) { .t-date { padding-top: 0; } }
.t-card {
  background: var(--bg-2); border: 1px solid var(--line); padding: 22px;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.t-card:hover { border-color: var(--accent-soft); transform: translateX(2px); }
.t-role {
  font-family: var(--f-display); font-size: 20px; font-weight: 600; color: var(--fg); letter-spacing: -0.01em;
}
html[data-font="serif"] .t-role { font-style: italic; font-weight: 400; }
.t-co { font-family: var(--f-mono); font-size: 13px; color: var(--fg-2); margin: 2px 0 12px; }
.t-tag { color: var(--fg-3); }
.t-card p { margin: 0 0 14px; color: var(--fg-2); font-size: 14px; }
.t-list {
  list-style: none; margin: 0 0 14px; padding: 0;
  font-family: var(--f-mono); font-size: 12.5px; color: var(--fg-2);
  display: grid; gap: 5px;
}
.t-list li::before { content: "→ "; color: var(--accent); }
.t-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.t-tags span {
  font-family: var(--f-mono); font-size: 11px; color: var(--fg-3);
  padding: 3px 8px; border: 1px solid var(--line); background: var(--bg);
}

/* ========== PROJECTS ========== */
.proj {
  background: var(--bg-2); border: 1px solid var(--line); padding: 28px;
  transition: border-color .25s var(--ease);
}
.proj:hover { border-color: var(--accent-soft); }
.proj--flagship {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 32px;
  padding: 36px; position: relative; margin-bottom: 32px;
  background: linear-gradient(135deg, var(--bg-2) 0%, var(--bg-3) 100%);
}
@media (max-width: 880px) { .proj--flagship { grid-template-columns: 1fr; } }
.proj__badge {
  position: absolute; top: -1px; left: 24px;
  background: var(--accent); color: #000;
  font-family: var(--f-mono); font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.14em; padding: 5px 10px; text-transform: uppercase;
}
.proj__meta { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.proj__kind { font-family: var(--f-mono); font-size: 11px; color: var(--accent); letter-spacing: 0.06em; }
.proj__year { font-family: var(--f-mono); font-size: 11px; color: var(--fg-3); }
.proj__title {
  font-family: var(--f-display); font-size: clamp(22px, 2.6vw, 32px); font-weight: 600;
  letter-spacing: -0.02em; margin: 0 0 12px; color: var(--fg);
}
html[data-font="serif"] .proj__title { font-style: italic; font-weight: 400; }
.proj__desc { color: var(--fg-2); margin: 0 0 16px; max-width: 56ch; }
.proj__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.proj__tags span {
  font-family: var(--f-mono); font-size: 11px; color: var(--fg-3);
  padding: 3px 8px; border: 1px solid var(--line); background: var(--bg);
}
.proj__links { display: flex; gap: 16px; font-family: var(--f-mono); font-size: 12px; }
.proj__links a { color: var(--accent); border-bottom: 1px solid var(--accent-soft); padding-bottom: 2px; transition: border-color .2s; }
.proj__links a:hover { border-bottom-color: var(--accent); }

/* flagship visual */
.proj__visual { align-self: stretch; }
.vis-screen {
  height: 100%; background: var(--bg); border: 1px solid var(--line); display: flex; flex-direction: column;
  box-shadow: 0 20px 60px -30px rgba(0,0,0,0.8);
}
.vis-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-bottom: 1px solid var(--line);
  font-family: var(--f-mono); font-size: 11px; color: var(--fg-3);
}
.vis-bar span {
  width: 9px; height: 9px; border-radius: 999px; background: var(--bg-3);
  border: 1px solid var(--line);
}
.vis-bar span:nth-child(1) { background: #ff6b6b33; border-color: #ff6b6b66; }
.vis-bar span:nth-child(2) { background: #ffb02033; border-color: #ffb02066; }
.vis-bar span:nth-child(3) { background: color-mix(in oklab, var(--accent) 25%, transparent); border-color: color-mix(in oklab, var(--accent) 55%, transparent); }
.vis-bar b { font-weight: 400; margin-left: 10px; color: var(--fg-2); }
.vis-body { padding: 10px 0; flex: 1; display: flex; flex-direction: column; }
.vis-row {
  display: grid; grid-template-columns: 14px 1.2fr 1.4fr 90px;
  gap: 10px; align-items: center;
  padding: 10px 14px; border-bottom: 1px dashed var(--line);
  font-family: var(--f-mono); font-size: 12px;
}
.vis-row:last-child { border-bottom: 0; }
.vis-row span:nth-child(2) { color: var(--fg); }
.vis-row i { font-style: normal; color: var(--fg-3); }
.vis-row em {
  font-style: normal; font-size: 10.5px; color: var(--accent); justify-self: end;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.vis-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--fg-3); }
.vis-dot.on { background: var(--accent); box-shadow: 0 0 10px var(--accent-soft); }
.vis-dot.warn { background: var(--warn); }

.proj__grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
}
@media (max-width: 780px) { .proj__grid { grid-template-columns: 1fr; } }
.proj--sm { border: 0; }

/* ========== WRITING ========== */
.writing__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.write {
  display: grid; grid-template-columns: 100px 1fr auto; gap: 24px; align-items: baseline;
  padding: 20px 4px; border-bottom: 1px solid var(--line);
  transition: padding .25s var(--ease), background .2s;
  position: relative;
}
.write:hover { padding-left: 18px; background: var(--bg-2); }
.write::before {
  content: "→"; position: absolute; left: 0; top: 50%; transform: translateY(-50%) translateX(-8px);
  color: var(--accent); opacity: 0; transition: all .25s var(--ease);
  font-family: var(--f-mono);
}
.write:hover::before { transform: translateY(-50%) translateX(0); opacity: 1; }
@media (max-width: 720px) { .write { grid-template-columns: 80px 1fr; } .write__kind { grid-column: 1 / -1; margin-top: -12px; margin-left: 96px; } }
.write__date { font-family: var(--f-mono); font-size: 12px; color: var(--fg-3); letter-spacing: 0.04em; }
.write__t {
  font-family: var(--f-display); font-size: clamp(16px, 1.6vw, 20px); font-weight: 500;
  color: var(--fg); letter-spacing: -0.01em;
  transition: color .2s;
}
html[data-font="serif"] .write__t { font-style: italic; font-weight: 400; }
.write:hover .write__t { color: var(--accent); }
.write__kind { font-family: var(--f-mono); font-size: 11px; color: var(--fg-3); letter-spacing: 0.04em; }
.writing__note { margin-top: 20px; font-family: var(--f-mono); font-size: 12px; }

/* ========== NOW ========== */
.now__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 880px) { .now__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .now__grid { grid-template-columns: 1fr; } }
.now__card { background: var(--bg-2); padding: 22px; }
.now__h { font-family: var(--f-mono); font-size: 10.5px; color: var(--accent); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 10px; }
.now__card p { margin: 0; color: var(--fg-2); font-size: 14px; }
.now__tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.now__tools span {
  font-family: var(--f-mono); font-size: 11px; color: var(--fg-3);
  padding: 3px 8px; border: 1px solid var(--line); background: var(--bg);
}

/* ========== QUOTES ========== */
.quotes__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 880px) { .quotes__grid { grid-template-columns: 1fr; } }
.quote {
  margin: 0; padding: 24px; border: 1px solid var(--line); background: var(--bg-2);
  display: grid; gap: 18px; position: relative;
}
.quote::before {
  content: "“"; position: absolute; top: -6px; right: 14px;
  color: var(--accent); font-family: Georgia, serif; font-size: 56px; line-height: 1;
  opacity: .7;
}
.quote blockquote {
  margin: 0; font-family: var(--f-display); font-size: 17px; line-height: 1.45;
  color: var(--fg); letter-spacing: -0.005em;
}
html[data-font="serif"] .quote blockquote { font-style: italic; }
.quote figcaption { font-family: var(--f-mono); font-size: 12px; color: var(--fg-3); display: grid; gap: 2px; }
.quote figcaption b { color: var(--fg); font-weight: 500; }
.quotes__note { margin-top: 16px; font-family: var(--f-mono); font-size: 12px; }

/* ========== CONTACT ========== */
.contact {
  padding-top: clamp(80px, 12vw, 160px);
  padding-bottom: clamp(80px, 12vw, 160px);
  position: relative;
}
.contact::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 30% 50%, var(--accent-soft), transparent 60%);
  opacity: .5;
}
.contact__inner {
  position: relative;
  display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center;
}
@media (max-width: 880px) { .contact__inner { grid-template-columns: 1fr; } }
.prompt-line {
  font-family: var(--f-mono); font-size: 13px; color: var(--fg-3); margin-bottom: 16px;
}
.contact__title {
  font-family: var(--f-display);
  font-size: clamp(32px, 4.6vw, 64px); font-weight: 600;
  letter-spacing: -0.03em; line-height: 1.05; margin: 0 0 16px; color: var(--fg);
}
html[data-font="serif"] .contact__title { font-style: italic; font-weight: 400; }
.contact__sub { color: var(--fg-2); max-width: 42ch; margin: 0; font-size: 15px; }

.contact__right { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.ccard {
  background: var(--bg-2); padding: 16px 18px;
  display: grid; grid-template-columns: 80px 1fr auto; gap: 16px; align-items: center;
  font-family: var(--f-mono); font-size: 13px;
  transition: background .2s var(--ease);
  position: relative; overflow: hidden;
}
.ccard:hover { background: var(--bg-3); }
.ccard::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--accent); transform: scaleY(0); transform-origin: top; transition: transform .3s var(--ease);
}
.ccard:hover::after { transform: scaleY(1); }
.ccard__h { color: var(--fg-3); letter-spacing: 0.1em; text-transform: uppercase; font-size: 10.5px; }
.ccard__v { color: var(--fg); }
.ccard__arrow { color: var(--accent); transition: transform .25s var(--ease); }
.ccard:hover .ccard__arrow { transform: translate(3px, -3px); }

/* ========== FOOTER ========== */
.foot { border-top: 1px solid var(--line); padding: 20px var(--pad); background: var(--bg-2); }
.foot__row {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: var(--f-mono); font-size: 11.5px; color: var(--fg-3);
}

/* ========== TWEAKS PANEL ========== */
.tweaks {
  position: fixed; right: 16px; bottom: 16px; z-index: 100;
  width: 280px;
  background: var(--bg-2); border: 1px solid var(--line);
  font-family: var(--f-mono); font-size: 12px;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.6);
  animation: slideIn .3s var(--ease);
}
@keyframes slideIn { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.tweaks__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  color: var(--accent); letter-spacing: 0.06em;
}
.tweaks__x { background: transparent; border: 0; color: var(--fg-3); font-size: 18px; cursor: pointer; line-height: 1; padding: 0; }
.tweaks__x:hover { color: var(--fg); }
.tweaks__body { padding: 12px 14px; display: grid; gap: 14px; }
.tw-row { display: grid; gap: 8px; }
.tw-row label { color: var(--fg-3); letter-spacing: 0.06em; text-transform: uppercase; font-size: 10.5px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; border: 1px solid var(--line); }
.seg button {
  appearance: none; background: transparent; border: 0; border-left: 1px solid var(--line);
  color: var(--fg-2); padding: 7px 6px; font: inherit; cursor: pointer;
  transition: all .18s;
}
.seg button:first-child { border-left: 0; }
.seg button:hover { color: var(--fg); }
.seg button.on { background: var(--accent); color: #000; }
.swatches { display: flex; gap: 8px; }
.swatches button {
  width: 26px; height: 26px; border: 1px solid var(--line); background: var(--c);
  cursor: pointer; padding: 0; transition: transform .2s var(--ease);
}
.swatches button:hover { transform: scale(1.1); }
.swatches button.on { outline: 2px solid var(--fg); outline-offset: 2px; }

/* ========== Reveal ========== */
.reveal { opacity: 0; transform: translateY(14px); }
html[data-motion="off"] .reveal { opacity: 1; transform: none; }

/* reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
