/* ── Vegoia Labs — Layout, Components, ASCII Effects ──────────────────── */

/* ── HUD Navigation ─────────────────────────────────────────────────── */
.hud-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-3) var(--space-6);
  background: transparent;
  transition: background var(--transition-slow), border-color var(--transition-slow);
  border-bottom: 1px solid transparent;
}

.hud-nav.scrolled {
  background: rgba(13, 13, 11, 0.90);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom-color: var(--color-border);
}

.hud-nav__ident {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.hud-nav__label {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-primary);
  font-weight: 600;
  letter-spacing: 0.15em;
}

.hud-nav__sub {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.25em;
}

/* Top tick bar — decorative HUD element */
.hud-nav__ticker { overflow: hidden; }

.hud-ticker-bar {
  display: block;
  height: 1px;
  background: repeating-linear-gradient(
    to right,
    var(--color-border) 0px,
    var(--color-border) 3px,
    transparent 3px,
    transparent 10px
  );
  opacity: 0.5;
}

.hud-nav__links {
  display: flex;
  gap: var(--space-8);
  list-style: none;
  justify-content: flex-end;
}

.hud-nav__links a {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-decoration: none;
  letter-spacing: 0.12em;
  transition: color var(--transition-interactive);
}

.hud-nav__links a:hover {
  color: var(--color-primary);
}

@media (max-width: 600px) {
  .hud-ticker-bar { display: none; }
  .hud-nav { grid-template-columns: auto auto; }
  .hud-nav__links { gap: var(--space-4); }
}

/* ── Hero ───────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
}

.hero__video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__video {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  opacity: 0.65; /* dim so text reads clearly */
}

/* Black gradient merging video into the dark sections below */
.hero__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(13, 13, 11, 0.10) 0%,
    rgba(13, 13, 11, 0.00) 40%,
    rgba(13, 13, 11, 0.00) 55%,
    rgba(13, 13, 11, 0.50) 75%,
    rgba(13, 13, 11, 0.90) 90%,
    rgba(13, 13, 11, 1.00) 100%
  );
  pointer-events: none;
}

/* Scan-line texture — extremely subtle, adds analog feel */
.hero__scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
  pointer-events: none;
  z-index: 1;
}

/* HUD reticle — corner-bracket targeting rectangle */
.hero__reticle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, 80vw);
  height: min(320px, 50vh);
  z-index: 2;
  pointer-events: none;

  --corner: 20px;
  --thickness: 1px;
  --color: rgba(0, 180, 200, 0.45);

  background:
    linear-gradient(var(--color), var(--color)) top left / var(--corner) var(--thickness),
    linear-gradient(var(--color), var(--color)) top left / var(--thickness) var(--corner),
    linear-gradient(var(--color), var(--color)) top right / var(--corner) var(--thickness),
    linear-gradient(var(--color), var(--color)) top right / var(--thickness) var(--corner),
    linear-gradient(var(--color), var(--color)) bottom left / var(--corner) var(--thickness),
    linear-gradient(var(--color), var(--color)) bottom left / var(--thickness) var(--corner),
    linear-gradient(var(--color), var(--color)) bottom right / var(--corner) var(--thickness),
    linear-gradient(var(--color), var(--color)) bottom right / var(--thickness) var(--corner);
  background-repeat: no-repeat;
}

/* Hero parallax layers — driven by main.js for a soft scroll drift */
.hero__video-wrap,
.hero__content {
  will-change: transform;
}

/* Hero text content */
.hero__content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-4);
  padding: var(--space-8) var(--space-6);
  width: 100%;
}

.hero__chapter-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-primary);
  letter-spacing: 0.20em;
  opacity: 0.8;
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  color: #fff;
  line-height: 0.95;
  letter-spacing: -0.02em;
  /* Image logo replaces the text — clear default text spacing */
  margin: 0;
  display: flex;
  justify-content: center;
}

