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

:root {
  --bg: #01251a;
  --raised: #023022;
  --surface: #004225;
  --accent: #4d82d6;
  --accent-bright: #8db3ec;
  --accent-dim: rgba(77, 130, 214, 0.16);
  --text: #f7f1e5;
  --muted: #a3b5a8;
  --line: rgba(77, 130, 214, 0.18);
  --line-bright: rgba(77, 130, 214, 0.38);
  --term-green: #3ef08c;
  --red: #ff5f57;
  --yellow: #febc2e;
  --green: #28c840;
  --font-body: "Inter", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono: "Inter", system-ui, sans-serif;
  --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;
}

/* ---------- per-page landscape scenes ----------
   Each page carries a distinct landscape in its hero region, together
   reading like a journey across terrain: forest → meadow → mountains →
   farmland → sunset wetland, with two garden scenes on the project pages. */

/* faint page-wide atmosphere, tinted per page (shows through the open
   hero areas behind the content) */
.scene-home { background: radial-gradient(1100px 620px at 86% -6%, rgba(201, 153, 63, 0.06), transparent 70%), var(--bg); }
.scene-about { background: radial-gradient(1000px 720px at 50% 108%, rgba(201, 153, 63, 0.05), transparent 70%), var(--bg); }
.scene-experience { background: radial-gradient(1200px 640px at 50% -6%, rgba(77, 130, 214, 0.06), transparent 70%), var(--bg); }
.scene-projects { background: radial-gradient(1200px 640px at 50% 112%, rgba(181, 120, 70, 0.06), transparent 72%), var(--bg); }
.scene-contact { background: linear-gradient(180deg, transparent 58%, rgba(201, 153, 63, 0.05)), var(--bg); }

.hero,
.page-hero,
.contact-section {
  position: relative;
  z-index: 0;
}

.scene-home .home-hero::after,
.scene-about .page-hero::after,
.scene-experience .page-hero::after,
.scene-projects .page-hero::after,
.scene-contact .contact-section::after,
.scene-exit .detail-hero::after,
.scene-alchemist .detail-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(240px, 44vh, 460px);
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: cover;
  pointer-events: none;
  z-index: -2;
  transform-origin: bottom center;
  animation: scene-breathe 17s ease-in-out infinite;
}

@keyframes scene-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.035); }
}

.scene-home .home-hero::after { background-image: url("assets/landscape-home.svg"); opacity: 0.6; }
.scene-about .page-hero::after { background-image: url("assets/landscape-about.svg"); opacity: 0.55; }
.scene-experience .page-hero::after { background-image: url("assets/landscape-experience.svg"); opacity: 0.55; }
.scene-projects .page-hero::after { background-image: url("assets/landscape-projects.svg"); opacity: 0.55; }
.scene-contact .contact-section::after { background-image: url("assets/landscape-contact.svg"); opacity: 0.65; }
.scene-exit .detail-hero::after { background-image: url("assets/landscape-exit.svg"); opacity: 0.5; }
.scene-alchemist .detail-hero::after { background-image: url("assets/landscape-alchemist.svg"); opacity: 0.5; }

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

.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }
.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: left-grouped nav with underline states ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  column-gap: clamp(24px, 4vw, 48px);
  padding: 18px var(--pad-x);
  background: rgba(1, 37, 26, 0.62);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.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(77, 130, 214, 0.35); }

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

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 30px);
}

.site-nav a {
  position: relative;
  padding: 4px 1px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -3px;
  height: 2px;
  background: var(--accent-bright);
  transition: right 0.25s ease;
}

.site-nav a:hover { color: var(--text); }
.site-nav a:hover::after, .site-nav a.active::after { right: 0; }
.site-nav a.active { color: var(--accent-bright); }

.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(77, 130, 214, 0.07), transparent 70%),
    radial-gradient(760px 460px at 8% 112%, rgba(63, 143, 99, 0.12), 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: 600;
  font-size: clamp(2.8rem, 10.4vw, 9.4rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.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(77, 130, 214, 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: #1a1a1a;
  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(77, 130, 214, 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;
}

/* ---------- field-notes card ---------- */

.terminal-band { position: relative; }
.terminal-band .terminal-band-inner { position: relative; z-index: 1; }

.fieldcard {
  overflow: hidden;
  background: linear-gradient(165deg, rgba(4, 66, 37, 0.4), transparent 62%), var(--bg);
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.fieldcard-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 16px;
  background: rgba(77, 130, 214, 0.06);
  border-bottom: 1px solid var(--line);
}

.fieldcard-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--term-green);
  box-shadow: 0 0 10px var(--term-green);
}

.fieldcard-tab { color: var(--muted); font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; }

.fieldcard-body { padding: 24px; }

.fieldcard-stats { margin: 0 0 20px; display: grid; gap: 12px; }

.fieldcard-stats > div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
}

