/* =============================================================================
   DESIGN TOKENS  |  70s-retro CRT theme.
   Sunset-stripe palette: deep navy ground, warm cream text, vermillion + teal +
   peach accents. Press Start 2P for marquee, VT323 for body.
   ============================================================================= */
:root {
  /* Ground. Deep 70s navy — think Atari packaging. */
  --bg:           #0c1f3d;
  --bg-soft:      #142a52;
  --bg-edge:      #1d3f78;
  --bg-deep:      #061629;

  /* Cream text — warmer/wheaty than the old phosphor cream. */
  --phosphor:     #f0deaa;
  --phosphor-soft:#d4c294;
  --phosphor-mute:#8a8068;
  --phosphor-dim: #4a4030;

  /* Retro accents: vermillion, teal, peach, cream stripe. */
  --magenta:      #e23a25;   /* vermillion (primary accent) */
  --magenta-soft: #f0593e;
  --cyan:         #4ab1a5;   /* sea-green teal */
  --amber:        #f0a058;   /* peach */
  --lime:         #f5e6b8;   /* cream stripe (used for "completed" status) */

  /* Legacy aliases — original selectors reference paper/ink/oxblood/etc.
     Re-pointing the names instead of renaming everywhere keeps the diff tight. */
  --paper:        var(--bg);
  --paper-soft:   var(--bg-soft);
  --paper-edge:   var(--bg-edge);
  --paper-deep:   var(--bg-deep);
  --ink:          var(--phosphor);
  --ink-soft:     var(--phosphor-soft);
  --ink-mute:     var(--phosphor-mute);
  --ink-light:    var(--phosphor-dim);
  --oxblood:      var(--magenta);
  --oxblood-soft: var(--magenta-soft);
  --moss:         var(--lime);
  --gold:         var(--amber);

  /* Type. Press Start 2P for marquees, VT323 for everything readable. */
  --font-display: "Press Start 2P", "Courier New", ui-monospace, monospace;
  --font-body:    "VT323", "Courier New", ui-monospace, monospace;
  --font-mono:    "VT323", "Courier New", ui-monospace, monospace;

  /* Rhythm. */
  --max-w:        78rem;
  --gutter:       clamp(1.25rem, 4vw, 3rem);

  --ease:         cubic-bezier(0.2, 0.7, 0.2, 1);

  /* Glow halos — toned down for the warmer/muted retro hues. */
  --glow-magenta: 0 0 4px rgba(226, 58, 37, 0.45), 0 0 14px rgba(226, 58, 37, 0.20);
  --glow-cyan:    0 0 4px rgba(74, 177, 165, 0.45), 0 0 14px rgba(74, 177, 165, 0.20);
  --glow-amber:   0 0 4px rgba(240, 160, 88, 0.45), 0 0 14px rgba(240, 160, 88, 0.20);
  --glow-phosphor:0 0 1px rgba(240, 222, 170, 0.85);
}

/* =============================================================================
   RESET + BASE
   ============================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg-deep); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--phosphor);
  font-family: var(--font-body);
  /* VT323 reads ~30% smaller than serif at the same px — bump up. */
  font-size: clamp(1.25rem, 1.1rem + 0.45vw, 1.45rem);
  line-height: 1.45;
  text-shadow: var(--glow-phosphor);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
ul, ol { padding: 0; margin: 0; list-style: none; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--magenta); color: var(--bg); text-shadow: none; }

/* =============================================================================
   CRT EFFECTS  |  scanlines + vignette + faint iso-grid watermark.
   ============================================================================= */

/* Subtle scanlines across the whole screen. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.18) 0px,
    rgba(0, 0, 0, 0.18) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: multiply;
  opacity: 0.7;
}

/* CRT corner vignette. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99;
  background:
    radial-gradient(ellipse at center,
      transparent 55%,
      rgba(6, 22, 41, 0.55) 100%);
}

/* Lozenge tiling watermark, recolored to faint cyan so it reads as an iso pixel grid. */
.lozenge-bg {
  position: fixed;
  inset: 0;
  width: 100%; height: 100%;
  color: var(--cyan);
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at center, #000 55%, transparent 100%);
}

/* =============================================================================
   LAYOUT
   ============================================================================= */
