/* =========================================================
   Taha Mohyuddin: site styles (v2)
   Editorial, restrained. Fraunces for display, Inter Tight for text.
   Amber is an accent for actions and small marks only.
   ========================================================= */

@font-face{ font-family:"Fraunces"; font-style:normal; font-weight:300 600; font-display:swap; src:url(/fonts/fraunces-latin.woff2) format("woff2"); }
@font-face{ font-family:"Fraunces"; font-style:italic; font-weight:300 500; font-display:swap; src:url(/fonts/fraunces-italic-latin.woff2) format("woff2"); }
@font-face{ font-family:"Inter Tight"; font-style:normal; font-weight:300 600; font-display:swap; src:url(/fonts/inter-tight-latin.woff2) format("woff2"); }

/* ---------- tokens ---------- */
:root{
  --bg:#141210;
  --surface:#1B1815;
  --surface-2:#231F1B;
  --sink:#0F0D0B;
  --line:#2D2925;
  --line-soft:#221F1C;
  --text:#F2EDE6;
  --text-2:#CEC6BA;
  --muted:#9D9488;
  --accent:#EEAA2B;
  --accent-fill:#EEAA2B;
  --accent-ink:#17130C;
  --accent-soft:rgba(238,170,43,.12);
  --accent-line:rgba(238,170,43,.42);
  --glow-a:rgba(238,170,43,.09);
  --glow-b:rgba(120,140,170,.06);
  --ok:#86B892;
  --err:#E0806E;
  --shadow:0 1px 0 rgba(255,255,255,.03) inset, 0 24px 60px -32px rgba(0,0,0,.7);
  --header-bg:rgba(18,17,16,.8);

  --w:1160px;
  --read:68ch;
  --pad:clamp(16px,4.5vw,48px);
  --sec:clamp(64px,8vw,104px);
  --r-s:8px; --r-m:12px; --r-l:16px; --r-xl:22px;

  --serif:"Fraunces", Georgia, "Times New Roman", serif;
  --sans:"Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --ease:cubic-bezier(.22,.61,.36,1);
  color-scheme:dark;
}
@media (prefers-color-scheme: light){
  :root:not([data-theme="dark"]){
    --bg:#FAF8F4; --surface:#FFFFFF; --surface-2:#F3EFE8; --sink:#F2EEE7;
    --line:#E2DBD0; --line-soft:#ECE6DC;
    --text:#1A1714; --text-2:#3A342D; --muted:#675E54;
    --accent:#9A5806; --accent-fill:#EEAA2B; --accent-ink:#17130C;
    --accent-soft:rgba(238,170,43,.16); --accent-line:rgba(154,88,6,.38);
    --glow-a:rgba(238,170,43,.13); --glow-b:rgba(120,140,170,.07);
    --ok:#2F7A45; --err:#B4432F;
    --shadow:0 1px 2px rgba(40,30,15,.04), 0 24px 50px -34px rgba(40,30,15,.3);
    --header-bg:rgba(250,248,244,.85);
    color-scheme:light;
  }
}
:root[data-theme="light"]{
  --bg:#FAF8F4; --surface:#FFFFFF; --surface-2:#F3EFE8; --sink:#F2EEE7;
  --line:#E2DBD0; --line-soft:#ECE6DC;
  --text:#1A1714; --text-2:#3A342D; --muted:#675E54;
  --accent:#9A5806; --accent-fill:#EEAA2B; --accent-ink:#17130C;
  --accent-soft:rgba(238,170,43,.16); --accent-line:rgba(154,88,6,.38);
  --glow-a:rgba(238,170,43,.13); --glow-b:rgba(120,140,170,.07);
  --ok:#2F7A45; --err:#B4432F;
  --shadow:0 1px 2px rgba(40,30,15,.04), 0 24px 50px -34px rgba(40,30,15,.3);
  --header-bg:rgba(250,248,244,.85);
  color-scheme:light;
}

