/* ============================================================
   DAVID Carpio's PORTFOLIO
   Design System: Frosted Glass + Knowledge Graph
   ============================================================ */

/* ---------- Custom Properties ---------- */
:root {
  /* Core palette — dark mode defaults */
  --bg: #080810;
  --bg-2: #0d0d1a;
  --bg-3: #12122a;
  --surface: rgba(255, 255, 255, 0.055);
  --surface-2: rgba(255, 255, 255, 0.09);
  --surface-3: rgba(255, 255, 255, 0.13);
  --surface-panel: rgba(13, 13, 26, 0.9);
  --border: rgba(255, 255, 255, 0.09);
  --border-2: rgba(255, 255, 255, 0.16);

  /* Accent */
  --accent-1: #3689e6;
  --accent-2: #f37329;
  --accent-grad: linear-gradient(135deg, #3689e6 0%, #f37329 100%);
  --accent-glow: 0 0 24px rgba(54, 137, 230, 0.35);

  /* Text */
  --text-1: rgba(255, 255, 255, 0.92);
  --text-2: rgba(255, 255, 255, 0.55);
  --text-3: rgba(255, 255, 255, 0.32);

  /* Typography */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'DM Mono', 'Fira Code', 'Cascadia Code', monospace;

  /* Spacing */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Glass */
  --glass-blur: blur(22px) saturate(140%);
  --glass-border: 1px solid var(--border);

  /* Transitions */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 140ms;
  --dur-mid: 260ms;
  --dur-slow: 420ms;

  /* Z-index layers */
  --z-graph: 1;
  --z-ui: 10;
  --z-panel: 20;
  --z-dock: 30;
  --z-overlay: 40;
  --z-modal: 50;

  --bg-overlay: rgba(8, 8, 16, 0.6);
}

[data-theme="light"] {
  --bg: #f4f3f0;
  --bg-2: #ebebea;
  --bg-3: #e0dfdb;
  --surface: rgba(0, 0, 0, 0.04);
  --surface-2: rgba(0, 0, 0, 0.07);
  --surface-3: rgba(0, 0, 0, 0.11);
  --surface-panel: rgba(235, 235, 234, 0.9);
  --border: rgba(0, 0, 0, 0.09);
  --border-2: rgba(0, 0, 0, 0.16);
  --text-1: rgba(10, 10, 22, 0.92);
  --text-2: rgba(10, 10, 22, 0.52);
  --text-3: rgba(10, 10, 22, 0.30);
  --accent-glow: 0 0 24px rgba(54, 137, 230, 0.2);
  --bg-overlay: rgba(244, 243, 240, 0.6);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.65;
  min-height: 100dvh;
  overflow-x: hidden;
  transition: background-color var(--dur-mid) var(--ease-out),
    color var(--dur-mid) var(--ease-out);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
}

img,
svg {
  display: block;
}

/* ---------- Noise Overlay ---------- */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-ui);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  opacity: 0.6;
}

/* ---------- Background radial glow ---------- */
body::before {
  content: '';
  position: fixed;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse at center,
      rgba(124, 106, 255, 0.12) 0%,
      rgba(0, 212, 255, 0.06) 50%,
      transparent 75%);
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   GRAPH — HOME & GRAPH PAGE
   ============================================================ */
.graph-fullscreen {
  position: relative;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
}

#cy {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Wordmark on home */
.home-wordmark {
  position: absolute;
  top: 2rem;
  left: 2.5rem;
  z-index: var(--z-ui);
  pointer-events: none;
  animation: fadeIn 0.8s var(--ease-out) both;
}

.wordmark-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 300;
  color: var(--text-1);
  letter-spacing: -0.01em;
}

.wordmark-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--text-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* Node Preview Panel */
.node-preview {
  position: absolute;
  top: 50%;
  right: 2rem;
  transform: translateY(-50%);
  width: 280px;
  background: var(--surface-2);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  z-index: var(--z-panel);
  animation: slideInRight var(--dur-slow) var(--ease-spring) both;
}

.node-preview[hidden] {
  display: none;
}

.node-preview-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  transition: background var(--dur-fast), color var(--dur-fast);
}

