/* Portfolio of Giannis Intzirtzis: ice floes on the current.
   The liquid and floes are WebGL (js/scene.js). Everything readable lives in the HTML.
   Modes on <html>: .mode-scene (default), .mode-list, .is-view (a project or info is open), .is-loading */

/* Fonts, served from this site (SIL Open Font Licence, see assets/fonts). Neither has Greek letters, so Greek uses the system font. */
@font-face { font-family: "Host Grotesk"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("../assets/fonts/host-grotesk-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: "Host Grotesk"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("../assets/fonts/host-grotesk-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; }
@font-face { font-family: "Fragment Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../assets/fonts/fragment-mono-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: "Fragment Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../assets/fonts/fragment-mono-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 {
  --navy: #04121a;
  --panel: #06171f;
  --teal: #0b3a4a;
  --ocean: #0e5a6e;
  --cyan: #3fd0d9;
  --aqua: #bff5f2;
  --ink: #e8f6f6;
  --muted: #9cc6c5;
  --line: rgba(63, 208, 217, 0.22);
  --line-strong: rgba(63, 208, 217, 0.55);
  --rule: rgba(14, 90, 110, 0.85);

  --sans: "Host Grotesk", "Helvetica Neue", Helvetica, sans-serif;
  --mono: "Fragment Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --pad: clamp(16px, 2.2vw, 32px);
  --top: max(var(--pad), env(safe-area-inset-top));
  --bottom: max(var(--pad), env(safe-area-inset-bottom));
  --left: max(var(--pad), env(safe-area-inset-left));
  --right: max(var(--pad), env(safe-area-inset-right));
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--navy);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 100%;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(63, 208, 217, 0.2);
  touch-action: manipulation;
}
body { margin: 0; background: var(--navy); min-height: 100vh; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
.mono { font-family: var(--mono); font-weight: 400; letter-spacing: 0; }

a { color: inherit; text-decoration: underline; text-decoration-color: var(--ocean); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { color: var(--aqua); text-decoration-color: var(--cyan); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: fixed; left: var(--left); top: var(--top); z-index: 60;
  padding: 12px 16px; background: var(--panel); border: 1px solid var(--cyan);
  transform: translateY(-300%);
}
.skip:focus { transform: none; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.fine { font-family: var(--mono); font-size: 0.75rem; line-height: 1.4; color: var(--muted); }

/* ---------- the stage ---------- */
.stage { position: fixed; inset: 0; z-index: 0; outline: none; touch-action: none; -webkit-user-select: none; user-select: none; }   /* the scene handles every swipe itself */
.stage:focus-visible { outline: 1px solid var(--line-strong); outline-offset: -1px; }
#gl { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity 300ms var(--ease); }
.gl-ready #gl { opacity: 1; }
.stage.is-hover { cursor: pointer; }
.stage.is-drag { cursor: grabbing; }

/* ---------- sleeve corners ---------- */
.corner { position: fixed; z-index: 20; }
.corner--tl { top: var(--top); left: var(--left); }
.corner--tc { top: calc(var(--top) + 13px); left: 50%; transform: translateX(-50%); }
.corner--tr { top: var(--top); right: var(--right); display: flex; gap: 4px; }
.corner--bl { bottom: var(--bottom); left: var(--left); max-width: min(560px, calc(100vw - 2 * var(--pad))); }
.corner--br { bottom: var(--bottom); right: var(--right); display: flex; gap: 4px; }

.name { display: inline-flex; gap: 14px; align-items: center; min-height: 44px; font-size: 0.875rem; font-weight: 600; text-decoration: none; }
.barcode { display: block; width: 168px; height: 18px; color: var(--ink); }
.barcode rect { fill: currentColor; }

.now { display: grid; gap: 2px; margin-bottom: 20px; }
.now__index { font-size: 0.75rem; color: var(--muted); }
.now__name { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.25rem); font-weight: 500; line-height: 1.1; letter-spacing: -0.01em; text-decoration: none; }
.now__name:hover { color: var(--aqua); }
.now__line { font-size: 0.875rem; color: var(--muted); }
.who { font-size: 0.875rem; margin-bottom: 8px; }

.ctl {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  font: 500 0.875rem/1 var(--sans); color: var(--ink);
  background: transparent; border: 1px solid var(--line); text-decoration: none; cursor: pointer;
  transition: border-color 160ms var(--ease), color 160ms var(--ease);
}
.ctl[hidden] { display: none; }
.ctl--accent { border-color: var(--line-strong); color: var(--aqua); }
.ctl:hover { border-color: var(--cyan); color: var(--aqua); }
.ctl[aria-current="true"], .ctl[aria-current="page"] { border-color: var(--cyan); color: var(--aqua); }
.ctl { white-space: nowrap; }

/* English / Greek: a slim pill, the language in use bright and a small toggle between the two */
.switch {
  position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  font: 600 0.75rem/1 var(--sans); letter-spacing: 0.04em; color: var(--muted);
  background: none; border: 0; cursor: pointer;
}
.switch::before { content: ""; position: absolute; inset: 7px 0; border-radius: 999px; background: transparent; border: 1px solid var(--line); transition: border-color 160ms var(--ease); }
.switch:hover::before { border-color: var(--line-strong); }
.switch > * { position: relative; }
.switch__opt { transition: color 200ms var(--ease); }
.switch__track { width: 24px; height: 13px; border: 1.5px solid var(--ink); border-radius: 999px; }
.switch__knob { position: absolute; top: 1.5px; left: 2px; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); transition: transform 260ms var(--ease); }
.switch[aria-checked="false"] .switch__opt:first-child, .switch[aria-checked="true"] .switch__opt:last-child { color: var(--ink); }
.switch[aria-checked="true"] .switch__knob { transform: translateX(10px); }
.switch:focus-visible { outline: none; }
.switch:focus-visible::before { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan); }

.hint { position: fixed; z-index: 20; left: 50%; bottom: calc(var(--bottom) + 12px); transform: translateX(-50%); font-size: 0.75rem; color: var(--muted); white-space: nowrap; transition: opacity 300ms var(--ease); }
.hint.is-gone { opacity: 0; }
/* text over the scene lets swipes through to the cards; only its links stay tappable */
.corner--bl, .corner--tc, .hint { pointer-events: none; }
.corner--bl a { pointer-events: auto; }
.hint__touch { display: none; }
@media (hover: none) and (pointer: coarse) {
  .hint__mouse { display: none; }
  .hint__touch { display: inline; }
}

/* scene-only chrome is hidden in the other modes */
.mode-list .now, .mode-list .hint, .is-view .hint, .is-view .now { display: none; }

/* ---------- list view ---------- */
.list { display: none; }
.mode-list .list, .no-js .list { display: block; }
.list { position: relative; z-index: 10; min-height: 100vh; padding: calc(var(--top) + 120px) var(--right) calc(var(--bottom) + 200px) var(--left); }
.list__inner { max-width: 1100px; }
.list__h { font-size: 0.875rem; font-weight: 600; margin-bottom: 24px; }
.list__h span { color: var(--muted); font-weight: 400; margin-left: 12px; }
.list__rows { border-top: 1px solid var(--rule); background: var(--navy); }
.list__rows a {
  display: grid; grid-template-columns: 48px minmax(0, 1.2fr) minmax(0, 2fr) auto; gap: 16px; align-items: baseline;
  padding: 18px 8px; border-bottom: 1px solid var(--rule); text-decoration: none;
}
.list__rows a > :nth-child(2) { font-size: clamp(1.25rem, 1rem + 1vw, 2rem); font-weight: 500; letter-spacing: -0.01em; }
.list__rows a > :nth-child(3), .list__rows .mono { color: var(--muted); }
.list__rows a:hover { background: var(--panel); }
.list__rows a:hover > :nth-child(2) { color: var(--aqua); }
.list__more { margin-top: 24px; }
.list__more a { display: inline-flex; min-height: 44px; align-items: center; }

/* ---------- project and info views ---------- */
.view { display: none; }
.view:not([hidden]) { display: block; }
.no-js .view[hidden] { display: block; }
.js .view:not([hidden]) {
  position: fixed; inset: 0; z-index: 30; overflow-y: auto; overscroll-behavior: contain;
  background: var(--panel);
}
.js .view.is-under { z-index: 29; }   /* the page being covered by the next one */
.view__inner {
  max-width: 1280px; margin: 0 auto;
  padding: calc(var(--top) + 120px) var(--right) calc(var(--bottom) + 140px) var(--left);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px;
}
.view__index { grid-column: 1 / -1; font-size: 0.75rem; color: var(--muted); margin-bottom: 12px; }
.view__title:focus { outline: none; }
.view__title { grid-column: 1 / span 9; font-size: clamp(3rem, 1.8rem + 6vw, 7.5rem); font-weight: 500; line-height: 1.1; letter-spacing: -0.03em; text-wrap: balance; }
.view--info .view__title { font-size: clamp(2.25rem, 1.4rem + 4vw, 5rem); }
.view__figure { grid-column: 10 / -1; align-self: end; justify-self: end; font-size: clamp(1rem, 0.8rem + 0.8vw, 1.5rem); color: var(--aqua); padding-bottom: 12px; white-space: nowrap; }
.view__text { grid-column: 1 / span 7; margin-top: 48px; display: grid; gap: 16px; font-size: 1.125rem; max-width: 62ch; }
.view__note { color: var(--muted); }
.view__tags { font-size: 0.875rem; color: var(--muted); }
.view__links { display: flex; flex-wrap: wrap; gap: 0 24px; }
.view__links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }
.view__gallery { grid-column: 1 / -1; margin-top: 64px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.view__gallery img, .view__gallery canvas { width: 100%; height: auto; border: 1px solid var(--line); background: var(--navy); }
.view__gallery .tall { grid-column: 2; grid-row: span 2; max-width: 360px; justify-self: center; }
.view__gallery--one { grid-template-columns: minmax(0, 1fr); max-width: 960px; }

.info__h { grid-column: 1 / 4; margin-top: 64px; font-size: 1rem; font-weight: 500; color: var(--muted); }
.view--info .pairs, .view--info .certs, .view--info .links { grid-column: 4 / -1; margin-top: 64px; }
.pairs > div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; padding: 14px 0; border-top: 1px solid var(--rule); }
.pairs > div:first-child { border-top: 0; padding-top: 0; }
.pairs dt { font-weight: 600; }
.pairs dd { max-width: 62ch; }
.certs li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--rule); }
.certs li:first-child { border-top: 0; padding-top: 0; }
.certs li > span:last-child { color: var(--muted); font-size: 0.875rem; text-align: right; }
.links { display: flex; flex-wrap: wrap; gap: 0 32px; }
.links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 1.75rem; font-weight: 500; letter-spacing: -0.01em; }
.info__fine { grid-column: 4 / -1; margin-top: 64px; }
.legal { grid-column: 4 / -1; margin-top: 64px; display: grid; gap: 14px; max-width: 70ch; color: var(--ink); }
.legal strong { font-weight: 600; }
.contact__fine { grid-column: 1 / -1; margin-top: 56px; }
.contact__fine a { display: inline-flex; align-items: center; min-height: 44px; }
.fine a { color: var(--ink); padding: 14px 0; }

