/* ==========================================================================
   Mostafa Dadkhah · personal portfolio
   Palette: shotcrete grey, graphite ink, hi-vis orange, cap-lamp yellow, cobalt.
   Type: Archivo (variable width) · Instrument Serif italic · Martian Mono.
   ========================================================================== */

:root {
  --paper: #E4E5E1;
  --paper-2: #D9DBD6;
  --paper-3: #C7CAC3;
  --ink: #121417;
  --ink-2: #40454D;
  --ink-3: #666B73;
  --line: rgba(18, 20, 23, .14);
  --line-2: rgba(18, 20, 23, .3);
  --hivis: #FF5B14;
  --lamp: #FFD21F;
  --ore: #2E3FE8;
  --on-hivis: #121417;

  /* dark closing block (contact) */
  --deep: #15181C;
  --deep-2: #1F2328;
  --on-deep: #E4E5E1;
  --on-deep-2: #B5B9BF;
  --on-deep-3: #8A8F96;

  /* earthquake section keeps one night look in both themes */
  --night: #0C0F2E;
  --night-2: #151A4A;
  --night-ink: #E8E9F6;
  --night-ink-2: #AEB2D6;

  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --f-mono: "Martian Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --gutter: clamp(16px, 3.6vw, 44px);
  --maxw: 1280px;
  --rule: 1.5px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0E1012;
    --paper-2: #15181B;
    --paper-3: #22272C;
    --ink: #E6E6E1;
    --ink-2: #B3B7BD;
    --ink-3: #8A8F96;
    --line: rgba(230, 230, 225, .13);
    --line-2: rgba(230, 230, 225, .28);
    --hivis: #FF6A26;
    --lamp: #FFD84A;
    --ore: #8290FF;
    --on-hivis: #111214;
    --deep: #1C2024;
    --deep-2: #262B31;
    --night: #090B22;
    --night-2: #12163F;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0E1012;
  --paper-2: #15181B;
  --paper-3: #22272C;
  --ink: #E6E6E1;
  --ink-2: #B3B7BD;
  --ink-3: #8A8F96;
  --line: rgba(230, 230, 225, .13);
  --line-2: rgba(230, 230, 225, .28);
  --hivis: #FF6A26;
  --lamp: #FFD84A;
  --ore: #8290FF;
  --on-hivis: #111214;
  --deep: #1C2024;
  --deep-2: #262B31;
  --night: #090B22;
  --night-2: #12163F;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h, 64px) + 12px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-display);
  font-size: 16px;
  line-height: 1.55;
  font-variation-settings: "wdth" 100;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas, video { max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--ore); outline-offset: 3px; }
::selection { background: var(--hivis); color: var(--on-hivis); }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--f-mono); }
.serif { font-family: var(--f-serif); font-style: italic; font-weight: 400; font-variation-settings: normal; letter-spacing: 0; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 14px; font: 600 13px/1 var(--f-mono); text-decoration: none; }
.skip:focus { top: 12px; }
.ic { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: square; flex: none; }
.star {
  display: inline-block; flex: none; width: .5em; height: .5em; background: currentColor;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
}

/* ---------- buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 16px;
  border: var(--rule) solid var(--ink);
  background: transparent; color: var(--ink);
  font: 600 12px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .06em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn .ic { transition: transform .25s var(--ease); }
.btn:hover .ic { transform: translate(2px, 0); }
.btn-solid { background: var(--ink); color: var(--paper); }
.btn:hover { background: var(--hivis); border-color: var(--hivis); color: var(--on-hivis); }
.btn-hot { background: var(--hivis); border-color: var(--hivis); color: var(--on-hivis); }
.btn-hot:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-sm { padding: 9px 12px; font-size: 10.5px; gap: 8px; }
.ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; padding: 8px 10px;
  border: 1px solid var(--line-2); color: var(--ink-2); text-decoration: none; white-space: nowrap;
  font: 500 10.5px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .05em;
  transition: background-color .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-current="true"] { background: var(--lamp); border-color: var(--lamp); color: #121417; }

/* ---------- sticky header ---------- */
.site-head {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.head-in {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
  gap: 8px 16px; min-height: 58px;
  max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter);
}
.logo {
  display: flex; align-items: center; gap: 9px;
  font: 900 20px/1 var(--f-display); font-variation-settings: "wdth" 125;
  letter-spacing: -.01em; text-decoration: none;
}
.logo i { width: 10px; height: 10px; background: var(--hivis); }
.focus { display: flex; align-items: center; gap: 6px; min-width: 0; }
.focus-gap { flex: 1 1 auto; min-width: 8px; }
.head-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; }
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 1.6; }
.icon-btn .fill { fill: var(--ink); stroke: none; }
.menu-btn {
  height: 36px; padding: 0 12px;
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
  font: 600 10.5px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; cursor: pointer;
}
.menu-btn:hover { background: var(--ink); color: var(--paper); }
@media (max-width: 1120px) {
  .head-in { grid-template-columns: auto 1fr auto; grid-template-areas: "logo . tools" "focus focus focus"; padding-block: 8px; min-height: 0; }
  .logo { grid-area: logo; }
  .head-tools { grid-area: tools; }
  .focus {
    grid-area: focus; overflow-x: auto; scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); padding-bottom: 1px;
  }
  .focus::-webkit-scrollbar { display: none; }
  .focus-gap { flex: 0 0 2px; min-width: 2px; }
}

