/* Dimitris Pournatzis · interactive CV
   Tokens dealt by tasteskill 2.5: palette cool-grey-cobalt, type Chivo + Chivo Mono, radius sharp.
   No inline styles anywhere (CSP style-src 'self'); motion only adds to a page that is whole without it. */

@font-face {
  font-family: "Chivo";
  src: url("../fonts/chivo-latin-wght.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Chivo Mono";
  src: url("../fonts/chivo-mono-latin-wght.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #eef0f3;
  --surface: #e2e5ea;
  --paper: #f7f8fa;
  --ink: #0b0c0e;
  --muted: #5d6470;
  --text-2: #434a55;
  --accent: #1f2de6;
  --accent-ink: #ffffff;
  --line: rgba(11, 12, 14, .13);
  --line-strong: rgba(11, 12, 14, .3);

  --inv-bg: #0b0c0e;
  --inv-surface: #17181a;
  --inv-ink: #eef0f3;
  --inv-muted: #8e8f92;
  --inv-text-2: #a9abb0;
  --inv-line: rgba(238, 240, 243, .13);
  --inv-line-strong: rgba(238, 240, 243, .32);
  --signal: #3d8bff;
  --warn: #ff6b6b;

  --font: "Chivo", system-ui, sans-serif;
  --mono: "Chivo Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --r1: 2px;
  --r2: 4px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-enter: cubic-bezier(.22, 1, .36, 1);

  --nav: 72px;
  --side: clamp(16px, 4.5vw, 64px);
  --maxw: 1280px;
  --gutter: 32px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: auto; scroll-padding-top: 0; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-weight: 400; margin: 0; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sec--dark :focus-visible, .nav.is-inv :focus-visible { outline-color: var(--inv-ink); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -120px; z-index: 100;
  padding: 12px 16px; background: var(--ink); color: var(--bg);
  font-weight: 500; text-decoration: none; border-radius: var(--r2);
}
.skip:focus { top: 12px; }

.wrap { width: min(100% - 2 * var(--side), var(--maxw)); margin-inline: auto; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 40px; }
.col-l { grid-column: 1 / span 5; }
.col-r { grid-column: 7 / -1; }

/* ── Type ───────────────────────────────────────── */
h2 {
  font-size: clamp(30px, 1.9vw + 21px, 48px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.sec__sub { margin-top: 16px; font-size: 18px; line-height: 1.55; color: var(--text-2); max-width: 34em; text-wrap: pretty; }
.sec--dark .sec__sub { color: var(--inv-text-2); }

/* ── Buttons ────────────────────────────────────── */
.btn {
  --b-bg: var(--accent);
  --b-bg-h: color-mix(in srgb, var(--accent) 86%, var(--ink));
  --b-fg: var(--accent-ink);
  --b-bd: transparent;
  --b-bd-h: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 20px;
  background: var(--b-bg); color: var(--b-fg);
  border: 1px solid var(--b-bd); border-radius: var(--r2);
  font: 500 15px/1 var(--font); letter-spacing: 0; text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: transform 120ms var(--ease), background-color 120ms var(--ease), border-color 120ms var(--ease);
}
.btn--ghost {
  --b-bg: transparent; --b-bg-h: rgba(11, 12, 14, .05);
  --b-fg: var(--ink); --b-bd: var(--line-strong); --b-bd-h: rgba(11, 12, 14, .55);
}
.btn--inv {
  --b-bg: var(--inv-ink); --b-bg-h: color-mix(in srgb, var(--inv-ink) 86%, var(--ink));
  --b-fg: var(--ink);
}
.btn--sm { min-height: 44px; padding: 0 16px; font-size: 14px; }
.btn__ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 120ms var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-1px); background: var(--b-bg-h); border-color: var(--b-bd-h); transition-duration: 150ms; }
  .btn:hover .m-arrow { transform: translateX(3px); transition-duration: 150ms; }
}
.btn:focus-visible { background: var(--b-bg-h); }
.btn:active { transform: translateY(1px) scale(.985); transition-duration: 90ms; }

/* Running-text link: a faint hairline, an ink line draws on hover */
.link {
  text-decoration: none;
  background:
    linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat,
    linear-gradient(color-mix(in srgb, currentColor 30%, transparent), color-mix(in srgb, currentColor 30%, transparent)) 0 100% / 100% 1px no-repeat;
  transition: background-size 120ms var(--ease);
}
.link:hover, .link:focus-visible { background-size: 100% 1px, 100% 1px; transition-duration: 150ms; }

/* Pause / play control for anything that loops past 5 s */
.pause {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: var(--r2);
  background: var(--bg); color: var(--ink);
  font: 500 13px/1 var(--font); cursor: pointer;
  transition: border-color 120ms var(--ease), transform 120ms var(--ease);
}
.pause[hidden] { display: none; }
.pause__ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pause .i-play { display: none; fill: currentColor; stroke: none; }
.pause[aria-pressed="true"] .i-pause { display: none; }
.pause[aria-pressed="true"] .i-play { display: block; }
@media (hover: hover) and (pointer: fine) { .pause:hover { border-color: var(--ink); transform: translateY(-1px); } }
.pause:active { transform: translateY(1px) scale(.985); }
.sec--dark .pause { background: var(--inv-bg); color: var(--inv-ink); border-color: var(--inv-line-strong); }
@media (hover: hover) and (pointer: fine) { .sec--dark .pause:hover { border-color: var(--inv-ink); } }

/* ── Nav ────────────────────────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav);
  color: var(--ink); border-bottom: 1px solid transparent;
  transition: background-color 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease);
}
.nav.is-scrolled, .menu-open .nav { background: var(--bg); border-bottom-color: var(--line); }
.nav.is-inv { background: var(--inv-bg); color: var(--inv-ink); border-bottom-color: var(--inv-line); }
.nav__in { height: 100%; display: flex; align-items: center; gap: 32px; }
.nav__brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; font-weight: 500; font-size: 15px; }
.nav__mark, .tile__mark {
  position: relative; display: grid; place-items: center; flex: none;
  width: 32px; height: 32px; border-radius: var(--r1);
  background: var(--ink); color: var(--bg);
  font: 500 12px/1 var(--mono); letter-spacing: .02em;
  transition: background-color 200ms var(--ease), color 200ms var(--ease);
}
.nav__mark::after, .tile__mark::after { content: ""; position: absolute; right: 3px; bottom: 3px; width: 5px; height: 5px; background: var(--accent); }
.nav.is-inv .nav__mark { background: var(--inv-ink); color: var(--ink); }
.nav__links { display: flex; gap: 28px; margin-left: auto; }
.nav__links a { position: relative; padding: 12px 0; font-size: 15px; text-decoration: none; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform 120ms var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .nav__links a:hover::after { transform: scaleX(1); transform-origin: left; transition-duration: 150ms; }
}
.nav__links a:focus-visible::after { transform: scaleX(1); }
.nav__links a.is-current::after { transform: scaleX(1); height: 2px; }
.nav.is-inv .nav__cta { --b-bg: var(--inv-ink); --b-bg-h: color-mix(in srgb, var(--inv-ink) 86%, var(--ink)); --b-fg: var(--ink); }
.nav__toggle { display: none; }

.menu { position: fixed; inset: var(--nav) 0 0; z-index: 49; background: var(--bg); overflow-y: auto; }
.menu[hidden] { display: none; }
.menu__in { display: flex; flex-direction: column; padding: 16px 0 32px; }
.menu__in a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 30px; letter-spacing: -0.02em; text-decoration: none; }
.menu__cta { margin-top: 28px; }
.menu-open { overflow: hidden; }

/* ── Hero ───────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--nav) + 40px) 0 72px;
  background: var(--bg);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(11, 12, 14, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 12, 14, .055) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 70% 50%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 80% at 70% 50%, #000 10%, transparent 75%);
}
.hero__art {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 26%, #000 56%);
  mask-image: linear-gradient(90deg, transparent 26%, #000 56%);
}
.hero__globe { position: absolute; top: 0; bottom: 0; right: 0; left: -20%; }
.hero__poster {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover; object-position: 100% 50%;
  transition: opacity 900ms var(--ease);
}
.hero__globe .vanta-canvas { opacity: 0; transition: opacity 900ms var(--ease); }
.globe-live .hero__globe .vanta-canvas { opacity: 1; }
.globe-live .hero__poster { opacity: 0; }
.hero__in { position: relative; z-index: 1; }
.hero__notice {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 24px;
  font: 400 13px/1.4 var(--mono); color: var(--muted);
}
.hero__notice::before { content: ""; width: 8px; height: 8px; flex: none; background: var(--accent); }
.hero__name {
  margin: 0 0 28px;
  font-size: clamp(56px, 8.6vw, 136px);
  line-height: .9;
  letter-spacing: -0.045em;
}
.hero__name .ln { display: block; overflow: hidden; padding: 0 .04em .07em 0; margin-bottom: -.07em; }
.hero__name .ln__i { display: block; }
.hero__role {
  max-width: 23em; margin-bottom: 16px;
  font-size: clamp(20px, 1.2vw + 10px, 28px); line-height: 1.3; letter-spacing: -0.015em;
  text-wrap: balance;
}
.hero__lead { max-width: 35em; margin-bottom: 32px; font-size: clamp(16px, .35vw + 13px, 18px); line-height: 1.6; color: var(--text-2); text-wrap: pretty; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__pause { position: absolute; z-index: 3; right: var(--side); bottom: 24px; }

/* entrance: words wait for app.js; released by CSS if it is late (boot.js) */
.m-enter:not(.m-entering):not(.m-enter-late) .hero__name,
.m-enter:not(.m-entering):not(.m-enter-late) .hero .enter-fade { opacity: 0; }
.m-enter-late:not(.m-entering) .hero__name,
.m-enter-late:not(.m-entering) .hero .enter-fade { animation: m-fade 400ms var(--ease) both; }
@keyframes m-fade { from { opacity: 0; } }

/* ── Sections ───────────────────────────────────── */
.sec {
  position: relative;
  min-height: 100svh;
  padding: calc(var(--nav) + clamp(36px, 6vh, 72px)) 0 clamp(48px, 7vh, 88px);
}
.sec--dark { background: var(--inv-bg); color: var(--inv-ink); }

/* Experience */
.job--lead {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 24px;
  margin-top: 48px; padding: 32px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.job--lead .job__meta { grid-column: 1 / span 5; }
.job--lead .job__list { grid-column: 7 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px var(--gutter); align-content: start; }
.jobs-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gutter); }
.jobs-pair .job { padding: 28px 0; border-bottom: 1px solid var(--line); }
.job__when { font: 400 13px/1.6 var(--mono); color: var(--muted); margin-bottom: 8px; }
.job__role { font-size: 22px; line-height: 1.2; font-weight: 500; letter-spacing: -0.012em; }
.job__org { margin: 4px 0 14px; color: var(--muted); }
.job__text { max-width: 34em; }
.job__list { list-style: none; margin: 0; padding: 0; }
.job__list li { position: relative; padding-left: 20px; }
.job__list li::before { content: ""; position: absolute; left: 0; top: .8em; width: 8px; height: 1px; background: var(--ink); }
.tags, .chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.tags { margin-top: 20px; }
.tags li, .chips li { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: var(--r1); background: var(--surface); font: 400 13px/1.2 var(--mono); }
.chip__ic { width: 16px; height: 16px; object-fit: contain; flex: none; }

/* HomeLab */
.lab .col-l { grid-column: 1 / span 5; }
.lab .col-r { grid-column: 6 / -1; }
.lab__text { display: flex; flex-direction: column; align-items: flex-start; }
.lab__points { list-style: none; margin: 28px 0 28px; padding: 0; width: 100%; }
.lab__pt {
  display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 16px;
  margin: 0 -12px; padding: 10px 12px;
  border-radius: var(--r2);
  transition: background-color 200ms var(--ease);
}
.lab__pt.is-on { background: var(--inv-surface); }
.lab__k { font: 500 13px/1.75 var(--mono); color: var(--signal); }
.lab__v { font-size: 15px; line-height: 1.55; }
.lab__fig { position: relative; align-self: center; }
.lab__pause { position: absolute; right: 0; top: -60px; }

.dg { width: 100%; height: auto; overflow: visible; }
.dg--tall { display: none; }
.dg-box { fill: var(--inv-surface); stroke: rgba(238, 240, 243, .16); stroke-width: 1; }
.dg-box--hub { stroke: rgba(238, 240, 243, .45); }
.dg-tile { fill: var(--inv-ink); }
.dg-t { fill: var(--inv-ink); font: 500 16px var(--font); }
.dg-s { fill: var(--inv-muted); font: 400 14px var(--mono); }
.dg-s--hi { fill: var(--inv-ink); }
.dg-edge { fill: none; stroke: var(--signal); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dg-edge--dash { stroke: var(--inv-muted); stroke-dasharray: 4 5; }
.dg-zone { fill: rgba(61, 139, 255, .05); stroke: var(--inv-muted); stroke-width: 1; stroke-dasharray: 2 4; }
.dg-lab { fill: var(--inv-muted); font: 400 13px var(--mono); }
.dg-lab--warn { fill: var(--warn); }
.dg-block circle { fill: var(--inv-bg); stroke: var(--warn); stroke-width: 2; }
.dg-block path { fill: none; stroke: var(--warn); stroke-width: 2; stroke-linecap: round; }
.pulse { fill: #ffffff; opacity: 0; }
.pulse--warn { fill: var(--warn); }
.pulse--test { fill: var(--inv-muted); }
.dg [data-g] { transition: opacity 200ms var(--ease); }
.lab[data-focus="access"] .dg [data-g]:not([data-g~="access"]),
.lab[data-focus="hardening"] .dg [data-g]:not([data-g~="hardening"]),
.lab[data-focus="monitoring"] .dg [data-g]:not([data-g~="monitoring"]),
.lab[data-focus="testing"] .dg [data-g]:not([data-g~="testing"]) { opacity: .16; }

/* Skills */
.sec__head--row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: end; }
.sec__head--row h2 { grid-column: 1 / span 5; }
.sec__head--row .sec__sub { grid-column: 7 / -1; margin-top: 0; }
.skills {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
  margin-top: 48px; background: var(--line); border: 1px solid var(--line);
}
.skill { background: var(--bg); padding: 28px 28px 32px; min-height: clamp(180px, 26vh, 248px); }
.skill__h { margin-bottom: 18px; font-size: 22px; line-height: 1.2; font-weight: 500; letter-spacing: -0.012em; }
.skill__note { margin-top: 14px; font-size: 14px; color: var(--muted); }

/* Education */
.degree { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.degree__when { font: 400 13px/1.6 var(--mono); color: var(--muted); }
.degree__title { margin: 10px 0 8px; font-size: 22px; line-height: 1.25; font-weight: 500; letter-spacing: -0.012em; }
.degree__school { color: var(--muted); }
.list-h { margin-bottom: 14px; font-size: 22px; line-height: 1.2; font-weight: 500; letter-spacing: -0.012em; }
.rows { list-style: none; margin: 0 0 40px; padding: 0; border-top: 1px solid var(--line); }
.rows li { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.rows__org { font: 400 13px/1.75 var(--mono); color: var(--muted); }
.rows--tight { margin-bottom: 0; }
.rows--tight li { grid-template-columns: 88px minmax(0, 1fr); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }

/* Contact / close */
.close { display: flex; flex-direction: column; }
.close__in { flex: 1; }
.close__mail { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin: 44px 0 28px; }
.close__addr {
  font-size: clamp(26px, 4.4vw, 72px); line-height: 1.08; letter-spacing: -0.035em;
  text-decoration: none; overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat,
              linear-gradient(var(--inv-line-strong), var(--inv-line-strong)) 0 100% / 100% 2px no-repeat;
  padding-bottom: 6px;
  transition: background-size 120ms var(--ease);
}
.close__addr:hover, .close__addr:focus-visible { background-size: 100% 2px, 100% 2px; transition-duration: 150ms; }
.copy {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 14px;
  border: 1px solid var(--inv-line-strong); border-radius: var(--r2);
  background: transparent; color: var(--inv-ink);
  font: 500 14px/1 var(--font); cursor: pointer;
  transition: border-color 120ms var(--ease), transform 120ms var(--ease);
}
.copy__ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.copy .i-done { display: none; }
.copy.is-done .i-copy { display: none; }
.copy.is-done .i-done { display: block; }
@media (hover: hover) and (pointer: fine) { .copy:hover { border-color: var(--inv-ink); transform: translateY(-1px); } }
.copy:active { transform: translateY(1px) scale(.985); }
.close__actions { margin-bottom: 48px; }
.close__links { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; }
.tile {
  display: flex; align-items: center; gap: 12px;
  min-height: 64px; padding: 0 18px;
  background: var(--inv-surface); border: 1px solid var(--inv-line); border-radius: var(--r2);
  font-weight: 500; text-decoration: none;
  transition: transform 120ms var(--ease), border-color 120ms var(--ease);
}
@media (hover: hover) and (pointer: fine) { .tile:hover { transform: translateY(-2px); border-color: var(--inv-line-strong); transition-duration: 180ms; } }
.tile:active { transform: translateY(0) scale(.985); }
.tile__ic { width: 24px; height: 24px; object-fit: contain; flex: none; }
.tile__ic--ink { filter: invert(1); }
.tile__mark { width: 24px; height: 24px; font-size: 9px; background: var(--inv-ink); color: var(--ink); }
.tile__mark::after { width: 4px; height: 4px; right: 2px; bottom: 2px; }
.foot { margin-top: 64px; }
.foot__in { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 8px; padding-top: 24px; border-top: 1px solid var(--inv-line); font-size: 14px; color: var(--inv-muted); }
.foot__in > p:first-child { grid-column: 1 / span 5; }
.foot__credits { grid-column: 7 / -1; }

/* ── Tablet ─────────────────────────────────────── */
@media (max-width: 1023.98px) {
  :root { --gutter: 24px; }
  .job--lead .job__meta, .job--lead .job__list { grid-column: 1 / -1; }
  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .close__links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav__links { gap: 20px; }
}

/* ── Narrow: one column, portrait diagram, menu ─── */
@media (max-width: 899.98px) {
  :root { --nav: 64px; }
  .nav__links { display: none; }
  .nav__cta { margin-left: auto; }
  .js .nav__toggle {
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    width: 44px; height: 44px; padding: 0;
    background: none; border: 0; cursor: pointer;
  }
  .nav__toggle span { display: block; width: 20px; height: 1.5px; background: currentColor; transition: transform 200ms var(--ease); }
  .nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  .nav__in { gap: 16px; }

  .grid { row-gap: 32px; }
  .col-l, .col-r, .lab .col-l, .lab .col-r { grid-column: 1 / -1; }
  .sec__head--row { display: block; }
  .sec__head--row .sec__sub { margin-top: 16px; }

  .hero { align-items: flex-start; padding-top: calc(var(--nav) + 36px); }
  .hero__art { top: auto; height: 60%; opacity: .5; -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 45%); mask-image: linear-gradient(180deg, transparent 0%, #000 45%); }
  .hero__poster { object-fit: contain; object-position: 100% 100%; }

  .dg--wide { display: none; }
  .dg--tall { display: block; width: 100%; max-width: 440px; margin: 0 auto; }
  .lab__pause { position: static; margin: 0 0 16px auto; display: flex; }
  .lab__pause[hidden] { display: none; }
}

/* The deck button lives in the menu on narrow screens */
@media (max-width: 699.98px) {
  .nav__deck { display: none; }
}

/* ── Phone ──────────────────────────────────────── */
@media (max-width: 599.98px) {
  :root { --gutter: 16px; }
  .nav__name { display: none; }
  .hero { padding: calc(var(--nav) + 24px) 0 32px; }
  .hero__art { height: 40%; opacity: .45; }
  .hero__notice { margin-bottom: 18px; }
  .hero__name { margin-bottom: 20px; }
  .hero__lead { margin-bottom: 24px; }
  .skills { grid-template-columns: minmax(0, 1fr); margin-top: 32px; }
  .skill { min-height: 0; }
  .job--lead { margin-top: 32px; padding: 24px 0; }
  .job--lead .job__list { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .jobs-pair { grid-template-columns: minmax(0, 1fr); }
  .skill { padding: 22px 20px 24px; }
  .pair { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .rows li, .rows--tight li { grid-template-columns: 84px minmax(0, 1fr); gap: 12px; }
  .lab__pt { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .close__links { grid-template-columns: minmax(0, 1fr); }
  .foot__in > p:first-child, .foot__credits { grid-column: 1 / -1; }
  .close__actions .btn { width: 100%; }
}

/* Short desktop windows: keep the HomeLab band on one screen */
@media (min-width: 900px) and (max-height: 820px) {
  .lab__points { margin: 18px 0; }
  .lab__pt { padding: 8px 12px; }
}

/* Short phones (browser bars up): keep the hero's buttons above the fold */
@media (max-width: 599.98px) and (max-height: 700px) {
  .hero__notice { margin-bottom: 14px; }
  .hero__name { font-size: 48px; margin-bottom: 16px; }
  .hero__role { font-size: 18px; margin-bottom: 10px; }
  .hero__lead { font-size: 15px; line-height: 1.5; margin-bottom: 20px; }
}

/* ── Reduced motion: everything rests, nothing stays hidden ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation: none !important; }
}

/* ── Print: a plain document ────────────────────── */
@media print {
  .nav, .menu, .skip, .hero__art, .pause, .lab__fig, .copy, .hero::before { display: none !important; }
  body, .sec--dark { background: #fff; color: #000; }
  .hero, .sec { min-height: 0; padding: 16px 0; }
  .grid { display: block; }
  .tile { border: 0; padding: 0; min-height: 0; }
  .sec--dark, .sec--dark * { color: #000 !important; }
}
