/* ─── Reset & Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f0f0ee;
  --bg-elevated: #f7f7f4;
  --fg: #0a0a0f;
  --fg-muted: #6b6b74;
  --teal: #3ecfcf;
  --teal-dim: #2ab5b5;
  --nav-fg: #1a1a22;
  --nav-bg: rgba(240, 240, 238, 0.85);
  --border-subtle: rgba(0, 0, 0, 0.07);
  --code-inline-bg: rgba(0, 0, 0, 0.05);
  --code-block-bg: #0a0a0f;
  --code-block-fg: #e2e8f0;
  --glass-shadow: rgba(0, 0, 0, 0.05);
  --glass-inset: rgba(255, 255, 255, 0.5);
  --glass-glow-0: rgba(240, 240, 238, 0);
  --glass-glow-70: rgba(240, 240, 238, 0.7);
  --glass-glow-98: rgba(240, 240, 238, 0.98);
  --glass-edge-0: rgba(240, 240, 238, 0);
  --glass-edge-95: rgba(240, 240, 238, 0.95);
  --glass-dashboard-bg: rgba(255, 255, 255, 0.3);
  --glass-dashboard-border: rgba(0, 0, 0, 0.05);
  --glass-dashboard-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
  --glass-dashboard-inset: inset 0 1px 1px rgba(255, 255, 255, 0.5);
  --glass-chrome-gradient: linear-gradient(
    145deg,
    #ffffff 0%,
    #a8a8a8 20%,
    #efefef 35%,
    #5f5f5f 50%,
    #d4d4d4 65%,
    #ffffff 80%,
    #7a7a7a 100%
  );
  --card-bg: rgba(255, 255, 255, 0.55);
  --card-border: rgba(0, 0, 0, 0.07);
  --card-shadow: rgba(0, 0, 0, 0.08);
  --lab-notes-glow: rgba(62, 207, 207, 0.16);
  --lab-notes-shadow: rgba(14, 19, 26, 0.14);
  --lab-notes-bg: #f7f7f4;
  --lab-notes-overlay-top: rgba(242, 243, 240, 0.82);
  --lab-notes-overlay-bottom: rgba(233, 234, 231, 0.94);
  --lab-notes-panel-bg: rgba(255, 255, 255, 0.78);
  --lab-notes-panel-border: rgba(0, 0, 0, 0.08);
  --lab-notes-panel-text: rgba(20, 24, 32, 0.88);
  --lab-notes-panel-muted: rgba(20, 24, 32, 0.6);
  --lab-notes-chip-border: rgba(0, 0, 0, 0.14);
  --lab-notes-chip-bg: rgba(255, 255, 255, 0.55);
  --lab-notes-chip-text: rgba(20, 24, 32, 0.7);
  --lab-notes-date-color: rgba(20, 24, 32, 0.55);
  --logo-filter: grayscale(0.3);

  --font-serif: 'Cormorant Garamond', 'Georgia', serif;
  --font-sans: 'Inter', system-ui, sans-serif;

  --intro-opacity: 1;
  --intro-scale: 1;
  --intro-translate: 0px;
  --intro-offset: -32px;
  --gate-left-translate: 0px;
  --gate-right-translate: 0px;

  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0f1218;
  --bg-elevated: #151a23;
  --fg: #e6ebf1;
  --fg-muted: #9aa3b2;
  --teal: #4ed7d2;
  --teal-dim: #34b7b2;
  --nav-fg: #e5ebf2;
  --nav-bg: rgba(12, 16, 22, 0.78);
  --border-subtle: rgba(255, 255, 255, 0.1);
  --code-inline-bg: rgba(255, 255, 255, 0.08);
  --code-block-bg: #0b0f15;
  --code-block-fg: #e6edf3;
  --glass-shadow: rgba(0, 0, 0, 0.55);
  --glass-inset: rgba(255, 255, 255, 0.08);
  --glass-glow-0: rgba(16, 20, 26, 0);
  --glass-glow-70: rgba(16, 20, 26, 0.55);
  --glass-glow-98: rgba(16, 20, 26, 0.92);
  --glass-edge-0: rgba(16, 20, 26, 0);
  --glass-edge-95: rgba(16, 20, 26, 0.85);
  --glass-dashboard-bg: rgba(10, 15, 20, 0.35);
  --glass-dashboard-border: rgba(255, 255, 255, 0.05);
  --glass-dashboard-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  --glass-dashboard-inset: inset 0 1px 1px rgba(255, 255, 255, 0.05);
  --glass-chrome-gradient: linear-gradient(
    145deg,
    #6b7077 0%,
    #3a3f47 22%,
    #4a4f57 38%,
    #1f242c 54%,
    #2f343c 70%,
    #4a5058 84%,
    #232830 100%
  );
  --card-bg: rgba(20, 24, 32, 0.72);
  --card-border: rgba(255, 255, 255, 0.1);
  --card-shadow: rgba(0, 0, 0, 0.55);
  --lab-notes-glow: rgba(62, 207, 207, 0.12);
  --lab-notes-shadow: rgba(7, 10, 15, 0.55);
  --lab-notes-bg: #0f131b;
  --lab-notes-overlay-top: rgba(8, 12, 16, 0.9);
  --lab-notes-overlay-bottom: rgba(8, 12, 16, 0.96);
  --lab-notes-panel-bg: rgba(8, 12, 16, 0.6);
  --lab-notes-panel-border: rgba(255, 255, 255, 0.08);
  --lab-notes-panel-text: rgba(232, 242, 242, 0.9);
  --lab-notes-panel-muted: rgba(214, 228, 228, 0.72);
  --lab-notes-chip-border: rgba(255, 255, 255, 0.18);
  --lab-notes-chip-bg: rgba(255, 255, 255, 0.04);
  --lab-notes-chip-text: rgba(226, 240, 240, 0.82);
  --lab-notes-date-color: rgba(220, 232, 232, 0.62);
  --logo-filter: grayscale(1) brightness(0) invert(1);
  --logo-filter: none;
  color-scheme: dark;
}

html { scroll-behavior: smooth; }

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-x: clip;
}

main {
  width: 100%;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.7; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding-left: clamp(1.25rem, 5vw, 3rem);
  padding-right: clamp(1.25rem, 5vw, 3rem);
}

.dashboard-section {
  padding: clamp(4rem, 7vw, 6.5rem) 0;
}

/* ─── Nav ──────────────────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.home .site-nav {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.home.nav-hidden .site-nav {
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
}

.nav-logo {
  display: flex;
  align-items: center;
  line-height: 0;
  color: var(--nav-fg);
}

.nav-logo-icon {
  height: 64px;
  width: auto;
  display: block;
  object-fit: contain;
  filter: var(--logo-filter);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--nav-fg);
}

.nav-links li a {
  padding: 0.2rem 0.35rem;
  transition: opacity 0.15s;
}

.nav-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  appearance: none;
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  background: transparent;
  color: var(--nav-fg);
  width: 38px;
  height: 38px;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.nav-menu-toggle:hover {
  background: rgba(var(--teal-rgb, 62, 207, 207), 0.1);
  border-color: var(--teal);
}

.nav-menu-icon {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-menu-icon span {
  display: block;
  width: 14px;
  height: 1px;
  background: currentColor;
  transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.2s;
}

.site-nav.is-menu-open .nav-menu-icon span:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

.site-nav.is-menu-open .nav-menu-icon span:nth-child(2) {
  opacity: 0;
}

.site-nav.is-menu-open .nav-menu-icon span:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
}

/* ─── Nav Panel ─────────────────────────────────────────────────────── */
.nav-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh;
  z-index: 90;
  background: var(--bg);
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s 0.5s, opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(var(--border-subtle) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  opacity: 0.5;
}

.site-nav.is-menu-open .nav-panel {
  visibility: visible;
  opacity: 1;
  transition: visibility 0s, opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-panel-inner {
  width: 100%;
  max-width: 1200px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.nav-panel-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.nav-panel-links a {
  display: block;
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 200; /* Lighter for elegance */
  text-transform: uppercase;
  letter-spacing: 0.15em; /* Reduced base spacing */
  color: var(--fg);
  text-decoration: none;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
              letter-spacing 0.5s ease;
  position: relative;
  text-align: center;
}

.nav-panel-links a::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 50%;
  width: 20px;
  height: 1px;
  background: var(--teal-dim); /* Softer, more sophisticated blue */
  opacity: 0;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateX(-50%) scaleX(0);
}

.nav-panel-links a:hover,
.nav-panel-links a:focus {
  color: var(--teal);
  letter-spacing: 0.3em; /* Smoother expansion */
}

.nav-panel-links a:hover::after {
  opacity: 1;
  transform: translateX(-50%) scaleX(2.5); /* Elegant underline reveal */
}

.nav-panel-links a:hover {
  color: var(--teal);
}

.site-nav.is-menu-open .nav-panel-links a {
  opacity: 1;
  transform: translateY(0);
}

.site-nav.is-menu-open .nav-panel-links li:nth-child(1) a { transition-delay: 0.1s; }
.site-nav.is-menu-open .nav-panel-links li:nth-child(2) a { transition-delay: 0.15s; }
.site-nav.is-menu-open .nav-panel-links li:nth-child(3) a { transition-delay: 0.2s; }
.site-nav.is-menu-open .nav-panel-links li:nth-child(4) a { transition-delay: 0.25s; }

.nav-panel-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  opacity: 0;
  transition: opacity 0.8s 0.4s;
}

.site-nav.is-menu-open .nav-panel-footer {
  opacity: 1;
}

.nav-panel-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
}

.status-dot {
  width: 4px;
  height: 4px;
  background: var(--teal);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--teal);
  animation: pulse-status 2s infinite;
}

.nav-panel-meta {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--fg-muted);
  text-align: right;
  line-height: 1.6;
}

@keyframes pulse-status {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

.theme-toggle {
  appearance: none;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--nav-fg);
  font-family: var(--font-sans);
  --logo-filter: none;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.theme-toggle-icon {
  display: block;
  object-fit: contain;
  width: 36px;
  height: 36px;
}

.theme-toggle:hover {
  background: rgba(62, 207, 207, 0.08);
  border-color: rgba(62, 207, 207, 0.35);
  color: var(--fg);
}

.theme-toggle:active {
  transform: translateY(1px);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.nav-dot {
  color: var(--fg-muted);
  user-select: none;
  padding: 0 0.1rem;
}

@media (max-width: 800px) {
  .nav-links {
    display: none;
  }

  .nav-dot {
    display: none;
  }

  .nav-menu-toggle {
    display: flex;
  }
}

@media (max-width: 600px) {
  .nav-inner {
    flex-direction: row;
    justify-content: space-between;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
  }

  .nav-logo-icon {
    height: 50px;
  }

  .nav-actions {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 0.75rem;
    width: auto;
  }

  .nav-menu-toggle {
    border: none;
    width: 44px;
    height: 44px;
  }

  .nav-menu-icon {
    gap: 5px;
  }

  .nav-menu-icon span {
    width: 20px;
    height: 1.5px;
  }

  .site-nav.is-menu-open .nav-menu-icon span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }

  .site-nav.is-menu-open .nav-menu-icon span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }

  .nav-panel-links a {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
    letter-spacing: 0.12em;
  }

  .nav-panel-inner {
    padding: 1.5rem;
    gap: 3rem;
  }
}

/* ─── Intro ────────────────────────────────────────────────────────── */
.intro {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 0 2rem;
  text-align: center;
  background: var(--bg);
}

.intro-gate {
  position: relative;
  width: clamp(220px, 32vw, 480px);
  max-width: 90vw;
  margin: 0;
  opacity: var(--intro-opacity);
  transform: translateY(calc(var(--intro-translate) + var(--intro-offset))) scale(var(--intro-scale));
  transition: opacity 0.2s linear, transform 0.25s ease-out;
  will-change: opacity, transform;
}

@media (min-width: 1025px) {
  .intro-gate {
    margin: 0 auto;
  }
}

.intro-logo {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0;
  pointer-events: none;
  max-width: 100%;
  object-fit: contain;
}

.intro-gate-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  filter: grayscale(0.2);
  transform: translateX(0);
  transition: transform 0.3s ease-out;
  will-change: transform;
}

.intro-gate-left {
  clip-path: inset(0 50% 0 0);
  transform: translateX(var(--gate-left-translate));
}

.intro-gate-right {
  clip-path: inset(0 0 0 50%);
  transform: translateX(var(--gate-right-translate));
}

.home-stage {
  --stage-opacity: 1;
  --stage-translate: 0px;
  opacity: var(--stage-opacity);
  transform: translateY(var(--stage-translate));
  transition: opacity 0.35s ease, transform 0.35s ease;
  will-change: opacity, transform;
}

@media (prefers-reduced-motion: reduce) {
  .intro-gate,
  .intro-gate-image,
  .home-stage {
    transition: none;
    transform: none;
  }
}

/* ─── Blob Section ─────────────────────────────────────────────────── */
.blob-section {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(1.5rem, 4vw, 3rem) 1rem;
  min-height: clamp(360px, 70vw, 580px);
  perspective: 1200px;
  flex-direction: column;
  gap: 1rem;
}

.blob-wrapper {
  position: relative;
  width: min(500px, 85vw);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
  transform-style: preserve-3d;
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1), 
              aspect-ratio 0.7s cubic-bezier(0.22, 1, 0.36, 1), 
              transform 0.1s ease-out;
  touch-action: pan-y;
}

.blob-wrapper {
  will-change: transform;
  --shadow-x: 0px;
  --shadow-y: 10px;
  --shadow-soft: 40px;
}

.blob-caption {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-align: center;
}

.glass-box {
  position: absolute;
  inset: 0;
  border-radius: 2.5rem;
  overflow: hidden;
  isolation: isolate;
  background: var(--bg);
  box-shadow:
    var(--shadow-x) var(--shadow-y) var(--shadow-soft) rgba(0,0,0,0.16),
    0 10px 20px var(--glass-shadow),
    inset 0 2px 20px var(--glass-inset);
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.glass-box::after {
  content: "";
  position: absolute;
  inset: -10% -10%;
  pointer-events: none;
  background: radial-gradient(
    circle at center,
    var(--glass-glow-0) 32%,
    var(--glass-glow-70) 58%,
    var(--glass-glow-98) 100%
  );
  mix-blend-mode: lighten;
  z-index: 5;
}

.glass-edge-blur {
  position: absolute;
  inset: -12% -12%;
  pointer-events: none;
  background: radial-gradient(
    circle at center,
    var(--glass-edge-0) 50%,
    var(--glass-edge-95) 100%
  );
  filter: blur(18px);
  opacity: 0.9;
  mix-blend-mode: lighten;
  z-index: 4;
}


.glass-box::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px; /* thickness of the chrome border */
  background: var(--glass-chrome-gradient);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 10;
}

/* Biomorphic Orbit Animations */
.orbit-1 { animation: orbit 24s infinite alternate ease-in-out; transform-origin: 25% 35%; }
.orbit-2 { animation: orbit 28s infinite alternate-reverse ease-in-out; transform-origin: 75% 50%; }
.orbit-3 { animation: orbit 20s infinite alternate ease-in-out; transform-origin: 50% 65%; }
.orbit-4 { animation: orbit 22s infinite alternate-reverse ease-in-out; transform-origin: 60% 25%; }

@keyframes orbit {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); }
  33% { transform: translate(2vw, -1vw) scale(1.1) rotate(10deg); }
  66% { transform: translate(-1vw, 2vw) scale(0.9) rotate(-5deg); }
  100% { transform: translate(-1vw, -2vw) scale(1.05) rotate(5deg); }
}

.blob-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transition: opacity 0.4s ease;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.blob-image-fallback {
  opacity: 1;
  z-index: 1;
}

.blob-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.4s ease;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.blob-image-fallback,
.blob-canvas {
  -webkit-mask-image: radial-gradient(
    140% 140% at 50% 50%,
    rgba(0, 0, 0, 1) 50%,
    rgba(0, 0, 0, 0) 100%
  );
  mask-image: radial-gradient(
    140% 140% at 50% 50%,
    rgba(0, 0, 0, 1) 50%,
    rgba(0, 0, 0, 0) 100%
  );
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}




.blob-wrapper.is-live .blob-canvas {
  opacity: 1;
}

.blob-wrapper.is-live .blob-image-fallback {
  opacity: 0;
}

/* ─── Transmissions Dossier ────────────────────────────────────────── */
.signal-blob {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.95fr);
  gap: clamp(1.5rem, 3vw, 4rem);
  align-items: start;
  padding: clamp(2rem, 4vw, 3rem) 0 clamp(2.5rem, 6vw, 4rem);
  overflow: visible;
}

.signal-blob .signal-section,
.signal-blob .blob-section {
  width: 100%;
  padding: 0;
  min-height: auto;
}