/* ---------- base ---------- */
*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; scroll-padding-top:84px; }
body{
  margin:0; background:var(--bg); color:var(--text);
  font-family:var(--sans); font-size:17px; line-height:1.65; font-weight:380;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility; overflow-x:hidden;
}
img,svg{ max-width:100%; display:block; }
a{ color:inherit; }
button{ font:inherit; color:inherit; }
::selection{ background:var(--accent-fill); color:var(--accent-ink); }
:focus-visible{ outline:2px solid var(--accent); outline-offset:3px; border-radius:6px; }
.skip{ position:absolute; left:-9999px; top:0; z-index:200; background:var(--accent-fill); color:var(--accent-ink); padding:10px 16px; border-radius:0 0 8px 0; font-weight:500; }
.skip:focus{ left:0; }
.sr-only{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* ---------- layout ---------- */
.wrap{ width:100%; max-width:var(--w); margin-inline:auto; padding-inline:var(--pad); }
.wrap-read{ max-width:calc(var(--read) + 2 * var(--pad)); }
.section{ padding-block:var(--sec); }
.section + .section{ border-top:1px solid var(--line-soft); }

/* ---------- type ---------- */
h1,h2{ font-family:var(--serif); font-weight:400; margin:0; letter-spacing:-.02em; text-wrap:balance; }
h1{ font-size:clamp(2.5rem,6.4vw,4.6rem); line-height:1.04; }
h2{ font-size:clamp(1.85rem,3.6vw,2.6rem); line-height:1.1; }
h3,h4{ font-family:var(--sans); font-weight:550; margin:0; letter-spacing:-.01em; line-height:1.3; text-wrap:balance; }
h3{ font-size:1.18rem; }
h4{ font-size:1.02rem; }
p{ margin:0 0 1em; text-wrap:pretty; }
p:last-child{ margin-bottom:0; }
.lede{ font-size:clamp(1.06rem,1.5vw,1.2rem); color:var(--text-2); max-width:60ch; line-height:1.6; }
.prose{ color:var(--text-2); max-width:var(--read); }
.prose p{ margin-bottom:1.1em; }
.muted{ color:var(--muted); }
.small{ font-size:.9rem; }
.eyebrow{ font:600 .74rem/1.4 var(--sans); letter-spacing:.14em; text-transform:uppercase; color:var(--muted); margin:0 0 16px; }

.section-head{ display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:12px 32px; margin-bottom:clamp(28px,4vw,44px); }
.section-head > p{ color:var(--muted); max-width:48ch; margin:0; }

/* ---------- buttons & links ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  min-height:46px; padding:11px 22px; border-radius:999px; border:1px solid transparent;
  text-decoration:none; cursor:pointer; font-size:.95rem; font-weight:500; line-height:1.2;
  transition:background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:active{ transform:translateY(0); }
.btn-solid{ background:var(--accent-fill); color:var(--accent-ink); }
.btn-solid:hover{ background:#F5BA4A; transform:translateY(-1px); box-shadow:0 8px 22px -12px rgba(238,170,43,.7); }
.btn-ghost:hover{ border-color:var(--accent-line); color:var(--text); }
.btn-ghost{ border-color:var(--line); color:var(--text); }
.btn-sm{ min-height:38px; padding:7px 16px; font-size:.9rem; }
.btn-row{ display:flex; flex-wrap:wrap; gap:10px; }
.btn[disabled]{ opacity:.6; cursor:progress; }

.link{ color:var(--text); text-decoration:underline; text-decoration-color:var(--accent-line); text-underline-offset:4px; text-decoration-thickness:1px; transition:text-decoration-color .2s var(--ease); }
.link:hover{ text-decoration-color:var(--accent); }
.arrow-link{ display:inline-flex; align-items:center; gap:6px; color:var(--text); text-decoration:none; font-weight:500; }
.arrow-link::after{ content:"\2192"; transition:transform .2s var(--ease); }
.arrow-link:hover::after{ transform:translateX(3px); }
.ext::after{ content:"\2197"; }
.links{ display:flex; flex-wrap:wrap; gap:10px 22px; font-size:.94rem; }
.links a{ color:var(--text); text-decoration:none; font-weight:500; border-bottom:1px solid var(--line); padding-bottom:1px; }
.links a:hover{ border-color:var(--text-2); }

/* ---------- header ---------- */
.topbar{
  position:sticky; top:0; z-index:90; display:flex; align-items:center; gap:20px;
  padding:12px max(var(--pad), calc((100% - var(--w)) / 2 + var(--pad))); background:var(--header-bg);
  backdrop-filter:saturate(1.2) blur(14px); -webkit-backdrop-filter:saturate(1.2) blur(14px);
  border-bottom:1px solid transparent; transition:border-color .3s var(--ease);
}
.topbar.is-stuck{ border-bottom-color:var(--line-soft); }
.mark{ display:flex; align-items:center; gap:10px; text-decoration:none; margin-right:auto; }
.mark-i{ width:30px; height:30px; flex:none; display:grid; place-items:center; border:1px solid var(--line); border-radius:50%; font-family:var(--serif); font-size:.78rem; }
.mark-name{ font-family:var(--serif); font-size:1.02rem; }
.topnav{ display:flex; gap:2px; }
.topnav a{ text-decoration:none; color:var(--muted); font-size:.93rem; padding:7px 12px; border-radius:999px; transition:color .2s var(--ease), background .2s var(--ease); }
.topnav a:hover,.topnav a.is-here{ color:var(--text); background:var(--surface-2); }
.theme-btn{ width:38px; height:38px; display:grid; place-items:center; flex:none; border:1px solid var(--line); border-radius:50%; background:transparent; cursor:pointer; color:var(--muted); }
.theme-btn:hover{ color:var(--text); }
.theme-btn svg{ width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; }
.theme-btn .i-sun{ display:none; }
:root[data-theme="light"] .theme-btn .i-sun{ display:block; }
:root[data-theme="light"] .theme-btn .i-moon{ display:none; }
@media (prefers-color-scheme: light){
  :root:not([data-theme="dark"]) .theme-btn .i-sun{ display:block; }
  :root:not([data-theme="dark"]) .theme-btn .i-moon{ display:none; }
}
.tabbar,.sheet{ display:none; }

/* ---------- hero ---------- */
.hero{ padding-block:clamp(44px,6.5vw,88px) clamp(24px,3vw,40px); }
.hero-grid{ display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr); gap:clamp(36px,6vw,88px); align-items:center; }
.hero-copy{ min-width:0; }
.hero h1{ margin-bottom:clamp(16px,2vw,22px); }
.hero-headline{ font-family:var(--serif); font-weight:350; font-size:clamp(1.35rem,2.4vw,1.8rem); line-height:1.3; color:var(--text-2); margin:0 0 20px; max-width:28ch; letter-spacing:-.01em; }
.hero .lede{ max-width:56ch; }
.hero .btn-row{ margin-top:30px; }
.portrait{ margin:0; width:100%; max-width:400px; justify-self:end; aspect-ratio:4/5; border-radius:var(--r-xl); overflow:hidden; background:var(--surface); border:1px solid var(--line-soft); }
.portrait img{ width:100%; height:100%; object-fit:cover; object-position:50% 30%; }

.glance{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0; margin:clamp(48px,6vw,72px) 0 0; border-top:1px solid var(--line); }
.glance > div{ padding:22px 24px 0 0; min-width:0; }
.glance > div + div{ padding-left:24px; border-left:1px solid var(--line-soft); }
.glance dt{ font:600 .72rem/1.4 var(--sans); letter-spacing:.14em; text-transform:uppercase; color:var(--muted); }
.glance dd{ margin:10px 0 0; }
.glance .big{ display:block; font-family:var(--serif); font-size:clamp(1.25rem,2vw,1.5rem); line-height:1.25; color:var(--text); letter-spacing:-.01em; }
.glance .sub{ display:block; margin-top:6px; color:var(--muted); font-size:.92rem; line-height:1.5; }

/* entrance */
.seq{ animation:seqIn .7s var(--ease) both; }
.seq-2{ animation-delay:.06s } .seq-3{ animation-delay:.12s } .seq-4{ animation-delay:.18s } .seq-5{ animation-delay:.24s }
@keyframes seqIn{ from{ opacity:0; transform:translateY(10px); } to{ opacity:1; transform:none; } }

