/* ==========================================================
   Amal Jood · Portfolio
   ========================================================== */

:root {
  --bg: #F7F5F0;
  --surface: #FFFFFF;
  --surface-2: #FBFAF7;
  --ink: #111318;
  --ink-2: #474C58;
  --ink-3: #868B97;
  --line: #E6E2D8;
  --line-2: #D6D1C4;

  --indigo: #3B5BFF;
  --indigo-soft: #E9EDFF;
  --green: #0E9F6E;
  --green-soft: #DDF4EA;
  --tangerine: #F2672E;
  --tangerine-soft: #FFE9DF;
  --violet: #7A4DF0;
  --violet-soft: #EEE8FF;
  --amber: #D99A0B;
  --amber-soft: #FDF1D3;

  --accent: var(--indigo);
  --accent-soft: var(--indigo-soft);

  --font-sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(17, 19, 24, .04), 0 8px 24px -12px rgba(17, 19, 24, .12);
  --shadow-lg: 0 2px 4px rgba(17, 19, 24, .04), 0 24px 48px -20px rgba(17, 19, 24, .22);

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

/* Per-project accent themes */
.theme-indigo { --accent: var(--indigo); --accent-soft: var(--indigo-soft); }
.theme-green { --accent: var(--green); --accent-soft: var(--green-soft); }
.theme-tangerine { --accent: var(--tangerine); --accent-soft: var(--tangerine-soft); }
.theme-violet { --accent: var(--violet); --accent-soft: var(--violet-soft); }
.theme-amber { --accent: var(--amber); --accent-soft: var(--amber-soft); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; font-weight: 600; }
p { margin: 0; }
em.serif, .serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-tight { padding: clamp(48px, 7vw, 80px) 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 { font-size: clamp(34px, 5vw, 56px); margin-top: 16px; }
.section-head p { color: var(--ink-2); font-size: 19px; margin-top: 18px; max-width: 640px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 600; font-size: 15px;
  text-decoration: none;
  border: 1px solid var(--ink);
  transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -0.02em; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--ink); color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-serif); font-style: italic; font-size: 19px; font-weight: 400;
}
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { text-decoration: none; font-size: 15px; color: var(--ink-2); font-weight: 500; }
.nav-links a:hover { color: var(--ink); }
.nav-links .btn { padding: 10px 18px; color: #fff; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: transform .2s; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: 68px 0 auto 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
    transform: translateY(-120%); transition: transform .3s ease;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 12px 0; font-size: 17px; width: 100%; }
  .nav-links .btn { margin-top: 8px; width: auto; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 96px); position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(42px, 6.6vw, 84px); line-height: 1.02; letter-spacing: -0.035em; }
.hero h1 .serif { color: var(--indigo); }
.hero-lead { font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); margin-top: 26px; max-width: 580px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-status {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line);
  padding: 7px 14px 7px 10px; border-radius: 999px;
  font-size: 13.5px; color: var(--ink-2); margin-bottom: 26px;
}
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--green); position: relative; }
.pulse::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--green); opacity: 0; animation: pulse 2s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }

.hero-visual { position: relative; }
.portrait {
  position: relative;
  background: #fff;
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.portrait::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 30%;
  background: linear-gradient(to top, rgba(255,255,255,.85), transparent);
}
.chip {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; line-height: 1.3; color: var(--ink-2);
  animation: float 6s ease-in-out infinite;
  white-space: nowrap;
}
.chip strong { display: block; font-family: var(--font-mono); font-size: 15px; color: var(--ink); font-weight: 600; }
.chip-dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.chip-dot svg { width: 18px; height: 18px; }
.chip-1 { top: 8%; left: -14%; }
.chip-2 { top: 42%; right: -12%; animation-delay: -2s; }
.chip-3 { bottom: 9%; left: -10%; animation-delay: -4s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 420px; margin: 12px auto 0; width: 100%; }
  .chip-1 { left: -4%; }
  .chip-2 { right: -4%; }
  .chip-3 { left: 2%; }
}
@media (max-width: 480px) {
  .chip { padding: 9px 11px; font-size: 12px; }
  .chip strong { font-size: 13px; }
  .chip-dot { width: 28px; height: 28px; }
  .chip-1 { left: -2%; }
  .chip-2 { right: -2%; }
}