.signal-blob .signal-section {
  display: flex;
  justify-content: flex-start;
  overflow: hidden;
}

.signal-blob .signal-inner {
  width: 100%;
  max-width: 100%;
}

.signal-blob .blob-section {
  align-items: center;
}

.signal-blob .blob-wrapper {
  width: min(460px, 42vw);
}

.signal-copy {
  display: grid;
  gap: clamp(1.25rem, 2.6vw, 2rem);
}

.signal-visuals {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  justify-items: center;
}

/* ─── Featured Signal ─────────────────────────────────────────────── */
.featured-signal {
  padding: clamp(2.5rem, 6vw, 5rem) 0;
}

.featured-signal-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

.featured-signal-copy {
  max-width: 520px;
}

.featured-signal-body {
  color: var(--fg-muted);
  line-height: 1.7;
  margin: 0 0 1.5rem;
}

.featured-signal-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (max-width: 1024px) {
  .signal-blob {
    grid-template-columns: 1fr;
    gap: clamp(1.25rem, 4vw, 3rem);
    padding: 2rem clamp(1.5rem, 4vw, 2.5rem) 3rem;
    justify-items: center;
  }

  .signal-blob .blob-wrapper {
    width: min(420px, 70vw);
  }

  .featured-signal-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}

/* Dossier Container */
.tx-dossier {
  width: 100%;
  max-width: 600px;
}

.tx-header {
  margin-bottom: clamp(0.9rem, 2vw, 1.5rem);
}

.tx-eyebrow {
  font-size: 0.68rem;
  font-family: var(--font-sans);
  color: var(--teal-dim);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.35rem;
}

.tx-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 8vw, 2.8rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--fg);
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Timeline */
.tx-timeline {
  display: flex;
  flex-direction: column;
}

.tx-entry {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 1rem;
  min-height: 0;
}

.tx-dot-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 0.35rem;
}

.tx-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fg-muted);
  opacity: 0.4;
  flex-shrink: 0;
}

.tx-dot--active {
  width: 10px;
  height: 10px;
  background: var(--teal);
  opacity: 1;
  box-shadow: 0 0 8px rgba(62, 207, 207, 0.5);
  animation: tx-pulse 2.5s ease-in-out infinite;
}

@keyframes tx-pulse {
  0%, 100% { box-shadow: 0 0 6px rgba(62, 207, 207, 0.4); opacity: 1; }
  50% { box-shadow: 0 0 16px rgba(62, 207, 207, 0.7); opacity: 0.8; }
}

.tx-line {
  width: 1px;
  flex: 1;
  background: linear-gradient(180deg, rgba(62, 207, 207, 0.25), rgba(107, 107, 116, 0.12));
  margin-top: 0.4rem;
}

.tx-entry:not(.tx-entry--latest) .tx-line {
  background: linear-gradient(180deg, rgba(107, 107, 116, 0.18), rgba(107, 107, 116, 0.06));
}

/* Content */
.tx-content {
  padding-bottom: clamp(1rem, 2vw, 1.5rem);
}

.tx-index {
  font-family: "SFMono-Regular", "Menlo", "Monaco", "Consolas", monospace;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-dim);
  opacity: 0.7;
  display: block;
  margin-bottom: 0.3rem;
}

.tx-content-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}

.tx-content-link:hover {
  opacity: 0.75;
}

.tx-content-title {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 400;
  line-height: 1.3;
  color: var(--fg);
  margin: 0;
}

.tx-entry--latest .tx-content-title {
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
}

.tx-content-desc {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--fg-muted);
  margin: 0.35rem 0 0;
}

.tx-date {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  color: var(--fg-muted);
  opacity: 0.65;
  display: block;
  margin-top: 0.5rem;
  letter-spacing: 0.02em;
}

/* Reveal animation */
.tx-entry {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.5s ease;
}

.signal-section.is-visible .tx-entry {
  opacity: 1;
  transform: translateY(0);
}

.signal-section.is-visible .tx-entry:nth-child(1) { transition-delay: 0.1s; }
.signal-section.is-visible .tx-entry:nth-child(2) { transition-delay: 0.2s; }
.signal-section.is-visible .tx-entry:nth-child(3) { transition-delay: 0.3s; }
.signal-section.is-visible .tx-entry:nth-child(4) { transition-delay: 0.4s; }
.signal-section.is-visible .tx-entry:nth-child(5) { transition-delay: 0.5s; }

/* Intro body */
.tx-intro-body {
  margin-bottom: clamp(1rem, 2vw, 1.4rem);
}

.tx-intro-body p {
  font-family: var(--font-sans);
  font-size: clamp(0.92rem, 1.4vw, 1.05rem);
  line-height: 1.7;
  color: var(--fg-muted);
  margin: 0 0 0.8rem;
}

.tx-intro-body p:last-child {
  margin-bottom: 0;
}

.tx-intro-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-dim);
  text-decoration: none;
  transition: gap 0.25s ease, color 0.2s ease;
}

.tx-intro-link:hover {
  gap: 0.8rem;
  color: var(--teal);
  opacity: 1;
}

.tx-intro-link-arrow {
  font-size: 1.1em;
  transition: transform 0.25s ease;
}

.tx-intro-link:hover .tx-intro-link-arrow {
  transform: translateX(2px);
}

.signal-section {
  display: flex;
  justify-content: center;
  padding: 2rem 2rem 4rem;
}

.signal-inner {
  width: 100%;
  max-width: 1400px;
  display: flex;
  justify-content: center;
}

.terminal-frame {
  position: relative;
  width: 100%;
  max-width: min(1360px, 96vw);
  aspect-ratio: 3 / 2;
  display: block;
  isolation: isolate;
}

.terminal-frame-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.signal-terminal {
  --hud-width: 100px;
  --hud-gap: 1.2rem;
  --frame-top: 22.1%;
  --frame-right: 15.3%;
  --frame-bottom: 24.3%;
  --frame-left: 17.2%;
  --cursor-y: 0px;
  background: linear-gradient(150deg, rgba(8, 10, 12, 0.92), rgba(8, 10, 12, 0.78));
  color: #f6fafa;
  border-radius: 10px;
  padding: clamp(1rem, 3vw, 2.6rem) clamp(1rem, 3vw, 2.8rem);
  border: 1px solid rgba(62, 207, 207, 0.35);
  box-shadow: inset 0 0 40px rgba(62, 207, 207, 0.14);
  backdrop-filter: blur(3px) saturate(110%);
  -webkit-backdrop-filter: blur(3px) saturate(110%);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.6s ease;
  will-change: transform, opacity;
  position: absolute;
  inset: var(--frame-top) var(--frame-right) var(--frame-bottom) var(--frame-left);
  z-index: 2;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
}

.signal-terminal::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(62, 207, 207, 0.18);
}

.terminal-hud .hud-rail {
  position: absolute;
  inset: 0 0 176px 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.terminal-hud .hud-rail::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 6px;
  background: repeating-linear-gradient(
    to bottom,
    rgba(62, 207, 207, 0.2) 0px,
    rgba(62, 207, 207, 0.2) 1px,
    rgba(62, 207, 207, 0) 1px,
    rgba(62, 207, 207, 0) 8px
  );
  opacity: 0.35;
}

.terminal-hud .hud-meter {
  position: absolute;
  left: 24px;
  top: 28px;
  width: 20px;
  height: 240px;
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    rgba(62, 207, 207, 0.9) 0%,
    rgba(62, 207, 207, 0.9) 45%,
    rgba(62, 207, 207, 0.2) 45%,
    rgba(62, 207, 207, 0.2) 100%
  );
  box-shadow: 0 0 10px rgba(62, 207, 207, 0.35);
}

.terminal-hud .hud-ring {
  position: absolute;
  left: 0;
  bottom: 0;
  width: var(--hud-width);
  height: var(--hud-width);
  border-radius: 50%;
  border: 1px solid rgba(62, 207, 207, 0.35);
  background: radial-gradient(circle at center, rgba(62, 207, 207, 0.16), transparent 65%);
  box-shadow: inset 0 0 12px rgba(62, 207, 207, 0.35);
}

.terminal-hud .hud-ring::before {
  content: "";
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  border: 1px dashed rgba(62, 207, 207, 0.4);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.5vw, 1.2rem);
  margin-bottom: clamp(1rem, 2.5vw, 2.2rem);
  font-size: clamp(0.65rem, 1.2vw, 1rem);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(236, 247, 247, 0.55);
  font-weight: 600;
  padding-bottom: clamp(0.6rem, 1.5vw, 1.3rem);
  padding-left: calc(var(--hud-width) + 0.8rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
}

.terminal-bar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, rgba(126, 240, 255, 0.85), rgba(126, 240, 255, 0.2) 55%, transparent 80%);
}

.terminal-dots {
  display: inline-flex;
  gap: clamp(0.3rem, 0.8vw, 0.7rem);
}

.terminal-dots span {
  width: clamp(0.55rem, 1.1vw, 1rem);
  height: clamp(0.55rem, 1.1vw, 1rem);
  border-radius: 50%;
  background: rgba(236, 247, 247, 0.35);
}

.terminal-title {
  font-family: var(--font-sans);
}

.terminal-log {
  display: grid;
  gap: clamp(0.4rem, 1vw, 0.9rem);
  font-family: "SFMono-Regular", "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace;
  font-size: clamp(0.65rem, 1.4vw, 1.25rem);
  font-weight: 500;
  line-height: 1.5;
  padding-left: calc(var(--hud-width) + var(--hud-gap));
  padding-right: 0.6rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(126, 240, 255, 0.45) transparent;
  word-break: break-word;
  overflow-wrap: break-word;
}

.terminal-log::-webkit-scrollbar {
  width: 8px;
}

.terminal-log::-webkit-scrollbar-thumb {
  background: rgba(126, 240, 255, 0.35);
  border-radius: 10px;
}

.terminal-log::-webkit-scrollbar-track {
  background: transparent;
}

.terminal-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(0.5rem, 1.5vw, 1.4rem);
  align-items: baseline;
  min-width: 0;
}

.terminal-line.is-latest {
  align-items: start;
}

.terminal-latest {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.terminal-link--latest {
  font-size: clamp(0.85rem, 1.7vw, 1.5rem);
  line-height: 1.25;
  letter-spacing: 0.01em;
  overflow-wrap: break-word;
  word-break: break-word;
}

.terminal-subtitle {
  font-size: clamp(0.7rem, 1.2vw, 1.02rem);
  color: rgba(248, 252, 252, 0.72);
  letter-spacing: 0.02em;
  overflow-wrap: break-word;
  word-break: break-word;
}


.terminal-prompt {
  color: #93f0f0;
  font-weight: 600;
  white-space: nowrap;
  font-size: clamp(0.6rem, 1.2vw, 1em);
}

.terminal-link {
  color: #f9fcfc;
  font-weight: 500;
  text-decoration: none;
}

.terminal-link:hover {
  color: var(--teal);
  opacity: 1;
}


.terminal-text {
  color: rgba(248, 252, 252, 0.78);
}

.terminal-cursor {
  position: absolute;
  left: calc(var(--hud-width) + 0.6rem);
  top: 0;
  transform: translateY(var(--cursor-y));
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 3;
}

.terminal-cursor-icon {
  width: 40px;
  height: auto;
  display: block;
  filter: grayscale(1) brightness(1.1);
  opacity: 0.55;
}

.terminal-cursor.is-dropping {
  animation: cursor-drop 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.signal-spider {
  position: absolute;
  top: 0;
  left: calc(var(--hud-width) + 0.4rem);
  width: 52px;
  height: 52px;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transform: translateY(var(--spider-y, -4.8rem));
  transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
  --spider-line: 0px;
}

.signal-spider::before {
  content: "";
  position: absolute;
  top: calc(-1 * var(--spider-line));
  left: 50%;
  width: 1px;
  height: var(--spider-line);
  background: linear-gradient(
    rgba(255, 255, 255, 0.35),
    rgba(255, 255, 255, 0.1)
  );
  transform: translateX(-50%);
}

html[data-theme="dark"] .signal-spider::before {
  display: none;
}

.signal-spider img {
  width: 100%;
  height: auto;
  display: block;
  filter: invert(1) brightness(1.6) contrast(1.1) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

@keyframes cursor-drop {
  0% {
    transform: translateY(calc(var(--cursor-y) - 32px));
    opacity: 0.1;
  }
  100% {
    transform: translateY(var(--cursor-y));
    opacity: 1;
  }
}

.signal-section.is-visible .signal-terminal {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.12s;
}

.signal-section.is-visible .terminal-cursor {
  opacity: 1;
}

.signal-section.is-visible .signal-spider {
  opacity: 1;
}

.home-hero {
  padding: clamp(4rem, 7vw, 6.5rem) 0;
}

.home-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
}

.home-hero-media {
  display: flex;
  align-items: start;
}

.home-hero-portrait {
  position: relative;
  width: 100%;
  min-height: clamp(380px, 52vh, 580px);
  border-radius: 32px;
  overflow: hidden;
  background: var(--bg-elevated);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.25),
    0 8px 20px rgba(0, 0, 0, 0.12);
}

.home-hero-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.35));
  pointer-events: none;
}

.home-hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-hero-content {
  display: flex;
  flex-direction: column;
  gap: clamp(1.6rem, 3vw, 2.5rem);
  padding: clamp(1rem, 2vw, 2rem) 0;
  max-width: 560px;
}

.home-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 400;
  line-height: 1.05;
  margin: 0;
}

.home-hero-intro {
  color: var(--fg-muted);
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  line-height: 1.7;
}

.home-hero-intro p + p {
  margin-top: 0.85rem;
}

.home-hero-about {
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-subtle);
}

.home-hero-name {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin: 0.35rem 0 0.85rem;
}

.home-hero-body {
  color: var(--fg-muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

.home-hero-body p + p {
  margin-top: 0.9rem;
}

.home-hero-links {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.4rem;
  font-size: 0.9rem;
}

.home-hero-links a {
  color: var(--teal-dim);
}

.home-hero-links a:hover {
  color: var(--fg);
}

.home-hero-feature {
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-subtle);
}

.home-hero-feature-title {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  font-weight: 400;
  margin: 0.35rem 0 1rem;
}

.home-hero-blob {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}

.evidence-gadget {
  padding-top: 0;
  border-top: none;
}

.evidence-gadget .home-hero-feature-title {
  margin-top: 0.35rem;
}

@media (max-width: 1024px) {
  .home-hero-inner {
    grid-template-columns: 1fr;
    justify-items: start;
    text-align: left;
  }
  .home-hero-media {
    order: -1;
    width: 100%;
  }
  .home-hero-content {
    max-width: 100%;
  }
}

/* ─── Home About ─────────────────────────────────────────────────── */
.home-about {
  padding: 1.4rem 0 0;
  border-top: 1px solid var(--border-subtle);
}

.home-about-copy {
  max-width: 46ch;
}

.home-about-title {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0.35rem 0 0.75rem;
}

.home-about-media {
  display: flex;
  justify-content: center;
}

.home-about-photo {
  width: min(360px, 72vw);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 28px;
  box-shadow:
    0 24px 50px rgba(0, 0, 0, 0.22),
    0 4px 14px rgba(0, 0, 0, 0.12);
}

.home-about-body {
  color: var(--fg-muted);
  font-size: clamp(0.92rem, 1.3vw, 1.02rem);
  line-height: 1.65;
}

.home-about-body p + p {
  margin-top: 1rem;
}

.home-about-links {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.5rem;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.home-about-links a {
  color: var(--teal-dim);
}

.home-about-links a:hover {
  color: var(--fg);
}

/* ─── Field Photos ─────────────────────────────────────────────────── */
.field-photos {
  padding: clamp(4rem, 7vw, 6.5rem) 0;
  overflow: hidden;
}

.field-photos-header {
  text-align: center;
  padding: 0;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

@media (max-width: 900px) {
  .field-photos-header,
  .selected-work-header {
    text-align: left;
    padding-left: clamp(1.25rem, 5vw, 4rem);
  }
}

.photo-strip {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  scroll-snap-type: x proximity;
}

.photo-strip::-webkit-scrollbar {
  display: none;
}

.photo-strip:active {
  cursor: grabbing;
}

.photo-strip-track {
  display: flex;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: 1rem 1.25rem 2rem;
  width: max-content;
}

@media (min-width: 421px) {
  .photo-strip-track {
    padding-left: clamp(2rem, 5vw, 6rem);
    padding-right: clamp(2rem, 5vw, 6rem);
  }
}

.photo-card {
  flex: 0 0 auto;
  width: clamp(320px, 38vw, 520px);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scroll-snap-align: center;
  transition: transform 0.3s ease;
}

@media (min-width: 900px) {
  .photo-strip {
    overflow: visible;
    grid-template-areas:
      "tools"
      "content";
  }

  .lab-notes-terminal-window {
    grid-area: content;
  }

  .lab-notes-tools-column {
    grid-area: tools;
  }

  .photo-strip-track {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(1200px, 100%);
    margin: 0 auto;
    padding: 1rem 0 2.5rem;
    gap: clamp(1.5rem, 3vw, 2.5rem);
  }

  .photo-card {
    width: 100%;
    scroll-snap-align: unset;
  }
}

.photo-card:hover {
  transform: translateY(-4px);
}

.photo-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  isolation: isolate;
}

.photo-frame-chrome {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 3;
  pointer-events: none;
}

.photo-screen {
  position: absolute;
  inset: 22.1% 15.3% 24.3% 17.2%;
  border-radius: 10px;
  overflow: hidden;
  z-index: 1;
  background: #0a0a0f;
}

.photo-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), filter 0.4s ease;
  filter: saturate(0.6) contrast(1.15) brightness(0.85) sepia(0.35) hue-rotate(95deg);
}