main > section,
.site-footer {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.site-header__inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
main > section {
  padding-block: clamp(4rem, 8vw, 7rem);
  border-top: 2px solid var(--bg-edge);
}
main > section:first-of-type { border-top: none; }

/* =============================================================================
   HEADER  |  arcade-cabinet marquee
   ============================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 31, 61, 0.92);
  backdrop-filter: saturate(140%) blur(6px);
  -webkit-backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 2px solid var(--magenta);
  box-shadow: 0 0 14px rgba(226, 58, 37, 0.25);
  transition: box-shadow 0.3s var(--ease);
}
.site-header.is-stuck {
  box-shadow: 0 0 22px rgba(226, 58, 37, 0.5),
              0 8px 24px -16px rgba(0, 0, 0, 0.8);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 1.1rem;
}
.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--phosphor);
}
.mark__glyph {
  color: var(--magenta);
  font-size: 0.9rem;
  text-shadow: var(--glow-magenta);
}
.site-nav {
  display: flex;
  gap: clamp(0.9rem, 2.6vw, 1.8rem);
  font-family: var(--font-display);
  font-size: 0.55rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.site-nav a {
  color: var(--phosphor-soft);
  position: relative;
  padding-block: 0.4rem;
  transition: color 0.2s var(--ease), text-shadow 0.2s var(--ease);
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--cyan);
  box-shadow: var(--glow-cyan);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease);
}
.site-nav a:hover { color: var(--cyan); text-shadow: var(--glow-cyan); }
.site-nav a:hover::after { transform: scaleX(1); transform-origin: left; }

@media (max-width: 760px) {
  .site-header__inner { flex-direction: column; align-items: flex-start; gap: 0.9rem; }
  .site-nav { flex-wrap: wrap; }
}

/* =============================================================================
   COMMON BITS
   ============================================================================= */
.eyebrow {
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--magenta);
  text-shadow: var(--glow-magenta);
  margin: 0;
}

/* Section head. Roman numeral acts as the stage marker. */
.section-head {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "num   title"
    "blank sub";
  column-gap: 1.5rem;
  row-gap: 0.45rem;
  align-items: end;
  margin-bottom: 3rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px dashed var(--bg-edge);
}
.section-head__num {
  grid-area: num;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--cyan);
  text-shadow: var(--glow-cyan);
  align-self: end;
  padding: 0.5rem 0.7rem;
  border: 2px solid var(--cyan);
  line-height: 1;
}
.section-head__num::before { content: "STAGE "; }
.section-head__title {
  grid-area: title;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.4rem, 3.4vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--phosphor);
  text-shadow: 0 0 1px rgba(240, 222, 170, 0.9),
               0 0 14px rgba(74, 177, 165, 0.18);
}
.section-head__sub {
  grid-area: sub;
  margin: 0;
  font-style: normal;
  color: var(--phosphor-mute);
  font-family: var(--font-body);
  font-size: 1.15rem;
  line-height: 1.4;
}

/* =============================================================================
   HERO
   ============================================================================= */
.hero { position: relative; padding-top: 3.5rem; }
.hero__rule {
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--magenta) 6%,
    var(--bg-edge) 28%,
    var(--bg-edge) 100%);
  box-shadow: 0 0 8px rgba(226, 58, 37, 0.3);
  margin-bottom: 2.5rem;
}
.hero__rule--bottom {
  margin-top: 4rem;
  margin-bottom: 0;
  background: linear-gradient(90deg,
    var(--bg-edge) 0%,
    var(--bg-edge) 72%,
    var(--cyan) 94%,
    transparent 100%);
  box-shadow: 0 0 8px rgba(74, 177, 165, 0.3);
}

.hero__main {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: stretch;
  margin-top: 1.5rem;
}
.hero__text { display: flex; flex-direction: column; }

.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  /* Press Start 2P is wide; shrink the clamp from the serif version. */
  font-size: clamp(2rem, 7.5vw, 5.5rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--phosphor);
  text-shadow: 0 0 1px rgba(240, 222, 170, 0.95),
               0 0 12px rgba(74, 177, 165, 0.22);
}
.hero__title span { display: block; }
.hero__title span:nth-child(2) {
  /* No italic in pixel fonts — switch the second line to magenta neon instead. */
  font-style: normal;
  color: var(--magenta);
  text-shadow: var(--glow-magenta);
  padding-left: 0.3em;
}

.hero__tagline {
  margin: 2rem 0 0;
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  text-shadow: var(--glow-amber);
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
  line-height: 1.6;
}
.hero__tagline .sep { color: var(--magenta); }

