/* ============================================================
   Temulen Iveelt — portfolio landing page styles
   Design tokens live on :root (light) and [data-theme="dark"].
   ============================================================ */

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Light-mode design tokens (default). Every color used by the page
   is declared here so the dark-mode block below only needs to override. */
:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #555;
  --text-muted: #888;
  --card-bg: #f7f7f7;
  --card-border: #d0d0d0;
  --heading-color: #1a1a1a;
  --dash-color: #bbb;
  /* Player — light mode */
  --player-bg: #e6e6e8;
  --player-border: #c8c8cc;
  --lcd-bg: #d8d8db;
  --lcd-border: #bbbbbe;
  --lcd-text: #1a1a1a;
  --lcd-text-secondary: #444;
  --lcd-text-muted: #777;
  --player-btn-bg: #d5d5d8;
  --player-btn-border: #b0b0b4;
  --player-btn-color: #555;
  --player-btn-hover: #cccccf;
  --player-btn-active: #c0c0c3;
  --waveform-color: #1a1a1a;
  --waveform-idle: #aaa;
  --progress-track-bg: #c0c0c3;
  --progress-fill-color: #1a1a1a;
  --player-label: #999;
  --led-idle: #aaa;
  --led-active: #1a1a1a;
  --loop-bg: #d5d5d8;
  --loop-border: #b0b0b4;
  --loop-color: #888;
  --loop-active: #1a1a1a;
  --vent-color: #c8c8cc;
  --scanline-color: rgba(0,0,0,0.04);

  /* Accent tokens drive color-pops on player interactions + progress gradient + borders.
     --accent is dark enough to read on white (≥4.5:1 contrast). --accent-alt is a lighter
     complementary shade used only for gradient endpoints, never for text.
     --goat-filter-theme shifts the goat image hue to match the chosen theme.
     Defaults match "Amber" — the light-mode default. JS overrides to "Forest" in dark mode. */
  --accent:            #a07030;
  --accent-alt:        #d9bc6c;
  --goat-filter-theme: hue-rotate(-10deg) saturate(1.2);
}

/* ===== COLOR THEMES =====
   Each theme sets --accent (text-safe), --accent-alt (gradient endpoint only),
   and --goat-filter-theme (hue-rotates the yellow goat to match).
   Active theme is set by JS: document.documentElement.setAttribute('data-color', ...) */
