/* ── Tawanda — Personal Website v3 ("Builder, refined") ────────────────────────
   Dark by default, monochrome with a single accent moment (the availability dot).
   Light is a tweak. Tokens mirror the source design's T scale. */

:root {
  --px: clamp(32px, 8.5vw, 110px);
  --accent: #888888;

  /* Dusk palette — same warm/cool used by the hero orb, carried through the page */
  --dusk-warm: #ff7a4d;
  --dusk-cool: #6f7bff;
  --dusk-grad: linear-gradient(105deg, var(--dusk-warm), var(--dusk-cool));

  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

html[data-theme="dark"] {
  --bg: #0E0E0C;
  --fg: #F4F2ED;
  --muted: rgba(244, 242, 237, 0.5);
  --faint: rgba(244, 242, 237, 0.32);
  --line: rgba(255, 255, 255, 0.08);
  --fill: rgba(255, 255, 255, 0.025);
  --dot-line: rgba(255, 255, 255, 0.18);
  --contact-border: rgba(255, 255, 255, 0.25);
  --nav-bg: rgba(14, 14, 12, 0.75);
  /* liquid-glass timeline cards + scroll-brighten floor */
  --glass-bg: rgba(255, 255, 255, 0.045);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-hi: rgba(255, 255, 255, 0.10);
  --reveal-dim: rgba(244, 242, 237, 0.16);
}

html[data-theme="light"] {
  --bg: #FAF9F6;
  --fg: #1A1916;
  --muted: rgba(26, 25, 22, 0.5);
  --faint: rgba(26, 25, 22, 0.34);
  --line: rgba(0, 0, 0, 0.08);
  --fill: rgba(0, 0, 0, 0.02);
  --dot-line: rgba(0, 0, 0, 0.18);
  --contact-border: rgba(0, 0, 0, 0.25);
  --nav-bg: rgba(250, 249, 246, 0.75);
  /* liquid-glass timeline cards + scroll-brighten floor */
  --glass-bg: rgba(255, 255, 255, 0.5);
  --glass-border: rgba(0, 0, 0, 0.1);
  --glass-hi: rgba(255, 255, 255, 0.6);
  --reveal-dim: rgba(26, 25, 22, 0.22);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
/* clip the dusk glows' bleed past the viewport edge — `clip` (not `hidden`)
   so it doesn't create a scroll container that would break position:sticky */
html, body { overflow-x: clip; }

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}

/* ── Intro: CRT power-on sequence ───────────────────────────────────────────
   Covers the page from first paint, blooms open like an old TV switching on,
   then dissolves while the page eases out of a soft blur + slight zoom. The
   head script adds .intro-playing (motion) or .intro-skip (reduced motion). */
.intro {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #000;
  overflow: hidden;
  /* overlay stays black until JS fades it out after the typewriter */
  opacity: 1;
  transition: opacity 0.7s ease;
}
.intro--out { opacity: 0; pointer-events: none; }
html.intro-skip .intro { display: none; }
.intro__beam {
  position: absolute;
  inset: 0;
  background: #fff;
  transform-origin: center center;
  transform: scaleX(0) scaleY(0.0026);
  box-shadow: 0 0 90px 16px rgba(255, 255, 255, 0.8);
  will-change: transform, opacity;
  animation: crt-beam 1850ms cubic-bezier(0.6, 0, 0.2, 1) forwards;
}
.intro__scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: repeating-linear-gradient(to bottom,
      transparent 0 2px, rgba(0, 0, 0, 0.28) 2px 3px);
  animation: crt-scan 1850ms ease forwards;
}
/* old-TV switch-on: beam snaps across, holds, blooms open to white, then the
   white fades to leave a black screen for the typewriter. Slower than before. */
@keyframes crt-beam {
  0%   { transform: scaleX(0) scaleY(0.0026); opacity: 1; }
  10%  { transform: scaleX(1) scaleY(0.0026); opacity: 1; }   /* beam snaps across */
  24%  { transform: scaleX(1) scaleY(0.0026); opacity: 1; }   /* hold the CRT line */
  58%  { transform: scaleX(1) scaleY(1); opacity: 1; }        /* bloom open (slow) */
  78%  { transform: scaleX(1) scaleY(1); opacity: 1; }        /* hold the white */
  100% { transform: scaleX(1) scaleY(1); opacity: 0; }        /* settle to black */
}
@keyframes crt-scan {
  0%   { opacity: 0; }
  30%  { opacity: 0.55; }
  62%  { opacity: 0.3; }
  85%, 100% { opacity: 0; }
}

