/* ============================================================
   niraj.dev - hand-set stylesheet. No framework, no build step.
   Design language: security-document DNA on a dark press sheet.
   ============================================================ */

/* Self-hosted fonts (SIL OFL) - this site makes zero third-party requests. */
@font-face {
  font-family: "Space Grotesk"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/space-grotesk-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/assets/fonts/space-grotesk-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/space-grotesk-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
}

:root {
  color-scheme: dark;

  /* paper & ink */
  --bg: #0a0d14;
  --bg-2: #0d1220;
  --card: #101725;
  --card-edge: #1d2839;
  --ink: #e9edf5;
  --dim: #a6b2c6;
  --faint: #7b89a3;
  --line: rgba(166, 178, 198, 0.14);

  /* security inks */
  --accent: #3ecf9b;      /* currency green */
  --accent-soft: rgba(62, 207, 155, 0.12);
  --gold: #c9a86a;        /* foil / serial ink */
  --gold-bright: #e3c98f;
  --danger: #e26d6d;

  /* guilloché plate colours (read by site.js) */
  --g1: rgba(62, 207, 155, 0.55);
  --g2: rgba(201, 168, 106, 0.42);
  --g3: rgba(166, 178, 198, 0.22);

  --font-display: "Space Grotesk", "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --w: 1080px;
  --radius: 10px;
  --glow: none;
}

/* UV inspection mode - fluorescent inks come up, paper goes black */
html.uv {
  --bg: #04060c;
  --bg-2: #060913;
  --card: #0a0f1d;
  --card-edge: #232f52;
  --ink: #eef0ff;
  --dim: #a9b4e0;
  --faint: #7581b3;
  --accent: #8f7bff;
  --accent-soft: rgba(143, 123, 255, 0.14);
  --gold: #c6ff4f;
  --gold-bright: #dcff85;
  --g1: rgba(143, 123, 255, 0.6);
  --g2: rgba(77, 225, 255, 0.45);
  --g3: rgba(198, 255, 79, 0.18);
  --glow: 0 0 14px;
}

/* ---------- reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  position: relative;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16.5px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  transition: background 0.45s ease, color 0.45s ease;
}
html.uv body {
  background:
    radial-gradient(1100px 520px at 70% -10%, rgba(143, 123, 255, 0.09), transparent 60%),
    var(--bg);
}
img, canvas, svg { max-width: 100%; }
/* security paper: a whisper of fibre grain under everything */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.055;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--gold-bright); }
p { margin: 0 0 1.1em; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--accent); color: #06251a; }

.wrap { max-width: var(--w); margin: 0 auto; padding: 0 24px; position: relative; z-index: 2; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--card); border: 1px solid var(--card-edge);
  padding: 8px 14px; border-radius: 6px; font-family: var(--font-mono); font-size: 12px;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

/* mono labels - the document voice */
.label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
}
.mono { font-family: var(--font-mono); }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.wordmark {
  font-family: var(--font-mono); font-size: 15px; font-weight: 500;
  color: var(--ink); letter-spacing: 0.02em;
}
.wordmark .tld { color: var(--accent); }
.wordmark .caret {
  display: inline-block; width: 8px; height: 17px; margin-left: 3px;
  background: var(--accent); vertical-align: -3px;
  animation: blink 1.15s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a {
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--dim);
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"] { border-bottom: 1px solid var(--gold); padding-bottom: 2px; }

.uv-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em;
  color: var(--dim); background: transparent;
  border: 1px solid var(--card-edge); border-radius: 999px;
  padding: 6px 13px; cursor: pointer;
  transition: border-color 0.3s, color 0.3s, box-shadow 0.3s;
}
.uv-toggle .bulb {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--faint); transition: background 0.3s, box-shadow 0.3s;
}
.uv-toggle:hover { border-color: var(--accent); color: var(--ink); }
html.uv .uv-toggle {
  border-color: var(--accent); color: var(--gold);
  box-shadow: 0 0 16px rgba(143, 123, 255, 0.35);
}
html.uv .uv-toggle .bulb { background: var(--gold); box-shadow: 0 0 10px var(--gold); }