.node-preview-close:hover {
  background: var(--surface-3);
  color: var(--text-1);
}

.node-preview-type {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-1);
  margin-bottom: 0.5rem;
}

.node-preview-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.node-preview-desc {
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.node-preview-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-2);
  transition: gap var(--dur-fast);
}

.node-preview-link:hover {
  gap: 0.5em;
}

.node-preview-link[hidden] {
  display: none;
}

/* Zoom Knob (graph page) */
.zoom-knob {
  position: absolute;
  left: 2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: var(--z-ui);
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
  gap: 4px;
}

.zoom-viewport {
  position: relative;
  height: 90px;
  /* Space for 7 visible dots */
  width: 24px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
  cursor: ns-resize;
}

.zoom-track {
  position: absolute;
  top: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  /* Gap between dots. Total dot spacing is 5 + 8 = 13px */
  transition: transform 0.1s linear;
}

.zoom-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border-2);
  flex-shrink: 0;
}

.zoom-dot.active {
  background: #ffb300;
  transform: scale(1.6);
  box-shadow: 0 0 6px #ffb300;
}

.zoom-dot.dot-min,
.zoom-dot.dot-max {
  background: #ef4444;
  /* Red color for absolute minimum/maximum */
}

.zoom-dot.dot-min.active,
.zoom-dot.dot-max.active {
  box-shadow: 0 0 6px #ef4444;
}

.zoom-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  cursor: pointer;
  transition: color var(--dur-fast), transform var(--dur-fast);
}

.zoom-btn:hover {
  color: var(--text-1);
  transform: scale(1.1);
}

.zoom-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ============================================================
   DOCK
   ============================================================ */
.dock-wrapper {
  position: fixed;
  bottom: 1.5rem;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: max-content;
  z-index: var(--z-dock);
  display: flex;
  justify-content: center;
  align-items: center;
}

.dock {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface-2);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius-full);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  animation: dockRise 0.6s var(--ease-spring) 0.2s both;
}

@keyframes dockRise {
  from {
    opacity: 0;
    margin-bottom: -20px;
  }

  to {
    opacity: 1;
    margin-bottom: 0;
  }
}

.dock-section {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  position: relative;
}

.dock-section+.dock-section {
  padding-left: 0.5rem;
  margin-left: 0.25rem;
  border-left: 1px solid var(--border);
}

.dock-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--text-2);
  transition: background var(--dur-fast), color var(--dur-fast), transform var(--dur-fast);
}

.dock-btn:hover,
.dock-btn:focus-visible {
  background: var(--surface-3);
  color: var(--text-1);
  transform: scale(1.08);
  outline: none;
}

.dock-btn:active {
  transform: scale(0.95);
}

.dock-btn-primary {
  background: #ffb300;
  color: #000;
  box-shadow: 0 0 24px rgba(255, 179, 0, 0.35);
}

.dock-btn-primary:hover {
  background: #ffb300;
  color: #000;
  filter: brightness(1.1);
  transform: scale(1.08);
}

.dock-icon {
  width: 18px;
  height: 18px;
}

/* Dock Panel */
.dock-panel {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-2);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: 30px;
  padding: 0.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  animation: panelPopCenter var(--dur-mid) var(--ease-spring) both;
}

.dock-panel[hidden] {
  display: none;
}

@keyframes panelPop {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(8px);
    transform-origin: bottom left;
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes panelPopCenter {
  from {
    opacity: 0;
    transform: translateX(-50%) scale(0.92) translateY(8px);
    transform-origin: bottom center;
  }

  to {
    opacity: 1;
    transform: translateX(-50%) scale(1) translateY(0);
  }
}

.dock-panel-label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.5rem;
  margin-top: 0.75rem;
}

.dock-panel-label:first-child {
  margin-top: 0;
}

.dock-toggle-group {
  display: flex;
  gap: 0.35rem;
}

.dock-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-2);
  background: var(--surface);
  border: var(--glass-border);
  transition: all var(--dur-fast);
}

.dock-toggle-btn:hover {
  background: var(--surface-3);
  color: var(--text-1);
}