/* Typewriter line on the black screen (revealed by JS once the tube settles) */
.intro__type {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 32px;
  opacity: 0;
  transition: opacity 0.45s ease;
  font-family: var(--mono);
  font-size: clamp(15px, 2.4vw, 24px);
  letter-spacing: 0.04em;
  color: #f4f2ed;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.25);
}
.intro__type.is-on { opacity: 1; }
.intro__line {
  text-align: center;
}
.intro__cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.15em;
  margin-left: 6px;
  background: #f4f2ed;
  vertical-align: -0.18em;
  animation: caret-blink 1s step-end infinite;
}

/* page eases out of soft-focus as the glow clears = "stepping into the space" */
main { transition: transform 1.3s cubic-bezier(0.2, 0.7, 0.2, 1), filter 1.3s ease; }
html.intro-playing main { transform: scale(1.06); filter: blur(10px); }

/* shared helpers */
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.nowrap { white-space: nowrap; }

.link {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s;
}
.link:hover { opacity: 0.55; }

.eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--faint);
  line-height: 2;
}
.eyebrow--wide {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 44px;
}

/* Dotted leader between meta items */
.dots {
  flex: 1;
  border-bottom: 1px dotted var(--dot-line);
  margin: 0 16px;
  transform: translateY(-4px);
}

.meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  row-gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ── NAV ────────────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px var(--px);
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  border-bottom: 0.5px solid var(--line);
}
.nav > .link { color: var(--fg); }
.nav__links {
  display: flex;
  gap: 32px;
  align-items: center;
  color: var(--muted);
}
/* light/dark toggle switch */
.theme-toggle {
  appearance: none;
  position: relative;
  width: 38px;
  height: 21px;
  padding: 0;
  border: 0.5px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--fg) 6%, transparent);
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: color-mix(in srgb, var(--fg) 22%, var(--line)); }
.theme-toggle__knob {
  position: absolute;
  top: 50%;
  left: 2.5px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--fg);
  transform: translate(0, -50%);
  transition: transform 0.32s cubic-bezier(0.4, 0.1, 0.2, 1), background 0.3s;
}
/* light mode → knob slides right + picks up a dusk tint */
html[data-theme="light"] .theme-toggle__knob {
  transform: translate(15px, -50%);
  background: var(--dusk-warm);
}

/* ── HERO ───────────────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 120px var(--px) 80px;
}
/* Center band: text left, 3D orb right — vertically centred (no top-heaviness) */
.hero__inner {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
}
.hero__visual {
  position: relative;
  width: 100%;
  height: min(64vh, 540px);
  pointer-events: none;
}
.hero__visual canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.hero__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0;
  max-width: 900px;
}
.hero__sub {
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
  margin: 36px 0 0;
  max-width: 520px;
}
.hero__meta-wrap { margin-top: clamp(24px, 4vh, 56px); }
.meta__avail {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fg);
}

/* blinking caret — single hero motion moment */
.caret {
  display: inline-block;
  width: clamp(14px, 1.7vw, 22px);
  height: 0.85em;
  background: var(--fg);
  margin-left: 14px;
  vertical-align: -0.08em;
  animation: caret-blink 1.1s step-end infinite;
}
@keyframes caret-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* pulsing availability dot — the one accent moment */
.dot {
  width: 7px;
  height: 7px;
  border-radius: 4px;
  background: var(--accent);
  animation: dot-pulse 2.4s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 33%, transparent); }
  50% { box-shadow: 0 0 0 5px transparent; }
}