/* a solid strip under the name and barcode while a page scrolls */
.is-view body::before { content: ""; position: fixed; inset: 0 0 auto 0; height: calc(var(--top) + 64px); background: var(--panel); border-bottom: 1px solid var(--line); z-index: 34; animation: strip-in 500ms var(--ease) both; }
@keyframes strip-in { from { opacity: 0; } to { opacity: 1; } }
.viewbar { position: fixed; z-index: 40; right: var(--right); bottom: var(--bottom); display: flex; gap: 4px; }
.viewbar[hidden] { display: none; }
.viewbar .ctl { background: var(--panel); }
.is-view .corner--br, .is-view .corner--bl .now { display: none; }
.is-view .corner--bl { z-index: 35; }
.is-view .corner--bl .who, .is-view .corner--bl .fine { display: none; }
.is-view .corner--tl, .is-view .corner--tc, .is-view .corner--tr { z-index: 35; }

/* ---------- contact ---------- */
.contact { grid-column: 1 / -1; margin-top: 72px; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: start; }
.postcard-wrap { perspective: 1400px; padding: 30px 8px 0 8px; }
.postcard {
  position: relative; display: grid; grid-template-columns: minmax(120px, 34%) minmax(0, 1fr); gap: 22px;
  max-width: 640px; padding: 16px; border: 1px solid var(--line); border-radius: 6px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .75 0 0 0 0 .96 0 0 0 0 .95 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(160deg, #0a2630, #071c24 60%, #06171f);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(191, 245, 242, 0.06);
  transform: rotate(-1.2deg); transition: transform 600ms var(--ease);
}
.postcard__clip { position: absolute; z-index: 3; left: 30px; top: -30px; width: 20px; height: 54px; color: var(--muted); transform: rotate(6deg); }
.stamp {
  position: relative; align-self: start; display: flex; flex-direction: column; aspect-ratio: 4 / 5.1;
  padding: 9px 9px 0; background: var(--ink); color: var(--navy);
  /* perforated edge: a solid middle plus a row of holes centred on every edge */
  -webkit-mask: linear-gradient(#000 0 0) 50% / calc(100% - 10px) calc(100% - 10px) no-repeat, radial-gradient(circle 4px, #0000 96%, #000) -6px -6px / 12px 12px;
  mask: linear-gradient(#000 0 0) 50% / calc(100% - 10px) calc(100% - 10px) no-repeat, radial-gradient(circle 4px, #0000 96%, #000) -6px -6px / 12px 12px;
}
.stamp img { flex: 1; width: 100%; min-height: 0; object-fit: cover; }
.stamp__photo { object-position: 50% 30%; filter: saturate(0.9) contrast(1.03); }
.stamp__value { position: absolute; top: 15px; right: 15px; font-size: 0.6875rem; color: var(--aqua); }
.stamp__name { display: block; padding: 7px 0 9px; font-size: 0.625rem; line-height: 1.25; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.postcard__body { position: relative; display: flex; flex-direction: column; min-width: 0; }
.postmark { position: absolute; left: -44px; top: 4px; width: 210px; height: auto; color: rgba(191, 245, 242, 0.32); pointer-events: none; }
.postmark text { font-family: var(--mono); }
.postcard__tag { position: relative; align-self: flex-end; padding: 6px 10px; font-size: 0.6875rem; color: var(--aqua); border: 1px dashed var(--line-strong); border-radius: 3px; }
.postcard__icons { display: flex; flex-wrap: wrap; gap: 2px; margin-top: auto; padding: 14px 0 10px; border-bottom: 1px dashed var(--line); }
.postcard__icons a { display: grid; place-items: center; width: 44px; height: 44px; color: var(--ink); border-radius: 4px; }
.postcard__icons a:hover { color: var(--aqua); background: rgba(63, 208, 217, 0.08); }
.postcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0 2px; font-size: 0.75rem; color: var(--muted); }

.contact__list { border-top: 1px solid var(--rule); }
.contact__list a {
  display: grid; grid-template-columns: 24px minmax(0, auto) minmax(0, 1fr) 18px; gap: 16px; align-items: center;
  min-height: 64px; padding: 10px 8px; border-bottom: 1px solid var(--rule); text-decoration: none;
}
.contact__icon { display: grid; color: var(--muted); }
.contact__name { font-size: 1.25rem; font-weight: 500; }
.contact__desc { justify-self: end; text-align: right; font-size: 0.875rem; color: var(--muted); overflow-wrap: anywhere; }
.contact__go { color: var(--ocean); transition: transform 200ms var(--ease), color 200ms var(--ease); }
.contact__list a:hover { background: rgba(63, 208, 217, 0.05); }
.contact__list a:hover .contact__name, .contact__list a:hover .contact__icon, .contact__list a:hover .contact__go { color: var(--aqua); }
.contact__list a:hover .contact__go { transform: translate(2px, -2px); }

/* ---------- projects page (#projects) ---------- */
.view--projects .view__title { grid-column: 1 / -1; }
.pj { grid-column: 1 / -1; margin-top: 72px; border-top: 1px solid var(--rule); }
.pj__row { position: relative; }
.pj__rule { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--rule); transform-origin: left; }
.pj__link {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: 56px minmax(0, 1.5fr) minmax(0, 1.4fr) 88px 28px; gap: 28px; align-items: center;
  padding: 30px 12px; text-decoration: none;
  transition: opacity 400ms var(--ease);
}
/* a soft light sweeps across the row on hover */
.pj__fill { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(63, 208, 217, 0.12), rgba(63, 208, 217, 0.02) 70%, transparent); transform: scaleX(0); transform-origin: left; transition: transform 700ms var(--ease); }
.pj__num { font-size: 0.8125rem; color: var(--muted); transition: color 300ms var(--ease); }
/* the name rolls up and an aqua copy takes its place */
.pj__name { display: block; overflow: hidden; font-size: clamp(1.75rem, 0.9rem + 2.8vw, 3.75rem); font-weight: 500; line-height: 1.15; letter-spacing: -0.025em; }
.pj__roll { display: grid; transition: transform 650ms var(--ease); }
.pj__roll > span { grid-area: 1 / 1; white-space: nowrap; }
.pj__roll > span:last-child { transform: translateY(100%); color: var(--aqua); }
.pj__about { display: grid; gap: 6px; transition: transform 650ms var(--ease); }
.pj__line { font-size: 1rem; }
.pj__tags { font-size: 0.75rem; color: var(--muted); }
.pj__year { justify-self: end; font-size: 0.8125rem; color: var(--muted); }
.pj__arrow { color: var(--ocean); transform: translateX(-6px) rotate(-45deg); transition: transform 500ms var(--ease), color 300ms var(--ease); }
.pj__thumb { display: none; }
.pj__link:hover .pj__fill, .pj__link:focus-visible .pj__fill { transform: scaleX(1); }
.pj__link:hover .pj__roll, .pj__link:focus-visible .pj__roll { transform: translateY(-100%); }
.pj__link:hover .pj__num, .pj__link:focus-visible .pj__num { color: var(--cyan); }
.pj__link:hover .pj__about, .pj__link:focus-visible .pj__about { transform: translateX(10px); }
.pj__link:hover .pj__arrow, .pj__link:focus-visible .pj__arrow { color: var(--aqua); transform: none; }
.pj__link:focus-visible { outline-offset: -2px; }
/* the rows you're not pointing at step back */
.pj:hover .pj__link:not(:hover) { opacity: 0.38; }

/* the preview card that follows the cursor */
.pj__preview {
  position: fixed; left: 0; top: 0; z-index: 32; width: 360px; aspect-ratio: 4 / 3; pointer-events: none;
  border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; background: var(--navy);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.85);
  clip-path: inset(50% 50% 50% 50% round 10px); transition: clip-path 550ms var(--ease);
  will-change: transform, clip-path;
}
.pj__preview.is-on { clip-path: inset(0 0 0 0 round 10px); }
.pj__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.18); transition: opacity 450ms var(--ease), transform 1100ms var(--ease); }
.pj__media.is-active { opacity: 1; transform: scale(1); }

