/* ==========================================================================
   Felix Cenusa, portfolio
   Palette: graphite paper and night, with copper as the one accent
   (the colour of the traces on a circuit board).
   Type: Mona Sans, one variable family. Width carries the hierarchy:
   expanded light for display, regular for reading, extended caps for labels.
   ========================================================================== */

@font-face {
  font-family: 'Mona Sans';
  font-style: normal;
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-display: swap;
  src: url('../fonts/MonaSans-latin.woff2') format('woff2');
  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: 'Mona Sans';
  font-style: normal;
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-display: swap;
  src: url('../fonts/MonaSans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --paper: #f1f0eb;
  --paper-2: #e8e6df;
  --mist: #dcd9d0;
  --ink: #16181b;
  --ink-2: rgba(22, 24, 27, 0.74);
  --ink-3: rgba(22, 24, 27, 0.6);
  --line: rgba(22, 24, 27, 0.14);
  --line-2: rgba(22, 24, 27, 0.08);
  --night: #101215;
  --night-2: #181b20;
  --on-dark: #ecebe6;
  --on-dark-2: rgba(236, 235, 230, 0.7);
  --on-dark-3: rgba(236, 235, 230, 0.55);
  --line-dark: rgba(236, 235, 230, 0.14);
  --copper: #b05a24;
  --copper-bright: #e0874a;
  --copper-glow: rgba(224, 135, 74, 0.5);

  --f-sans: 'Mona Sans', 'Helvetica Neue', Arial, sans-serif;
  --display: 112%;
  --head: 108%;
  --wide: 125%;

  --pad: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --gap: clamp(14px, 1.6vw, 24px);
  --radius: 4px;
  --nav-h: 64px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.55;
  font-stretch: 100%;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, h4 { text-wrap: balance; }
p, li { text-wrap: pretty; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; letter-spacing: inherit; }
strong { font-weight: 600; }
::selection { background: var(--copper); color: #fff; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 2px; }

.skip {
  position: fixed; left: 12px; top: 12px; z-index: 400;
  height: 40px; padding: 0 16px; display: inline-flex; align-items: center;
  border-radius: 3px; background: var(--ink); color: var(--paper);
  font-size: 13.5px; font-weight: 520;
  transform: translateY(-160%); transition: transform 0.3s var(--ease-out);
}
.skip:focus-visible { transform: none; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }

/* labels: extended caps, the voice of a spec sheet */
.mono, .eyebrow {
  font-family: var(--f-sans);
  font-size: 10.5px;
  line-height: 1.4;
  font-stretch: var(--wide);
  font-weight: 540;
  letter-spacing: 0.085em;
  text-transform: uppercase;
}
.eyebrow { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; color: var(--ink-3); }
.eyebrow b { font-weight: 540; color: var(--ink); }
.on-dark .eyebrow { color: var(--on-dark-3); }
.on-dark .eyebrow b { color: var(--on-dark); }

/* grain, static so it is cheap to composite */
.grain {
  position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- nav */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: baseline; gap: 14px; white-space: nowrap; }
.brand__name { font-size: 17px; font-weight: 580; font-stretch: var(--display); letter-spacing: -0.015em; }
.brand__role { color: var(--ink-3); }
.nav__links { display: flex; gap: clamp(16px, 2.2vw, 34px); }
.nav__links a {
  position: relative;
  font-size: 14px; font-weight: 480; font-stretch: 106%;
  padding: 8px 0;
}
.nav__links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 3px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform 0.5s var(--ease-out);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__links a[aria-current="page"]::after { transform: scaleX(1); background: var(--copper); height: 2px; }
.nav__ext svg { width: 0.62em; height: 0.62em; margin-left: 4px; vertical-align: 0.05em; }

/* ---------------------------------------------------------------- buttons, tags, links */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  height: 44px; padding: 0 18px; border-radius: 3px;
  font-size: 13.5px; font-weight: 520; font-stretch: 108%; white-space: nowrap;
  transition: background 0.35s, color 0.35s, box-shadow 0.35s;
}
.btn svg { width: 14px; height: 14px; transition: transform 0.4s var(--ease-out); }
.btn:hover svg { transform: translateX(3px); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--copper); }
.btn--ghost { box-shadow: inset 0 0 0 1px var(--line); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.btn--light { background: var(--on-dark); color: var(--night); }
.btn--light:hover { background: var(--copper-bright); }

.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 2px;
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 9.5px; font-stretch: var(--wide); font-weight: 540; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-2); white-space: nowrap;
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

.link {
  text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--copper) 55%, transparent);
  transition: text-decoration-color 0.3s, color 0.3s;
}
.link:hover { text-decoration-color: currentColor; color: var(--copper); }
.ext svg { width: 0.62em; height: 0.62em; margin-left: 3px; vertical-align: 0.05em; }