/* ── CLIENTS ────────────────────────────────────────────────────────────── */
.clients { padding: 16px var(--px) 92px; }
.clients__label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 16px;
}
.clients__line {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.clients__line li { position: relative; }
.clients__line li + li::before {
  content: "·";
  position: absolute;
  left: -14px;
  color: var(--faint);
}

/* ── WORK ───────────────────────────────────────────────────────────────── */
.work { padding: 0 var(--px) 160px; }
.work__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.case {
  display: block;
  color: inherit;
  text-decoration: none;
  border: 0.5px solid var(--line);
  padding: 20px;
  transition: background 0.3s;
}
.case:hover { background: var(--fill); }
.case__head {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.case__title {
  font-family: var(--display);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 0;
}
.case__meta {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
  white-space: nowrap;
}
.case__blurb {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  margin: 10px 0 0;
  max-width: 420px;
}

/* ── WORKBENCH — three featured side projects (rest live on projects.html) ── */
.workbench {
  position: relative;
  padding: 40px var(--px) 150px;
}
.workbench__header {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 48px;
  gap: 24px;
}
.workbench__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: 40px;
  letter-spacing: -0.025em;
  margin: 0;
}
.workbench__all {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  transition: color 0.25s, border-color 0.25s;
}
.workbench__all:hover {
  color: var(--fg);
  border-color: color-mix(in srgb, var(--dusk-warm) 50%, var(--line));
  opacity: 1;
}
.workbench__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  width: 100%;
  border: 0.5px solid var(--line);
  background: var(--fill);
  padding: 20px;
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  transition: transform 0.4s cubic-bezier(.2, .7, .3, 1), background 0.3s;
}

/* ── Projects subpage (projects.html) ───────────────────────────────────── */
.subhead { padding: 150px var(--px) 56px; }
.subhead__back {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 40px;
}
.subhead__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 52px);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0;
}
.subhead__lead {
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
  margin: 24px 0 0;
  max-width: 540px;
}
.projects { padding: 0 var(--px) 160px; }

/* ── Case study subpage (case-prepaid.html) ─────────────────────────────── */
.cs { padding: 150px var(--px) 40px; }
.cs__header { max-width: 920px; margin: 0 auto; }
.cs__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(36px, 6vw, 64px);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
}
.cs__lead {
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.55;
  color: var(--muted);
  margin: 24px 0 0;
  max-width: 620px;
}
.cs__cover {
  height: clamp(240px, 42vw, 460px);
  margin-top: 48px;
}
.cs__facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 0.5px solid var(--line);
}
.cs__fact { display: flex; flex-direction: column; gap: 8px; }
.cs__fact-k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.cs__fact-v { font-size: 14px; color: var(--fg); }
.cs__cover { width: 100%; }

/* narrative body — stacked long-form acts in a centred column */
.cs__body { max-width: 920px; margin: 0 auto; }
.cs__act { padding: 72px 0; border-top: 0.5px solid var(--line); }
.cs__num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 18px;
}
.cs__h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0;
}
.cs__copy {
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg);
  max-width: 620px;
  margin-top: 22px;
}
.cs__copy p { margin: 0 0 18px; }
.cs__copy p:last-child { margin-bottom: 0; }
.cs__copy strong { font-weight: 600; }
.cs__copy em { font-style: italic; color: var(--muted); }
.cs__pull {
  font-family: var(--display);
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.4;
  letter-spacing: -0.015em;
  color: var(--fg) !important;
  border-left: 2px solid color-mix(in srgb, var(--dusk-warm) 60%, var(--line));
  padding-left: 18px;
  margin: 8px 0 0 !important;
}
.cs__mini {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 14px;
}
.cs__note {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 560px;
  margin: 28px 0 0;
}
.cs__note .pill { margin-right: 4px; }