/* ---------- featured project ---------- */
.feature{
  display:grid; grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);
  border:1px solid var(--line); border-radius:var(--r-xl); overflow:hidden; background:var(--surface); box-shadow:var(--shadow);
}
.feature-body{ padding:clamp(24px,3.4vw,44px); min-width:0; }
.feature-body h3{ font-family:var(--serif); font-weight:400; font-size:clamp(1.9rem,3vw,2.4rem); letter-spacing:-.02em; line-height:1.05; }
.feature-tagline{ color:var(--text-2); font-size:1.06rem; margin:10px 0 18px; }
.feature-body > p{ color:var(--text-2); max-width:62ch; }
.feature-aside{ background:var(--sink); border-left:1px solid var(--line-soft); padding:clamp(22px,3vw,36px); display:flex; flex-direction:column; justify-content:center; min-width:0; }
.feature .links{ margin-top:24px; }
.kicker{ font:600 .72rem/1.4 var(--sans); letter-spacing:.13em; text-transform:uppercase; color:var(--muted); margin:0 0 12px; }
.stackline{ color:var(--muted); font-size:.9rem; margin-top:18px; }
.stackline,.seplist{ display:flex; flex-wrap:wrap; row-gap:2px; }
.stackline span,.seplist span{ white-space:nowrap; }
.stackline span:not(:last-child)::after,.seplist span:not(:last-child)::after{ content:"\00B7"; margin:0 .55em; opacity:.7; }

/* bullet list: block items with a positioned marker (labels and text flow inline) */
.points{ list-style:none; padding:0; margin:18px 0 0; display:grid; gap:10px; max-width:64ch; }
.points li{ position:relative; padding-left:20px; color:var(--text-2); font-size:.97rem; line-height:1.55; }
.points li::before{ content:""; position:absolute; left:2px; top:.62em; width:6px; height:6px; border-radius:50%; background:var(--accent); }
.points b,.points strong{ color:var(--text); font-weight:550; }
.points-label{ font:600 .72rem/1.4 var(--sans); letter-spacing:.13em; text-transform:uppercase; color:var(--muted); margin:22px 0 0; }

/* HTML flow diagram (compact, real text) */
.flow{ list-style:none; margin:0; padding:0; counter-reset:flow; display:grid; gap:0; }
.flow li{ counter-increment:flow; position:relative; display:grid; grid-template-columns:32px minmax(0,1fr); column-gap:14px; padding:0 0 18px; }
.flow li:last-child{ padding-bottom:0; }
.flow li::before{
  content:counter(flow); grid-row:1/span 2; width:28px; height:28px; border-radius:50%;
  display:grid; place-items:center; font:500 .78rem/1 var(--mono); color:var(--text-2);
  border:1px solid var(--line); background:var(--surface);
}
.flow li:not(:last-child)::after{ content:""; position:absolute; left:14px; top:30px; bottom:2px; width:1px; background:var(--line); }
.flow li:last-child::before{ border-color:var(--ok); color:var(--ok); }
.flow strong{ grid-column:2; font-weight:550; font-size:.95rem; color:var(--text); line-height:1.35; padding-top:3px; }
.flow span{ grid-column:2; color:var(--muted); font-size:.87rem; line-height:1.45; }
.flow-title{ font:600 .72rem/1.4 var(--sans); letter-spacing:.13em; text-transform:uppercase; color:var(--muted); margin:0 0 18px; }

/* ---------- project cards (home) ---------- */
.cards{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:clamp(16px,2vw,24px); }
.card-p{ position:relative; display:flex; flex-direction:column; min-width:0; background:var(--surface); border:1px solid var(--line-soft); border-radius:var(--r-l); overflow:hidden; transition:border-color .25s var(--ease), transform .25s var(--ease); }
.card-p:hover{ border-color:var(--line); transform:translateY(-2px); }
.card-p .media{ aspect-ratio:16/10; border-bottom:1px solid var(--line-soft); }
.card-p .body{ padding:22px 22px 24px; display:flex; flex-direction:column; flex:1; }
.card-p h3{ font-size:1.28rem; }
.card-p h3 a{ text-decoration:none; }
.card-p h3 a::after{ content:""; position:absolute; inset:0; }
.card-p .body > p{ color:var(--muted); font-size:.95rem; margin:10px 0 0; }
.card-p .stackline{ margin-top:auto; padding-top:16px; font-size:.86rem; }