.dock-toggle-btn.active,
.dock-toggle-btn[aria-pressed="true"] {
  background: #ffb300 !important;
  color: #000 !important;
  border-color: transparent !important;
}

/* Graph submenu */
.dock-submenu {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-2);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: 30px;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  animation: panelPopCenter var(--dur-mid) var(--ease-spring) both;
}

.dock-submenu[hidden] {
  display: none;
}

.dock-submenu-buttons {
  display: flex;
  flex-direction: row;
  gap: 0.25rem;
  align-items: center;
  justify-content: center;
}

.dock-submenu-buttons[hidden] {
  display: none;
}

.dock-submenu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  color: var(--text-2);
  transition: all var(--dur-fast);
  position: relative;
}

.dock-submenu-btn:hover {
  background: var(--surface-3);
  color: var(--text-1);
}

.dock-submenu-btn::after {
  content: attr(title);
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--surface-panel);
  color: var(--text-1);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-fast), transform var(--dur-fast);
  white-space: nowrap;
  border: var(--glass-border);
}

.dock-submenu-btn:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Graph search overlay */
.graph-search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 5rem;
  z-index: var(--z-overlay);
  background: var(--bg-overlay);
  backdrop-filter: blur(4px);
  animation: fadeIn var(--dur-mid) both;
}

.graph-search-overlay[hidden] {
  display: none;
}

.graph-search-box {
  width: min(480px, 90vw);
  background: var(--surface-panel);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

#graph-search-input {
  width: 100%;
  padding: 1rem 1.25rem;
  background: transparent;
  border: none;
  border-bottom: var(--glass-border);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
}

#graph-search-input::placeholder {
  color: var(--text-3);
}

.graph-search-results {
  max-height: 300px;
  overflow-y: auto;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  transition: background var(--dur-fast);
  border-bottom: 1px solid var(--border);
}

.search-result-item:hover {
  background: var(--surface-3);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-type {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  color: var(--text-2);
}

/* Graph filter panel (Tag Cloud inside Submenu) */
.graph-filter-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 240px;
  max-width: 280px;
  animation: expandDown var(--dur-mid) var(--ease-spring) both;
}

.graph-filter-panel[hidden] {
  display: none;
}

.filter-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.filter-panel-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-1);
}

.filter-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  color: var(--text-2);
  transition: background var(--dur-fast), color var(--dur-fast);
}

.filter-back-btn:hover {
  background: var(--surface-3);
  color: var(--text-1);
}

.filter-panel-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-toggle {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: var(--glass-border);
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--dur-fast);
  user-select: none;
}

.filter-toggle:hover {
  color: var(--text-1);
  background: var(--surface-3);
}

.filter-toggle[data-logic="and"] {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.5);
}

.filter-clear-btn {
  font-size: 0.65rem;
  color: var(--text-3);
  transition: color var(--dur-fast);
  padding: 0;
}

.filter-clear-btn:hover {
  color: var(--text-1);
}

.filter-tags-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-height: 180px;
  overflow-y: auto;
  padding: 0.25rem;
}

.filter-tag-btn {
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-md);
  font-size: 0.7rem;
  font-weight: 500;
  background: var(--surface-2);
  border: var(--glass-border);
  color: var(--text-2);
  transition: all var(--dur-fast);
}

.filter-tag-btn:hover {
  background: var(--surface-3);
  color: var(--text-1);
}

.filter-tag-btn.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.5);
  color: #34d399;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

/* ============================================================
   SINGLE PAGE
   ============================================================ */
.single-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 4rem 2rem 8rem;
}

.single-header {
  margin-bottom: 3rem;
}

.single-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-3);
  margin-bottom: 1.5rem;
  transition: color var(--dur-fast);
}

.single-back:hover {
  color: var(--text-1);
}

.single-type {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-1);
  margin-bottom: 0.75rem;
}

.single-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.single-date {
  display: block;
  font-size: 0.8rem;
  color: var(--text-3);
  margin-bottom: 1rem;
}

.single-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  border: var(--glass-border);
  color: var(--text-2);
}

/* Prose styles */
.prose {
  color: var(--text-1);
}

.prose h1,
.prose h2,
.prose h3 {
  font-family: var(--font-display);
  font-weight: 400;
  margin: 2rem 0 0.75rem;
  line-height: 1.25;
}