/* device / phone-screenshot frames */
.devices { display: grid; gap: 20px; margin-top: 40px; }
.devices--3 { grid-template-columns: repeat(3, 1fr); }
.device {
  margin: 0;
  border: 0.5px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--fill);
}
.device img { display: block; width: 100%; height: auto; }
.device figcaption {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--faint);
  padding: 10px 14px;
  border-top: 0.5px solid var(--line);
}
/* light screenshots sit on a warm-white plate so they don't float on the dark bg */
.device--lit { background: #f4f3ef; }

/* split: friction list + the wireframe shot */
.cs__split {
  display: grid;
  grid-template-columns: 1fr minmax(0, 300px);
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
  margin-top: 48px;
}
.friction { list-style: none; margin: 0; padding: 0; }
.friction li {
  position: relative;
  font-size: 15px;
  line-height: 1.5;
  color: var(--fg);
  padding: 12px 0 12px 22px;
  border-bottom: 0.5px solid var(--line);
}
.friction li:first-child { border-top: 0.5px solid var(--line); }
.friction li::before {
  content: "";
  position: absolute;
  left: 0; top: 19px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--dusk-warm);
}
.pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg);
  border: 0.5px solid color-mix(in srgb, var(--dusk-warm) 40%, var(--line));
  border-radius: 999px;
  padding: 2px 10px;
}

/* guardrail-file cards */
.files { display: grid; gap: 12px; margin-top: 40px; }
.file {
  border: 0.5px solid var(--line);
  background: var(--fill);
  padding: 18px 20px;
}
.file__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.file__name { font-family: var(--mono); font-size: 14px; color: var(--fg); }
.file__tag {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  border: 0.5px solid var(--line);
  padding: 2px 8px;
  white-space: nowrap;
}
.file__role { font-size: 14px; line-height: 1.5; color: var(--muted); margin: 10px 0 0; }
.file__code {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dusk-cool);
  margin-top: 12px;
}

/* V1/V2/V3 evolution */
.evolution {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 44px;
}
.ver { margin: 0; }
.ver__tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--dusk-warm);
  margin-bottom: 12px;
}
.ver figcaption {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
  margin-top: 16px;
}
.ver figcaption strong { color: var(--fg); font-weight: 600; }

/* small gains list */
.gains {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin: 40px 0 0;
  padding: 28px 0 0;
  border-top: 0.5px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.gains li { position: relative; padding-left: 18px; }
.gains li::before { content: "→"; position: absolute; left: 0; color: var(--dusk-cool); }

/* learnings */
.learns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 44px;
}
.learn {
  border: 0.5px solid var(--line);
  background: var(--fill);
  padding: 24px;
}
.learn__n { font-family: var(--mono); font-size: 12px; color: var(--dusk-warm); }
.learn__h {
  font-family: var(--display);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 14px 0 0;
}
.learn__p { font-size: 14px; line-height: 1.6; color: var(--muted); margin: 12px 0 0; }

/* what's next — phased roadmap */
.phases { list-style: none; margin: 44px 0 0; padding: 0; display: grid; gap: 16px; }
.phase {
  position: relative;
  border: 0.5px solid var(--line);
  background: var(--fill);
  padding: 24px 28px;
}
.phase--now {
  border-color: color-mix(in srgb, var(--dusk-warm) 40%, var(--line));
  background: color-mix(in srgb, var(--dusk-warm) 6%, var(--fill));
}
.phase__when {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.phase__here {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dusk-warm);
  border: 0.5px solid color-mix(in srgb, var(--dusk-warm) 45%, transparent);
  border-radius: 999px;
  padding: 2px 8px;
}
.phase__h {
  font-family: var(--display);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 12px 0 0;
}
.phase__p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
  margin: 10px 0 0;
  max-width: 640px;
}
.phase__status {
  position: absolute;
  top: 24px; right: 28px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

/* closing */
.cs__close { padding: 72px 0; border-top: 0.5px solid var(--line); }
.closing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}
.closing__item p {
  font-family: var(--display);
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin: 0;
}