.photo-card:hover .photo-image {
  transform: scale(1.04);
  filter: saturate(0.75) contrast(1.2) brightness(0.9) sepia(0.25) hue-rotate(95deg);
}

/* Green tint overlay for the field-capture treatment */
.photo-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(30, 90, 70, 0.35) 0%,
    rgba(20, 60, 50, 0.25) 40%,
    rgba(10, 40, 35, 0.4) 100%
  );
  mix-blend-mode: color;
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.photo-card:hover .photo-screen::before {
  opacity: 0.7;
}

.photo-hud {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.6rem 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "SFMono-Regular", "Menlo", "Monaco", "Consolas", monospace;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(60, 160, 170, 0.9);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.75) 0%, transparent 100%);
  z-index: 2;
  pointer-events: none;
}

.hud-tag {
  background: rgba(30, 120, 120, 0.25);
  border: 1px solid rgba(30, 120, 120, 0.45);
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
}

.hud-coord {
  color: rgba(60, 160, 170, 0.55);
  font-weight: 400;
}

.photo-label {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-align: center;
  padding: 0 0.5rem;
}

/* Scanline shimmer on hover */
.photo-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(62, 207, 207, 0.03) 50%,
    transparent 100%
  );
  background-size: 100% 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 3;
  mix-blend-mode: overlay;
}

.photo-card:hover .photo-screen::after {
  opacity: 1;
}

/* ─── Photo Lightbox ───────────────────────────────────────────────── */
.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 8, 10, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  cursor: zoom-out;
}

.photo-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.photo-lightbox-img {
  max-width: 88vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 12px;
  filter: saturate(0.6) contrast(1.15) brightness(0.85) sepia(0.35) hue-rotate(95deg);
  box-shadow:
    0 0 80px rgba(30, 120, 120, 0.15),
    0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.92);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.photo-lightbox.is-open .photo-lightbox-img {
  transform: scale(1);
}

.photo-lightbox-hud {
  position: absolute;
  bottom: clamp(1.5rem, 4vh, 3rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-family: "SFMono-Regular", "Menlo", "Monaco", "Consolas", monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(60, 160, 170, 0.8);
  opacity: 0;
  transition: opacity 0.4s ease 0.15s;
}

.photo-lightbox.is-open .photo-lightbox-hud {
  opacity: 1;
}

.photo-lightbox-close {
  position: absolute;
  top: clamp(1rem, 3vh, 2rem);
  right: clamp(1rem, 3vw, 2rem);
  width: 44px;
  height: 44px;
  border: 1px solid rgba(60, 160, 170, 0.35);
  border-radius: 50%;
  background: rgba(10, 15, 18, 0.6);
  color: rgba(60, 160, 170, 0.9);
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
  z-index: 2;
}

.photo-lightbox-close:hover {
  background: rgba(30, 120, 120, 0.2);
  border-color: rgba(60, 160, 170, 0.6);
}

/* ─── Selected Work ────────────────────────────────────────────────── */
.selected-work,
.home-projects-split {
  padding: clamp(4rem, 8vw, 6rem) 0;
}

.selected-work-header {
  text-align: left;
}

.section-eyebrow {
  font-size: 0.72rem;
  font-family: var(--font-sans);
  color: var(--teal);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 400;
  margin-bottom: 3rem;
}

/* ─── Signal Dashboard (Home) ─────────────────────────────────────── */
.signal-dashboard {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.5rem);
}

.signal-dashboard__featured {
  position: relative;
  display: grid;
  grid-template-areas:
    "header"
    "tv"
    "list";
  gap: 1rem;
  align-content: start;
  justify-items: start;
  padding: clamp(1.25rem, 2.5vw, 2rem);
  border-radius: 24px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  --featured-media-width: min(620px, 100%);
}

.signal-dashboard__featured .section-eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  margin-bottom: 0.6rem;
}

.signal-dashboard__featured > * {
  position: relative;
  z-index: 1;
}

.signal-dashboard__featured-header {
  grid-area: header;
  display: grid;
  gap: 0.2rem;
  justify-items: start;
}

.signal-dashboard__tv {
  grid-area: tv;
  width: min(100%, var(--featured-media-width));
}

.signal-dashboard__featured-list {
  grid-area: list;
  width: 100%;
  max-width: 30rem;
}

.signal-dashboard__title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.04em;
  margin: 0.35rem 0 0.7rem;
  max-width: 12ch;
}

.signal-dashboard__subtitle {
  color: var(--fg-muted);
  max-width: 30ch;
  font-size: 0.98rem;
  line-height: 1.55;
  opacity: 0.85;
}

.signal-dashboard__rail {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.signal-dashboard__block {
  display: grid;
  gap: 1rem;
  padding: clamp(1.25rem, 2.5vw, 2rem);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  background: var(--bg-elevated);
}

.signal-dashboard__block + .signal-dashboard__block {
  padding-top: clamp(1.25rem, 2vw, 1.5rem);
}

.signal-dashboard__list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.signal-dashboard__media-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.signal-dashboard__media-item + .signal-dashboard__media-item {
  margin-top: 0;
}

.signal-dashboard__rail .section-eyebrow {
  margin-bottom: 0.5rem;
}

.signal-dashboard .section-title {
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  margin-bottom: 0;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.signal-dashboard__media-item h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  margin: 0;
  color: var(--fg);
}

.signal-dashboard__media-item p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.signal-dashboard__media-item .section-eyebrow {
  font-size: 0.62rem;
  margin-bottom: 0.25rem;
  opacity: 0.7;
}

.media-tv-widget--featured {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
  width: 100%;
}

.media-tv-widget--featured .media-tv-image {
  width: 100%;
  max-width: var(--featured-media-width);
}

.media-tv-toggle.media-tv-toggle--featured {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
}

.media-tv-toggle.media-tv-toggle--featured .media-tv-image {
  width: 100%;
  filter: none;
  display: block;
  margin: 0;
}

.media-tv-list.media-tv-list--overlay {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--border-subtle);
  background: none;
  list-style: none;
  text-align: left;
  max-height: none;
  overflow: visible;
  scrollbar-width: thin;
  scrollbar-color: var(--teal) transparent;
}

.media-tv-list.media-tv-list--overlay::-webkit-scrollbar {
  width: 4px;
}

.media-tv-list.media-tv-list--overlay::-webkit-scrollbar-thumb {
  background: var(--teal);
  border-radius: 10px;
}

.media-tv-list.media-tv-list--overlay li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.75rem;
  padding: 0.5rem 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--fg-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.media-tv-list.media-tv-list--overlay li::before {
  content: "•";
  color: var(--teal);
  margin: 0;
  transform: translateY(-1px);
}

.media-tv-list.media-tv-list--overlay li:last-child {
  border-bottom: none;
}

/* ─── EP Releases ─────────────────────────────────────────────────── */
.ep-section {
  margin: clamp(3rem, 5vw, 5rem) auto 0;
  max-width: 100%;
  padding: 0;
  overflow: visible;
}

.ep-hero {
  position: relative;
  height: clamp(240px, 36vw, 360px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2.5rem;
  overflow: visible;
}

.ep-core {
  width: min(560px, 82vw);
  max-width: 720px;
  pointer-events: none;
}

.ep-hero .reflection-wrapper {
  opacity: 0.45;
}

.ep-hero .core-logo-liquid.reflection {
  opacity: 0.8;
}

.ep-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.ep-intro {
  max-width: 760px;
  margin: 0 auto;
  color: var(--fg-muted);
  font-family: var(--font-serif);
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  line-height: 1.7;
  font-style: italic;
}

.ep-subtitle {
  max-width: 640px;
  margin: 0.75rem auto 0;
  color: var(--fg-muted);
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.6;
}

.ep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1rem, 2vw, 1.6rem);
}

.ep-card {
  background: transparent;
  border: 0;
  padding: 0;
  display: block;
  box-shadow: none;
}

.ep-embed {
  position: relative;
  width: 100%;
  height: 300px;
  border-radius: 22px;
  overflow: hidden;
  background: transparent;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.2),
    0 4px 12px rgba(0, 0, 0, 0.12);
}

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

.ep-meta h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.ep-meta p {
  color: var(--fg-muted);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ep-link {
  display: inline-flex;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  text-decoration: none;
}

.ep-link:hover {
  color: var(--fg);
}

@media (max-width: 720px) {
  .signal-blob {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .signal-copy,
  .signal-visuals {
    width: 100%;
    justify-items: center;
  }
  text-align: center;
  margin-bottom: 2rem;
}

.network-hint {
  color: var(--teal-dim);
  font-size: 0.65rem;
  font-family: "SFMono-Regular", monospace;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  opacity: 0.8;
  animation: pulseHint 3s infinite;
}

@keyframes pulseHint {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.9; }
}

.network-title {
  color: var(--teal-dim);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  margin-bottom: 0.5rem;
}

.network-constellation {
  position: relative;
  width: 100%;
  max-width: 1200px;
  height: clamp(320px, 38vw, 420px); /* Give reflection room below the core */
  margin: 0 auto;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.core-trigger {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 1000px; /* Massive screen-spanning logo */
  background: none;
  border: none;
  padding: 0;
  z-index: 10;
  outline: none;
}

.core-logo-liquid {
  width: 100%;
  aspect-ratio: 1 / 1; /* Perfect square container matches the 3000x3000px image padding */
  height: auto;
  /* High-end Silver, Chrome, and White gradient */
  background: radial-gradient(circle at top center, #ffffff 0%, #e2e8f0 20%, #94a3b8 35%, #ffffff 50%, #e2e8f0 70%, #94a3b8 85%, #ffffff 100%);
  background-size: 200% 200%;
  
  /* The mask */
  -webkit-mask-image: url('../assets/ambriel.png');
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  position: relative;
  z-index: 2;
}



/* The Water Reflection */
.reflection-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Flip vertically and shift down to connect with the logo */
  transform: scaleY(-1) translateY(-21%);
  /* Fade out as it goes down (visual bottom is physical top) */
  -webkit-mask-image: linear-gradient(to bottom, transparent 30%, black 50%);
  filter: url(#water-ripple);
  opacity: 0;
  transition: opacity 0.8s ease;
  z-index: 0;
  pointer-events: none;
}

.core-logo-liquid.reflection {
  position: absolute;
  top: 0;
  left: 0;
  background: linear-gradient(135deg, #e2e8f0 0%, #94a3b8 50%, #475569 100%); /* Slightly darker reflection */
  background-size: 200% 200%;
}

/* Hover States */
.core-trigger:hover .core-logo-liquid {
  animation: flowChrome 4s linear infinite;
}

.core-trigger:active .core-logo-liquid {
  animation: flowChrome 4s linear infinite;
}


.core-trigger:hover .reflection-wrapper {
  opacity: 0.55;
}

.core-trigger:active .reflection-wrapper {
  opacity: 0.55;
}

.ambriel-blurb {
  max-width: 600px;
  margin: 4rem auto 0;
  text-align: center;
  position: relative;
  z-index: 20; /* Keep above reflections */
}

.ambriel-blurb p {
  color: var(--fg-muted);
  font-family: var(--font-serif);
  font-size: 1.1rem;
  line-height: 1.6;
  font-style: italic;
  opacity: 0.8;
  margin-bottom: 2rem;
}

.ambriel-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.ambriel-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.ambriel-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 2.2rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  color: var(--teal);
  font-family: "SFMono-Regular", monospace;
  font-size: 0.75rem;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  border: 1px solid transparent;
}

.ambriel-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  padding: 1px;
  background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 20%, #e2e8f0 40%, #475569 60%, #f1f5f9 80%, #94a3b8 100%);
  background-size: 200% 200%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.6;
  transition: all 0.4s ease;
}

.ambriel-btn:hover {
  transform: translateY(-3px);
  background: rgba(62, 207, 207, 0.1);
  color: var(--fg);
}

.ambriel-btn:hover::before {
  opacity: 1;
  background-position: right bottom;
}


/* ─── Projects Page ─────────────────────────────────────────────── */
.project-page {
  padding-top: clamp(4rem, 7vw, 6.5rem);
  padding-bottom: clamp(4rem, 7vw, 6.5rem);
}

.project-page__header {
  max-width: 640px;
  margin-bottom: clamp(3rem, 5vw, 5rem);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 100%;
  margin: 0;
  text-align: left;
}

@media (min-width: 980px) {
  .signal-dashboard {
    grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.72fr);
    gap: clamp(1rem, 2vw, 1.5rem);
    align-items: start;
  }

  .signal-dashboard__featured {
    grid-template-columns: minmax(18rem, 0.9fr) minmax(20rem, 1.1fr);
    grid-template-areas:
      "header tv"
      "list tv";
    column-gap: clamp(1.5rem, 2.8vw, 2.5rem);
    row-gap: 1.25rem;
    align-items: start;
    align-content: start;
    padding: clamp(1.5rem, 2.8vw, 2.25rem);
    grid-column: 1;
  }

  .signal-dashboard__featured-header {
    grid-area: header;
    max-width: 26rem;
  }

  .signal-dashboard__tv {
    grid-area: tv;
    justify-self: end;
    align-self: start;
  }

  .signal-dashboard__featured-list {
    grid-area: list;
    max-width: 26rem;
  }

  .media-tv-widget.media-tv-widget--featured {
    align-self: start;
  }

  .signal-dashboard__rail {
    grid-column: 2;
    max-width: none;
  }

  .media-tv-list.media-tv-list--overlay {
    padding-top: 1.1rem;
  }
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 40px var(--card-shadow);
}

.project-card h3, .project-card h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.project-card p {
  font-size: 0.875rem;
  color: var(--fg-muted);
  line-height: 1.55;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.project-tags li {
  font-size: 0.7rem;
  background: rgba(62,207,207,0.12);
  color: var(--teal-dim);
  border-radius: 20px;
  padding: 0.2rem 0.65rem;
  letter-spacing: 0.04em;
}

/* ─── Footer ───────────────────────────────────────────────────────── */
.site-footer {
  margin-top: auto;
  padding: 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--fg-muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* ─── Lab Notes Header (Split Editorial) ────────────────────────── */
/* ─── Lab Notes Header (Split Editorial) ────────────────────────── */
/* Re-centered and aligned with the main page grid proportions */
.lab-notes-header-title-block {
  display: flex;
  flex-direction: column;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.lab-notes-header-intro-block {
  max-width: 36rem;
  padding-top: clamp(0.5rem, 2vw, 1.5rem); /* Align with title baseline */
  margin-bottom: clamp(2rem, 5vw, 4rem);
}

.lab-notes-intro {
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  line-height: 1.65;
  color: var(--fg-muted);
  margin: 0;
}

html.lab-notes-page {
  background:
    linear-gradient(180deg, var(--lab-notes-overlay-top), var(--lab-notes-overlay-bottom)),
    radial-gradient(circle at top right, var(--lab-notes-glow), transparent 26%),
    radial-gradient(circle at left 22%, var(--lab-notes-shadow), transparent 32%),
    url('../assets/workbench_blob.jpg') center/cover no-repeat fixed;
}

html.lab-notes-page body {
  background: transparent;
}

html.lab-notes-page main {
  overflow: visible;
}

.lab-notes-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 7rem) clamp(1.25rem, 5vw, 4rem);
  transition: min-height 0.8s ease;
}

.lab-notes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(3rem, 5vw, 5rem);
  align-items: start;
  width: 100%;
}

.lab-notes-main-column,
.lab-notes-side-column {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
}

.lab-notes-header-title-block {
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.lab-notes-intro {
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

/* Mobile stacking */
@media (max-width: 1024px) {
  .lab-notes-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

.lab-notes-terminal-window {
  position: relative;
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  z-index: 0;
  transition: opacity 0.6s ease, transform 0.6s ease, visibility 0.6s;
}

.lab-notes-shell.is-session-start .lab-notes-terminal-window {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(2rem);
  height: 0;
  overflow: hidden;
  /* Ensure display: contents doesn't override this on mobile */
  display: grid !important; 
}

.lab-notes-terminal-window::before {
  content: "";
  position: absolute;
  inset: 3.75rem auto auto -1.5rem;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(62, 207, 207, 0.2), transparent 70%);
  filter: blur(6px);
  pointer-events: none;
}

.lab-notes-header {
  position: relative;
  z-index: 1;
  max-width: 40rem;
}

.lab-notes-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
  font-family: "SFMono-Regular", monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  color: var(--fg-muted);
}

.lab-notes-kicker::before {
  content: "";
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: rgba(62, 207, 207, 0.85);
  box-shadow: 0 0 12px rgba(62, 207, 207, 0.55);
}

.lab-notes-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(3.5rem, 7vw, 5.5rem);
  font-weight: 400;
  line-height: 1; /* Tighter line height for alignment */
  letter-spacing: -0.04em;
  color: var(--fg);
}

.lab-notes-intro {
  margin: 0.5rem 0 0;
  max-width: 32rem; /* Keep editorial measure for readability */
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--fg-muted);
}