/* Logo image title — patina "VEGOIA LABS" mark with subtle glitch glow */
.hero__title-img {
  width: min(720px, 82vw);
  height: auto;
  display: block;
  /* Layered chromatic-aberration glow echoing the original text effect */
  filter:
    drop-shadow(-2px 0 rgba(0, 180, 200, 0.45))
    drop-shadow( 2px 0 rgba(224, 54, 154, 0.40))
    drop-shadow(0 4px 18px rgba(0, 0, 0, 0.55));
}

.hero__subtitle {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: rgba(212, 208, 200, 0.55);
  letter-spacing: 0.18em;
  font-weight: 300;
}

/* HUD property stamp — bottom-right */
.hero__stamp {
  position: absolute;
  bottom: var(--space-8);
  right: var(--space-8);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: rgba(212, 208, 200, 0.35);
  letter-spacing: 0.08em;
  line-height: 1.7;
  text-align: right;
  border-right: 1px solid rgba(212, 208, 200, 0.18);
  padding-right: var(--space-3);
  pointer-events: none;
}

/* ── ASCII Band ──────────────────────────────────────────────────────── */
.ascii-band {
  position: relative;
  width: 100%;
  height: 180px;
  background: var(--color-bg);
  overflow: hidden;
}

.ascii-band__canvas {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  color: var(--color-primary);
  opacity: 0.18;
  white-space: pre;
  overflow: hidden;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
}

.ascii-band__fade-top,
.ascii-band__fade-bottom {
  position: absolute;
  left: 0; right: 0;
  height: 50%;
  pointer-events: none;
  z-index: 1;
}

.ascii-band__fade-top {
  top: 0;
  background: linear-gradient(to bottom, var(--color-bg), transparent);
}

.ascii-band__fade-bottom {
  bottom: 0;
  background: linear-gradient(to top, var(--color-bg), transparent);
}

/* ── Projects Section ───────────────────────────────────────────────── */
.projects-section {
  background: var(--color-bg);
  padding-block: clamp(var(--space-16), 10vw, var(--space-32));
}

.projects-container {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

/* HUD-style section header with horizontal rules */
.section-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-16);
  color: var(--color-text-muted);
}

.section-header__title {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-primary);
  white-space: nowrap;
  letter-spacing: 0.12em;
  font-weight: 400;
}

.section-header__rule {
  color: var(--color-border);
  letter-spacing: -0.05em;
  flex: 1;
  overflow: hidden;
}

/* Project grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr));
  gap: var(--space-6);
}

/* Card — dark, angular, glass-terminal feel */
.project-card {
  position: relative; /* needed for ::after positioning */
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    border-color var(--transition-interactive),
    box-shadow var(--transition-interactive);
}

.project-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-teal);
}

/* ASCII art thumbnail area — top of card */
.project-card__ascii {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-4) var(--space-6);
  overflow: hidden;
}

.project-card__ascii pre {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-primary);
  line-height: 1.5;
  opacity: 0.65;
  max-width: 100%;
  white-space: pre;
  overflow: hidden;
  transition: opacity var(--transition-interactive);
}

.project-card:hover .project-card__ascii pre {
  opacity: 1.0;
  color: var(--color-primary);
}

/* Card body */
.project-card__body {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
}

.project-card__tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tag-accent {
  color: var(--color-primary);
  font-weight: 600;
}

.project-card__title {
  font-family: var(--font-pixel);
  font-size: clamp(0.875rem, 0.65rem + 0.9vw, 1.125rem);
  color: #fff;
  line-height: 1.45;
  letter-spacing: 0.01em;
  /* Press Start 2P sits high on the line — give it breathing room */
  margin-block: var(--space-2) var(--space-1);
}

.project-card__desc {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  flex: 1;
  max-width: 100%;
}

.project-card__cta {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-gold);
  text-decoration: none;
  letter-spacing: 0.15em;
  margin-top: var(--space-4);
  transition: color var(--transition-interactive);
}

.project-card__cta:hover {
  color: var(--color-gold-bright);
}

/* "Coming soon" — inactive CTA, reads as a status not a link */
.project-card__cta--soon {
  color: var(--color-text-muted);
  cursor: not-allowed;
}

