/* =========================================================
   Skyla Urman — portfolio
   Olive marks engineering and systems, coral marks action and
   creativity, off-white is for reading. Everything else is restraint.
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  /* color */
  --ground: #121311;
  --ground-alt: #141612;
  --surface: #1A1C18;
  --line: #2E322B;
  --line-soft: #22251F;
  --line-strong: #3A3F37;
  --deepest: #0E0F0D;
  --olive: #8B9A5B;
  --olive-deep: #5F6B3B;
  --coral: #F2715A;
  --ink: #F3EFE4;
  --text: #C9C6BA;
  --muted: #A9A79D;
  --caption: #8F8E85;

  /* type */
  --font-display: Syne, ui-sans-serif, system-ui, sans-serif;
  --font-body: Manrope, ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --dur-press: 160ms;
  --dur-color: 180ms;

  /* layout */
  --content: 1280px;
  --gutter: clamp(20px, 5vw, 80px);
  --header-h: 76px;
  --radius-card: 20px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; color-scheme: dark; scrollbar-color: var(--line-strong) var(--ground); }
html.menu-open { overflow: hidden; }
/* taps fire at once (no double-tap-zoom wait); control labels don't get selected on long-press */
a, button, select, summary, label { touch-action: manipulation; }
button, .btn, .toggle, .shot-btn, .shot-pill, .menu-btn, .tally-pill { -webkit-user-select: none; user-select: none; }
::selection { background: var(--coral); color: var(--ground); }
body {
  margin: 0;
  background: var(--ground);
  background-image: radial-gradient(#262a24 1.2px, transparent 1.2px);
  background-size: 28px 28px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--coral);
  accent-color: var(--coral);
}
h1, h2, h3, p, blockquote, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
a { color: var(--coral); }
a.btn-p, a.btn-s { color: var(--ground); }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 4px; }
/* Sections land flush under the sticky header; their own padding gives the breathing room.
   Any extra offset here exposes the bottom of the previous section. */
main [id] { scroll-margin-top: calc(var(--header-h) + 16px); }
main section[id] { scroll-margin-top: var(--header-h); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--ink); color: var(--ground); font-weight: 700;
  padding: 10px 16px; border-radius: 999px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Type ---------- */
.display-xl, .display-l, .display-m, .display-s, .display-xs, .display-contact, .display-confirm, .brand-name, .svc-num {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
p, li, dd, blockquote { text-wrap: pretty; }
.display-xl { font-size: clamp(46px, min(6vw, 9.4vh), 84px); line-height: .98; font-weight: 800; max-width: 720px; }
.display-l { font-size: clamp(32px, min(4vw, 6vh), 52px); line-height: 1.02; font-weight: 700; }
.display-contact { font-size: clamp(30px, min(3.2vw, 5vh), 46px); line-height: 1.02; font-weight: 800; letter-spacing: -0.025em; }
.display-m { font-size: clamp(24px, 2.6vw, 36px); line-height: 1.05; font-weight: 700; }
.display-s { font-size: clamp(22px, 2vw, 26px); line-height: 1.1; font-weight: 700; }
.display-xs { font-size: 24px; line-height: 1.2; font-weight: 700; }
.display-confirm { font-size: clamp(26px, 2.4vw, 32px); line-height: 1.05; font-weight: 700; }
.display-confirm:focus { outline: none; }

.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.mono.plain { text-transform: none; letter-spacing: 0; }
.eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--olive); }
.lead { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.6; color: var(--text); }
.dim-lead { color: var(--muted); }
.body-text { font-size: 16px; line-height: 1.65; color: var(--muted); }
.dim { color: var(--muted); }
.muted { color: var(--caption); }
.olive { color: var(--olive); }
.coral { color: var(--coral); }
.todo { color: var(--caption); }

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--content); margin: 0 auto; width: 100%;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
/* Each section aims to fit one screen under the header when the nav jumps to it,
   so its spacing follows the window's height as well as its width. */
