/*
Theme Name: Ortyx Nova
Theme URI: https://ortyx.tech
Author: Linus Särnhult
Author URI: https://ortyx.tech
Description: A futuristic single-page CV theme — a real-time 3D wireframe core around the portrait, a drifting starfield over a perspective grid, glitch typography, holographic tilt cards, self-drawing line icons and a scroll-driven timeline. Dependency-free (no JS libraries) and fully respects prefers-reduced-motion. Shares its content layer with Ortyx CV: everything lives in inc/cv-data.php and every key is filterable as ortyx_cv_{key}.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ortyx-nova
*/

/* ---------------------------------------------------------------- tokens */

:root {
  --void: #04060c;
  --void-2: #070b16;
  --panel: rgba(13, 20, 38, 0.58);
  --panel-solid: #0b1222;
  --line: rgba(130, 200, 255, 0.13);
  --line-hi: rgba(110, 230, 255, 0.38);
  --text: #e6efff;
  --muted: #8d9cba;
  --dim: #5a6886;
  --cyan: #45f3ff;
  --cyan-deep: #12b5d6;
  --violet: #8d6bff;
  --magenta: #ff4fd8;
  --lime: #7dffb4;
  --glow-c: 0 0 18px rgba(69, 243, 255, 0.45);
  --display: "Space Grotesk", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --sans: "Space Grotesk", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --hud-h: 60px;
}

@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

/* ------------------------------------------------------------------ base */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--hud-h) + 24px);
  background: var(--void);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--void);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: rgba(69, 243, 255, 0.28); color: #fff; }

a { color: var(--cyan); text-decoration: none; }
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

img { max-width: 100%; display: block; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--cyan);
  color: var(--void);
  font-family: var(--mono);
  font-size: 13px;
  border-radius: 6px;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

.ico {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  vertical-align: -0.18em;
}

/* -------------------------------------------------------------- backdrop */

.space {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 78% -10%, rgba(141, 107, 255, 0.16), transparent 60%),
    radial-gradient(900px 600px at 0% 10%, rgba(18, 181, 214, 0.12), transparent 60%),
    linear-gradient(180deg, var(--void) 0%, var(--void-2) 100%);
}

.space-stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.space-aurora {
  position: absolute;
  inset: -20%;
  background:
    conic-gradient(from 200deg at 60% 40%, transparent 0deg, rgba(69, 243, 255, 0.07) 60deg, transparent 120deg, rgba(255, 79, 216, 0.05) 200deg, transparent 260deg);
  filter: blur(60px);
  animation: aurora 26s linear infinite;
}

@keyframes aurora { to { transform: rotate(360deg); } }

.space-grid {
  position: absolute;
  left: -50%;
  right: -50%;
  bottom: -2px;
  height: 52vh;
  background-image:
    linear-gradient(rgba(69, 243, 255, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(141, 107, 255, 0.2) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(420px) rotateX(68deg);
  transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0.55) 35%, transparent 80%);
  mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0.55) 35%, transparent 80%);
  animation: grid-run 2.4s linear infinite;
  opacity: 0.55;
}

@keyframes grid-run { to { background-position: 0 64px, 0 0; } }

.space-scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}
.space-scan::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 22vh;
  background: linear-gradient(180deg, transparent, rgba(69, 243, 255, 0.045), transparent);
  animation: sweep 9s linear infinite;
}

@keyframes sweep { from { top: -25vh; } to { top: 110vh; } }

.spotlight {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(520px circle at var(--px, 50%) var(--py, 30%), rgba(69, 243, 255, 0.06), transparent 60%);
}

/* ------------------------------------------------------------------- HUD */

.hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--hud-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(16px, 4vw, 40px);
  background: linear-gradient(180deg, rgba(4, 6, 12, 0.88), rgba(4, 6, 12, 0.55));
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hud::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 1px;
  width: var(--scroll, 0%);
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--magenta));
  box-shadow: var(--glow-c);
}

.hud-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 500;
}