.cs__next {
  max-width: 920px;
  margin: 0 auto;
  padding: 48px 0 0;
  border-top: 0.5px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

@media (max-width: 760px) {
  .cs__facts { grid-template-columns: 1fr 1fr; }
  .devices--3,
  .evolution,
  .learns,
  .closing,
  .cs__split { grid-template-columns: 1fr; }
}
.card:hover { transform: translateY(-6px); }
.card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 22px;
  gap: 16px;
}
.card__title {
  font-family: var(--display);
  font-weight: 500;
  font-size: 21px;
  letter-spacing: -0.01em;
  margin: 0;
}
.card__status {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
  white-space: nowrap;
}
.card__desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  margin: 10px 0 16px;
}
.card__tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--faint);
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card__go {
  color: var(--muted);
  opacity: 0;
  transform: translate(-3px, 3px);
  transition: opacity 0.3s, transform 0.3s, color 0.3s;
}
.card:hover .card__go {
  opacity: 1;
  transform: none;
  color: var(--dusk-warm);
}
/* ── ABOUT ──────────────────────────────────────────────────────────────── */
.about { padding: 160px var(--px); }
.about__grid {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: clamp(36px, 5vw, 72px);
  align-items: start;
}
.about__photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--fill);
}
.about__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.92);
}
.about__body { padding-top: 6px; }
.about__lead {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.45;
  letter-spacing: -0.015em;
  margin: 0;
  max-width: 560px;
}
/* Scroll-brighten: words start as a dim grey and warm up to full --fg as the
   About section scrolls through (word spans + .is-lit driven by main.js). */
[data-scroll-brighten] .rw {
  color: var(--reveal-dim);
  transition: color 0.5s ease;
}
[data-scroll-brighten] .rw.is-lit { color: var(--fg); }
.about__para {
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
  margin: 18px 0 0;
  max-width: 520px;
}
.about__para:first-of-type { margin-top: 28px; }
.about__stats {
  margin-top: 56px;
  row-gap: 10px;
  max-width: 520px;
}

/* ── JOURNEY — career timeline over the dotted surface ───────────────────────
   No longer pins/hijacks the scroll: the page flows past vertically, and the
   rail is an *optional* horizontal scroll the visitor can explore if they want.
   Each role sits in a liquid-glass card so it stays legible over the surface. */
.journey {
  position: relative;
  padding: 120px 0 130px;
  overflow: hidden;            /* clip the surface canvas' bleed */
}
.journey__surface {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}
.journey__header {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 0 var(--px);
  margin-bottom: 48px;
}
.journey__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: 40px;
  letter-spacing: -0.025em;
  margin: 8px 0 0;
}
/* prev / next controls for the timeline rail */
.journey__nav {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.journey__arrow {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0.5px solid var(--glass-border);
  border-radius: 999px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(8px) saturate(1.2);
          backdrop-filter: blur(8px) saturate(1.2);
  color: var(--fg);
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s, background 0.25s, opacity 0.25s, transform 0.18s;
}
.journey__arrow:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--dusk-cool) 50%, var(--glass-border));
  color: var(--dusk-warm);
  background: color-mix(in srgb, var(--dusk-warm) 8%, var(--glass-bg));
}
.journey__arrow:active:not(:disabled) { transform: scale(0.92); }
.journey__arrow:disabled { opacity: 0.28; cursor: default; }
.journey__arrow svg { display: block; }

/* rail: optional horizontal scroll; right edge fades to hint at more */
.journey__rail {
  position: relative;
  z-index: 1;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scroll-padding-left: var(--px);   /* snap respects the side inset, not the viewport edge */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 72px), transparent 100%);
          mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 72px), transparent 100%);
}
.journey__rail::-webkit-scrollbar { display: none; }
.journey__track {
  position: relative;
  display: flex;
  gap: 28px;
  padding: 0 var(--px) 44px;   /* bottom room so the hover-lift + shadow isn't clipped */
  width: max-content;
}
/* the timeline wire runs through every node's dot */
.journey__line {
  position: absolute;
  top: 78px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right,
      transparent, var(--line) 6%, var(--line) 94%, transparent);
}
.node {
  position: relative;
  width: 360px;
  flex-shrink: 0;
  padding-top: 104px;   /* card sits below the wire */
  scroll-snap-align: start;
}
.node__year {
  position: absolute;
  top: 38px;
  left: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.node__dot {
  position: absolute;
  top: 73px;            /* centred on the wire (78px) */
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--dusk-cool) 60%, var(--line));
}
.node__dot--live {
  background: var(--dusk-grad);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--dusk-warm) 22%, transparent);
  animation: dot-pulse 2.4s ease-in-out infinite;
}
/* liquid-glass card — keeps the role legible over the dotted surface */
.node__card {
  position: relative;
  padding: 18px 18px 20px;
  border: 0.5px solid var(--glass-border);
  background: var(--glass-bg);
  box-shadow: inset 0 1px 0 var(--glass-hi);
  -webkit-backdrop-filter: blur(11px) saturate(1.2);
          backdrop-filter: blur(11px) saturate(1.2);
  transition: border-color 0.35s, transform 0.4s cubic-bezier(.2, .7, .3, 1),
    box-shadow 0.35s;
}
.node:hover .node__card,
.node:focus-within .node__card {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--dusk-cool) 40%, var(--glass-border));
  box-shadow: inset 0 1px 0 var(--glass-hi),
    0 20px 44px -30px color-mix(in srgb, var(--dusk-cool) 70%, transparent);
}
/* company logo badge + name, sitting above the role */
.node__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
/* uniform "holding shape" — every logo sits on the same white tile at the same
   size; the processed PNGs are transparent with a baked-in margin so they read
   consistently regardless of the original artwork's proportions */