.fieldcard-stats dt { color: var(--accent); font-size: 0.74rem; letter-spacing: 0.03em; }
.fieldcard-stats dd { margin: 0; font-size: 0.94rem; line-height: 1.4; }

.fieldcard-now {
  list-style: none;
  margin: 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 11px;
}

.fieldcard-now li { position: relative; padding-left: 22px; color: var(--muted); font-size: 0.84rem; }

.fieldcard-now li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.42em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--term-green);
  box-shadow: 0 0 8px var(--term-green);
}

/* ---------- animated birds ---------- */

.birds {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.bird {
  position: absolute;
  top: 0;
  left: 0;
  width: 70px;
  height: 39px;
  overflow: visible;
  opacity: 0.5;
  will-change: transform;
}

.bird .bird-body,
.bird .wing {
  fill: #9fb4c9;
}

.bird .wing {
  transform-box: view-box;
  transform-origin: 50px 27px;
}

.bird .wl { animation: flapL 0.5s ease-in-out infinite alternate; }
.bird .wr { animation: flapR 0.5s ease-in-out infinite alternate; }

.bird-a { animation: fly-a 17s linear infinite; }
.bird-b { width: 50px; height: 28px; opacity: 0.4; animation: fly-b 23s linear infinite; animation-delay: -6s; }
.bird-b .wing { animation-duration: 0.42s; }
.bird-c { width: 88px; height: 49px; opacity: 0.6; animation: fly-c 14s linear infinite; animation-delay: -3s; }
.bird-c .wing { animation-duration: 0.62s; }
.bird-d { width: 44px; height: 25px; opacity: 0.34; animation: fly-a 27s linear infinite; animation-delay: -12s; }
.bird-d .wing { animation-duration: 0.36s; }
.bird-e { width: 60px; height: 34px; opacity: 0.46; animation: fly-b 19s linear infinite; animation-delay: -15s; }
.bird-e .wing { animation-duration: 0.5s; }

@keyframes flapL {
  from { transform: rotate(30deg); }
  to   { transform: rotate(-20deg); }
}

@keyframes flapR {
  from { transform: rotate(-30deg); }
  to   { transform: rotate(20deg); }
}

@keyframes fly-a {
  0%   { transform: translate(-8vw, 44px); }
  25%  { transform: translate(22vw, 76px); }
  50%  { transform: translate(50vw, 30px); }
  75%  { transform: translate(78vw, 68px); }
  100% { transform: translate(112vw, 40px); }
}

@keyframes fly-b {
  0%   { transform: translate(112vw, 28px); }
  30%  { transform: translate(70vw, 60px); }
  55%  { transform: translate(44vw, 20px); }
  80%  { transform: translate(16vw, 54px); }
  100% { transform: translate(-10vw, 34px); }
}

@keyframes fly-c {
  0%   { transform: translate(-8vw, 98px); }
  33%  { transform: translate(34vw, 58px); }
  66%  { transform: translate(72vw, 106px); }
  100% { transform: translate(112vw, 72px); }
}

/* ---------- atmospheric motion: drifting mist, light, and motes ---------- */

.atmos {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.atmos .glow {
  position: absolute;
  left: 58%;
  top: -12%;
  width: 70vw;
  max-width: 900px;
  height: 70vh;
  max-height: 620px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(201, 153, 63, 0.1), transparent 72%);
  filter: blur(10px);
  animation: glow-pulse 11s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

.atmos .mist {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(120, 150, 130, 0.14), transparent 70%);
  filter: blur(26px);
}

.atmos .mist-1 { width: 70vw; height: 220px; top: 22%; left: -35vw; animation: mist-drift 46s linear infinite; }
.atmos .mist-2 { width: 55vw; height: 170px; top: 46%; left: -30vw; opacity: 0.7; animation: mist-drift 64s linear infinite; animation-delay: -20s; }

@keyframes mist-drift {
  from { transform: translateX(0); }
  to { transform: translateX(165vw); }
}

.atmos .mote {
  position: absolute;
  bottom: -16px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d9c07a;
  box-shadow: 0 0 10px 1px rgba(217, 192, 122, 0.7);
  opacity: 0;
  animation: mote-rise linear infinite;
}

@keyframes mote-rise {
  0% { transform: translate(0, 0) scale(0.7); opacity: 0; }
  12% { opacity: 0.85; }
  50% { transform: translate(22px, -48vh) scale(1); }
  85% { opacity: 0.55; }
  100% { transform: translate(-14px, -96vh) scale(0.8); opacity: 0; }
}

.atmos .mote:nth-child(4)  { left: 8%;  width: 5px; height: 5px; animation-duration: 15s; animation-delay: -2s; }
.atmos .mote:nth-child(5)  { left: 20%; width: 7px; height: 7px; animation-duration: 19s; animation-delay: -9s; }
.atmos .mote:nth-child(6)  { left: 33%; width: 4px; height: 4px; animation-duration: 13s; animation-delay: -5s; }
.atmos .mote:nth-child(7)  { left: 46%; width: 6px; height: 6px; animation-duration: 21s; animation-delay: -12s; }
.atmos .mote:nth-child(8)  { left: 58%; width: 5px; height: 5px; animation-duration: 17s; animation-delay: -3s; }
.atmos .mote:nth-child(9)  { left: 70%; width: 7px; height: 7px; animation-duration: 23s; animation-delay: -15s; }
.atmos .mote:nth-child(10) { left: 81%; width: 4px; height: 4px; animation-duration: 14s; animation-delay: -7s; }
.atmos .mote:nth-child(11) { left: 90%; width: 6px; height: 6px; animation-duration: 20s; animation-delay: -11s; }
.atmos .mote:nth-child(12) { left: 63%; width: 5px; height: 5px; animation-duration: 18s; animation-delay: -1s; }

/* per-scene atmosphere character */
.scene-experience .atmos .glow { left: 42%; background: radial-gradient(closest-side, rgba(77, 130, 214, 0.1), transparent 72%); }
.scene-experience .atmos .mote { background: #c3d6ee; box-shadow: 0 0 9px 1px rgba(140, 179, 236, 0.6); }
.scene-contact .atmos .glow { left: 50%; top: 2%; background: radial-gradient(closest-side, rgba(230, 180, 85, 0.16), transparent 72%); }
.scene-projects .atmos .glow { left: 50%; top: auto; bottom: -24%; background: radial-gradient(closest-side, rgba(181, 120, 70, 0.12), transparent 72%); }
.scene-about .atmos .mote:nth-child(2n+5) { background: #9fc3f0; box-shadow: 0 0 8px 1px rgba(120, 160, 230, 0.55); }

/* ============================================================
   hero-scene — flat-vector illustrated landscape system
   Full ambient background for hero sections: sky, hills, domes,
   turbines, trees, birds. Shared classes, varied composition per
   page (which structures appear, how many turbines/domes/birds).
   ============================================================ */

.hscene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: -1;
  --scene-tint: #8db3ec;
}

/* .page-hero is a max-width:1280px centered column (title/kicker text
   needs that), but the scene itself must break out to full viewport
   width — otherwise it letterboxes into a small rectangle on wide
   screens instead of reading as a full-bleed landscape like the home
   and contact heroes. */
.page-hero .hscene {
  left: 50%;
  right: auto;
  width: 100vw;
  transform: translateX(-50%);
}

.hscene-nebula {
  position: absolute;
  top: -10%;
  left: -10%;
  width: 80%;
  height: 60%;
  background: linear-gradient(115deg, transparent 30%, rgba(141, 179, 236, 0.09) 45%, rgba(77, 130, 214, 0.13) 55%, transparent 68%);
  filter: blur(8px);
  animation: hscene-nebulafade 14s ease-in-out infinite;
}

.hscene-nebula-2 {
  position: absolute;
  top: 2%;
  right: -14%;
  width: 70%;
  height: 50%;
  background: linear-gradient(250deg, transparent 28%, rgba(93, 214, 184, 0.07) 46%, rgba(77, 130, 214, 0.08) 58%, transparent 70%);
  filter: blur(10px);
  animation: hscene-nebulafade 18s ease-in-out infinite reverse;
}

@keyframes hscene-nebulafade { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }

.hscene-milkyway,
.hscene-milkyway-2 {
  position: absolute;
  top: -8%;
  left: -15%;
  width: 140%;
  height: 50%;
  transform: rotate(-13deg);
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.55) 0.7px, transparent 1.1px);
  background-size: 15px 15px;
  opacity: 0.16;
}