.hud-glyph {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1.4;
  filter: drop-shadow(0 0 6px rgba(69, 243, 255, 0.6));
  animation: spin 18s linear infinite;
}
.hud-glyph polygon:nth-child(2) { stroke: var(--violet); }
.hud-glyph circle { fill: var(--cyan); stroke: none; }

@keyframes spin { to { transform: rotate(360deg); } }

.hud-nav {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hud-nav a {
  display: inline-flex;
  gap: 8px;
  padding: 8px 14px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 999px;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.hud-nav a i { font-style: normal; color: var(--cyan); opacity: 0.7; }
.hud-nav a:hover,
.hud-nav a.is-active {
  color: var(--text);
  border-color: var(--line-hi);
  background: rgba(69, 243, 255, 0.06);
}

.hud-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.pulse {
  position: relative;
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
}
.pulse::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid var(--lime);
  animation: ping 2s var(--ease) infinite;
}

@keyframes ping {
  from { transform: scale(0.4); opacity: 1; }
  to { transform: scale(1.8); opacity: 0; }
}

/* ---------------------------------------------------------------- layout */

.wrap {
  position: relative;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: calc(var(--hud-h) + 48px) clamp(16px, 4vw, 40px) 0;
}

/* ------------------------------------------------------------------ hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  min-height: calc(100vh - var(--hud-h) - 140px);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 8px 14px;
  border: 1px solid var(--line-hi);
  border-radius: 999px;
  background: rgba(69, 243, 255, 0.05);
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.name {
  margin: 26px 0 22px;
  font-family: var(--display);
  font-size: clamp(56px, 9vw, 124px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.045em;
}

.glitch {
  position: relative;
  display: block;
  width: fit-content;
  background: linear-gradient(100deg, #fff 0%, #d6f9ff 40%, var(--cyan) 75%, var(--violet) 110%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.glitch.alt {
  background: linear-gradient(100deg, var(--violet) -10%, var(--magenta) 45%, #ffd0f3 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}
.glitch::before {
  color: var(--cyan);
  text-shadow: -2px 0 var(--cyan);
  animation: glitch-a 6.5s steps(1) infinite;
}
.glitch::after {
  color: var(--magenta);
  text-shadow: 2px 0 var(--magenta);
  animation: glitch-b 6.5s steps(1) infinite;
}
.glitch.alt::before,
.glitch.alt::after { animation-delay: 0.9s; }

@keyframes glitch-a {
  0%, 90%, 100% { opacity: 0; transform: none; clip-path: inset(0 0 0 0); }
  91% { opacity: 0.85; transform: translate(-4px, 1px); clip-path: inset(12% 0 58% 0); }
  93% { opacity: 0.85; transform: translate(3px, -1px); clip-path: inset(62% 0 8% 0); }
  95% { opacity: 0.85; transform: translate(-2px, 0); clip-path: inset(34% 0 40% 0); }
}
@keyframes glitch-b {
  0%, 90%, 100% { opacity: 0; transform: none; clip-path: inset(0 0 0 0); }
  92% { opacity: 0.8; transform: translate(4px, -1px); clip-path: inset(48% 0 22% 0); }
  94% { opacity: 0.8; transform: translate(-3px, 1px); clip-path: inset(4% 0 72% 0); }
  96% { opacity: 0.8; transform: translate(2px, 0); clip-path: inset(70% 0 2% 0); }
}

.lede {
  max-width: 60ch;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: clamp(16px, 1.35vw, 18px);
}
.lede b { color: var(--text); font-weight: 600; }
.lede .frost,
.frost {
  color: var(--cyan);
  text-shadow: 0 0 14px rgba(69, 243, 255, 0.45);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}
.meta-row li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12.5px;
}
.meta-row .ico { color: var(--cyan); }

.cta { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  color: var(--void);
  background: linear-gradient(100deg, var(--cyan), #9ff8ff 50%, var(--cyan));
  background-size: 200% 100%;
  box-shadow: 0 0 0 1px rgba(69, 243, 255, 0.6), 0 10px 40px -10px rgba(69, 243, 255, 0.7);
  animation: shimmer 4s linear infinite;
}
.btn-primary:hover { box-shadow: 0 0 0 1px var(--cyan), 0 14px 50px -8px rgba(69, 243, 255, 0.9); }

@keyframes shimmer { to { background-position: -200% 0; } }

.btn-ghost {
  color: var(--text);
  border: 1px solid var(--line-hi);
  background: rgba(13, 20, 38, 0.6);
}
.btn-ghost:hover { border-color: var(--cyan); box-shadow: var(--glow-c); }
.btn-ghost .ico { transition: transform 0.3s var(--ease); }
.btn-ghost:hover .ico { transform: translateY(3px); }

/* ---- 3D core */

.core { perspective: 1200px; }

.core-frame {
  position: relative;
  aspect-ratio: 1;
  width: min(100%, 560px);
  margin-inline: auto;
}

.corner {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 0 solid var(--cyan);
  opacity: 0.8;
}
.corner.tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.corner.tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.corner.bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.corner.br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }

.core-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  padding: 3px 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  white-space: nowrap;
  background: var(--void);
}
.core-label b { color: var(--cyan); font-weight: 400; }
.core-label.top { top: -9px; }
.core-label.bottom { bottom: -9px; }

.portrait {
  position: absolute;
  inset: 31%;
  z-index: 1;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(from var(--angle), var(--cyan), var(--violet), var(--magenta), var(--cyan));
  animation: rotate-angle 6s linear infinite;
  box-shadow: 0 0 60px -6px rgba(69, 243, 255, 0.55), 0 0 120px -20px rgba(141, 107, 255, 0.7);
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  filter: saturate(0.9) contrast(1.05);
}
.portrait::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background:
    repeating-linear-gradient(180deg, rgba(69, 243, 255, 0.08) 0 1px, transparent 1px 4px),
    radial-gradient(circle at 50% 120%, rgba(69, 243, 255, 0.35), transparent 60%);
  mix-blend-mode: screen;
}

@keyframes rotate-angle { to { --angle: 360deg; } }

.core-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ---- stats */

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 56px 0 0;
}

.panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.stat { padding: 22px 24px 20px; overflow: hidden; }
.stat > .ico {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 26px;
  height: 26px;
  color: var(--violet);
}
.stat .num {
  font-family: var(--display);
  font-size: clamp(40px, 5vw, 58px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow: 0 0 24px rgba(69, 243, 255, 0.4);
  font-variant-numeric: tabular-nums;
}
.stat .lbl {
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.stat .bar {
  margin-top: 16px;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.stat .bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  box-shadow: var(--glow-c);
  transition: width 1.6s var(--ease) 0.2s;
}
.stats.in .stat:nth-child(1) .bar i { width: 92%; }
.stats.in .stat:nth-child(2) .bar i { width: 74%; }
.stats.in .stat:nth-child(3) .bar i { width: 58%; }

/* -------------------------------------------------------------- sections */

.cv-section { padding: clamp(80px, 11vw, 140px) 0 0; }

.section-head { margin-bottom: 44px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.eyebrow i {
  font-style: normal;
  padding: 3px 8px;
  border: 1px solid var(--line-hi);
  border-radius: 4px;
}
.eyebrow::after {
  content: "";
  flex: 1;
  max-width: 240px;
  height: 1px;
  background: linear-gradient(90deg, var(--line-hi), transparent);
}

.section-head h2 {
  max-width: 22ch;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(30px, 4.2vw, 50px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

/* ---- holographic card base */

.holo {
  position: relative;
  border-radius: 16px;
  background: var(--panel);
  transform-style: preserve-3d;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.5s var(--ease), box-shadow 0.4s;
}
.holo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(from var(--angle), var(--line) 0deg, var(--cyan) 50deg, var(--line) 110deg, var(--line) 200deg, var(--violet) 260deg, var(--line) 320deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: rotate-angle 7s linear infinite;
  opacity: 0.75;
}
.holo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgba(69, 243, 255, 0.12), transparent 50%);
  opacity: 0;
  transition: opacity 0.4s;
}
.holo:hover { box-shadow: 0 30px 70px -30px rgba(69, 243, 255, 0.35); }
.holo:hover::before { opacity: 1; }
.holo:hover::after { opacity: 1; }
.tilt.is-tilting { transition: transform 0.08s linear, box-shadow 0.4s; }

/* ---- domains */

.domains {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.domain {
  display: flex;
  flex-direction: column;
  padding: 26px 26px 22px;
  min-height: 300px;
}

.domain-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  transform: translateZ(40px);
}

.hex {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  color: var(--cyan);
  background: linear-gradient(140deg, rgba(69, 243, 255, 0.16), rgba(141, 107, 255, 0.12));
  clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  filter: drop-shadow(0 0 10px rgba(69, 243, 255, 0.4));
}
.hex .ico { width: 28px; height: 28px; }

.idx {
  font-family: var(--mono);
  font-size: 34px;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-hi);
}

.domain h3 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transform: translateZ(30px);
}
.domain p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 15px;
  transform: translateZ(20px);
}
.domain-foot {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
}
.ok { color: var(--lime); }
.ok::before { content: "● "; }