.project-card__cta--soon:hover {
  color: var(--color-text-muted);
}

/* ── G News episode player ───────────────────────────────────────────── */
/* extra room at the card bottom for the time code + progress track */
.project-card--audio .project-card__body { padding-bottom: var(--space-10); }

/* Episode background — only shown once the user plays the audio */
.gnews-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  transition: opacity 700ms ease;
}

.gnews-bg.is-visible { opacity: 1; }

.gnews-bg__img {
  position: absolute;
  inset: -8%;                 /* bleed so parallax never exposes an edge */
  background-image: url("../images/gnews-bg.jpg");
  background-size: cover;
  background-position: center 28%;
  will-change: transform;
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* transparent at top -> solid card color at the bottom (matches surface) */
.gnews-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(17, 17, 16, 0.10) 0%,
    rgba(17, 17, 16, 0.38) 38%,
    rgba(17, 17, 16, 0.85) 66%,
    var(--color-surface) 90%
  );
}

/* keep card content above the background image */
.project-card--audio .project-card__ascii,
.project-card--audio .project-card__body { position: relative; z-index: 1; }

/* let the image show through the terminal panel on this card */
.project-card--audio .project-card__ascii { background: transparent; }

.gnews-player audio { display: none; }

.gnews-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  width: max-content;
  margin-top: var(--space-6);
}

.gnews-player__btn {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-dim);
  display: grid;
  place-items: center;
  transition:
    background var(--transition-interactive),
    color var(--transition-interactive),
    box-shadow var(--transition-interactive);
}

.gnews-player__btn:hover {
  background: var(--color-primary);
  color: var(--color-bg);
  box-shadow: var(--shadow-teal);
}

/* both icons share the grid cell; the inactive one is [hidden] */
.gnews-player__icon {
  grid-area: 1 / 1;
  width: 22px;
  height: 22px;
  fill: currentColor;
  display: none; /* visibility is state-driven below */
}

.gnews-player__icon[data-icon-play] { margin-left: 2px; } /* optical centering */

/* show exactly one icon based on the button's data-state */
.gnews-player__btn[data-state="paused"] [data-icon-play],
.gnews-player__btn[data-state="playing"] [data-icon-pause],
.gnews-player__btn[data-state="ended"] [data-icon-replay] {
  display: block;
}

.gnews-player__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-gold);
}

/* Time code — bottom-right, just above the progress track */
.gnews-player__time {
  position: absolute;
  right: var(--space-4);
  bottom: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  z-index: 4;
}

.gnews-player__time [data-audio-cur] { color: var(--color-primary); }

/* Progress track — pinned to the card's bottom edge */
.gnews-player__track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--color-border);
  z-index: 4;
  cursor: pointer;
  touch-action: none; /* let pointer-drag work without page scroll */
  transition: height 140ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Invisible taller hit-zone so the thin bar is easy to grab */
.gnews-player__track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 18px;
}

/* Thicken 3x while hovering or scrubbing */
.gnews-player__track:hover,
.gnews-player__track.is-dragging {
  height: 9px;
}

.gnews-player__fill {
  position: relative;
  display: block;
  height: 100%;
  width: 0%;
  background: var(--color-primary);
  box-shadow: 0 0 8px rgba(0, 180, 200, 0.6);
  transition: width 0.1s linear;
}

/* Draggable playhead — a circle that bulges out of the bar */
.gnews-player__thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  box-shadow: 0 0 10px rgba(0, 180, 200, 0.85);
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none; /* drag is handled by the track */
  transition: opacity 140ms ease, width 140ms ease, height 140ms ease;
}

/* Show the playhead while playing, and on hover/scrub */
.gnews-player__track.is-playing .gnews-player__thumb,
.gnews-player__track:hover .gnews-player__thumb,
.gnews-player__track.is-dragging .gnews-player__thumb {
  opacity: 1;
}

/* Bulge it out so it's easy to grab */
.gnews-player__track:hover .gnews-player__thumb,
.gnews-player__track.is-dragging .gnews-player__thumb {
  width: 16px;
  height: 16px;
}