.hscene-milkyway-2 {
  top: 2%;
  height: 38%;
  transform: rotate(-10deg);
  background-image: radial-gradient(circle, rgba(220, 232, 245, 0.5) 0.6px, transparent 1px);
  background-size: 11px 11px;
  opacity: 0.14;
}

.hscene-ray {
  position: absolute;
  top: 0;
  width: 2px;
  background: linear-gradient(180deg, rgba(247, 241, 229, 0.18), transparent 80%);
  transform-origin: top center;
  animation: hscene-rayfade ease-in-out infinite;
}

@keyframes hscene-rayfade { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.65; } }

.hscene-lightwash {
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, rgba(141, 179, 236, 0.1) 0%, transparent 42%, transparent 60%, rgba(0, 0, 0, 0.32) 100%);
  pointer-events: none;
  z-index: 5;
}

.hscene-glow {
  position: absolute;
  left: 50%;
  bottom: 28%;
  width: 1100px;
  height: 380px;
  margin-left: -550px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(77, 130, 214, 0.24), transparent 70%);
  filter: blur(6px);
  animation: hscene-pulse 10s ease-in-out infinite;
}

@keyframes hscene-pulse { 0%, 100% { opacity: 0.65; transform: scale(1); } 50% { opacity: 1; transform: scale(1.05); } }