/* folio: the running header above each section */
.folio {
  display: flex; align-items: baseline; gap: 0 var(--gap);
  padding-top: 14px; border-top: 1px solid var(--line); color: var(--ink-3);
}
.folio__no { min-width: 56px; color: var(--copper); }
.folio__name { color: var(--ink); }
.folio__meta { margin-left: auto; text-align: right; }
.folio__meta a { color: var(--ink); }
.folio__meta a:hover { color: var(--copper); }
.on-dark .folio { border-top-color: var(--line-dark); color: var(--on-dark-3); }
.on-dark .folio__name { color: var(--on-dark); }
.on-dark .folio__no { color: var(--copper-bright); }

.section { padding-top: clamp(72px, 9vw, 140px); }

/* ---------------------------------------------------------------- home hero */
.hero { padding-top: clamp(48px, 9vh, 120px); }
.hero__top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.hero__grid { margin-top: clamp(28px, 4vw, 56px); align-items: end; }
.hero__title {
  grid-column: 1 / span 9;
  margin: 0;
  font-size: clamp(40px, 6.4vw, 112px);
  line-height: 0.94;
  letter-spacing: -0.05em;
  font-weight: 340;
  font-stretch: var(--display);
}
.hero__title .dim { color: var(--ink-3); }
.hero__title .dot { color: var(--copper); }
.hero__portrait { grid-column: 10 / span 3; justify-self: end; width: 100%; max-width: 280px; margin: 0; }
.portrait {
  position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 110%, color-mix(in srgb, var(--copper) 28%, transparent) 0%, transparent 60%),
    var(--mist);
}
.portrait img { position: absolute; left: 50%; bottom: 0; height: 92%; width: auto; max-width: none; transform: translateX(-50%); }
.portrait__cap { display: flex; justify-content: space-between; margin-top: 10px; color: var(--ink-3); }

.hero__meta {
  margin-top: clamp(48px, 7vw, 96px);
  padding-top: 18px;
  border-top: 1px solid var(--ink);
}
.meta-item { grid-column: span 3; }
.meta-item .mono { display: block; color: var(--ink-3); margin-bottom: 6px; }
.meta-item p { margin: 0; font-size: 15px; }
.meta-item--lede { grid-column: span 6; }
.meta-item--lede p { font-size: clamp(17px, 1.35vw, 20px); color: var(--ink-2); max-width: 34em; }

/* ---------------------------------------------------------------- project cards (home) */
.cards { margin-top: clamp(28px, 3vw, 48px); row-gap: clamp(48px, 6vw, 96px); align-items: start; }
.card { display: block; position: relative; }
.card:nth-child(4n + 1) { grid-column: 1 / span 7; }
.card:nth-child(4n + 2) { grid-column: 9 / span 4; margin-top: 7vw; }
.card:nth-child(4n + 3) { grid-column: 1 / span 5; }
.card:nth-child(4n + 4) { grid-column: 7 / span 6; margin-top: 4vw; }
.card__media { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--mist); aspect-ratio: 16 / 10; isolation: isolate; }
.card__media img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform 1.2s var(--ease-out); }
.card:hover .card__media img { transform: scale(1.035); }
.card__info { display: grid; grid-template-columns: 56px 1fr auto; gap: 0 var(--gap); margin-top: 16px; align-items: baseline; }
.card__no { color: var(--ink-3); }
.card__title { margin: 0; font-size: clamp(22px, 2vw, 32px); letter-spacing: -0.03em; line-height: 1.05; font-weight: 440; font-stretch: var(--head); }
.card__title svg { width: 0.42em; height: 0.42em; margin-left: 8px; vertical-align: 0.12em; opacity: 0; transform: translateX(-6px); transition: opacity 0.4s, transform 0.5s var(--ease-out); }
.card:hover .card__title svg { opacity: 1; transform: none; }
.card__sub { grid-column: 2 / span 2; margin: 6px 0 0; color: var(--ink-2); font-size: 15px; }
.card .tags { grid-column: 2 / span 2; margin-top: 12px; }