.lab-notes-workbench {
  position: relative;
  width: min(100%, 760px);
  max-width: none;
  margin-top: 0.35rem;
  aspect-ratio: 832 / 1248;
  isolation: isolate;
  z-index: 0;
  filter: drop-shadow(0 28px 50px rgba(6, 12, 14, 0.18));
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), filter 0.7s ease;
}

.lab-notes-frame-img {
  z-index: 1;
  transition: opacity 0.55s ease;
}

.lab-notes-window {
  position: absolute;
  z-index: 2;
  display: grid;
  align-content: start;
  gap: 0.55rem;
  color: rgba(241, 252, 252, 0.96);
  font-family: "SFMono-Regular", "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace;
  text-shadow: 0 0 10px rgba(126, 240, 255, 0.18);
  transition: opacity 0.5s ease, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.lab-notes-workbench.is-concealed {
  transform: translateY(1.5rem) scale(0.975);
  filter: drop-shadow(0 18px 28px rgba(6, 12, 14, 0.08)) saturate(75%);
}

.lab-notes-workbench.is-concealed .lab-notes-frame-img {
  opacity: 0.16;
}

.lab-notes-workbench.is-concealed .lab-notes-window {
  opacity: 0;
  transform: translateY(0.9rem);
}

/* Editorial layout overrides */
html.lab-notes-page .lab-notes-workbench {
  width: 100%;
  max-width: none; /* NO CAPS */
  aspect-ratio: auto;
  margin-top: clamp(2rem, 5vw, 4rem);
  filter: none;
}

html.lab-notes-page .lab-notes-workbench.is-concealed {
  transform: none;
  filter: none;
}

html.lab-notes-page .lab-notes-workbench.is-concealed .lab-notes-window {
  opacity: 1;
  transform: none;
}

html.lab-notes-page .lab-notes-window {
  position: relative;
  inset: auto;
  padding: 1.25rem 1.5rem;
  background: var(--lab-notes-panel-bg);
  border: 1px solid var(--lab-notes-panel-border);
  border-radius: 16px;
  text-shadow: none;
  font-family: var(--font-sans);
  color: var(--lab-notes-panel-text);
}

html.lab-notes-page .lab-notes-window + .lab-notes-window {
  margin-top: 2rem;
}

html.lab-notes-page .lab-notes-window-void,
html.lab-notes-page .lab-notes-window-therl,
html.lab-notes-page .lab-notes-window-signal,
html.lab-notes-page .lab-notes-window-entropy {
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
}

html.lab-notes-page .lab-notes-chip {
  border-color: var(--lab-notes-chip-border);
  color: var(--lab-notes-chip-text);
  background: var(--lab-notes-chip-bg);
}

html.lab-notes-page .lab-notes-date,
html.lab-notes-page .screen-post-date {
  color: var(--lab-notes-date-color);
}

html.lab-notes-page .lab-notes-window-copy {
  color: var(--lab-notes-panel-muted);
}

html.lab-notes-page .lab-notes-feature-link,
html.lab-notes-page .lab-notes-mini-link,
html.lab-notes-page .lab-notes-archive-link,
html.lab-notes-page .lab-notes-status-list {
  color: var(--lab-notes-panel-text);
}

.lab-notes-window-void {
  top: 9.9%;
  left: 11.3%;
  right: 31.4%;
  bottom: 67%;
  padding: 3.8rem 1rem 1rem;
}

.lab-notes-window-therl {
  top: 42.6%;
  left: 12.8%;
  right: 53.4%;
  bottom: 39.7%;
  padding: 1rem;
}

.lab-notes-window-signal {
  top: 61.7%;
  left: 51.1%;
  right: 22.8%;
  bottom: 24.9%;
  padding: 0.8rem 0.85rem;
}

.lab-notes-window-entropy {
  top: 78.9%;
  left: 30.6%;
  right: 25.9%;
  bottom: 10.8%;
  padding: 0.8rem 0.9rem;
}

.lab-notes-chip {
  display: inline-flex;
  width: fit-content;
  padding: 0.2rem 0.45rem;
  border: 1px solid rgba(126, 240, 255, 0.24);
  border-radius: 999px;
  color: rgba(126, 240, 255, 0.9);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  background: rgba(0, 0, 0, 0.18);
}

.lab-notes-feature-link {
  color: #f7ffff;
  text-decoration: none;
  font-size: clamp(1rem, 1.9vw, 1.5rem);
  line-height: 1.2;
  font-weight: 700;
}

.lab-notes-feature-link:hover,
.lab-notes-mini-link:hover,
.lab-notes-archive-link:hover {
  color: var(--teal);
}

.lab-notes-window-copy {
  margin: 0;
  color: rgba(241, 252, 252, 0.72);
  font-size: clamp(0.68rem, 1vw, 0.85rem);
  line-height: 1.55;
}

.lab-notes-mini-link,
.lab-notes-archive-link {
  color: #f7ffff;
  text-decoration: none;
  font-size: clamp(0.72rem, 1vw, 0.92rem);
  line-height: 1.35;
}

.lab-notes-status-list,
.lab-notes-archive-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
}

.lab-notes-status-list {
  font-size: clamp(0.62rem, 0.9vw, 0.78rem);
  line-height: 1.35;
  color: rgba(241, 252, 252, 0.76);
}

.lab-notes-date,
.screen-post-date {
  display: inline-flex;
  margin: 0;
  font-family: "SFMono-Regular", monospace;
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(126, 240, 255, 0.88);
}

.lab-notes-tools-column {
  position: relative;
  padding-top: clamp(8rem, 14vw, 11rem);
  padding-right: clamp(1rem, 4vw, 3.5rem);
  z-index: 10;
  transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lab-notes-shell.is-session-start .lab-notes-tools-column {
  padding-top: 0;
  padding-right: 0;
  width: 100%; /* Take full width to allow centering child */
  margin: 0 auto;
  transform: none; /* Scale is handled by child */
}

html.lab-notes-page .tools-panel.lab-notes-tools-panel {
  position: relative;
  top: 0;
  right: auto;
  width: min(100%, 250px); /* Slightly tighter base to match trigger calc */
  margin-left: auto;
  z-index: 0;
  transition: margin 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), width 0.8s ease;
}

.lab-notes-shell.is-session-start .tools-panel.lab-notes-tools-panel {
  margin: 0 auto;
  width: clamp(280px, 25vw, 360px); /* Slightly larger width for centered view */
  transform: none; /* Removed scale as it interferes with coordinate calculation */
}

html.lab-notes-page .tools-panel.lab-notes-tools-panel .tools-trigger {
  width: calc(100% * var(--tools-image-scale));
  position: relative;
  left: 50%;
  transform: translateX(-50%) !important;
  margin-bottom: -52%;
  margin-left: 0;
  display: flex;
  justify-content: center;
}

html.lab-notes-page .tools-panel.lab-notes-tools-panel .tools-image,
html.lab-notes-page .tools-panel.lab-notes-tools-panel .blob-mesh-canvas {
  width: 100%;
  max-width: none;
  margin-left: 0;
  -webkit-mask-image: none;
  mask-image: none;
  -webkit-mask: none;
  mask: none;
}

html.lab-notes-page .tools-panel.lab-notes-tools-panel .drawer-expansion-wrapper {
  width: calc(100% * var(--tools-image-scale));
  position: relative;
  left: 50%;
  transform: translateX(-50%) !important;
  margin-left: 0 !important;
  display: flex;
  flex-direction: column;
}


html.lab-notes-page .tools-panel.lab-notes-tools-panel .tools-drawer {
  position: relative; /* In-flow on Lab Notes — column grows with drawer */
  top: auto;
  left: auto;
  width: 100%;
  margin-top: -10%; /* -22% + 12% down = -10% */
  margin-left: auto;
  margin-right: auto;
  max-height: none;
  transform: none;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

html.lab-notes-page .tools-panel.lab-notes-tools-panel .tools-drawer.is-open {
  grid-template-rows: 1fr;
  transform: none;
}

.lab-notes-tools-copy {
  margin: -0.25rem 0 1rem;
  font-size: 0.84rem;
  line-height: 1.55;
  color: rgba(232, 245, 245, 0.72);
}

/* ─── List Pages ────────────────────────────────────────────────────── */
.list-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

@media (max-width: 420px) {
  .intro {
    display: none !important;
  }

  .container,
  .post-layout,
  .list-page,
  .field-photos-header,
  .selected-work-header {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  /* Center alignment requested for evidence and field captures on mobile */
  .evidence-gadget,
  .field-photos-header {
    text-align: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .home-hero-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .home-hero-blob {
    align-items: stretch;
  }

  .site-nav {
    padding-top: max(env(safe-area-inset-top), 0.35rem);
  }

  .nav-inner {
    gap: 0.4rem;
    padding-top: 0.45rem;
    padding-bottom: 0.35rem;
  }

  .nav-logo-icon {
    height: 38px;
  }

  .nav-menu-toggle {
    padding: 0.3rem 0.65rem;
    gap: 0.45rem;
    font-size: 0.66rem;
  }

  .nav-links {
    gap: 0.05rem;
  }

  .nav-links li a {
    font-size: 0.9rem;
    padding: 0.22rem 0;
  }

  .theme-toggle {
    min-width: 6.5rem;
    padding: 0.22rem 0.75rem;
    font-size: 0.76rem;
  }

  .list-page {
    padding: 1.5rem 1rem 2.75rem;
  }

  .list-header {
    margin-bottom: 1.5rem;
  }

  .list-title,
  .page-title {
    font-size: clamp(2.2rem, 15vw, 3rem);
  }

  .section-eyebrow {
    margin-bottom: 0.35rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .projects-grid > * {
    min-width: 0;
    width: 100%;
  }

  .project-card {
    min-width: 0;
    padding: 1.25rem;
  }

  .ambriel-network-section {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  /* Make photo cards take up more width on small screens for single display */
  .photo-strip {
    scroll-snap-type: x mandatory !important;
  }

  .photo-strip-track {
    gap: 0 !important;
    padding: 1rem 0 2rem !important;
  }

  .photo-card {
    width: 100vw !important;
    max-width: none !important;
    padding: 0 1.25rem !important;
    scroll-snap-align: center !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 980px) {
  .lab-notes-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .home-about-media {
    order: -1;
  }

  .lab-notes-terminal-window {
    /* Removed display: contents as it breaks hiding logic */
    display: grid;
    gap: 1.5rem;
  }

  .lab-notes-header {
    order: 1;
  }

  .lab-notes-tools-column {
    order: 2;
    padding-top: 0.5rem;
    margin-bottom: 1rem;
  }

  .lab-notes-workbench {
    order: 3;
  }

  html.lab-notes-page .tools-panel.lab-notes-tools-panel {
    position: relative;
    top: 0;
    width: min(100%, 340px);
    margin: 0 auto;
    flex-direction: column;
  }
}

@media (max-width: 800px) {
  html.lab-notes-page {
    --tools-image-scale: 1.2;
  }

  .lab-notes-tools-column {
    padding-top: 1rem;
    display: flex;
    justify-content: center;
  }

  html.lab-notes-page .tools-panel.lab-notes-tools-panel {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
    margin: 0 auto;
    width: min(100%, 220px);
  }

  html.lab-notes-page .tools-panel.lab-notes-tools-panel .tools-trigger {
    width: calc(100% * var(--tools-image-scale));
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: -52%;
    margin-left: 0;
    filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.24));
  }

  html.lab-notes-page .tools-panel.lab-notes-tools-panel .tools-image,
  html.lab-notes-page .tools-panel.lab-notes-tools-panel .blob-mesh-canvas {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-top: 0;
  }

  html.lab-notes-page .tools-panel.lab-notes-tools-panel .drawer-expansion-wrapper {
    width: calc(100% * var(--tools-image-scale));
    max-width: none;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    margin-left: 0;
    margin-top: 0;
  }

  html.lab-notes-page .tools-panel.lab-notes-tools-panel .tools-drawer,
  html.lab-notes-page .tools-panel.lab-notes-tools-panel .tools-drawer.is-open {
    width: 100%;
    position: relative;
    top: 0;
    left: 0;
    margin-top: 16%;
    margin-bottom: 0;
    transform: none;
  }

  html.lab-notes-page .tools-panel.lab-notes-tools-panel .tools-drawer.is-open {
    margin-top: 18%;
  }
}

@media (max-width: 720px) {
  .lab-notes-shell {
    padding-inline: 1rem;
  }

  .lab-notes-tools-column {
    padding-top: 0.75rem;
  }

  html.lab-notes-page .tools-panel.lab-notes-tools-panel {
    width: min(100%, 200px);
  }

  .lab-notes-header-split {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: start;
  }

  .lab-notes-title {
    font-size: clamp(2.6rem, 15vw, 4rem);
  }

  .lab-notes-workbench {
    width: min(100%, 620px);
  }

  .lab-notes-window-void {
    padding-top: 3rem;
  }

  .lab-notes-chip {
    font-size: 0.52rem;
  }

  .lab-notes-window-copy,
  .lab-notes-mini-link,
  .lab-notes-archive-link,
  .lab-notes-status-list {
    font-size: 0.62rem;
  }
}

.list-header { margin-bottom: 3rem; }
.list-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 400;
  margin: 0.25rem 0 0.75rem;
}

.list-desc { color: var(--fg-muted); font-size: 0.925rem; }



.post-list { display: flex; flex-direction: column; gap: 0; }

.post-list-item {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 1rem;
  align-items: baseline;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.post-list-date {
  font-size: 0.8rem;
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
}

.post-list-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 400;
}

.post-list-title:hover { color: var(--teal); opacity: 1; }

/* ─── Post Layout ───────────────────────────────────────────────────── */
.post-layout {
  max-width: 680px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.post-section {
  font-size: 0.7rem;
  color: var(--teal);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.post-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.post-date {
  display: block;
  font-size: 0.8rem;
  color: var(--fg-muted);
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
}

.post-body {
  font-size: 1.05rem;
  line-height: 1.8;
}

.post-body h2 { font-family: var(--font-serif); font-size: 1.75rem; font-weight: 400; margin: 2.5rem 0 0.75rem; }
.post-body h3 { font-family: var(--font-serif); font-size: 1.35rem; font-weight: 500; margin: 2rem 0 0.5rem; }
.post-body p { margin-bottom: 1.4rem; }
.post-body a { color: var(--teal-dim); text-decoration: underline; text-underline-offset: 3px; }
.post-body a:hover { opacity: 1; color: var(--teal); }
.post-body code { font-size: 0.875em; background: var(--code-inline-bg); border-radius: 4px; padding: 0.15em 0.4em; }
.post-body pre { background: var(--code-block-bg); border-radius: 10px; padding: 1.5rem; overflow-x: auto; margin: 1.5rem 0; }

/* ─── CUBE CSS Composition Layers ───────────────────────────────────── */
/* [COMPOSITION] Sidebar Layout: Handles the two-column grid consistency */
.sidebar-layout__inner {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}

.sidebar-layout__main {
  flex-basis: 0;
  flex-grow: 999;
  min-width: min(100%, 640px);
}

.sidebar-layout__sidebar {
  flex-basis: 260px;
  flex-grow: 1;
}

/* [COMPOSITION] Three Column Layout: Glass Dashboard Panel */
.glass-dashboard-panel {
  position: relative;
  background: var(--glass-dashboard-bg);
  border: 1px solid var(--glass-dashboard-border);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: clamp(2rem, 5vw, 4rem);
  backdrop-filter: blur(20px) saturate(120%);
  box-shadow: 
    var(--glass-dashboard-shadow), 
    var(--glass-dashboard-inset);
  overflow: hidden;
}

.glass-dashboard-panel::before {
  content: '';
  position: absolute;
  inset: -10%;
  background-image: url('/assets/static.JPG');
  background-size: 130%;
  background-position: center;
  opacity: 0.08;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
  animation: staticDrift 18s ease-in-out infinite;
  will-change: background-position, opacity;
}

@keyframes staticDrift {
  0%   { background-position: 20% 30%; opacity: 0.06; }
  25%  { background-position: 60% 20%; opacity: 0.10; }
  50%  { background-position: 80% 70%; opacity: 0.07; }
  75%  { background-position: 30% 80%; opacity: 0.11; }
  100% { background-position: 20% 30%; opacity: 0.06; }
}

.glass-dashboard-panel > * {
  position: relative;
  z-index: 1;
}

.three-col-layout__inner {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: stretch;
}

.three-col-layout__col {
  flex-basis: 0;
  flex-grow: 1;
  min-width: min(100%, 300px);
  padding-right: clamp(1.5rem, 4vw, 4rem);
  position: relative;
}

.three-col-layout__col:not(:last-of-type)::after {
  content: '';
  position: absolute;
  top: 5%;
  bottom: 5%;
  right: 0;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(56, 209, 216, 0.15) 20%,
    rgba(56, 209, 216, 0.15) 80%,
    transparent 100%
  );
  box-shadow: 0 0 10px rgba(56, 209, 216, 0.2);
}

.three-col-layout__sidebar {
  flex-basis: 260px;
  flex-grow: 1;
  max-width: min(100%, 360px);
  padding-left: clamp(1rem, 2vw, 2rem);
}

.hud-item {
  padding: 0.5rem 0;
  transition: transform 0.3s ease;
}

.hud-item:hover {
  transform: translateX(5px);
}

.hud-item h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: var(--fg);
}

.hud-item p {
  color: var(--fg-muted);
  font-size: 0.95rem;
  margin-bottom: 0;
}

.media-tv-widget {
  margin: 0;
}

.media-tv-toggle {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 0.95rem;
  list-style: none;
  cursor: pointer;
}

.media-tv-toggle::-webkit-details-marker {
  display: none;
}

.media-tv-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  filter: contrast(1.05) brightness(0.9) saturate(0.85);
  transition: transform 0.25s ease, filter 0.25s ease;
}

.media-tv-image:hover {
  filter: contrast(1.1) brightness(1) saturate(1);
}

.media-tv-copy p {
  font-size: 0.82rem;
}

.media-tv-widget[open] .media-tv-image,
.media-tv-toggle:hover .media-tv-image {
  transform: translateY(-2px);
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.28));
}