.node__logo {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0.5px solid var(--line);
  border-radius: 9px;
  background: #fff;
  overflow: hidden;
}
.node__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
/* fallback text mark (e.g. University of Pretoria — no logo supplied) */
.node__logo--text {
  font-family: var(--display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: -0.01em;
  line-height: 1;
  color: #1a1916;
}
.node__role {
  font-family: var(--display);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -0.01em;
  margin: 0;
}
.node__co {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}
.node__desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  margin: 12px 0 0;
}
/* On hover-capable devices the description is held back until you hover the
   card (keeps the rail calm); touch devices show it inline. */
@media (hover: hover) {
  .node__desc {
    opacity: 0;
    max-height: 0;
    margin-top: 0;
    overflow: hidden;
    transform: translateY(-4px);
    transition: opacity 0.35s ease, max-height 0.4s ease, margin 0.4s ease,
      transform 0.35s ease;
  }
  .node:hover .node__desc,
  .node:focus-within .node__desc {
    opacity: 1;
    max-height: 120px;
    margin-top: 12px;
    transform: none;
  }
}
/* reduced-motion / narrow: stack the timeline vertically as a simple list */
.journey--static .journey__nav { display: none; }
.journey--static .journey__rail {
  overflow: visible;
  -webkit-mask-image: none;
          mask-image: none;
}
.journey--static .journey__track {
  flex-direction: column;
  flex-wrap: nowrap;
  width: auto;
  gap: 28px;
  padding: 0 var(--px);
}
.journey--static .journey__line { display: none; }
.journey--static .node { width: auto; max-width: 560px; padding-top: 0; }
.journey--static .node__year { position: static; margin-bottom: 10px; }
.journey--static .node__dot { display: none; }
.journey--static .node__desc {
  opacity: 1;
  max-height: none;
  margin-top: 12px;
  transform: none;
}

/* ── TOOLKIT — "working with AI" ────────────────────────────────────────── */
.toolkit { padding: 40px var(--px) 120px; }
.toolkit__lead {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.45;
  letter-spacing: -0.015em;
  margin: 0 0 56px;
  max-width: 620px;
}
/* ── Bento grid (the "tools I work with" — adapted from the 21st.dev BentoGrid) */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.bento-cell { grid-column: span 1; display: flex; }
.bento-cell--wide { grid-column: span 2; }

.bento {
  position: relative;
  display: block;
  width: 100%;
  padding: 20px;
  border-radius: 14px;
  border: 0.5px solid var(--line);
  background: var(--bg);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.3s, border-color 0.3s;
}
.bento:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--dusk-warm) 24%, var(--line));
  box-shadow: 0 18px 40px -28px color-mix(in srgb, var(--dusk-cool) 60%, transparent);
}

/* hover: fine dotted texture fades in */
.bento__dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  background-image: radial-gradient(circle at center,
      color-mix(in srgb, var(--fg) 8%, transparent) 1px, transparent 1px);
  background-size: 11px 11px;
}
.bento:hover .bento__dots { opacity: 1; }