.hscene-star {
  position: absolute;
  border-radius: 50%;
  background: #dce8f5;
  box-shadow: 0 0 6px 1.5px rgba(141, 179, 236, 0.7);
  opacity: 0.2;
  animation: hscene-twinkle ease-in-out infinite;
}

@keyframes hscene-twinkle { 0%, 100% { opacity: 0.15; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.25); } }

.hscene-comet {
  position: absolute;
  top: 8%;
  left: -6%;
  width: 70px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #f7f1e5);
  border-radius: 2px;
  animation: hscene-comet 9s linear infinite;
  animation-delay: 3s;
  opacity: 0;
}

.hscene-comet.b { top: 16%; width: 50px; animation: hscene-comet 13s linear infinite; animation-delay: 8s; }

@keyframes hscene-comet {
  0% { transform: translate(0, 0) rotate(18deg); opacity: 0; }
  3% { opacity: 1; }
  14% { transform: translate(60vw, 180px) rotate(18deg); opacity: 0; }
  100% { opacity: 0; }
}

.hscene-planet {
  position: absolute;
  top: 100px;
  left: 8%;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #e9c48a, #b8875a 65%, #7a5638 100%);
  box-shadow: 0 0 14px 2px rgba(233, 196, 138, 0.2);
  opacity: 0.85;
}

.hscene-planet::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -40%;
  width: 180%;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  border: 1.4px solid rgba(233, 196, 138, 0.55);
  transform: rotate(-18deg) scaleY(0.42);
}

.hscene-asteroid {
  position: absolute;
  top: 210px;
  right: 5%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #b7c2c9, #74838c 70%);
  opacity: 0.7;
  box-shadow: 0 0 6px 1px rgba(183, 194, 201, 0.25);
}

