/*
=========================================
SPEC by Maurice Erven
Technical minimalism / industrial spec-sheet
=========================================
*/

:root {
  --n-100: #f2f2f2;
  --n-200: #e8ebeb;
  --n-300: #9bacae;
  --n-400: #71797a;
  --n-500: #494f52;
  --n-600: #17181a;
  --acid: #ff6b00; /* signal orange */

  /* Section surfaces */
  --light-bg: var(--n-100);
  --light-fg: var(--n-600);
  --light-muted: var(--n-500);
  --light-panel: var(--n-200);
  --dark-bg: var(--n-600);
  --dark-fg: var(--n-100);
  --dark-muted: var(--n-300);
  --dark-panel: #202225;
  --rule: var(--n-300);

  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --grotesk: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;

  /* Type scale: 12 / 15 / 18 / 24 / 40 / 80 */
  --fs-12: 12px;
  --fs-15: 15px;
  --fs-18: clamp(16px, 1.4vw, 18px);
  --fs-24: clamp(20px, 2vw, 24px);
  --fs-40: clamp(28px, 4vw, 40px);
  --fs-80: clamp(44px, 8vw, 80px);
  --measure: 62ch;
  --gutter: clamp(16px, 3vw, 40px);
  --maxw: 1440px;
  --ease: cubic-bezier(.65, 0, .35, 1);
}

/* Dark mode: swap the scale */
:root[data-theme="dark"] {
  --light-bg: #1d1f21;
  --light-fg: var(--n-100);
  --light-muted: var(--n-300);
  --light-panel: #26292c;
  --dark-bg: #0e0f10;
  --dark-fg: var(--n-100);
  --dark-muted: var(--n-300);
  --dark-panel: #18191b;
  --rule: var(--n-500);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 56px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--light-bg);
  color: var(--light-fg);
  font-family: var(--grotesk);
  font-size: var(--fs-15);
  line-height: 1.6;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-family: var(--grotesk); font-weight: 400; line-height: 1.05; letter-spacing: -.03em; }
/* Titles in capitals */
h1, h2 { text-transform: uppercase; letter-spacing: -.02em; }
p { max-width: var(--measure); }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--n-600);
}

.skip-link { position: absolute; left: 16px; top: -60px; z-index: 300; padding: 8px 12px; background: var(--acid); color: var(--n-600); }
.skip-link:focus { top: 12px; }

/* ---------- Section surfaces ---------- */
.s-light { background: var(--light-bg); color: var(--light-fg); --fg: var(--light-fg); --bg: var(--light-bg); --muted: var(--light-muted); --panel: var(--light-panel); }
.s-dark  { background: var(--dark-bg);  color: var(--dark-fg);  --fg: var(--dark-fg);  --bg: var(--dark-bg);  --muted: var(--dark-muted);  --panel: var(--dark-panel); }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); }