/* ---------- Metrics band ---------- */
.metrics { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.metrics-grid { display: grid; grid-template-columns: repeat(5, 1fr); }
.metric { padding: 34px 24px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric-value { font-family: var(--font-mono); font-size: clamp(28px, 3.4vw, 40px); font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.metric-value .unit { color: var(--ink-3); font-size: .6em; margin-left: 2px; }
.metric-label { color: var(--ink-2); font-size: 14.5px; margin-top: 12px; line-height: 1.4; }
@media (max-width: 960px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .metric { border-bottom: 1px solid var(--line); }
  .metric:nth-child(2n) { border-right: 0; }
  .metric:last-child { grid-column: 1 / -1; border-bottom: 0; }
}

/* ---------- Approach ---------- */
.approach-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; position: relative; }
.step {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px 26px; position: relative;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.step-num { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.step-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin: 18px 0 18px; background: var(--accent-soft); color: var(--accent); }
.step-icon svg { width: 22px; height: 22px; }
.step h3 { font-size: 19px; }
.step p { color: var(--ink-2); font-size: 15px; margin-top: 10px; line-height: 1.5; }
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 46px; right: -12px; width: 10px; height: 10px;
  border-top: 2px solid var(--line-2); border-right: 2px solid var(--line-2);
  transform: rotate(45deg); z-index: 2;
}
@media (max-width: 1060px) {
  .approach-grid { grid-template-columns: repeat(2, 1fr); }
  .step::after { display: none; }
  .step:last-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) { .approach-grid { grid-template-columns: 1fr; } }

.proof-note {
  margin-top: 22px; display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: var(--radius);
  padding: 18px 20px; color: var(--ink-2); font-size: 15.5px;
}
.proof-note svg { flex: none; width: 22px; height: 22px; color: var(--indigo); margin-top: 1px; }

/* ---------- Work cards ---------- */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.work-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px;
  padding: clamp(24px, 3vw, 34px);
  text-decoration: none;
  position: relative; overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.work-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform .4s ease;
}
.work-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.work-card:hover::before { transform: scaleX(1); }
.work-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft);
  padding: 6px 10px; border-radius: 999px; font-weight: 600;
}
.work-arrow {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line);
  display: grid; place-items: center; flex: none;
  transition: background .25s ease, color .25s ease, transform .25s ease, border-color .25s;
}
.work-card:hover .work-arrow { background: var(--accent); color: #fff; border-color: var(--accent); transform: rotate(-45deg); }
.work-card h3 { font-size: clamp(24px, 2.6vw, 30px); margin-top: 22px; }
.work-card .problem { color: var(--ink-2); margin-top: 12px; font-size: 16px; }
.work-figure { display: flex; gap: 28px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.work-figure div { min-width: 90px; }
.work-figure strong { font-family: var(--font-mono); font-size: 24px; display: block; letter-spacing: -0.03em; color: var(--ink); line-height: 1.1; }
.work-figure span { font-size: 13px; color: var(--ink-3); }
.mini-flow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 24px; }
.mini-flow span {
  font-size: 12.5px; padding: 6px 10px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); font-weight: 500;
}
.mini-flow span.hl { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 600; }
.mini-flow i { width: 14px; height: 1.5px; background: var(--line-2); position: relative; font-style: normal; }
.mini-flow i::after { content: ""; position: absolute; right: -1px; top: -3px; border: 3.5px solid transparent; border-left: 5px solid var(--line-2); border-right: 0; }
.work-card .spacer { flex: 1; }
@media (max-width: 860px) { .work-grid { grid-template-columns: 1fr; } }