.media-tv-list {
  margin: 0.95rem 0 0 0;
  padding: 0.9rem 0 0 1.1rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--fg-muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.media-tv-list li + li {
  margin-top: 0.35rem;
}

@media (max-width: 900px) {
  .three-col-layout__col {
    padding-right: 0;
    padding-bottom: 2rem;
    border-right: none;
  }
  .three-col-layout__col:not(:last-of-type)::after {
    top: auto;
    bottom: 0;
    left: 10%;
    right: 10%;
    width: auto;
    height: 1px;
    background: linear-gradient(
      to right,
      transparent 0%,
      rgba(62, 207, 207, 0.2) 20%,
      rgba(62, 207, 207, 0.2) 80%,
      transparent 100%
    );
  }
  .three-col-layout__sidebar {
    padding-left: 0;
  }

  .media-tv-toggle {
    grid-template-columns: 78px minmax(0, 1fr);
  }
}

/* [COMPOSITION] Tools Bench: Handles centering and stacking logic */
.tools-bench-composition {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Math-based centering via calc() */
}

.tools-bench-composition > * {
  flex-shrink: 0;
}

/* [BLOCK] Specific Lab Notes overrides */
.lab-notes-page-shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1.25rem, 3vw, 2.5rem) clamp(4rem, 8vw, 6rem);
}

/* ─── Floating Tools Drawer System (Premium Overhaul) ──────────────── */
.tools-panel {
  position: fixed;
  top: max(6rem, 10vh);
  right: clamp(1rem, 3vw, 2.5rem);
  width: clamp(200px, 18vw, 260px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  pointer-events: none;
}

/* Lab Notes page: override fixed panel, fill the 50% grid column */
.lab-notes-page .tools-panel {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  width: 100% !important;
  max-width: none !important;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

/* Make the gadget fill the full column width */
.lab-notes-page .tools-trigger {
  width: 100% !important;
  max-width: none !important;
  transform: none !important; /* No scale hacks — real layout dimensions */
}

.lab-notes-page #tools-wrapper {
  width: 100% !important;
}

.lab-notes-page .tools-image {
  width: 100% !important;
  height: auto !important;
  max-width: none !important;
}

/* The Trigger Graphic (base — other pages) */
.tools-trigger {
  position: relative;
  width: 128%;
  pointer-events: none;
  z-index: 102;
  filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.5));
}

.tools-image {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.4s ease;
}

/* ─── Blob Mesh System for Tools ─── */
#tools-wrapper {
  display: block;
  position: relative;
  perspective: 1000px;
  transform-style: preserve-3d;
  transform-origin: center center;
  will-change: transform;
  touch-action: pan-y;
  --shadow-x: 0px;
  --shadow-y: 10px;
  --shadow-soft: 40px;
}




.blob-mesh-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.4s ease;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

#tools-wrapper.is-live .blob-mesh-canvas {
  opacity: 1;
}

#tools-wrapper.is-live .blob-image-fallback {
  opacity: 0;
}



/* Interactive Virtual Button Overlays */
.tools-btn-overlay {
  position: absolute;
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  pointer-events: auto; /* Re-enable clicks just for the button */
  z-index: 103;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-cyan-circle {
  top: 64.9%;
  left: 21%;
  width: 18%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
}

.btn-core-ripple {
  top: 49.6%;
  left: 49.7%;
  width: 40.5%;
  aspect-ratio: 1.08;
  transform: translate(-50%, -50%);
  border-radius: 13%;
  overflow: hidden;
  isolation: isolate;
}

.btn-core-ripple::before,
.btn-core-ripple::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: inherit;
}

.btn-core-ripple::before {
  inset: -8%;
  background: radial-gradient(circle at 50% 52%, rgba(165, 255, 244, 0) 0 16%, rgba(165, 255, 244, 0.24) 20%, rgba(165, 255, 244, 0) 29%, rgba(165, 255, 244, 0.16) 35%, rgba(165, 255, 244, 0) 45%, rgba(165, 255, 244, 0.1) 53%, rgba(165, 255, 244, 0) 62%);
  opacity: 0.72;
  mix-blend-mode: screen;
  animation: toolsCoreRipple 3.8s ease-in-out infinite;
}

.btn-core-ripple::after {
  inset: 0;
  background: linear-gradient(118deg, transparent 28%, rgba(255, 255, 255, 0.08) 42%, rgba(193, 255, 250, 0.3) 50%, rgba(255, 255, 255, 0.08) 58%, transparent 72%);
  background-size: 220% 100%;
  opacity: 0.26;
  mix-blend-mode: screen;
  animation: none;
}

.btn-core-ripple .inner-ring,
.btn-core-ripple .outer-ring,
.btn-core-ripple .btn-glass {
  border-radius: 13%;
}

.btn-core-ripple .inner-ring {
  top: 3%;
  right: 3%;
  bottom: 3%;
  left: 3%;
  border-width: 1px;
  border-color: rgba(126, 240, 255, 0.26);
  box-shadow: inset 0 0 18px rgba(126, 240, 255, 0.16), 0 0 16px rgba(126, 240, 255, 0.08);
}

.btn-core-ripple .outer-ring {
  top: 11%;
  right: 11%;
  bottom: 11%;
  left: 11%;
  opacity: 0.48;
  transform: none;
  border-width: 1px;
  border-color: rgba(126, 240, 255, 0.22);
  box-shadow: inset 0 0 14px rgba(126, 240, 255, 0.14), 0 0 12px rgba(126, 240, 255, 0.08);
  animation: toolsCoreRipple 3.8s ease-in-out infinite reverse;
}

.btn-core-ripple .btn-glass {
  opacity: 1;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background:
    radial-gradient(ellipse at 50% 48%, rgba(126, 240, 255, 0.28) 0%, rgba(126, 240, 255, 0.12) 24%, rgba(126, 240, 255, 0) 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03) 38%, rgba(0, 0, 0, 0.05) 100%);
  backdrop-filter: blur(1.8px);
  -webkit-backdrop-filter: blur(1.8px);
}

.tools-trigger.has-terminal-revealed .btn-core-ripple {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(1.04);
}

@keyframes toolsCoreRipple {
  0%,
  100% {
    transform: scale(0.94);
    opacity: 0.22;
  }
  50% {
    transform: scale(1.03);
    opacity: 0.62;
  }
}

.btn-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(62, 207, 207, 0.4);
  top: 0; right: 0; bottom: 0; left: 0;
  transition: all 0.4s ease;
  pointer-events: none;
}

.outer-ring {
  transform: scale(1.1);
  opacity: 0;
  box-shadow: 0 0 10px rgba(62, 207, 207, 0.2);
}

.inner-ring {
  border: 2px solid rgba(62, 207, 207, 0.1);
  box-shadow: inset 0 0 15px rgba(62, 207, 207, 0.3);
}

.btn-glass {
  position: absolute;
  top: 10%; right: 10%; bottom: 10%; left: 10%;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(62, 207, 207, 0.2) 0%, transparent 70%);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

/* Animations within the tools */
.tools-btn-overlay:hover .outer-ring {
  transform: scale(1.2);
  opacity: 1;
  animation: toolsSlowSpin 4s linear infinite;
  border-color: rgba(62, 207, 207, 0.8);
}

.tools-btn-overlay:hover .inner-ring {
  border-color: rgba(62, 207, 207, 0.8);
  box-shadow: inset 0 0 20px rgba(62, 207, 207, 0.6), 0 0 15px rgba(62, 207, 207, 0.4);
}

.tools-btn-overlay:hover .btn-glass {
  opacity: 1;
}

.btn-core-ripple:hover .outer-ring {
  transform: none;
  opacity: 0.72;
  animation: toolsCoreRipple 1.9s ease-in-out infinite;
  border-color: rgba(126, 240, 255, 0.4);
}

.btn-core-ripple:hover .inner-ring {
  border-color: rgba(126, 240, 255, 0.5);
  box-shadow: inset 0 0 22px rgba(126, 240, 255, 0.24), 0 0 18px rgba(126, 240, 255, 0.12);
}

.tools-btn-overlay:active,
.tools-btn-overlay.is-active {
  transform: translate(-50%, -50%) scale(0.85);
}
.tools-btn-overlay.is-active .outer-ring {
  transform: scale(1.4);
  opacity: 0;
  transition: all 0.5s ease-out;
}
.tools-btn-overlay.is-active .btn-glass {
  background: rgba(62, 207, 207, 0.5);
  box-shadow: 0 0 30px rgba(62, 207, 207, 0.9);
}

@keyframes toolsSlowSpin {
  from { transform: scale(1.2) rotate(0deg); }
  to { transform: scale(1.2) rotate(360deg); }
}

@keyframes hudPulse {
  0% { opacity: 0.4; box-shadow: 0 0 4px var(--teal); }
  100% { opacity: 1; box-shadow: 0 0 12px var(--teal); }
}

/* The Drawer Wrapper */
.tools-drawer {
  position: absolute; /* Detach from flow for precise alignment */
  top: 78%; /* Moved up 10% from 88% to balance text visibility and overlap */
  left: 0;
  width: 100%;
  background: transparent;
  padding: 0;
  box-shadow: none;
  pointer-events: auto;
  z-index: 90; /* Sent behind the tool bench (which is 100) */
  display: grid;
  grid-template-rows: 0fr;
  transform: translateY(-8%); /* Physical slide offset */
  transition: grid-template-rows 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-expansion-wrapper {
  overflow: hidden;
  min-height: 0;
  position: relative;
  width: 119.15%; /* Scale up to match tool bench width */
  margin-left: -9.88%; /* Re-center after scale up */
}

.tools-drawer::-webkit-scrollbar {
  display: none;
}

.tools-drawer.is-open {
  grid-template-rows: 1fr;
  transform: translateY(0); /* Drop into place */
  /* margin-top removed; using absolute positioning */
}

.tools-drawer-frame {
  width: 100%;
  height: auto; /* Maintains natural 3D aspect ratio, no stretching! */
  display: block;
  position: relative;
  z-index: 1;
}

/* The Clean Text Overlay Mapped to Image Coordinates */
.tools-drawer-inner {
  display: block;
  position: absolute;
  top: 18%; /* Expanded up to match red box */
  bottom: 30%; /* Trimmed up to avoid the bottom bevels */
  left: 26%; /* Left edge is perfect */
  right: 23%; /* Extended slightly to the right to hit the right cyan line */
  z-index: 2;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35); /* Subtle dark wash for legibility */
  backdrop-filter: blur(1px); /* Reduced blur as requested */
  -webkit-backdrop-filter: blur(1px);
  clip-path: polygon(
    15px 0, calc(100% - 15px) 0, 100% 15px, 
    100% calc(100% - 15px), calc(100% - 15px) 100%, 
    15px 100%, 0 calc(100% - 15px), 0 15px
  ); /* Beveled edges to match the cyan screen */
}

/* The Scrolling Text Area */
.drawer-content-wrapper {
  background: transparent; /* Text floats cleanly over the image screen */
  padding: 1rem; 
  position: relative;
  height: 100%;
  overflow-y: auto; /* Allow text to scroll if it exceeds physical screen height */
  scrollbar-width: none; /* Hide scrollbar */
}

.drawer-content-wrapper > * {
  position: relative;
  z-index: 2; /* Keep text above HUD */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), 0 0 10px rgba(0, 0, 0, 0.6); /* Heavy shadow to pop off background */
}

/* Removed HUD lines */

.tools-drawer-title {
  font-family: "SFMono-Regular", monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--teal);
  margin: 0 0 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed rgba(62, 207, 207, 0.25);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.4s ease 0.2s;
}

.tools-drawer-title::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  background: var(--teal);
  border-radius: 1px;
  animation: hudPulse 1.5s infinite alternate;
}

.lab-notes-tools-copy {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.5;
  margin: 0 0 1.5rem 0; /* Space before tools list */
}

.tools-drawer.is-open .tools-drawer-title {
  opacity: 1;
  transform: translateY(0);
}

.tools-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tools-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
  transition-delay: calc(0.1s + (var(--stagger) * 0.05s));
}

.tools-drawer.is-open .tools-item {
  opacity: 1;
  transform: translateY(0);
}

.tool-cat {
  font-family: "SFMono-Regular", monospace;
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(62, 207, 207, 0.7);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tool-cat::before {
  content: '';
  display: inline-block;
  width: 4px; height: 4px;
  background: var(--teal);
  border-radius: 50%;
  box-shadow: 0 0 5px var(--teal);
}

.tool-name {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 0 8px rgba(62, 207, 207, 0.3);
  line-height: 1.3;
  padding-left: 0.7rem;
}

@media (max-width: 1024px) {
  .tools-panel {
    top: max(5rem, 8vh);
    right: clamp(1rem, 2vw, 2rem);
  }
}

@media (max-width: 800px) {
  .tools-panel {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    width: min(100%, 240px);
    max-width: calc(100vw - 2rem);
    margin: 0 auto;
    overflow-x: clip;
    flex-direction: column;
    pointer-events: auto;
  }
  .tools-trigger {
    width: 100%;
  }
  .tools-drawer {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    margin-top: -28%;
    margin-bottom: 0;
    transform: none;
    max-height: none;
  }
  .tools-drawer.is-open {
    margin-top: -26%;
    margin-bottom: 0;
    transform: none;
  }
  .drawer-expansion-wrapper {
    width: 100%;
    margin-left: 0;
  }
}
.post-body pre code { background: none; padding: 0; font-size: 0.875rem; color: var(--code-block-fg); }
.post-body blockquote { border-left: 3px solid var(--teal); padding-left: 1.25rem; color: var(--fg-muted); font-style: italic; margin: 1.5rem 0; }

/* ─── CV / Info Page ────────────────────────────────────────────────── */
:root {
  --timeline-left: 200px;
}

@media (max-width: 768px) {
  :root {
    --timeline-left: 0px;
  }
}

.cv-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

.cv-header {
  margin-bottom: 4rem;
  max-width: 600px;
}

.cv-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 300;
  line-height: 1;
  margin: 0 0 1.5rem 0;
  letter-spacing: -0.02em;
}

.cv-subtitle {
  font-size: 1.2rem;
  color: var(--fg-muted);
  line-height: 1.6;
  margin-bottom: 2.5rem;
  font-weight: 400;
}