/* hover: a faint dusk gradient outline (masked so only the 1px border shows) */
.bento__border {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  padding: 1px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  background: linear-gradient(135deg, transparent, color-mix(in srgb, var(--dusk-cool) 55%, transparent), transparent);
  -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, linear-gradient(#000 0 0);
          mask-composite: exclude;
}
.bento:hover .bento__border { opacity: 1; }

.bento__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
}
.bento__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
  background: color-mix(in srgb, var(--fg) 6%, transparent);
  transition: background 0.3s;
}
.bento:hover .bento__icon {
  background: color-mix(in srgb, var(--dusk-warm) 16%, color-mix(in srgb, var(--fg) 6%, transparent));
}
.bento__logo { display: block; }
.bento__body { display: flex; flex-direction: column; gap: 6px; }
.bento__title {
  font-family: var(--display);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.bento__desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 42ch;
}
.bento__cta {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.3s;
}
.bento:hover .bento__cta { opacity: 1; }

/* featured card keeps the hover treatment on at rest */
.bento--featured {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--dusk-warm) 24%, var(--line));
}
.bento--featured .bento__dots,
.bento--featured .bento__border,
.bento--featured .bento__cta { opacity: 1; }

/* ── Subtle dusk infusions across the lower page ────────────────────────── */
/* card / case hover: line warms toward dusk + a whisper of glow */
.case, .card {
  position: relative;
}
.case:hover {
  border-color: color-mix(in srgb, var(--dusk-cool) 35%, var(--line));
}
.card:hover {
  border-color: color-mix(in srgb, var(--dusk-warm) 30%, var(--line));
  box-shadow: 0 18px 50px -28px color-mix(in srgb, var(--dusk-cool) 60%, transparent);
}
/* a faint dusk glow anchored behind the workbench + contact, very low opacity */
.workbench::before,
.contact::before {
  content: "";
  position: absolute;
  width: 60vw;
  max-width: 760px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--dusk-cool) 16%, transparent), transparent 62%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}
.workbench { position: relative; }
.workbench::before { top: 8%; right: -10%; }
.contact { position: relative; }
.contact::before {
  bottom: -20%; left: -8%;
  background: radial-gradient(circle, color-mix(in srgb, var(--dusk-warm) 14%, transparent), transparent 62%);
}
/* keep workbench content above its dusk glow */
.workbench__header,
.workbench__grid { position: relative; z-index: 1; }
.contact > * { position: relative; z-index: 1; }

/* ── CONTACT ────────────────────────────────────────────────────────────── */
.contact { padding: 40px var(--px) 160px; }
.contact__email {
  display: inline-block;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(28px, 3.5vw, 42px);
  letter-spacing: -0.02em;
  color: var(--fg);
  border-bottom: 1px solid var(--contact-border);
  padding-bottom: 4px;
}
.contact__socials {
  display: flex;
  gap: 28px;
  margin-top: 40px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

/* ── FOOTER ─────────────────────────────────────────────────────────────── */
.footer {
  padding: 28px var(--px);
  border-top: 0.5px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--faint);
}