/* ── Scroll Reveal Animations ───────────────────────────────────────── */
/* Visible by default — safe fallback if JS is disabled or unsupported. */
[data-reveal] { opacity: 1; }

/* Progressive enhancement: hide only when JS has taken over the reveal. */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity var(--transition-slow),
    transform var(--transition-slow);
}

.js-reveal [data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .js-reveal [data-reveal] { opacity: 1; transform: none; }
}

/* ── Glitch hover effect ─────────────────────────────────────────────── */
@keyframes glitch-scan {
  0%, 100% { clip-path: inset(0 0 100% 0); transform: translateX(0); }
  10%       { clip-path: inset(10% 0 85% 0); transform: translateX(-3px); }
  20%       { clip-path: inset(30% 0 60% 0); transform: translateX(3px); }
  30%       { clip-path: inset(55% 0 35% 0); transform: translateX(-2px); }
  40%       { clip-path: inset(75% 0 15% 0); transform: translateX(2px); }
  50%       { clip-path: inset(90% 0 0% 0); transform: translateX(0); }
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 40%,
    rgba(0, 180, 200, 0.04) 50%,
    transparent 60%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.project-card:hover::after {
  opacity: 1;
  animation: glitch-scan 0.6s steps(1) 1;
}

/* ── Footer ─────────────────────────────────────────────────────────── */
.footer-section {
  position: relative;
  min-height: 75vh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding-bottom: var(--space-8);
}

/* Background image — contained within the footer so it never bleeds into
   the rest of the page. The footer establishes a containing block (transform)
   so the fixed-position layer is clipped by overflow:hidden, giving the
   "static reveal through a rising edge" effect without escaping the footer. */
.footer-section { transform: translateZ(0); }

.footer-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  /* JS picks a random image on load; falls back to #1 if JS is off */
  background-image: var(--footer-bg, url("../images/footer-bg-1.jpg"));
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  filter: brightness(0.55) saturate(1.1);
}

/* Gradient pointing UPWARD: black at the top of the footer → transparent at bottom. */
.footer-section::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 45%;
  background: linear-gradient(
    to bottom,
    rgba(13, 13, 11, 1.00) 0%,
    rgba(13, 13, 11, 0.80) 30%,
    rgba(13, 13, 11, 0.30) 65%,
    rgba(13, 13, 11, 0.00) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* Footer content above both bg and gradient */
.footer__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.footer__hud-line {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: rgba(212, 208, 200, 0.25);
  letter-spacing: 0.08em;
  overflow: hidden;
  white-space: nowrap;
}

.footer__content {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.footer__ident {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.footer__name {
  font-family: var(--font-mono);
  font-size: var(--text-base);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.15em;
}

.footer__sub {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: rgba(212, 208, 200, 0.45);
  letter-spacing: 0.08em;
}

.footer__links a {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-primary);
  text-decoration: none;
  letter-spacing: 0.12em;
  transition: color var(--transition-interactive);
}

.footer__links a:hover { color: #fff; }

/* Signature logomark — small centered mark + name at the very bottom */
.footer__signature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-12);
  opacity: 0.85;
}

.footer__mark {
  width: clamp(56px, 8vw, 84px);
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.5));
}

.footer__mark-name {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.35em;
  /* optical centering against the tracked-out spacing */
  text-indent: 0.35em;
}

/* ── Discography Section ────────────────────────────────────────────── */
.music-section {
  position: relative;
  /* The canvas paints its own #15181a — set as a fallback so the section
     stays on-theme before the canvas script initializes. */
  background: #15181a;
  padding-block: clamp(var(--space-16), 10vw, var(--space-32));
  overflow: hidden;
}

/* Top + bottom blend gradients — fade from the neighboring page bg
   (#0d0d0b) down to transparent so the ASCII canvas reveals smoothly
   without a hard seam against the projects section / footer. */
.music-section::before,
.music-section::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: clamp(120px, 14vw, 200px);
  z-index: 1;
  pointer-events: none;
}