/* touch screens have no cursor: each row shows its own picture instead */
@media (hover: none), (pointer: coarse) {
  .pj__preview { display: none; }
  .pj:hover .pj__link:not(:hover) { opacity: 1; }
}

/* ---------- loading screen ---------- */
.loader { position: fixed; inset: 0; z-index: 15; display: none; place-items: center; align-content: center; gap: 16px; background: var(--navy); transition: opacity 300ms var(--ease); }
.is-loading .loader { display: grid; }
.loader.is-done { opacity: 0; pointer-events: none; }
.barcode--big { width: min(360px, 70vw); height: 40px; }
.barcode--big rect { opacity: 0; }
.barcode--big rect.on { opacity: 1; }
.loader__pct { font-size: 0.875rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- medium ---------- */
@media (max-width: 1023.98px) {
  .view__title { grid-column: 1 / -1; }
  .view__figure { grid-column: 1 / -1; justify-self: start; padding: 12px 0 0; }
  .view__text { grid-column: 1 / -1; }
  .info__h, .view--info .pairs, .view--info .certs, .view--info .links, .info__fine, .legal { grid-column: 1 / -1; }
  .info__h { margin-bottom: -40px; }
  .contact { grid-template-columns: minmax(0, 1fr); gap: 48px; }
}

/* ---------- narrow ---------- */
@media (max-width: 767.98px) {
  .is-view body::before { height: calc(var(--top) + 84px); }
  .corner--tc { top: calc(var(--top) + 44px); left: var(--left); transform: none; }
  .name { min-height: 40px; line-height: 1.2; max-width: calc(100vw - 2 * var(--pad) - 236px); }
  .corner--tr { gap: 3px; }
  .corner--tr .ctl { padding: 0 9px; font-size: 0.8125rem; }
  .pj { margin-top: 40px; }
  .pj__link { grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-areas: "num name year" ". about about" ". thumb thumb"; gap: 8px 12px; padding: 22px 4px 24px; }
  .pj__num { grid-area: num; align-self: start; padding-top: 0.7em; }
  .pj__name { grid-area: name; font-size: clamp(1.25rem, 6.2vw, 1.75rem); }
  .pj__year { grid-area: year; align-self: start; padding-top: 0.7em; }
  .pj__about { grid-area: about; }
  .pj__arrow { display: none; }
  .pj__thumb { grid-area: thumb; display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; margin-top: 10px; border: 1px solid var(--line); border-radius: 6px; }
  .barcode { width: 120px; height: 12px; }
  .corner--bl { bottom: calc(var(--bottom) + 56px); }
  .corner--bl .fine { display: none; }
  .who { font-size: 0.8125rem; color: var(--muted); margin-bottom: 0; }
  .now { margin-bottom: 10px; }
  .mode-list .corner--bl .fine { display: block; }
  .corner--br .ctl { padding: 0 12px; font-size: 0.8125rem; }
  .hint { left: var(--left); right: var(--right); top: calc(var(--top) + 72px); bottom: auto; transform: none; white-space: normal; }
  .list { padding-top: calc(var(--top) + 96px); }
  .list__rows a { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .list__rows a > :nth-child(3) { grid-column: 2 / -1; grid-row: 2; font-size: 0.875rem; }
  .view__inner { display: block; padding-top: calc(var(--top) + 96px); }
  .view__text { margin-top: 32px; font-size: 1rem; }
  .view__gallery { grid-template-columns: 1fr; gap: 16px; margin-top: 40px; }
  .view__gallery .tall { grid-column: auto; grid-row: auto; }
  .info__h { margin: 48px 0 16px; }
  .view--info .pairs, .view--info .certs, .view--info .links, .legal { margin-top: 0; }
  .pairs > div { grid-template-columns: 1fr; gap: 2px; }
  .certs li { flex-direction: column; gap: 0; }
  .certs li > span:last-child { text-align: left; }
  .viewbar { left: 0; right: 0; bottom: 0; padding: 8px var(--right) var(--bottom) var(--left); background: var(--panel); border-top: 1px solid var(--line); }
  .viewbar .ctl { flex: 1; justify-content: center; }
  .contact { margin-top: 40px; }
  .postcard { grid-template-columns: minmax(104px, 38%) minmax(0, 1fr); gap: 14px; padding: 12px; }
  .postmark { left: -30px; width: 130px; opacity: 0.7; }
  .postcard__tag { font-size: 0.625rem; padding: 5px 8px; }
  .postcard__icons a { width: 40px; height: 40px; }
  .postcard__foot { flex-wrap: wrap; }
  .contact__list a { grid-template-columns: 24px minmax(0, 1fr) 18px; row-gap: 2px; }
  .contact__desc { grid-column: 2; grid-row: 2; justify-self: start; text-align: left; }
  .contact__go { grid-column: 3; grid-row: 1 / span 2; }
}

/* ---------- 404 page (404.html, served by nginx for missing addresses) ---------- */
.notfound { min-height: 100vh; background: radial-gradient(120% 80% at 70% 110%, var(--teal), var(--navy) 60%); }
.notfound__main { min-height: 100vh; display: grid; align-content: center; gap: 16px; max-width: 720px; padding: calc(var(--top) + 80px) var(--right) var(--bottom) var(--left); }
.notfound__code { font-size: 0.875rem; color: var(--cyan); }
.notfound__title { font-size: clamp(2.5rem, 1.6rem + 5vw, 5.5rem); font-weight: 500; line-height: 1.05; letter-spacing: -0.03em; }
.notfound__text { font-size: 1.125rem; max-width: 52ch; }
.notfound__text--el { color: var(--muted); font-size: 1rem; }
.notfound__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