.hero__blurb {
  margin: 2.5rem 0 0;
  font-family: var(--font-body);
  font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.6rem);
  line-height: 1.45;
  max-width: 42ch;
  color: var(--phosphor);
}
.hero__blurb::first-letter {
  font-family: var(--font-display);
  font-size: 2.2em;
  font-weight: 400;
  float: left;
  line-height: 1;
  margin: 0.1em 0.32em 0.05em 0;
  color: var(--magenta);
  text-shadow: var(--glow-magenta);
}

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

.headshot {
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 18rem;
  justify-self: stretch;
  align-self: stretch;
  background: var(--bg-soft);
  border: 3px solid var(--cyan);
  position: relative;
  overflow: hidden;
  /* Chunky pixel frame: alternating bg/accent stripes inset. */
  box-shadow:
    inset 0 0 0 3px var(--bg),
    inset 0 0 0 6px var(--magenta),
    0 0 18px rgba(74, 177, 165, 0.28);
}
.headshot::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 30%,
                            rgba(74, 177, 165, 0.08) 50%,
                            transparent 70%);
  pointer-events: none;
}
.headshot img { width: 100%; height: 100%; object-fit: cover; }
.headshot__pending {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  color: var(--phosphor-mute);
  text-transform: uppercase;
  text-align: center;
}
.headshot__pending::before {
  content: "1UP";
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--magenta);
  text-shadow: var(--glow-magenta);
  margin-bottom: 0.9rem;
  text-align: center;
  animation: blink 1.6s steps(2, end) infinite;
}
@media (max-width: 760px) {
  .headshot {
    height: auto;
    aspect-ratio: 1 / 1;
    max-width: 22rem;
    margin-top: 2rem;
  }
}

.hero__links {
  margin-top: 3rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.hero__links a {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--phosphor);
  padding: 0.85rem 1.1rem;
  border: 2px solid var(--phosphor-dim);
  background: var(--bg-soft);
  transition: color 0.2s var(--ease),
              border-color 0.2s var(--ease),
              background 0.2s var(--ease),
              text-shadow 0.2s var(--ease),
              transform 0.06s var(--ease);
}
.hero__links a:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  background: var(--bg);
  text-shadow: var(--glow-cyan);
  box-shadow: var(--glow-cyan);
}
.hero__links a:active { transform: translateY(1px); }
.hero__links a::after { content: " ▸"; color: var(--magenta); }

/* =============================================================================
   HIGHLIGHTS
   ============================================================================= */
.highlights {
  background:
    radial-gradient(ellipse at 78% 10%, rgba(226, 58, 37, 0.08), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
}
.hl-list {
  display: flex;
  flex-direction: column;
  gap: clamp(3rem, 6vw, 5rem);
}
.hl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 2px dashed var(--bg-edge);
}
.hl:first-child { border-top: none; padding-top: 0; }
.hl--flipped .hl__text   { order: 2; }
.hl--flipped .hl__photos { order: 1; }
@media (max-width: 900px) {
  .hl { grid-template-columns: 1fr; }
  .hl--flipped .hl__text   { order: 0; }
  .hl--flipped .hl__photos { order: 1; }
}

.hl__num {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow: var(--glow-cyan);
  margin: 0 0 0.9rem;
}
.hl__eyebrow {
  font-family: var(--font-display);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  color: var(--magenta);
  text-shadow: var(--glow-magenta);
  text-transform: uppercase;
  margin: 0 0 1.4rem;
}
.hl__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.1rem, 2.6vw, 1.8rem);
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0 0 1.5rem;
  color: var(--phosphor);
  text-shadow: 0 0 1px rgba(240, 222, 170, 0.95),
               0 0 10px rgba(74, 177, 165, 0.2);
}
.hl__title em {
  font-style: normal;
  color: var(--magenta);
  text-shadow: var(--glow-magenta);
}

.hl__summary {
  font-family: var(--font-body);
  font-size: 1.3rem;
  line-height: 1.45;
  color: var(--phosphor-soft);
  margin: 0 0 1.75rem;
  max-width: 48ch;
}