.hscene-orbit-wrap { position: absolute; top: 34px; right: 70px; width: 70px; height: 70px; opacity: 0.85; }
.hscene-orbit-ring { position: absolute; inset: 0; border: 1px solid rgba(141, 179, 236, 0.4); border-radius: 50%; animation: hscene-spin 22s linear infinite; }
.hscene-orbit-ring::after { content: ""; position: absolute; top: -2.5px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; background: #8db3ec; border-radius: 50%; box-shadow: 0 0 8px 2px rgba(141, 179, 236, 0.9); }

.hscene-moon { position: absolute; top: 12px; left: 12px; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 32%, #f7f1e5, #cdd9d2 60%, #9fb3ab 100%); box-shadow: 0 0 26px 6px rgba(247, 241, 229, 0.22); }
.hscene-moon i { position: absolute; border-radius: 50%; background: rgba(140, 160, 150, 0.35); }

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

.hscene-mist { position: absolute; width: 60%; height: 70px; border-radius: 50%; background: radial-gradient(closest-side, rgba(247, 241, 229, 0.05), transparent 75%); filter: blur(18px); animation: hscene-drift linear infinite; }

.hscene-window-glow { position: absolute; border-radius: 50%; background: radial-gradient(closest-side, rgba(233, 196, 138, 0.45), transparent 75%); filter: blur(4px); animation: hscene-domepulse 4.5s ease-in-out infinite; }

.hscene-signal { position: absolute; border-radius: 50%; border: 1.4px solid rgba(141, 179, 236, 0.55); animation: hscene-signalpulse 3.2s ease-out infinite; }
@keyframes hscene-signalpulse { 0% { transform: scale(0.25); opacity: 0.85; } 100% { transform: scale(2.4); opacity: 0; } }

.hscene-beacon { animation: hscene-beaconblink 1.6s steps(1) infinite; }
@keyframes hscene-beaconblink { 0%, 40% { opacity: 1; } 41%, 100% { opacity: 0.12; } }

.hscene-smoke { position: absolute; border-radius: 50%; background: rgba(220, 214, 200, 0.3); filter: blur(2.5px); animation: hscene-smokerise ease-in infinite; }
@keyframes hscene-smokerise {
  0% { transform: translate(0, 0) scale(0.5); opacity: 0; }
  20% { opacity: 0.5; }
  100% { transform: translate(7px, -42px) scale(1.5); opacity: 0; }
}

@keyframes hscene-drift { from { transform: translateX(-30vw); } to { transform: translateX(70vw); } }

.hscene-hill { position: absolute; left: -5%; right: -5%; bottom: 0; }
.hscene-hill svg { width: 100%; display: block; }
.hscene-hill.veryfar { animation: hscene-breathe 22s ease-in-out infinite; }
.hscene-hill.far { animation: hscene-breathe 18s ease-in-out infinite; }
.hscene-hill.mid { animation: hscene-breathe 14s ease-in-out infinite reverse; }
.hscene-hill.near { animation: hscene-breathe 11s ease-in-out infinite; bottom: -4px; }

@keyframes hscene-breathe { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-3px) scale(1.008); } }

.hscene-rim { fill: none; stroke: #5fa88f; stroke-width: 1.6; opacity: 0.4; }

.hscene-turbine-mini .blades { transform-origin: 0 0; animation: hscene-spin 3.6s linear infinite; }
.hscene-turbine-mini.b .blades { animation-duration: 4.1s; animation-delay: -0.6s; }
.hscene-turbine-mini.c .blades { animation-duration: 3.3s; animation-delay: -1.4s; }
.hscene-turbine-mini.d .blades { animation-duration: 4.6s; animation-delay: -0.2s; }

.hscene-turbine { z-index: 2; }
.hscene-turbine .blades { transform-origin: 38px 36px; animation: hscene-spin 4s linear infinite; }

/* structures (domes/turbines/drone) must paint above the foreground hill
   layer that comes after them in source order, or the terrain silhouette
   swallows their lower half depending on where the hill curve peaks */
.hscene-dome-glow { position: absolute; z-index: 2; border-radius: 150px 150px 0 0; background: radial-gradient(closest-side, rgba(141, 179, 236, 0.4), transparent 75%); filter: blur(6px); animation: hscene-domepulse 5s ease-in-out infinite; }

@keyframes hscene-domepulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }

/* dome photo: border-radius + overflow:hidden rather than clip-path —
   curved clip-path shapes failed to paint reliably in testing, so a
   rounded container is the safer choice for a raster photo. */
.hscene-dome-photo-wrap { position: absolute; z-index: 2; border-radius: 150px 150px 0 0; overflow: hidden; }
.hscene-dome-photo-wrap img { width: 100%; height: 130%; object-fit: cover; object-position: 50% 15%; filter: grayscale(0.3) sepia(0.1) hue-rotate(150deg) saturate(1.3) brightness(0.95) contrast(1.05); }
.hscene-dome-tint { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(141, 179, 236, 0.35), rgba(15, 51, 35, 0.25)); pointer-events: none; }

.hscene-struct { z-index: 2; }

.hscene-drone { position: absolute; z-index: 2; animation: hscene-dronefly 13s ease-in-out infinite; }
.hscene-drone-bob { animation: hscene-dronebob 2.2s ease-in-out infinite; }
@keyframes hscene-dronebob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes hscene-dronefly { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(70px, -24px); } }
.hscene-drone-light { animation: hscene-blink 1.1s steps(1) infinite; }
@keyframes hscene-blink { 50% { opacity: 0.15; } }