.label {
  font-family: var(--mono);
  font-size: var(--fs-12);
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.muted { color: var(--muted); }

/* Hairline rules */
.rule-t { border-top: 1px solid var(--rule); }
.rule-b { border-bottom: 1px solid var(--rule); }
.dash-t { border-top: 1px dashed var(--rule); }
.dash-b { border-bottom: 1px dashed var(--rule); }

/* Crosshair markers at section corners */
.cross { position: relative; }
.cross::before, .cross::after {
  content: "+";
  position: absolute;
  top: -.72em;
  font: 400 var(--fs-15)/1 var(--mono);
  color: var(--muted);
  pointer-events: none;
}
.cross::before { left: calc(var(--gutter) - .32em); }
.cross::after { right: calc(var(--gutter) - .32em); }

/* Status dot */
.dot {
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: 6px;
  background: var(--acid);
  vertical-align: 1px;
  animation: blink 1.6s steps(1) infinite;
}
@keyframes blink { 50% { opacity: .25; } }

/* Bracketed links / buttons: hover inverts */
.btn {
  display: inline-block;
  padding: 6px 8px;
  font: 500 var(--fs-12)/1.2 var(--mono);
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fg);
  border: 1px solid transparent;
  transition: background .15s linear, color .15s linear;
}
.btn::before { content: "["; margin-right: .15em; }
.btn::after { content: "]"; margin-left: .15em; }
.btn:hover { background: var(--fg); color: var(--bg); }
.btn.solid { border-color: var(--fg); }
.btn.acid:hover { background: var(--acid); color: var(--n-600); }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 100;
  background: var(--light-bg);
  border-bottom: 1px dashed var(--rule);
}
.top-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 52px;
}
.logo { font: 500 var(--fs-15)/1 var(--grotesk); letter-spacing: -.01em; text-decoration: none; }
.logo b { color: var(--light-muted); font-weight: 400; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  padding: 6px 9px;
  font-family: var(--mono); font-size: var(--fs-12); letter-spacing: .05em; text-transform: uppercase; text-decoration: none;
  transition: background .15s linear, color .15s linear;
}
.nav a:hover { background: var(--light-fg); color: var(--light-bg); }
.nav a.is-active { background: var(--light-panel); }
.nav a.is-active::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; background: var(--acid); vertical-align: 1px; }
.theme-btn { font: inherit; background: none; border: 0; cursor: pointer; --fg: var(--light-fg); --bg: var(--light-bg); }
/* Light / dark switch: active mode is filled */
.theme-btn, .m-theme { display: inline-flex; align-items: center; gap: 2px; }
.theme-btn:hover, .m-theme:hover { background: none; color: var(--fg); }
.theme-btn .opt, .m-theme .opt { padding: 1px 5px; color: var(--muted, var(--light-muted)); transition: background .15s linear, color .15s linear; }
.theme-btn .opt.on, .m-theme .opt.on { background: var(--fg); color: var(--bg); }
.theme-btn:hover .opt:not(.on), .m-theme:hover .opt:not(.on) { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.theme-btn .slash, .m-theme .slash { color: var(--muted, var(--light-muted)); }

/* Meta strip */
.meta {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px;
  padding-block: 9px;
  font-family: var(--mono); font-size: var(--fs-12); letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(56px, 9vw, 120px) clamp(48px, 7vw, 96px); }
.hero h1 {
  grid-column: 1 / -1;
  font-size: var(--fs-80);
  letter-spacing: -.02em;
  line-height: 1;
}
.hero h1 .typed-line { display: block; min-height: .95em; color: var(--muted); }
.cursor {
  display: inline-block; width: .45em; height: .08em; margin-left: .06em;
  background: var(--acid); vertical-align: .05em;
  animation: blink 1s steps(1) infinite;
}
.cursor.typing { animation: none; }

.hero-body { margin-top: clamp(40px, 6vw, 80px); align-items: start; row-gap: 32px; }
.hero-figure { grid-column: 1 / span 4; margin: 0; }
.hero-text { grid-column: 6 / span 7; }
.lead { font-size: var(--fs-18); line-height: 1.5; max-width: var(--measure); }
.hero-text .lead strong { font-weight: 500; background: var(--acid); color: var(--n-600); padding: 0 3px; }

/* Framed image: dashed frame + clip reveal */
.frame {
  padding: 6px;
  border: 1px dashed var(--rule);
}
.frame-head { display: flex; justify-content: space-between; padding: 0 2px 6px; font-family: var(--mono); font-size: var(--fs-12); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.img {
  position: relative;
  overflow: hidden;
  background: var(--panel);
}
.img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
a:hover .img img { transform: scale(1.03); }
.clip { clip-path: inset(0 0 100% 0); transition: clip-path .7s var(--ease); }
.clip.in { clip-path: inset(0 0 0 0); }

/* ---------- Section header ---------- */
.sec { padding-block: clamp(56px, 8vw, 112px); }
.sec-head { align-items: end; margin-bottom: clamp(32px, 5vw, 64px); row-gap: 8px; }
.sec-head .code { grid-column: 1 / -1; margin: 0; }
.sec-head h2 {
  grid-column: 1 / -1;
  font-size: var(--fs-40);
}

/* ---------- Modules (bordered cards) ---------- */
.module { border: 1px solid var(--rule); background: var(--bg); }
.module-head {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono); font-size: var(--fs-12); font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
}
.module-body { padding: 16px 12px; }

/* Experience */
.exp { row-gap: var(--gutter); }
.exp .side { grid-column: 1 / span 3; }
.exp .side p { max-width: 32ch; }
.exp .modules { grid-column: 5 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }
.exp .modules .wide { grid-column: 1 / -1; }
.spec { width: 100%; border-collapse: collapse; }
.spec tr + tr td { border-top: 1px dashed var(--rule); }
.spec td { padding: 9px 0; vertical-align: top; }
.spec td:last-child { text-align: right; color: var(--muted); white-space: nowrap; padding-left: 12px; font-family: var(--mono); font-size: var(--fs-12); }
.spec strong { font-weight: 500; }
.spec a { text-underline-offset: 3px; text-decoration-color: var(--rule); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  padding: 4px 10px;
  border: 1px solid var(--fg);
  border-radius: 2px;
  font-family: var(--mono); font-size: var(--fs-12); letter-spacing: .04em; text-transform: uppercase;
}
.tools { display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid var(--rule); margin-top: 16px; }
.tools li { display: grid; place-items: center; aspect-ratio: 1; border-right: 1px solid var(--rule); }
.tools li:last-child { border-right: 0; }
.tools img { width: 46%; }

/* Categories */
.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); }
.cat { display: block; text-decoration: none; }
.cat .img { aspect-ratio: 3 / 4; }
.cat .module-body { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; }
.cat:hover .module-head { background: var(--fg); color: var(--bg); }