/* ---- timeline */

.timeline {
  --p: 0;
  position: relative;
  margin: 0;
  padding: 0 0 0 44px;
  list-style: none;
}
.timeline::before,
.timeline::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 8px;
  width: 2px;
  border-radius: 2px;
}
.timeline::before { bottom: 8px; background: var(--line); }
.timeline::after {
  height: calc((100% - 16px) * var(--p));
  background: linear-gradient(180deg, var(--cyan), var(--violet) 60%, var(--magenta));
  box-shadow: 0 0 14px rgba(69, 243, 255, 0.7);
}

.tl-item { position: relative; padding-bottom: 18px; }

.tl-node {
  position: absolute;
  left: -40px;
  top: 24px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--void);
  border: 2px solid var(--dim);
  z-index: 1;
  transition: border-color 0.4s, box-shadow 0.4s, background 0.4s;
}
.tl-item.lit .tl-node {
  border-color: var(--cyan);
  background: rgba(69, 243, 255, 0.25);
  box-shadow: 0 0 14px rgba(69, 243, 255, 0.8);
}
.tl-item.now .tl-node {
  border-color: var(--lime);
  background: var(--lime);
  box-shadow: 0 0 18px var(--lime);
}
.tl-item.now .tl-node::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid var(--lime);
  animation: ping 2s var(--ease) infinite;
}

.tl-card {
  padding: 20px 24px;
  transition: border-color 0.4s, transform 0.5s var(--ease), background 0.4s;
}
.tl-card:hover {
  border-color: var(--line-hi);
  background: rgba(16, 26, 50, 0.7);
  transform: translateX(6px);
}
.tl-item.now .tl-card {
  border-color: rgba(125, 255, 180, 0.35);
  background: linear-gradient(120deg, rgba(125, 255, 180, 0.07), var(--panel) 50%);
}

.tl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.tl-when {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}
.tl-live {
  padding: 3px 10px;
  border: 1px solid rgba(125, 255, 180, 0.5);
  border-radius: 999px;
  color: var(--lime);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.tl-role {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.tl-co {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  color: var(--muted);
  font-size: 14px;
}
.tl-co span { display: inline-flex; align-items: center; gap: 7px; }
.tl-co b { color: var(--text); font-weight: 500; }
.tl-co .ico { color: var(--violet); }
.tl-desc {
  max-width: 72ch;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
}

/* ---- links */

.links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px;
  color: var(--text);
}
.link-ico {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  flex: none;
  border-radius: 12px;
  color: var(--cyan);
  border: 1px solid var(--line-hi);
  background: rgba(69, 243, 255, 0.06);
  transform: translateZ(30px);
}
.link-ico .ico { width: 24px; height: 24px; }
.link-text { display: flex; flex-direction: column; min-width: 0; transform: translateZ(20px); }
.lname { font-weight: 600; font-size: 17px; }
.lhandle {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.link-arrow {
  margin-left: auto;
  width: 22px;
  height: 22px;
  color: var(--dim);
  transition: transform 0.35s var(--ease), color 0.35s;
}
.link:hover .link-arrow { color: var(--cyan); transform: translate(3px, -3px); }

/* ---- footer */

.cv-footer {
  margin-top: clamp(90px, 12vw, 150px);
  padding-bottom: 32px;
}

.ticker {
  overflow: hidden;
  padding: 18px 0;
  border-block: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 38s linear infinite;
}
.ticker-track span {
  padding: 0 28px;
  font-family: var(--display);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(141, 200, 255, 0.35);
  white-space: nowrap;
}
.ticker-track span:nth-child(3n + 1) { color: var(--cyan); -webkit-text-stroke: 0; text-shadow: var(--glow-c); }
.ticker-track span::after { content: "◆"; margin-left: 56px; font-size: 0.4em; vertical-align: middle; color: var(--violet); -webkit-text-stroke: 0; }

@keyframes ticker { to { transform: translateX(-50%); } }

.cv-footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 26px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 12px;
}
.cv-footer-row a:not(.to-top) { color: var(--muted); }
.cv-footer-row a:not(.to-top):hover { color: var(--cyan); }

.to-top {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line-hi);
  color: var(--cyan);
  transition: box-shadow 0.3s, transform 0.3s var(--ease);
}
.to-top:hover { box-shadow: var(--glow-c); transform: translateY(-3px); }