/* media wells */
.media{ position:relative; background:var(--sink); overflow:hidden; }
.media > img{ width:100%; height:100%; object-fit:cover; object-position:top center; }
.phones{ position:absolute; inset:0; display:flex; align-items:flex-end; justify-content:center; gap:4%; padding:8% 6% 0; }
.phones img{ width:auto; height:auto; max-width:29%; max-height:94%; border-radius:14px 14px 0 0; border:1px solid var(--line); border-bottom:0; background:#fff; }
.phones img:nth-child(2){ margin-bottom:4%; }
.browser{ position:absolute; inset:7% 6% 0; border:1px solid var(--line); border-bottom:0; border-radius:10px 10px 0 0; overflow:hidden; background:#fff; }
.browser::before{
  content:""; display:block; height:18px; background:var(--surface-2); border-bottom:1px solid var(--line-soft);
  background-image:radial-gradient(circle at 10px 9px, var(--line) 3px, transparent 3.5px), radial-gradient(circle at 21px 9px, var(--line) 3px, transparent 3.5px), radial-gradient(circle at 32px 9px, var(--line) 3px, transparent 3.5px);
}
.browser img{ width:100%; height:calc(100% - 18px); object-fit:cover; object-position:top center; }
.schema{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; gap:10px; padding:0 6%; }
.schema div{ flex:1; min-width:0; border:1px solid var(--line); background:var(--surface); border-radius:10px; padding:12px 10px; text-align:center; }
.schema b{ display:block; font-weight:550; font-size:.86rem; color:var(--text); line-height:1.3; }
.schema small{ display:block; color:var(--muted); font-size:.74rem; line-height:1.35; margin-top:3px; }
.schema i{ flex:none; width:14px; height:1px; background:var(--line); }
.caption{ position:absolute; left:12px; bottom:10px; font-size:.72rem; color:var(--muted); background:var(--surface); border:1px solid var(--line-soft); border-radius:6px; padding:1px 8px; }

/* ---------- project rows (work page): visual band on top, two text columns below ---------- */
.rows{ display:grid; gap:clamp(20px,3vw,32px); }
.row-p{ background:var(--surface); border:1px solid var(--line-soft); border-radius:var(--r-l); overflow:hidden; }
.row-p .media{ height:clamp(220px,30vw,360px); border-bottom:1px solid var(--line-soft); }
.row-p .phones{ padding:28px 6% 0; gap:3%; }
.row-p .phones img{ max-width:22%; }
.row-p .browser{ inset:28px 12% 0; }
.row-p .schema{ max-width:820px; margin:0 auto; gap:16px; }
.row-p .schema div{ padding:20px 14px; }
.row-p .schema b{ font-size:1.02rem; }
.row-p .schema small{ font-size:.82rem; }
.row-p .schema i{ width:24px; }
.row-p .body{ display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:8px clamp(28px,4vw,56px); padding:clamp(22px,3vw,36px); }
.row-p h3{ font-size:1.45rem; }
.row-p .main > p{ color:var(--text-2); margin-top:10px; }
.row-p .side .points-label{ margin-top:4px; }
.row-p .note{ color:var(--muted); font-size:.86rem; margin-top:14px; }
.row-p .links{ margin-top:18px; }

.more-list{ border-top:1px solid var(--line); }
.more-row{ display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px 28px; align-items:baseline; padding:22px 0; border-bottom:1px solid var(--line-soft); }
.more-row h3{ font-size:1.08rem; }
.more-row p{ color:var(--muted); font-size:.94rem; margin:6px 0 0; max-width:72ch; }

/* ---------- experience ---------- */
.xp{ border-top:1px solid var(--line); }
.xp-org{ display:grid; grid-template-columns:minmax(0,.9fr) minmax(0,2fr); gap:14px clamp(24px,4vw,56px); padding:clamp(26px,3vw,36px) 0; border-bottom:1px solid var(--line-soft); }
.xp-org-head h3{ font-family:var(--serif); font-weight:400; font-size:1.45rem; letter-spacing:-.015em; line-height:1.2; }
.xp-org-head p{ color:var(--muted); font-size:.92rem; margin:6px 0 0; }
.xp-org-head .type{ display:inline-block; margin-top:12px; font:600 .7rem/1.4 var(--sans); letter-spacing:.12em; text-transform:uppercase; color:var(--muted); }
.roles{ list-style:none; margin:0; padding:0; display:grid; gap:22px; }
.role{ position:relative; min-width:0; }
.role-top{ display:flex; flex-wrap:wrap; justify-content:space-between; align-items:baseline; gap:2px 18px; }
.role h4{ font-size:1.06rem; }
.role .dates{ color:var(--muted); font-size:.88rem; font-variant-numeric:tabular-nums; white-space:nowrap; }
.role p{ color:var(--text-2); font-size:.96rem; margin:6px 0 0; max-width:64ch; }
.role ul{ margin:8px 0 0; padding-left:18px; color:var(--text-2); font-size:.95rem; display:grid; gap:5px; max-width:64ch; }
.ladder{ padding-left:22px; position:relative; }
.ladder::before{ content:""; position:absolute; left:4px; top:10px; bottom:10px; width:1px; background:var(--line); }
.ladder .role::before{ content:""; position:absolute; left:-22px; top:.5em; width:9px; height:9px; border-radius:50%; background:var(--bg); border:1.5px solid var(--muted); }
.ladder .role:first-child::before{ background:var(--accent); border-color:var(--accent); }
.current{ color:var(--ok); font-size:.8rem; font-weight:500; margin-left:6px; }

/* ---------- case study ---------- */
.cs-head h1{ font-size:clamp(2.3rem,5.4vw,3.8rem); max-width:18ch; }
.cs-head .lede{ margin-top:20px; }
.cs-meta{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); margin:32px 0 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.cs-meta div{ padding:16px 16px 16px 0; min-width:0; }
.cs-meta div + div{ padding-left:16px; border-left:1px solid var(--line-soft); }
.cs-meta dt{ font:600 .7rem/1.4 var(--sans); letter-spacing:.13em; text-transform:uppercase; color:var(--muted); }
.cs-meta dd{ margin:6px 0 0; font-size:.94rem; line-height:1.45; }
.cs-figure{ margin:0; border:1px solid var(--line-soft); border-radius:var(--r-xl); background:var(--sink); padding:clamp(20px,3vw,36px); }
.cs-figure figcaption{ color:var(--muted); font-size:.85rem; margin-top:16px; text-align:center; }
.cs-figure .flow{ display:none; }
.cs-wrap{ max-width:calc(900px + 2 * var(--pad)); }
.cs-block{ max-width:var(--read); }
.cs-block + .cs-block{ margin-top:clamp(48px,6vw,72px); }
.cs-block h2{ font-size:clamp(1.6rem,2.8vw,2rem); margin-bottom:18px; }
.cs-block .prose{ max-width:none; }
.callout{ border-left:2px solid var(--accent); padding:4px 0 4px 18px; color:var(--text-2); margin:20px 0 0; }
.steps{ list-style:none; padding:0; margin:0; counter-reset:step; border-top:1px solid var(--line-soft); }
.steps li{ counter-increment:step; display:grid; grid-template-columns:40px minmax(0,1fr); gap:2px 12px; padding:16px 0; border-bottom:1px solid var(--line-soft); }
.steps li::before{ content:counter(step,decimal-leading-zero); grid-row:1/3; font:500 .82rem/1.7 var(--mono); color:var(--muted); }
.steps h3{ font-size:1.02rem; }
.steps p{ color:var(--text-2); font-size:.96rem; margin:4px 0 0; }
.pairs{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.pair{ border:1px solid var(--line-soft); border-radius:var(--r-m); padding:18px 20px; background:var(--surface); }
.pair h3{ font-size:1rem; margin-bottom:6px; }
.pair p{ color:var(--muted); font-size:.93rem; margin:0; }
.team{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.team a{ display:block; text-decoration:none; padding:14px 16px; border:1px solid var(--line-soft); border-radius:var(--r-m); background:var(--surface); }
.team a:hover{ border-color:var(--line); }
.team b{ display:block; font-weight:550; }
.team span{ display:block; color:var(--muted); font-size:.86rem; margin-top:2px; }

/* pipeline SVG */
.pipeline{ width:100%; height:auto; max-width:760px; margin:0 auto; }
.pipeline .node{ fill:var(--surface); stroke:var(--line); stroke-width:1.2; }
.pipeline .node-accent{ fill:var(--surface-2); stroke:var(--accent-line); }
.pipeline .node-ok{ stroke:var(--ok); stroke-opacity:.6; }
.pipeline .t{ fill:var(--text); font:550 13px var(--sans); }
.pipeline .s{ fill:var(--muted); font:400 11px var(--sans); }
.pipeline .k{ fill:var(--muted); font:600 9.5px var(--sans); letter-spacing:.12em; }
.pipeline .edge{ stroke:var(--muted); stroke-opacity:.6; stroke-width:1.3; fill:none; }
.pipeline .edge-dash{ stroke-dasharray:4 4; }
.pipeline .arrow{ fill:var(--muted); }

/* ---------- generic cards / grids ---------- */
.card{ background:var(--surface); border:1px solid var(--line-soft); border-radius:var(--r-l); padding:clamp(20px,2.6vw,28px); }
.grid{ display:grid; gap:clamp(14px,2vw,20px); }
.g-2{ grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr)); }
.g-3{ grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)); }
.g-4{ grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr)); }
.feat h3{ font-size:1.04rem; margin-bottom:8px; }
.feat p{ color:var(--muted); font-size:.95rem; margin:0; }
.cap h3{ font-size:1rem; margin-bottom:12px; }
.cap p{ color:var(--text-2); font-size:.95rem; margin:0; line-height:1.7; }