/* Knowledge module: fits its square next to Work */
.module-know { display: flex; flex-direction: column; }
.module-know .module-body { flex: 1; }
.module-know .tags { gap: 5px; }
.module-know .tags li { padding: 3px 8px; }
.module-know .module-body { padding-block: 12px; }
.module-know .tools { margin-top: 0; grid-template-columns: repeat(6, 1fr); }
.module-know .tools li { aspect-ratio: auto; height: 72px; }
.module-know .tools img { width: auto; height: 40px; }

/* 02.1 + 02.2: same height; Education spreads its rows over the space */
.exp .modules > .module:not(.wide) { display: flex; flex-direction: column; }
.exp .modules > .module:not(.wide) > .module-body { flex: 1; display: flex; }
.exp .modules > .module:not(.wide) .spec { height: 100%; }

/* Education: two entries side by side in the wide module */
.spec-2col tbody { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--gutter); }
.spec-2col tr { display: flex; justify-content: space-between; gap: 12px; }
.spec-2col tr + tr td { border-top: 0; }

/* Visual archive: compact strip of icon buttons */
.sec-compact { padding-block: clamp(28px, 4vw, 48px); border-block: 1px dashed var(--rule); }
.visual-row { align-items: center; row-gap: 16px; }
.visual-head { grid-column: 1 / span 3; }
.visual-head .label { margin: 0 0 4px; }
.visual-title { font-size: var(--fs-40); }
.visual-row { align-items: start; }
.visual-split { grid-column: 4 / -1; display: grid; grid-template-columns: minmax(240px, 2fr) 3fr; gap: var(--gutter); align-items: stretch; }
.vbtns { display: grid; grid-template-columns: 1fr; gap: 10px; }
.vbtn {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--fg);
  text-decoration: none;
  transition: background .15s linear, color .15s linear, border-color .15s linear;
}
.vbtn svg { width: 28px; height: 28px; flex: none; }
.vbtn-text { display: flex; flex-direction: column; min-width: 0; }
.vbtn-sub { font-size: var(--fs-12); color: var(--muted); transition: color .15s linear; }
.vbtn-arrow { margin-left: auto; }
.vbtn:hover, .vbtn:focus-visible { background: var(--acid); color: var(--n-600); border-color: var(--acid); }
.vbtn:hover .vbtn-sub, .vbtn:focus-visible .vbtn-sub { color: var(--n-600); }