.cv-contact {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.cv-contact a {
  color: var(--teal-dim);
  text-decoration: none;
  transition: color 0.2s;
}

.cv-contact a:hover {
  color: var(--teal);
}

.cv-log {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  position: relative;
}

.cv-timeline-origin {
  position: absolute;
  left: var(--timeline-left);
  top: 0;
  width: 24px;
  height: 24px;
  transform: translateX(calc(1rem - 11px));
  background: url('../assets/xsp_bug.png') center/contain no-repeat;
  filter: var(--logo-filter);
  opacity: 0.8;
  z-index: 10;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.cv-episode {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  align-items: baseline;
  position: relative;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.cv-log:hover .cv-episode:not(:hover) {
  opacity: 0.35;
}

.cv-episode::before {
  content: '';
  position: absolute;
  left: var(--timeline-left);
  top: 1rem;
  bottom: -3.5rem;
  width: 2px;
  background: var(--border-subtle);
  transform: translateX(1rem);
  opacity: 0.3;
}

.cv-episode:last-child::before,
.cv-credentials-section::before {
  display: none;
}

.cv-episode:nth-last-child(2)::before {
  background: linear-gradient(to bottom, var(--border-subtle), transparent);
}

.cv-global-glow {
  position: absolute;
  left: var(--timeline-left);
  width: 2px;
  background: linear-gradient(to bottom, #ffffff 0%, #a8a8a8 20%, #efefef 40%, #7a7a7a 60%, #d4d4d4 80%, #ffffff 100%);
  transform: translateX(1rem);
  transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 1;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

.cv-episode::after {
  content: '';
  position: absolute;
  left: var(--timeline-left);
  top: 1.05rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border-subtle);
  transform: translateX(calc(1rem - 2px));
  opacity: 0.3;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.cv-credentials-section::after {
  display: none;
}

.cv-episode:hover::after {
  background: var(--teal);
  box-shadow: 0 0 10px var(--teal);
  transform: translateX(calc(1rem - 2px)) scale(1.6);
  opacity: 1;
}

.cv-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--fg-muted);
  letter-spacing: 0.05em;
  padding-top: 0.6rem;
  text-align: right;
  transition: color 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.cv-episode:hover .cv-meta {
  color: var(--teal-dim);
}

.cv-role {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1.2;
  margin: 0 0 0.5rem 0;
  color: var(--fg);
  transition: color 0.6s cubic-bezier(0.16, 1, 0.3, 1), text-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.cv-credentials-section .cv-role {
  color: var(--fg-muted);
}

.cv-credentials-section:hover .cv-role {
  color: var(--fg);
}

.cv-episode:hover .cv-role {
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.cv-org {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--teal-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 1.5rem 0;
}

.cv-desc {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--fg-muted);
  margin-bottom: 1.5rem;
  max-width: 600px;
}

.cv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--fg-muted);
}

.cv-tags span {
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: color-mix(in srgb, var(--bg) 95%, var(--fg));
  transition: all 0.3s ease;
}

[data-theme="dark"] .cv-tags span {
  background: rgba(0, 0, 0, 0.2);
}

.cv-episode:hover .cv-tags span {
  border-color: rgba(62, 207, 207, 0.2);
}

.cv-tags span:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: rgba(62, 207, 207, 0.05);
  box-shadow: 0 0 12px rgba(62, 207, 207, 0.15);
}

.cv-credentials-section {
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: -1rem; /* Pull up slightly closer to the last entry */
}

.cv-credentials {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cv-credential-title {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.cv-credential-org {
  margin-bottom: 0;
  opacity: 0.8;
}

@media (max-width: 768px) {
  .cv-log {
    gap: 2.5rem;
  }
  .cv-episode {
    grid-template-columns: 1fr;
    gap: 0.25rem;
    padding-left: 3rem;
  }
  .cv-meta {
    padding-top: 0;
    text-align: left;
    margin-bottom: 0.25rem;
  }
}

.hidden { display: none; }

/* ─── Projects Full ────────────────────────────────────────────────── */
html.projects-page .list-page {
  padding-top: clamp(2.25rem, 5vw, 3rem);
}

html.projects-page .list-header {
  margin-bottom: clamp(1.25rem, 3vw, 1.85rem);
}

.projects-grid--full { text-align: left; }

html.projects-page .music-work-section {
  position: relative;
  margin: clamp(3rem, 5vw, 5rem) auto 0;
  max-width: 100%;
}

html.projects-page .music-work-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 3vw, 2.75rem);
  align-items: center;
  padding: clamp(1.4rem, 3vw, 2.25rem);
  border: 1px solid color-mix(in srgb, var(--card-border) 92%, transparent);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 24%),
    color-mix(in srgb, var(--bg-elevated) 84%, transparent);
  box-shadow: 0 14px 34px color-mix(in srgb, var(--card-shadow) 72%, transparent);
  overflow: hidden;
}

html.projects-page .music-work-card::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(var(--teal-rgb, 62, 207, 207), 0.05), transparent 38%);
  opacity: 0.7;
  pointer-events: none;
}

html.projects-page .music-work-card::after {
  content: none;
}

html.projects-page .music-work-card--reverse {
  grid-template-columns: 1fr;
}

html.projects-page .music-work-visual,
html.projects-page .music-work-copy {
  position: relative;
  z-index: 1;
}

html.projects-page .music-work-visual {
  min-height: 300px;
  border-radius: 20px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html.projects-page .music-work-visual--photo {
  min-height: clamp(360px, 46vw, 470px);
  background:
    radial-gradient(circle at 18% 18%, rgba(var(--teal-rgb, 62, 207, 207), 0.18), transparent 34%),
    linear-gradient(160deg, rgba(16, 18, 22, 0.96), rgba(34, 36, 42, 0.82));
}

html.projects-page .music-work-visual--photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 10, 14, 0.16), rgba(8, 10, 14, 0.52)),
    radial-gradient(circle at 18% 18%, rgba(var(--teal-rgb, 62, 207, 207), 0.08), transparent 38%);
  z-index: 0;
}

html.projects-page .music-work-photo-frame {
  position: absolute;
  left: 3.5%;
  right: 3.5%;
  top: clamp(0.9rem, 2.2vw, 1.35rem);
  aspect-ratio: 1.519 / 1;
  overflow: hidden;
  z-index: 1;
}

html.projects-page .music-work-photo-chrome {
  position: absolute;
  top: 0;
  left: -2.1%;
  width: 103.4%;
  height: auto;
  transform: translateY(-28.3%);
  opacity: 0.98;
  pointer-events: none;
  z-index: 3;
}

html.projects-page .music-work-photo-mosaic {
  position: absolute;
  inset: 8.9% 4.4% 8.9% 4.4%;
  z-index: 2;
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 4.2%;
}

html.projects-page .music-work-photo-row {
  display: grid;
  gap: 2.8%;
  min-width: 0;
}

html.projects-page .music-work-photo-row--top,
html.projects-page .music-work-photo-row--middle {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

html.projects-page .music-work-photo-row--bottom {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-inline: 13.9%;
}

html.projects-page .music-work-mosaic-item {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 18%;
  border: 0;
  background: #0a0a0f;
  box-shadow: none;
}

html.projects-page .music-work-mosaic-item--empty {
  background:
    radial-gradient(circle at 50% 40%, rgba(var(--teal-rgb, 62, 207, 207), 0.08), transparent 52%),
    linear-gradient(180deg, rgba(7, 10, 13, 0.96), rgba(5, 7, 9, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.04);
}

html.projects-page .music-work-mosaic-item--empty::before {
  opacity: 0.35;
}

html.projects-page .music-work-mosaic-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(30, 90, 70, 0.35) 0%,
    rgba(20, 60, 50, 0.25) 40%,
    rgba(10, 40, 35, 0.4) 100%
  );
  mix-blend-mode: color;
  z-index: 1;
  pointer-events: none;
}

html.projects-page .music-work-mosaic-item img {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.6) contrast(1.15) brightness(0.85) sepia(0.35) hue-rotate(95deg);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), filter 0.4s ease;
}

html.projects-page .music-work-card:hover .music-work-mosaic-item img {
  transform: scale(1.04);
  filter: saturate(0.75) contrast(1.2) brightness(0.9) sepia(0.25) hue-rotate(95deg);
}

html.projects-page .music-work-visual--vocals {
  background:
    radial-gradient(circle at 50% 35%, rgba(var(--teal-rgb, 62, 207, 207), 0.12), transparent 30%),
    linear-gradient(180deg, rgba(18, 22, 28, 0.98), rgba(9, 12, 16, 0.92));
}

html.projects-page .music-work-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

html.projects-page .music-work-visual--vocals::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 9, 12, 0.14), rgba(7, 9, 12, 0.5)),
    radial-gradient(circle at 50% 35%, rgba(var(--teal-rgb, 62, 207, 207), 0.1), transparent 34%);
  z-index: 0;
}

html.projects-page .music-work-photo-stack {
  position: relative;
  flex: 1;
  min-height: 200px;
}

html.projects-page .music-work-photo {
  position: absolute;
  width: clamp(150px, 28vw, 240px);
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 22%),
    linear-gradient(160deg, rgba(62, 207, 207, 0.12), rgba(14, 14, 14, 0.9));
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

html.projects-page .music-work-photo::after {
  content: "";
  position: absolute;
  inset: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

html.projects-page .music-work-photo--rear {
  top: 1rem;
  left: 0.4rem;
  transform: rotate(-5deg);
  opacity: 0.28;
}

html.projects-page .music-work-photo--mid {
  top: 0.45rem;
  right: 1rem;
  transform: rotate(4deg);
  opacity: 0.45;
}

html.projects-page .music-work-photo--front {
  left: 16%;
  bottom: 0;
}

html.projects-page .music-work-wave {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  align-items: end;
  gap: 0.4rem;
  min-height: 210px;
}

html.projects-page .music-work-wave span {
  display: block;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(78, 215, 210, 0.75), rgba(78, 215, 210, 0.08));
}

html.projects-page .music-work-wave span:nth-child(1),
html.projects-page .music-work-wave span:nth-child(9) { height: 24%; }

html.projects-page .music-work-wave span:nth-child(2),
html.projects-page .music-work-wave span:nth-child(8) { height: 48%; }

html.projects-page .music-work-wave span:nth-child(3),
html.projects-page .music-work-wave span:nth-child(7) { height: 72%; }

html.projects-page .music-work-wave span:nth-child(4),
html.projects-page .music-work-wave span:nth-child(6) { height: 92%; }

html.projects-page .music-work-wave span:nth-child(5) { height: 100%; }

html.projects-page .music-work-caption {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  margin: 0;
  padding: 0.35rem 0.55rem;
  font-size: 0.68rem;
  font-family: var(--font-sans);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  z-index: 4;
  background: rgba(12, 16, 22, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

html.projects-page .music-work-copy {
  padding-block: 0.5rem;
}

html.projects-page .music-work-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

html.projects-page .music-work-index {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

html.projects-page .music-work-copy .section-title {
  margin: 0 0 0.75rem;
  text-wrap: balance;
}

html.projects-page .music-work-intro {
  margin: 0 0 0.9rem;
  font-family: var(--font-serif);
  font-size: clamp(1.12rem, 2.4vw, 1.38rem);
  line-height: 1.46;
  color: var(--fg);
  max-width: 34ch;
  text-wrap: balance;
}

html.projects-page .music-work-section--vocals .music-work-intro {
  max-width: 40ch;
}

html.projects-page .music-work-section--vocals .music-work-body {
  max-width: 52ch;
}

html.projects-page .music-work-body {
  margin: 0;
  color: var(--fg-muted);
  line-height: 1.72;
  max-width: 58ch;
}

html.projects-page .music-work-body a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--teal) 55%, transparent);
  text-underline-offset: 0.15em;
}

html.projects-page .music-work-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 1.35rem 0 0;
  padding: 0;
  list-style: none;
}

html.projects-page .music-work-details li {
  padding-top: 0.75rem;
  border-top: 1px solid color-mix(in srgb, var(--card-border) 88%, transparent);
  color: var(--fg-muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

html.projects-page .music-work-openers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.85rem;
  margin-top: 0.75rem;
}

html.projects-page .music-work-openers-label {
  margin-top: 1.15rem;
  color: var(--fg-muted);
  font-size: 0.7rem;
  font-family: var(--font-sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

html.projects-page .music-work-opener {
  margin: 0;
}

html.projects-page .music-work-opener img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--card-border) 92%, transparent);
}

html.projects-page .music-work-opener figcaption {
  margin-top: 0.45rem;
  color: var(--fg-muted);
  font-size: 0.72rem;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

html.projects-page .music-work-section--photo .music-work-card,
html.projects-page .music-work-section--vocals .music-work-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 20%),
    color-mix(in srgb, var(--bg-elevated) 84%, transparent);
}

html.projects-page .music-work-section--vocals .music-work-card,
html.projects-page .music-work-section--vocals .music-work-copy {
  align-items: start;
  align-self: start;
}

@media (max-width: 820px) {
  html.projects-page .music-work-card,
  html.projects-page .music-work-card--reverse {
    grid-template-columns: 1fr;
  }

  html.projects-page .music-work-card--reverse .music-work-visual {
    order: -1;
  }

  html.projects-page .music-work-visual {
    min-height: 260px;
  }

  html.projects-page .music-work-details {
    grid-template-columns: 1fr;
  }

  html.projects-page .music-work-section--vocals .music-work-intro,
  html.projects-page .music-work-section--vocals .music-work-body {
    max-width: none;
  }

  html.projects-page .music-work-copy {
    padding-top: 0.2rem;
  }

  html.projects-page .music-work-heading {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 0.75rem;
  }

  html.projects-page .music-work-copy .section-title {
    margin-top: 0.35rem;
  }
}

@media (max-width: 560px) {
  html.projects-page .music-work-section {
    margin-bottom: 2rem;
  }

  html.projects-page .music-work-card {
    padding: 1rem;
    border-radius: 22px;
  }

  html.projects-page .music-work-visual {
    min-height: 210px;
    padding: 1rem;
  }

  html.projects-page .music-work-visual--photo {
    min-height: 340px;
  }

  html.projects-page .music-work-intro {
    max-width: none;
  }

  html.projects-page .music-work-openers {
    gap: 0.6rem;
  }

  html.projects-page .music-work-photo-mosaic {
    inset: 8.9% 4.4% 8.9% 4.4%;
    gap: 4.2%;
  }

  html.projects-page .music-work-photo-row {
    gap: 2.8%;
  }

  html.projects-page .music-work-photo-row--bottom {
    padding-inline: 13.9%;
  }

  html.projects-page .music-work-opener figcaption {
    font-size: 0.68rem;
  }

  html.projects-page .music-work-photo--front {
    left: 10%;
  }
}

/* ─── Responsive ────────────────────────────────────────────────────── */
/* Tablet breakpoint */
@media (max-width: 900px) {
  .signal-terminal {
    --hud-width: 70px;
    --hud-gap: 0.8rem;
  }
  .terminal-hud .hud-rail {
    inset: 0 0 100px 0;
  }
  .terminal-hud .hud-meter {
    left: 14px;
    width: 16px;
    height: 140px;
  }
  .terminal-hud .hud-ring {
    width: var(--hud-width);
    height: var(--hud-width);
  }
  .terminal-cursor {
    left: calc(var(--hud-width) + 0.6rem);
  }
  .terminal-cursor-icon {
    width: 32px;
  }
  .signal-spider {
    width: 44px;
    height: 44px;
    left: calc(var(--hud-width) + 0.4rem);
  }
}