/* ---------------------------------------------------------------- plates: drawn stand-ins for projects without a screenshot */
.plate {
  position: relative; width: 100%; height: 100%; min-height: 220px;
  display: grid; place-items: center;
  background: radial-gradient(90% 70% at 50% 40%, var(--night-2) 0%, var(--night) 70%);
  color: var(--on-dark); overflow: hidden;
}
.plate__label { position: absolute; left: 16px; bottom: 14px; color: var(--on-dark-3); }
.plate__label--right { left: auto; right: 16px; }

/* seven-segment counter */
.seg-row { display: flex; gap: clamp(12px, 2vw, 22px); }
.seg { position: relative; width: 64px; height: 116px; }
.seg i { position: absolute; display: block; border-radius: 3px; background: rgba(224, 135, 74, 0.09); transition: background 0.18s, box-shadow 0.18s; }
.seg i.on { background: var(--copper-bright); box-shadow: 0 0 16px var(--copper-glow); }
.seg .a { top: 0; left: 8px; width: 48px; height: 8px; }
.seg .b { top: 6px; right: 0; width: 8px; height: 48px; }
.seg .c { top: 62px; right: 0; width: 8px; height: 48px; }
.seg .d { top: 108px; left: 8px; width: 48px; height: 8px; }
.seg .e { top: 62px; left: 0; width: 8px; height: 48px; }
.seg .f { top: 6px; left: 0; width: 8px; height: 48px; }
.seg .g { top: 54px; left: 8px; width: 48px; height: 8px; }
.seg .dp { top: 108px; right: -17px; width: 8px; height: 8px; border-radius: 50%; }
.seg-dir { position: absolute; right: 16px; top: 14px; display: flex; gap: 10px; color: var(--on-dark-3); }
.seg-dir span.is-on { color: var(--copper-bright); }

/* terminal */
.term {
  width: min(86%, 440px);
  font-family: ui-monospace, 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-size: clamp(12px, 1.05vw, 14px); line-height: 1.75; color: var(--on-dark-2);
}
.term b { color: var(--copper-bright); font-weight: 400; }
.term .out { color: var(--on-dark-3); }
.term .cursor { display: inline-block; width: 0.6em; height: 1.1em; vertical-align: -0.2em; background: var(--on-dark); animation: blink 1.1s steps(1) infinite; }

/* calendar of stars */
.cal { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.cal i { width: clamp(22px, 2.6vw, 34px); aspect-ratio: 1; border-radius: 2px; background: rgba(224, 135, 74, 0.14); box-shadow: inset 0 0 0 1px rgba(224, 135, 74, 0.28); position: relative; }
.cal i::after { content: '★'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 0.8em; color: var(--copper-bright); }
.cal-wrap { display: flex; align-items: center; gap: clamp(20px, 3vw, 44px); }
.cal-big { font-size: clamp(56px, 7vw, 104px); line-height: 0.85; letter-spacing: -0.05em; font-weight: 320; font-stretch: var(--display); }
.cal-big small { display: block; margin-top: 10px; font-size: 10.5px; letter-spacing: 0.085em; font-stretch: var(--wide); font-weight: 540; text-transform: uppercase; color: var(--on-dark-3); }

/* TIS-100 node grid */
.tis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: min(88%, 520px); }
.tis div {
  border: 1px solid rgba(236, 235, 230, 0.5); padding: 10px 12px; min-height: 92px;
  font-family: ui-monospace, Consolas, monospace; font-size: clamp(10px, 0.9vw, 12px); line-height: 1.6; color: var(--on-dark-2);
}
.tis div.is-hot { border-color: var(--copper-bright); color: var(--on-dark); box-shadow: 0 0 18px rgba(224, 135, 74, 0.25); }

/* ---------------------------------------------------------------- page hero (projects, cv) */
.page-hero { padding-top: clamp(48px, 9vh, 120px); }
.page-hero__title {
  margin: clamp(20px, 3vw, 40px) 0 0;
  font-size: clamp(56px, 11vw, 196px);
  line-height: 0.86;
  letter-spacing: -0.055em;
  font-weight: 320;
  font-stretch: var(--display);
}
.page-hero__title .dot { color: var(--copper); }
.page-hero__row { margin-top: clamp(32px, 4vw, 60px); padding-top: 18px; border-top: 1px solid var(--ink); align-items: start; }
.page-hero__lede { grid-column: 1 / span 6; margin: 0; font-size: clamp(18px, 1.5vw, 22px); line-height: 1.45; color: var(--ink-2); max-width: 32em; }
.page-hero__side { grid-column: 8 / span 5; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 2px;
  box-shadow: inset 0 0 0 1px var(--line); font-size: 13.5px; font-stretch: 104%; font-weight: 480;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}