/* ---------- More systems ---------- */
.more-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.more-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column; gap: 10px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.more-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.more-card .big { font-family: var(--font-mono); font-size: 22px; font-weight: 600; letter-spacing: -0.03em; color: var(--accent); }
.more-card h4 { font-size: 16.5px; line-height: 1.3; }
.more-card p { color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.more-card .tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.more-card .tools span { font-size: 11.5px; font-family: var(--font-mono); color: var(--ink-3); border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; }
.more-grid.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1060px) { .more-grid, .more-grid.grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .more-grid, .more-grid.grid-3 { grid-template-columns: 1fr; } }

/* ---------- Experience ---------- */
.timeline { position: relative; }
.role {
  display: grid; grid-template-columns: 220px 1fr; gap: 32px;
  padding: 34px 0; border-top: 1px solid var(--line);
}
.role:last-child { border-bottom: 1px solid var(--line); }
.role-when { font-family: var(--font-mono); font-size: 13.5px; color: var(--ink-3); padding-top: 4px; }
.role-when .now { display: inline-block; margin-top: 8px; font-size: 11px; color: var(--green); background: var(--green-soft); padding: 3px 8px; border-radius: 999px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.role h3 { font-size: 23px; }
.role .org { color: var(--ink-2); margin-top: 6px; font-size: 16px; }
.role ul { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.role li { position: relative; padding-left: 22px; color: var(--ink-2); font-size: 16px; }
.role li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 2px; background: var(--accent); }
.role li b { color: var(--ink); font-weight: 600; }
@media (max-width: 760px) { .role { grid-template-columns: 1fr; gap: 10px; } }

/* ---------- Toolkit ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tool-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.tool-group h4 { font-size: 15px; display: flex; align-items: center; gap: 10px; }
.tool-group h4 i { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }
.tool-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tool-list span { font-size: 14px; padding: 7px 12px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
@media (max-width: 960px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .tool-grid { grid-template-columns: 1fr; } }

/* ---------- Recognition ---------- */
.awards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.award { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 26px 22px; position: relative; overflow: hidden; }
.award::after { content: ""; position: absolute; width: 140px; height: 140px; right: -50px; top: -50px; border-radius: 50%; background: var(--accent); opacity: .35; filter: blur(8px); }
.award .yr { font-family: var(--font-mono); font-size: 12px; color: rgba(255,255,255,.55); }
.award h4 { font-size: 18px; margin-top: 30px; line-height: 1.25; position: relative; z-index: 1; }
.award p { color: rgba(255,255,255,.65); font-size: 14px; margin-top: 8px; position: relative; z-index: 1; }
.certs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.certs span { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; padding: 9px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }
.certs span svg { width: 16px; height: 16px; color: var(--green); }
@media (max-width: 960px) { .awards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .awards { grid-template-columns: 1fr; } }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.about-photo { border-radius: 24px; overflow: hidden; background: #fff; border: 1px solid var(--line); aspect-ratio: 4/5; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.about-text h2 { font-size: clamp(32px, 4.4vw, 50px); margin-top: 16px; }
.about-text p { color: var(--ink-2); font-size: 18px; margin-top: 20px; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 28px; }
.fact { border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 14px 16px; }
.fact span { display: block; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.fact strong { display: block; margin-top: 4px; font-size: 15.5px; font-weight: 600; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } .about-photo { max-width: 380px; } }

/* ---------- Contact ---------- */
.contact {
  background: var(--ink); color: #fff; border-radius: 32px;
  padding: clamp(40px, 7vw, 88px);
  position: relative; overflow: hidden;
}
.contact::before {
  content: ""; position: absolute; width: 520px; height: 520px; right: -160px; bottom: -260px;
  background: radial-gradient(circle, rgba(59,91,255,.55), transparent 65%);
}
.contact::after {
  content: ""; position: absolute; width: 380px; height: 380px; left: -120px; top: -200px;
  background: radial-gradient(circle, rgba(242,103,46,.35), transparent 65%);
}
.contact > * { position: relative; z-index: 1; }
.contact h2 { font-size: clamp(36px, 6vw, 72px); max-width: 820px; letter-spacing: -0.035em; }
.contact h2 .serif { color: #9DB0FF; }
.contact p { color: rgba(255,255,255,.7); font-size: 19px; margin-top: 20px; max-width: 560px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.contact .btn-primary { background: #fff; color: var(--ink); border-color: #fff; }
.contact .btn-ghost { color: #fff; border-color: rgba(255,255,255,.3); }
.contact .btn-ghost:hover { border-color: #fff; }

/* ---------- Footer ---------- */
.footer { padding: 36px 0 48px; color: var(--ink-3); font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer a { text-decoration: none; color: var(--ink-2); }
.footer a:hover { color: var(--ink); }

/* ==========================================================
   Case study pages
   ========================================================== */
.cs-hero { padding: clamp(36px, 6vw, 72px) 0 clamp(40px, 6vw, 64px); }
.back { display: flex; width: fit-content; align-items: center; gap: 8px; font-size: 14.5px; color: var(--ink-2); text-decoration: none; margin-bottom: 34px; }
.back:hover { color: var(--ink); }
.cs-hero h1 { font-size: clamp(40px, 6vw, 76px); letter-spacing: -0.035em; margin-top: 22px; max-width: 980px; }
.cs-hero h1 .serif { color: var(--accent); }
.cs-lead { font-size: clamp(18px, 2vw, 22px); color: var(--ink-2); margin-top: 22px; max-width: 760px; }
.cs-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 44px; border-top: 1px solid var(--line); }
.cs-meta div { padding: 20px 20px 0 0; }
.cs-meta span { display: block; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.cs-meta strong { display: block; margin-top: 6px; font-size: 15.5px; font-weight: 600; line-height: 1.4; }
@media (max-width: 760px) { .cs-meta { grid-template-columns: repeat(2, 1fr); } }

.figures { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.figure {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px;
}
.figure strong { display: block; font-family: var(--font-mono); font-size: clamp(30px, 3.6vw, 42px); font-weight: 600; letter-spacing: -0.04em; line-height: 1; color: var(--accent); }
.figure span { display: block; margin-top: 12px; color: var(--ink-2); font-size: 15px; line-height: 1.4; }
.figure.dark { background: var(--ink); border-color: var(--ink); }
.figure.dark strong { color: #fff; }
.figure.dark span { color: rgba(255,255,255,.7); }
@media (max-width: 960px) { .figures { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px) { .figures { grid-template-columns: 1fr; } }

.cs-block { padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--line); }
.cs-block-head { display: grid; grid-template-columns: 280px 1fr; gap: 32px; margin-bottom: 36px; }
.cs-block-head h2 { font-size: clamp(28px, 3.6vw, 40px); }
.cs-block-head p { color: var(--ink-2); font-size: 18px; max-width: 680px; }
@media (max-width: 860px) { .cs-block-head { grid-template-columns: 1fr; gap: 14px; } }

.pains { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pain { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.pain .ico { width: 40px; height: 40px; border-radius: 11px; background: #FDECEC; color: #D64545; display: grid; place-items: center; }
.pain .ico svg { width: 20px; height: 20px; }
.pain h4 { font-size: 17.5px; margin-top: 18px; }
.pain p { color: var(--ink-2); font-size: 15px; margin-top: 8px; line-height: 1.5; }
.pains.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .pains, .pains.grid-2 { grid-template-columns: 1fr; } }

/* ---------- Before / after ---------- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.compare-col { border-radius: 22px; padding: clamp(22px, 3vw, 32px); border: 1px solid var(--line); background: var(--surface); }
.compare-col.after { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.compare-col h3 { font-size: 20px; display: flex; align-items: center; gap: 10px; }
.compare-col h3 small { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; padding: 4px 8px; border-radius: 999px; }
.compare-col.before h3 small { background: #FDECEC; color: #C23A3A; }
.compare-col.after h3 small { background: var(--accent-soft); color: var(--accent); }
.compare-col ol { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; counter-reset: c; }
.compare-col li { counter-increment: c; display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; font-size: 15px; color: var(--ink-2); line-height: 1.45; }
.compare-col li::before { content: counter(c); width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-family: var(--font-mono); font-size: 12px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-3); }
.compare-col.after li::before { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.compare-col li b { color: var(--ink); font-weight: 600; }
.compare-col li .who { display: inline-block; margin-left: 6px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.compare-col li .who.ai { color: var(--accent); }
.compare-foot { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line-2); font-size: 14px; color: var(--ink-2); }
@media (max-width: 860px) { .compare { grid-template-columns: 1fr; } }

/* ---------- Revenue chain ---------- */
.chain { display: flex; align-items: stretch; gap: 0; }
.chain > div { flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.chain > div b { display: block; font-family: var(--font-mono); font-size: 12px; color: var(--accent); letter-spacing: .06em; text-transform: uppercase; }
.chain > div h4 { font-size: 17px; margin-top: 10px; line-height: 1.3; }
.chain > div p { font-size: 14.5px; color: var(--ink-2); margin-top: 6px; line-height: 1.45; }
.chain > i { flex: 0 0 34px; display: grid; place-items: center; color: var(--ink-3); font-style: normal; font-size: 20px; }
.chain > div.end { background: var(--ink); border-color: var(--ink); }
.chain > div.end h4 { color: #fff; }
.chain > div.end p { color: rgba(255,255,255,.7); }
@media (max-width: 860px) { .chain { flex-direction: column; } .chain > i { transform: rotate(90deg); padding: 4px 0; } }

.work-card.wide { grid-column: 1 / -1; }
.work-card.wide .wide-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: end; }
@media (max-width: 860px) { .work-card.wide .wide-grid { grid-template-columns: 1fr; gap: 0; } }

/* ---------- Freelance cards (quieter than main work) ---------- */
.fl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.fl-card {
  display: flex; flex-direction: column; text-decoration: none;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 18px;
  padding: 22px 24px; transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.fl-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); background: var(--surface); }
.fl-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.fl-card .work-arrow { width: 34px; height: 34px; font-size: 14px; }
.fl-card:hover .work-arrow { background: var(--accent); color: #fff; border-color: var(--accent); transform: rotate(-45deg); }
.fl-card h3 { font-size: 20px; margin-top: 16px; }
.fl-card p { color: var(--ink-2); font-size: 15px; margin-top: 8px; line-height: 1.5; }
.fl-stats { display: flex; gap: 22px; flex-wrap: wrap; margin-top: auto; padding-top: 16px; }
.fl-stats strong { display: block; font-family: var(--font-mono); font-size: 17px; letter-spacing: -0.02em; color: var(--accent); line-height: 1.2; }
.fl-stats span { font-size: 12.5px; color: var(--ink-3); }
@media (max-width: 760px) { .fl-grid { grid-template-columns: 1fr; } }

/* ---------- Growth ladder (3 years) ---------- */
.ladder { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: end; }
.rung { border-radius: 20px; padding: 24px; border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; }
.rung .yr { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.rung .rung-role { font-size: 13px; font-weight: 600; margin-top: 6px; color: var(--accent); }
.rung h4 { font-size: 21px; margin-top: 16px; line-height: 1.2; }
.rung p { color: var(--ink-2); font-size: 15px; margin-top: 8px; line-height: 1.5; }
.rung .venue { margin-top: auto; padding-top: 18px; display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.rung .venue i { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }
.rung.r1 { min-height: 230px; }
.rung.r2 { min-height: 290px; }
.rung.r3 { min-height: 360px; background: var(--ink); border-color: var(--ink); }
.rung.r3 .yr { color: rgba(255,255,255,.55); }
.rung.r3 .rung-role { color: #FFB38F; }
.rung.r3 h4 { color: #fff; }
.rung.r3 p, .rung.r3 .venue { color: rgba(255,255,255,.72); }
@media (max-width: 860px) { .ladder { grid-template-columns: 1fr; } .rung.r1, .rung.r2, .rung.r3 { min-height: 0; } }

a.fact { text-decoration: none; transition: border-color .2s ease, transform .2s ease; }
a.fact:hover { border-color: var(--ink); transform: translateY(-2px); }
a.fact em { display: block; font-style: normal; font-size: 12.5px; color: var(--tangerine); margin-top: 4px; font-weight: 600; }

/* ---------- Screenshots ---------- */
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.shot { margin: 0; }
.shot-frame {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 10px; box-shadow: var(--shadow-lg);
}
.shot-frame img { border-radius: 10px; width: 100%; height: auto; border: 1px solid var(--line); }
.shot figcaption { color: var(--ink-2); font-size: 15px; margin-top: 14px; line-height: 1.5; }
.shot figcaption b { color: var(--ink); }
@media (max-width: 860px) { .shots { grid-template-columns: 1fr; } }

/* ---------- Flow diagram ---------- */
.flow-wrap {
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px;
  padding: clamp(20px, 3vw, 36px);
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 18px 18px;
}
.flow { display: flex; align-items: stretch; gap: 0; }
.flow-col { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.flow-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.node {
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px;
  padding: 10px 12px; font-size: 13.5px; font-weight: 500; line-height: 1.35;
  box-shadow: 0 1px 0 rgba(17,19,24,.03);
}
.node small { display: block; color: var(--ink-3); font-weight: 400; font-size: 12px; margin-top: 2px; }
.node.hl { background: var(--accent); color: #fff; border-color: var(--accent); }
.node.hl small { color: rgba(255,255,255,.75); }
.node.soft { background: var(--accent-soft); border-color: transparent; color: var(--ink); }
.node.human { border-style: dashed; border-color: var(--ink-3); }
.flow-arrow { flex: 0 0 38px; display: flex; align-items: center; justify-content: center; position: relative; }
.flow-arrow::before { content: ""; position: absolute; left: 6px; right: 8px; top: 50%; height: 2px; background: var(--line-2); }
.flow-arrow::after { content: ""; position: absolute; right: 4px; top: calc(50% - 5px); border: 5px solid transparent; border-left: 7px solid var(--line-2); border-right: 0; }
.flow-arrow i { position: absolute; top: calc(50% - 3px); left: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: packet 1.8s linear infinite; }
@keyframes packet { from { left: 6px; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } to { left: calc(100% - 14px); opacity: 0; } }
.flow-foot { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--line-2); display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; color: var(--ink-2); }
.flow-foot span { display: inline-flex; align-items: center; gap: 8px; }
.flow-foot i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
@media (max-width: 900px) {
  .flow { flex-direction: column; }
  .flow-arrow { flex: 0 0 34px; }
  .flow-arrow::before { left: 50%; right: auto; top: 4px; bottom: 8px; width: 2px; height: auto; }
  .flow-arrow::after { right: auto; left: calc(50% - 5px); top: auto; bottom: 3px; border: 5px solid transparent; border-top: 7px solid var(--line-2); border-bottom: 0; }
  .flow-arrow i { left: calc(50% - 3px); animation-name: packet-v; }
  .flow-col.row-mobile { flex-direction: row; flex-wrap: wrap; }
  .flow-col.row-mobile .flow-label { width: 100%; }
  .flow-col.row-mobile .node { flex: 1 1 calc(50% - 8px); }
}
@keyframes packet-v { from { top: 4px; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } to { top: calc(100% - 12px); opacity: 0; } }

/* ---------- Steps list ---------- */
.steps { display: grid; gap: 0; counter-reset: s; }
.steps li { list-style: none; display: grid; grid-template-columns: 64px 1fr; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.steps li:first-child { border-top: 1px solid var(--line); }
.steps { padding: 0; margin: 0; }
.steps .n {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-family: var(--font-mono); font-weight: 600; font-size: 14px;
}
.steps h4 { font-size: 18px; }
.steps p { color: var(--ink-2); font-size: 16px; margin-top: 6px; }

/* ---------- Decisions ---------- */
.decisions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.decision { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 24px 26px; display: grid; grid-template-columns: 40px 1fr; gap: 16px; }
.decision .ico { width: 40px; height: 40px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.decision .ico svg { width: 20px; height: 20px; }
.decision h4 { font-size: 17.5px; line-height: 1.3; }
.decision p { color: var(--ink-2); font-size: 15px; margin-top: 8px; line-height: 1.55; }
@media (max-width: 860px) { .decisions { grid-template-columns: 1fr; } }

/* ---------- Pills / states ---------- */
.states { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.state { border-radius: 14px; padding: 16px 18px; border: 1px solid var(--line); background: var(--surface); }
.state b { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 13px; }
.state b i { width: 10px; height: 10px; border-radius: 50%; }
.state p { color: var(--ink-2); font-size: 14px; margin-top: 8px; line-height: 1.45; }
@media (max-width: 860px) { .states { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .states { grid-template-columns: 1fr; } }

/* ---------- Formula / confidence ---------- */
.formula {
  background: var(--ink); color: #fff; border-radius: 20px; padding: clamp(22px, 3vw, 34px);
  font-family: var(--font-mono); font-size: clamp(14px, 1.8vw, 19px); line-height: 1.7;
  overflow-x: auto;
}
.formula .k { color: #C5B3FF; }
.formula .c { color: rgba(255,255,255,.45); }
.formula-legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.formula-legend div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.formula-legend b { font-family: var(--font-mono); font-size: 13px; color: var(--accent); }
.formula-legend p { color: var(--ink-2); font-size: 14.5px; margin-top: 6px; line-height: 1.45; }
@media (max-width: 760px) { .formula-legend { grid-template-columns: 1fr; } }

.bar { display: flex; height: 54px; border-radius: 14px; overflow: hidden; margin-top: 8px; }
.bar div { display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--font-mono); font-size: 13px; font-weight: 600; min-width: 0; transition: flex .8s ease; }
.bar-legend { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 14px; }
.bar-legend div { font-size: 13.5px; color: var(--ink-2); line-height: 1.35; }
.bar-legend b { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.bar-legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
@media (max-width: 760px) { .bar-legend { grid-template-columns: repeat(2, 1fr); } .bar div span { display: none; } }

/* ---------- Transfer ---------- */
.transfer { background: var(--accent-soft); border-radius: 24px; padding: clamp(26px, 4vw, 44px); display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; align-items: center; }
.transfer h3 { font-size: clamp(24px, 3vw, 34px); }
.transfer p { color: var(--ink-2); margin-top: 12px; }
.transfer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.transfer li { background: var(--surface); border-radius: 999px; padding: 10px 16px; font-size: 15px; font-weight: 500; box-shadow: var(--shadow); }
@media (max-width: 860px) { .transfer { grid-template-columns: 1fr; } }

.stack { display: flex; flex-wrap: wrap; gap: 8px; }
.stack span { font-family: var(--font-mono); font-size: 13px; padding: 8px 12px; border-radius: 9px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }

/* ---------- Next project ---------- */
.next {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: clamp(28px, 4vw, 44px); border-radius: 24px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line);
  transition: transform .3s ease, box-shadow .3s ease;
}
.next:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.next span { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.next h3 { font-size: clamp(24px, 3.4vw, 38px); margin-top: 8px; }
.next .work-arrow { width: 56px; height: 56px; }
.next:hover .work-arrow { background: var(--accent); color: #fff; border-color: var(--accent); transform: rotate(-45deg); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; } .reveal-d2 { transition-delay: .16s; } .reveal-d3 { transition-delay: .24s; } .reveal-d4 { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