@media (max-width: 640px) {
  .intro,
  .intro-gate,
  .intro-gate-image,
  #intro-canvas,
  .intro-canvas-container {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .home-stage {
    transform: none !important;
    transition: none !important;
    opacity: 1 !important;
    --stage-opacity: 1 !important;
    --stage-translate: 0px !important;
  }
  .site-nav {
    position: static;
    padding-top: env(safe-area-inset-top);
  }
  .signal-blob {
    padding: 1.5rem 0 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .signal-inner {
    width: 100%;
    padding: 0 1rem;
  }
  .nav-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.7rem;
    padding-bottom: 0.55rem;
  }
  .nav-logo {
    justify-self: start;
  }
  .nav-logo-icon {
    height: 46px;
  }
  .nav-menu-toggle {
    display: inline-flex;
    justify-self: end;
  }
  .nav-actions {
    grid-column: 1 / -1;
    gap: 0.8rem;
    width: 100%;
    padding-top: 0.8rem;
    margin-top: 0.1rem;
    border-top: 1px solid var(--border-subtle);
  }
  .nav-actions[hidden] {
    display: none;
  }
  .nav-links { 
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
    gap: 0.12rem;
    font-size: 0.98rem;
    width: 100%;
    max-width: none;
    text-align: left;
  }
  .nav-dot {
    display: none;
  }
  .nav-links li {
    display: block;
  }
  .nav-links li a {
    display: block;
    width: 100%;
    padding: 0.28rem 0;
  }
  .theme-toggle {
    justify-self: start;
    min-width: 7rem;
    padding: 0.26rem 0.8rem;
  }
  .terminal-line {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .terminal-cursor {
    display: block;
    left: calc(var(--hud-width) + 0.4rem);
  }
  .terminal-cursor-icon {
    width: 24px;
  }
  .terminal-frame {
    width: 100%;
    max-width: 96vw;
  }
  .signal-terminal {
    --hud-width: 0px;
    --hud-gap: 0rem;
    --frame-top: 22.1%;
    --frame-right: 15.3%;
    --frame-bottom: 24.3%;
    --frame-left: 17.2%;
    padding: clamp(0.6rem, 2.5vw, 1.2rem) clamp(0.6rem, 2.5vw, 1.2rem);
  }
  .terminal-hud {
    display: none;
  }
  .terminal-bar {
    padding-left: 0;
  }
  .terminal-log {
    padding-left: 0;
    padding-right: 0.3rem;
  }
  .terminal-prompt {
    display: none;
  }
  .post-list-item { grid-template-columns: 1fr; gap: 0.2rem; }
  .post-list-date { font-size: 0.72rem; }
  .blob-wrapper { 
    width: min(420px, 92vw); 
    aspect-ratio: 1 / 1;
  }
  .signal-spider {
    display: none;
  }
  .terminal-cursor {
    display: none;
  }
  .photo-card {
    width: clamp(260px, 72vw, 340px);
  }
  .photo-strip-track {
    padding: 0.75rem 1.25rem 1.25rem;
    gap: 1rem;
  }
  .photo-lightbox-hud {
    width: min(92vw, 420px);
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
    text-align: center;
  }
  .network-constellation {
    max-width: 100%;
    height: clamp(260px, 64vw, 340px);
    margin-bottom: 2rem;
    overflow: visible;
  }
  .core-trigger {
    width: min(92vw, 540px);
  }
  html.lab-notes-page .tools-panel.lab-notes-tools-panel {
    width: min(100%, 240px);
  }
  html.lab-notes-page .tools-panel.lab-notes-tools-panel .tools-trigger {
    margin-bottom: -52%;
  }
  html.lab-notes-page .tools-panel.lab-notes-tools-panel .tools-image,
  html.lab-notes-page .tools-panel.lab-notes-tools-panel .blob-mesh-canvas {
    width: 100%;
    max-width: none;
    margin-left: 0;
  }

  html.lab-notes-page .tools-panel.lab-notes-tools-panel .drawer-expansion-wrapper {
    width: calc(100% * var(--tools-image-scale));
    max-width: none;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    margin-left: 0;
  }
  html.lab-notes-page .tools-panel.lab-notes-tools-panel .tools-drawer,
  html.lab-notes-page .tools-panel.lab-notes-tools-panel .tools-drawer.is-open {
    margin-top: 16%;
    margin-bottom: 0;
  }

  html.lab-notes-page .tools-panel.lab-notes-tools-panel .tools-drawer.is-open {
    margin-top: 18%;
  }

  .ambriel-network-section {
    margin-bottom: 4rem;
    padding: 2.5rem 1rem 4.5rem;
  }

  .network-header {
    margin-bottom: 1.25rem;
  }
}

@media (max-width: 900px) {
  .network-constellation {
    height: clamp(260px, 55vw, 340px);
    margin-bottom: 2rem;
    overflow: visible;
  }

  .core-trigger {
    width: min(94vw, 720px);
  }
}

@media (max-width: 640px) {
  .signal-terminal {
    --frame-top: 22.1%;
    --frame-right: 15.3%;
    --frame-bottom: 24.3%;
    --frame-left: 17.2%;
    padding: clamp(0.4rem, 2vw, 0.8rem);
  }
  .blob-wrapper { 
    width: min(280px, 90vw); 
    overflow: hidden;
    border-radius: 50% !important;
  }

  .home-hero-blob .glass-box {
    border-radius: 50% !important;
    inset: 2% !important;
  }

  .home-hero-blob .blob-image-fallback,
  .home-hero-blob .blob-canvas {
    border-radius: 50% !important;
    -webkit-mask-image: linear-gradient(#000, #000) !important;
    mask-image: linear-gradient(#000, #000) !important;
  }

  .home-hero-blob .glass-box::before {
    border-radius: 50% !important;
    padding: 4px !important;
  }

  .home-hero-blob .glass-box::after,
  .home-hero-blob .glass-edge-blur {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .site-nav {
    overflow: visible;
  }

  .nav-inner {
    gap: 0.75rem;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }

  .nav-logo-icon {
    height: 44px;
  }

  .nav-actions {
    grid-column: auto;
    flex-wrap: nowrap;
    gap: 0.5rem;
    width: auto;
    padding-top: 0;
    margin-top: 0;
    border-top: 0;
  }

  .site-nav .nav-links {
    display: none;
  }

  .site-nav .theme-toggle,
  .site-nav .nav-menu-toggle {
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 0;
    flex: 0 0 40px;
    justify-self: auto;
    border-radius: 999px;
  }

  .site-nav .theme-toggle-icon {
    width: 18px;
    height: 18px;
  }

  .site-nav .nav-menu-icon {
    gap: 4px;
  }

  .site-nav .nav-menu-icon span {
    width: 16px;
    height: 1.5px;
  }

  .site-nav.is-menu-open .nav-menu-icon span:nth-child(1) {
    transform: translateY(5.5px) rotate(45deg);
  }

  .site-nav.is-menu-open .nav-menu-icon span:nth-child(3) {
    transform: translateY(-5.5px) rotate(-45deg);
  }

  .nav-panel {
    top: calc(100% + 0.4rem);
    right: 1rem;
    left: auto;
    width: min(320px, calc(100vw - 2rem));
    height: auto;
    max-height: calc(100dvh - 5.5rem);
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    display: block;
    overflow: hidden;
    transform: translateY(-8px);
    transition: visibility 0s 0.25s, opacity 0.25s ease, transform 0.25s ease;
  }

  .site-nav.is-menu-open .nav-panel {
    transform: translateY(0);
    transition: visibility 0s, opacity 0.25s ease, transform 0.25s ease;
  }

  .nav-panel-inner {
    padding: 0 1rem;
    max-width: 100%;
    margin: 0;
    gap: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
  }

  .nav-panel-content {
    padding: 0;
  }

  .nav-panel-links {
    gap: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .nav-panel-links li {
    width: 100%;
    text-align: center;
  }

  .nav-panel-links a {
    display: block;
    width: 100%;
    padding: 2rem 0;
    font-family: var(--font-sans);
    font-size: 1.25rem;
    font-weight: 300;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    text-align: center;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--fg);
    text-decoration: none;
  }

  .nav-panel-links a:hover {
    color: var(--teal);
    letter-spacing: 0.3em;
    transform: scale(1.05);
    background-color: transparent;
  }

    transform: translateY(6px);
  }

  .site-nav.is-menu-open .nav-panel-links a {
    opacity: 1;
    transform: translateY(0);
  }

  .nav-panel-footer,
  .nav-panel-meta {
    display: none;
  }

/* ─── Winamp Player ────────────────────────────────────────────────── */
:root {
  --wp-glow: rgba(62, 207, 207, 0.15);
  --wp-ctrl-bg: rgba(0, 0, 0, 0.06);
  --wp-ctrl-color: rgba(10, 20, 28, 0.85);
  --wp-track-bg: rgba(0, 0, 0, 0.08);
  --wp-pl-hover: rgba(62, 207, 207, 0.08);
  --wp-pl-active: rgba(62, 207, 207, 0.12);
  --wp-pl-title: rgba(10, 20, 28, 0.85);
  --wp-pl-artist: rgba(10, 20, 28, 0.4);
  --wp-pl-idx: rgba(62, 207, 207, 0.5);
}

html[data-theme="dark"] {
  --wp-glow: rgba(62, 207, 207, 0.25);
  --wp-ctrl-bg: rgba(255, 255, 255, 0.04);
  --wp-ctrl-color: rgba(240, 248, 248, 0.85);
  --wp-track-bg: rgba(255, 255, 255, 0.08);
  --wp-pl-hover: rgba(62, 207, 207, 0.06);
  --wp-pl-active: rgba(62, 207, 207, 0.08);
  --wp-pl-title: rgba(255, 255, 255, 0.9);
  --wp-pl-artist: rgba(255, 255, 255, 0.35);
  --wp-pl-idx: rgba(126, 240, 255, 0.4);
}

.winamp-player {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 3rem auto 0;
  padding: 0;
  /* Organic asymmetric border-radius */
  border-radius: 24px 18px 22px 20px;
  background: linear-gradient(155deg, rgba(220, 232, 238, 0.94), rgba(208, 222, 228, 0.97));
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  box-shadow:
    0 40px 80px rgba(0, 40, 50, 0.12),
    0 12px 28px rgba(0, 40, 50, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 0 40px rgba(62, 207, 207, 0.06);
  overflow: hidden;
  z-index: 20;
  /* Breathing bio-luminescent glow */
  animation: wpBreathe 6s ease-in-out infinite;
}

html[data-theme="dark"] .winamp-player {
  background: linear-gradient(155deg, rgba(8, 18, 24, 0.92), rgba(4, 10, 14, 0.97));
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.6),
    0 12px 28px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 40px rgba(62, 207, 207, 0.04);
}

@keyframes wpBreathe {
  0%, 100% {
    filter: drop-shadow(0 0 12px var(--wp-glow)) drop-shadow(0 0 40px rgba(62, 207, 207, 0.05));
  }
  50% {
    filter: drop-shadow(0 0 24px var(--wp-glow)) drop-shadow(0 0 60px rgba(100, 220, 255, 0.1));
  }
}

/* Iridescent animated border */
.winamp-player::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(
    var(--wp-border-angle, 145deg),
    rgba(62, 207, 207, 0.6) 0%,
    rgba(120, 80, 220, 0.35) 20%,
    rgba(62, 207, 207, 0.5) 40%,
    rgba(180, 140, 255, 0.3) 55%,
    rgba(80, 240, 220, 0.5) 70%,
    rgba(62, 207, 207, 0.6) 85%,
    rgba(160, 120, 255, 0.35) 100%
  );
  background-size: 300% 300%;
  animation: wpIridescent 8s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 10;
}

@keyframes wpIridescent {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Film grain texture overlay */
.winamp-player::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.5;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 11;
}

/* ── Visualizer ──────────────────────────────────────────────── */
.winamp-viz {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 52px;
  padding: 10px 16px 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.15));
  border-bottom: 1px solid rgba(62, 207, 207, 0.12);
}

.winamp-viz-bar {
  flex: 1;
  min-width: 0;
  height: 6%;
  /* Organic blob shape */
  border-radius: 50% 50% 30% 30%;
  background: linear-gradient(0deg, var(--teal) 0%, rgba(126, 240, 255, 0.85) 60%, rgba(160, 120, 255, 0.5) 100%);
  box-shadow: 0 -2px 10px rgba(62, 207, 207, 0.4), 0 0 4px rgba(120, 80, 220, 0.2);
  transition: height 0.08s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: height;
  opacity: 0.9;
}

/* Varied organic widths */
.winamp-viz-bar:nth-child(even) { flex: 0.8; border-radius: 40% 40% 25% 25%; }
.winamp-viz-bar:nth-child(3n+1) { flex: 1.15; border-radius: 55% 45% 30% 35%; }
.winamp-viz-bar:nth-child(4n) { flex: 0.7; border-radius: 45% 55% 35% 30%; }

.is-playing .winamp-viz-bar {
  animation: vizIdle 1.2s ease-in-out infinite alternate;
}

.winamp-viz-bar:nth-child(odd) { animation-delay: -0.3s; }
.winamp-viz-bar:nth-child(3n) { animation-delay: -0.6s; }
.winamp-viz-bar:nth-child(5n) { animation-delay: -0.15s; }
.winamp-viz-bar:nth-child(7n) { animation-delay: -0.45s; }

@keyframes vizIdle {
  0% { height: 8%; opacity: 0.7; }
  50% { height: 38%; opacity: 1; }
  100% { height: 14%; opacity: 0.8; }
}

/* ── Display ─────────────────────────────────────────────────── */
.winamp-display {
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  background: linear-gradient(160deg, rgba(10, 18, 24, 0.92), rgba(6, 12, 18, 0.88));
  border-bottom: 1px solid rgba(62, 207, 207, 0.08);
  position: relative;
}

html[data-theme="dark"] .winamp-display {
  background: linear-gradient(160deg, rgba(6, 12, 18, 0.9), rgba(10, 16, 22, 0.8));
}

/* Scanline overlay */
.winamp-display::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
  pointer-events: none;
  z-index: 1;
}

/* Cover art */
.winamp-cover-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  z-index: 2;
}

.winamp-cover-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--glass-chrome-gradient);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 3;
}

.winamp-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.35s ease, transform 0.5s ease;
}

.winamp-cover--loading {
  opacity: 0.3;
  transform: scale(0.95);
}

/* Track info */
.winamp-track-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  z-index: 2;
}

.winamp-marquee {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.winamp-marquee-text {
  display: inline-block;
  white-space: nowrap;
  font-family: "SFMono-Regular", "Menlo", "Monaco", "Consolas", monospace;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--teal);
  text-shadow: 0 0 12px rgba(62, 207, 207, 0.5);
  animation: marqueeScroll 12s linear infinite;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.winamp-time {
  font-family: "SFMono-Regular", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(126, 240, 255, 0.65);
}

/* ── Seek Bar ────────────────────────────────────────────────── */
.winamp-seek-wrap {
  position: relative;
  height: 18px;
  padding: 0 16px;
  display: flex;
  align-items: center;
}

.winamp-seek-track {
  position: absolute;
  left: 16px;
  right: 16px;
  height: 4px;
  border-radius: 2px;
  background: var(--wp-track-bg);
  overflow: hidden;
  pointer-events: none;
}

.winamp-seek-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal-dim), var(--teal));
  box-shadow: 0 0 8px rgba(62, 207, 207, 0.4);
  transition: width 0.1s linear;
}

.winamp-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 18px;
  background: transparent;
  cursor: pointer;
  position: relative;
  z-index: 2;
  margin: 0;
}

.winamp-range::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
  border-radius: 2px;
}

.winamp-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff, #c0c0c0 40%, #7a7a7a 100%);
  border: 1px solid rgba(62, 207, 207, 0.5);
  box-shadow: 0 0 8px rgba(62, 207, 207, 0.4), 0 2px 4px rgba(0, 0, 0, 0.5);
  margin-top: -5px;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.winamp-range:hover::-webkit-slider-thumb {
  box-shadow: 0 0 14px rgba(62, 207, 207, 0.7), 0 2px 6px rgba(0, 0, 0, 0.6);
  transform: scale(1.15);
}

.winamp-range::-moz-range-track {
  height: 4px;
  background: transparent;
  border-radius: 2px;
}

.winamp-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff, #c0c0c0 40%, #7a7a7a 100%);
  border: 1px solid rgba(62, 207, 207, 0.5);
  box-shadow: 0 0 8px rgba(62, 207, 207, 0.4), 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* ── Controls ────────────────────────────────────────────────── */
.winamp-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 14px;
  gap: 10px;
}

.winamp-transport {
  display: flex;
  align-items: center;
  gap: 6px;
}

.winamp-btn {
  appearance: none;
  border: none;
  background: var(--wp-ctrl-bg);
  color: var(--wp-ctrl-color);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.25s ease;
  font-size: 0;
}

.winamp-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    145deg,
    rgba(200, 200, 200, 0.3) 0%,
    rgba(100, 100, 100, 0.15) 50%,
    rgba(200, 200, 200, 0.25) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.winamp-btn:hover {
  background: rgba(62, 207, 207, 0.12);
  box-shadow: 0 0 16px rgba(62, 207, 207, 0.2);
}

.winamp-btn:hover::before {
  background: linear-gradient(
    145deg,
    rgba(62, 207, 207, 0.5) 0%,
    rgba(62, 207, 207, 0.2) 50%,
    rgba(62, 207, 207, 0.4) 100%
  );
}

.winamp-btn:active {
  transform: scale(0.9);
}

.winamp-icon {
  font-size: 1rem;
  line-height: 1;
  pointer-events: none;
}

/* Play button emphasized */
.winamp-btn--play {
  width: 44px;
  height: 44px;
  background: rgba(62, 207, 207, 0.1);
  box-shadow: inset 0 0 12px rgba(62, 207, 207, 0.1);
}