/* section menu (overlay) */
.menu {
  position: fixed; inset: 0; z-index: 70;
  background: var(--deep); color: var(--on-deep);
  display: flex; flex-direction: column;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 24px);
  overflow-y: auto;
}
.menu-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 50px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; }
.menu-close { background: var(--hivis); border-color: var(--hivis); color: var(--on-hivis); }
.menu-close:hover { background: var(--on-deep); border-color: var(--on-deep); color: var(--deep); }
.menu-links { list-style: none; padding: 0; margin: auto 0; display: grid; max-width: 900px; }
.menu-links a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 0;
  border-top: 1px solid rgba(228, 229, 225, .16);
  font: 800 clamp(28px, 6vw, 52px)/1 var(--f-display); font-variation-settings: "wdth" 118;
  text-transform: uppercase; letter-spacing: -.015em; text-decoration: none;
}
.menu-links a .mono { order: 2; font: 500 10.5px/1 var(--f-mono); letter-spacing: .1em; color: var(--hivis); font-variation-settings: normal; }
.menu-links a:hover, .menu-links a[aria-current="true"] { color: var(--hivis); }
.motion .menu:not([hidden]) .menu-links li { animation: menuIn .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes menuIn { from { opacity: 0; transform: translateY(18px); } }

/* section rail (wide screens) */
.rail { display: none; }
@media (min-width: 1240px) {
  .wrap { padding-right: max(var(--gutter), 70px); }
  .rail {
    display: block; position: fixed; z-index: 40;
    right: 22px; top: 55%; transform: translateY(-50%);
    width: 24px; height: min(56vh, 500px);
    color: #fff; mix-blend-mode: difference;
  }
  .rail::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1.5px; margin-left: -.75px; background: currentColor; opacity: .4; }
  .rail a {
    position: absolute; left: 50%; top: calc(var(--y, 0) * 100%);
    width: 10px; height: 10px; margin: -5px 0 0 -5px;
    border: 1.5px solid currentColor; background: #000;
    transition: background-color .2s, transform .2s;
  }
  .rail a[aria-current="true"] { background: currentColor; transform: rotate(45deg); }
  .rail a span {
    position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
    white-space: nowrap; font: 500 10px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .08em;
    opacity: 0; transition: opacity .2s; pointer-events: none;
  }
  .rail a[aria-current="true"] span { transform: translateY(-50%) rotate(-45deg); transform-origin: right center; }
  .rail:hover a span, .rail a:focus-visible span { opacity: 1; }
  .rail-marker { position: absolute; left: 50%; top: calc(var(--prog, 0) * 100%); width: 18px; height: 3px; margin: -1.5px 0 0 -9px; background: currentColor; }
}