/* ---------- hero / data page ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero .wrap { padding-top: 84px; padding-bottom: 72px; }
.hero-canvas {
  position: absolute; right: -150px; top: -110px;
  width: 820px; height: 820px; z-index: 1; opacity: 0.72;
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 55%, transparent 100%);
  pointer-events: none;
}
.hero-canvas.secondary {
  right: 60px; top: auto; bottom: -70px; width: 320px; height: 320px; opacity: 0.4;
}
.reg-mark {
  position: absolute; width: 18px; height: 18px; color: var(--faint);
  opacity: 0.7; z-index: 2; pointer-events: none;
}
.reg-mark.tl { top: 18px; left: 18px; }
.reg-mark.br { bottom: 18px; right: 18px; }

.hero-eyebrow { margin-bottom: 26px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-eyebrow .serial { color: var(--gold); }

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.5rem, 6.4vw, 4.35rem);
  line-height: 1.02;
  letter-spacing: -0.022em;
  font-weight: 700;
  background: linear-gradient(180deg, #f5f7fc 0%, #c9d2e4 55%, #8d99b4 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
html.uv .hero h1 {
  background: linear-gradient(180deg, #f2f0ff 0%, #b9adff 60%, #6d5fd0 100%);
  -webkit-background-clip: text; background-clip: text;
  text-shadow: none;
}
.hero .lede {
  font-size: clamp(1.06rem, 2vw, 1.3rem);
  color: var(--ink); max-width: 34em; margin-bottom: 10px; font-weight: 500;
}
.hero .sub { color: var(--dim); max-width: 40em; }
.hero .sub a { border-bottom: 1px dotted var(--accent); }

/* passport data-page: holder photo + fields */
.datapage {
  margin-top: 40px;
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  background: linear-gradient(180deg, color-mix(in srgb, var(--card) 88%, transparent), transparent);
  padding: 20px 22px 16px;
  display: flex;
  gap: 26px;
  align-items: flex-start;
  max-width: 820px;
  position: relative;
}
.holder { flex: none; width: 132px; margin: 0; }
.holder img {
  display: block; width: 100%; height: auto;
  border-radius: 6px; border: 1px solid var(--card-edge);
  filter: grayscale(1) contrast(1.03);
}
.holder figcaption { margin-top: 7px; text-align: center; }
html.uv .holder img {
  filter: grayscale(1) contrast(1.05) sepia(1) hue-rotate(215deg) saturate(2.1) brightness(0.92);
  box-shadow: 0 0 18px rgba(143, 123, 255, 0.35);
}
.datafields {
  margin: 0; flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px 26px;
}
.datapage div dd { white-space: nowrap; }
.datapage::before {
  content: "DATA PAGE";
  position: absolute; top: -8px; left: 16px;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.22em;
  color: var(--faint); background: var(--bg); padding: 0 8px;
}
.datapage div dt { margin: 0 0 3px; }
.datapage div dd {
  margin: 0; font-family: var(--font-mono); font-size: 13.5px; color: var(--ink);
  letter-spacing: 0.03em;
}
.hero-actions { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.uv-hint { font-family: var(--font-mono); font-size: 11.5px; color: var(--faint); letter-spacing: 0.05em; }
.uv-hint button {
  all: unset; cursor: pointer; color: var(--accent); border-bottom: 1px dotted var(--accent);
}
.uv-hint button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* latent image - appears under UV only */
.latent {
  position: absolute; right: 4%; bottom: 8%;
  font-family: var(--font-mono); font-size: clamp(2rem, 5vw, 3.6rem);
  letter-spacing: 0.35em; font-weight: 500;
  color: transparent; transform: rotate(-12deg);
  pointer-events: none; z-index: 1;
  transition: color 0.6s ease, text-shadow 0.6s ease;
}
html.uv .latent { color: rgba(198, 255, 79, 0.32); text-shadow: 0 0 22px rgba(198, 255, 79, 0.4); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--ink); background: transparent;
  border: 1px solid var(--card-edge); border-radius: 7px;
  padding: 11px 18px; cursor: pointer;
  transition: border-color 0.25s, background 0.25s, color 0.25s;
}
.btn:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.btn.primary { border-color: var(--accent); color: var(--accent); }
.btn.primary:hover { background: var(--accent-soft); color: var(--gold-bright); border-color: var(--gold); }