.section { border-top: 1px solid var(--line-soft); padding-block: clamp(52px, 10vh, 96px); }
.section--alt { background: var(--ground-alt); }
.split { display: grid; gap: 64px; align-items: start; }
.split-5-7 { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.split-6-6 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 32px 56px; flex-wrap: wrap; }
/* the heading stops short of full width so the intro sits beside it instead of under it */
.section-head > :first-child { flex: 1 1 520px; max-width: 720px; }
.section-aside { flex: 0 1 360px; max-width: 360px; }
.stack-6, .stack-8, .stack-16, .stack-18, .stack-20, .stack-24, .stack-28, .stack-56, .stack-64, .stack-72 { display: flex; flex-direction: column; }
.stack-6 { gap: 6px; } .stack-8 { gap: 8px; } .stack-16 { gap: 16px; } .stack-18 { gap: 18px; } .stack-20 { gap: 20px; }
.stack-24 { gap: clamp(16px, 2.7vh, 24px); } .stack-28 { gap: clamp(18px, 3.1vh, 28px); }
.stack-56 { gap: clamp(28px, 6vh, 56px); } .stack-64 { gap: clamp(32px, 7vh, 64px); } .stack-72 { gap: clamp(36px, 8vh, 72px); }
.measure-440 { max-width: 440px; } .measure-480 { max-width: 480px; } .measure-520 { max-width: 520px; }
.measure-640 { max-width: 640px; } .measure-760 { max-width: 760px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.card { background: var(--ground); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 28px; }

/* ---------- Brand mark ---------- */
.logo {
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--surface); border: 1px solid var(--line-strong);
  color: var(--ink); font: 800 19px/1 var(--font-display); letter-spacing: -0.02em; padding-right: 9px;
}
.logo-dot { position: absolute; right: 7px; bottom: 11px; width: 5px; height: 5px; border-radius: 999px; background: var(--coral); }
.logo--sm { width: 28px; height: 28px; border-radius: 8px; font-size: 14px; padding-right: 7px; }
.logo--sm .logo-dot { right: 5px; bottom: 8px; width: 4px; height: 4px; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 26px; border-radius: 999px;
  font: 700 16px/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-color) ease, color var(--dur-color) ease, border-color var(--dur-color) ease;
}
.btn-p { background: var(--coral); color: var(--ground); border: 0; }
.btn-g { background: transparent; color: var(--ink); border: 1.5px solid var(--line-strong); font-weight: 600; padding: 0 24px; }
.btn-s { background: var(--ink); color: var(--ground); border: 0; font-size: 14px; min-height: 40px; padding: 0 18px; }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: 14px; }
.btn-mono { font-family: var(--font-mono); font-weight: 500; letter-spacing: .04em; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: .7; cursor: default; transform: none; }

.navlink { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 2px; transition: color var(--dur-color) ease; }
.tlink { color: var(--ink); text-decoration: none; font-weight: 600; border-bottom: 1.5px solid var(--coral); padding-bottom: 2px; transition: color var(--dur-color) ease; }

/* press feedback for links, on every input */
.navlink:active, .mmenu a:active { color: var(--ink); opacity: .7; }
.tlink:active { color: var(--coral); }

@media (hover: hover) and (pointer: fine) {
  a:where(:not(.btn)):hover { color: var(--ink); }
  .navlink:hover { color: var(--ink); }
  .tlink:hover { color: var(--coral); }
  .form-note a:hover { color: var(--ink); }
  .btn-p:not(:disabled):hover { background: var(--ink); transform: translateY(-2px); }
  .btn-g:not(:disabled):hover { border-color: var(--olive); color: var(--ink); transform: translateY(-2px); }
  .btn-s:hover { background: var(--coral); }
  .btn-tally:not(:disabled):hover { background: var(--t-ink); transform: translateY(-2px); }
  .toggle:not(.on):hover { color: var(--ink); }
  .proj:hover .shot { transform: translateY(-6px); }
  .proj:hover .shot.is-live { transform: none; }
  .shot-btn:hover { color: var(--ink); border-color: var(--olive); }
  .shot-cover:hover .shot-pill { background: var(--coral); color: var(--ground); border-color: var(--coral); }
  .svc:hover { background: var(--surface); }
}
/* the press always wins over the hover lift */
.btn:not(:disabled):active, .toggle:active { transform: scale(0.97); }

