/* ============================================================
   Kiefer.XYZ — dark editorial × agentic design system
   Monumental type in the spirit of about.richielokay.com,
   terminal accents for the agentic identity.
   ============================================================ */

:root {
  --bg: #0b0a12;
  --raised: #110f1a;
  --surface: #16141f;
  --accent: #a78bfa;
  --accent-bright: #c4b5fd;
  --accent-dim: rgba(167, 139, 250, 0.15);
  --text: #ece9f7;
  --muted: #9691ab;
  --line: rgba(167, 139, 250, 0.16);
  --line-bright: rgba(167, 139, 250, 0.34);
  --term-green: #3ef08c;
  --red: #ff5f57;
  --yellow: #febc2e;
  --green: #28c840;
  --font-body: "Inter", system-ui, sans-serif;
  --font-display: "Unbounded", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 20px;
  --pad-x: clamp(20px, 5vw, 72px);
  --section-pad: clamp(84px, 11vw, 150px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
p, h1, h2, h3 { margin-top: 0; }

.mono { font-family: var(--font-mono); }
.serif { font-family: var(--font-serif); font-weight: 400; }
.serif-italic { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--accent); }
.dim { color: var(--muted); }

::selection { color: var(--bg); background: var(--accent); }

/* ---------- header: floating pill nav ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 22px var(--pad-x);
  pointer-events: none;
}

.brand, .site-nav, .nav-toggle, .header-status { pointer-events: auto; }

.brand {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  text-decoration: none;
  border-radius: 999px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}

.brand:hover { transform: rotate(-8deg) scale(1.05); box-shadow: 0 0 30px rgba(167, 139, 250, 0.35); }

.brand-logo { width: 44px; height: 44px; border-radius: 999px; }

.site-nav {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 7px;
  background: rgba(16, 14, 24, 0.66);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.site-nav a {
  padding: 9px 16px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}

.site-nav a:hover { color: var(--accent-bright); }
.site-nav a.active { color: var(--bg); background: var(--accent); }

.header-status {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-self: end;
  color: var(--muted);
  font-size: 0.7rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--term-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--term-green);
  animation: pulse 2.4s ease-in-out infinite;
}

.nav-toggle {
  display: none;
  justify-self: end;
  width: 46px;
  height: 46px;
  padding: 0;
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  margin: 4px auto;
  background: var(--bg);
  transition: transform 0.25s;
}

.site-header.open .nav-toggle span:first-child { transform: translateY(3px) rotate(45deg); }
.site-header.open .nav-toggle span:last-child { transform: translateY(-3px) rotate(-45deg); }

/* ---------- hero: monumental type ---------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding: 120px var(--pad-x) 72px;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(167, 139, 250, 0.07), transparent 70%),
    var(--bg);
}

.hero-kicker {
  margin-bottom: clamp(14px, 2vw, 22px);
  color: var(--accent);
  font-size: 0.82rem;
}

.hero-name {
  margin-bottom: clamp(4px, 1vw, 10px);
  color: var(--accent);
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-style: italic;
  line-height: 1;
}

.hero-title {
  margin: 0 0 clamp(28px, 4vw, 44px);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3rem, 11.2vw, 10.2rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.hero-line { display: block; }

.hero-line-outline {
  color: transparent;
  -webkit-text-stroke: 2px var(--accent);
  text-stroke: 2px var(--accent);
}

.hero-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 48px;
  align-items: center;
  justify-content: space-between;
}

.hero-lede {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.15rem);
}

.hero-lede strong { color: var(--text); font-weight: 600; }

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 13px 24px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  border-radius: 999px;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
}

.button.solid {
  color: var(--bg);
  background: var(--accent);
}

.button.solid:hover {
  transform: translateY(-2px);
  background: var(--accent-bright);
  box-shadow: 0 12px 40px rgba(167, 139, 250, 0.25);
}

.button.outline {
  color: var(--text);
  border: 1px solid var(--line-bright);
}

.button.outline:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }

.scroll-hint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
  transform: translateX(-50%);
  animation: bob 2.2s ease-in-out infinite;
}

/* ---------- terminal band ---------- */

.terminal-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--raised);
}

.terminal-band-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1.1fr);
  gap: clamp(36px, 6vw, 90px);
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--section-pad) var(--pad-x);
}

.terminal-intro h2 {
  margin-bottom: 16px;
  font-size: clamp(2.4rem, 4.5vw, 4rem);
  line-height: 1;
}

.terminal-intro p { max-width: 460px; color: var(--muted); }

.terminal {
  overflow: hidden;
  background: #08070f;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 50px rgba(62, 240, 140, 0.05);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 14px;
  background: rgba(167, 139, 250, 0.06);
  border-bottom: 1px solid var(--line);
}