/* ------------------------------------------------------------ motion: in */

.rise {
  opacity: 0;
  transform: translateY(18px);
  filter: blur(6px);
  animation: rise 1s var(--ease) forwards;
}
.rise.d1 { animation-delay: 0.12s; }
.rise.d2 { animation-delay: 0.26s; }
.rise.d3 { animation-delay: 0.4s; }
.rise.d4 { animation-delay: 0.54s; }

@keyframes rise { to { opacity: 1; transform: none; filter: none; } }

.js .reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.js .reveal.in { opacity: 1; transform: none; }

/* Cards cascade in after their section. */
.js .reveal .domain,
.js .reveal .link,
.js .reveal .tl-item,
.js .stats .stat {
  opacity: 0;
  translate: 0 26px;
  transition: opacity 0.8s var(--ease), translate 0.8s var(--ease);
}
.js .reveal.in .domain,
.js .reveal.in .link,
.js .reveal .tl-item.seen,
.js .stats.in .stat { opacity: 1; translate: 0 0; }
.js .reveal.in .domain:nth-child(2),
.js .reveal.in .link:nth-child(2),
.js .stats.in .stat:nth-child(2) { transition-delay: 0.12s; }
.js .reveal.in .domain:nth-child(3),
.js .reveal.in .link:nth-child(3),
.js .stats.in .stat:nth-child(3) { transition-delay: 0.24s; }

/* Icons draw themselves in. */
.js .reveal .ico *,
.js .stats .ico * {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.4s var(--ease) 0.35s;
}
.js .reveal.in .ico *,
.js .stats.in .ico * { stroke-dashoffset: 0; }

/* ------------------------------------------------------------ responsive */

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    text-align: left;
  }
  .core { order: -1; }
  .core-frame { width: min(100%, 420px); }
  .domains,
  .links { grid-template-columns: 1fr; }
  .domain { min-height: 0; }
  .hud-nav { display: none; }
}

@media (max-width: 600px) {
  :root { --hud-h: 54px; }
  .wrap { padding-top: calc(var(--hud-h) + 28px); }
  .stats { grid-template-columns: 1fr; gap: 12px; margin-top: 40px; }
  .stat { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 16px; padding: 18px 20px; }
  .stat .num { font-size: 40px; }
  .stat .lbl { margin: 0; }
  .stat .bar { grid-column: 1 / -1; }
  .stat > .ico { top: 18px; }
  .timeline { padding-left: 34px; }
  .timeline::before,
  .timeline::after { left: 7px; }
  .tl-node { left: -34px; }
  .tl-card { padding: 18px; }
  .tl-card:hover { transform: none; }
  .btn { flex: 1 1 auto; justify-content: center; }
  .hud-brand span { font-size: 11px; }
  .cv-footer-row { flex-direction: column; align-items: flex-start; }
}

/* ------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .glitch::before,
  .glitch::after,
  .space-scan::after { display: none; }
  .holo { transform: none !important; }
}