.prose h2 {
  font-size: 1.5rem;
}

.prose h3 {
  font-size: 1.2rem;
}

.prose p {
  margin-bottom: 1.25rem;
  line-height: 1.75;
}

.prose ul,
.prose ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--surface-2);
  border: var(--glass-border);
  border-radius: 4px;
  padding: 0.1em 0.4em;
}

.prose pre {
  background: var(--bg-3);
  border: var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.25rem;
}

.prose pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.85rem;
}

.prose blockquote {
  border-left: 2px solid var(--accent-1);
  padding-left: 1rem;
  color: var(--text-2);
  font-style: italic;
  margin-bottom: 1.25rem;
}

.prose a {
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-page {
  --accent-1: var(--text-1);
  --accent-2: var(--text-2);
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem 8rem;
}

/* Hero */
.about-hero {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
  animation: fadeIn 0.7s var(--ease-out) both;
}

.about-avatar {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--surface-2);
  border: var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.about-name {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.about-tagline {
  font-size: 1rem;
  color: var(--text-2);
  margin-bottom: 0.25rem;
}

.about-location {
  font-size: 0.82rem;
  color: var(--text-3);
  margin-bottom: 1rem;
}

.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.about-link-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--surface);
  border: var(--glass-border);
  color: var(--text-2);
  transition: all var(--dur-fast);
}

.about-link-pill:hover {
  background: var(--surface-3);
  color: var(--text-1);
  border-color: var(--accent-1);
}

/* Grid layout */
.about-grid {
  display: grid;
  grid-template-columns: 240px 1fr 300px;
  gap: 2rem;
  align-items: start;
}

.about-sidebar-left .skills-grid {
  grid-template-columns: 1fr;
}

/* CV Sections */
.cv-section {
  margin-bottom: 0.75rem;
  background: var(--surface);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--dur-mid);
  animation: fadeIn 0.6s var(--ease-out) both;
}

.cv-section:hover {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.cv-section-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem 1.25rem;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-1);
  transition: background var(--dur-fast);
}

.cv-section-toggle:hover {
  background: var(--surface-2);
}

.cv-section-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--accent-1);
  flex-shrink: 0;
}

.cv-section-toggle span:nth-child(2) {
  flex: 1;
}

.cv-chevron {
  color: var(--text-3);
  transition: transform var(--dur-mid) var(--ease-out);
}

.cv-section-toggle[aria-expanded="true"] .cv-chevron {
  transform: rotate(180deg);
}

.cv-section-body {
  padding: 0 1.25rem 1.25rem;
  animation: expandDown var(--dur-mid) var(--ease-out) both;
}

.cv-section-body[hidden] {
  display: none;
}

@keyframes expandDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cv-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.cv-entry-header h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
}

.cv-date {
  font-size: 0.75rem;
  color: var(--text-3);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.cv-org {
  font-size: 0.82rem;
  color: var(--accent-2);
  margin-bottom: 0.5rem;
}

.cv-detail {
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.65;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 1.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border-2);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -1.5rem;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #7a0000;
}

/* Project cards */
.project-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1rem;
  background: var(--surface-2);
  border: var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-1);
  transition: all var(--dur-mid);
}

.project-card:hover {
  background: var(--surface-3);
  border-color: var(--accent-1);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.project-card-type {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-1);
}

.project-card h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 400;
}

.project-card p {
  font-size: 0.8rem;
  color: var(--text-2);
  line-height: 1.5;
  flex: 1;
}

.project-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.25rem;
}

.project-card-tags span {
  font-size: 0.65rem;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: var(--surface-3);
  color: var(--text-3);
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.skill-group h4 {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-2);
}

.skill-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  margin-bottom: 0.75rem;
  list-style: none;
}

.skill-summary::-webkit-details-marker {
  display: none;
}

.skill-details .cv-chevron {
  color: var(--text-3);
  transition: transform var(--dur-mid) var(--ease-out);
  transform: rotate(0deg);
}

.skill-details[open] .cv-chevron {
  transform: rotate(180deg);
}