.t-dot { width: 11px; height: 11px; border-radius: 50%; }
.t-dot.red { background: var(--red); }
.t-dot.yellow { background: var(--yellow); }
.t-dot.green { background: var(--green); }

.terminal-title { margin: 0 auto; color: var(--muted); font-size: 0.72rem; }

.terminal-body {
  min-height: 322px;
  padding: 20px 22px;
  font-size: 0.84rem;
  line-height: 1.9;
  white-space: pre-wrap;
}

.terminal-body .t-prompt { color: var(--term-green); }
.terminal-body .t-key { color: var(--accent); }
.terminal-body .t-dim { color: var(--muted); }
.terminal-body .t-run { color: var(--term-green); }

.type-cursor {
  display: inline-block;
  width: 8px;
  margin-left: 2px;
  background: var(--term-green);
  animation: blink 1s steps(1) infinite;
}

/* ---------- principles 01-03 ---------- */

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.principles article {
  min-height: 400px;
  padding: clamp(30px, 5vw, 58px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s;
}

.principles article:last-child { border-right: 0; }
.principles article:hover { background: var(--raised); }

.number {
  display: inline-block;
  margin-bottom: 34px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
}

.principles h2 {
  margin-bottom: 18px;
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  line-height: 0.95;
}

.principles p { max-width: 400px; color: var(--muted); }

/* ---------- shared section chrome ---------- */

.proof-section,
.work-section,
.experience-section,
.education-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--section-pad) var(--pad-x);
}

.section-head { margin-bottom: clamp(36px, 5vw, 56px); }

.section-head.row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-end;
  justify-content: space-between;
}

.section-label {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.8vw, 3.2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

h2 .serif-italic { font-size: 1.12em; }

h3 {
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: 700;
  line-height: 1.25;
}

.section-sub { max-width: 640px; color: var(--muted); font-size: 1.05rem; }

.text-link {
  display: inline-block;
  margin-top: 14px;
  color: var(--accent);
  font-size: 0.8rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.text-link:hover { border-bottom-color: var(--accent); }

/* ---------- proof cards ---------- */

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

.proof-card {
  padding: 30px;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.proof-card:hover,
.work-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-bright);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.proof-step {
  display: inline-block;
  margin-bottom: 16px;
  padding: 4px 11px;
  color: var(--accent);
  font-size: 0.7rem;
  background: var(--accent-dim);
  border-radius: 999px;
}

.proof-card p { margin-bottom: 0; color: var(--muted); font-size: 0.94rem; }

/* ---------- work cards ---------- */

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 280px;
  padding: 30px;
  overflow: hidden;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.work-card.featured {
  background: linear-gradient(140deg, rgba(167, 139, 250, 0.1), transparent 55%), var(--raised);
  border-color: var(--line-bright);
}

.work-card.wide { grid-column: span 2; }

.work-card.wide p { max-width: 760px; }

/* featured card spans a full row, so an even-positioned last card
   would otherwise sit alone at half width */
.work-grid .work-card:nth-child(even):last-child { grid-column: span 2; }

.work-card-tag {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 16px;
  padding: 4px 11px;
  color: var(--accent);
  font-size: 0.7rem;
  background: var(--accent-dim);
  border-radius: 999px;
}

.work-card p { color: var(--muted); font-size: 0.94rem; }
.work-card-foot { margin-top: auto; color: var(--muted); font-size: 0.74rem; }

.work-card.photo-card { justify-content: flex-end; min-height: 320px; padding: 0; }

.photo-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.photo-card:hover img { transform: scale(1.05); }

.photo-card-overlay {
  position: relative;
  z-index: 1;
  padding: 30px;
  background: linear-gradient(transparent, rgba(11, 10, 18, 0.9));
}

.photo-card-overlay h3 { margin-bottom: 0; }

/* ---------- experience ---------- */

.xp-list { border-top: 1px solid var(--line); }

.xp-row {
  display: grid;
  grid-template-columns: 48px 84px minmax(0, 1fr) 150px;
  gap: 26px;
  align-items: center;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.25s, padding 0.25s;
}

.xp-row:hover { background: rgba(167, 139, 250, 0.03); }

.xp-index { color: var(--accent); font-size: 0.78rem; }

.xp-logo {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
}

.xp-logo img { width: 100%; height: 100%; object-fit: cover; }
.xp-logo.dark { padding: 16px; background: #000; }
.xp-logo.dark img { object-fit: contain; }

.xp-main h3 { margin-bottom: 4px; }

.xp-role {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.xp-main p:last-child { max-width: 640px; margin-bottom: 0; color: var(--muted); font-size: 0.94rem; }

.xp-row time { color: var(--muted); font-size: 0.76rem; text-align: right; }

/* ---------- marquee bands ---------- */

.marquee-band {
  overflow: hidden;
  padding: clamp(20px, 3vw, 34px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--raised);
}

.marquee-track {
  display: flex;
  width: max-content;
  white-space: nowrap;
  animation: marquee 30s linear infinite;
}

.marquee-track.display span {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 3.6rem);
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
}

/* ---------- about ---------- */

.about-section {
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: clamp(36px, 6vw, 90px);
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--section-pad) var(--pad-x);
}

.about-copy p { max-width: 620px; color: var(--muted); font-size: 1.05rem; }

.about-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 30px;
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.fact-key { color: var(--accent); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; }
.fact-val { font-size: 0.88rem; }

.about-media { margin: 0; }

.about-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  filter: grayscale(100%) contrast(1.05);
  transition: filter 0.4s ease;
}

.about-media:hover img { filter: grayscale(0%); }

.about-media figcaption { margin-top: 12px; color: var(--muted); font-size: 0.72rem; }

/* ---------- education ---------- */

.edu-list { border-top: 1px solid var(--line); }

.edu-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.edu-row h3 { margin-bottom: 4px; font-size: 1.02rem; }
.edu-row p { margin-bottom: 0; color: var(--muted); font-size: 0.92rem; }
.edu-row time { color: var(--muted); font-size: 0.76rem; }

/* ---------- contact ---------- */

.contact-section {
  border-top: 1px solid var(--line);
  background:
    radial-gradient(800px 420px at 50% 115%, rgba(167, 139, 250, 0.09), transparent 70%),
    var(--raised);
}

.talk-marquee {
  overflow: hidden;
  padding: clamp(22px, 3.5vw, 40px) 0;
  color: var(--accent);
  border-bottom: 1px solid var(--line);
}

.talk-marquee span {
  font-size: clamp(3rem, 8.5vw, 8.5rem);
  font-style: italic;
  line-height: 0.95;
}

.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 480px);
  gap: clamp(36px, 6vw, 90px);
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--section-pad) var(--pad-x);
}