.chip small { font-size: 10px; font-stretch: var(--wide); font-weight: 540; color: var(--ink-3); }
.chip:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.chip.is-active { background: var(--ink); color: var(--paper); box-shadow: inset 0 0 0 1px var(--ink); }
.chip.is-active small { color: inherit; opacity: 0.6; }

/* ---------------------------------------------------------------- project entries */
.projects { margin-top: clamp(56px, 7vw, 110px); }
.proj { padding: clamp(28px, 3vw, 40px) 0 clamp(56px, 7vw, 110px); border-top: 1px solid var(--ink); align-items: start; }
.proj[hidden] { display: none; }
.proj__head { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; color: var(--ink-3); margin-bottom: clamp(20px, 2.4vw, 36px); }
.proj__head .no { color: var(--copper); }
.proj__text { grid-column: 1 / span 5; }
.proj__media { grid-column: 7 / span 6; }
.proj:nth-of-type(even) .proj__text { grid-column: 8 / span 5; grid-row: 2; }
.proj:nth-of-type(even) .proj__media { grid-column: 1 / span 6; grid-row: 2; }
.proj__title { margin: 0; font-size: clamp(30px, 3.4vw, 56px); line-height: 0.98; letter-spacing: -0.04em; font-weight: 380; font-stretch: var(--display); }
.proj__lede { margin: 20px 0 0; font-size: clamp(16px, 1.2vw, 18px); color: var(--ink-2); max-width: 36em; }
.spec { margin-top: clamp(24px, 2.6vw, 36px); }
.spec__row { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 13px 0; border-top: 1px solid var(--line); font-size: 15px; }
.spec__row > .mono { color: var(--ink-3); padding-top: 3px; }
.spec__row ul { margin: 0; padding: 0; list-style: none; }
.spec__row li { position: relative; padding-left: 18px; margin: 2px 0; }
.spec__row li::before { content: ''; position: absolute; left: 0; top: 0.62em; width: 6px; height: 6px; border-radius: 1px; background: var(--copper); transform: rotate(45deg); }
.spec__row code { font-family: ui-monospace, Consolas, monospace; font-size: 0.92em; padding: 1px 5px; border-radius: 2px; background: var(--paper-2); }
.spec__row .muted { color: var(--ink-3); }

.media { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--mist); aspect-ratio: 16 / 10; }
.media img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform 1.2s var(--ease-out); }
.media--photo img { object-position: center; }
button.media { display: block; width: 100%; cursor: zoom-in; }
button.media:hover img { transform: scale(1.025); }
.media__cap { display: flex; justify-content: space-between; gap: 16px; margin-top: 10px; color: var(--ink-3); }

/* ---------------------------------------------------------------- cv */
.cv-block { align-items: start; margin-top: clamp(24px, 3vw, 44px); }
.cv-block__lead { grid-column: 1 / span 4; margin: 0; font-size: clamp(22px, 2vw, 32px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 420; font-stretch: var(--head); }
.cv-block__body { grid-column: 6 / span 7; }
.cv-block__body p { margin: 0 0 1em; font-size: clamp(17px, 1.3vw, 20px); color: var(--ink-2); line-height: 1.55; }
.cv-block__body p:last-child { margin-bottom: 0; }

.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px var(--gap); padding: 20px 0; border-top: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline .years { color: var(--ink-3); padding-top: 6px; font-variant-numeric: tabular-nums; }
.timeline h3 { margin: 0; line-height: 1.2; font-size: clamp(19px, 1.6vw, 24px); letter-spacing: -0.02em; font-weight: 460; font-stretch: var(--head); }
.timeline p { margin: 6px 0 0; color: var(--ink-2); font-size: 15px; }

.courses { margin: 0; padding: 0; list-style: none; }
.courses li { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: var(--gap); padding: 13px 0; border-top: 1px solid var(--line); font-size: 15px; align-items: baseline; }
.courses li:last-child { border-bottom: 1px solid var(--line); }
.courses .code { color: var(--copper); font-variant-numeric: tabular-nums; }
.courses .note { color: var(--ink-3); font-size: 13px; }

/* ---------------------------------------------------------------- contact + footer (dark) */
.contact { margin-top: clamp(100px, 12vw, 180px); background: var(--night); color: var(--on-dark); padding: clamp(80px, 10vw, 150px) 0 0; position: relative; overflow: hidden; }
.contact__title { margin: clamp(28px, 3.6vw, 56px) 0 0; max-width: 12em; font-size: clamp(44px, 7vw, 124px); line-height: 0.96; letter-spacing: -0.05em; font-weight: 330; font-stretch: var(--display); }
.contact__title .dot { color: var(--copper-bright); }
.contact__note { margin: 24px 0 0; max-width: 460px; color: var(--on-dark-2); font-size: 16px; }
.contact__row { margin-top: clamp(56px, 7vw, 110px); padding-top: 28px; border-top: 1px solid var(--line-dark); }
.contact__mail { grid-column: 1 / span 7; }
.contact__mail a { position: relative; display: inline-flex; align-items: center; gap: 14px; font-size: clamp(22px, 2.5vw, 42px); letter-spacing: -0.03em; font-stretch: var(--head); font-weight: 400; overflow-wrap: anywhere; }
.contact__mail a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor; transform-origin: right; transform: scaleX(0); transition: transform 0.6s var(--ease-out); }
.contact__mail a:hover::after { transform-origin: left; transform: scaleX(1); }
.contact__mail svg { width: 0.5em; height: 0.5em; flex: none; }
.contact__meta { grid-column: 8 / span 5; display: grid; grid-template-columns: 1fr 1fr; gap: 22px var(--gap); }
.contact__meta .mono { display: block; color: var(--on-dark-3); margin-bottom: 6px; }
.contact__meta p { margin: 0; color: var(--on-dark-2); font-size: 15px; }
.contact__meta a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(236, 235, 230, 0.3); transition: color 0.3s, text-decoration-color 0.3s; }
.contact__meta a:hover { color: var(--copper-bright); text-decoration-color: currentColor; }