.skill-bars {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.skill-bar {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.skill-bar span {
  font-size: 0.78rem;
  color: var(--text-2);
}

.skill-track {
  height: 3px;
  background: var(--surface-3);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  width: var(--pct);
  background: linear-gradient(90deg, #3123b3, #1c6cf1, #00b8c6, #83d548, #ffe430);
  border-radius: var(--radius-full);
  animation: growWidth 0.8s var(--ease-out) both;
}

@keyframes growWidth {
  from {
    width: 0;
  }

  to {
    width: var(--pct);
  }
}

/* Right Sidebar Container */
.about-sidebar-right {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 2rem;
}

/* Music section */
.about-music,
.about-epitomes,
.about-paintings {
  background: var(--surface);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  animation: fadeIn 0.7s var(--ease-out) 0.2s both;
}

.about-epitomes,
.about-paintings {
  animation-delay: 0.3s;
}

.epitome-group {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.epitome-group:last-child {
  border-bottom: none;
}

.epitome-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 0.6rem;
}

.epitome-content {
  font-size: 0.82rem;
  color: var(--text-2);
  line-height: 1.5;
  margin: 0;
}

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

.epitome-list li {
  position: relative;
  padding-left: 0.8rem;
}

.epitome-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent-1);
}

.epitome-list a {
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--dur-fast);
}

.epitome-list a:hover {
  color: var(--accent-1);
}

/* Epitomes: Book Gallery */
.book-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.book-cover {
  aspect-ratio: 2 / 3;
  border-radius: 4px;
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-1);
  font-size: 0.6rem;
  text-decoration: none;
  overflow: hidden;
  position: relative;
  transition: transform 0.2s var(--ease-out);
}

.book-cover:hover {
  transform: translateY(-2px) scale(1.05);
}

.book-cover-title {
  padding: 0.4rem;
  text-align: center;
  font-weight: 500;
  line-height: 1.2;
  opacity: 0.9;
  word-wrap: break-word;
}

/* Epitomes: Profile Grid */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.profile-avatar {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background-color: var(--surface-3);
  border: 2px solid var(--surface-2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-name {
  font-size: 0.65rem;
  text-align: center;
  color: var(--text-2);
  line-height: 1.2;
}

/* Epitomes: Ticket List */
.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.movie-ticket {
  display: flex;
  background: var(--surface-2);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  align-items: center;
  /* Vintage ticket cutouts */
  mask-image: radial-gradient(circle at 0 50%, transparent 6px, black 7px), radial-gradient(circle at 100% 50%, transparent 6px, black 7px);
  mask-size: 51% 100%;
  mask-repeat: no-repeat;
  mask-position: left, right;
  -webkit-mask-image: radial-gradient(circle at 0 50%, transparent 6px, black 7px), radial-gradient(circle at 100% 50%, transparent 6px, black 7px);
  -webkit-mask-size: 51% 100%;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: left, right;
  border: 1px solid var(--border);
  height: 64px;
}

.ticket-stub {
  padding: 0.5rem 0.6rem;
  border-right: 2px dashed var(--border-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--text-2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  min-width: 50px;
}

.ticket-body {
  padding: 0.5rem 0.75rem;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ticket-title {
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--text-1);
  font-weight: 500;
  line-height: 1.2;
}

/* Epitomes: Painting Gallery (Passe-Partout) */
.painting-gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;
}

.passe-partout {
  background: #fdfdfd;
  padding: 1rem;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.3);
  border: 4px solid #1a1a1a;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.passe-partout::after {
  content: '';
  position: absolute;
  inset: 0.8rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: inset 1px 1px 4px rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

.painting-canvas {
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: var(--surface-3);
  background-size: cover;
  background-position: center;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--text-3);
  text-align: center;
  padding: 1rem;
  position: relative;
  z-index: 1;
}

.painting-caption {
  font-family: var(--font-body);
  font-size: 0.65rem;
  color: var(--text-2);
  text-align: center;
  margin-top: 0.6rem;
  margin-bottom: 0.6rem;
  font-style: italic;
}

.more-paintings {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
}

.more-paintings summary {
  order: 2;
  cursor: pointer;
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  padding: 0;
  background: transparent;
  border: none;
  transition: color 0.2s;
  opacity: 0.7;
}

.more-paintings summary:hover {
  color: var(--accent-1);
  opacity: 1;
}

.more-paintings summary::-webkit-details-marker {
  display: none;
}

.more-paintings summary .cv-chevron {
  transition: transform 0.3s var(--ease-out);
}

.more-paintings[open] summary .cv-chevron {
  transform: rotate(180deg);
}

.more-paintings-content {
  order: 1;
  margin-top: 0;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}


.music-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  border-bottom: var(--glass-border);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-2);
}