/* ---------- about ---------- */
.about-grid{ display:grid; grid-template-columns:minmax(0,1.4fr) minmax(0,.8fr); gap:clamp(28px,5vw,64px); align-items:start; }
.about-grid .portrait{ justify-self:stretch; max-width:none; }
.tabs{ display:flex; flex-wrap:wrap; gap:4px; border-bottom:1px solid var(--line); margin-bottom:clamp(28px,4vw,40px); }
.tab{ background:none; border:0; cursor:pointer; padding:12px 14px; color:var(--muted); font-size:.97rem; border-bottom:2px solid transparent; margin-bottom:-1px; }
.tab:hover{ color:var(--text); }
.tab[aria-selected="true"]{ color:var(--text); border-bottom-color:var(--accent); }
.panel[hidden]{ display:none; }
.timeline{ list-style:none; margin:0; padding:0 0 0 24px; border-left:1px solid var(--line); max-width:var(--read); }
.timeline li{ position:relative; padding:0 0 26px; }
.timeline li:last-child{ padding-bottom:0; }
.timeline li::before{ content:""; position:absolute; left:-29px; top:9px; width:9px; height:9px; border-radius:50%; background:var(--bg); border:1.5px solid var(--muted); }
.timeline h3{ font-size:1.04rem; }
.timeline p{ color:var(--text-2); font-size:.95rem; margin:4px 0 0; }
.timeline .yr{ color:var(--muted); font-size:.85rem; font-variant-numeric:tabular-nums; }
.stat{ border:1px solid var(--line-soft); border-radius:var(--r-m); padding:16px; background:var(--surface); }
.stat b{ display:block; font-family:var(--serif); font-size:1.7rem; font-weight:400; line-height:1; }
.stat span{ display:block; color:var(--muted); font-size:.86rem; margin-top:8px; }
.gal{ display:grid; gap:12px; grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr)); }
.gal figure{ margin:0; aspect-ratio:4/3; border-radius:var(--r-m); overflow:hidden; background:var(--surface); }
.gal img{ width:100%; height:100%; object-fit:cover; }

/* ---------- notes ---------- */
.note{ display:flex; flex-direction:column; overflow:hidden; padding:0; }
.note figure{ margin:0; aspect-ratio:4/3; overflow:hidden; background:var(--sink); }
.note figure img{ width:100%; height:100%; object-fit:cover; }
.note-body{ padding:20px 22px 24px; }
.note-body h3{ margin-bottom:8px; }
.note-body p{ color:var(--text-2); font-size:.96rem; margin:0; }
.promotion-photo{ object-position:center 22%; }

/* ---------- band, footer, page head ---------- */
.band{ background:var(--sink); border-top:1px solid var(--line-soft); }
.band .wrap{ padding-block:clamp(56px,7vw,88px); display:grid; grid-template-columns:minmax(0,1fr) auto; gap:24px 48px; align-items:end; }
.band h2{ max-width:20ch; }
.band p{ color:var(--text-2); margin:14px 0 0; max-width:56ch; }
.page-head{ padding-block:clamp(44px,6vw,80px) clamp(28px,4vw,44px); }
.page-head h1{ font-size:clamp(2.3rem,5.4vw,3.8rem); }
.page-head .lede{ margin-top:18px; }
.back{ display:flex; width:max-content; align-items:center; gap:8px; color:var(--muted); text-decoration:none; font-size:.92rem; margin-bottom:22px; }
.back:hover{ color:var(--text); }

.foot{ background:var(--sink); border-top:1px solid var(--line-soft); }
.foot .wrap{ padding-block:44px 28px; }
.foot-top{ display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) minmax(0,1fr); gap:28px 48px; }
.foot-name{ font-family:var(--serif); font-size:1.2rem; color:var(--text); margin-bottom:8px; }
.foot-about p:last-child{ color:var(--muted); font-size:.92rem; max-width:40ch; }
.foot-nav{ display:flex; flex-direction:column; gap:8px; }
.foot a{ color:var(--muted); text-decoration:none; font-size:.93rem; }
.foot a:hover{ color:var(--text); }
.foot-bottom{ margin-top:32px; padding-top:18px; border-top:1px solid var(--line-soft); display:flex; flex-wrap:wrap; gap:10px 24px; justify-content:space-between; color:var(--muted); font-size:.85rem; }
.foot-bottom a{ font-size:inherit; text-decoration:underline; text-underline-offset:3px; }