.winamp-btn--play .winamp-icon {
  font-size: 1.15rem;
}

.is-playing .winamp-btn--play {
  box-shadow: 0 0 20px rgba(62, 207, 207, 0.3), inset 0 0 12px rgba(62, 207, 207, 0.15);
}

.is-playing .winamp-btn--play::before {
  background: linear-gradient(
    145deg,
    rgba(62, 207, 207, 0.6) 0%,
    rgba(62, 207, 207, 0.2) 50%,
    rgba(62, 207, 207, 0.5) 100%
  );
}

/* ── Volume ──────────────────────────────────────────────────── */
.winamp-volume-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  max-width: 140px;
}

.winamp-volume-icon {
  font-size: 0.85rem;
  flex-shrink: 0;
  opacity: 0.7;
}

.winamp-volume-slider {
  position: relative;
  flex: 1;
  height: 18px;
  display: flex;
  align-items: center;
}

.winamp-volume-track {
  position: absolute;
  inset: 0;
  height: 4px;
  margin: auto 0;
  border-radius: 2px;
  background: var(--wp-track-bg);
  overflow: hidden;
  pointer-events: none;
}

.winamp-volume-fill {
  height: 100%;
  width: 75%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(62, 207, 207, 0.5), var(--teal));
  transition: width 0.1s linear;
}

.winamp-volume-slider .winamp-range {
  height: 18px;
}

/* ── Playlist Toggle ─────────────────────────────────────────── */
.winamp-btn--pl {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.winamp-btn--pl.is-active {
  background: rgba(62, 207, 207, 0.15);
  box-shadow: 0 0 12px rgba(62, 207, 207, 0.25);
}

/* ── Playlist Drawer ─────────────────────────────────────────── */
.winamp-playlist {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.25, 1, 0.5, 1);
  border-top: 1px solid transparent;
}

.winamp-playlist.is-open {
  max-height: 300px;
  border-top-color: rgba(62, 207, 207, 0.12);
}

.winamp-pl-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

.winamp-pl-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.2s ease;
  position: relative;
}

.winamp-pl-item:hover {
  background: var(--wp-pl-hover);
}

.winamp-pl-item.is-active {
  background: var(--wp-pl-active);
}

.winamp-pl-item.is-active::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px rgba(62, 207, 207, 0.6);
}

.winamp-pl-idx {
  font-family: "SFMono-Regular", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--wp-pl-idx);
  min-width: 22px;
}

.winamp-pl-title {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--wp-pl-title);
  flex: 1;
}

.winamp-pl-item.is-active .winamp-pl-title {
  color: var(--teal);
  text-shadow: 0 0 8px rgba(62, 207, 207, 0.35);
}

.winamp-pl-artist {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--wp-pl-artist);
}

/* ── Winamp Responsive ───────────────────────────────────────── */
@media (max-width: 520px) {
  .winamp-player {
    width: 100%;
    margin-top: 2rem;
    border-radius: 18px 14px 16px 14px;
  }

  .winamp-viz {
    height: 36px;
    padding: 8px 12px 0;
  }

  .winamp-display {
    padding: 12px;
    gap: 10px;
  }

  .winamp-cover-wrap {
    width: 52px;
    height: 52px;
  }

  .winamp-marquee-text {
    font-size: 0.72rem;
  }

  .winamp-controls {
    flex-wrap: wrap;
    justify-content: center;
    padding: 8px 12px 12px;
    gap: 6px;
  }

  .winamp-transport {
    width: 100%;
    justify-content: center;
  }

  .winamp-btn {
    width: 34px;
    height: 34px;
  }

  .winamp-btn--play {
    width: 40px;
    height: 40px;
  }

  .winamp-volume-wrap {
    flex: 1 1 100%;
    max-width: none;
    justify-content: center;
  }

  .winamp-volume-slider {
    max-width: 160px;
  }

  .winamp-seek-wrap {
    padding: 0 12px;
  }

  .winamp-seek-track {
    left: 12px;
    right: 12px;
  }
}

/* ─── Notes & Microblog Timeline Stream ──────────────────────────────── */
.notes-page {
  background: var(--bg);
}

.notes-shell {
  max-width: 760px;
  margin: 0 auto;
  padding-top: 5rem;
  padding-bottom: 6rem;
}

.notes-header-block {
  margin-bottom: 4rem;
  border-left: 2px solid var(--teal);
  padding-left: 1.5rem;
}

.notes-kicker {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  display: block;
  margin-bottom: 0.5rem;
}

.notes-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--fg);
  margin-bottom: 1rem;
}

.notes-intro {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--fg-muted);
  max-width: 600px;
}

.notes-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  padding-left: 2.5rem;
}

.notes-timeline-spine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--teal) 0%, var(--border-subtle) 40%, var(--border-subtle) 90%, transparent 100%);
  opacity: 0.7;
}

.timeline-node {
  position: relative;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.timeline-node:hover {
  transform: translateX(4px);
  box-shadow: 0 15px 35px var(--glass-shadow);
}

.timeline-indicator-dot {
  position: absolute;
  left: calc(-2.5rem - 8px + 3px);
  top: 2rem;
  width: 11px;
  height: 11px;
  background: var(--bg);
  border: 2px solid var(--border-subtle);
  border-radius: 50%;
  z-index: 10;
  transition: border-color 0.3s, background-color 0.3s;
}

.timeline-node:hover .timeline-indicator-dot {
  border-color: var(--teal);
  background: var(--teal);
}

.indicator-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--teal);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.6);
  transition: all 0.5s ease-out;
}

.timeline-node:hover .indicator-pulse {
  opacity: 0.6;
  transform: scale(1.6);
  animation: pulse-out 1.2s infinite;
}

@keyframes pulse-out {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2); opacity: 0; }
}

/* Individual Note Layout */
.note-layout {
  max-width: 680px;
  margin: 0 auto;
  padding-top: 6rem;
  padding-bottom: 6rem;
}

.note-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: 0 10px 30px var(--card-shadow);
  border-radius: 16px;
  padding: 2rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px dashed var(--border-subtle);
  padding-bottom: 1rem;
}

.note-kicker {
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal-dim);
}

.back-to-notes {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--fg-muted);
  transition: color 0.2s;
}

.back-to-notes:hover {
  color: var(--teal);
  opacity: 1;
}

.note-body {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--fg);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.note-body p {
  margin-bottom: 1rem;
}

.note-body p:last-child {
  margin-bottom: 0;
}

.note-body strong {
  color: var(--teal-dim);
}

.note-footer {
  margin-top: 2rem;
  border-top: 1px dashed var(--border-subtle);
  padding-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.note-date {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  color: var(--fg-muted);
}

.mono-label {
  color: var(--teal);
  opacity: 0.6;
}

.note-permalink {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  color: var(--teal-dim);
  transition: color 0.2s;
}

.note-permalink:hover {
  color: var(--teal);
  opacity: 1;
}

/* ─── Webmentions Widget ────────────────────────────────────────────── */
.webmentions-container {
  margin-top: 5rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 3.5rem;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.webmentions-title {
  font-family: var(--font-mono, monospace);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: var(--teal);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.webmentions-content {
  margin-bottom: 3rem;
}

.webmentions-loading,
.webmentions-empty,
.webmentions-error {
  font-family: var(--font-mono, monospace);
  font-size: 0.82rem;
  padding: 1.5rem;
  background: var(--bg-elevated);
  border: 1px dashed var(--border-subtle);
  border-radius: 8px;
  color: var(--fg-muted);
  text-align: center;
}

.webmentions-loading {
  animation: pulse-light 1.8s infinite ease-in-out;
}

@keyframes pulse-light {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}

.webmentions-error {
  color: #ff5f56;
  border-color: rgba(255, 95, 86, 0.3);
  background: rgba(255, 95, 86, 0.03);
}

.webmentions-group {
  margin-bottom: 2.5rem;
}

.webmentions-group-title {
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--fg-muted);
  margin-bottom: 1rem;
}

/* Facepile styling for Likes/Reposts */
.facepile {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.25rem 0;
}

.avatar-link {
  position: relative;
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), z-index 0.2s;
  z-index: 1;
}

.avatar-link:hover {
  transform: scale(1.2) translateY(-2px);
  z-index: 5;
  opacity: 1;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--teal-dim) 0%, var(--bg-elevated) 100%);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--border-subtle);
}

/* Replies Comment list */
.replies-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.reply-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 4px 15px var(--glass-shadow);
}

.reply-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.reply-author-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.reply-author-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--fg);
}

.reply-author-name a {
  color: inherit;
  transition: color 0.15s;
}

.reply-author-name a:hover {
  color: var(--teal);
  text-decoration: underline;
}

.reply-date {
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  color: var(--fg-muted);
}

.reply-content {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--fg);
  overflow-wrap: break-word;
  word-break: break-word;
}

.reply-content p {
  margin-bottom: 0.75rem;
}

.reply-content p:last-child {
  margin-bottom: 0;
}

.reply-content a {
  color: var(--teal-dim);
  text-decoration: underline;
}

.reply-content a:hover {
  color: var(--teal);
}

/* Webmention submission block */
.webmentions-send {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 3.5rem;
}

.webmentions-send-title {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--teal);
  margin-bottom: 0.75rem;
}

.webmentions-send-desc {
  font-size: 0.85rem;
  color: var(--fg-muted);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.webmention-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.webmention-input-group {
  display: flex;
  gap: 0.5rem;
}

.webmention-input {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0.6rem 1rem;
  font-family: var(--font-mono, monospace);
  font-size: 0.85rem;
  color: var(--fg);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.webmention-input::placeholder {
  color: var(--fg-muted);
  opacity: 0.5;
}

.webmention-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 10px rgba(62, 207, 207, 0.15);
}

.webmention-submit-btn {
  background: transparent;
  border: 1px solid var(--teal-dim);
  color: var(--teal);
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0 1.25rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.webmention-submit-btn:hover {
  background: rgba(62, 207, 207, 0.1);
  border-color: var(--teal);
  box-shadow: 0 0 12px rgba(62, 207, 207, 0.2);
}

.webmention-response {
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 6px;
  line-height: 1.4;
}

.webmention-response-loading {
  background: var(--bg-elevated);
  color: var(--fg-muted);
  border: 1px dashed var(--border-subtle);
}

.webmention-response-success {
  background: rgba(62, 207, 207, 0.05);
  color: var(--teal);
  border: 1px solid rgba(62, 207, 207, 0.3);
}

.webmention-response-error {
  background: rgba(255, 95, 86, 0.05);
  color: #ff5f56;
  border: 1px solid rgba(255, 95, 86, 0.3);
}

/* ─── Webmentions Console Page ───────────────────────────────────────── */
.webmentions-console-shell {
  padding-top: 5rem;
  padding-bottom: 6rem;
  max-width: 1200px;
}

.console-header {
  margin-bottom: 4rem;
  border-left: 2px solid var(--teal);
  padding-left: 1.5rem;
}

.console-kicker {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  display: block;
  margin-bottom: 0.5rem;
}

.console-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--fg);
  margin-bottom: 1rem;
}

.console-desc {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--fg-muted);
  max-width: 700px;
}

.console-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.console-section-title {
  font-family: var(--font-mono, monospace);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: var(--teal);
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.console-spec-item {
  margin-bottom: 2rem;
}

.console-spec-item h3 {
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--fg);
}

.console-spec-item p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--fg-muted);
}

.console-spec-item strong {
  color: var(--teal-dim);
}

.spec-list {
  padding-left: 1.25rem;
  list-style: square;
  color: var(--fg-muted);
  font-size: 0.92rem;
  line-height: 1.8;
}

.console-trace-desc {
  font-size: 0.88rem;
  color: var(--fg-muted);
  margin-bottom: 1.5rem;
}

/* Global trace activity cards */
.console-global-feed {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.console-feed-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.85rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  transition: background-color 0.2s, border-color 0.2s;
}

.console-feed-item:hover {
  background: rgba(62, 207, 207, 0.02);
  border-color: rgba(62, 207, 207, 0.2);
}

.console-feed-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.console-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  object-fit: cover;
  background: var(--bg-elevated);
}

.console-avatar-placeholder {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--teal-dim);
  color: var(--fg);
  font-size: 0.65rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
}

.console-feed-info {
  font-size: 0.82rem;
  color: var(--fg-muted);
  line-height: 1.4;
}

.console-feed-author {
  font-weight: 500;
  color: var(--fg);
}

.console-feed-author a {
  color: inherit;
}

.console-feed-author a:hover {
  color: var(--teal);
  text-decoration: underline;
}

.console-feed-action {
  color: var(--teal);
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  margin: 0 0.15rem;
}

.console-feed-target a {
  color: var(--teal-dim);
  text-decoration: underline;
}

.console-feed-target a:hover {
  color: var(--teal);
}

.console-feed-date {
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  color: var(--fg-muted);
}

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

@media (max-width: 600px) {
  .notes-timeline {
    padding-left: 1.5rem;
  }
  
  .notes-timeline-spine {
    left: 4px;
  }
  
  .timeline-indicator-dot {
    left: calc(-1.5rem - 8px + 1px);
    width: 9px;
    height: 9px;
  }
  
  .notes-header-block,
  .console-header {
    margin-bottom: 2.5rem;
    padding-left: 1rem;
  }
  
  .note-card,
  .webmentions-send {
    padding: 1.25rem;
  }
  
  .webmention-input-group {
    flex-direction: column;
  }
  
  .webmention-submit-btn {
    padding: 0.6rem;
  }
}

/* ─── Webring Widget Styling ────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 3.5rem 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
}

.webring-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
}

.webring-widget {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 0.5rem 1.25rem;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px var(--glass-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.webring-widget--static-quest {
  flex-direction: column;
  gap: 0.55rem;
  border-radius: 20px;
  padding: 0.9rem 1.25rem;
  text-align: center;
}

.webring-widget:hover {
  border-color: var(--border-subtle);
  box-shadow: 0 4px 12px var(--glass-shadow);
}

.webring-controls {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--fg-muted);
}

.webring-controls--split {
  flex-wrap: wrap;
  justify-content: center;
}

.webring-copy {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--fg-muted);
}

.webring-text {
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.webring-host {
  color: var(--fg);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.webring-host:hover {
  color: var(--teal);
  border-bottom-color: var(--teal);
  opacity: 1;
}

.webring-btn {
  color: var(--fg-muted);
  text-decoration: none;
  font-weight: bold;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.webring-btn:hover {
  color: var(--teal);
  opacity: 1;
}

.webring-lucky {
  color: var(--fg-muted);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.webring-lucky:hover {
  color: var(--teal);
  border-bottom-color: var(--teal);
  opacity: 1;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
}

/* ─── 3D Fisheye Rolodex ──────────────────────────────────────────────── */
.transmissions-rolodex-container {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 4rem auto 5rem;
  height: clamp(400px, 55vw, 600px);
  perspective: 1200px;
  /* Removed overflow: hidden; to prevent cropping */
  user-select: none;
  -webkit-user-select: none;
}

.transmissions-rolodex {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  transform-style: preserve-3d;
  touch-action: none; /* Let JS handle drag */
  cursor: grab;
}

.transmissions-rolodex:active {
  cursor: grabbing;
}

.rolodex-item {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(350px, 50vw, 600px);
  aspect-ratio: 3 / 2;
  transform-origin: center center;
  will-change: transform;
}

.rolodex-frame {
  position: relative;
  width: 100%;
  height: 100%;
  isolation: isolate;
}

.rolodex-frame-chrome {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 3;
  pointer-events: none;
}

.rolodex-screen {
  position: absolute;
  inset: 22.1% 15.3% 24.3% 17.2%;
  border-radius: 10px;
  overflow: hidden;
  z-index: 1;
  background: #0a0a0f;
}

.rolodex-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Basic tint to match aesthetic but NO hover animations or scanlines */
  filter: saturate(0.6) contrast(1.15) brightness(0.85) sepia(0.35) hue-rotate(95deg);
}

.rolodex-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(30, 90, 70, 0.35) 0%,
    rgba(20, 60, 50, 0.25) 40%,
    rgba(10, 40, 35, 0.4) 100%
  );
  mix-blend-mode: color;
  z-index: 2;
  pointer-events: none;
}

.rolodex-hud {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.6rem 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "SFMono-Regular", "Menlo", "Monaco", "Consolas", monospace;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(60, 160, 170, 0.9);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.75) 0%, transparent 100%);
  z-index: 2;
  pointer-events: none;
}

.rolodex-hud .hud-tag {
  background: rgba(30, 120, 120, 0.25);
  border: 1px solid rgba(30, 120, 120, 0.45);
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
}

.rolodex-hud .hud-coord {
  color: rgba(60, 160, 170, 0.55);
  font-weight: 400;
}