.music-source {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 3px;
}

.music-tracks {
  display: flex;
  flex-direction: column;
}

.track-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1.25rem;
  border-bottom: 1px solid var(--border);
  transition: background var(--dur-fast);
}

.track-row:last-child {
  border-bottom: none;
}

.track-row:hover {
  background: var(--surface-2);
}

.track-now-playing {
  background: rgba(54, 137, 230, 0.06);
}

.track-now-playing:hover {
  background: rgba(54, 137, 230, 0.09);
}

.track-art {
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  width: 40px;
  height: 40px;
}

.track-info {
  flex: 1;
  min-width: 0;
}

.track-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-artist {
  font-size: 0.75rem;
  color: var(--text-2);
}

.track-album {
  font-size: 0.68rem;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-status {
  flex-shrink: 0;
}

.track-time {
  font-size: 0.68rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.now-playing-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: #f37329;
  letter-spacing: 0.04em;
}

.np-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f37329;
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.5);
    opacity: 0.6;
  }
}

.music-stats {
  display: flex;
  padding: 0.75rem 1.25rem;
  border-top: var(--glass-border);
  gap: 1rem;
}

.music-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-1);
}

.stat-lbl {
  font-size: 0.65rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px) translateY(-50%);
  }

  to {
    opacity: 1;
    transform: translateX(0) translateY(-50%);
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .about-grid {
    grid-template-columns: 200px 1fr 260px;
    gap: 1.5rem;
  }
}

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

  .about-music {
    position: static;
    order: -1;
  }

  .about-sidebar-left {
    order: 2;
  }

  .project-cards {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .about-sidebar-left .skills-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .about-hero {
    flex-direction: column;
    align-items: center;
  }

  .about-page {
    padding: 2rem 1rem 8rem;
  }

  .single-page {
    padding: 2rem 1rem 8rem;
  }

  .node-preview {
    right: 1rem;
    left: 1rem;
    width: auto;
    top: auto;
    bottom: 6rem;
    transform: none;
  }

  @keyframes slideInRight {
    from {
      opacity: 0;
      transform: translateY(20px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .home-wordmark {
    top: 1rem;
    left: 1rem;
  }

  .zoom-knob {
    left: 1rem;
  }
}

/* ============================================================
   LIST PAGE
   ============================================================ */
.list-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 4rem 2rem 8rem;
}

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

.list-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.list-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  color: var(--text-1);
  transition: all var(--dur-mid);
  animation: fadeIn 0.5s var(--ease-out) both;
}

.list-item:hover {
  background: var(--surface-2);
  border-color: var(--accent-1);
  transform: translateX(4px);
}

.list-item h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
}

.list-item p {
  font-size: 0.85rem;
  color: var(--text-2);
}

.list-item time {
  font-size: 0.75rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-2);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-3);
}

/* ============================================================
   FOCUS VISIBLE
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--accent-1);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer-container {
  display: flex;
  flex-direction: column;
  margin-top: 6rem;
  background-image: url('/images/rect3.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  padding: 0 2rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: #000;
}

.footer-meta-left {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

.footer-quote {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: #000;
  font-style: italic;
}

.footer-meta-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
}

.footer-bisc {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.bisc-img {
  width: 100px;
  height: 28px;
  opacity: 0.8;
  transition: opacity var(--dur-fast), transform var(--dur-fast);
}

.bisc-img:hover {
  opacity: 1;
  transform: scale(1.1);
}

.bisc-tooltip {
  position: absolute;
  bottom: 100%;
  right: 0;
  transform: translateY(4px);
  margin-bottom: 8px;
  background: var(--surface-panel);
  color: var(--text-1);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur-fast), transform var(--dur-fast);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.footer-bisc:hover .bisc-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.footer-contact {
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #000;
  transition: opacity var(--dur-fast);
}

.footer-contact:hover {
  opacity: 0.7;
}

@media (max-width: 900px) {
  .footer-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 0 1rem;
  }

  .footer-meta-right {
    align-items: flex-start;
  }

  .bisc-tooltip {
    right: auto;
    left: 0;
  }
}

/* ============================================================
   FILM REEL (HOME)
   ============================================================ */