.hl__bullets { display: grid; gap: 0.6rem; margin: 0 0 2rem; }
.hl__bullets li {
  position: relative;
  padding-left: 1.6rem;
  font-family: var(--font-body);
  font-size: 1.2rem;
  line-height: 1.4;
  color: var(--phosphor);
}
.hl__bullets li::before {
  content: "►";
  color: var(--magenta);
  text-shadow: var(--glow-magenta);
  position: absolute;
  left: 0;
  top: 0.1em;
  font-family: var(--font-body);
  font-size: 1rem;
}

.hl__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem 1.75rem;
  border-top: 2px solid var(--bg-edge);
  border-bottom: 2px solid var(--bg-edge);
  padding: 1.1rem 0;
  font-family: var(--font-body);
  font-size: 1.1rem;
  margin: 0;
}
.hl__meta dt {
  font-family: var(--font-display);
  color: var(--phosphor-mute);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.5rem;
  margin-bottom: 0.4rem;
  line-height: 1.3;
}
.hl__meta dd { margin: 0; color: var(--phosphor); }

.hl__photos { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.hl__photo {
  position: relative;
  overflow: hidden;
  background: var(--bg-soft);
  border: 3px solid var(--cyan);
  margin: 0;
  box-shadow:
    inset 0 0 0 2px var(--bg),
    inset 0 0 0 4px var(--magenta),
    0 0 14px rgba(74, 177, 165, 0.22);
}
.hl__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease), filter 0.4s var(--ease);
  filter: saturate(1.05) contrast(1.05);
}
.hl__photo:hover img { transform: scale(1.02); filter: saturate(1.15) contrast(1.08); }
.hl__photo--hero { aspect-ratio: 4 / 5; }
.hl__photo--secondary { aspect-ratio: 4 / 3; }

/* =============================================================================
   PROJECTS  |  game-select tiles
   ============================================================================= */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  gap: 2px;
  background: var(--bg-edge);
  border: 2px solid var(--bg-edge);
}
.project-card {
  position: relative;
  background: var(--bg-soft);
  padding: 1.9rem 1.85rem 1.6rem;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 1rem;
  min-height: 18rem;
  transition: background 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.project-card:hover {
  background: var(--bg);
  box-shadow: inset 0 0 0 2px var(--cyan), 0 0 18px rgba(74, 177, 165, 0.18);
  z-index: 1;
}

.project-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.project-card__num {
  font-family: var(--font-display);
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  color: var(--cyan);
  text-shadow: var(--glow-cyan);
}
.project-card__glyph {
  font-size: 1.6rem;
  color: var(--magenta);
  text-shadow: var(--glow-magenta);
  font-family: var(--font-body);
  line-height: 1;
}
.project-card__name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0.02em;
  line-height: 1.25;
  text-transform: uppercase;
  color: var(--phosphor);
}
.project-card__blurb {
  margin: 0;
  font-family: var(--font-body);
  color: var(--phosphor-soft);
  font-size: 1.2rem;
  line-height: 1.4;
}
.project-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.5rem;
  padding-top: 0.9rem;
  border-top: 2px dashed var(--bg-edge);
}
.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
  font-family: var(--font-display);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.project-card__tags li { color: var(--phosphor-mute); }
.project-card__tags li:not(:last-child)::after {
  content: " /";
  color: var(--phosphor-dim);
  margin-left: 0.4rem;
}

.project-card__ctas {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.project-card__cta {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 0.52rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--phosphor-soft);
  white-space: nowrap;
  padding: 0.45rem 0.7rem;
  border: 2px solid var(--phosphor-dim);
  background: transparent;
  transition: color 0.2s var(--ease),
              border-color 0.2s var(--ease),
              background 0.2s var(--ease),
              text-shadow 0.2s var(--ease);
}
.project-card__cta:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  text-shadow: var(--glow-cyan);
  box-shadow: 0 0 10px rgba(74, 177, 165, 0.3);
}
.project-card__cta--demo {
  color: var(--magenta);
  border-color: var(--magenta);
  text-shadow: var(--glow-magenta);
}
.project-card__cta--demo:hover {
  color: var(--bg);
  background: var(--magenta);
  border-color: var(--magenta);
  text-shadow: none;
  box-shadow: 0 0 12px rgba(226, 58, 37, 0.5);
}

/* =============================================================================
   READING + COURSEWORK  |  high-score table feel
   ============================================================================= */
.margin__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}
@media (max-width: 760px) { .margin__cols { grid-template-columns: 1fr; } }

.margin__heading {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow: var(--glow-cyan);
  margin: 0 0 1.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--bg-edge);
}