.contact-copy p { max-width: 480px; color: var(--muted); font-size: 1.05rem; }

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}

.contact-links a {
  color: var(--text);
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 0.2s;
}

.contact-links a:hover { color: var(--accent); }

.contact-form {
  display: grid;
  overflow: hidden;
  background: #08070f;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
}

.form-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  color: var(--muted);
  font-size: 0.74rem;
  background: rgba(167, 139, 250, 0.06);
  border-bottom: 1px solid var(--line);
}

.contact-form label { display: grid; gap: 6px; padding: 14px 18px 0; }

.contact-form label span { color: var(--accent); font-size: 0.72rem; }

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 11px 13px;
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.14);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(150, 144, 127, 0.5); }

.contact-form button {
  justify-self: start;
  margin: 18px;
  border: 0;
  cursor: pointer;
  font-family: var(--font-body);
}

/* ---------- home hero grid (copy + portrait) ---------- */

.home-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: clamp(36px, 6vw, 90px);
  align-items: center;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

.home-hero .hero-title { font-size: clamp(2.8rem, 7.4vw, 7rem); }

.home-hero .hero-lede { margin-top: clamp(20px, 3vw, 32px); }

.home-portrait { justify-self: center; text-align: center; }

/* full frame, never cropped or pushed below the fold */
.home-portrait img {
  width: auto;
  max-width: 100%;
  height: clamp(320px, 52vh, 520px);
  aspect-ratio: auto;
  object-fit: contain;
}

/* ---------- shared page helpers ---------- */

.page-list { padding-top: 0; }

.page-about .about-grid { padding-top: 0; }

/* the Pyrenees shot is 3:4 — let it breathe uncropped, full color */
.page-about .about-media img { aspect-ratio: auto; filter: none; }

.page-about .about-media figcaption { color: var(--accent); }

.page-about { border-top: 0; }

.page-contact { border-top: 0; padding-top: clamp(96px, 14vh, 130px); }

.page-next-copy {
  max-width: 460px;
  margin: 14px 0 26px;
  color: var(--muted);
  font-size: 1.05rem;
}

/* ---------- project cards ---------- */

.pgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--pad-x) var(--section-pad);
}

.pcard {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.pcard:hover {
  transform: translateY(-5px);
  border-color: var(--line-bright);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.pcard-thumb {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  aspect-ratio: 8 / 5;
  background: var(--surface);
}

.pcard-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.pcard:hover .pcard-thumb img { transform: scale(1.03); }

.pcard-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px 26px 22px;
}

.pcard-body h2 {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
}

.pcard-badge {
  padding: 3px 11px;
  color: var(--accent-bright);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent-dim);
  border-radius: 999px;
}