/* ---------- sections ---------- */
.section { padding: 76px 0 70px; }
.section.alt {
  background: var(--bg-2);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.section-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 8px; }
.section-head .meta-right {
  margin-left: auto; font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); white-space: nowrap;
}
.section-head .index { font-family: var(--font-mono); font-size: 12px; color: var(--gold); letter-spacing: 0.2em; }
.section-head h2 {
  margin: 0; font-size: clamp(1.45rem, 3vw, 1.9rem);
  letter-spacing: -0.01em; font-weight: 700;
}
.section-intro { color: var(--dim); max-width: 46em; margin-bottom: 8px; }

/* microprint rule - the divider is a sentence */
.microline {
  margin: 14px 0 34px; height: 12px; overflow: hidden; white-space: nowrap;
  font-family: var(--font-mono); font-size: 4.5px; letter-spacing: 0.28em;
  color: var(--dim); opacity: 0.6; user-select: none;
  transition: color 0.4s, opacity 0.4s, text-shadow 0.4s;
}
html.uv .microline { color: var(--gold); opacity: 1; text-shadow: 0 0 6px rgba(198, 255, 79, 0.55); }

/* ---------- project cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin: 26px 0 10px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  background: var(--card); border: 1px solid var(--card-edge);
  border-radius: var(--radius); padding: 22px 22px 16px;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  z-index: 2;
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.45; transition: opacity 0.25s;
}
.card.product::before { background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.card.product .card-top .chip { border-color: color-mix(in srgb, var(--gold) 55%, var(--card-edge)); color: var(--gold-bright); }
.card.product:hover { border-color: color-mix(in srgb, var(--gold) 45%, var(--card-edge)); }
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--card-edge)); }
.card:hover::before { opacity: 1; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.serial {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  color: var(--gold); transition: color 0.4s, text-shadow 0.4s;
}
html.uv .serial { text-shadow: var(--glow) rgba(198, 255, 79, 0.6); }
.chip {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--dim);
  border: 1px solid var(--card-edge); border-radius: 4px; padding: 3px 7px;
  white-space: nowrap;
}
.card h3 { margin: 2px 0 0; font-size: 1.24rem; letter-spacing: -0.012em; }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--accent); }
.card .desc { color: var(--dim); font-size: 0.94rem; margin: 0; flex: 1; }
.card .meta { display: flex; gap: 8px; flex-wrap: wrap; }
.card .links {
  display: flex; gap: 16px; margin-top: 6px; padding-top: 12px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase;
}
.card .plate {
  position: absolute; right: 14px; bottom: 12px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.22em;
  color: transparent; transition: color 0.5s;
  pointer-events: none;
}
html.uv .card .plate { color: rgba(77, 225, 255, 0.75); text-shadow: 0 0 8px rgba(77, 225, 255, 0.5); }

/* ---------- security features legend ---------- */
.legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 18px; margin: 28px 0 0; }
.legend .item {
  display: flex; gap: 14px; align-items: flex-start;
  border: 1px dashed var(--card-edge); border-radius: var(--radius);
  padding: 18px 20px; background: color-mix(in srgb, var(--card) 55%, transparent);
}
.legend .glyph {
  flex: none; width: 42px; height: 42px; border-radius: 8px;
  border: 1px solid var(--card-edge); color: var(--accent);
  display: grid; place-items: center;
}
.legend h3 { margin: 0 0 4px; font-size: 0.98rem; }
.legend p { margin: 0; font-size: 0.88rem; color: var(--dim); }