.film-reel-section {
  padding: 6rem 0 4rem;
  max-width: 100vw;
  overflow: hidden;
  position: relative;
  z-index: var(--z-ui);
}

.film-reel-header {
  padding: 0 4vw;
  margin-bottom: 2.5rem;
}

.film-reel-title {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 300;
  color: var(--text-1);
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
}

.film-reel-subtitle {
  font-size: 0.95rem;
  color: var(--text-2);
}

.film-reel-track {
  padding: 0 4vw 3rem 4vw;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE and Edge */
}

.film-strip {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  width: max-content;
  min-width: 100%;
  gap: 16px;
  /* Increased gap between frames */
  padding: 36px 16px;
  background: rgba(40, 22, 10, 0.85);
  /* Dark brown translucent */
  border-radius: 4px;
  counter-reset: film-frame;
  /* Initialize counter for amber numbers */

  /* Mask to punch out the film reel holes additively */
  -webkit-mask-image:
    linear-gradient(black, black),
    linear-gradient(black, black),
    linear-gradient(to bottom, transparent 24px, black 24px, black calc(100% - 24px), transparent calc(100% - 24px)),
    repeating-linear-gradient(to right, black 0, black 16px, transparent 16px, transparent 32px),
    repeating-linear-gradient(to right, black 0, black 16px, transparent 16px, transparent 32px);
  -webkit-mask-size:
    100% 6px,
    100% 6px,
    100% 100%,
    100% 24px,
    100% 24px;
  -webkit-mask-position:
    0 0,
    0 100%,
    0 0,
    0 0,
    0 100%;
  -webkit-mask-repeat: no-repeat;

  mask-image:
    linear-gradient(black, black),
    linear-gradient(black, black),
    linear-gradient(to bottom, transparent 24px, black 24px, black calc(100% - 24px), transparent calc(100% - 24px)),
    repeating-linear-gradient(to right, black 0, black 16px, transparent 16px, transparent 32px),
    repeating-linear-gradient(to right, black 0, black 16px, transparent 16px, transparent 32px);
  mask-size:
    100% 6px,
    100% 6px,
    100% 100%,
    100% 24px,
    100% 24px;
  mask-position:
    0 0,
    0 100%,
    0 0,
    0 0,
    0 100%;
  mask-repeat: no-repeat;

  /* Backlight effect: outer glow and subtle inner glow */
  box-shadow: 0 0 48px rgba(255, 170, 0, 0.15), inset 0 0 60px rgba(255, 170, 0, 0.05);
}

.film-reel-track::-webkit-scrollbar {
  display: none;
}

.film-reel-card {
  flex: 0 0 320px;
  min-height: 220px;
  scroll-snap-align: start;
  background: rgba(0, 0, 0, 0.25);
  /* Embedded frame look */
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(0, 0, 0, 0.5);
  /* Recessed border */
  border-radius: 4px;
  /* Smaller border radius */
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform var(--dur-mid), background var(--dur-mid), border-color var(--dur-mid);
  text-decoration: none;
  position: relative;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.4);
  /* Inner shadow instead of drop shadow */
  counter-increment: film-frame;
}

/* Amber film numbering */
.film-reel-card::before {
  content: "KIPU  " counter(film-frame, decimal-leading-zero);
  position: absolute;
  top: -24px;
  left: 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #ffb300;
  /* Amber */
  letter-spacing: 0.15em;
  opacity: 0.7;
}

.film-reel-card::after {
  content: "→";
  position: absolute;
  bottom: -24px;
  right: 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #ffb300;
  opacity: 0.7;
}