.hscene-bird { position: absolute; top: 0; left: 0; opacity: 0.85; }
.hscene-bird .wl, .hscene-bird .wr { transform-box: view-box; transform-origin: 16px 8px; }
.hscene-bird .wl { animation: hscene-flapL .5s ease-in-out infinite alternate; }
.hscene-bird .wr { animation: hscene-flapR .5s ease-in-out infinite alternate; }
@keyframes hscene-flapL { from { transform: rotate(24deg); } to { transform: rotate(-14deg); } }
@keyframes hscene-flapR { from { transform: rotate(-24deg); } to { transform: rotate(14deg); } }
.hscene-bird.path-1 { animation: hscene-fly1 17s linear infinite; }
.hscene-bird.path-2 { animation: hscene-fly2 23s linear infinite; opacity: 0.55; }
.hscene-bird.path-3 { animation: hscene-fly3 20s linear infinite; opacity: 0.5; }
@keyframes hscene-fly1 { 0% { transform: translate(-8%, 64px); } 100% { transform: translate(112%, 10px); } }
@keyframes hscene-fly2 { 0% { transform: translate(112%, 160px); } 100% { transform: translate(-8%, 200px); } }
@keyframes hscene-fly3 { 0% { transform: translate(-8%, 220px); } 100% { transform: translate(112%, 260px); } }

.hscene-canopy { transform-origin: bottom center; animation: hscene-treesway ease-in-out infinite; }
@keyframes hscene-treesway { 0%, 100% { transform: rotate(-1.2deg); } 50% { transform: rotate(1.2deg); } }

.hscene-blade { transform-origin: bottom center; animation: hscene-sway ease-in-out infinite; }
@keyframes hscene-sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(5deg); } }

.hscene-flower { transform-box: fill-box; transform-origin: center; animation: hscene-twinkle ease-in-out infinite; }

.hscene-ground-dot { position: absolute; border-radius: 50%; background: #8fd6b8; box-shadow: 0 0 6px 2px rgba(143, 214, 184, 0.7); animation: hscene-twinkle ease-in-out infinite; }

/* contact page gets a slightly warmer glow to signal "open" without breaking the shared blue palette */
.scene-contact .hscene-glow { background: radial-gradient(closest-side, rgba(214, 164, 77, 0.16), rgba(77, 130, 214, 0.18) 55%, transparent 75%); }

@media (max-width: 720px) {
  .hscene-heading h3 { font-size: clamp(2.2rem, 9vw, 3.2rem) !important; }
}

@media (prefers-reduced-motion: reduce) {
  .hscene-nebula, .hscene-nebula-2, .hscene-milkyway, .hscene-milkyway-2, .hscene-ray,
  .hscene-glow, .hscene-star, .hscene-comet, .hscene-orbit-ring, .hscene-mist,
  .hscene-hill, .hscene-turbine-mini .blades, .hscene-turbine .blades, .hscene-dome-glow,
  .hscene-drone, .hscene-drone-bob, .hscene-drone-light, .hscene-bird .wl, .hscene-bird .wr,
  .hscene-bird.path-1, .hscene-bird.path-2, .hscene-bird.path-3, .hscene-canopy,
  .hscene-blade, .hscene-flower, .hscene-ground-dot {
    animation: none !important;
  }
}

/* ---------- 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(77, 130, 214, 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(1, 37, 26, 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) 190px;
  gap: 26px;
  align-items: center;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.25s, padding 0.25s;
}

.xp-row:hover { background: rgba(77, 130, 214, 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-logo span {
  color: var(--accent);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.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 {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(800px 420px at 50% 115%, rgba(77, 130, 214, 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-tagline {
  position: relative;
  z-index: 1;
  padding: clamp(22px, 3.5vw, 36px) var(--pad-x);
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.contact-tagline p {
  margin: 0;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  line-height: 1.3;
}

.contact-tagline .serif-italic { font-size: 1.05em; }

.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: #1a1a1a;
  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(77, 130, 214, 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(77, 130, 214, 0.14);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(247, 241, 229, 0.35); }

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

.contact-form-hint {
  margin: 0 18px 18px;
  color: var(--muted);
  font-size: 0.7rem;
}

/* ---------- 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(90px, 10vh, 110px); padding-bottom: clamp(60px, 8vh, 90px); }

.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: #1a1a1a;
}

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

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

.page-hero {
  max-width: 1280px;
  min-height: clamp(480px, 64vh, 640px);
  margin: 0 auto;
  padding: clamp(150px, 20vh, 210px) var(--pad-x) clamp(40px, 6vw, 70px);
  box-sizing: border-box;
}

.page-title {
  margin: 10px 0 22px;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7.6vw, 6.6rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
}

.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(77, 130, 214, 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; }

  .birds, .atmos { display: 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(1, 37, 26, 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; }
}