/* ---------- restricted / private section ---------- */
.restricted { border: 1px solid var(--card-edge); border-radius: var(--radius); position: relative; margin-top: 26px; }
.restricted .strip {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 10px 24px; border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(135deg, rgba(226, 109, 109, 0.10) 0 6px, transparent 6px 16px);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--dim);
}
html.uv .restricted .strip { background: repeating-linear-gradient(135deg, rgba(143, 123, 255, 0.14) 0 6px, transparent 6px 16px); }
.restricted .row {
  display: grid; grid-template-columns: 200px 1fr auto; gap: 20px; align-items: center;
  padding: 22px 24px; border-bottom: 1px solid var(--line);
}
.restricted .row:last-child { border-bottom: none; }
.restricted h3 { margin: 0; font-size: 1.02rem; }
.restricted .row p { margin: 4px 0 0; color: var(--dim); font-size: 0.92rem; max-width: 52em; }
.stamp {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--danger);
  border: 1.5px solid var(--danger); border-radius: 4px;
  padding: 5px 10px; transform: rotate(-4deg);
  opacity: 0.82; white-space: nowrap; justify-self: end;
}
.stamp.gold { color: var(--gold); border-color: var(--gold); }
.redact {
  display: inline-block; height: 0.85em; vertical-align: -0.08em;
  background: var(--faint); border-radius: 2px; opacity: 0.8;
}
html.uv .redact { display: none; }
.uv-reveal { display: none; font-family: var(--font-mono); letter-spacing: 0.1em; color: var(--gold); }
html.uv .uv-reveal { display: inline; text-shadow: 0 0 10px rgba(198, 255, 79, 0.45); }

/* ---------- prose & about ---------- */
.prose { max-width: 46em; }
.prose p { color: var(--dim); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose h2 { font-size: 1.35rem; margin: 2.2em 0 0.5em; letter-spacing: -0.01em; }
.prose ul { color: var(--dim); padding-left: 1.2em; }
.prose li { margin-bottom: 0.45em; }

.fieldnotes {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px 26px; margin: 34px 0;
  border: 1px solid var(--card-edge); border-radius: var(--radius); padding: 22px;
}
.fieldnotes dt { margin-bottom: 3px; }
.fieldnotes dd { margin: 0; font-family: var(--font-mono); font-size: 13px; }

/* ---------- project detail pages ---------- */
.page-hero { border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.page-hero .hero-band {
  position: absolute; left: 0; right: 0; bottom: -4px; width: 100%; height: 130px;
  opacity: 0.32; pointer-events: none; z-index: 1;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
}
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
.about-aside { position: sticky; top: 84px; display: grid; gap: 18px; }
.aside-photo { margin: 0; }
.aside-photo img {
  display: block; width: 100%; height: auto; border-radius: 8px;
  border: 1px solid var(--card-edge); filter: grayscale(1) contrast(1.03);
}
html.uv .aside-photo img {
  filter: grayscale(1) contrast(1.05) sepia(1) hue-rotate(215deg) saturate(2.1) brightness(0.92);
  box-shadow: 0 0 18px rgba(143, 123, 255, 0.35);
}
.aside-photo figcaption { margin-top: 8px; text-align: center; }
.about-aside .fieldnotes { grid-template-columns: 1fr; gap: 14px; margin: 0; padding: 18px 20px; }
.prose p.pull {
  border-left: 2px solid var(--gold); padding-left: 18px; margin: 1.6em 0 0;
  font-size: 1.18rem; color: var(--ink); line-height: 1.5;
}
.page-hero .wrap { padding: 56px 24px 44px; }
.crumb { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; }
.page-hero h1 { margin: 18px 0 10px; font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.02em; line-height: 1.12; }
.page-hero .lede { color: var(--dim); font-size: 1.08rem; max-width: 42em; }
.page-hero .meta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

.specimen {
  margin: 40px 0 8px; border: 1px solid var(--card-edge); border-radius: var(--radius);
  overflow: hidden; position: relative; background: var(--bg-2);
}
.specimen canvas { display: block; width: 100%; height: 230px; opacity: 0.7; }
.specimen .overlay {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-mono); letter-spacing: 0.3em; font-size: 13px; color: var(--dim);
  text-transform: uppercase;
}
.specimen figcaption {
  padding: 10px 16px; border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em;
  color: var(--faint); text-transform: uppercase;
}

pre.install {
  position: relative; background: var(--bg-2); border: 1px solid var(--card-edge);
  border-radius: 8px; padding: 16px 52px 16px 18px; overflow-x: auto;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.6; color: var(--ink);
}
pre.install code { font-family: inherit; }
.copy-btn {
  position: absolute; top: 8px; right: 8px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em;
  color: var(--dim); background: var(--card); border: 1px solid var(--card-edge);
  border-radius: 5px; padding: 5px 9px; cursor: pointer;
}
.copy-btn:hover { color: var(--ink); border-color: var(--accent); }

.spec-table { width: 100%; border-collapse: collapse; margin: 10px 0 30px; max-width: 560px; }
.spec-table td {
  padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 0.92rem;
}
.spec-table td:first-child {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--faint); width: 170px; vertical-align: top; padding-top: 12px;
}
.spec-table td:last-child { color: var(--dim); }

