/* ==========================================================================
   Seam Saif — portfolio and CV
   Design tokens, layout and components. Dark and light themes share every
   rule; only the custom properties below change.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --container: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 64px;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 18px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* dark theme (default) */
  color-scheme: dark;
  --bg: #070d18;
  --bg-glow: rgba(56, 189, 248, .07);
  --header-bg: rgba(7, 13, 24, .82);
  --surface: rgba(13, 21, 37, .9);
  --surface-solid: #0d1525;
  --surface-2: #121c2f;
  --surface-3: #18243b;
  --border: #1c2940;
  --border-strong: #2a3a5a;
  --text: #e6ecf5;
  --text-2: #b3bfd2;
  --muted: #8392ab;
  --accent: #38bdf8;
  --accent-strong: #7dd3fc;
  --accent-ink: #03121d;
  --accent-soft: rgba(56, 189, 248, .12);
  --copper: #e3a75c;
  --copper-soft: rgba(227, 167, 92, .13);
  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, .12);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, .12);
  --info: #60a5fa;
  --info-soft: rgba(96, 165, 250, .13);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, .12);
  --input-bg: #0a1220;
  --pin: #7d8ea8;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 18px 40px -22px rgba(0, 0, 0, .75);
  --backdrop: rgba(2, 6, 13, .74);

  /* circuit background (read by circuit-bg.js) */
  --trace: rgba(120, 150, 195, .13);
  --trace-node: rgba(140, 170, 215, .26);
  --signal: #38bdf8;
  --signal-alt: #e3a75c;
}

/* light theme: chosen explicitly, or by the system when no choice is stored */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6fa;
  --bg-glow: rgba(3, 105, 161, .06);
  --header-bg: rgba(244, 246, 250, .85);
  --surface: rgba(255, 255, 255, .93);
  --surface-solid: #ffffff;
  --surface-2: #f1f4f9;
  --surface-3: #e7ecf4;
  --border: #dde3ec;
  --border-strong: #c3cddc;
  --text: #0c1424;
  --text-2: #344256;
  --muted: #5a6a80;
  --accent: #0369a1;
  --accent-strong: #075985;
  --accent-ink: #ffffff;
  --accent-soft: rgba(3, 105, 161, .08);
  --copper: #9a5b16;
  --copper-soft: rgba(154, 91, 22, .1);
  --ok: #047857;
  --ok-soft: rgba(4, 120, 87, .09);
  --warn: #8a5a00;
  --warn-soft: rgba(161, 98, 7, .1);
  --info: #1d4ed8;
  --info-soft: rgba(29, 78, 216, .08);
  --danger: #b91c1c;
  --danger-soft: rgba(185, 28, 28, .08);
  --input-bg: #ffffff;
  --pin: #9aa8bc;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 18px 40px -24px rgba(15, 23, 42, .28);
  --backdrop: rgba(15, 23, 42, .55);

  --trace: rgba(40, 60, 95, .085);
  --trace-node: rgba(40, 60, 95, .17);
  --signal: #0284c7;
  --signal-alt: #c2410c;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --bg: #f4f6fa;
    --bg-glow: rgba(3, 105, 161, .06);
    --header-bg: rgba(244, 246, 250, .85);
    --surface: rgba(255, 255, 255, .93);
    --surface-solid: #ffffff;
    --surface-2: #f1f4f9;
    --surface-3: #e7ecf4;
    --border: #dde3ec;
    --border-strong: #c3cddc;
    --text: #0c1424;
    --text-2: #344256;
    --muted: #5a6a80;
    --accent: #0369a1;
    --accent-strong: #075985;
    --accent-ink: #ffffff;
    --accent-soft: rgba(3, 105, 161, .08);
    --copper: #9a5b16;
    --copper-soft: rgba(154, 91, 22, .1);
    --ok: #047857;
    --ok-soft: rgba(4, 120, 87, .09);
    --warn: #8a5a00;
    --warn-soft: rgba(161, 98, 7, .1);
    --info: #1d4ed8;
    --info-soft: rgba(29, 78, 216, .08);
    --danger: #b91c1c;
    --danger-soft: rgba(185, 28, 28, .08);
    --input-bg: #ffffff;
    --pin: #9aa8bc;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
    --shadow: 0 18px 40px -24px rgba(15, 23, 42, .28);
    --backdrop: rgba(15, 23, 42, .55);
    --trace: rgba(40, 60, 95, .085);
    --trace-node: rgba(40, 60, 95, .17);
    --signal: #0284c7;
    --signal-alt: #c2410c;
  }
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(1100px 560px at 85% -8%, var(--bg-glow), transparent 65%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html.modal-open { overflow: hidden; }

img,
video,
svg { display: block; max-width: 100%; }
img,
video { height: auto; }

h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 600; letter-spacing: -.01em; color: var(--text); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
strong { font-weight: 600; color: var(--text); }
em { font-style: italic; }
time { font-variant-numeric: tabular-nums; }

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover { color: var(--accent-strong); text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: var(--accent); color: var(--accent-ink); }

button,
input,
textarea,
select { font: inherit; color: inherit; }
button { cursor: pointer; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; color: var(--accent-ink); text-decoration: none; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono { font-family: var(--font-mono); font-size: .92em; }

/* ---------- Circuit background ---------- */
.circuit-bg {
  position: fixed;
  inset: 0 0 auto 0;
  height: 100vh;
  height: 100lvh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.circuit-layer {
  position: absolute;
  top: 0;
  left: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 44px;
  padding: .62em 1.15em;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-strong); color: var(--accent-ink); }

.btn-secondary { background: var(--surface-2); border-color: var(--border-strong); color: var(--text); }
.btn-secondary:hover { border-color: var(--accent); color: var(--text); }

.btn-ghost { background: transparent; color: var(--accent); border-color: transparent; }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-strong); }