/* Showcase */
.works { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gutter); }
.work { display: block; text-decoration: none; }
.work .img { aspect-ratio: 1; }
.work .module-body { padding: 10px 12px; display: flex; justify-content: space-between; gap: 10px; }
.work .module-body span:last-child { color: var(--muted); }
.work:hover .module-head { background: var(--fg); color: var(--bg); }
.work:hover .module-head .idx::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; background: var(--acid); vertical-align: 1px; }

/* Ticker */
.ticker { overflow: hidden; padding-block: 12px; }
.ticker-track { display: flex; width: max-content; animation: ticker var(--ticker-dur, 40s) linear infinite; will-change: transform; }
.ticker span { padding-right: 28px; font-family: var(--mono); font-size: var(--fs-15); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.ticker .sep { color: var(--muted); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* Contact */
.contact h2 { grid-column: 1 / -1; font-size: var(--fs-80); letter-spacing: -.02em; line-height: 1; }
.contact-body { margin-top: clamp(32px, 5vw, 64px); row-gap: 24px; }
.contact-body .intro { grid-column: 1 / span 5; }
.contact-body .links { grid-column: 7 / -1; }
.links li { border-top: 1px dashed var(--rule); }
.links li:last-child { border-bottom: 1px dashed var(--rule); }
/* The whole row is the link; the [button] inverts when the row is hovered */
.row-link { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; text-decoration: none; }
.row-link:hover .btn, .row-link:focus-visible .btn { background: var(--acid); color: var(--n-600); }

.foot .meta { padding-block: 14px; }

/* Phone menu (button + overlay are added by spec.js) */
.menu-btn { display: none; font: inherit; background: none; border: 0; cursor: pointer; --fg: var(--light-fg); --bg: var(--light-bg); }
.m-menu {
  position: fixed; inset: 0; z-index: 400;
  display: flex; flex-direction: column;
  padding: 12px var(--gutter) 24px;
  background: var(--light-bg); color: var(--light-fg);
  --fg: var(--light-fg); --bg: var(--light-bg); --muted: var(--light-muted);
}
.m-menu[hidden] { display: none; }
.m-menu-head { display: flex; justify-content: space-between; align-items: center; min-height: 40px; border-bottom: 1px dashed var(--rule); }
.m-menu ul { margin-top: 12px; }
.m-menu li { border-bottom: 1px dashed var(--rule); }
.m-menu li a { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; font-size: var(--fs-24); text-decoration: none; letter-spacing: -.02em; }
.m-menu li a .label { color: var(--muted); }
.m-menu li a:hover, .m-menu li a:focus-visible { color: var(--acid); }
.m-menu .meta { margin-top: auto; }
body.menu-open { overflow: hidden; }

/* Floating back-to-top (added by spec.js) */
.to-top {
  position: fixed; right: 16px; bottom: 16px; z-index: 90;
  background: var(--light-bg); --fg: var(--light-fg); --bg: var(--light-bg);
  border-color: var(--light-fg) !important;
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .25s linear, transform .25s var(--ease), background .15s linear, color .15s linear;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }

/* Scramble text keeps its width */
[data-scramble] { white-space: pre-line; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-figure { grid-column: 1 / span 5; }
  .hero-text { grid-column: 7 / -1; }
  .exp .side, .exp .modules, .sec-head .code, .sec-head h2 { grid-column: 1 / -1; }
  .visual-head, .visual-split { grid-column: 1 / -1; }
  .works { grid-template-columns: repeat(2, 1fr); }
  .contact-body .intro, .contact-body .links { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .nav a { padding: 6px 5px; }
  .nav a, .nav .theme-btn { display: none; }
  .menu-btn { display: inline-block; }
  .nav .n-hide { display: none; }
  .hero-figure, .hero-text { grid-column: 1 / -1; }
  .hero-figure { max-width: 320px; }
  .exp .modules { grid-template-columns: 1fr; }
  .cats { grid-template-columns: 1fr; }
  .visual-split { grid-template-columns: 1fr; }
  .vbtns { gap: 8px; }
  .spec-2col tbody { grid-template-columns: 1fr; }
  .spec-2col tr + tr td { border-top: 1px dashed var(--rule); }
  .cat .img { aspect-ratio: 16 / 10; }
  .works { gap: 12px; }
  .work .module-head { padding: 7px 8px; }
  .work .module-body { padding: 8px; font-size: var(--fs-12); }
  .work .module-body span:last-child { display: none; }
  .meta .m-hide { display: none; }
}
@media (max-width: 380px) {
  .logo { font-size: var(--fs-12); }
  .nav a { letter-spacing: .02em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .clip { clip-path: none; }
}

/* Profile photo on the home page: small, left of "Let's create" */
.hero-title { align-items: center; row-gap: 20px; }
.hero-title .portrait-half { grid-column: 1 / span 2; }
.hero-title .portrait-half + h1 { grid-column: 3 / -1; }
.hero-body .hero-text--aligned { grid-column: 1 / -1; }
.hero-text--aligned p, .hero-text--aligned .lead { max-width: none; }
.hero-title + .hero-body { margin-top: clamp(24px, 3vw, 40px); }
@media (max-width: 960px) {
  .hero-title .portrait-half { grid-column: 1 / span 3; }
  .hero-title .portrait-half + h1 { grid-column: 4 / -1; }
}
@media (max-width: 640px) {
  .hero-title .portrait-half { grid-column: 1 / span 4; }
  .hero-title .portrait-half + h1 { grid-column: 5 / -1; }
  .hero-body .hero-text--aligned { grid-column: 1 / -1; }
}

/* Home: no padding above the first section */
#about.hero { padding-top: clamp(36px, 4.5vw, 64px); }

/* [02] Showcase: title on the left, projects beside it (same rule as [01]) */
#portfolio .wrap { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); align-items: start; }
#portfolio .sec-head { grid-column: 1 / span 3; display: block; margin: 0; }
#portfolio .sec-head .code { margin: 0 0 4px; }
#portfolio .works { grid-column: 4 / -1; }
@media (max-width: 960px) {
  #portfolio .sec-head { grid-column: 1 / -1; margin-bottom: clamp(24px, 4vw, 40px); }
  #portfolio .works { grid-column: 1 / -1; }
}

/* [03] Experience: title (+ short background text) left, boxes beside it from the top */
#experience .wrap { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); align-items: start; }
#experience .sec-head { grid-column: 1 / span 3; grid-row: 1; display: block; margin: 0; }
#experience .sec-head .code { margin: 0 0 4px; }
#experience .exp { display: contents; }
#experience .exp .side { grid-column: 1 / span 3; grid-row: 2; margin-top: 20px; }
#experience .exp .modules { grid-column: 4 / -1; grid-row: 1 / span 2; }
@media (max-width: 960px) {
  #experience .sec-head, #experience .exp .side, #experience .exp .modules { grid-column: 1 / -1; grid-row: auto; }
  #experience .exp .side { margin-top: 12px; margin-bottom: 24px; }
}

/* =========================================
   AIRY PASS — more space, fewer and softer lines
   (remove this block to get the dense version back)
   ========================================= */
.s-light { --rule-soft: rgba(23, 24, 26, .12); }
.s-dark { --rule-soft: rgba(242, 242, 242, .14); }
:root[data-theme="dark"] .s-light { --rule-soft: rgba(242, 242, 242, .14); }

body { line-height: 1.7; }

/* Breathing room between sections */
.sec { padding-block: clamp(88px, 12vw, 176px); }
.sec-compact { padding-block: clamp(72px, 10vw, 144px); border-block: 0; }
.hero { padding-bottom: clamp(72px, 10vw, 140px); }
#about.hero { padding-top: clamp(56px, 7vw, 104px); }
.hero-title + .hero-body { margin-top: clamp(32px, 4vw, 56px); }
.ticker { padding-block: 18px; }

/* Fewer decorations */
.cross::before, .cross::after { content: none; }

/* Modules: softer frame, more inner space */
.module { border-color: var(--rule-soft); }
.module-head { padding: 14px 18px; border-bottom-color: var(--rule-soft); }
.module-body { padding: 22px 18px; }
.spec td { padding: 14px 0; }
.spec tr + tr td { border-top-color: var(--rule-soft); }
.exp .modules, .visual-split { gap: clamp(24px, 3vw, 48px); }

/* Visual archive + knowledge */
.vbtns { gap: 14px; }
.vbtn { padding: 18px 20px; gap: 16px; border-color: var(--rule-soft); }
.tags { gap: 8px; }
.module-know .tags li { padding: 5px 11px; }
.tools, .module-know .tools li { border-color: var(--rule-soft); }

/* Contact rows */
.row-link { padding: 16px 0; }
.links li { border-color: var(--rule-soft); }

/* [02] Showcase as a mosaic: one featured project, one wide closer */
.works-mosaic {
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: clamp(220px, 19vw, 300px);
  grid-auto-flow: dense;
}
.works-mosaic .work { display: flex; flex-direction: column; min-height: 0; }
.works-mosaic .work .img { flex: 1; min-height: 0; aspect-ratio: auto; }
.works-mosaic .work .img img { height: 100%; }
.works-mosaic .work-feat { grid-column: span 2; grid-row: span 2; }
.works-mosaic .work-wide { grid-column: span 2; }
.works-mosaic .work-feat .module-body { padding: 14px 16px; align-items: baseline; }

@media (max-width: 960px) {
  .works-mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: clamp(200px, 34vw, 280px); }
  .works-mosaic .work-feat { grid-column: span 2; grid-row: span 2; }
  .works-mosaic .work-wide { grid-column: span 2; }
}
@media (max-width: 640px) {
  .works-mosaic { grid-auto-rows: 180px; }
  .works-mosaic .work-feat { grid-row: span 2; }
}

/* Hero heading: the one exception to the type scale */
#about .hero-title h1 { font-size: clamp(48px, 8vw, 112px); line-height: .95; }

/* Archive buttons: pagination before the arrow */
.vbtn-page { margin-left: auto; white-space: nowrap; }
.vbtn-page + .vbtn-arrow { margin-left: 14px; }
.vbtn:hover .vbtn-page, .vbtn:focus-visible .vbtn-page { color: var(--n-600); }

/* "+" crosshairs only on the hero and contact sections */
.cross.cross-keep::before, .cross.cross-keep::after { content: "+"; }
#about.cross-keep::before, #about.cross-keep::after { top: 8px; }

/* [02.∞] Portal: organic glowing rectangle with a black, starry inside */
.portal {
  display: block;
  width: min(100%, 220px);
  margin-top: clamp(24px, 3vw, 40px);
  text-decoration: none;
}
.portal-scene { display: block; width: 100%; height: auto; overflow: visible; }
.portal-scene * { transform-box: fill-box; }
.portal-label { display: inline-flex; align-items: center; margin-top: 10px; color: var(--fg); }

.pt-glow { opacity: .75; animation: pt-breathe 3.6s ease-in-out infinite; transition: opacity .4s linear; }

.portal:hover .pt-glow, .portal:focus-visible .pt-glow { opacity: 1; animation-duration: 1.4s; }

@keyframes pt-breathe { 0%, 100% { opacity: .55; } 50% { opacity: .95; } }

@media (max-width: 960px) {
  .portal { display: flex; align-items: center; gap: 16px; width: auto; }
  .portal-scene { width: 96px; flex: none; }
  .portal-label { margin-top: 0; }
}

/* [04] Contact: link list starts level with "Let's connect" */
#contact > .wrap { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); align-items: start; }
#contact > .wrap > .grid, #contact .contact-body { display: contents; }
#contact > .wrap > .grid:first-child > p.label { grid-column: 1 / -1; grid-row: 1; }
#contact h2 { grid-column: 1 / span 6; grid-row: 2; }
#contact .contact-body .intro { grid-column: 1 / span 5; grid-row: 3; margin-top: clamp(24px, 3vw, 40px); }
#contact .contact-body .links { grid-column: 7 / -1; grid-row: 2 / span 2; align-self: start; }
#contact > .wrap > .meta { grid-column: 1 / -1; grid-row: 4; }
@media (max-width: 960px) {
  #contact h2, #contact .contact-body .intro, #contact .contact-body .links, #contact > .wrap > .meta { grid-column: 1 / -1; grid-row: auto; }
  #contact .contact-body .links { margin-top: 24px; }
}

/* Showcase cards: [Name] ----- [year] / image / [CAT: …] [ENTRY [02.x]] */
.work .module-head { align-items: center; }
.work .w-line { flex: 1; height: 0; border-top: 1px dashed currentColor; opacity: .35; margin: 0 4px; }
.work .w-year { color: var(--muted); }
.work:hover .w-year { color: inherit; }
.work .w-foot { align-items: center; }
.work .w-foot .label { font-size: var(--fs-12); }
.work .w-foot .label:last-child { color: var(--muted); }
.works-mosaic .work-feat .module-head { font-size: var(--fs-15); }
.work:hover .w-foot .idx::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; background: var(--acid); vertical-align: 1px; }

/* Country flags (CSS, so they look the same on every system) */
.flag {
  display: inline-block;
  width: 16px; height: 11px;
  margin-left: 4px;
  vertical-align: -1px;
  box-shadow: 0 0 0 1px var(--rule-soft, rgba(0, 0, 0, .15));
}
.flag-nl { background: linear-gradient(#ae1c28 0 33.33%, #ffffff 33.33% 66.66%, #21468b 66.66%); }
.flag-be { background: linear-gradient(90deg, #000000 0 33.33%, #fdda24 33.33% 66.66%, #ef3340 66.66%); }

/* <picture> wrappers (WebP + fallback) behave like the plain <img> they wrap */
picture { display: contents; }

/* =========================================
   Calm images + mobile-first pass
   ========================================= */

/* Images are simply there — no clip/pop-in reveal */
.clip, .clip.in { clip-path: none; transition: none; }

/* Fixed tagline under the hero heading */
.hero-tagline { margin: 6px 0 14px; font-size: var(--fs-24); line-height: 1.25; letter-spacing: -.02em; max-width: none; }

/* Portal: say what's behind it */
.portal-sub { display: block; margin-top: 4px; }

@media (max-width: 640px) {
  /* Larger tap areas */
  .btn { min-height: 44px; display: inline-flex; align-items: center; padding: 10px 12px; }
  .nav .menu-btn { min-height: 44px; }
  .row-link { padding: 18px 0; }
  .vbtn { padding: 16px; }

  /* Hero: one column — small photo on top, heading full width below */
  .hero-title .portrait-half { grid-column: 1 / -1; width: 96px; }
  .hero-title .portrait-half .frame-head { display: none; }
  .hero-title .portrait-half + h1 { grid-column: 1 / -1; }
  .hero-tagline { font-size: var(--fs-18); }

  /* Showcase: one column, every card the same simple shape */
  .works-mosaic, .works-bleed { grid-template-columns: 1fr; grid-auto-rows: auto; gap: 16px; }
  .works-mosaic .work-feat, .works-mosaic .work-wide { grid-column: auto; grid-row: auto; }
  .works-mosaic .work .img { aspect-ratio: 4 / 3; flex: none; }
  .works-mosaic .work-feat .module-head { font-size: var(--fs-12); }
  .work .module-body span:last-child { display: inline; }

  /* Portal: a full-width button */
  .portal {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    width: 100%;
    padding: 12px;
    border: 1px solid var(--rule-soft, var(--rule));
  }
  .portal-scene { width: 64px; flex: none; }
  .portal-label { margin-top: 0; }
  .portal-sub { flex-basis: 100%; margin: 0 0 0 78px; }
}