.pager {
  display: flex; justify-content: space-between; gap: 16px;
  margin: 48px 0 0; padding-top: 22px; border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
}

/* ---------- footer ---------- */
.site-foot { margin-top: 0; border-top: 1px solid var(--line); position: relative; z-index: 2; }
.colorbar {
  display: flex; gap: 6px; align-items: center;
  max-width: var(--w); margin: 0 auto; padding: 20px 24px 0;
}
.colorbar span { flex: none; width: 30px; height: 10px; border-radius: 1px; }
.colorbar::after {
  content: "⌖"; color: var(--faint); font-size: 12px; line-height: 10px; margin-left: 6px;
}
.site-foot .inner { padding: 34px 0 20px; }
.foot-grid { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.colophon { max-width: 34em; color: var(--faint); font-size: 0.86rem; }
.colophon a { color: var(--dim); border-bottom: 1px dotted var(--faint); }
.foot-links { display: flex; gap: 18px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; }
.uv-msg {
  display: none; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em;
  color: var(--gold); margin-top: 14px; text-shadow: 0 0 10px rgba(198, 255, 79, 0.4);
}
html.uv .uv-msg { display: block; }

.mrz {
  margin-top: 26px; padding: 14px 18px 12px;
  background: var(--bg-2); border: 1px solid var(--card-edge); border-radius: 8px;
  overflow-x: auto;
}
.mrz samp {
  display: block; white-space: pre;
  font-family: var(--font-mono); font-size: 13.5px; line-height: 1.75;
  letter-spacing: 0.24em; color: var(--dim);
}
html.uv .mrz samp { color: var(--dim); }
.mrz-note { margin: 6px 2px 0; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.18em; color: var(--faint); text-transform: uppercase; }
.copyright { margin-top: 20px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--faint); }