/* ---------- Status dot ---------- */
.status-tag { display: inline-flex; align-items: center; gap: 8px; color: var(--olive); }
.pulse, .blink { width: 7px; height: 7px; border-radius: 999px; background: var(--olive); display: inline-block; flex: none; }
.pulse { animation: pulse 2.4s ease-in-out infinite; }
.site-header .pulse { animation-iteration-count: 3; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(18, 19, 17, .86);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-name { font-weight: 700; font-size: 18px; white-space: nowrap; }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-actions { display: flex; align-items: center; gap: 20px; }
.menu-btn {
  display: none; width: 44px; height: 44px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  align-items: center; justify-content: center; cursor: pointer;
}

/* mobile menu: always in the DOM so it can animate out */
.mmenu {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--ground); border-bottom: 1px solid var(--line-soft);
  padding: 8px max(var(--gutter), env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) max(var(--gutter), env(safe-area-inset-left, 0px));
  height: calc(100svh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain;
  opacity: 0; transform: translateY(-8px); visibility: hidden;
  transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out), visibility 0s linear 150ms;
}
.mmenu.open {
  opacity: 1; transform: none; visibility: visible;
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out), visibility 0s;
}
.mmenu ul { display: flex; flex-direction: column; gap: 4px; }
.mmenu a { display: block; padding: 16px 4px; color: var(--ink); text-decoration: none; font: 600 26px var(--font-display); letter-spacing: -0.02em; border-bottom: 1px solid var(--line-soft); }
.mmenu .status-tag { padding: 14px 4px 0; }