.reading-list { display: grid; gap: 1.75rem; }
.reading-item__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.85rem;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--phosphor);
}
.reading-item__by {
  display: block;
  margin-top: 0.45rem;
  font-family: var(--font-body);
  font-style: normal;
  color: var(--phosphor-mute);
  font-size: 1.15rem;
  text-transform: none;
  letter-spacing: 0;
}
.reading-item__note {
  margin: 0.6rem 0 0;
  font-family: var(--font-body);
  color: var(--phosphor-soft);
  font-size: 1.2rem;
  line-height: 1.45;
}
.reading-item__foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.9rem;
}
.reading-item__status {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.48rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.4rem 0.6rem;
  border: 2px solid var(--phosphor-dim);
  color: var(--phosphor-mute);
}
.reading-item__status[data-status="in-progress"],
.reading-item__status[data-status="in_progress"] {
  color: var(--amber);
  border-color: var(--amber);
  text-shadow: var(--glow-amber);
}
.reading-item__status[data-status="completed"] {
  color: var(--lime);
  border-color: var(--lime);
  text-shadow: 0 0 6px rgba(74, 177, 165, 0.4);
}
.reading-item__artifact {
  font-family: var(--font-display);
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--phosphor-soft);
  padding: 0.4rem 0.6rem;
  border: 2px solid var(--phosphor-dim);
  transition: color 0.2s var(--ease),
              border-color 0.2s var(--ease),
              text-shadow 0.2s var(--ease);
}
.reading-item__artifact:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  text-shadow: var(--glow-cyan);
}

.course-list { display: grid; gap: 1.2rem; counter-reset: course; }
.course-item {
  position: relative;
  padding-left: 3.2rem;
  counter-increment: course;
}
.course-item::before {
  content: counter(course, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.25em;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--magenta);
  text-shadow: var(--glow-magenta);
}
.course-item__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  line-height: 1.4;
  text-transform: uppercase;
  margin: 0 0 0.3rem;
  color: var(--phosphor);
}
.course-item__note {
  margin: 0;
  font-family: var(--font-body);
  color: var(--phosphor-soft);
  font-size: 1.15rem;
  line-height: 1.4;
}

/* =============================================================================
   ROLES
   ============================================================================= */
.roles-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
@media (max-width: 760px) { .roles-list { grid-template-columns: 1fr; } }

.role-item {
  display: grid;
  gap: 0.4rem;
  padding: 1.6rem 1.6rem 1.6rem;
  background: var(--bg-soft);
  border: 2px solid var(--bg-edge);
  position: relative;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.role-item:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(74, 177, 165, 0.2);
}
.role-item::before {
  content: "★";
  position: absolute;
  top: 0.9rem; right: 1.1rem;
  color: var(--magenta);
  text-shadow: var(--glow-magenta);
  font-family: var(--font-body);
  font-size: 1.4rem;
  line-height: 1;
}
.role-item__title {
  margin: 0 1.8rem 0 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.78rem;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--phosphor);
}
.role-item__org {
  margin: 0.55rem 0 0;
  font-family: var(--font-body);
  font-style: normal;
  color: var(--phosphor-mute);
  font-size: 1.15rem;
}
.role-item__period {
  margin: 0.3rem 0 0;
  font-family: var(--font-display);
  font-size: 0.5rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow: var(--glow-cyan);
}
.role-item__note {
  margin: 0.6rem 0 0;
  font-family: var(--font-body);
  color: var(--phosphor-soft);
  font-size: 1.15rem;
  line-height: 1.45;
}

/* =============================================================================
   GALLERY  |  framed plates with arcade borders
   ============================================================================= */
.gallery {
  column-count: 3;
  column-gap: 1.25rem;
}
@media (max-width: 900px) { .gallery { column-count: 2; } }
@media (max-width: 540px) { .gallery { column-count: 1; } }