/* ---------- fibres (UV) ---------- */
.fibres { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.fibre {
  position: absolute; width: 20px; height: 1.6px; border-radius: 2px;
  background: currentColor; opacity: 0; transition: opacity 0.5s ease;
}
html.uv .fibre { opacity: 0.85; box-shadow: 0 0 7px currentColor; }

/* ---------- intaglio press: raised ink, a hair off register ---------- */
.hero h1, .page-hero h1, .section-head h2 {
  text-shadow:
    1.6px 1.1px 0 rgba(201, 168, 106, 0.22),
    -1px -1px 0 rgba(255, 255, 255, 0.05),
    0 2px 3px rgba(0, 0, 0, 0.55);
}
html.uv .hero h1, html.uv .page-hero h1, html.uv .section-head h2 {
  text-shadow:
    1.6px 1.1px 0 rgba(143, 123, 255, 0.38),
    0 2px 3px rgba(0, 0, 0, 0.6),
    0 0 18px rgba(143, 123, 255, 0.22);
}

/* ---------- contact block + vCard QR ---------- */
.contact-panel {
  position: relative; margin-top: 30px;
  border: 1px solid var(--card-edge); border-radius: var(--radius);
  background: linear-gradient(180deg, color-mix(in srgb, var(--card) 88%, transparent), transparent);
  padding: 28px 28px 24px;
}
.contact-panel::before {
  content: "OBSERVATIONS"; position: absolute; top: -8px; left: 16px;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.22em;
  color: var(--faint); background: var(--bg-2); padding: 0 8px;
}
.contact-panel .contact-grid { margin-top: 0; }
.contact-grid {
  display: flex; gap: 40px; align-items: flex-start;
  justify-content: space-between; flex-wrap: wrap; margin-top: 22px;
}
.contact-rows { display: grid; gap: 13px; align-content: start; }
.crow { display: grid; grid-template-columns: 100px auto; gap: 16px; align-items: baseline; }
.crow .mono { font-size: 13.5px; }
.crow a { color: var(--ink); border-bottom: 1px dotted var(--accent); }
.crow a:hover { color: var(--accent); }
.qr-tile { margin: 0; text-align: center; }
.qr-tile img {
  display: block; width: 170px; height: 170px; margin: 0 auto;
  box-sizing: content-box;
  background: #04060b;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  transition: box-shadow 0.4s, border-color 0.4s;
}
.qr-tile figcaption { margin-top: 10px; color: var(--faint); }
html.uv .qr-tile img {
  border-color: rgba(143, 123, 255, 0.85);
  box-shadow: 0 0 24px rgba(143, 123, 255, 0.45);
}

/* ---------- 404 ---------- */
.void-wrap { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 80px 24px; }
.void-wrap .stamp { display: inline-block; margin-bottom: 24px; font-size: 13px; padding: 8px 16px; }

/* ---------- print: a specimen sheet ---------- */
.print-note { display: none; }
@media print {
  :root { --bg: #fff; --bg-2: #fff; --card: #fff; --ink: #111; --dim: #333; --faint: #555; --card-edge: #bbb; --line: #ccc; }
  body { background: #fff; color: #111; }
  .site-head, .uv-toggle, .hero-canvas, .fibres, .latent, .btn, .uv-hint, .colorbar { display: none !important; }
  .print-note {
    display: block; font-family: var(--font-mono); font-size: 10px;
    letter-spacing: 0.2em; text-transform: uppercase; color: #444;
    border: 1px solid #999; padding: 8px 12px; margin: 12px 0;
  }
  a { color: #111; }
}

/* ---------- motion & small screens ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-aside { position: static; grid-template-columns: 200px 1fr; align-items: start; }
  .about-aside .fieldnotes { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
}
@media (max-width: 860px) {
  .hero-canvas { right: -260px; top: -80px; opacity: 0.35; }
  .hero-canvas.secondary { display: none; }
  .section-head .meta-right { display: none; }
  .legend { grid-template-columns: 1fr; }
  .restricted .row { grid-template-columns: 1fr; gap: 6px; }
  .stamp { justify-self: start; margin-top: 8px; }
}
@media (max-width: 620px) {
  .site-nav { gap: 14px; }
  .site-nav a.hide-sm { display: none; }
  .hero .wrap { padding-top: 56px; padding-bottom: 52px; }
  .datapage { flex-direction: column; }
  .holder { width: 116px; }
  .datafields { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 56px 0 52px; }
  .page-hero .hero-band { opacity: 0.18; height: 90px; }
  .about-aside { grid-template-columns: 1fr; }
  .aside-photo { max-width: 180px; }
  .contact-panel { padding: 22px 18px 18px; }
  .mrz samp { font-size: 11.5px; letter-spacing: 0.18em; }
}