.btn-sm { min-height: 38px; padding: .45em .9em; font-size: .88rem; border-radius: 9px; }

.btn[disabled],
.btn[aria-busy="true"] { opacity: .65; cursor: progress; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text-2);
  transition: border-color .18s var(--ease), color .18s var(--ease);
}
.icon-btn:hover { border-color: var(--accent); color: var(--text); }
.icon-btn .icon { width: 19px; height: 19px; }

/* ---------- Header and navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid transparent;
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  transition: border-color .2s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--border); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -.01em;
}
.brand:hover { color: var(--text); text-decoration: none; }

.brand-mark {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--accent);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
}
/* three pins on each side of the logo chip */
.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  width: 4px;
  background: repeating-linear-gradient(to bottom, var(--accent) 0 2.5px, transparent 2.5px 7px);
}
.brand-mark::before { left: -5.5px; }
.brand-mark::after { right: -5.5px; }

.site-nav { margin-left: auto; }
.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}
.nav-link {
  position: relative;
  display: block;
  padding: 8px 11px;
  border-radius: 8px;
  color: var(--text-2);
  font-size: .93rem;
  font-weight: 500;
}
.nav-link:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav-link[aria-current="true"] { color: var(--text); }
.nav-link[aria-current="true"]::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}
.nav-cv { display: none; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-header-actions { margin-left: auto; }
.nav-toggle { display: none; }

/* theme and motion toggle icons */
.theme-toggle .icon-moon,
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

.motion-toggle .icon-off,
:root[data-motion="off"] .motion-toggle .icon-on { display: none; }
:root[data-motion="off"] .motion-toggle .icon-off { display: block; }

@media (max-width: 1079px) {
  .nav-toggle { display: inline-grid; }
  .header-cv { display: none; }
  .header-actions { margin-left: auto; }
  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    padding: 12px var(--gutter) 20px;
    background: var(--surface-solid);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-link { padding: 12px 12px; font-size: 1rem; }
  .nav-link[aria-current="true"] { background: var(--accent-soft); }
  .nav-link[aria-current="true"]::after { display: none; }
  .nav-cv { display: flex; width: 100%; margin-top: 12px; }
}

/* ---------- Sections ---------- */
main { position: relative; }

.section { padding-block: clamp(64px, 9vw, 112px); }
.section + .section { padding-top: clamp(24px, 4vw, 48px); }

.section-head { margin-bottom: clamp(28px, 4vw, 44px); max-width: 760px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.eyebrow-index { color: var(--muted); }
/* a short trace ending in a via */
.eyebrow::after {
  content: "";
  width: 64px;
  height: 9px;
  background:
    radial-gradient(circle at calc(100% - 4.5px) 50%, transparent 0 2px, var(--accent) 2.5px 4px, transparent 4.5px),
    linear-gradient(var(--accent), var(--accent)) left center / calc(100% - 9px) 1px no-repeat;
  opacity: .8;
}

.section-title { font-size: clamp(1.75rem, 1.25rem + 2vw, 2.4rem); }
.section-intro { margin-top: 12px; color: var(--text-2); font-size: 1.04rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(18px, 2.4vw, 26px);
  box-shadow: var(--shadow-sm);
}

.lead { font-size: 1.12rem; color: var(--text-2); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-warn { color: var(--warn); background: var(--warn-soft); }
.badge-ok { color: var(--ok); background: var(--ok-soft); }
.badge-info { color: var(--info); background: var(--info-soft); }

.tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: .8rem;
}
.tag-accent { color: var(--accent); border-color: transparent; background: var(--accent-soft); font-weight: 600; }

.cite {
  font-family: var(--font-mono);
  font-size: .86em;
  font-weight: 500;
  white-space: nowrap;
}

/* ---------- Hero ---------- */
.hero { padding-top: clamp(40px, 8vh, 96px); padding-bottom: clamp(48px, 7vw, 80px); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .9fr);
  align-items: center;
  gap: clamp(32px, 6vw, 72px);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 6px 14px 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: .86rem;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px var(--ok-soft);
}

.hero-title {
  font-size: clamp(2.8rem, 1.9rem + 4.4vw, 4.6rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.04;
}
.hero-role {
  margin-top: 12px;
  font-size: clamp(1.2rem, 1rem + 1vw, 1.55rem);
  font-weight: 500;
  color: var(--accent);
}
.hero-tagline {
  margin-top: 6px;
  color: var(--copper);
  font-family: var(--font-mono);
  font-size: .95rem;
}
.hero-lead {
  max-width: 60ch;
  margin-top: 20px;
  color: var(--text-2);
  font-size: 1.08rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.social-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
  list-style: none;
}
.social-link {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-2);
  transition: border-color .18s var(--ease), color .18s var(--ease);
}
.social-link:hover { border-color: var(--accent); color: var(--text); }
.social-link .icon { width: 19px; height: 19px; }

/* The profile "chip": an IC package with pins, holding a small datasheet. */
.hero-chip { display: flex; justify-content: center; padding-inline: 14px; }
.chip {
  position: relative;
  width: min(100%, 390px);
  padding: 30px 26px 20px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface-3), var(--surface-solid) 55%);
  box-shadow: var(--shadow);
}
.chip-notch {
  position: absolute;
  top: -1px;
  left: 50%;
  width: 46px;
  height: 20px;
  transform: translateX(-50%);
  border: 1px solid var(--border-strong);
  border-top: 0;
  border-radius: 0 0 23px 23px;
  background: var(--bg);
}
.chip-pins {
  position: absolute;
  top: 40px;
  bottom: 40px;
  width: 13px;
  background: repeating-linear-gradient(to bottom, var(--pin) 0 7px, transparent 7px 27px);
  opacity: .8;
}
.chip-pins-left { left: -14px; }
.chip-pins-right { right: -14px; }
.chip-dot {
  position: absolute;
  top: 16px;
  left: 18px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--copper);
}