.music-section::before {
  top: 0;
  background: linear-gradient(
    to bottom,
    var(--color-bg) 0%,
    rgba(13, 13, 11, 0.85) 25%,
    rgba(13, 13, 11, 0.45) 60%,
    rgba(13, 13, 11, 0.00) 100%
  );
}

.music-section::after {
  bottom: 0;
  background: linear-gradient(
    to top,
    var(--color-bg) 0%,
    rgba(13, 13, 11, 0.85) 25%,
    rgba(13, 13, 11, 0.45) 60%,
    rgba(13, 13, 11, 0.00) 100%
  );
}

/* Animated ASCII canvas — fills the section, sits behind all content */
.music-section__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  pointer-events: none;
}

/* Soft scan-line overlay for analog feel, matches hero treatment */
.music-section__scanlines {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.10) 2px,
    rgba(0, 0, 0, 0.10) 4px
  );
  pointer-events: none;
}

.music-section__inner {
  position: relative;
  z-index: 2;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

/* Grid mirrors the projects grid so the section feels consistent */
.music-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr));
  gap: var(--space-6);
}

/* ── Music card ─────────────────────────────────────────────────────── */
.music-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    border-color var(--transition-interactive),
    box-shadow var(--transition-interactive),
    transform var(--transition-interactive);
}

.music-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-teal);
}

/* Album art background — bleed slightly so the parallax never exposes an edge */
.music-card__art {
  position: absolute;
  inset: -6%;
  z-index: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  filter: brightness(0.62) saturate(1.05);
  will-change: transform;
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Vertical gradient: hold the album art readable up top, fall to surface
   at the bottom so the Spotify embed has a calm backdrop. */
.music-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(17, 17, 16, 0.25) 0%,
    rgba(17, 17, 16, 0.55) 40%,
    rgba(17, 17, 16, 0.88) 72%,
    var(--color-surface) 95%
  );
  pointer-events: none;
}

/* Scan-line overlay on the card itself — keeps the album art on-aesthetic */
.music-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.12) 2px,
    rgba(0, 0, 0, 0.12) 4px
  );
  pointer-events: none;
  opacity: 0.55;
}

.music-card__body {
  position: relative;
  z-index: 3;
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  /* Reserve room for the album art on top before the text begins */
  padding-top: clamp(180px, 28vw, 240px);
}

.music-card__tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.music-card__title {
  font-family: var(--font-pixel);
  font-size: clamp(0.875rem, 0.65rem + 0.9vw, 1.125rem);
  color: #fff;
  line-height: 1.45;
  letter-spacing: 0.01em;
  margin-block: var(--space-2) var(--space-1);
}

.music-card__artist {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-text);
  letter-spacing: 0.05em;
}

.music-card__date {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* Spotify embed — no wrapper chrome. The iframe is Spotify's own rounded
   dark card; placing any background or border behind it shows square
   corners through the iframe's rounded ones. Let it sit naked on the card. */
.music-card__embed {
  margin-top: var(--space-4);
  background: transparent;
}

.music-card__embed iframe {
  display: block;
  width: 100%;
  height: 152px;
  border: 0;
  /* Match Spotify's internal 12px rounding so any focus outline tracks
     the visible edge rather than the iframe's invisible rectangle. */
  border-radius: 12px;
}

/* ── Mobile ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hud-nav { padding: var(--space-2) var(--space-4); }
  .hud-nav__links { gap: var(--space-3); }
  .hud-nav__links a { font-size: 9px; }

  .hero__title { text-shadow: none; }
  .hero__stamp { display: none; }
  .hero__reticle { display: none; }

  .projects-grid { grid-template-columns: 1fr; }
  .music-grid { grid-template-columns: 1fr; }
  .music-card__body { padding-top: clamp(160px, 50vw, 220px); }

  .footer-section::before {
    position: absolute;
    background-attachment: scroll;
  }

  .footer-section::after { height: 55%; }

  .ascii-band { height: 100px; }
}