.footer { margin-top: clamp(80px, 9vw, 140px); }
.bits { display: flex; height: 10px; }
.bits i { flex: 1; background: var(--night-2); }
.bits i.on { background: var(--copper); }
.bits i:nth-child(8n) { margin-right: 3px; }
.bits i:last-child { margin-right: 0; }
.footer__bar { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 26px; color: var(--on-dark-3); }
.footer__bar a { padding: 10px 0; margin: -10px 0; }
.footer__bar a:hover { color: var(--on-dark); }

/* ---------------------------------------------------------------- lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 250;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 16px;
  padding: 18px var(--pad);
  background: rgba(16, 18, 21, 0.97); color: var(--on-dark);
  opacity: 0; visibility: hidden; transition: opacity 0.4s, visibility 0s linear 0.4s;
}
.lightbox.is-open { opacity: 1; visibility: visible; transition: opacity 0.4s; }
.lightbox__top { display: flex; justify-content: space-between; align-items: center; color: var(--on-dark-3); }
.lightbox__close { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 3px; box-shadow: inset 0 0 0 1px var(--line-dark); }
.lightbox__close:hover { box-shadow: inset 0 0 0 1px var(--on-dark); }
.lightbox__close svg { width: 14px; height: 14px; }
.lightbox__stage { display: grid; place-items: center; min-height: 0; }
.lightbox__stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 2px; }
.lightbox__cap { color: var(--on-dark-2); font-size: 14px; }

/* ---------------------------------------------------------------- reveal */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

@keyframes blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .brand__role { display: none; }
  .hero__title { grid-column: 1 / -1; }
  .hero__portrait { grid-column: 1 / -1; justify-self: start; max-width: 200px; order: -1; }
  .meta-item, .meta-item--lede { grid-column: 1 / -1; }
  .card:nth-child(n) { grid-column: 1 / -1; margin-top: 0; }
  .page-hero__lede, .page-hero__side { grid-column: 1 / -1; }
  .proj__text, .proj__media,
  .proj:nth-of-type(even) .proj__text, .proj:nth-of-type(even) .proj__media { grid-column: 1 / -1; grid-row: auto; }
  .proj__media { margin-top: 28px; }
  .cv-block__lead, .cv-block__body { grid-column: 1 / -1; }
  .contact__mail, .contact__meta { grid-column: 1 / -1; }
  .contact__meta { margin-top: 32px; }
}
@media (max-width: 560px) {
  .nav__links { gap: 14px; }
  .nav__links a { font-size: 13.5px; }
  .nav__ext { display: none; }
  .card__info { grid-template-columns: 40px 1fr; }
  .card__info .tags, .card__sub { grid-column: 2; }
  .spec__row { grid-template-columns: 1fr; gap: 4px; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .courses li { grid-template-columns: 76px minmax(0, 1fr); }
  .courses .note { grid-column: 2; }
  .seg { transform: scale(0.8); margin: 0 -6px; }
  .contact__meta { grid-template-columns: 1fr; }
}