.chip-label {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-align: right;
}
.chip-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 14px 0 16px;
}
.chip-avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent-soft), var(--copper-soft)), var(--surface-2);
  border: 1.5px solid var(--border-strong);
}
.chip-initials {
  color: var(--text);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.chip-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.chip-name { font-size: 1.2rem; font-weight: 600; }
.chip-part {
  margin-top: 2px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: .82rem;
}

.chip-specs { margin: 0; }
.chip-specs div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 9px 0;
  border-top: 1px dashed var(--border-strong);
}
.chip-specs dt {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.chip-specs dd {
  margin: 0;
  color: var(--text);
  font-size: .93rem;
  font-weight: 500;
  text-align: right;
}
.chip-foot {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-strong);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .06em;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: clamp(40px, 6vw, 64px);
  list-style: none;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.stat-value {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.stat-value small { font-size: .95rem; color: var(--muted); font-weight: 500; }
.stat-label { color: var(--text-2); font-size: .9rem; line-height: 1.45; }
.stat-label span { display: block; color: var(--muted); font-size: .82rem; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}
.about-text { display: grid; gap: 16px; }
.about-text p:not(.lead) { color: var(--text-2); }

.focus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  list-style: none;
}
.focus-card { display: grid; gap: 8px; align-content: start; }
.focus-card h3 { font-size: 1.02rem; }
.focus-card p { color: var(--text-2); font-size: .93rem; }
.icon-tile {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
}
.icon-tile .icon { width: 21px; height: 21px; }
.icon-tile-copper { background: var(--copper-soft); color: var(--copper); }

/* ---------- Education timeline ---------- */
.timeline {
  position: relative;
  display: grid;
  gap: 16px;
  list-style: none;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 30px;
  bottom: 30px;
  left: 11px;
  width: 2px;
  background: linear-gradient(var(--accent), var(--border-strong) 70%);
  opacity: .55;
}
.timeline-item { position: relative; padding-left: 42px; }
.timeline-marker {
  position: absolute;
  top: 28px;
  left: 4px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.edu-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 20px;
}
.edu-row + .edu-row { margin-top: 6px; }
.edu-degree { font-size: 1.12rem; }
.edu-degree span { font-weight: 400; color: var(--text-2); }
.edu-grade { font-variant-numeric: tabular-nums; white-space: nowrap; }
.edu-grade span {
  margin-right: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.edu-grade strong { font-size: 1.05rem; }
.edu-school { color: var(--text-2); }
.edu-date { color: var(--muted); font-size: .92rem; white-space: nowrap; }
.edu-note {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--text-2);
  font-size: .94rem;
}
.edu-note .icon { margin-top: .25em; color: var(--copper); }

/* ---------- Research ---------- */
.pub-list { display: grid; gap: 16px; }
.pub-card { display: grid; gap: 10px; scroll-margin-top: calc(var(--header-h) + 24px); transition: border-color .3s var(--ease), box-shadow .3s var(--ease); }
.pub-card:target { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.pub-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}
.pub-key {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: .82rem;
  font-weight: 500;
}
.pub-type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.pub-meta .badge { margin-left: auto; }
.pub-title { font-size: 1.12rem; line-height: 1.4; }
.pub-authors,
.pub-venue { color: var(--text-2); font-size: .95rem; }
.pub-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.pub-related {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
  font-size: .92rem;
  font-weight: 500;
}

/* ---------- Projects ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: .9rem;
  font-weight: 500;
  transition: border-color .18s var(--ease), color .18s var(--ease), background-color .18s var(--ease);
}
.filter-btn:hover { border-color: var(--border-strong); color: var(--text); }
.filter-btn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.filter-count {
  min-width: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .75rem;
  text-align: center;
}
.filter-btn[aria-pressed="true"] .filter-count { background: var(--accent); color: var(--accent-ink); }

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 20px;
  list-style: none;
}
.project-item[hidden] { display: none; }
.project-item { scroll-margin-top: calc(var(--header-h) + 24px); }

.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
  overflow: hidden;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.project-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }

.project-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface-2);
  cursor: pointer;
}
.project-media img { width: 100%; height: 100%; object-fit: cover; }
.project-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(5, 10, 19, .78);
  color: #e6ecf5;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .04em;
}

/* illustrated covers for projects without photos */
.cover-diagram {
  width: 100%;
  height: 100%;
  background-color: var(--surface-2);
  background-image: radial-gradient(var(--border-strong) 1px, transparent 1.2px);
  background-size: 16px 16px;
}
.cover-diagram svg { width: 100%; height: 100%; }
.dg-box { fill: var(--surface-solid); stroke: var(--border-strong); stroke-width: 1.2; }
.dg-mcu { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.6; }
.dg-cloud { fill: var(--copper-soft); stroke: var(--copper); stroke-width: 1.2; }
.dg-line { fill: none; stroke: var(--accent); stroke-width: 1.4; }
.dg-dash { fill: none; stroke: var(--copper); stroke-width: 1.3; stroke-dasharray: 4 4; }
.dg-node { fill: var(--accent); }
.dg-text { fill: var(--text-2); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .04em; }
.dg-title { fill: var(--text); font-family: var(--font-mono); font-size: 13px; font-weight: 500; letter-spacing: .06em; }
.dg-small { fill: var(--copper); font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .06em; }

.cover-code {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 18px;
  background-color: var(--surface-2);
  background-image: radial-gradient(var(--border-strong) 1px, transparent 1.2px);
  background-size: 16px 16px;
}
.code-window {
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #0a111e;
  box-shadow: var(--shadow);
  text-align: left;
  overflow: hidden;
}
.code-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  background: #121b2c;
  border-bottom: 1px solid #1f2b42;
}
.code-bar i { width: 8px; height: 8px; border-radius: 50%; background: #2c3a55; }
.code-bar span { margin-left: 6px; color: #8a9ab3; font-family: var(--font-mono); font-size: .7rem; }
.code-window pre {
  margin: 0;
  padding: 10px 14px 12px;
  overflow: hidden;
  color: #c7d3e6;
  font-family: var(--font-mono);
  font-size: .72rem;
  line-height: 1.6;
}
.code-window .c-com { color: #6f819d; }
.code-window .c-kw { color: #7dd3fc; }
.code-window .c-lbl { color: #e3a75c; }

.project-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
  padding: 18px 20px 20px;
}
.project-tech {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .04em;
}
.project-title { font-size: 1.1rem; line-height: 1.35; }
.project-desc { color: var(--text-2); font-size: .94rem; }
.project-metric {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--copper-soft);
  color: var(--copper);
  font-family: var(--font-mono);
  font-size: .76rem;
  font-weight: 500;
}
.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}
.projects-more { margin-top: 28px; text-align: center; }
.projects-more a { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: 16px;
}
.skill-card { display: grid; gap: 14px; align-content: start; }
.skill-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.02rem;
}
.skill-title .icon-tile { width: 36px; height: 36px; border-radius: 9px; }
.skill-title .icon-tile .icon { width: 18px; height: 18px; }
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  list-style: none;
}
.chip-list li {
  padding: 4px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: .85rem;
  line-height: 1.5;
}