/* ---------- hero ---------- */
.hero { background: var(--paper); padding-top: 16px; }
.hero-meta {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px;
  padding-bottom: 10px; border-bottom: 1px solid var(--line);
  font-size: 10.5px; line-height: 1.4; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2);
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px clamp(24px, 4vw, 56px); align-items: center;
  padding-block: clamp(22px, 3vw, 40px) clamp(28px, 4vw, 48px);
}
.hero-text { display: grid; gap: 16px; align-content: center; min-width: 0; }
.name { min-width: 0; font-family: var(--f-display); font-weight: 900; line-height: .82; text-transform: uppercase; letter-spacing: -.012em; }
.name .line {
  display: block; width: max-content; white-space: nowrap;
  font-size: 5vw;
  font-variation-settings: "wdth" 125, "wght" 900;
}
.name .line-2 { margin-top: .05em; }
.name .ch {
  display: inline-block;
  font-variation-settings: "wdth" 125, "wght" calc(900 - var(--k, 0) * 600);
  transition: font-variation-settings .35s var(--ease), color .35s;
}
.name .line-2 .ch { color: transparent; -webkit-text-stroke: max(1.25px, .012em) var(--ink); }
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .name .line-2 .ch { color: color-mix(in srgb, var(--hivis) calc(var(--k, 0) * 100%), transparent); }
}
.name.intro .ch { animation: stretch 1.1s var(--ease) both; animation-delay: calc(var(--i) * 50ms + var(--row, 0) * 140ms); }
.name.intro .line-2 { --row: 1; }
@keyframes stretch { from { font-variation-settings: "wdth" 62, "wght" 200; } }
.role { display: flex; flex-wrap: wrap; gap: 6px; font-size: 10.5px; line-height: 1; text-transform: uppercase; letter-spacing: .06em; }
.role span { padding: 6px 8px; border: 1px solid; }
.role-a { color: var(--ore); border-color: color-mix(in srgb, var(--ore) 45%, transparent); background: color-mix(in srgb, var(--ore) 9%, transparent); }
.role-b { color: var(--ink); border-color: color-mix(in srgb, var(--hivis) 60%, transparent); background: color-mix(in srgb, var(--hivis) 14%, transparent); }
.lead { font: 400 clamp(18px, 1.6vw, 22px)/1.4 var(--f-display); letter-spacing: -.01em; max-width: 40ch; text-wrap: pretty; }
.lead .serif { font-size: 1.1em; line-height: 1; }
.hero-facts { margin: 4px 0 0; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 0 20px; max-width: 560px; }
.hero-facts > div { display: grid; gap: 2px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.hero-facts dt { font: 500 10px/1.3 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.hero-facts dd { margin: 0; font-size: 14px; line-height: 1.4; }

.hero-visual { display: grid; gap: 12px; min-width: 0; }
.bay-fig figcaption {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 14px;
  padding: 7px 10px; border-top: var(--rule) solid var(--ink);
  font-size: 10px; line-height: 1.4; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2);
}
.bay-fig { margin: 0; border: var(--rule) solid var(--ink); background: var(--paper-2); }
.bay-fig .fig-svg { padding: 6px 12px 8px; }
.hero-visual .hero-facts { margin: 0; }
.bay-fig figcaption { justify-content: flex-start; }
.bay-fig .note { margin-left: auto; text-transform: none; letter-spacing: 0; color: var(--ink-3); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .name .line { font-size: 11vw; }
}

/* legend keys (shared) */
.key { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.key i { display: inline-block; width: 12px; height: 8px; border: 1px solid var(--ink); flex: none; }
.k-loaded { background: var(--hivis); }
.k-empty { background: var(--ore); }
.k-res { background: color-mix(in srgb, var(--hivis) 45%, transparent); border-style: dashed !important; }

/* marquee */
.marquee { overflow: hidden; background: var(--lamp); color: #121417; border-block: 1px solid var(--ink); }
.marquee-track {
  display: flex; align-items: center; gap: .7em; width: max-content; padding-block: 8px;
  font: 700 clamp(13px, 1.2vw, 16px)/1 var(--f-display); font-variation-settings: "wdth" 112;
  text-transform: uppercase; letter-spacing: .01em;
}
.marquee-track span { white-space: nowrap; }
.motion .marquee-track { animation: marquee 60s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - .35em)); } }

/* ---------- sections & transitions ---------- */
.section { padding-block: clamp(56px, 7vw, 92px); }
.s-paper { background: var(--paper); }
.s-tint { background: var(--paper-2); --card: var(--paper); }
.s-night {
  --paper: var(--night); --paper-2: var(--night-2); --paper-3: #232A66; --card: #080A20;
  --ink: var(--night-ink); --ink-2: var(--night-ink-2); --ink-3: #8E92BA;
  --line: rgba(232, 233, 246, .16); --line-2: rgba(232, 233, 246, .3);
  background: var(--night); color: var(--ink);
}
.s-deep {
  --paper: var(--deep); --paper-2: var(--deep-2); --card: var(--deep-2);
  --ink: var(--on-deep); --ink-2: var(--on-deep-2); --ink-3: var(--on-deep-3);
  --line: rgba(228, 229, 225, .14); --line-2: rgba(228, 229, 225, .3);
  background: var(--deep); color: var(--ink);
}
.s-hivis {
  --ink: var(--on-hivis); --ink-2: var(--on-hivis); --ink-3: rgba(18, 20, 23, .7);
  --line: rgba(18, 20, 23, .22); --line-2: rgba(18, 20, 23, .42);
  --kpi-hot: var(--on-hivis); --kpi-base: rgba(18, 20, 23, .26); --kpi-soft: rgba(18, 20, 23, .5);
  background: var(--hivis); color: var(--on-hivis);
}

.sec-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 24px;
  padding-top: 10px; border-top: var(--rule) solid var(--ink);
  font-size: 10.5px; line-height: 1.4; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2);
}
.sec-head h2 { font: inherit; }
.sec-head b { color: var(--ink); font-weight: 700; }
.sec-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 18px; margin-top: 16px; }
.sec-title .t {
  font: 900 clamp(34px, 5vw, 72px)/.92 var(--f-display); font-variation-settings: "wdth" 122;
  text-transform: uppercase; letter-spacing: -.02em; text-wrap: balance;
}
.sec-title .k { font-size: clamp(21px, 2.4vw, 34px); line-height: 1.05; color: var(--ore); }
.s-night .sec-title .k { color: var(--lamp); }
.s-deep .sec-title .k { color: var(--hivis); }