[data-color="rose"]   { --accent: #c0607a; --accent-alt: #e8a27c; --goat-filter-theme: hue-rotate(-90deg) saturate(1.3); }
[data-color="forest"] { --accent: #4f8a62; --accent-alt: #adbd66; --goat-filter-theme: hue-rotate(70deg) saturate(1.0); }
[data-color="ocean"]  { --accent: #4e72a9; --accent-alt: #a3c1dc; --goat-filter-theme: hue-rotate(160deg) saturate(0.9); }
[data-color="amber"]  { --accent: #a07030; --accent-alt: #d9bc6c; --goat-filter-theme: hue-rotate(-10deg) saturate(1.2); }

/* Dark-mode overrides. Toggled by JS setting data-theme="dark" on <html>. */
[data-theme="dark"] {
  --bg: #131316;
  --text: #c8c8cc;
  --text-secondary: #999;
  --text-muted: #666;
  --card-bg: #1c1c20;
  --card-border: #3a3a3e;
  --heading-color: #e8e8ec;
  --dash-color: #555;
  /* Player — dark mode */
  --player-bg: #1c1c1f;
  --player-border: #3e3e42;
  --lcd-bg: #111;
  --lcd-border: #2a2a2e;
  --lcd-text: #fff;
  --lcd-text-secondary: #ccc;
  --lcd-text-muted: #888;
  --player-btn-bg: #2e2e32;
  --player-btn-border: #4a4a4e;
  --player-btn-color: #999;
  --player-btn-hover: #3a3a3e;
  --player-btn-active: #222226;
  --waveform-color: #fff;
  --waveform-idle: #555;
  --progress-track-bg: #222;
  --progress-fill-color: #fff;
  --player-label: #555;
  --led-idle: #555;
  --led-active: #fff;
  --loop-bg: #2a2a2e;
  --loop-border: #444;
  --loop-color: #666;
  --loop-active: #fff;
  --vent-color: #333;
  --scanline-color: rgba(0,0,0,0.12);
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}

h1, h2, h3 {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.25;
  color: var(--heading-color);
}

a { color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
audio { display: none; }

/* ===== FOCUS STATES =====
   Visible focus ring for keyboard users. Uses the heading color so it adapts to light/dark.
   :focus-visible means mouse clicks won't show the ring, only keyboard focus does. */
:focus-visible {
  outline: 2px solid var(--heading-color);
  outline-offset: 2px;
}
/* Progress track lives inside an overflow:hidden LCD — an outline would get clipped.
   Use box-shadow instead so the ring can extend outside the track. */
.progress-track:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--heading-color);
}

/* ===== LAYOUT =====
   Two-column grid on desktop (card | sidebar), collapses to one column ≤820px. */
.container {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 55px;
  max-width: 960px;
  margin: 55px auto;
  padding: 0 32px;
  align-items: start;
}

/* ===== THEME TOGGLE =====
   Fixed ☾/☀ button in the top-right. `.spinning` is a one-shot rotate on click. */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  z-index: 100;
  transition: background 0.3s, border-color 0.3s, color 0.3s, transform 0.4s ease;
}

.theme-toggle:hover {
  border-color: var(--text-secondary);
}

.theme-toggle.spinning {
  transform: rotate(360deg);
}

/* ===== THEME COLOR PICKER =====
   Hamburger button below the sun/moon toggle; clicking it reveals a narrow
   vertical dropdown with 4 color-theme swatches. Active theme highlighted. */
.theme-picker {
  position: fixed;
  top: 62px;          /* theme-toggle top(20) + size(34) + gap(8) */
  right: 20px;
  z-index: 100;
}

.theme-picker-toggle {
  width: 34px;
  height: 34px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}

.theme-picker-toggle:hover {
  border-color: var(--text-secondary);
}

.theme-picker-toggle span {
  width: 16px;
  height: 2px;
  background: currentColor;
  display: block;
  transition: background 0.3s;
}

/* Dropdown extends slightly beyond the toggle width for breathing room. */
.theme-picker-menu {
  position: absolute;
  top: 38px;
  right: 0;
  width: 40px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 8px 6px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  transition: background 0.3s, border-color 0.3s;
}

.theme-picker-menu[hidden] {
  display: none;
}

.theme-picker-label {
  font-family: 'Courier New', 'Lucida Console', monospace;
  font-size: 9px;
  color: var(--text-secondary);
  letter-spacing: 1px;
  margin-bottom: 2px;
  transition: color 0.3s;
}

/* Each swatch is a small square filled with its theme's gradient preview. */
.theme-swatch {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--card-border);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s, box-shadow 0.2s;
}

.theme-swatch:hover {
  transform: scale(1.1);
  border-color: var(--text-secondary);
}

/* Active theme gets a heavier border so you can see which one is applied. */
.theme-swatch[data-active="true"] {
  border-color: var(--heading-color);
  box-shadow: 0 0 0 1px var(--heading-color);
}

.theme-swatch[data-theme-color="rose"]   { background: linear-gradient(135deg, #d9839f, #e8a27c); }
.theme-swatch[data-theme-color="forest"] { background: linear-gradient(135deg, #7aa884, #adbd66); }
.theme-swatch[data-theme-color="ocean"]  { background: linear-gradient(135deg, #6f8cc2, #a3c1dc); }
.theme-swatch[data-theme-color="amber"]  { background: linear-gradient(135deg, #c89058, #d9bc6c); }

/* ===== LEFT CARD =====
   Bordered container holding the flag/stripes header, bio, projects, resume, contact, goat.
   Border blends 20% of the theme accent into the neutral card-border so it picks up
   the active theme without ever reading as garish. */
.card {
  background: var(--card-bg);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--card-border));
  overflow: hidden;
  position: relative;
  transition: background 0.3s, border-color 0.3s;
}

.card-body {
  padding: 29px 33px 66px;
  position: relative;
  z-index: 1;
}

/* Flag + Stripes row (top of card): US + Mongolian flags next to Mongolia's tricolor stripes. */
.flag-stripes {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 29px;
  position: relative;
  z-index: 1;
}

.flag-img {
  height: 27px;
  width: auto;
  flex-shrink: 0;
  object-fit: contain;
}

/* Stripes — blue(10px) / yellow(7px) / red(4px). Faded in on load via JS adding .visible. */
.stripes {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.stripe--blue { height: 10px; background: #3558A0; transition: background 0.3s, opacity 0.6s ease; opacity: 0; }
.stripe--yellow { height: 7px; background: #E8B832; transition: background 0.3s, opacity 0.6s ease 0.15s; opacity: 0; }
.stripe--red { height: 4px; background: #C4342D; transition: background 0.3s, opacity 0.6s ease 0.3s; opacity: 0; }

.stripe--blue.visible { opacity: 1; }
.stripe--yellow.visible { opacity: 1; }
.stripe--red.visible { opacity: 1; }

[data-theme="dark"] .stripe--blue { background: #004d87; }
[data-theme="dark"] .stripe--yellow { background: #ffd900; }
[data-theme="dark"] .stripe--red { background: #ad0000; }

/* Sections inside the card (What I'm Up To, Projects, Resume, Contact). */
.section {
  margin-bottom: 29px;
}

.section:last-child {
  margin-bottom: 0;
}

.section h2 {
  font-size: 25px;
  font-weight: 700;
  margin-bottom: 9px;
}

.section p {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.section p a {
  text-decoration: underline;
  transition: color 0.15s;
}

.section p a:hover {
  color: var(--accent);
}

/* Projects toggle — real <button> nested inside <h2>.
   Button defaults are stripped so it inherits the heading's font/color. */
.projects-toggle {
  cursor: pointer;
  display: inline-flex;
  align-items: baseline;
  gap: 11px;
  user-select: none;
  transition: color 0.2s;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
}

.projects-toggle:hover {
  color: var(--accent);
}

.projects-hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  font-style: italic;
  transition: color 0.2s;
}

.projects-toggle:hover .projects-hint {
  color: var(--text-secondary);
}

/* Project list expand — animated max-height/opacity, toggled by .open class from JS. */
.project-list-wrap {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease,
              margin 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 0;
}

.project-list-wrap.open {
  max-height: 400px;
  opacity: 1;
  margin-top: 11px;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.project-item {
  display: flex;
  align-items: flex-start;
}

/* The "—" dash decorator before each project — grows on hover. */
.project-item::before {
  content: '';
  display: inline-block;
  width: 48px;
  height: 1.5px;
  background: var(--dash-color);
  margin-right: 15px;
  flex-shrink: 0;
  margin-top: 11px;
  transition: background 0.2s, width 0.25s ease;
}

.project-item:hover::before {
  background: var(--accent);
  width: 64px;
}

.project-info {
  min-width: 0;
}

.project-item a {
  display: inline;
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-secondary);
  transition: color 0.15s;
}

.project-item:hover a {
  color: var(--accent);
}

.project-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 2px;
}

.project-stack {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
  font-style: italic;
}

/* Resume — thumbnail + status/date + download link. */
.resume-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.resume-thumb {
  width: 94px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--card-border));
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.3s;
}

.resume-thumb:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.resume-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 2px;
}

.resume-status {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.resume-date {
  font-size: 13px;
  color: var(--text-muted);
}

.resume-download {
  font-size: 15px;
  font-style: italic;
  text-decoration: underline;
  color: var(--text-secondary);
  transition: color 0.15s;
}

.resume-download:hover {
  color: var(--accent);
}

/* Contact links (email / LinkedIn / GitHub). */
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.contact-list a {
  font-size: 15px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s, transform 0.2s ease;
  width: fit-content;
  display: inline-block;
}

.contact-list a:hover {
  color: var(--accent);
  text-decoration: underline;
  transform: translateX(4px);
}

/* Goat — decorative image absolutely positioned at the card's bottom-right.
   --goat-glow is set from JS on hover for the drop-shadow effect.
   --goat-filter-theme (from the active [data-color] rule) hue-rotates the yellow goat
   to match the chosen color theme, transitioning smoothly when themes switch.
   .zoomed is toggled when the Projects list is expanded. */
.goat {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 75%;
  height: auto;
  opacity: 0.17;
  pointer-events: none;
  transform-origin: bottom right;
  transform: scale(1);
  --goat-glow: drop-shadow(0 0 0 transparent);
  filter: var(--goat-filter-theme) var(--goat-glow);
  transition: filter 0.5s ease, opacity 0.4s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.goat.zoomed {
  transform: scale(1.12);
}

/* Dark mode: add sepia + brightness on top of the theme hue-rotation. */
[data-theme="dark"] .goat {
  filter: sepia(0.15) brightness(0.9) saturate(1.1) var(--goat-filter-theme) var(--goat-glow);
}

/* ===== SIDEBAR =====
   Right column: headshot + name/subtitle, Y2K music player, Now card. */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.profile {
  text-align: center;
}

.headshot-wrap {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 20px;
}

.headshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}

.name {
  font-size: 27px;
  font-weight: 600;
  margin-bottom: 6px;
}

.subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 3px;
}

/* ========================================
   Y2K MUSIC PLAYER
   Flat dark body, CRT-scanline LCD, 32-bar waveform.
   ======================================== */

.y2k-player {
  background: var(--player-bg);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--player-border));
  transition: background 0.3s, border-color 0.3s;
}

/* Player header: "(my guitar covers)" label + DIGITAL AUDIO label + pulsing power LED. */
.player-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 0 2px;
}

.player-label {
  font-family: 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  font-size: 7px;
  color: var(--player-label);
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

.power-led {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--led-idle);
  animation: breathe 3s ease-in-out infinite;
  transition: background 0.3s;
}

/* Power LED flips to the theme accent while playing — tiny but visible color-pop. */
.y2k-player.playing .power-led {
  background: var(--accent);
  box-shadow: 0 0 4px var(--accent);
}

/* LCD Screen — shows track metadata, waveform, progress bar.
   ::after overlays horizontal scanlines for the CRT look. */
.lcd-screen {
  background: var(--lcd-bg);
  border: 1px solid var(--lcd-border);
  padding: 14px 13px;
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
  transition: background 0.3s, border-color 0.3s;
}

.lcd-screen::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 1.5px,
    var(--scanline-color) 1.5px,
    var(--scanline-color) 3px
  );
  pointer-events: none;
  z-index: 4;
}

.lcd-content {
  position: relative;
  z-index: 2;
}

.lcd-title {
  font-family: 'Courier New', 'Lucida Console', monospace;
  font-size: 16px;
  font-weight: bold;
  color: var(--lcd-text);
  margin-bottom: 3px;
  transition: color 0.3s;
}

.lcd-artist {
  font-family: 'Courier New', 'Lucida Console', monospace;
  font-size: 11px;
  color: var(--lcd-text-secondary);
  margin-bottom: 2px;
  transition: color 0.3s;
}

.lcd-album {
  font-family: 'Courier New', 'Lucida Console', monospace;
  font-size: 9px;
  color: var(--lcd-text-muted);
  font-style: italic;
  margin-bottom: 1px;
  transition: color 0.3s;
}

.lcd-album:empty {
  display: none;
}

/* Accent colors for the "Synchronicity" album title on the Police track. */
.sync-blue { color: #3558A0; }
.sync-yellow { color: #E8B832; }
.sync-red { color: #C4342D; }
[data-theme="dark"] .sync-blue { color: #5b8bd4; }
[data-theme="dark"] .sync-yellow { color: #ffd900; }
[data-theme="dark"] .sync-red { color: #e85550; }

/* Date + track-number row: date on left, "01/02" readout on right. */
.lcd-date-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

.lcd-date {
  font-family: 'Courier New', 'Lucida Console', monospace;
  font-size: 9px;
  color: var(--lcd-text-muted);
  transition: color 0.3s;
}

.lcd-track-num {
  font-family: 'Courier New', 'Lucida Console', monospace;
  font-size: 9px;
  color: var(--lcd-text-muted);
  letter-spacing: 0.5px;
  transition: color 0.3s;
}

/* Waveform — 32 bars generated by JS. Heights driven by AnalyserNode data.
   Bars are clickable to seek (see script.js); cursor signals the affordance. */
.lcd-waveform {
  display: flex;
  align-items: flex-end;
  gap: 1.5px;
  height: 36px;
  margin-bottom: 10px;
}

.waveform-bar {
  flex: 1;
  background: var(--waveform-color);
  min-height: 2px;
  cursor: pointer;
  transition: background 0.3s;
}

.y2k-player:not(.playing) .waveform-bar {
  animation: idlePulse 2.5s ease-in-out infinite;
  background: var(--waveform-idle);
}

/* Playing bars pick up the theme accent as a vertical gradient — seeker signature color. */
.y2k-player.playing .waveform-bar {
  animation: none;
  background: linear-gradient(180deg, var(--accent-alt) 0%, var(--accent) 100%);
}

/* Progress bar — draggable seek head appears on hover/drag via ::after. */
.lcd-progress {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lcd-time {
  font-family: 'Courier New', 'Lucida Console', monospace;
  font-size: 9px;
  color: var(--lcd-text-muted);
  min-width: 28px;
  transition: color 0.3s;
}

.lcd-time:last-child {
  text-align: right;
}

.progress-track {
  flex: 1;
  height: 6px;
  background: var(--progress-track-bg);
  cursor: pointer;
  position: relative;
  touch-action: none;
  transition: background 0.3s;
}

/* Progress fill uses the theme accent gradient — the "music seeker" signature color moment. */
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-alt));
  width: 0%;
  position: relative;
  transition: width 0.15s linear, background 0.3s;
  pointer-events: none;
}

.progress-fill.dragging {
  transition: background 0.3s;
}

.progress-fill::after {
  content: '';
  position: absolute;
  right: -5px;
  top: -3px;
  width: 12px;
  height: 12px;
  background: var(--accent-alt);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.15s, background 0.3s;
}

.progress-track:hover .progress-fill::after,
.progress-fill.dragging::after {
  opacity: 1;
}

/* Transport controls — play/pause + next-track buttons. */
.transport {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-bottom: 10px;
}

.transport-btn {
  width: 44px;
  height: 30px;
  background: var(--player-btn-bg);
  border: 1px solid var(--player-btn-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--player-btn-color);
  transition: all 0.15s;
}

/* Hover/active color-pops: neutral at rest, accent gradient on interaction. */
.transport-btn:hover {
  background: linear-gradient(180deg, var(--accent-alt), var(--accent));
  color: #fff;
  border-color: var(--accent);
}

.transport-btn:active {
  background: var(--accent);
  color: #fff;
}

.transport-btn svg {
  fill: currentColor;
  width: 14px;
  height: 14px;
}

/* Player footer — LOOP toggle on the left, decorative vents on the right. */
.player-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.loop-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--loop-bg);
  border: 1px solid var(--loop-border);
  padding: 4px 10px;
  font-family: 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  font-size: 8px;
  font-weight: bold;
  color: var(--loop-color);
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: all 0.15s;
}

.loop-btn:hover { color: var(--lcd-text-secondary); }

/* Active loop flips to theme accent with a subtle glow. */
.loop-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 6px color-mix(in srgb, var(--accent) 35%, transparent);
}

.loop-led {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--progress-track-bg);
  border: 1px solid var(--loop-border);
  transition: all 0.3s;
}

.loop-btn.active .loop-led {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 3px var(--accent);
}

.player-vents {
  display: flex;
  gap: 3px;
}

.player-vents span {
  width: 14px;
  height: 1.5px;
  background: var(--vent-color);
  transition: background 0.3s;
}

/* ===== ANIMATIONS ===== */

/* breathe — power LED opacity pulse (always running). */
@keyframes breathe {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* idlePulse — gentle wave on waveform bars while paused. */
@keyframes idlePulse {
  0%, 100% { height: 2px; opacity: 0.4; }
  50% { height: 5px; opacity: 0.7; }
}

/* ===== NOW CARD =====
   Three-column grid under the player: label — separator — value. */
.now-heading {
  font-size: 23px;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.now-hint {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  font-style: italic;
}

.now-grid {
  display: grid;
  grid-template-columns: max-content max-content 1fr;
  column-gap: 8px;
  row-gap: 4px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  transition: color 0.3s;
}

.now-sep {
  color: var(--dash-color);
  transition: color 0.3s;
}

/* ===== SKILLS STRIP =====
   "MY TECHNICAL STACK" heading + space-separated skill list under the main grid. */
.skills-title {
  font-family: 'Courier New', 'Lucida Console', monospace;
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  max-width: 960px;
  margin: 80px auto 20px;
  padding: 0 32px;
  transition: color 0.3s;
}

.skills-strip {
  font-family: 'Courier New', 'Lucida Console', monospace;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  max-width: 960px;
  margin: 0 auto 8px;
  padding: 0 32px;
  transition: color 0.3s;
}

/* ===== RESPONSIVE =====
   ≤820px: single column, sidebar items reflow so profile sits above card. */

    @media (max-width: 820px) {
      .container {
        grid-template-columns: 1fr;
        gap: 36px;
        margin: 32px auto;
        padding: 0 20px;
        max-width: 480px;
      }

      /* display:contents lets sidebar children participate directly in the grid
         so we can reorder them (profile first, player/now after the card). */
      .sidebar {
        display: contents;
      }

      .profile { order: -1; }
      .card { order: 0; }
      .y2k-player { order: 10; }
      .now-card { order: 11; max-width: 360px; margin: 0 auto; width: 100%; }
      .skills-title { padding: 0 20px; margin-top: 60px; }
      .skills-strip { padding: 0 20px; }


      .headshot-wrap {
        width: 200px;
        height: 200px;
      }

      .name { font-size: 24px; }
      .card-body { padding: 24px 26px 55px; }
      .section h2 { font-size: 23px; }
      .y2k-player {
        max-width: 360px;
        margin: 0 auto;
        width: 100%;
      }

      .theme-toggle {
        top: 14px;
        right: 14px;
        width: 30px;
        height: 30px;
        font-size: 14px;
      }

      .theme-picker {
        top: 50px;  /* 14 + 30 + 6 gap */
        right: 14px;
      }

      .theme-picker-toggle {
        width: 30px;
        height: 30px;
      }

      .theme-picker-toggle span { width: 14px; }

      .theme-picker-menu {
        width: 38px;
        top: 34px;
      }

      .theme-swatch { width: 24px; height: 24px; }
    }


    /* ===== FOOTER ===== */
    .site-footer {
      text-align: center;
      padding: 32px 20px 24px;
      font-size: 12px;
      color: var(--text-muted);
      letter-spacing: 0.3px;
      transition: color 0.3s;
    }

    /* ≤480px: tighter padding, smaller headshot, resume row stacks vertically. */
    @media (max-width: 480px) {
      .container {
        padding: 0 16px;
        margin: 24px auto;
      }
      .skills-title { padding: 0 16px; }
      .skills-strip { padding: 0 16px; }

      .headshot-wrap {
        width: 170px;
        height: 170px;
      }

      .name { font-size: 22px; }
      .card-body { padding: 20px 22px 50px; }
      .section h2 { font-size: 21px; }
      .flag-stripes { margin-bottom: 22px; }
      .section { margin-bottom: 24px; }

      .resume-row {
        flex-direction: column;
        gap: 10px;
      }

      .resume-thumb { width: 110px; }

      .project-item::before {
        width: 35px;
        margin-right: 10px;
      }

      .y2k-player { padding: 14px; }
      .lcd-title { font-size: 14px; }
    }

/* ===== REDUCED MOTION =====
   Honors OS-level "reduce motion" preference. Kills the breathe LED,
   idlePulse waveform, theme-toggle spin, stripes fade-in transition,
   project expand animation, and goat zoom. Stripes get forced to opacity:1
   so they remain visible even if the .visible class hasn't been added yet. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .stripe--blue, .stripe--yellow, .stripe--red { opacity: 1; }
}