/* ---------- Hero ---------- */
.hero { padding-block: 40px 72px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 28px; }
.hero-meta { color: var(--caption); display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-meta .sep { color: var(--line-strong); }
.hero-lead { font-size: 19px; line-height: 1.6; color: var(--text); max-width: 560px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; padding-top: 6px; }
.hero-art { position: relative; width: 100%; max-width: 560px; aspect-ratio: 560 / 540; justify-self: end; }
.hero-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.art-label { position: absolute; margin: 0; }
.art-in { left: 8.6%; top: 16.9%; color: var(--olive); }
.art-out { right: 0; top: 1%; color: var(--coral); text-align: right; }
.art-fig { left: 8.6%; bottom: 0; color: var(--caption); }

/* entrance: once per visit */
.fade { animation: rise .8s var(--ease-out) both; }
.fade.d1 { animation-delay: .08s; } .fade.d2 { animation-delay: .16s; }
.fade.d3 { animation-delay: .24s; } .fade.d4 { animation-delay: .32s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fadeonly { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Intro: perspective toggle ---------- */
.persp { display: flex; flex-direction: column; gap: 18px; }
.persp-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.toggle-group { display: flex; gap: 6px; flex-wrap: wrap; }
.toggle {
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  font: 600 13px var(--font-body); padding: 0 16px; min-height: 40px; border-radius: 999px; cursor: pointer;
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-color) ease, color var(--dur-color) ease, border-color var(--dur-color) ease;
}
.toggle.on { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.persp-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.persp-list li { display: flex; gap: 12px; align-items: baseline; color: var(--text); font-size: 15px; line-height: 1.5; }
/* replays whenever a list is un-hidden */
.swap { animation: swapin 180ms var(--ease-out) both; }
@keyframes swapin { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- Work ---------- */
.proj { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: start; }
.proj--flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.proj--flip .shot { order: 2; }
.shot {
  display: block; position: relative; margin: 0;
  border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--line);
  padding: 20px 20px 0; overflow: hidden;
  scroll-margin: calc(var(--header-h) + 16px) 0 16px;
  transition: transform 250ms var(--ease-out);
}
.shot-bar { display: flex; gap: 12px; align-items: center; padding-bottom: 14px; min-height: 50px; }
.shot-dots { display: inline-flex; gap: 6px; flex: none; }
.shot-dots span { width: 9px; height: 9px; border-radius: 999px; background: var(--line-strong); }
.shot-url { font: 12px var(--font-mono); color: var(--caption); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot-actions { margin-left: auto; display: flex; gap: 8px; flex: none; }
.shot-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px;
  font: 500 11px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
  transition: transform var(--dur-press) var(--ease-out), color var(--dur-color) ease, border-color var(--dur-color) ease;
}
.shot-btn:active { transform: scale(0.97); }

/* the viewport: screenshot by default, the real site once the visitor asks */
.shot-view { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 10px 10px 0 0; background: var(--line); }
.shot-view picture { display: contents; }
.shot-view img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.shot-cover {
  position: absolute; inset: 0; width: 100%; padding: 0; border: 0; background: transparent; cursor: pointer;
  border-radius: inherit;
}
.shot-cover:focus-visible { outline: 2px solid var(--coral); outline-offset: -4px; }
.shot-pill {
  position: absolute; right: 14px; bottom: 14px;
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px;
  font: 500 12px var(--font-mono); letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink); background: rgba(18, 19, 17, .88); border: 1px solid var(--line-strong); border-radius: 999px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-color) ease, color var(--dur-color) ease, border-color var(--dur-color) ease;
}
.shot-cover:active .shot-pill { transform: scale(0.97); }
.shot-frame {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff;
  opacity: 0; transition: opacity 200ms var(--ease-out);
}
.shot.is-loaded .shot-frame { opacity: 1; }
.shot-loading {
  position: absolute; left: 14px; bottom: 14px; margin: 0; padding: 8px 12px; border-radius: 999px;
  color: var(--ink); background: rgba(18, 19, 17, .88); text-transform: none; letter-spacing: 0;
}
.shot-loading:empty { display: none; }
/* live: a taller window so the client's site is comfortable to scroll */
.shot.is-live .shot-view { aspect-ratio: auto; height: clamp(480px, 72vh, 720px); height: clamp(480px, 72svh, 720px); }
.proj-body { display: flex; flex-direction: column; gap: 22px; }
/* live preview: the frame takes the full width so the client site shows its desktop layout; the write-up moves below */
.proj.is-wide { grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: start; }
.proj.is-wide .shot { order: 0; }
.proj.is-wide .proj-body { max-width: 760px; }
.tags { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tag { color: var(--caption); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; }
.proj-client { color: var(--muted); font-size: 15px; line-height: 1.6; }
.proj-client strong { color: var(--ink); font-weight: 600; }
.proj-facts { display: grid; grid-template-columns: 96px 1fr; gap: 12px 16px; margin: 0; font-size: 15px; line-height: 1.55; }
.proj-facts dt { color: var(--olive); padding-top: 3px; }
.proj-facts dd { margin: 0; color: var(--text); }
.proj-facts dd.todo { color: var(--caption); }
.proj-links { padding-top: 6px; }
.reserved {
  border: 1.5px dashed var(--line); border-radius: var(--radius-card); padding: 28px 32px;
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
}

/* ---------- Tally ----------
   Skyla's own app, set as a page of its own: a full-width band in the app's
   colors (from its Theme.swift). Every Tally token is scoped to .tally. */
.tally {
  --t-ground: #111521; --t-surface: #1A2231; --t-line: rgba(169, 187, 255, .14);
  --t-ink: #F5F0E8; --t-ink2: #D8D5CF; --t-ink3: #A7AAB5;
  --t-coral: #FF986F; --t-cobalt: #6385FF; --t-cobalt-light: #A9BBFF;
  position: relative; overflow: hidden; isolation: isolate;
  /* sized to fit one screen under the header: spacing follows the window's height */
  padding-block: clamp(44px, 7vh, 104px); background: var(--t-ground); color: var(--t-ink);
}
/* the soft disc from the beta poster, sitting behind the mark */
.tally::before {
  content: ""; position: absolute; z-index: -1; top: -22%; right: -12%;
  width: min(58vw, 860px); aspect-ratio: 1; border-radius: 50%; background: var(--t-surface);
}
.tally ::selection { background: var(--t-cobalt); color: var(--t-ink); }
.tally :focus-visible { outline-color: var(--t-cobalt-light); }
.tally .eyebrow { color: var(--t-cobalt-light); }
.tally .display-l { color: var(--t-ink); }
.tally .dim { color: var(--t-ink3); }
.tally-wrap { display: flex; flex-direction: column; gap: clamp(28px, 5vh, 72px); }

.tally-top { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 48px; align-items: center; }
.tally-intro { display: flex; flex-direction: column; gap: clamp(12px, 2.2vh, 24px); }
.tally .display-l { font-size: clamp(34px, min(3.6vw, 5.6vh), 52px); }
.tally-aside { color: var(--t-ink3); max-width: 620px; }
.tally-art { justify-self: end; width: 100%; max-width: clamp(160px, 28vh, 320px); }
.tally-art svg { display: block; width: 100%; height: auto; overflow: visible; }
.tally-strike { stroke-dasharray: 1; stroke-dashoffset: 0; }
/* first view: the strike crosses the four bars, once */
.js .tally:not(.seen) .tally-strike { stroke-dashoffset: 1; }
.tally.seen .tally-strike { transition: stroke-dashoffset 700ms var(--ease-in-out) 200ms; }

.tally-body {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start;
  padding-top: clamp(24px, 4.5vh, 56px); border-top: 1px solid var(--t-line);
}
.tally-pitch { display: flex; flex-direction: column; gap: clamp(14px, 2.4vh, 26px); }
.tally-brand { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.tally-word { font: 400 clamp(36px, 5vh, 46px)/1 Caprasimo, var(--font-display); letter-spacing: -0.01em; color: var(--t-ink); }
.tally-pill { color: var(--t-coral); background: rgba(255, 152, 111, .13); padding: 7px 14px; border-radius: 999px; }
.tally-lead { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.5; color: var(--t-ink2); }
.tally-cta { display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; padding-top: 4px; }
.tally-note { color: var(--t-ink3); text-transform: none; letter-spacing: 0; }
.btn-tally { background: var(--t-coral); color: var(--t-ground); border: 0; }
a.btn-tally { color: var(--t-ground); }

.tally-details { display: flex; flex-direction: column; gap: clamp(18px, 3vh, 36px); }
.tally-feats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2.6vh, 28px) 36px; }
.tally-feats li { color: var(--t-ink3); font-size: 14.5px; line-height: 1.5; }
.tally-feats strong { display: block; margin-bottom: 4px; color: var(--t-ink); font-weight: 700; font-size: 16px; }
.tally-facts { padding-top: clamp(14px, 2.4vh, 24px); border-top: 1px solid var(--t-line); gap: 8px 16px; font-size: 14.5px; }
.tally-facts dt { color: var(--t-cobalt-light); }
.tally-facts dd { color: var(--t-ink2); }

/* ---------- Services ---------- */
.svc-list { border-top: 1px solid var(--line); }
.svc {
  display: grid; grid-template-columns: 96px minmax(0, 4fr) minmax(0, 6fr) 120px;
  grid-template-areas: "num body items tag";
  gap: 32px; align-items: start;
  padding: 40px 24px; margin: 0 -24px; border-bottom: 1px solid var(--line); border-radius: 16px;
  transition: background-color 200ms ease;
}
.svc-num { grid-area: num; font-size: 40px; font-weight: 800; line-height: 1; }
.svc-body { grid-area: body; display: flex; flex-direction: column; gap: 10px; }
.svc-body p { color: var(--muted); font-size: 15px; line-height: 1.6; }
.svc-items { grid-area: items; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; font-size: 14px; line-height: 1.5; color: var(--text); }
.svc-tag { grid-area: tag; justify-self: end; }
.cta-band { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; padding: 32px 36px; }

/* ---------- Process ---------- */
.loop-note { text-transform: none; letter-spacing: 0; text-wrap: balance; }
.process { position: relative; padding-block: 24px; --clip-hidden: inset(0 100% 0 0); }
.process-line { position: absolute; left: 0; right: 0; top: 50%; border-top: 1.5px dashed var(--line-strong); }
.steps { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.step {
  display: flex; flex-direction: column; gap: 16px;
  background: var(--ground); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 28px;
}
.step:nth-child(even) { margin-top: clamp(24px, 6vh, 56px); }
.step p { color: var(--muted); font-size: 15px; line-height: 1.6; }
.step-head { display: flex; align-items: center; justify-content: space-between; }
.nd { width: 14px; height: 14px; border-radius: 999px; display: inline-block; }
.nd--olive { background: var(--olive); }
.nd--coral { background: var(--coral); }

/* entrance: only when JS is running (html.js), once, on first view */
.js .process:not(.seen) .step { opacity: 0; transform: translateY(8px); }
.js .process:not(.seen) .process-line { clip-path: var(--clip-hidden); }
.process.seen .step { transition: opacity 320ms var(--ease-out), transform 320ms var(--ease-out); }
.process.seen .step:nth-child(2) { transition-delay: 60ms; }
.process.seen .step:nth-child(3) { transition-delay: 120ms; }
.process.seen .step:nth-child(4) { transition-delay: 180ms; }
.process.seen .process-line { clip-path: inset(0 0 0 0); transition: clip-path 600ms var(--ease-in-out); }

/* ---------- Personal ---------- */
/* portrait beside the status card, so the column stays one screen tall */
.about-id { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; }
.about-portrait { margin: 0; display: flex; flex-direction: column; gap: 12px; width: clamp(150px, 24vh, 220px); }
.about-portrait img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.about-portrait figcaption { text-transform: none; letter-spacing: 0; }
.quote {
  padding: 20px 24px; border-left: 3px solid var(--olive); background: var(--ground);
  border-radius: 0 16px 16px 0; color: var(--text); font-size: 16px; line-height: 1.6; font-style: italic;
}
.ping-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.pong { color: var(--coral); text-transform: none; letter-spacing: 0; font-size: 13px; }
.kv { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; font-size: 15px; line-height: 1.5; }
.kv dt { color: var(--caption); padding-top: 2px; }
.kv dd { margin: 0; color: var(--text); }
.exploring { display: grid; grid-template-columns: minmax(0, 1fr) auto; row-gap: 12px; }
/* every row shares the list's two columns: labels wrap at the same width, statuses line up on one line */
.exploring li {
  grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; column-gap: 20px; align-items: baseline;
  padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); font-size: 15px; font-weight: 500;
}
.exploring li > .mono { white-space: nowrap; text-align: right; }
.exploring li:last-child { border-bottom: 0; padding-bottom: 0; }
.exploring .todo-row { color: var(--caption); }

/* ---------- Contact ---------- */
.contact { padding-top: 8px; }
/* The last section fills the screen, so jumping to it lands it at the top
   instead of running out of page with the previous section still showing. */
#contact { min-height: calc(100vh - var(--header-h)); min-height: calc(100svh - var(--header-h)); display: flex; flex-direction: column; justify-content: center; }
.contact-list { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; }
.contact-list li { display: flex; gap: 14px; align-items: center; color: var(--text); font-size: 15px; }
.contact-list .mono { width: 70px; flex: none; }
.inline-links { display: inline-flex; gap: 20px; flex-wrap: wrap; }
.form-note { color: var(--caption); font-size: 13px; line-height: 1.5; }
.form-note a { color: var(--muted); }

.cform {
  display: grid; background: var(--ground-alt); border: 1px solid var(--line); border-radius: 24px; padding: clamp(24px, 4vh, 36px);
}
.cfields, .cdone { grid-area: 1 / 1; }
.cfields {
  display: flex; flex-direction: column; gap: clamp(12px, 2vh, 18px);
  opacity: 1; transform: none; visibility: visible;
  transition: opacity 200ms var(--ease-out) 120ms, transform 200ms var(--ease-out) 120ms, visibility 0s;
}
.cdone {
  display: flex; flex-direction: column; justify-content: center; gap: 18px;
  opacity: 0; transform: translateY(8px); visibility: hidden;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s linear 200ms;
}
.cform.sent .cfields {
  opacity: 0; transform: translateY(6px); visibility: hidden;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s linear 200ms;
}
.cform.sent .cdone {
  opacity: 1; transform: none; visibility: visible;
  transition: opacity 320ms var(--ease-out) 120ms, transform 320ms var(--ease-out) 120ms, visibility 0s;
}
.cform.sent .blink { animation: pulse 1.2s ease-in-out 440ms 1 both; }

.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field-group { display: flex; flex-direction: column; gap: 8px; }
.field-group label { font-size: 14px; font-weight: 600; color: var(--text); }
.field {
  width: 100%; background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  font: 500 16px var(--font-body); padding: 14px 16px; border-radius: 12px; min-height: 48px;
  transition: border-color var(--dur-color) ease;
}
.field:focus { outline: none; border-color: var(--olive); }
.field:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }
.field::placeholder { color: var(--caption); }
.field[aria-invalid="true"] { border-color: var(--coral); }
textarea.field { resize: vertical; min-height: 96px; height: clamp(96px, 15vh, 140px); }
select.field {
  appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer;
  text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none' stroke='%23A9A79D' stroke-width='1.6'%3E%3Cpath d='M3 5l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
.field-err { color: var(--coral); font-size: 13px; }
.form-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 6px; }
.form-error { color: var(--coral); font-size: 14px; line-height: 1.5; max-width: 340px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Legal pages ---------- */
.legal { max-width: 760px; padding-block: 40px 96px; display: flex; flex-direction: column; gap: 40px; }
.legal section { display: flex; flex-direction: column; gap: 12px; }
.legal section p, .legal section li { color: var(--text); font-size: 16px; line-height: 1.7; }
.legal section ul { display: flex; flex-direction: column; gap: 8px; padding-left: 20px; list-style: disc; }
.legal section li::marker { color: var(--olive); }
.legal strong { color: var(--ink); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line-soft); background: var(--deepest); }
.footer-row { padding-block: 40px calc(40px + env(safe-area-inset-bottom, 0px)); display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.foot-copy { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.foot-links { display: flex; gap: 24px; flex-wrap: wrap; }
.foot-links .navlink { font-size: 14px; }
.foot-note { color: var(--caption); text-transform: none; letter-spacing: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  .field-row { grid-template-columns: 1fr; }
}

@media (max-width: 979px) {
  :root { --header-h: 64px; }
  .nav-links, .nav-status { display: none; }
  .nav-actions { gap: 8px; }
  .menu-btn { display: inline-flex; }
  .logo { width: 34px; height: 34px; border-radius: 10px; font-size: 17px; padding-right: 8px; }
  .logo .logo-dot { right: 6px; bottom: 10px; }
  .brand { gap: 10px; }

  .hero { padding-block: 24px 40px; }
  .hero-grid, .split-5-7, .split-6-6, .proj, .proj--flip { grid-template-columns: 1fr; }
  .hero-grid { gap: 32px; }
  .hero-art { justify-self: start; }
  .split, .proj { gap: 32px; }
  .proj--flip .shot { order: 0; }
  .section { padding-block: 64px; }
  .stack-72 { gap: 48px; }

  .svc {
    grid-template-columns: 1fr auto;
    grid-template-areas: "num tag" "body body" "items items";
    gap: 12px; padding: 28px 0; margin: 0; border-radius: 0;
  }
  .svc-num { font-size: 30px; }
  .svc-tag { align-self: baseline; }
  .cta-band { padding: 24px; }
  .tally { padding-block: 80px; }
  .tally::before { width: 110vw; top: -8%; right: -60%; }
  .tally-wrap { gap: 64px; }
  .tally-top, .tally-body { grid-template-columns: 1fr; }
  .tally-top { gap: 40px; }
  .tally-art { order: -1; justify-self: start; max-width: 220px; }
  .tally-body { gap: 48px; padding-top: 56px; }

  /* process becomes a vertical timeline */
  .process { padding: 0 0 0 28px; --clip-hidden: inset(0 0 100% 0); }
  .process-line { left: 6px; right: auto; top: 12px; bottom: 12px; border-top: 0; border-left: 1.5px dashed var(--line-strong); }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .step { background: none; border: 0; border-radius: 0; padding: 0; gap: 8px; position: relative; }
  .step:nth-child(even) { margin-top: 0; }
  .nd { position: absolute; left: -28px; top: 2px; }
}

@media (max-width: 639px) {
  .persp-list, .svc-items, .field-row { grid-template-columns: 1fr; }
  .toggle { flex: 1 1 auto; min-height: 44px; }
  .hero-ctas .btn { width: 100%; }
  .cform { padding: 22px; border-radius: 20px; }
  .form-foot .btn { width: 100%; }
  .card { padding: 20px; }
  .proj-facts { grid-template-columns: 1fr; gap: 4px; }
  .proj-facts dd { margin-bottom: 10px; }
  .art-label { font-size: 11px; }
  /* one row on phones: number and both roles; the degree is in About */
  .hero-meta { flex-wrap: nowrap; gap: 6px; font-size: 11px; letter-spacing: .03em; white-space: nowrap; overflow: hidden; }
  .hero-meta .hm-extra { display: none; }
  .shot { padding: 14px 14px 0; }
  /* a phone-shaped window showing the phone screenshot; the live site loads into the same shape */
  .shot-view { aspect-ratio: 4 / 5; }
  .hero-art { max-width: 320px; }
  .about-portrait { width: auto; }
  .about-portrait img { width: min(100%, 240px); }
  .shot.is-live .shot-dots, .shot.is-live .shot-url { display: none; }
  .shot.is-live .shot-actions { margin-left: 0; width: 100%; justify-content: space-between; }
  .reserved { padding: 20px; }
  .about-id { grid-template-columns: 1fr; }
  .tally { padding-block: 64px; }
  .tally-art { max-width: 160px; }
  .tally-word { font-size: 40px; }
  .tally-feats { grid-template-columns: 1fr; gap: 24px; }
  .tally-cta .btn { width: 100%; }
}

/* ---------- Desktop: one section per screen ---------- */
@media (min-width: 980px) {
  html { scroll-snap-type: y proximity; }
  main > section { scroll-snap-align: start; }
  .hero, .section {
    min-height: calc(100vh - var(--header-h)); min-height: calc(100svh - var(--header-h));
    display: flex; flex-direction: column; justify-content: center;
  }
  /* the screenshot stays in view while you read a long write-up beside it */
  .proj .shot { position: sticky; top: calc(var(--header-h) + 24px); }
  .proj.is-wide .shot { position: relative; top: auto; }
}

/* ---------- Touch screens: finger-sized targets ---------- */
@media (pointer: coarse) {
  .shot-btn { min-height: 44px; padding: 0 16px; }
  .foot-links .navlink { display: inline-block; padding: 12px 2px; }
  .brand { min-height: 44px; }
}

/* ---------- Reduced motion: drop movement, keep fades and color ---------- */
@media (prefers-reduced-motion: reduce) {
  .fade, .swap { animation-name: fadeonly; }
  .pulse, .cform.sent .blink { animation: none; }
  .btn:not(:disabled):hover, .proj:hover .shot { transform: none; }
  .shot-btn:active, .shot-cover:active .shot-pill { transform: none; opacity: .8; }
  .btn:not(:disabled):active, .toggle:active { transform: none; opacity: .8; }
  .mmenu, .cfields, .cdone, .cform.sent .cfields { transform: none; }
  .js .process:not(.seen) .step { opacity: 1; transform: none; }
  .js .process:not(.seen) .process-line { clip-path: none; }
  .js .tally:not(.seen) .tally-strike { stroke-dashoffset: 0; }
}