.tile {
  break-inside: avoid;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
  background: var(--bg-soft);
  border: 3px solid var(--bg-edge);
  cursor: pointer;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.tile img {
  width: 100%;
  height: auto;
  display: block;
  transition: filter 0.4s var(--ease);
  filter: saturate(0.95) contrast(1.02);
  pointer-events: none;
}
.tile.is-hovered {
  border-color: var(--magenta);
  box-shadow: 0 0 18px rgba(226, 58, 37, 0.35);
}
.tile.is-hovered img { filter: saturate(1.15) contrast(1.05) brightness(1.02); }

.tile__caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.5rem 0.9rem 0.85rem;
  font-family: var(--font-display);
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--phosphor);
  text-shadow: var(--glow-cyan);
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(6, 22, 41, 0.0) 30%,
    rgba(6, 22, 41, 0.9) 100%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
  will-change: opacity;
  transform: translateZ(0);
}
.tile.is-hovered .tile__caption { opacity: 1; }

/* =============================================================================
   AUDIO  |  jukebox tracklist
   ============================================================================= */
.audio-list {
  display: grid;
  gap: 0;
  border-top: 2px solid var(--bg-edge);
}
.audio-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.4rem;
  align-items: center;
  padding: 1.4rem 0;
  border-bottom: 2px solid var(--bg-edge);
  transition: background 0.2s var(--ease);
}
.audio-item:hover { background: rgba(74, 177, 165, 0.04); }
.audio-item__num {
  font-family: var(--font-display);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: var(--magenta);
  text-shadow: var(--glow-magenta);
  min-width: 2.8rem;
}
.audio-item__meta { min-width: 0; }
.audio-item__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.8rem;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--phosphor);
}
.audio-item__note {
  margin: 0.45rem 0 0;
  font-family: var(--font-body);
  color: var(--phosphor-mute);
  font-size: 1.1rem;
  font-style: normal;
}
.audio-item__score {
  display: inline-block;
  margin-top: 0.6rem;
  font-family: var(--font-display);
  font-size: 0.5rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--phosphor-soft);
  border: 2px solid var(--phosphor-dim);
  padding: 0.4rem 0.6rem;
  transition: color 0.2s var(--ease),
              border-color 0.2s var(--ease),
              text-shadow 0.2s var(--ease);
}
.audio-item__score:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  text-shadow: var(--glow-cyan);
}
.audio-item audio {
  width: clamp(16rem, 30vw, 22rem);
  height: 2.5rem;
  /* CRT tint the native audio chrome so it doesn't clash with the dark UI. */
  filter: invert(0.92) hue-rotate(180deg) saturate(0.7);
}
@media (max-width: 700px) {
  .audio-item { grid-template-columns: auto 1fr; }
  .audio-item audio { grid-column: 1 / -1; width: 100%; }
}

.empty-slot {
  padding: 2rem 1.5rem;
  border: 2px dashed var(--bg-edge);
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--phosphor-mute);
  text-align: center;
}

/* =============================================================================
   FOOTER
   ============================================================================= */
.site-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: 2.5rem;
  margin-top: 4rem;
  border-top: 2px solid var(--magenta);
  box-shadow: 0 -8px 18px -12px rgba(226, 58, 37, 0.3);
  font-family: var(--font-display);
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--phosphor-mute);
}
.site-footer__mark {
  color: var(--magenta);
  text-shadow: var(--glow-magenta);
  font-size: 0.9rem;
}
.site-footer__colophon {
  margin-left: auto;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--phosphor-soft);
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.site-footer__colophon a {
  color: var(--phosphor-soft);
  border-bottom: 2px solid transparent;
  padding-bottom: 0.15rem;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), text-shadow 0.2s var(--ease);
}
.site-footer__colophon a:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  text-shadow: var(--glow-cyan);
}

/* =============================================================================
   REVEAL  |  staggered page-load entrance
   ============================================================================= */
.reveal {
  opacity: 0;
  transform: translateY(0.6rem);
  animation: reveal-in 0.8s var(--ease) forwards;
}
.reveal[data-delay="0"] { animation-delay: 0.05s; }
.reveal[data-delay="1"] { animation-delay: 0.20s; }
.reveal[data-delay="2"] { animation-delay: 0.35s; }
.reveal[data-delay="3"] { animation-delay: 0.55s; }
.reveal[data-delay="4"] { animation-delay: 0.75s; }
.reveal[data-delay="5"] { animation-delay: 0.90s; }
.reveal[data-delay="6"] { animation-delay: 1.05s; }
@keyframes reveal-in { to { opacity: 1; transform: translateY(0); } }

[data-inview] {
  opacity: 0;
  transform: translateY(0.8rem);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
[data-inview].is-in { opacity: 1; transform: translateY(0); }

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.25; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, [data-inview] { opacity: 1; transform: none; }
}