/* ── Dusk gradient text ─────────────────────────────────────────────────── */
.dusk-text {
  background: linear-gradient(100deg, var(--dusk-warm), var(--dusk-cool), var(--dusk-warm));
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: dusk-shift 9s ease-in-out infinite;
}
@keyframes dusk-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ── Shader slots — soft animated "dusk" covers standing in for imagery ──── */
.shader-slot {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #14121c;
  isolation: isolate;
}
/* two blurred drifting blobs = a calm shader-ish mesh */
.shader-slot::before,
.shader-slot::after {
  content: "";
  position: absolute;
  width: 78%;
  height: 78%;
  border-radius: 50%;
  filter: blur(34px);
  opacity: 0.7;
  mix-blend-mode: screen;
  will-change: transform;
}
.shader-slot::before {
  background: radial-gradient(circle at 50% 50%, var(--blob-a), transparent 65%);
  top: -14%; left: -8%;
  animation: slot-a 16s ease-in-out infinite;
}
.shader-slot::after {
  background: radial-gradient(circle at 50% 50%, var(--blob-b), transparent 65%);
  bottom: -16%; right: -10%;
  animation: slot-b 19s ease-in-out infinite;
}
/* hairline frame so it reads as a deliberate cover, not a bleeding gradient */
.shader-slot {
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.06);
}
@keyframes slot-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(22%, 14%) scale(1.18); }
  66% { transform: translate(8%, -10%) scale(0.92); }
}
@keyframes slot-b {
  0%, 100% { transform: translate(0, 0) scale(1.05); }
  33% { transform: translate(-16%, -12%) scale(0.9); }
  66% { transform: translate(-6%, 12%) scale(1.2); }
}
/* tonal variants — each cover gets its own dusk mix */
.shader-slot[data-tone="warm"]   { --blob-a: #ff7a4d; --blob-b: #c0506b; }
.shader-slot[data-tone="cool"]   { --blob-a: #6f7bff; --blob-b: #4a86c8; }
.shader-slot[data-tone="violet"] { --blob-a: #8b6cff; --blob-b: #ff6f9c; }
.shader-slot[data-tone="amber"]  { --blob-a: #ffae5c; --blob-b: #e8643c; }
.shader-slot[data-tone="mix"]    { --blob-a: #ff7a4d; --blob-b: #6f7bff; }
.shader-slot[data-tone="dusk"]   { --blob-a: #c45cff; --blob-b: #ff8a4d; }

/* ── Side-project covers: "lit grooved panel" ───────────────────────────────
   Stolen-but-tamed from a reference site: instead of a flat gradient, the cover
   reads like a textured 3D panel catching light. A monochrome ribbed surface +
   the existing dusk blobs (the glow) + a soft specular highlight that follows the
   cursor (set via --mx/--my in main.js). Scoped to Workbench cards only. */
@property --mx { syntax: "<percentage>"; inherits: false; initial-value: 50%; }
@property --my { syntax: "<percentage>"; inherits: false; initial-value: -8%; }
.card .shader-slot {
  background:
    radial-gradient(58% 50% at var(--mx) var(--my),
      rgba(255, 255, 255, 0.13), transparent 72%),
    repeating-linear-gradient(90deg,
      rgba(255, 255, 255, 0.05) 0px,
      rgba(255, 255, 255, 0) 3px,
      rgba(0, 0, 0, 0.34) 7px,
      rgba(255, 255, 255, 0) 11px,
      rgba(255, 255, 255, 0.05) 14px),
    linear-gradient(180deg, #1a1622, #0f0d15);
  transition: --mx 0.25s ease, --my 0.25s ease;
}

/* ── Scroll reveal ──────────────────────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.9s cubic-bezier(.16, .7, .3, 1),
    transform 0.9s cubic-bezier(.16, .7, .3, 1);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
/* On narrower viewports the orb sits behind the text instead of beside it */
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__content { position: relative; z-index: 1; }
  .hero__visual {
    position: absolute;
    inset: 0;
    height: 100%;
    width: 100%;
    opacity: 0.5;
    z-index: 0;
  }
  .hero { position: relative; }
}

@media (max-width: 980px) {
  .workbench__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .work__grid { grid-template-columns: 1fr; }
  .about__grid { grid-template-columns: 1fr; }
  .about__photo { max-width: 420px; }
  .workbench__title { font-size: 30px; }
  .workbench__grid { grid-template-columns: 1fr; }
  .journey__title { font-size: 30px; }
  .nav__links { gap: 20px; }
  .hero__visual { display: none; }
  .bento-grid { grid-template-columns: 1fr; }
  .bento-cell--wide { grid-column: span 1; }
}

/* compact nav so wordmark + links + toggle fit a phone without colliding */
@media (max-width: 600px) {
  .nav { padding: 18px 20px; font-size: 10px; }
  .nav__links { gap: 12px; }
  .theme-toggle { width: 34px; height: 19px; }
  .theme-toggle__knob { width: 13px; height: 13px; left: 2.5px; }
  html[data-theme="light"] .theme-toggle__knob { transform: translate(13px, -50%); }
}

/* two columns on mid widths, with the featured card still spanning both */
@media (min-width: 761px) and (max-width: 1080px) {
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-cell--wide { grid-column: span 2; }
}

/* ── Reduced motion: no caret/pulse, instant reveals, static workbench ───── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .caret, .dot, .dusk-text,
  .shader-slot::before, .shader-slot::after { animation: none; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