/* ---------- forms ---------- */
.contact-grid{ display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,.9fr); gap:clamp(28px,5vw,56px); align-items:start; }
.field{ margin-bottom:10px; }
.field label{ display:block; font-size:.88rem; color:var(--text-2); margin-bottom:7px; }
.field label small{ color:var(--muted); }
.field input,.field select,.field textarea{ width:100%; padding:12px 14px; background:var(--bg); color:var(--text); border:1px solid var(--line); border-radius:var(--r-m); font:inherit; font-size:.97rem; transition:border-color .2s var(--ease), box-shadow .2s var(--ease); }
.field textarea{ resize:vertical; min-height:140px; }
.field input:focus,.field select:focus,.field textarea:focus{ outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
.field input::placeholder,.field textarea::placeholder{ color:var(--muted); opacity:.75; }
.field [aria-invalid="true"]{ border-color:var(--err); }
.field-error{ color:var(--err); font-size:.84rem; line-height:1.3; margin:4px 0 0; min-height:1.3em; }
.hp{ position:absolute !important; left:-10000px !important; width:1px; height:1px; overflow:hidden; }
.form-note{ color:var(--muted); font-size:.85rem; margin-top:14px; }
.form-status{ margin-top:16px; font-size:.94rem; border-radius:var(--r-m); }
.form-status:not(:empty){ padding:12px 14px; border:1px solid var(--line); background:var(--surface-2); }
.form-status.ok{ border-color:var(--ok); color:var(--ok); }
.form-status.err{ border-color:var(--err); color:var(--err); }
.chan{ display:flex; flex-direction:column; }
.chan a{ display:flex; align-items:baseline; justify-content:space-between; gap:6px 18px; flex-wrap:wrap; padding:15px 0; border-bottom:1px solid var(--line-soft); text-decoration:none; color:var(--text); }
.chan a:hover{ color:var(--accent); }
.chan a span{ color:var(--muted); font-size:.9rem; overflow-wrap:anywhere; }

/* ---------- reveal (progressive) ---------- */
.rv{ opacity:1; transform:none; }
html.js-enhanced .rv{ opacity:0; transform:translateY(8px); transition:opacity .55s var(--ease), transform .55s var(--ease); }
html.js-enhanced .rv.in{ opacity:1; transform:none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width:1100px){
  .cards{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .cards > :last-child:nth-child(odd){ grid-column:1/-1; }
}

@media (max-width:960px){
  .feature{ grid-template-columns:minmax(0,1fr); }
  .feature-aside{ border-left:0; border-top:1px solid var(--line-soft); }
  .row-p .body{ grid-template-columns:minmax(0,1fr); }
  .row-p .side .points-label{ margin-top:18px; }
  .xp-org{ grid-template-columns:minmax(0,1fr); }
}

@media (max-width:860px){
  .topnav,.topcta,.topbar > .theme-btn{ display:none; }
  .topbar{ padding:10px var(--pad); }
  body{ padding-bottom:calc(64px + env(safe-area-inset-bottom,0px)); }

  .hero-grid{ grid-template-columns:minmax(0,1fr); gap:36px; }
  .portrait{ justify-self:start; max-width:340px; }
  .glance{ grid-template-columns:minmax(0,1fr); }
  .glance > div{ padding:18px 0; }
  .glance > div + div{ padding-left:0; border-left:0; border-top:1px solid var(--line-soft); }
  .cs-meta{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .cs-meta div:nth-child(3){ padding-left:0; border-left:0; }
  .cs-meta div:nth-child(-n+2){ border-bottom:1px solid var(--line-soft); }
  .about-grid,.contact-grid{ grid-template-columns:minmax(0,1fr); }
  .about-grid .portrait{ max-width:380px; }
  .band .wrap{ grid-template-columns:minmax(0,1fr); }
  .foot-top{ grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  .foot-about{ grid-column:1/-1; }
  .more-row{ grid-template-columns:minmax(0,1fr); }

  .tabbar{
    position:fixed; left:0; right:0; bottom:0; z-index:100; display:flex; align-items:stretch;
    height:calc(60px + env(safe-area-inset-bottom,0px)); padding-bottom:env(safe-area-inset-bottom,0px);
    background:var(--header-bg); backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px); border-top:1px solid var(--line-soft);
  }
  .tabbar a,.tabbar button{ flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; background:none; border:0; cursor:pointer; color:var(--muted); font-size:.76rem; text-decoration:none; }
  .tabbar .pip{ width:4px; height:4px; border-radius:50%; background:transparent; }
  .tabbar a.is-here{ color:var(--text); }
  .tabbar a.is-here .pip{ background:var(--accent); }
  .sheet{ position:fixed; inset:0; z-index:120; display:flex; flex-direction:column; justify-content:flex-end; background:rgba(10,9,8,.55); opacity:0; pointer-events:none; transition:opacity .25s var(--ease); }
  .sheet.open{ opacity:1; pointer-events:auto; }
  .sheet-panel{ background:var(--surface); border-top:1px solid var(--line); border-radius:20px 20px 0 0; padding:8px var(--pad) calc(24px + env(safe-area-inset-bottom,0px)); transform:translateY(10%); transition:transform .3s var(--ease); max-height:90vh; overflow-y:auto; }
  .sheet.open .sheet-panel{ transform:none; }
  .sheet-grab{ width:40px; height:4px; border-radius:99px; background:var(--line); margin:10px auto 12px; }
  .sheet-panel > a{ display:flex; justify-content:space-between; align-items:center; gap:12px; padding:14px 2px; border-bottom:1px solid var(--line-soft); text-decoration:none; font-size:1.02rem; }
  .sheet-panel > a[aria-current="page"]{ color:var(--accent); }
  .sheet-panel > a small{ color:var(--muted); font-size:.84rem; text-align:right; }
  .sheet-actions{ display:flex; gap:10px; margin-top:18px; }
  .sheet-actions .btn{ flex:1; }
}

@media (max-width:680px){
  .cards{ grid-template-columns:minmax(0,1fr); }
  .cs-figure .pipeline{ display:none; }
  .cs-figure .flow{ display:grid; }
  .pairs,.team{ grid-template-columns:minmax(0,1fr); }
}

@media (max-width:520px){
  body{ font-size:16px; }
  .btn-row .btn{ flex:1 1 auto; }
  .foot-top{ grid-template-columns:minmax(0,1fr); }
  .schema{ gap:6px; padding:0 4%; }
  .schema div{ padding:8px 6px; }
  .schema b{ font-size:.78rem; }
  .schema small{ display:none; }
  .schema i{ width:8px; }
  .row-p .media{ height:200px; }
  .row-p .phones img{ max-width:28%; }
  .row-p .browser{ inset:20px 5% 0; }
}

@media (max-width:360px){
  .hero h1{ font-size:2.3rem; }
  .cs-meta{ grid-template-columns:minmax(0,1fr); }
  .cs-meta div{ padding-left:0 !important; border-left:0 !important; border-bottom:1px solid var(--line-soft); }
}

@media (prefers-reduced-motion:reduce){
  html{ scroll-behavior:auto; }
  *,*::before,*::after{ animation-duration:.001ms !important; animation-delay:0s !important; transition-duration:.001ms !important; }
  html.js-enhanced .rv{ opacity:1; transform:none; }
  .card-p:hover{ transform:none; }
}
@media print{
  .topbar,.tabbar,.sheet,.band,.theme-btn{ display:none !important; }
  body{ background:#fff; color:#000; }
}
@media (max-width:480px){
  .cs-meta{ grid-template-columns:minmax(0,1fr); }
  .cs-meta div{ padding-left:0 !important; border-left:0 !important; border-bottom:1px solid var(--line-soft); }
  .cs-meta div:last-child{ border-bottom:0; }
}

/* =========================================================
   v3: brand, interaction and photography
   ========================================================= */

/* warm ambient glow from the original site */
body::before{
  content:""; position:fixed; inset:0; pointer-events:none; z-index:-1;
  background:
    radial-gradient(900px 520px at 8% -10%, var(--glow-a), transparent 62%),
    radial-gradient(720px 480px at 96% 4%, var(--glow-b), transparent 60%);
}
main,.foot,.band{ position:relative; }

/* name: the original italic gold surname */
.hero h1 .family{ font-style:italic; font-weight:300; color:var(--accent); }

/* typewriter: an invisible sizer reserves space for the longest phrase, so nothing shifts */
.typer{ display:grid; font-family:var(--serif); font-weight:350; font-size:clamp(1.35rem,2.4vw,1.8rem); line-height:1.3; color:var(--text); margin:0 0 20px; max-width:30ch; letter-spacing:-.01em; }
.typer > *{ grid-area:1/1; }
.typer-sizer{ visibility:hidden; }
.typer-line{ min-width:0; }
.typer-cursor{ display:inline-block; width:2px; height:1.05em; margin-left:3px; vertical-align:-.15em; background:var(--accent); border-radius:1px; }
.typer.is-idle .typer-cursor{ animation:caret 1.1s ease-in-out infinite; }
@keyframes caret{ 0%,45%{ opacity:1 } 55%,100%{ opacity:0 } }

/* navigation: active page indicator and hover */
.topnav a{ position:relative; }
.topnav a::after{ content:""; position:absolute; left:12px; right:12px; bottom:3px; height:1.5px; border-radius:1px; background:var(--accent); transform:scaleX(0); transform-origin:left; transition:transform .25s var(--ease); }
.topnav a:hover::after{ transform:scaleX(.5); }
.topnav a.is-here{ background:transparent; }
.topnav a.is-here::after{ transform:scaleX(1); }
.mark:hover .mark-i{ border-color:var(--accent-line); color:var(--accent); }
.mark-i{ transition:border-color .2s var(--ease), color .2s var(--ease); }
.links a{ transition:border-color .2s var(--ease), color .2s var(--ease); }
.links a:hover{ border-color:var(--accent); }
.arrow-link:hover{ color:var(--accent); }

/* cards: lift, warm edge, image drift */
.card-p,.row-p,.feature{ transition:border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease); }
.card-p:hover,.row-p:hover{ border-color:var(--accent-line); box-shadow:var(--shadow); }
.media img,.photo img{ transition:transform .6s var(--ease); }
.card-p:hover .media img,.row-p:hover .media img{ transform:translateY(-4px); }
.card-p h3 a{ transition:color .2s var(--ease); }
.card-p:hover h3 a{ color:var(--accent); }
.card-p:focus-within{ border-color:var(--accent-line); }

/* zoomable photos */
.zoom{ display:block; position:relative; overflow:hidden; border-radius:inherit; cursor:zoom-in; color:inherit; }
.zoom img{ width:100%; height:100%; object-fit:cover; }
.zoom:hover img{ transform:scale(1.03); }
.zoom::after{
  content:""; position:absolute; right:10px; bottom:10px; width:30px; height:30px; border-radius:50%;
  background:rgba(15,13,11,.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F2EDE6' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7'/%3E%3C/svg%3E") center/14px no-repeat;
  opacity:0; transform:translateY(4px); transition:opacity .2s var(--ease), transform .2s var(--ease);
}
.zoom:hover::after,.zoom:focus-visible::after{ opacity:1; transform:none; }

/* lightbox (native <dialog>) */
.lightbox{ padding:0; border:0; background:transparent; max-width:min(1200px,94vw); max-height:94vh; width:auto; overflow:visible; color:#F2EDE6; }
.lightbox::backdrop{ background:rgba(8,7,6,.86); backdrop-filter:blur(4px); }
.lightbox[open]{ animation:lbIn .25s var(--ease); }
@keyframes lbIn{ from{ opacity:0; transform:scale(.98); } to{ opacity:1; transform:none; } }
.lightbox figure{ margin:0; }
.lightbox img{ max-width:min(1200px,94vw); max-height:80vh; width:auto; height:auto; border-radius:12px; margin:0 auto; background:#1B1815; }
.lightbox figcaption{ text-align:center; font-size:.92rem; color:#CEC6BA; margin-top:12px; min-height:1.4em; }
.lb-bar{ display:flex; justify-content:center; align-items:center; gap:10px; margin-top:12px; }
.lb-btn{ min-width:44px; height:44px; padding:0 14px; border-radius:999px; border:1px solid rgba(255,255,255,.18); background:rgba(255,255,255,.06); color:#F2EDE6; cursor:pointer; font-size:.9rem; }
.lb-btn:hover{ border-color:var(--accent); }
.lb-count{ font-size:.85rem; color:#9D9488; min-width:56px; text-align:center; font-variant-numeric:tabular-nums; }

/* editorial hackathon gallery */
.gallery{ display:grid; grid-template-columns:1.6fr 1fr; grid-template-rows:auto auto; gap:12px; margin-top:24px; }
.gallery figure{ margin:0; border-radius:var(--r-l); overflow:hidden; background:var(--surface); }
.gallery figure:first-child{ grid-row:1/3; }
.gallery figure:first-child .zoom{ height:100%; aspect-ratio:auto; }
.gallery .zoom{ aspect-ratio:3/2; }
.gallery figcaption{ font-size:.84rem; color:var(--muted); padding:10px 2px 0; background:var(--bg); }
.gallery figure{ display:flex; flex-direction:column; }
.gallery figure .zoom{ flex:1; }
.gallery figure:first-child img{ object-position:50% 40%; }
.gallery figure:not(:first-child) img{ object-position:50% 55%; }

/* homepage feature photo */
.feature-photo{ padding:0; justify-content:stretch; }
.feature-photo .zoom{ flex:1; min-height:280px; border-radius:0; }
.feature-photo img{ object-position:50% 45%; }
.feature-photo .photo-cap{ font-size:.82rem; color:var(--muted); padding:12px 18px 14px; border-top:1px solid var(--line-soft); }

/* about: hackathon highlight */
.highlight{ display:grid; grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); gap:0; border:1px solid var(--line-soft); border-radius:var(--r-l); overflow:hidden; background:var(--surface); margin-top:clamp(28px,4vw,44px); }
.highlight .zoom{ aspect-ratio:4/3; border-radius:0; }
.highlight .zoom img{ object-position:64% 60%; }
.highlight .body{ padding:clamp(20px,3vw,32px); align-self:center; }
.highlight h2{ font-size:clamp(1.4rem,2.4vw,1.8rem); margin-bottom:10px; }
.highlight p{ color:var(--text-2); }

/* project filter */
.filters{ display:flex; flex-wrap:wrap; gap:8px; margin:0 0 clamp(24px,3vw,32px); }
.filters[hidden]{ display:none; }
.chip{ min-height:38px; padding:6px 16px; border-radius:999px; border:1px solid var(--line); background:transparent; color:var(--text-2); cursor:pointer; font-size:.9rem; transition:border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease); }
.chip:hover{ border-color:var(--accent-line); color:var(--text); }
.chip[aria-pressed="true"]{ background:var(--accent-fill); border-color:var(--accent-fill); color:var(--accent-ink); }
.filter-status{ color:var(--muted); font-size:.88rem; align-self:center; margin-left:6px; }
[data-tags].is-filtered-out{ display:none; }

/* Loblaw progression: line fills as the timeline scrolls into view */
.ladder::after{ content:""; position:absolute; left:4px; top:10px; width:1px; height:calc(100% - 20px); background:var(--accent); transform-origin:top; transform:scaleY(var(--progress,1)); transition:transform .2s linear; }
.ladder .role::before{ transition:background .3s var(--ease), border-color .3s var(--ease); }
.ladder .role.lit::before{ background:var(--accent); border-color:var(--accent); }
.role{ transition:background .2s var(--ease); border-radius:10px; }
.xp-org:hover .xp-org-head h3{ color:var(--accent); }
.xp-org-head h3{ transition:color .25s var(--ease); }

/* smooth cross-page transitions where supported (Chromium, Safari 18+) */
@media (prefers-reduced-motion:no-preference){
  @view-transition{ navigation:auto; }
  ::view-transition-old(root),::view-transition-new(root){ animation-duration:.22s; }
}

@media (max-width:960px){
  .feature-photo .zoom{ min-height:0; aspect-ratio:3/2; flex:none; }
}
@media (max-width:680px){
  .gallery{ grid-template-columns:1fr 1fr; }
  .gallery figure:first-child{ grid-column:1/-1; grid-row:auto; }
  .gallery figure:first-child .zoom{ aspect-ratio:3/2; height:auto; }
  .highlight{ grid-template-columns:minmax(0,1fr); }
}
@media (prefers-reduced-motion:reduce){
  .typer.is-idle .typer-cursor{ animation:none; }
  .zoom:hover img,.card-p:hover .media img,.row-p:hover .media img{ transform:none; }
  .ladder::after{ transform:none; }
}
.gallery + .cs-block{ margin-top:clamp(48px,6vw,72px); }
.highlight + *{ margin-top:0; }
/* zoomable phone screenshots and browser frame */
.phones > a{ display:flex; align-items:flex-end; justify-content:center; height:94%; max-width:22%; border-radius:14px 14px 0 0; cursor:zoom-in; }
.phones > a:nth-child(2){ height:100%; }
.phones > a img{ max-width:100%; max-height:100%; transition:transform .3s var(--ease); }
.phones > a:hover img{ transform:translateY(-6px); }
.phones > a:focus-visible{ outline:2px solid var(--accent); outline-offset:3px; }
@media (max-width:520px){ .phones > a{ max-width:28%; } }
a.browser{ cursor:zoom-in; display:block; }
a.browser:hover img{ transform:scale(1.01); }
/* tablets: keep the portrait beside the introduction instead of stranded below it */
@media (min-width:641px) and (max-width:860px){
  .hero-grid{ grid-template-columns:minmax(0,1.35fr) minmax(0,.65fr); gap:28px; align-items:start; }
  .portrait{ justify-self:end; max-width:260px; margin-top:8px; }
}