.film-reel-card:hover {
  background: rgba(0, 0, 0, 0.1);
  border-color: rgba(255, 255, 255, 0.1);
}

.film-reel-bg-icon {
  position: absolute;
  inset: 0;
  background-size: 50%;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.25;
  z-index: 1;
  mix-blend-mode: screen;
  transition: opacity var(--dur-mid), transform var(--dur-mid);
}

.film-reel-card:hover .film-reel-bg-icon {
  opacity: 0.45;
}

.film-reel-bg-cover {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.35;
  z-index: 1;
  mix-blend-mode: screen;
  transition: opacity var(--dur-mid), transform var(--dur-mid), filter var(--dur-mid);
  filter: grayscale(80%) contrast(1.2);
}

.film-reel-card:hover .film-reel-bg-cover {
  opacity: 0.6;
  filter: grayscale(0%) contrast(1.1);
}

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

.film-reel-type {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffb300;
  /* Amber accent */
  opacity: 0.8;
  margin-bottom: 0.5rem;
  display: inline-block;
}

.film-reel-card-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.95);
  /* Forced light */
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.film-reel-card-desc {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  /* Forced light */
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 600px) {
  .film-reel-card {
    flex: 0 0 280px;
  }
}

/* ============================================================
   ONBOARDING OVERLAY
   ============================================================ */
.graph-onboarding-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 25;
  /* Below dock (30) */
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn var(--dur-mid) var(--ease-out) both;
  cursor: pointer;
}

.graph-onboarding-overlay.hiding {
  animation: fadeOut var(--dur-mid) var(--ease-out) both;
}

.onboarding-content {
  width: min(420px, 90vw);
  animation: panelPop var(--dur-mid) var(--ease-spring) both;
  color: var(--text-1);
}

.onboarding-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.onboarding-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.1rem;
  color: var(--text-2);
}

.onboarding-list strong {
  color: var(--text-1);
  font-weight: 600;
}

.onboarding-icon {
  width: 28px;
  height: 28px;
  fill: #f37329;
  flex-shrink: 0;
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

/* ============================================================
   WELCOME OVERLAY
   ============================================================ */
.welcome-overlay {
  position: absolute;
  inset: 0;
  z-index: 25;
  /* Below the dock which is z-index 30 */
  background: rgba(0, 0, 0, 0.2);
  /* Moderated glass style */
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 1s ease;
  pointer-events: auto;
}

.welcome-overlay[hidden] {
  display: none !important;
}

.welcome-overlay.hiding {
  opacity: 0;
  pointer-events: none;
}

.welcome-content {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--text-1);
  max-width: 650px;
  text-align: center;
  line-height: 1.6;
  min-height: 120px;
  padding: 0 2rem;
}

.typing-cursor {
  display: inline-block;
  width: 12px;
  height: 3px;
  background-color: #f37329;
  vertical-align: baseline;
  animation: blink 1s step-end infinite;
  margin-left: 4px;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.welcome-continue-prompt {
  position: absolute;
  bottom: 25%;
  font-size: 0.9rem;
  color: var(--text-2);
  animation: pulseOpacity 2s ease-in-out infinite alternate;
  cursor: pointer;
  padding: 10px;
}

@keyframes pulseOpacity {
  from {
    opacity: 0.5;
  }

  to {
    opacity: 1;
  }
}

/* ============================================================
   DOCK POINTERS (WELCOME SEQUENCE)
   ============================================================ */
.dock-pointers-container {
  position: absolute;
  bottom: 95px;
  /* Above the dock */
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  width: 380px;
  /* Fixed width to force equal columns */
}

.dock-pointer {
  flex: 1 1 0px;
  /* Equal width columns */
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-1);
  font-size: 0.85rem;
  font-weight: 500;
  animation: fadeIn var(--dur-mid) var(--ease-out) both;
}

.dock-pointer-icon {
  width: 20px;
  height: 20px;
  fill: #f37329;
}

/* We don't need absolute positioning anymore since they are in a tightly spaced flex row */
.left-pointer {
  align-items: flex-end;
}

.center-pointer {
  align-items: center;
}

.right-pointer {
  align-items: flex-start;
}