.pcard-body p { margin-bottom: 18px; color: var(--muted); font-size: 0.94rem; }

.pcard-date { margin-top: auto; color: var(--muted); font-size: 0.74rem; }

/* ---------- project detail pages ---------- */

.detail-hero { padding-bottom: clamp(24px, 4vw, 40px); }

.back-link {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

.back-link:hover { opacity: 0.75; }

.detail-byline { margin: 0; color: var(--muted); font-size: 1rem; }

.detail-byline a { color: var(--accent); text-decoration: none; }
.detail-byline a:hover { text-decoration: underline; }

.detail {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 var(--pad-x) var(--section-pad);
}

.detail-media {
  margin: 0 0 18px;
  overflow: hidden;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  background: var(--surface);
}

.detail-media img { width: 100%; display: block; }

.detail-media figcaption {
  padding: 12px 16px;
  color: var(--accent);
  font-size: 0.74rem;
  border-top: 1px solid var(--line);
}

.detail-meta { margin: 0 0 22px; color: var(--muted); font-size: 0.78rem; }

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.detail-body p {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.75;
}

.detail-body p strong { color: var(--text); }

.detail-body .detail-media { margin: 30px 0; }

.media-video {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 30px 0;
  overflow: hidden;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  background: #08070f;
}

.media-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- projects page ---------- */

.page-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(150px, 20vh, 210px) var(--pad-x) clamp(40px, 6vw, 70px);
}

.page-title {
  margin: 10px 0 22px;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8.5vw, 7.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.page-title-accent {
  font-size: 0.62em;
  text-transform: none;
}

.page-sub {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.15rem);
}

.next-up {
  border-top: 1px solid var(--line);
  background:
    radial-gradient(700px 380px at 50% 120%, rgba(167, 139, 250, 0.08), transparent 70%),
    var(--raised);
}

.next-up-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(64px, 9vw, 110px) var(--pad-x);
}

.next-lines {
  margin: 18px 0 30px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 2.1;
}

.next-lines .t-run { color: var(--term-green); }

/* ---------- footer ---------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  align-items: center;
  justify-content: space-between;
  padding: 24px var(--pad-x);
  color: var(--muted);
  font-size: 0.72rem;
  border-top: 1px solid var(--line);
}

.site-footer a { color: var(--accent); }
.footer-status { display: flex; align-items: center; gap: 8px; }

/* ---------- animation primitives ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.reveal.visible { opacity: 1; transform: translateY(0); }

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

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 10px var(--term-green); }
  50% { opacity: 0.55; box-shadow: 0 0 4px var(--term-green); }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 7px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .reveal { opacity: 1; transform: none; transition: none; }

  .marquee-track, .status-dot, .scroll-hint, .type-cursor { animation: none; }

  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

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

@media (max-width: 1020px) {
  .header-status { display: none; }

  .site-header { grid-template-columns: auto 1fr auto; }

  .terminal-band-inner, .about-grid, .contact-inner { grid-template-columns: 1fr; }

  .principles { grid-template-columns: 1fr; }
  .principles article { min-height: 0; border-right: 0; }

  .proof-grid { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .work-card.wide { grid-column: auto; }

  .xp-row { grid-template-columns: 40px 72px minmax(0, 1fr); }
  .xp-row time { grid-column: 3; text-align: left; }
}

@media (max-width: 720px) {
  .site-header { padding: 14px 16px; }

  .site-nav {
    position: fixed;
    top: 78px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border-radius: 22px;
    background: rgba(11, 10, 18, 0.94);
  }

  .site-header.open .site-nav { display: flex; }

  .site-nav a { text-align: center; }

  .nav-toggle { display: block; }

  .hero { padding-top: 110px; }

  .hero-title { font-size: clamp(2.6rem, 14.5vw, 5rem); }

  .hero-line-outline { -webkit-text-stroke-width: 1.5px; }

  .hero-foot { flex-direction: column; align-items: flex-start; }

  .hero-actions { width: 100%; }
  .hero-actions .button { flex: 1 1 100%; }

  .scroll-hint { display: none; }

  .terminal-body { min-height: 280px; font-size: 0.76rem; }

  .about-facts { grid-template-columns: 1fr; }

  .xp-row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .xp-index { display: none; }
  .xp-row time { grid-column: 1; }

  .home-hero-grid { grid-template-columns: 1fr; }
  .home-portrait img { height: clamp(280px, 42vh, 420px); }

  .edu-row { grid-template-columns: 1fr; gap: 8px; }

  .site-footer { flex-direction: column; align-items: flex-start; }
}