/* reveal on scroll: content is visible by default; JS hides only what starts below the fold */
.rv-pre { opacity: 0; transform: translateY(22px); }
.rv-in { animation: rvIn .8s var(--ease) both; animation-delay: var(--d, 0ms); }
@keyframes rvIn { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 28px clamp(24px, 4vw, 56px); margin-top: 22px; align-items: start; }
.statement {
  font: 700 clamp(23px, 2.6vw, 36px)/1.14 var(--f-display); font-variation-settings: "wdth" 96;
  letter-spacing: -.02em; text-wrap: balance; max-width: 30ch;
}
.statement .serif { font-size: 1.08em; color: var(--ore); }
mark { background: var(--hivis); color: var(--on-hivis); padding: 0 .1em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.about-copy { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; margin-top: 20px; color: var(--ink-2); font-size: 15px; }
.about-side { display: grid; gap: 16px; align-items: start; }
.facts { margin: 0; display: grid; align-content: start; }
.facts > div { display: grid; gap: 1px; padding: 7px 0; border-top: 1px solid var(--line-2); }
.facts > div:last-child { border-bottom: 1px solid var(--line-2); }
.facts dt { font: 500 9.5px/1.3 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.facts dd { margin: 0; font-size: 13.5px; line-height: 1.38; }
@media (max-width: 1000px) {
  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .about-side { max-width: 620px; }
}
@media (max-width: 600px) { .about-copy { grid-template-columns: minmax(0, 1fr); } }

/* ---------- research intro & projects ---------- */
.sec-intro { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 10px 36px; margin-top: 22px; }
.intro-lead { font: 700 clamp(18px, 1.7vw, 23px)/1.3 var(--f-display); letter-spacing: -.01em; color: var(--ink); }
.sec-intro p:not(.intro-lead) { color: var(--ink-2); font-size: 15.5px; max-width: 68ch; }
@media (max-width: 900px) { .sec-intro { grid-template-columns: minmax(0, 1fr); } }

.projects { display: grid; gap: clamp(40px, 5vw, 64px); margin-top: clamp(32px, 4vw, 48px); }
.proj {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px clamp(24px, 3.6vw, 48px); align-items: start;
  padding-top: 14px; border-top: var(--rule) solid var(--ink);
}
.proj:nth-child(even) .proj-media { order: -1; }
.proj-text { display: grid; gap: 11px; align-content: start; color: var(--ink-2); font-size: 15px; min-width: 0; }
.proj-head { display: grid; gap: 7px; margin-bottom: 3px; }
.proj-idx { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.proj-idx::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; background: var(--hivis); }
.proj-title { font: 800 clamp(24px, 2.4vw, 34px)/1.04 var(--f-display); font-variation-settings: "wdth" 106; letter-spacing: -.022em; text-wrap: balance; color: var(--ink); }
.proj-title .serif { font-size: 1.08em; color: var(--ore); letter-spacing: -.005em; }
.proj-tech { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.proj-media { display: grid; gap: 12px; min-width: 0; position: sticky; top: calc(var(--head-h, 64px) + 16px); }
@media (max-width: 900px) {
  .proj { grid-template-columns: minmax(0, 1fr); }
  .proj:nth-child(even) .proj-media { order: 0; }
  .proj-media { position: static; }
}

/* figures */
.fig-svg { display: block; width: 100%; height: auto; overflow: visible; }
.svg-lbl { font: 500 10px var(--f-mono); fill: var(--ink-3); letter-spacing: .06em; }
.lbl-hot { fill: var(--ink); font-weight: 700; }
.svg-ink { fill: var(--ink); }
.mini-fig { margin: 0; border: var(--rule) solid var(--ink); background: var(--card, var(--paper-2)); }
.mini-fig .fig-svg { padding: 14px 18px; }
.mini-fig figcaption, .media-bar {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px;
  padding: 7px 10px; font-size: 10px; line-height: 1.4; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2);
}
.mini-fig figcaption { border-top: var(--rule) solid var(--ink); }
.proj-media .mini-fig .sc { max-width: 300px; margin-inline: auto; }
.proj-media .mini-fig .dt { max-width: 280px; margin-inline: auto; }
.proj-media .mini-fig .rh { max-width: 380px; margin-inline: auto; }
.mini-fig .fig-svg { padding: 10px 14px; }
@media (max-width: 600px) { .svg-lbl { font-size: 12px; } .st text { font-size: 12px; } }

/* video slot */
.media { margin: 0; border: var(--rule) solid var(--ink); background: var(--card, var(--paper-2)); }
.media-bar { border-bottom: var(--rule) solid var(--ink); }
.media-bar .file { color: var(--ink); font-weight: 700; text-transform: none; letter-spacing: .02em; }
.media-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #0E1114; }
.media-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s; }
.media-frame video.ok { opacity: 1; }
.media-ph {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center; padding: 16px;
  color: #E4E5E1;
  background-image: linear-gradient(rgba(228, 229, 225, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(228, 229, 225, .06) 1px, transparent 1px);
  background-size: 24px 24px;
}
.ph-play { display: grid; place-items: center; width: 52px; height: 52px; border: 1.5px solid #E4E5E1; border-radius: 50%; }
.ph-play::after { content: ""; margin-left: 4px; border-left: 15px solid #FF5B14; border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.ph-title { font: 700 17px/1.2 var(--f-display); }
.ph-sub { font-size: 10px; letter-spacing: .04em; color: #A7ABB1; }

/* statechart */
.sc-edge { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.sc-edge.dash { stroke-dasharray: 4 4; stroke: var(--ink-3); }
.st rect { fill: var(--card, var(--paper)); stroke: var(--ink); stroke-width: 1.5; }
.st text { font: 600 10.5px var(--f-mono); fill: var(--ink); text-anchor: middle; letter-spacing: .04em; }
.st5 rect { stroke-dasharray: 5 3; }
.st2 rect { fill: var(--hivis); }
.motion .st rect { animation: stOn 8s infinite; }
.motion .st2 rect { animation-delay: -6s; }
.motion .st3 rect { animation-delay: -4s; }
.motion .st4 rect { animation-delay: -2s; }
.motion .st5 rect { animation-name: stWait; }
@keyframes stOn { 0%, 21% { fill: var(--hivis); } 25%, 100% { fill: var(--card, var(--paper)); } }
@keyframes stWait { 0%, 54% { fill: var(--card, var(--paper)); } 57%, 66% { fill: var(--lamp); } 69%, 100% { fill: var(--card, var(--paper)); } }

/* traffic (hero) */
.road { fill: var(--paper-3); }
.lane { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 6 6; }
.resv { fill: var(--hivis); fill-opacity: .38; }
.truck rect { stroke: var(--ink); stroke-width: 1.2; }
.t-loaded rect { fill: var(--hivis); }
.t-empty rect { fill: var(--ore); }

/* rolling-horizon dispatch */
.horizon { fill: none; stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 4; }
.br { fill: none; stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke .3s, stroke-width .3s; }
.br.best { stroke: var(--hivis); stroke-width: 3.5; }
.end { fill: var(--card, var(--paper)); stroke: var(--ink); stroke-width: 1.3; transition: fill .3s; }
.end.end-best { fill: var(--hivis); }
.rh-val { font: 500 11px var(--f-mono); fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.rh-val.is-best { fill: var(--ink); font-weight: 800; }
.now { fill: var(--ink); }
.axis { stroke: var(--ink-3); stroke-width: 1; }
.motion .rh.run .br { animation: brDraw .8s var(--ease) both; animation-delay: calc(var(--i, 0) * 80ms); }
.motion .rh .rh-commit { opacity: 0; transition: opacity .3s; }
.motion .rh.decided .rh-commit { opacity: 1; }
@keyframes brDraw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* architecture */
.plate polygon { fill: var(--card, var(--paper)); stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; }
.pl1 polygon { fill: var(--lamp); }
.motion .plate polygon { animation: plate 6.4s infinite; }
.motion .pl2 polygon { animation-delay: .4s; }
.motion .pl3 polygon { animation-delay: .8s; }
.motion .pl4 polygon { animation-delay: 1.2s; }
@keyframes plate { 0%, 10% { fill: var(--lamp); } 16%, 100% { fill: var(--card, var(--paper)); } }
.shaft { stroke-width: 2; }
.shaft.cmd, .pulse.cmd, .sw.cmd { stroke: var(--hivis); fill: var(--hivis); }
.shaft.st-up, .pulse.st-up, .sw.st-up { stroke: var(--ore); fill: var(--ore); }
.pulse { stroke: none !important; }
.lead-line { stroke: var(--ink-3); stroke-width: 1; }
.chain { list-style: none; padding: 0; margin: 2px 0; display: flex; flex-wrap: wrap; gap: 5px; counter-reset: c; }
.chain li { counter-increment: c; display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid var(--line-2); font-size: 10.5px; line-height: 1.2; text-transform: uppercase; letter-spacing: .04em; color: var(--ink); }
.chain li::before { content: counter(c); display: grid; place-items: center; width: 15px; height: 15px; background: var(--ink); color: var(--paper); font-size: 9px; }

/* KPI tiles with glyphs */
.kpis { list-style: none; padding: 0; margin: 4px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.kpis-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 420px; }
.kpis-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpis li { display: grid; gap: 5px; align-content: start; padding: 12px 0; border-top: 1px solid var(--line-2); }
.kpis b { font: 800 clamp(21px, 1.9vw, 27px)/1 var(--f-display); font-variation-settings: "wdth" 104; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi-l { font: 400 10.5px/1.4 var(--f-mono); color: var(--ink-2); }
.kpi-ic { display: block; height: 16px; }
.kpi-ic svg { display: block; height: 100%; width: auto; overflow: visible; }
.kpi-ic.lg { height: 30px; }
.kpi-ic .ic-base { fill: var(--kpi-base, var(--line-2)); }
.kpi-ic .ic-hot { fill: var(--kpi-hot, var(--hivis)); }
.kpi-ic .ic-soft { fill: var(--kpi-soft, color-mix(in srgb, var(--hivis) 42%, transparent)); }
.kpi-ic .ic-ln { fill: none; stroke: var(--ink-2); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.kpi-ic .ic-lnh { fill: none; stroke: var(--kpi-hot, var(--hivis)); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kpi-ic .ic-dot { fill: var(--kpi-hot, var(--hivis)); }
@media (max-width: 560px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.frac { display: inline-flex; align-items: flex-start; letter-spacing: 0; }
.frac sup, .frac sub { font-size: .62em; line-height: 1; }
.frac sub { align-self: flex-end; }

/* skill tags */
.skills { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.skills::before { content: "Skills"; margin-right: 4px; font: 600 9.5px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.skills li { padding: 5px 7px; border: 1px solid var(--line-2); background: var(--card, var(--paper-2)); font: 500 10px/1.1 var(--f-mono); letter-spacing: .02em; color: var(--ink); }

/* ---------- results band ---------- */
.results-in { padding-block: clamp(44px, 5.5vw, 72px); }
.stripes { height: 10px; background: repeating-linear-gradient(-45deg, #121417 0 8px, #FFD21F 8px 16px); background-size: 22.63px 22.63px; }
.motion .stripes { animation: stripes 2.4s linear infinite; }
@keyframes stripes { to { background-position: 22.63px 0; } }
.stats { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: var(--rule) solid var(--on-hivis); }
.stats li { display: grid; gap: 10px; align-content: start; padding: 18px 18px 22px 0; border-bottom: var(--rule) solid var(--on-hivis); min-width: 0; }
.stats li:not(:nth-child(3n + 1)) { padding-left: 18px; border-left: var(--rule) solid var(--on-hivis); }
.stat { font: 900 clamp(40px, 4.6vw, 68px)/.9 var(--f-display); font-variation-settings: "wdth" 92; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-l { font: 500 12px/1.45 var(--f-mono); max-width: 34ch; }
@media (max-width: 1000px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats li:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
  .stats li:nth-child(even) { padding-left: 18px; border-left: var(--rule) solid var(--on-hivis); }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: minmax(0, 1fr); }
  .stats li:nth-child(even) { padding-left: 0; border-left: 0; }
}

/* ---------- earlier work (night) ---------- */
.relief-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px clamp(24px, 4vw, 56px); margin-top: clamp(24px, 3vw, 40px); align-items: start; }
.relief-copy { display: grid; gap: 16px; align-content: start; color: var(--ink-2); font-size: 15px; }
.lead-s { font: 400 clamp(17px, 1.5vw, 20px)/1.45 var(--f-display); color: var(--ink); letter-spacing: -.005em; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 22px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .5em; width: 10px; height: 10px; background: var(--hivis); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.ticks strong { color: var(--ink); font-weight: 700; }
.policy { padding: 12px 14px; border-left: 3px solid var(--lamp); background: var(--paper-2); color: var(--ink); font-size: 14.5px; }
.small { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }

.scenes { margin: 0; border: var(--rule) solid var(--ink); background: var(--card); position: sticky; top: calc(var(--head-h, 64px) + 16px); }
.fig-bar { display: flex; justify-content: space-between; gap: 12px; padding: 7px 10px; border-bottom: var(--rule) solid var(--ink); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.fig-bar b { color: var(--lamp); font-variant-numeric: tabular-nums; }
.sc-svg { display: block; width: 100%; height: auto; }
.sc-cap { padding: 10px 12px; border-top: 1px solid var(--line-2); min-height: 128px; }
.sc-step { font-size: 9.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.sc-title { margin-top: 3px; font: 700 16px/1.25 var(--f-display); color: var(--ink); }
.sc-text { margin-top: 3px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.sc-ctrl { display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-top: 1px solid var(--line-2); }
.sc-btn { display: inline-grid; place-items: center; height: 28px; min-width: 28px; padding: 0 8px; border: 1px solid var(--line-2); background: transparent; color: var(--ink); cursor: pointer; font: 600 9.5px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; }
.sc-btn:hover { border-color: var(--ink); }
.sc-play { min-width: 58px; }
.sc-dots { display: flex; gap: 2px; margin-inline: auto; }
.sc-dots button { width: 24px; height: 20px; padding: 0; border: 0; background: transparent; cursor: pointer; display: grid; align-items: center; }
.sc-dots button::before { content: ""; display: block; height: 4px; background: var(--line-2); transition: background-color .2s; }
.sc-dots button[aria-current="true"]::before { background: var(--lamp); }
.sc-progress { height: 2px; background: var(--line); }
.sc-progress i { display: block; height: 100%; width: 0; background: var(--lamp); }
.scenes figcaption { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 8px 12px; border-top: var(--rule) solid var(--ink); font-size: 9.5px; line-height: 1.4; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
.scenes .key i { border: 0; height: 0; width: 16px; }
.k-assumed { border-top: 1.5px dashed var(--ink-3) !important; }
.k-aclosed { border-top: 1.5px dashed #FF6A26 !important; }
.k-open { border-top: 2px solid var(--ink) !important; }
.k-closed { border-top: 3px solid #FF6A26 !important; }
.k-team { width: 10px !important; height: 10px !important; border-radius: 50%; background: #FFD84A; }
/* scene drawing */
.sc-svg .lk { stroke-width: 2; stroke-linecap: round; transition: stroke .3s, stroke-width .3s; }
.sc-svg .lk-assumed { stroke: var(--ink-3); stroke-dasharray: 4 5; }
.sc-svg .lk-aclosed { stroke: #FF6A26; stroke-dasharray: 4 5; opacity: .75; }
.sc-svg .lk-open { stroke: var(--ink-2); }
.sc-svg .lk-closed { stroke: #FF6A26; stroke-width: 3.5; }
.sc-svg .lk-opening { stroke: #FF6A26; stroke-width: 2; opacity: .6; }
.sc-svg .lk-x { stroke: #FF6A26; stroke-width: 2.5; stroke-linecap: round; fill: none; }
.sc-svg .lk-prog { stroke: #FFD84A; stroke-width: 4; stroke-linecap: round; }
.sc-svg .rt { fill: none; stroke: #FFD84A; stroke-width: 1.2; stroke-dasharray: 2 4; opacity: .55; }
.sc-svg .rt-new { stroke-dasharray: none; stroke-width: 2; opacity: .9; }
.sc-svg .rt-alt { stroke: #FFD84A; stroke-dasharray: none; stroke-width: 2.5; opacity: .9; }
.sc-svg .nd-j { fill: var(--ink-2); }
.sc-svg .nd-depot { fill: var(--paper-2); stroke: var(--ink); stroke-width: 1.5; }
.sc-svg .nd-zone { fill: var(--paper-2); stroke: var(--ink); stroke-width: 1.5; }
.sc-svg .nd-zone.rev { fill: #FF6A26; stroke: #FF6A26; }
.sc-svg .nd-t { font: 700 8.5px var(--f-mono); fill: var(--ink); }
.sc-svg .zn-n { font: 800 11px var(--f-display); fill: var(--ink); }
.sc-svg .zn-n.rev { fill: #111214; }
.sc-svg .zn-t { font: 500 8.5px var(--f-mono); fill: var(--ink-2); letter-spacing: .03em; }
.sc-svg .zn-t.rev { fill: #FFD84A; font-weight: 700; }
.sc-svg .tm circle { fill: #FFD84A; stroke: #080A20; stroke-width: 1.5; }
.sc-svg .tm text { font: 800 8.5px var(--f-mono); fill: #111214; text-anchor: middle; }
.sc-svg .ring { fill: none; stroke: #FFFFFF; stroke-width: 1.5; }
.sc-svg .pulse-r { fill: none; stroke: #FFD84A; stroke-width: 1.5; }
.sc-svg .opt { font: 700 8.5px var(--f-mono); fill: #FFD84A; letter-spacing: .04em; }
.sc-svg .opt.warn { fill: #FF6A26; }
@media (max-width: 600px) { .sc-svg .opt, .sc-svg .zn-t, .sc-svg .nd-t { font-size: 11px; } .sc-svg .tm text { font-size: 10px; } }

.nums { list-style: none; padding: 0; margin: clamp(36px, 5vw, 56px) 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); border-top: 1px solid var(--line); }
.nums li { display: grid; gap: 6px; align-content: start; padding: 14px 20px 14px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.nums b { font: 900 clamp(28px, 2.8vw, 40px)/.9 var(--f-display); font-variation-settings: "wdth" 100; letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.nums li > span:last-child { font: 500 10px/1.3 var(--f-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
@media (max-width: 900px) { .relief-grid { grid-template-columns: minmax(0, 1fr); } .scenes { position: static; } }

/* ---------- toolkit ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.filters button {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 11px; border: 1px solid var(--ink); background: transparent; cursor: pointer;
  font: 600 10.5px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .06em;
}
.filters button i { width: 8px; height: 8px; background: var(--c); border: 1px solid var(--ink); }
.filters button:hover { background: var(--paper-2); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.wall { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3em .6em; margin-top: 22px; line-height: 1.05; max-width: 1080px; }
.w { transition: opacity .35s, color .35s; }
.wall[data-active] .w { opacity: .14; }
.wall[data-active] .w.is-on { opacity: 1; }
.w-xl { font: 900 clamp(26px, 3.1vw, 44px)/.95 var(--f-display); font-variation-settings: "wdth" 120; text-transform: uppercase; letter-spacing: -.02em; }
.w-l { font: 700 clamp(19px, 2vw, 28px)/1.05 var(--f-display); letter-spacing: -.015em; }
.w-m { font: 500 clamp(15px, 1.4vw, 20px)/1.15 var(--f-display); }
.w-s { font: 500 clamp(10.5px, .9vw, 12px)/1.3 var(--f-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.w-serif { font-family: var(--f-serif); font-style: italic; font-weight: 400; font-variation-settings: normal; letter-spacing: 0; }
.w-l.w-serif { font-size: clamp(21px, 2.3vw, 31px); color: var(--ore); }
.w-m.w-serif { font-size: clamp(17px, 1.6vw, 23px); }
.w small { font: 500 10px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }

/* ---------- timeline ---------- */
.gantt-wrap { margin-top: clamp(28px, 3.5vw, 44px); overflow-x: auto; border-top: var(--rule) solid var(--ink); padding-bottom: 4px; }
.gantt { position: relative; min-width: 740px; --lab: clamp(220px, 26%, 310px); }
.g-row { display: grid; grid-template-columns: var(--lab) minmax(0, 1fr); align-items: center; border-bottom: 1px solid var(--line); min-height: 48px; }
.g-label { display: grid; gap: 1px; padding: 7px 16px 7px 0; font-size: 14px; line-height: 1.25; }
.g-label b { font-weight: 700; }
.g-label .mono { font-size: 9.5px; line-height: 1.35; color: var(--ink-3); letter-spacing: .02em; }
.g-track { position: relative; align-self: stretch; background-image: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px calc(100% / 15)); }
.g-bar {
  position: absolute; top: 50%; height: 12px; margin-top: -6px;
  left: calc(var(--s) / 15 * 100%); width: calc((var(--e) - var(--s)) / 15 * 100%);
  background: var(--c, var(--ink)); transform-origin: left center;
}
.k-study { --c: var(--ink); }
.k-research { --c: var(--ore); }
.k-teach { --c: var(--lamp); }
.k-role { --c: var(--hivis); }
.g-bar.now { background: linear-gradient(90deg, var(--c) 80%, color-mix(in srgb, var(--c) 30%, transparent)); }
.g-ms { position: absolute; top: 50%; left: calc(var(--s) / 15 * 100%); width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; background: var(--ore); transform: rotate(45deg); border: 1.5px solid var(--paper-2); }
.g-ms.k-role { background: var(--hivis); }
.rv-in .g-bar { animation: grow 1s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + 150ms); }
@keyframes grow { from { transform: scaleX(0); } }
.g-axis { min-height: 30px; border-bottom: var(--rule) solid var(--ink); }
.g-axis .g-label { font-size: 9.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.g-axis .g-track span { position: absolute; top: 50%; transform: translateY(-50%); left: calc(var(--s) / 15 * 100%); padding-left: 5px; font: 500 9.5px/1 var(--f-mono); color: var(--ink-2); }
.g-now { position: absolute; top: 0; bottom: 0; left: calc(var(--lab) + (100% - var(--lab)) * 14.74 / 15); border-left: 1.5px dashed var(--hivis); }
.g-now .mono { position: absolute; bottom: 6px; right: 5px; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink); background: var(--paper-2); padding: 1px 3px; }
.g-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding-top: 12px; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.g-legend .key i { background: var(--c); border: 0; }
.g-legend .key i.k-ms { background: var(--ore); width: 8px; height: 8px; transform: rotate(45deg); }

.lists { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px clamp(20px, 3vw, 40px); margin-top: clamp(36px, 4.5vw, 56px); }
.list-h { padding: 8px 0; border-top: var(--rule) solid var(--ink); border-bottom: 1px solid var(--line-2); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; }
.list ul { list-style: none; padding: 0; margin: 0; }
.list li { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list .yr { font-size: 10px; line-height: 1.8; color: var(--ore); letter-spacing: .02em; }
.list b { display: block; font-size: 14.5px; line-height: 1.3; }
.list p { font-size: 14px; line-height: 1.45; color: var(--ink-2); margin-top: 2px; }
@media (max-width: 1000px) { .lists { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .lists .list:last-child { grid-column: 1 / -1; } }
@media (max-width: 640px) { .lists { grid-template-columns: minmax(0, 1fr); } }

/* ---------- contact (deep) ---------- */
.contact { padding-bottom: 0; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 28px clamp(24px, 4vw, 56px); margin-top: 22px; }
.contact-main { display: grid; gap: 20px; align-content: start; }
.contact .lead { max-width: 34ch; }
.contact-facts dd { font-size: 16px; }
.flag { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; margin-left: 4px; }
@media (max-width: 800px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
.footer { margin-top: clamp(48px, 6vw, 80px); border-top: 1px solid var(--line); }
.footer-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 28px; padding-block: 18px calc(18px + env(safe-area-inset-bottom, 0px)); font-size: 10px; line-height: 1.5; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.footer a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); }
.footer a:hover { color: var(--hivis); }

/* ---------- motion safety ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .rv-pre { opacity: 1; transform: none; }
}
@media print {
  .site-head, .rail, .menu, .marquee, .stripes, .sc-ctrl { display: none !important; }
  .rv-pre { opacity: 1 !important; transform: none !important; }
}