/* ---------- Industrial training ---------- */
.training-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
}
.training-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.training-card h3 { font-size: 1.06rem; }
.training-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: .88rem;
}
.training-meta span { display: inline-flex; align-items: center; gap: 6px; }
.training-meta .icon { width: 15px; height: 15px; }
.training-card p:last-child { color: var(--text-2); font-size: .95rem; }

/* ---------- Achievements ---------- */
.achieve-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.achieve-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.achieve-card h3 { font-size: 1.06rem; }
.achieve-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: .88rem;
}
.achieve-card p:last-child { color: var(--text-2); font-size: .95rem; }
.grade-pill {
  padding: 1px 9px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 500;
}

/* ---------- References ---------- */
.ref-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
}
.ref-card { display: grid; gap: 4px; align-content: start; }
.ref-card h3 { font-size: 1.06rem; }
.ref-card h3 a { color: var(--text); }
.ref-card h3 a:hover { color: var(--accent); }
.ref-card h3 .icon { display: inline; width: 14px; height: 14px; margin-left: 4px; vertical-align: -1px; color: var(--muted); }
.ref-role { color: var(--text-2); font-size: .95rem; }
.ref-mail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  margin-top: 6px;
  font-size: .93rem;
  word-break: break-all;
}
.ref-note { justify-self: start; margin-top: 8px; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}
.contact-info { display: grid; gap: 24px; }
.contact-list { display: grid; gap: 4px; list-style: none; }
.contact-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.contact-list li:last-child { border-bottom: 0; }
.contact-list .icon-tile { width: 38px; height: 38px; border-radius: 10px; }
.contact-list .icon-tile .icon { width: 18px; height: 18px; }
.contact-label {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.contact-value {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 10px;
  word-break: break-word;
}
.contact-value a { color: var(--text); font-weight: 500; }
.contact-value a:hover { color: var(--accent); }
.contact-alt { margin-top: 2px; }
.contact-alt a { color: var(--text-2); font-weight: 400; }
.copy-btn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.copy-btn .icon { width: 15px; height: 15px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.contact-form { display: grid; gap: 16px; }
.contact-form h3 { font-size: 1.15rem; }
.form-intro { margin-top: -8px; color: var(--muted); font-size: .9rem; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: .9rem; font-weight: 500; color: var(--text); }
.field label .optional { color: var(--muted); font-weight: 400; }
.field input,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--input-bg);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.field textarea { min-height: 150px; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: var(--muted); opacity: .8; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field [aria-invalid="true"] { border-color: var(--danger); }
.field-error { min-height: 0; color: var(--danger); font-size: .84rem; }
.field-error:empty { display: none; }

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}
.form-note { color: var(--muted); font-size: .86rem; }

.form-status {
  display: none;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: .93rem;
}
.form-status.is-visible { display: flex; }
.form-status .icon { margin-top: .2em; }
.form-status[data-tone="success"] { background: var(--ok-soft); color: var(--ok); }
.form-status[data-tone="error"] { background: var(--danger-soft); color: var(--danger); }
.form-status[data-tone="info"] { background: var(--info-soft); color: var(--info); }
.form-status a { color: inherit; text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: clamp(40px, 6vw, 72px);
  border-top: 1px solid var(--border);
  background: var(--header-bg);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 28px 72px;      /* room for the back-to-top button */
  color: var(--muted);
  font-size: .9rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  list-style: none;
}
.footer-links a { color: var(--text-2); }
.footer-links a:hover { color: var(--accent); }

/* ---------- Floating UI ---------- */
.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  box-shadow: var(--shadow);
}
.to-top[hidden] { display: none; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 300;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-size: .9rem;
  font-weight: 500;
  box-shadow: var(--shadow);
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Project dialog ---------- */
.dialog {
  width: min(1000px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: 0 30px 80px -24px rgba(0, 0, 0, .65);
  overflow: hidden;
}
.dialog::backdrop { background: var(--backdrop); }
.dialog-scroll {
  max-height: calc(100dvh - 34px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.dialog-bar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  justify-content: flex-end;
  height: 0;
}
.dialog-close {
  margin: 14px 14px 0 0;
  background: var(--surface-solid);
  box-shadow: var(--shadow-sm);
}
.dialog-content { padding: clamp(20px, 3.4vw, 36px); }

.dlg-head { padding-right: 52px; margin-bottom: 22px; }
.dlg-kicker {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.dlg-title { margin-top: 8px; font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.85rem); }
.dlg-lead { margin-top: 12px; color: var(--text-2); font-size: 1.02rem; }
.dlg-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.dlg-media { display: grid; gap: 18px; margin-bottom: 26px; }

.dlg-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: clamp(22px, 3.5vw, 36px);
}
.dlg-main { display: grid; gap: 22px; align-content: start; }
.dlg-main h3,
.dlg-side h3 {
  margin-bottom: 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.dlg-main p { color: var(--text-2); }

.check-list { display: grid; gap: 7px; list-style: none; }
.check-list li {
  position: relative;
  padding-left: 22px;
  color: var(--text-2);
}
.check-list li::before {
  content: "";
  position: absolute;
  top: .62em;
  left: 2px;
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
}
.steps { display: grid; gap: 8px; padding-left: 0; list-style: none; counter-reset: step; }
.steps li {
  position: relative;
  padding-left: 34px;
  color: var(--text-2);
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  top: .1em;
  left: 0;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 500;
}

.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.mini-table th,
.mini-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.mini-table th {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.mini-table td { color: var(--text-2); }
.mini-table td:first-child { color: var(--text); font-weight: 500; white-space: nowrap; }
.mini-table code { font-family: var(--font-mono); color: var(--accent); }
.table-scroll { overflow-x: auto; }

.dlg-side { display: grid; gap: 22px; align-content: start; }
.facts {
  margin: 0;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.facts div { padding: 8px 0; border-bottom: 1px dashed var(--border-strong); }
.facts div:first-child { padding-top: 0; }
.facts div:last-child { padding-bottom: 0; border-bottom: 0; }
.facts dt {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.facts dd { margin: 2px 0 0; color: var(--text); font-size: .93rem; }

.gallery { margin: 0; }
.gallery-stage {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  max-height: 72vh;              /* also narrows tall images, so centre the stage */
  margin-inline: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface-solid) 0 50%) 0 0 / 22px 22px;
  overflow: hidden;
  cursor: zoom-in;
}
.gallery-stage.is-tall { aspect-ratio: 4 / 5; }
.dlg-side .gallery-stage { aspect-ratio: 4 / 3; }
.gallery-stage img {
  position: absolute;
  inset: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  object-fit: contain;
}
.gallery-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: .88rem;
}
.gallery-caption a { white-space: nowrap; }
.gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.gallery-thumb {
  flex: none;
  width: 92px;
  height: 60px;
  padding: 0;
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
  opacity: .7;
  transition: opacity .18s var(--ease), border-color .18s var(--ease);
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb:hover { opacity: 1; }
.gallery-thumb[aria-current="true"] { border-color: var(--accent); opacity: 1; }

.video-frame {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #000;
}
.video-frame video { width: 100%; max-height: 62vh; background: #000; }
.video-caption { margin-top: 8px; color: var(--muted); font-size: .88rem; }

/* ---------- Simple pages (404, thanks) ---------- */
.page-center {
  display: grid;
  place-items: center;
  min-height: calc(100vh - var(--header-h) - 120px);
  padding-block: 64px;
  text-align: center;
}
.page-center .card { max-width: 560px; padding: clamp(28px, 5vw, 44px); }
.page-code {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: .85rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.page-title { margin: 10px 0 12px; font-size: clamp(1.8rem, 1.4rem + 2vw, 2.4rem); }
.page-text { color: var(--text-2); }
.page-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; }
.outcome { display: none; }
.outcome-default { display: block; }
.outcome:target { display: block; }
.outcome:target ~ .outcome-default { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid,
  .about-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .hero-chip { justify-content: flex-start; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dlg-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .training-grid,
  .achieve-grid,
  .ref-grid,
  .field-row { grid-template-columns: 1fr; }
  .focus-grid { grid-template-columns: 1fr; }
  .pub-meta .badge { margin-left: 0; }
}

@media (max-width: 480px) {
  .hero-actions .btn { flex: 1 1 100%; }
  .stat { padding: 14px 16px; }
  .stat-value { font-size: 1.65rem; }
  .brand-name { display: none; }
  .chip { padding-inline: 20px; }
  .header-actions { gap: 6px; }
}

/* ---------- Print: a clean, ink-friendly page ---------- */
@media print {
  :root { color-scheme: light; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .circuit-bg,
  .site-header,
  .skip-link,
  .hero-actions,
  .social-list,
  .filters,
  .project-media,
  .project-actions,
  .projects-more,
  .contact-form,
  .contact-actions,
  .copy-btn,
  .to-top,
  .toast,
  .dialog,
  .site-footer { display: none !important; }
  .section,
  .hero { padding-block: 12pt; }
  .card,
  .stat,
  .chip { background: #fff; border-color: #bbb; box-shadow: none; break-inside: avoid; }
  a { color: #000; }
  .hero-grid,
  .about-grid,
  .contact-grid { grid-template-columns: 1fr; }
}
