/* =============================================================================
   naquuuu: personal product architecture & systems workstation
   Operating with strict MECE boundaries & dual-mode aesthetic:
     - [ systems & matter ]: Swiss Technical Architectural Paper (#FBFBFA)
     - [ culture & taste ]: Deep Velvet Crimson & Dark Maroon Palette (#120305)
   ============================================================================= */


:root {
  /* --- Swiss Technical Editorial Light Palette (Default: Systems & Matter) --- */
  --bg-primary: #FBFBFA;              /* Warm architectural paper */
  --bg-surface: #F2F2ED;              /* Muted technical slate */
  --bg-surface-elevated: #ECECE6;     /* Technical elevated panel */
  --bg-card: #FFFFFF;                 /* Pure clean card container */
  --bg-card-hover: #F8F8F4;           /* Card hover state */
  --bg-input: #FFFFFF;
  --bg-code: #F0EFEA;

  /* --- Technical Hairline Dividers --- */
  --border-subtle: #E5E5DF;           /* 1px subtle hairline divider */
  --border-active: #D4D4CE;           /* Emphasized structural border */
  --border-crimson: #DC2626;          /* Telemetry Red accent border */
  --border-glow: rgba(220, 38, 38, 0.2);

  /* --- 3-Color Font Hierarchy (Strictly 3 max per theme) --- */
  --text-primary: #111110;            /* 1. Primary: Deep ink black */
  --text-secondary: #555550;          /* 2. Secondary: Warm graphite (body & muted) */
  --text-accent: #DC2626;             /* 3. Accent: Telemetry red (links & active) */
  --text-muted: var(--text-secondary);
  --text-code: var(--text-primary);

  /* --- Functional Telemetry Accents --- */
  --accent-crimson: #DC2626;          /* International Telemetry Red */
  --accent-crimson-hover: #B91C1C;
  --accent-crimson-dim: rgba(220, 38, 38, 0.08);
  --accent-wine: #991B1B;

  --term-cyan: var(--text-secondary);
  --term-green: var(--text-secondary);
  --term-yellow: var(--text-secondary);
  --term-red: var(--text-accent);
  --spotify-green: var(--text-accent);

  /* --- Font Stack: Plus Jakarta Sans UI + headings, Open Sans reading text, JetBrains Mono labels/code --- */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display: var(--font-sans);
  --font-read: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;
  --font-code: var(--font-mono);

  --max-w-content: 1040px;
  --max-w-wide: 1140px;

  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px rgba(220, 38, 38, 0.12);
  --shadow-elevated: 0 8px 24px rgba(0, 0, 0, 0.08);

  --theme-transition: background-color 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                      border-color 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                      color 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                      box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1);

  /* --- WP2 Motion & Editorial Tokens (Obys-style design language) --- */
  --ease-editorial: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-dissolve: cubic-bezier(0.2, 0, 0, 1);   /* lens dissolve (2026-10-15 motion kit) */
  --motion-reveal-duration: 0.18s;
  --motion-reveal-distance: 8px;
  --motion-dissolve-duration: 0.18s;
  --marquee-speed: 40s;
  --media-hover-scale: 1.015;
}

/* =============================================================================
   DYNAMIC THEME SHIFT: CULTURE & TASTE MODE
   Soft Warm Espresso-Maroon & Terracotta Palette (Sophisticated & Editorial)
   ============================================================================= */
body[data-mode="culture"] {
  --bg-primary: #160E10;              /* Warm roasted espresso-maroon canvas */
  --bg-surface: #22171A;              /* Refined warm dark panels & cards */
  --bg-surface-elevated: #2B1D21;     /* Elevated headers & toolbars */
  --bg-card: #22171A;                 /* Card container */
  --bg-card-hover: #2D1F23;           /* Hovered card state */
  --bg-input: #322227;
  --bg-code: #120A0C;

  --border-subtle: #362529;           /* Subtle warm espresso borders */
  --border-active: #4F353B;           /* Active panel borders */
  --border-crimson: #D96E6B;          /* Soft terracotta crimson accent border */
  --border-glow: rgba(217, 110, 107, 0.35);

  /* --- 3-Color Font Hierarchy (Strictly 3 max per theme) --- */
  --text-primary: #F5ECE8;            /* 1. Primary: Soft warm linen */
  --text-secondary: #B5A5A0;          /* 2. Secondary: Warm taupe (body & muted) */
  --text-accent: #D96E6B;             /* 3. Accent: Soft terracotta crimson */
  --text-muted: #B58287;              /* WP2: measured 5.0:1 to 6.1:1 across culture surfaces (was taupe) */
  --text-code: var(--text-primary);

  --accent-crimson: #D96E6B;          /* Soft terracotta crimson */
  --accent-crimson-hover: #E7837F;
  --accent-crimson-dim: rgba(217, 110, 107, 0.14);
  --accent-wine: #9A3836;

  --term-cyan: var(--text-secondary);
  --term-green: var(--text-secondary);
  --term-yellow: var(--text-secondary);
  --term-red: var(--text-accent);
  --spotify-green: var(--text-accent);

  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(217, 110, 107, 0.2);
  --shadow-elevated: 0 8px 32px rgba(0, 0, 0, 0.65);
}

/* =============================================================================
   Base & Anti-Overflow Resets (Blog Reliability Standard)
   ============================================================================= */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-primary);
  transition: background-color 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.935rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip; /* Blog Reliability Standard: safety net against horizontal spill */
  transition: var(--theme-transition);
}

/* Content elements never exceed container bounds */
img, svg, video, iframe, pre, table {
  max-width: 100%;
}

img, video, iframe {
  height: auto;
}

pre {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  font-family: var(--font-code);
}

code, kbd, samp {
  font-family: var(--font-code);
}

table {
  width: 100%;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

a:hover {
  color: var(--accent-crimson-hover);
}

/* Flex / grid children never break parent bounds */
.wrap, .wrap-wide, .nav, .nav-container, .nav-links, .hero-editorial-grid,
.loop-cards-grid, .loop-card, .dossier-card, .inquiry-card, .comp-col,
.view-panel, .culture-card, .pdf-viewer-wrap, .notes-stack, .note-item,
.fashion-matrix-grid, .taste-vector-grid, .creative-links-bar, .battle-card,
.proof-card, .flowchart-whiteboard-box, .concept-box, .essay-article, .essay-content,
.failure-tree-grid, .degrade-grid, .portrait-technical-wrap,
.instagram-dossier-grid, .instagram-info-col, .instagram-media-col, .instagram-footer-col,
.spotify-dossier-card, .spotify-dossier-grid, .spotify-info-col, .spotify-media-col, .spotify-footer-col,
.spotify-profile-header, .spotify-profile-meta,
.spotify-direction-grid, .spotify-direction-item, .spotify-card-footer,
.mode-switcher-container, .mode-switcher-label,
.dossier-tab, .loop-card-step-group, .loop-step-node,
.essay-filter-bar, .essay-filter-btn, .essay-grid, .essay-card, .essay-card-link,
.hero-headline, .hero-headline-name, .hero-headline-sub,
.sim-system-box, .sim-toolbar, .sim-mode-btn, .sim-canvas-wrap, .sim-telemetry-grid, .sim-metric-card, .sim-metric-val, .sim-metric-label {
  min-width: 0;
}

/* Containers */
.wrap {
  width: 100%;
  max-width: var(--max-w-content);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.wrap-wide {
  width: 100%;
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Horizontal scroll container utility */
.scroll-x {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  width: 100%;
  min-width: 0;
}

/* Touch Targets: minimum 44x44px hitbox for accessibility */
button, .btn-primary, .btn-secondary, .inquiry-btn, .creative-btn,
.mode-tab-btn, .nav-audio-pill, .proof-deck-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* Prevent iOS auto-zoom on input focus */
input, select, textarea {
  font-size: 16px;
}

/* Headings */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  transition: color 0.45s ease;
}

/* =============================================================================
   Header Navigation: Strict Single-Row, Jakarta Clock & Controls
   ============================================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(251, 251, 250, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--theme-transition);
}

body[data-mode="culture"] .site-header {
  background: rgba(18, 3, 5, 0.92);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  gap: 0.75rem;
  overflow-x: visible;
}

.nav-brand-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.nav-brand {
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  letter-spacing: -0.02em;
}

.nav-brand:hover {
  color: var(--accent-crimson-hover);
}

.nav-telemetry-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background-color: var(--accent-crimson);
  box-shadow: 0 0 10px var(--accent-crimson);
  animation: pulse-telemetry 2s infinite ease-in-out;
  transition: background-color 0.45s ease, box-shadow 0.45s ease;
}

@keyframes pulse-telemetry {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.nav-clock {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  padding: 3px 8px;
  background: rgba(220, 38, 38, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  transition: var(--theme-transition);
}

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

body[data-mode="culture"] .nav-clock {
  background: rgba(217, 110, 107, 0.08);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 1;
  min-width: 0;
}

/* Audio Telemetry Pill (Hukum Murphy) */
.nav-audio-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-active);
  color: var(--text-secondary);
  padding: 0 0.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  gap: 0.45rem;
  transition: all 0.2s ease;
}

.nav-audio-pill:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--accent-crimson);
  color: var(--text-primary);
  box-shadow: 0 0 14px var(--accent-crimson-dim);
}

.nav-audio-pill.playing {
  background: rgba(220, 38, 38, 0.12);
  border-color: var(--accent-crimson);
  color: var(--accent-crimson-hover);
}

body[data-mode="culture"] .nav-audio-pill.playing {
  background: rgba(217, 110, 107, 0.18);
  border-color: var(--accent-crimson);
  color: var(--accent-crimson-hover);
}

.nav-audio-wave {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.nav-wave-bar {
  width: 2px;
  height: 12px;
  background: currentColor;
  border-radius: 1px;
  transform: scaleY(0.34);
  transform-origin: bottom;
  opacity: 0.5;
  transition: transform 120ms linear, opacity 120ms linear;
}

/* Static per-state icon, no pulsing: the pill signals playback with an opacity
   crossfade only (2026-10-15 motion kit, L-24 unchanged). */
.nav-audio-pill.playing .nav-wave-bar {
  opacity: 1;
}
.nav-audio-pill.playing .nav-wave-bar:nth-child(1) {
  transform: scaleY(0.42);
}
.nav-audio-pill.playing .nav-wave-bar:nth-child(2) {
  transform: scaleY(1);
}
.nav-audio-pill.playing .nav-wave-bar:nth-child(3) {
  transform: scaleY(0.62);
}

/* Floating Lens Switcher: the single post-load lens control on every viewport.
   Visible past the hero name (scrollY > 180, JS-driven), hidden at top. */
.sticky-perspective-wrap {
  position: fixed;
  top: 68px; /* sits below the 58px desktop header */
  left: 50%;
  transform: translateX(-50%);
  z-index: 995;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms linear; /* out 120ms; in 180ms via .visible (2026-10-15 motion kit) */
}

.sticky-perspective-wrap.visible {
  opacity: 1;
  pointer-events: auto;
  transition-duration: 180ms;
}

.sticky-perspective-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  gap: 3px;
  background: rgba(251, 251, 250, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transition: border-color 0.45s ease, background-color 0.45s ease, box-shadow 0.45s ease;
}

body[data-mode="culture"] .sticky-perspective-inner {
  background: rgba(27, 18, 20, 0.94);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.sticky-perspective-inner .mode-tab-btn {
  padding: 0.3rem 0.75rem;
  font-size: 0.72rem;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .sticky-perspective-wrap {
    top: 58px;
    width: calc(100% - 2rem);
    max-width: 360px;
  }

  .sticky-perspective-inner {
    width: 100%;
  }

  .sticky-perspective-inner .mode-tab-btn {
    flex: 1;
    justify-content: center;
    padding: 0.3rem 0.5rem;
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 1;
  min-width: 0;
}

.nav-link {
  font-family: var(--font-sans);
  font-size: 0.74rem;
  color: var(--text-secondary);
  padding: 0.25rem 0.45rem;
  border-radius: var(--radius-xs);
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.25);
  transform: translateY(-1px);
}

/* Red / Creative Mode Nav Links & Hover */
body[data-mode="culture"] .nav-link {
  color: var(--text-secondary);
  border: 1px solid transparent;
}

body[data-mode="culture"] .nav-link:hover {
  color: #FFFFFF;
  background: rgba(217, 110, 107, 0.22);
  border-color: var(--accent-crimson);
  box-shadow: 0 0 14px rgba(217, 110, 107, 0.45);
  transform: translateY(-1px);
}

body[data-mode="culture"] .nav-link:active {
  color: #160E10;
  background: var(--accent-crimson);
  border-color: var(--accent-crimson-hover);
}

/* WCAG 1.4.3 in culture mode: white text collapses on the terracotta fills
   (#FFF on #D96E6B = 3.28:1, #FFF on #E7837F = 2.64:1). Espresso ink instead:
   #160E10 on #D96E6B = 5.79:1, #160E10 on #E7837F = 7.20:1. Light theme keeps #FFFFFF. */
body[data-mode="culture"] .nav-back-link:hover,
body[data-mode="culture"] .inquiry-btn:hover,
body[data-mode="culture"] .inquiry-btn--cv,
body[data-mode="culture"] .inquiry-btn--cv:hover,
body[data-mode="culture"] .btn-primary,
body[data-mode="culture"] .btn-primary:hover,
body[data-mode="culture"] .essay-filter-btn.active,
body[data-mode="culture"] .sim-mode-btn.active,
body[data-mode="culture"] .quick-cv,
body[data-mode="culture"] .quick-cv:hover,
body[data-mode="culture"] .quick-cv:focus-visible,
body[data-mode="culture"] .quick-tile--cv:hover,
body[data-mode="culture"] .quick-tile--cv:focus-visible,
body[data-mode="culture"] .nav-cv-chip:hover,
body[data-mode="culture"] .nav-cv-chip:focus-visible {
  color: #160E10;
}

/* Sticky Header Offset for All Sections (WCAG 2.4.11: the 58px sticky header must not cover anchor or focus targets) */
#main-content,
#philosophy,
#operating-philosophy,
#artifacts,
#notes,
#inquiries,
#culture-philosophy,
#culture-artifacts,
#culture-notes {
  scroll-margin-top: 76px;
}

.nav-back-link {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent-crimson);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-active);
  background: var(--accent-crimson-dim);
  transition: all 0.2s ease;
  text-decoration: none;
}

.nav-back-link:hover {
  background: var(--accent-crimson);
  color: #FFFFFF;
  border-color: var(--accent-crimson-hover);
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.4);
}

/* Subpage Legacy Header Styles */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  white-space: nowrap;
}

.site-title {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.96rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.prompt-user {
  color: var(--text-primary);
}

.prompt-at {
  color: var(--accent-crimson);
}

.prompt-host {
  color: var(--text-muted);
}

.prompt-badge {
  font-size: 0.7rem;
  padding: 1px 6px;
  border: 1px solid var(--border-active);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  background: rgba(220, 38, 38, 0.05);
}

/* =============================================================================
   SECTION 1: HERO & SINGLE DYNAMIC PORTRAIT FRAME
   ============================================================================= */

.section-hero {
  padding: 0.75rem 0 1.25rem 0;
  border-bottom: 1px solid var(--border-subtle);
  background: radial-gradient(circle at 15% 25%, rgba(220, 38, 38, 0.04) 0%, transparent 60%);
  transition: var(--theme-transition);
}

body[data-mode="culture"] .section-hero {
  background: radial-gradient(circle at 85% 25%, rgba(217, 110, 107, 0.12) 0%, transparent 60%),
              radial-gradient(circle at 15% 75%, rgba(29, 185, 84, 0.06) 0%, transparent 60%);
}

.hero-editorial-grid {
  display: grid;
  grid-template-columns: 1.24fr 0.76fr;
  gap: 0.75rem 2.5rem;
  align-items: center;
}

.hero-sub-identity {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: 0.05em;
  color: var(--accent-crimson);
  margin-bottom: 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  background: var(--accent-crimson-dim);
  border: 1px solid rgba(220, 38, 38, 0.18);
  transition: color 0.45s ease, background-color 0.45s ease, border-color 0.45s ease;
}

.hero-sub-identity::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--accent-crimson);
  box-shadow: 0 0 6px var(--accent-crimson);
}

.hero-headline {
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.hero-headline-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.35rem, 5.5vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  transition: color 0.45s ease;
}

.hero-headline-thesis {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.25rem, 3.2vw, 2rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-top: 0.5rem;
  max-width: 22ch;
}

.hero-headline-thesis em {
  font-style: normal;
  color: var(--accent-crimson);
}

.hero-headline-subthesis {
  display: block;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 0.55rem;
  max-width: 42ch;
}

@media (min-width: 769px) {
  .hero-headline-name {
    white-space: nowrap;
  }
}

.hero-epigraph {
  border-left: 3px solid var(--accent-crimson);
  padding: 0.35rem 0 0.35rem 1.15rem;
  margin: 0.85rem 0 0.9rem 0;  font-style: italic;
  color: var(--text-secondary);
  font-size: 0.95rem;
  background: transparent;
  border-radius: 0;
  transition: var(--theme-transition);
}

body[data-mode="culture"] .hero-epigraph {
  background: transparent;
}

.hero-epigraph cite {
  display: block;
  font-style: normal;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  font-family: var(--font-mono);
}

.hero-epigraph cite a {
  color: var(--accent-crimson-hover);
  text-decoration: underline;
}

.hero-prose {
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.hero-prose strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Strictly ONE Single Dynamic Portrait Frame */
.portrait-technical-wrap {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  box-shadow: var(--shadow-card);
  transition: var(--theme-transition);
}

.portrait-corner-tl, .portrait-corner-br {
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: var(--accent-crimson);
  pointer-events: none;
  transition: border-color 0.45s ease;
}

.portrait-corner-tl {
  top: -1px;
  left: -1px;
  border-top: 2px solid var(--accent-crimson);
  border-left: 2px solid var(--accent-crimson);
}

.portrait-corner-br {
  bottom: -1px;
  right: -1px;
  border-bottom: 2px solid var(--accent-crimson);
  border-right: 2px solid var(--accent-crimson);
}

.portrait-img {
  width: 100%;
  aspect-ratio: 1066 / 1120;
  height: auto;
  border-radius: var(--radius-sm);
  display: block;
  object-fit: cover;
  object-position: top center;
  transition: opacity var(--motion-dissolve-duration) var(--ease-dissolve), filter 0.45s ease;
}

/* Second portrait layer: the lens dissolve crossfades the two portraits in place,
   same box and same source aspect, so the swap never moves geometry (2026-10-15). */
.portrait-img--layer {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  width: calc(100% - 1rem);
  height: auto;
  opacity: 0;
  pointer-events: none;
}

.portrait-meta-strip {
  display: flex;
  justify-content: space-between;
  padding: 0.55rem 0.25rem 0.15rem 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* =============================================================================
   DUAL-MODE PERSPECTIVE SWITCHER: ANIMATED PILL
   ============================================================================= */

.hero-side-block {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.hero-side-block .hero-epigraph {
  margin: 0;
}

.hero-head-block,
.hero-body-block {
  grid-column: 1;
  min-width: 0;
}

.hero-head-block {
  grid-row: 1;
}

.hero-body-block {
  grid-row: 3;
}

.mode-switch-wrap {
  grid-column: 1;
  grid-row: 2;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.mode-switcher-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.85rem;
}

.mode-switcher-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: 0.05em;
  color: var(--accent-crimson);
  white-space: nowrap;
}

.mode-switcher-spark {
  font-size: 0.76rem;
  display: inline-block;
  animation: sparkPulse 2.4s infinite ease-in-out;
}

@keyframes sparkPulse {
  0%, 100% { opacity: 0.5; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.18); }
}

.mode-switcher {
  position: relative;
  display: inline-flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-sm);
  padding: 4px;
  gap: 4px;
  transition: border-color 0.45s ease, background-color 0.45s ease;
}

.mode-tab-btn {
  position: relative;
  z-index: 2;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0 1.25rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mode-tab-btn:hover {
  color: var(--text-primary);
}

@keyframes tabActivePop {
  0% { transform: scale(0.97); }
  60% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.mode-tab-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-crimson);
  box-shadow: var(--shadow-glow);
  animation: tabActivePop 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
}

body[data-mode="culture"] .mode-tab-btn.active {
  background: var(--bg-surface-elevated);
  border-color: var(--border-crimson);
  box-shadow: var(--shadow-glow);
}

.mode-tab-icon {
  font-size: 0.85rem;
  color: var(--accent-crimson);
  transition: color 0.45s ease;
}

/* Tactile "Already at this section" feedback animation */
@keyframes alreadyHereShake {
  0% { transform: translateX(0); }
  15% { transform: translateX(-7px); }
  30% { transform: translateX(6px); }
  45% { transform: translateX(-4px); }
  60% { transform: translateX(3px); }
  75% { transform: translateX(-1.5px); }
  90% { transform: translateX(1px); }
  100% { transform: translateX(0); }
}

.already-here-shake {
  animation: alreadyHereShake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  will-change: transform;
}

@keyframes navClickFeedback {
  0% { transform: scale(1); }
  30% { transform: scale(0.92); }
  60% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

.nav-click-feedback {
  animation: navClickFeedback 0.35s ease both;
}

/* Animated Tab Panels */
.view-panel {
  display: none;
}

.view-panel.active {
  display: block;
  animation: modeShift var(--motion-dissolve-duration) var(--ease-dissolve) forwards;
}

/* opacity only: the lens dissolve never animates geometry (2026-10-15 motion kit) */
@keyframes modeShift {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* =============================================================================
   SECTION: THE RESILIENT LOOP (4-STEP CARDS)
   ============================================================================= */

.section-loop-cards {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.loop-cards-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.loop-cards-title {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: lowercase;
  letter-spacing: 0.04em;
}

.loop-cards-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.loop-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  position: relative;
}

.loop-card {
  background: var(--bg-primary);
  border: none;
  border-radius: 0;
  padding: 1.6rem 1.35rem;
  display: flex;
  flex-direction: column;
  transition: background-color 0.25s ease;
  box-shadow: none;
}

.loop-card:hover {
  border-top-color: transparent;
  background: var(--bg-surface);
  transform: none;
  box-shadow: none;
}

.loop-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.95rem;
  gap: 0.5rem;
}

.loop-card-step-group {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  min-width: 0;
}

.loop-step-node {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-start;
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  border: none;
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color 0.2s var(--ease-editorial), background-color 0.2s ease;
}

.loop-card:hover .loop-step-node {
  background: transparent;
  color: var(--accent-crimson);
  border-color: transparent;
}

.loop-card-step {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: lowercase;
}

.loop-card-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--accent-crimson-dim);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.loop-card-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.55rem;
  line-height: 1.3;
}

.loop-card-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* =============================================================================
   SECTION: SELECTED WORKS (SHIPPED SYSTEMS)
   ============================================================================= */

.section-works {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.section-label-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.section-label-bar--spaced {
  margin-top: 3rem;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

.section-count {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
}

.dossier-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.dossier-card {
  background: transparent;
  border: none;
  border-top: 1px solid var(--border-subtle);
  border-radius: 0;
  padding: 1.75rem 0.25rem;
  transition: border-color 0.25s ease, background-color 0.25s ease;
  box-shadow: none;
  position: relative;
}

.dossier-card:last-child {
  border-bottom: 1px solid var(--border-subtle);
}

.dossier-card:hover {
  border-top-color: var(--accent-crimson);
  box-shadow: none;
  transform: none;
}

.dossier-card:hover .dossier-link {
  color: var(--accent-crimson-hover);
  transform: translateX(4px);
}

/* Whole dossier card is clickable: the title link stretches over the card (stretched-link pattern) */
.dossier-title-link {
  color: inherit;
  text-decoration: none;
}
.dossier-title-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.dossier-card:hover .dossier-title-link,
.dossier-title-link:focus-visible {
  color: var(--accent-crimson);
}
.dossier-title-link:focus-visible {
  outline: none;
}
.dossier-card:has(.dossier-title-link:focus-visible) {
  outline: 2px solid var(--accent-crimson);
  outline-offset: 4px;
}
.dossier-card:has(.dossier-title-link) {
  cursor: pointer;
}

.dossier-tab {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: none;
  padding: 0;
  border-radius: 0;
  margin-bottom: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: lowercase;
}

.dossier-tab span:first-child {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text-muted);
  transition: color 0.2s var(--ease-editorial);
}

.dossier-card:hover .dossier-tab span:first-child {
  color: var(--accent-crimson);
}

.dossier-tab-sep {
  color: var(--border-active);
  font-weight: 400;
}

.dossier-tab-name {
  color: var(--text-muted);
}

.dossier-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dossier-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-crimson);
  background: var(--accent-crimson-dim);
  border: 1px solid var(--border-active);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.dossier-badge-dot {
  width: 5px;
  height: 5px;
  border-radius: var(--radius-full);
  background: var(--accent-crimson);
}

.dossier-category {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
}

.dossier-title {
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.dossier-body-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.35rem;
}

.dossier-subheading {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.dossier-prose {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.dossier-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.dossier-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.dossier-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 2px 9px;
  border-radius: var(--radius-full);
}

.dossier-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-crimson);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 24px; /* WCAG 2.5.8: 24px minimum target height */
  transition: color 0.15s ease, transform 0.25s var(--ease-editorial);
}

.dossier-link:hover {
  color: var(--accent-crimson-hover);
  text-decoration: underline;
}

/* Atelier Artwork Card */
.atelier-card {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 2rem;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.65rem;
  box-shadow: var(--shadow-card);
}

.atelier-card:hover {
  border-color: var(--border-crimson);
  box-shadow: var(--shadow-glow);
}

.atelier-photo-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-active);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.atelier-img {
  width: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.atelier-card:hover .atelier-img {
  transform: scale(1.02);
}

.atelier-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.atelier-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-accent);
  text-transform: lowercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.atelier-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

.atelier-prose {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* =============================================================================
   SECTION: NOTES & WRITING & COMPETENCIES
   ============================================================================= */

.section-notes-comp {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.notes-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.note-link {
  text-decoration: none;
  color: inherit;
  display: block;
  flex: 1;
}

.note-item {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  border-left: 3px solid transparent;
  border-radius: 0 10px 10px 0;
  padding: 1.35rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  transition: all 0.22s ease;
  box-shadow: none;
}

.note-item:hover {
  background: var(--bg-surface);
  border-left-color: var(--accent-crimson);
  border-bottom-color: var(--border-active);
  transform: translateX(6px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.note-main {
  flex: 1;
  min-width: 0;
}

.note-tag-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.45rem;
  flex-wrap: wrap;
}

.note-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: var(--accent-crimson-dim);
  color: var(--accent-crimson);
  border: 1px solid var(--border-crimson);
  letter-spacing: 0.04em;
}

body[data-mode="culture"] .note-tag {
  background: rgba(217, 110, 107, 0.15);
  color: var(--accent-crimson);
  border-color: var(--border-crimson);
}

.note-date {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--text-muted);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.note-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  transition: color 0.15s ease;
}

.note-item:hover .note-title {
  color: var(--accent-crimson-hover);
}

.note-summary {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.note-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  flex-shrink: 0;
  white-space: nowrap;
}

.comp-matrix-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.comp-col {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-crimson);
  border-radius: 0 12px 12px 0;
  padding: 1.35rem 1.25rem;
  box-shadow: var(--shadow-card);
  min-width: 0;
}

.comp-col-header {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-crimson);
  text-transform: lowercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.85rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-subtle);
}

.comp-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.comp-item {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.45;
}

.comp-item::before {
  content: "→";
  color: var(--text-muted);
  flex-shrink: 0;
  line-height: 1.45;
}

/* =============================================================================
   VIEW B: CULTURE & TASTE (CREATIVE SANDBOX)
   ============================================================================= */

.section-culture,
.section-culture-philosophy,
.section-culture-artifacts,
.section-culture-notes {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.culture-hero-banner {
  background: radial-gradient(circle at 10% 20%, rgba(217, 110, 107, 0.16) 0%, transparent 60%),
              radial-gradient(circle at 80% 80%, rgba(251, 191, 36, 0.08) 0%, transparent 60%),
              var(--bg-surface);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  padding: 2.25rem 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-card);
}

.culture-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent-crimson);
  background: var(--accent-crimson-dim);
  border: 1px solid var(--border-active);
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  margin-bottom: 1rem;
}

.culture-statement {
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);
  line-height: 1.5;
  letter-spacing: -0.01em;
  font-weight: 600;
  color: var(--text-primary);
  font-style: italic;
  text-wrap: pretty;
}

.culture-dossier-stack {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.culture-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  transition: all 0.25s ease;
}

.culture-card:hover {
  border-color: var(--accent-crimson);
  box-shadow: var(--shadow-glow);
}

.culture-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.culture-card-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-crimson);
  letter-spacing: 0.04em;
}

.culture-card-domain {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.culture-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.culture-card-prose {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

/* Spotify Dossier & Profile Embed */
.spotify-dossier-card {
  overflow: hidden;
}

.spotify-dossier-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "info  media"
    "footer media";
  column-gap: 2.25rem;
  row-gap: 1.25rem;
  align-items: start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.spotify-info-col {
  grid-area: info;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.spotify-info-col .culture-card-header,
.spotify-info-col .culture-card-title,
.spotify-info-col .culture-card-prose {
  margin-bottom: 0;
  max-width: 100%;
  overflow-wrap: break-word;
}

/* Spotify Curator Profile Header (Avatar + Username) */
.spotify-profile-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 0.25rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.spotify-profile-avatar-link {
  display: block;
  flex-shrink: 0;
  line-height: 0;
}

.spotify-profile-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--border-active);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.spotify-profile-avatar-link:hover .spotify-profile-img {
  border-color: var(--accent-crimson);
  transform: scale(1.04);
}

.spotify-profile-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.spotify-profile-name-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.spotify-profile-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  text-decoration: none;
}

.spotify-profile-name:hover {
  color: var(--accent-crimson-hover);
}

.spotify-profile-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-accent);
  letter-spacing: 0.03em;
}

.spotify-profile-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* Spotify Playlist Carousel Navigation (Strict Single-Row Bar) */
.spotify-carousel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Carousel strip fade: applied only when the strip actually overflows (JS-toggled) */
.spotify-carousel-tabs.is-scrollable {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}

/* Playlist Quick Tabs Track */
.spotify-carousel-tabs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px 0;
  flex: 1;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.spotify-carousel-tabs::-webkit-scrollbar {
  display: none;
}

.spotify-carousel-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.65rem;
  border-radius: var(--radius-xs);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  min-width: 0;
}

.spotify-tab-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spotify-carousel-tab:hover {
  color: var(--text-primary);
  border-color: var(--border-active);
}

.spotify-carousel-tab.active {
  background: var(--accent-crimson-dim);
  color: var(--accent-crimson);
  border-color: var(--border-crimson);
  box-shadow: 0 0 12px rgba(217, 110, 107, 0.2);
}

.spotify-tab-num {
  opacity: 0.6;
  font-size: 0.72rem;
  flex-shrink: 0;
}

.spotify-carousel-tab.active .spotify-tab-num {
  opacity: 1;
  color: var(--accent-crimson);
}

/* Spotify Direction & Sonic Pillars */
.spotify-direction-grid {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.4rem;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.spotify-direction-item {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.82rem;
  line-height: 1.5;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.spotify-direction-label {
  font-weight: 700;
  color: var(--text-accent);
  font-size: 0.74rem;
  min-width: 62px;
  flex-shrink: 0;
  text-transform: lowercase;
}

.spotify-direction-val {
  color: var(--text-secondary);
  font-size: 0.82rem;
  flex: 1;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
}

/* Spotify Player Media Column */
.spotify-media-col {
  grid-area: media;
  width: 100%;
  max-width: 420px;
  justify-self: end;
  min-width: 0;
  height: 100%;
}

.spotify-player-container {
  width: 100%;
  height: 100%;
  min-height: 440px;
  border-radius: 12px;
  overflow: hidden;
  border: none;
  background: transparent;
  line-height: 0;
}

.spotify-player-frame {
  width: 100%;
  height: 100%;
  min-height: 440px;
  border: none;
  display: block;
  border-radius: 12px;
  transition: opacity 0.2s ease;
}

/* Spotify Footer Column */
.spotify-footer-col {
  grid-area: footer;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-self: end;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  min-width: 0;
}

.spotify-card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.spotify-pill {
  font-size: 0.74rem;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-family: var(--font-sans);
}

.spotify-card-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 768px) {
  .spotify-dossier-card {
    padding: 0.95rem 0.85rem;
  }

  .spotify-dossier-grid {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .spotify-info-col {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 0.45rem;
  }

  .spotify-profile-header {
    padding: 0.38rem 0.65rem;
    gap: 0.65rem;
    margin-bottom: 0;
  }

  .spotify-profile-img {
    width: 34px;
    height: 34px;
  }

  .spotify-profile-name {
    font-size: 0.86rem;
  }

  .spotify-profile-subtitle {
    font-size: 0.72rem;
  }

  .spotify-carousel-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }

  .spotify-carousel-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.35rem;
    overflow-x: visible;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .spotify-carousel-tab {
    flex: 1 1 calc(50% - 0.2rem);
    justify-content: flex-start;
    padding: 0.3rem 0.5rem;
    font-size: 0.7rem;
    box-sizing: border-box;
    min-width: 0;
    min-height: 44px;
  }

  .spotify-tab-num {
    font-size: 0.7rem;
  }

  .culture-card-tag {
    font-size: 0.72rem;
  }

  .culture-card-domain {
    font-size: 0.7rem;
  }

  .spotify-info-col .culture-card-title {
    font-size: 1.05rem;
    line-height: 1.25;
    margin-bottom: 0.15rem;
  }

  .spotify-info-col .culture-card-prose {
    font-size: 0.78rem;
    line-height: 1.42;
    margin-bottom: 0.25rem;
  }

  .spotify-direction-grid {
    padding: 0.48rem 0.65rem;
    gap: 0.3rem;
    margin-top: 0.15rem;
  }

  .spotify-direction-item {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    font-size: 0.74rem;
    line-height: 1.35;
    gap: 0.4rem;
  }

  .spotify-direction-label {
    font-size: 0.7rem;
    min-width: 52px;
  }

  .spotify-direction-val {
    font-size: 0.74rem;
    line-height: 1.35;
  }

  .spotify-media-col {
    width: 100%;
    max-width: 100%;
    margin: 0;
    justify-self: start;
    height: auto;
  }

  .spotify-player-container {
    width: 100%;
    height: 152px;
    min-height: 152px;
    max-height: 152px;
  }

  .spotify-player-frame {
    width: 100%;
    height: 152px;
    min-height: 152px;
    max-height: 152px;
  }

  .spotify-footer-col {
    border-top: none;
    padding-top: 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .spotify-dossier-card {
    padding: 0.8rem 0.65rem;
  }

  .spotify-dossier-grid {
    gap: 0.45rem;
  }

  .spotify-info-col {
    gap: 0.35rem;
  }

  .spotify-profile-header {
    padding: 0.3rem 0.55rem;
    gap: 0.55rem;
  }

  .spotify-profile-img {
    width: 30px;
    height: 30px;
  }

  .spotify-profile-name {
    font-size: 0.82rem;
  }

  .spotify-profile-badge {
    font-size: 0.7rem;
  }

  .spotify-profile-subtitle {
    font-size: 0.7rem;
  }

  .spotify-carousel-tab {
    padding: 0.22rem 0.42rem;
    font-size: 0.7rem;
  }

  .spotify-tab-num {
    font-size: 0.7rem;
  }

  .spotify-info-col .culture-card-title {
    font-size: 0.98rem;
    line-height: 1.2;
    margin-bottom: 0.1rem;
  }

  .spotify-info-col .culture-card-prose {
    font-size: 0.74rem;
    line-height: 1.38;
    margin-bottom: 0.2rem;
  }

  .spotify-direction-grid {
    padding: 0.38rem 0.55rem;
    gap: 0.2rem;
    margin-top: 0.1rem;
  }

  .spotify-direction-item {
    font-size: 0.7rem;
    line-height: 1.3;
    gap: 0.35rem;
  }

  .spotify-direction-label {
    font-size: 0.7rem;
    min-width: 48px;
  }

  .spotify-direction-val {
    font-size: 0.7rem;
    line-height: 1.3;
  }
}

/* Instagram Dossier & Profile Embed */
.instagram-dossier-card {
  overflow: hidden;
}

.instagram-dossier-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "info  media"
    "footer media";
  column-gap: 2.25rem;
  row-gap: 1.25rem;
  align-items: start;
}

.instagram-info-col {
  grid-area: info;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.instagram-info-col .culture-card-header {
  margin-bottom: 0;
}

.instagram-info-col .culture-card-title {
  margin-bottom: 0;
}

.instagram-info-col .culture-card-prose {
  margin-bottom: 0;
}

.instagram-desktop-notes {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.4rem;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.instagram-spec-item {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.82rem;
  line-height: 1.5;
}

.instagram-spec-label {
  font-weight: 700;
  color: var(--text-accent);
  font-size: 0.74rem;
  min-width: 62px;
  text-transform: lowercase;
}

.instagram-spec-val {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.instagram-media-col {
  grid-area: media;
  width: 100%;
  max-width: 420px;
  justify-self: end;
  min-width: 0;
}

/* Instagram Profile Live Embed */
.instagram-player-container {
  width: 100%;
  max-width: 420px;
  height: 480px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-active);
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.instagram-player-container:hover {
  border-color: #e1306c;
  box-shadow: 0 4px 20px rgba(225, 48, 108, 0.2);
}

.instagram-embed-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #FFFFFF;
}

.instagram-footer-col {
  grid-area: footer;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-self: end;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  min-width: 0;
}

.instagram-embed-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.instagram-pill {
  font-size: 0.74rem;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-family: var(--font-sans);
}

/* Mobile: Responsive Instagram Dossier */
@media (max-width: 768px) {
  .instagram-dossier-card {
    padding: 0.95rem 0.85rem;
  }

  .instagram-dossier-grid {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
  }

  .instagram-info-col {
    gap: 0.35rem;
  }

  .instagram-info-col .culture-card-title {
    font-size: 1.05rem;
    line-height: 1.25;
    margin-bottom: 0.15rem;
  }

  .instagram-info-col .culture-card-prose {
    font-size: 0.78rem;
    line-height: 1.42;
    margin-bottom: 0.25rem;
  }

  .instagram-desktop-notes {
    display: none;
  }

  .instagram-media-col {
    max-width: 100%;
    width: 100%;
    margin: 0;
    justify-self: start;
  }

  .instagram-player-container {
    max-width: 100%;
    height: 440px;
  }

  .instagram-footer-col {
    border-top: none;
    padding-top: 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .instagram-dossier-card {
    padding: 0.8rem 0.65rem;
  }

  .instagram-dossier-grid {
    gap: 0.45rem;
  }

  .instagram-info-col .culture-card-title {
    font-size: 0.98rem;
    line-height: 1.2;
    margin-bottom: 0.1rem;
  }

  .instagram-info-col .culture-card-prose {
    font-size: 0.74rem;
    line-height: 1.38;
    margin-bottom: 0.2rem;
  }

  .instagram-player-container {
    height: 420px;
  }
}

/* Algorithmic Taste Prediction */
.taste-vector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.taste-vector-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
}

.taste-vector-metric {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-accent);
  margin-bottom: 0.5rem;
}

.taste-vector-name {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.45rem;
}

.taste-vector-mapping {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Creative Links Bar */
.creative-links-bar {
  display: flex;
  gap: 0.85rem;
  margin-top: 1.75rem;
  flex-wrap: wrap;
}

.creative-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-active);
  color: var(--text-primary);
  padding: 0 1.15rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.creative-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-crimson);
  color: var(--accent-crimson-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* =============================================================================
   SECTION: AVAILABILITY // INQUIRIES
   ============================================================================= */

.section-inquiries {
  padding: 4rem 0;
  background: radial-gradient(circle at 50% 50%, rgba(220, 38, 38, 0.04) 0%, transparent 70%);
  transition: var(--theme-transition);
}

body[data-mode="culture"] .section-inquiries {
  background: radial-gradient(circle at 50% 50%, rgba(217, 110, 107, 0.08) 0%, transparent 70%);
}

.inquiry-card {
  background: var(--bg-card);
  border: 1px solid var(--border-crimson);
  border-radius: 20px;
  padding: clamp(1.75rem, 5vw, 3rem);
  text-align: center;
  max-width: 820px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 0 auto;
  box-shadow: var(--shadow-elevated);
  overflow-wrap: break-word;
  word-break: break-word;
}

body[data-mode="culture"] .inquiry-card {
  background: var(--bg-surface);
}

.inquiry-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent-crimson);
  background: var(--accent-crimson-dim);
  border: 1px solid var(--border-crimson);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
  max-width: 100%;
  box-sizing: border-box;
  transition: var(--theme-transition);
}

.inquiry-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: var(--accent-crimson);
  box-shadow: 0 0 10px var(--accent-crimson);
  animation: pulse-telemetry 1.8s infinite ease-in-out;
  transition: background-color 0.45s ease, box-shadow 0.45s ease;
}

.inquiry-headline {
  font-size: clamp(1.8rem, 4.8vw, 2.9rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

.inquiry-prose {
  font-size: clamp(0.88rem, 2vw, 0.96rem);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 680px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto 2rem auto;
  overflow-wrap: break-word;
  word-break: break-word;
}

.inquiry-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  max-width: 100%;
}

.inquiry-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-active);
  color: var(--text-primary);
  padding: 0.55rem 1.45rem;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.inquiry-btn:hover {
  background: var(--accent-crimson);
  border-color: var(--accent-crimson-hover);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
}

/* =============================================================================
   FOOTER
   ============================================================================= */

.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 1.1rem 0 2.25rem;
  background: var(--bg-primary);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  transition: var(--theme-transition);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-channels, .footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-channels a, .footer-links a {
  color: var(--text-secondary);
  min-height: 24px; /* WCAG 2.5.8: 24px minimum target height (flex items are blockified) */
  transition: color 0.15s ease;
}

.footer-channels a:hover, .footer-links a:hover {
  color: var(--accent-crimson-hover);
}

.footer-live-stamp {
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.footer-privacy { font-size: 0.7rem; color: var(--text-muted); }
.footer-visits { font-size: 0.72rem; color: var(--text-secondary); }
.footer-visits[hidden] { display: none; }
.footer-privacy a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* =============================================================================
   MARQUEE STRIP: identity ticker (pure CSS loop, aria-hidden, reduced-motion off)
   ============================================================================= */

.marquee-strip {
  overflow: hidden;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 0;
  margin: 0;
  transition: var(--theme-transition);
}

.marquee-track,
.marquee-chunk,
.footer-wordmark {
  min-width: 0;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll var(--marquee-speed) linear infinite;
}

.marquee-chunk {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-right: 2rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  letter-spacing: -0.01em;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color 0.45s ease;
}

.marquee-sep {
  color: var(--accent-crimson);
  transition: color 0.45s ease;
}

@keyframes marquee-scroll {
  to { transform: translateX(-50%); }
}

/* =============================================================================
   SCROLL REVEAL (no-JS safe via .js guard, dual-panel safe, reduced-motion off)
   ============================================================================= */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(var(--motion-reveal-distance));
  transition: opacity var(--motion-reveal-duration) var(--ease-editorial),
              transform var(--motion-reveal-duration) var(--ease-editorial);
}

.js [data-reveal].revealed {
  opacity: 1;
  transform: none;
}

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

  .marquee-track {
    animation: none;
  }

  .sticky-perspective-wrap {
    transition: none;
  }
}

/* =============================================================================
   FOOTER WORDMARK: ghost brand scale
   ============================================================================= */

.footer-wordmark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: -0.15em auto 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.5rem, 15vw, 11rem);
  line-height: 1;
  letter-spacing: -0.04em;
  text-align: center;
  color: var(--text-muted);
  opacity: 0.18;
  user-select: none;
  padding: 0 0 clamp(1.75rem, 4vw, 3rem);
  transition: color 0.45s ease;
}

/* =============================================================================
   SUBPAGE & VERIFIED SYSTEM COMPONENTS
   640px Presentation Viewer, State Machine Flowcharts, MECE Failure Tree, Degradation Graphs
   ============================================================================= */

.pdf-viewer-wrap {
  margin: 2.5rem 0;
  background: var(--bg-card);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow-card);
}

body[data-mode="culture"] .pdf-viewer-wrap {
  background: var(--bg-surface);
}

.pdf-viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.pdf-viewer-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.pdf-viewer-frame {
  width: 100%;
  height: 640px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: #111111;
  display: block;
}

.btn-primary {
  background: var(--accent-crimson);
  color: #FFFFFF;
  padding: 0 1.25rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--accent-crimson-hover);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: var(--accent-crimson-hover);
  color: #FFFFFF;
  box-shadow: 0 0 16px rgba(220, 38, 38, 0.4);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 0 1.25rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--border-active);
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--accent-crimson);
  color: var(--accent-crimson-hover);
}

.proof-card, .battle-card, .concept-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-card);
  color: var(--text-primary);
}

.concept-box h1,
.concept-box h2,
.concept-box h3,
.concept-box h4,
.concept-box p,
.concept-box li,
.concept-box span {
  color: var(--text-primary);
}

body[data-mode="culture"] .proof-card,
body[data-mode="culture"] .battle-card,
body[data-mode="culture"] .concept-box {
  background: var(--bg-surface);
}

.proof-header, .battle-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.proof-domain, .battle-role {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent-crimson);
  font-weight: 700;
}

.battle-company {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.battle-time {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.proof-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.proof-thesis {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.proof-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.proof-deck-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-active);
  color: var(--text-primary);
  padding: 0 0.85rem;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.proof-deck-btn:hover {
  border-color: var(--accent-crimson);
  color: var(--accent-crimson-hover);
}

.flowchart-whiteboard-box {
  background: #111110;
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 2rem 0;
}

.flowchart-board-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  background: #181817;
  padding: 0.5rem 0.85rem;
  border-bottom: 1px solid #282826;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #D4D4CE;
  text-transform: lowercase;
}

.flowchart-toolbar-left, .flowchart-toolbar-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Architectural Blueprint on Warm Paper Variant */
.flowchart-whiteboard-box.blueprint-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.flowchart-whiteboard-box.blueprint-box .flowchart-board-toolbar {
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.flowchart-whiteboard-box.blueprint-box .flowchart-toolbar-tag {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
}

/* Flowchart canvas: readable on phones (scrolls sideways inside the box instead of shrinking text) */
.flowchart-board-canvas .flowchart-svg {
  display: block;
  width: 100%;
  height: auto;
  min-width: 640px;
}

/* Principle strip: maps a flowchart to the four working principles (editorial reading) */
.principle-strip {
  margin: -1rem 0 2rem;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
.principle-strip-label {
  margin: 0 0 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: lowercase;
  color: var(--text-secondary);
}
.principle-strip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}
.principle-strip-list li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.75rem;
  align-items: baseline;
  font-family: var(--font-read);
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-secondary);
}
.principle-name {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-crimson);
  text-transform: lowercase;
}
.principle-strip-note {
  margin: 0.6rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: lowercase;
}
@media (max-width: 520px) {
  .principle-strip-list li { grid-template-columns: 1fr; gap: 0.15rem; }
}

/* MECE Failure Tree Grid */
.failure-tree-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

.failure-tree-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1.15rem;
  transition: all 0.2s ease;
}

body[data-mode="culture"] .failure-tree-card {
  background: var(--bg-surface);
}

.failure-tree-card:hover {
  border-color: var(--border-crimson);
  box-shadow: var(--shadow-glow);
}

.failure-tree-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent-crimson);
  margin-bottom: 0.45rem;
}

.failure-tree-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Degradation Timeline & Facial Seal Grids */
.degrade-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

.degrade-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
}

body[data-mode="culture"] .degrade-card {
  background: var(--bg-surface);
}

.degrade-card-fossil {
  border-left: 3px solid var(--accent-crimson);
}

.degrade-card-phb {
  border-left: 3px solid var(--border-active);
}

.degrade-metric {
  font-family: var(--font-sans);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.degrade-card-fossil .degrade-metric {
  color: var(--text-accent);
}

.degrade-card-phb .degrade-metric {
  color: var(--text-primary);
}

body[data-mode="culture"] .degrade-card-fossil .degrade-metric {
  color: var(--text-accent);
}

body[data-mode="culture"] .degrade-card-phb .degrade-metric {
  color: var(--text-primary);
}

.degrade-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: lowercase;
  margin-bottom: 0.5rem;
}

.degrade-desc {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Reading text: readable body face inside long-form pages; headings keep Plus Jakarta Sans */
.essay-content :is(p, li, td, th, blockquote, figcaption, dd),
.inquiry-prose :is(p, li, td, th, blockquote, figcaption, dd) {
  font-family: var(--font-read);
  font-size: 1.0625rem;
  line-height: 1.75;
  hanging-punctuation: first; /* progressive nicety: safari only, harmless elsewhere */
}

/* Article Reading Column (Blog Reliability Standard: 72ch constraint) */
.essay-article, .essay-content {
  max-width: 72ch;
  margin: 0 auto;
  min-width: 0;
}

/* Reading measure inside the 72ch column: about 68ch (2026-10-15 design spec).
   The container keeps its 72ch constraint, only the running text narrows. */
.essay-content > p,
.essay-content > blockquote {
  max-width: 68ch;
}

.essay-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.essay-header-title {
  font-size: clamp(1.75rem, 1.35rem + 1.6vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin-bottom: 0.75rem;
  text-wrap: balance;
}

.essay-meta-row {
  display: flex;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--text-muted);
  flex-wrap: wrap;
}

/* Section Header */
.section-header {
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.section-sub {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-crimson);
}

.section-subtitle-wide {
  max-width: 840px;
}

/* =============================================================================
   ESSAYS & NOTES ARCHIVE (blog/blog/index.html)
   ============================================================================= */

.archive-container {
  padding-top: 2.5rem;
  padding-bottom: 5rem;
}

.archive-intro {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 0.96rem;
  line-height: 1.75;
  max-width: 68ch;
}

.essay-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin: 1.75rem 0 1.25rem 0;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.essay-filter-btn {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.45rem 1.15rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-active);
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.02em;
}

.essay-filter-btn:hover {
  border-color: var(--accent-crimson);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.essay-filter-btn.active {
  background: var(--accent-crimson);
  border-color: var(--accent-crimson);
  color: #FFFFFF;
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.25);
}

.filter-count {
  font-size: 0.72rem;
  opacity: 0.85;
}

.filter-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.filter-dot.systems-dot {
  background: #60A5FA;
  box-shadow: 0 0 6px rgba(96, 165, 250, 0.6);
}

.filter-dot.culture-dot {
  background: var(--accent-crimson);
  box-shadow: 0 0 6px var(--accent-crimson);
}

.essay-filter-btn.active .filter-dot {
  background: #FFFFFF;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.9);
}

.essay-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 0.5rem;
}

.essay-card {
  display: block;
  border-bottom: 1px solid var(--border-subtle);
  border-left: 3px solid transparent;
  border-radius: 0 12px 12px 0;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  background: transparent;
}

.essay-card:hover {
  background: var(--bg-surface);
  border-left-color: var(--accent-crimson);
  border-bottom-color: var(--border-active);
  transform: translateX(6px);
}

.essay-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 2.25rem 1.25rem;
}

.essay-card:hover .essay-title {
  color: var(--accent-crimson);
}

.essay-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--text-muted);
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.essay-meta time {
  font-weight: 600;
  color: var(--text-secondary);
}

.meta-dot {
  color: var(--border-active);
}

.essay-theme-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  letter-spacing: 0.03em;
  text-transform: lowercase;
}

.essay-theme-pill.theme-systems {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-active);
  color: var(--text-primary);
}

.essay-theme-pill.theme-culture {
  background: var(--accent-crimson-dim);
  border: 1px solid var(--border-crimson);
  color: var(--accent-crimson);
}

.essay-theme-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.essay-theme-dot.systems-dot {
  background: #60A5FA;
  box-shadow: 0 0 6px rgba(96, 165, 250, 0.6);
}

.essay-theme-dot.culture-dot {
  background: var(--accent-crimson);
  box-shadow: 0 0 6px var(--accent-crimson);
}

.essay-tag-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.essay-title {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
  letter-spacing: -0.015em;
  transition: color 0.2s ease;
}

.essay-excerpt {
  font-size: 0.92rem;
  line-height: 1.68;
  color: var(--text-secondary);
  max-width: 72ch;
}

/* =============================================================================
   VISUAL SYSTEM MODELING & DYNAMIC SIMULATIONS (3M & Schneider)
   ============================================================================= */

.sim-system-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 2.25rem 0;
  box-shadow: var(--shadow-card);
}

.sim-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  background: var(--bg-surface-elevated);
  padding: 0.75rem 1.15rem;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.sim-toolbar-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: lowercase;
  letter-spacing: 0.03em;
}

.sim-mode-group {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.sim-mode-btn {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.02em;
}

.sim-mode-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-crimson);
  transform: translateY(-1px);
}

.sim-mode-btn.active {
  background: var(--accent-crimson);
  border-color: var(--accent-crimson);
  color: #FFFFFF;
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.35);
}

.sim-canvas-wrap {
  padding: 1.5rem 1rem;
  background: #0A0305;
  position: relative;
}

.sim-canvas-view {
  display: none;
}

.sim-canvas-view.active {
  display: block;
}

.sim-telemetry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
}

.sim-metric-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  transition: border-color 0.2s ease;
}

.sim-metric-card:hover {
  border-color: var(--border-active);
}

.sim-metric-val {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.sim-metric-val.metric-accent {
  color: var(--accent-crimson);
}

.sim-metric-val.metric-glow {
  color: #60A5FA;
}

.sim-metric-val.metric-green {
  color: #34D399;
}

.sim-metric-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: lowercase;
  margin-top: 0.25rem;
  letter-spacing: 0.02em;
}

@media (max-width: 768px) {
  .sim-telemetry-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
    padding: 0.75rem;
  }

  .sim-metric-val {
    font-size: 1rem;
  }
}

/* =============================================================================
   RESPONSIVE MEDIA QUERIES (Mobile Reliability)
   ============================================================================= */

@media (max-width: 900px) {
  .hero-editorial-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: start;
  }

  .hero-side-block {
    grid-column: 1;
    grid-row: auto;
    max-width: 380px;
    margin-left: auto;
    width: 100%;
  }

  .mode-switch-wrap {
    grid-row: auto;
  }

  .hero-body-block {
    grid-row: auto;
  }

  .hero-side-block {
    grid-column: 1;
    grid-row: auto;
    max-width: 380px;
    margin-left: auto;
    width: 100%;
  }

  .loop-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dossier-body-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .atelier-card {
    grid-template-columns: 1fr;
  }

  .fashion-matrix-grid, .taste-vector-grid {
    grid-template-columns: 1fr;
  }

  .comp-matrix-grid, .failure-tree-grid, .degrade-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .loop-cards-grid {
    grid-template-columns: 1fr;
  }

  .nav-clock {
    display: none; /* Keep nav single row on compact mobile */
  }

  .pdf-viewer-frame {
    height: 480px;
  }

  .inquiry-card {
    padding: 1.5rem 1.15rem;
  }
}

/* =============================================================================
   MOBILE BOTTOM NAVIGATION DOCK & HEADER ERGONOMICS (max-width: 768px)
   ============================================================================= */

.mobile-bottom-dock {
  display: none;
}

@media (max-width: 768px) {
  /* Streamline top sticky header on mobile: hide desktop nav links & clock */
  .site-header .nav-links {
    display: none;
  }

  .site-header .nav-clock {
    display: none;
  }

  .site-header {
    height: 52px;
  }

  .nav-container {
    height: 52px;
    padding: 0 1rem;
  }

  /* Fixed ergonomic bottom dock */
  .mobile-bottom-dock {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(251, 251, 250, 0.95);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid var(--border-subtle);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    transition: var(--theme-transition);
  }

  body[data-mode="culture"] .mobile-bottom-dock {
    background: rgba(18, 3, 5, 0.95);
    border-top-color: var(--border-subtle);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.45);
  }

  /* WCAG 2.4.11 on mobile: a 52px sticky header sits above and a 52px fixed dock sits below,
     so anchors and focused elements need room at both edges. */
  #main-content,
  #philosophy,
  #operating-philosophy,
  #artifacts,
  #notes,
  #inquiries,
  #culture-philosophy,
  #culture-artifacts,
  #culture-notes {
    scroll-margin-top: 70px;
  }

  html {
    scroll-padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px) + 8px);
  }

  .mobile-dock-inner {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 52px;
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    padding: 0 0.4rem;
    gap: 0.2rem;
  }

  .mobile-dock-link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    height: 38px;
    border-radius: var(--radius-xs);
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    padding: 0 0.15rem;
    min-width: 0;
  }

  @media (hover: hover) {
    .mobile-dock-link:hover {
      color: var(--text-primary);
      background: rgba(220, 38, 38, 0.06);
      border-color: rgba(220, 38, 38, 0.2);
    }
    body[data-mode="culture"] .mobile-dock-link:hover {
      color: var(--text-primary);
      background: rgba(217, 110, 107, 0.12);
      border-color: rgba(217, 110, 107, 0.3);
    }
  }

  .mobile-dock-link.active {
    color: var(--text-primary);
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.3);
  }

  body[data-mode="culture"] .mobile-dock-link.active {
    color: #FFFFFF;
    background: rgba(217, 110, 107, 0.22);
    border-color: rgba(217, 110, 107, 0.45);
    box-shadow: 0 0 12px rgba(217, 110, 107, 0.2);
  }

  /* Mobile Hero: Compact Ergonomic Spacing & Split */
  .section-hero {
    padding: 1.25rem 0 1rem 0;
  }

  .hero-editorial-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 0.75rem;
    align-items: center;
  }

  .hero-head-block {
    display: contents;
  }

  .hero-body-block {
    display: contents;
  }

  .hero-side-block {
    display: contents;
  }

  .hero-sub-identity {
    grid-column: 1 / -1;
    font-size: 0.7rem;
    margin-bottom: 0.45rem;
    padding: 2px 10px;
  }

  .hero-headline {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 1rem;
    margin-bottom: 0;
    align-self: start;
    letter-spacing: -0.02em;
  }

  .hero-headline-name {
    font-size: clamp(1.8rem, 10vw, 3.2rem);
  }

  .hero-headline-thesis {
    font-size: clamp(1.05rem, 4.4vw, 1.3rem);
    margin-top: 0.65rem;
    max-width: none;
  }

  .hero-headline-subthesis {
    font-size: 0.85rem;
    margin-top: 0.4rem;
  }

  .portrait-technical-wrap {
    grid-column: 2;
    grid-row: 4;
    width: 100%;
    max-width: none;
    height: auto;
    padding: 0.3rem;
    margin: 0;
    border-radius: var(--radius-sm);
    align-self: start;
    justify-self: stretch;
  }

  .portrait-technical-wrap .portrait-img {
    width: 100%;
    height: auto;
    aspect-ratio: 1066 / 1120;
    object-fit: cover;
    border-radius: 4px;
  }

  .portrait-technical-wrap .portrait-meta-strip {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    padding: 0.2rem 0.15rem 0.05rem 0.15rem;
  }

  .hero-epigraph {
    grid-column: 1;
    grid-row: 4;
    align-self: center;
    margin: 0;
    padding: 0.15rem 0 0.15rem 0.6rem;
    font-size: 0.78rem;
    line-height: 1.45;
  }

  .hero-epigraph cite {
    margin-top: 0.2rem;
    font-size: 0.7rem;
  }

  .hero-prose {
    grid-column: 1 / -1;
    font-size: 0.88rem;
    line-height: 1.55;
    gap: 0.55rem;
  }

  .hero-prose p {
    margin: 0;
  }

  /* Compact Mode Switcher & Section Spacing on Mobile */
  .mode-switch-wrap {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    gap: 0.5rem;
  }

  .mode-switcher-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .mode-switcher .mode-tab-btn {
    padding: 0.3rem 0.75rem;
    font-size: 0.74rem;
  }

  .mode-switcher-label {
    font-size: 0.7rem;
  }

  .section-loop-cards,
  .section-culture-philosophy {
    padding: 1.25rem 0 2rem 0;
  }

  .loop-cards-header {
    margin-bottom: 0.85rem;
  }

  /* Compact Spotify Player on Mobile */
  .spotify-player-container,
  .spotify-player-frame {
    height: 152px;
    max-height: 152px;
  }

  /* Cultural Cards & Notes Wrapping on Mobile */
  .culture-card {
    padding: 1.25rem 1rem;
    box-sizing: border-box;
  }

  .culture-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }

  .culture-card-tag {
    white-space: nowrap;
    font-size: 0.72rem;
  }

  .culture-card-domain {
    white-space: nowrap;
    font-size: 0.7rem;
    color: var(--text-muted);
  }

  .note-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 1.15rem 1rem;
  }

  .note-main {
    width: 100%;
  }

  .note-title {
    font-size: 0.95rem;
    line-height: 1.35;
  }

  .note-summary {
    font-size: 0.82rem;
    line-height: 1.5;
  }

  .note-meta {
    align-self: flex-start;
    white-space: nowrap;
    font-size: 0.7rem;
  }

  .fashion-matrix-grid, .taste-vector-grid {
    grid-template-columns: 1fr;
  }

  /* Safe padding so bottom content is not obscured by the mobile dock */
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 480px) {
  .section-hero {
    padding: 1rem 0 0.85rem 0;
  }
  .hero-sub-identity {
    font-size: 0.7rem;
    margin-bottom: 0.35rem;
    padding: 2px 8px;
  }
  .hero-epigraph {
    margin: 0;
    padding: 0.1rem 0 0.1rem 0.5rem;
    font-size: 0.74rem;
  }
  .hero-epigraph cite {
    font-size: 0.7rem;
  }
  .mode-switch-wrap {
    margin-top: 0.75rem;
    padding-top: 0.6rem;
  }
  .portrait-technical-wrap .portrait-meta-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    font-size: 0.7rem;
  }
  .hero-prose {
    font-size: 0.85rem;
    line-height: 1.5;
    gap: 0.45rem;
  }
  .mode-switch-wrap {
    margin-top: 0.95rem;
    padding-top: 0.75rem;
  }
  .section-loop-cards,
  .section-culture-philosophy {
    padding: 1rem 0 1.75rem 0;
  }
  .inquiry-card {
    padding: 1.35rem 0.85rem;
  }
  .inquiry-actions {
    flex-direction: column;
    gap: 0.65rem;
    width: 100%;
  }
  .inquiry-btn {
    width: 100%;
    justify-content: center;
  }
  .mobile-dock-inner {
    padding: 0 0.25rem;
    gap: 0.15rem;
  }
  .mobile-dock-link {
    font-size: 0.7rem;
    padding: 0 0.1rem;
  }
}

/* Keyboard access and intrinsic media sizing. */
.skip-link { position: fixed; top: -5rem; left: 1rem; z-index: 10000; padding: .75rem; background: var(--bg-primary, #fff); color: var(--text-primary, #111); }
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
img { max-width: 100%; height: auto; }
.essay-meta-row { flex-wrap: wrap; }
.recovery-table { width: 100%; border-collapse: collapse; }
.recovery-table th, .recovery-table td { padding: .75rem; border-bottom: 1px solid var(--border-subtle); text-align: left; overflow-wrap: anywhere; }
/* =============================================================================
   BRAND MARKS, ICON SPRITE, HERO QUICK LINKS (ADR-037)
   ============================================================================= */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.qi { width: 1em; height: 1em; flex: none; fill: currentColor; }

/* Company marks sit on a small white chip so they read in both lenses */
.brand-mark {
  display: inline-block;
  width: auto;
  height: 22px;
  padding: 3px 7px;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs, 4px);
  box-sizing: content-box;
  vertical-align: middle;
  object-fit: contain;
}
.brand-mark.brand-traveloka { height: 26px; padding: 1px 6px; }
.brand-mark--tab { height: 14px; padding: 2px 5px; margin-left: auto; }
.brand-mark--tab.brand-traveloka { height: 17px; padding: 0 4px; }
.dossier-tab:has(.brand-mark--tab) { display: flex; width: 100%; }
.exp-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.5rem;
}
.exp-kicker > span { margin-bottom: 0 !important; }

/* Hero quick links: cv + contact, directly under the thesis */
.hero-quicklinks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.75rem;
  margin-top: 1.1rem;
}
.quick-cv {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0 1rem;
  border-radius: var(--radius-full);
  background: var(--accent-crimson);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}
.quick-cv:hover, .quick-cv:focus-visible { background: var(--accent-crimson-hover); color: #FFFFFF; }
.quick-cv .qi { width: 15px; height: 15px; }
.quick-icons { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.quick-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-active);
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.quick-icon .qi { width: 17px; height: 17px; }
.quick-icon:hover, .quick-icon:focus-visible {
  color: var(--accent-crimson);
  border-color: var(--accent-crimson);
}
.inquiry-btn .qi { width: 15px; height: 15px; }
.inquiry-btn--cv { background: var(--accent-crimson); border-color: var(--accent-crimson); color: #FFFFFF; }

/* Toolkit: four columns on wide screens, two on laptops */
.comp-matrix-grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1180px) {
  .comp-matrix-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .comp-matrix-grid--4 { grid-template-columns: 1fr; }
}

/* Mobile hero: quick links fill the empty column beside the portrait */
@media (max-width: 768px) {
  .hero-quicklinks {
    grid-column: 1;
    grid-row: 4;
    align-self: start;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    margin-top: 0;
  }
  .quick-cv { justify-content: center; padding: 0 0.75rem; }
  .quick-icons { gap: 0.35rem; }
  .quick-icon { width: 40px; height: 40px; }
  .hero-editorial-grid .portrait-technical-wrap { grid-row: 4 / span 2; }
  .hero-editorial-grid .hero-epigraph { grid-row: 5; align-self: end; }
  .brand-mark--kicker { height: 18px; }
  .brand-mark--kicker.brand-traveloka { height: 22px; }
}

/* =============================================================================
   COMPACT HOMEPAGE (ADR-038): chips, proof strip, work index, numbering
   ============================================================================= */
/* Neutral contact chips: cv carries a crimson accent, never a solid fill at rest */
.quick-tile, .nav-cv-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 40px;
  min-width: 40px;
  padding: 0 0.7rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-active);
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: none;
  box-sizing: border-box;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.quick-tile { width: 40px; padding: 0; }
.quick-tile--cv, .nav-cv-chip { width: auto; padding: 0 0.85rem; color: var(--accent-crimson); }
.quick-tile .qi, .nav-cv-chip .qi { width: 16px; height: 16px; }
.quick-tile:hover, .quick-tile:focus-visible { color: var(--accent-crimson); border-color: var(--accent-crimson); }
.quick-tile--cv:hover, .quick-tile--cv:focus-visible,
.nav-cv-chip:hover, .nav-cv-chip:focus-visible {
  background: var(--accent-crimson); border-color: var(--accent-crimson); color: #FFFFFF;
}
.hero-quicklinks { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; margin-top: 1rem; }
.nav-cv-chip { height: 34px; min-height: 34px; margin-right: 0.25rem; }

.inquiry-btn--cv { background: var(--bg-surface-elevated); border-color: var(--border-active); color: var(--accent-crimson); }
.inquiry-btn--cv:hover { background: var(--accent-crimson); border-color: var(--accent-crimson-hover); color: #FFFFFF; }


/* Work index */
.work-group-label {
  margin: 1rem 0 0.35rem; font-family: var(--font-mono); font-size: 0.7rem;
  letter-spacing: 0.05em; color: var(--text-muted); text-transform: lowercase;
}
.work-index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border-subtle); }
.work-row {
  position: relative;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto 1.25rem;
  align-items: center;
  gap: 0.25rem 1rem;
  padding: 0.85rem 0.25rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.2s ease;
}
.work-row:hover { background: var(--bg-surface); }
.work-num { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); }
.work-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 0.3rem 0.6rem; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); }
.work-meta .brand-mark--tab { margin-left: 0; }
.work-title { margin: 0.2rem 0 0; font-size: 1.05rem; line-height: 1.3; }
.work-row:hover .dossier-title-link, .work-title .dossier-title-link:focus-visible { color: var(--accent-crimson); }
.work-row:has(.dossier-title-link:focus-visible) { outline: 2px solid var(--accent-crimson); outline-offset: 2px; }
.work-desc { margin: 0.2rem 0 0; font-family: var(--font-read); font-size: 0.85rem; line-height: 1.5; color: var(--text-secondary); max-width: 80ch; }
.work-result { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; line-height: 1.5; color: var(--accent-crimson); text-align: right; }
.work-arrow { color: var(--text-muted); transition: transform 0.2s ease, color 0.2s ease; }
.work-row:hover .work-arrow { color: var(--accent-crimson); transform: translate(2px, -2px); }

/* Numbered sections: a css counter, so each lens numbers only what is visible */
main { counter-reset: sec; }
.section-num { counter-increment: sec; }
.section-num::before { content: "(" counter(sec, decimal-leading-zero) ") "; color: var(--accent-crimson); }

/* Toolkit chips */
.comp-col-num { margin-right: 0.45rem; color: var(--text-muted); font-weight: 400; }
.comp-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0; margin: 0; list-style: none; }
.comp-list.comp-chips { flex-direction: row; }
.comp-chips .comp-item {
  display: inline-flex;
  margin: 0; padding: 0.22rem 0.55rem; border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full); background: var(--bg-card); font-size: 0.76rem; line-height: 1.35;
}
.comp-chips .comp-item::before { content: none; display: none; }
.comp-col { padding: 1rem 1rem 1.1rem; }

/* Spacing pass */
.section-loop-cards, .section-works, .section-notes-comp,
.section-culture-philosophy, .section-culture-artifacts, .section-culture-notes { padding-top: 2rem; padding-bottom: 2rem; }
.section-inquiries { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.section-label-bar { margin-bottom: 0.9rem; }
.section-label-bar--spaced { margin-top: 2rem; }

@media (max-width: 768px) {
  /* Hero tiles: an equal 3x2 grid whose edges match the quote column */
  .hero-quicklinks {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem;
    grid-column: 1; grid-row: 4; align-self: start; margin-top: 0;
  }
  .quick-tile, .quick-tile--cv { width: 100%; height: 44px; padding: 0; border-radius: var(--radius-sm, 8px); }
  .quick-tile--cv span { font-size: 0.7rem; }
  .hero-editorial-grid .hero-epigraph { align-self: start; margin-top: 0.25rem; }
  .nav-cv-chip { height: 36px; min-height: 36px; padding: 0 0.6rem; }

  /* Contact: 2-column compact chips instead of six full-width pills */
  .inquiry-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); flex-direction: initial; gap: 0.5rem; }
  .inquiry-btn { width: 100%; min-height: 44px; padding: 0.5rem 0.6rem; justify-content: center; font-size: 0.76rem; }

  /* Work index: result drops under the title */
  .work-row { grid-template-columns: 1.6rem minmax(0, 1fr) 1rem; gap: 0.2rem 0.6rem; padding: 0.75rem 0.1rem; }
  .work-result { grid-column: 2; grid-row: 2; text-align: left; }
  .work-arrow { grid-column: 3; grid-row: 1; align-self: start; }
  .work-title { font-size: 0.98rem; }
  .work-desc { font-size: 0.8rem; }

  /* Principles: 2x2 */
  .loop-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
  .loop-card { padding: 0.8rem 0.75rem; }
  .loop-card-header { flex-direction: column; align-items: flex-start; gap: 0.3rem; }
  .loop-card-title { font-size: 0.92rem; margin: 0.35rem 0 0.25rem; }
  .loop-card-desc { font-size: 0.78rem; line-height: 1.45; }

  .section-loop-cards, .section-works, .section-notes-comp,
  .section-culture-philosophy, .section-culture-artifacts, .section-culture-notes { padding-top: 1.25rem; padding-bottom: 1.5rem; }
  .section-inquiries { padding-top: 1.5rem; padding-bottom: 1.75rem; }
  .comp-matrix-grid, .comp-matrix-grid--4 { gap: 0.6rem; }
  .note-item { padding-top: 0.8rem; padding-bottom: 0.8rem; }
}

/* =============================================================================
   ROUND 3: lens switcher, toolkit chips, command palette
   ============================================================================= */
/* Lens switcher: an ink-filled segmented control, no glow or pop */
.mode-tab-btn.active,
body[data-mode="culture"] .mode-tab-btn.active {
  background: var(--text-primary);
  color: var(--bg-primary, #FBFBFA);
  border-color: var(--text-primary);
  box-shadow: none;
  animation: none;
}
.sticky-perspective-inner {
  padding: 3px;
  gap: 2px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 18px rgba(0, 0, 0, 0.06);
}
.sticky-perspective-inner .mode-tab-btn {
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0;
  min-height: 34px;
  padding: 0 0.95rem;
  border: 0;
}
.sticky-perspective-inner .mode-tab-btn::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: 0.35; flex: none;
}
.sticky-perspective-inner .mode-tab-btn.active::before { background: var(--accent-crimson); opacity: 1; }
body[data-mode="culture"] .mode-tab-btn.active { background: #F3E6E1; color: #2A1416; border-color: #F3E6E1; }

/* Toolkit chips: regular sans, source tooltip on hover or focus */
.comp-chips .comp-item { padding: 0; border: 0; background: none; font-family: var(--font-sans); }
.skill-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.65rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  background: var(--bg-card);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-secondary);
  text-decoration: none;
}
a.skill-chip::after { content: "↗"; font-size: 0.7em; color: var(--text-muted); }
a.skill-chip:hover, a.skill-chip:focus-visible { border-color: var(--accent-crimson); color: var(--accent-crimson); }
.skill-src { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* :focus too, so a tap on a tooltip-only chip (no link) reveals its source on touch */
.skill-chip[data-src]:hover::before, .skill-chip[data-src]:focus::before, .skill-chip[data-src]:focus-visible::before {
  content: attr(data-src);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  z-index: 20;
  width: max-content;
  max-width: 240px;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  background: var(--text-primary);
  color: var(--bg-primary, #FBFBFA);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.4;
  white-space: normal;
  text-align: center;
  pointer-events: none;
}
.comp-col { overflow: visible; }

/* Search chip in the header (desktop only) */
.nav-search-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  height: 34px; min-height: 34px; padding: 0 0.55rem 0 0.7rem;
  border: 1px solid var(--border-active); border-radius: var(--radius-full);
  background: var(--bg-surface-elevated); color: var(--text-muted);
  font-family: var(--font-mono); font-size: 0.72rem; cursor: pointer;
}
.nav-search-chip .qi { width: 13px; height: 13px; }
.nav-search-chip kbd, .cmdk kbd {
  font-family: var(--font-mono); font-size: 0.7rem; padding: 1px 5px;
  border: 1px solid var(--border-active); border-radius: 4px; background: var(--bg-card); color: var(--text-secondary);
}
.nav-search-chip:hover { color: var(--text-primary); border-color: var(--text-muted); }
@media (max-width: 900px) { .nav-search-chip { display: none; } }

/* Command palette */
.cmdk { position: fixed; inset: 0; z-index: 3000; }
.cmdk[hidden] { display: none; }
.cmdk-backdrop { position: absolute; inset: 0; background: rgba(17, 17, 16, 0.28); backdrop-filter: blur(2px); }
.cmdk-panel {
  position: relative; margin: 12vh auto 0; width: min(560px, calc(100% - 2rem));
  background: var(--bg-primary, #FBFBFA); border: 1px solid var(--border-active); border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18); overflow: hidden;
}
.cmdk-search { display: flex; align-items: center; gap: 0.6rem; padding: 0.8rem 1rem; border-bottom: 1px solid var(--border-subtle); }
.cmdk-prompt { font-family: var(--font-mono); color: var(--accent-crimson); font-weight: 700; }
.cmdk-input { flex: 1; border: 0; outline: 0; background: transparent; font-family: var(--font-sans); font-size: 16px; color: var(--text-primary); min-width: 0; }
.cmdk-list { list-style: none; margin: 0; padding: 0.4rem; max-height: min(420px, 60vh); overflow-y: auto; }
.cmdk-group { padding: 0.55rem 0.6rem 0.25rem; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); letter-spacing: 0.05em; }
.cmdk-item { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0.6rem; border-radius: 8px; cursor: pointer; }
.cmdk-item.is-active { background: var(--bg-surface); }
.cmdk-item.is-active .cmdk-label { color: var(--accent-crimson); }
.cmdk-label { font-family: var(--font-sans); font-size: 0.9rem; font-weight: 600; color: var(--text-primary); }
.cmdk-hint { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; }
.cmdk-empty { padding: 1rem 0.6rem; font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); }
.cmdk-foot { display: flex; gap: 1rem; padding: 0.5rem 1rem; border-top: 1px solid var(--border-subtle); font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); }
.cmdk-foot kbd { margin-right: 2px; }
html.cmdk-open { overflow: hidden; }

/* Brand marks without a box: muted grey like the contact icons, brand color on hover */
.brand-mark, .brand-mark--tab, .brand-mark--kicker,
.brand-mark.brand-traveloka, .brand-mark--tab.brand-traveloka {
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  filter: grayscale(1) contrast(1.1);
  opacity: 0.62;
  transition: filter 0.2s ease, opacity 0.2s ease;
}
.brand-mark--tab { height: 15px; }
.brand-mark--tab.brand-traveloka { height: 20px; }
.brand-mark--tab.brand-3m { height: 13px; }
.brand-mark--tab.brand-schneider { height: 17px; }
.brand-mark--kicker { height: 20px; }
.brand-mark--kicker.brand-traveloka { height: 26px; }
.brand-mark.brand-traveloka { filter: grayscale(1) brightness(0.5); }
.work-row:hover .brand-mark, .dossier-card:hover .brand-mark, .exp-kicker:hover .brand-mark {
  filter: none;
  opacity: 1;
}

/* Desktop hero: a wider photo column so the portrait fills the height beside the paragraphs */
@media (min-width: 901px) {
  .hero-editorial-grid { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 0.75rem 3rem; }
  .mode-switcher-container { flex-wrap: wrap; row-gap: 0.5rem; }
  .hero-side-block { gap: 0.9rem; }
  .hero-side-block .portrait-technical-wrap { width: 100%; }
  /* column spans the full hero height; the photo absorbs the spare space, the quote sits underneath */
  .hero-side-block { align-self: stretch; }
  .hero-side-block .portrait-technical-wrap { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
  .hero-side-block .portrait-img { width: 100%; flex: 1 1 auto; height: 100%; min-height: 360px; aspect-ratio: auto; object-fit: cover; object-position: center 20%; }
}

/* Spotify card: the player fills the media column */
.spotify-media-col { display: flex; flex-direction: column; gap: 0.35rem; height: auto; align-self: stretch; }
.spotify-media-col .spotify-player-container { flex: 1 1 auto; height: auto; }
.spotify-media-col .spotify-player-frame { height: 100%; min-height: inherit; }

/* Spotify playlist tabs: a 2x2 grid that never scrolls or clips; the tabs are the only playlist control */
.spotify-carousel-bar { display: block; }
.spotify-carousel-tabs,
.spotify-carousel-tabs.is-scrollable {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.35rem;
  overflow: visible; -webkit-mask-image: none; mask-image: none;
}
.spotify-carousel-tab { min-width: 0; justify-content: flex-start; flex: none; }
.spotify-tab-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* Identity line sits under the naquuuu.build name: plain secondary text, no pill */
.hero-headline .hero-sub-identity,
.hero-editorial-grid .hero-headline .hero-sub-identity {
  display: block;
  width: auto;
  max-width: 100%;
  margin: 0.6rem 0 0;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: lowercase;
  color: var(--text-secondary);
  transition: color 0.45s ease;
}
.hero-headline .hero-sub-identity::before { content: none; }
@media (max-width: 768px) {
  .hero-headline .hero-sub-identity,
  .hero-editorial-grid .hero-headline .hero-sub-identity { font-size: 0.82rem; margin-top: 0.45rem; }
}

/* =============================================================================
   ROUND 4: principle card rhythm, quieter lens switchers, header on phones
   ============================================================================= */
/* Principle cards (both lenses): row 1 = number + label on one line, row 2 = tag chip.
   Every card gets the same two header rows, so titles start on one baseline across the row. */
.loop-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.95rem;
}
.loop-card-step-group { display: flex; align-items: baseline; gap: 0.55rem; min-width: 0; max-width: 100%; }
.loop-card-step { white-space: nowrap; }
.loop-card-tag { justify-self: start; line-height: 1.4; }
@media (max-width: 768px) {
  .loop-card-header { gap: 0.35rem; margin-bottom: 0.1rem; }
}
@media (max-width: 400px) {
  /* narrow phones: number sits above the label so "sound & groove" never clips */
  .loop-card-step-group { flex-direction: column; align-items: flex-start; gap: 0.2rem; }
}

/* Floating lens switcher: same flat box as the hero switcher, no glass, shadow or dots.
   Surface fill + a firmer hairline so it separates from the content scrolling underneath. */
.sticky-perspective-inner,
body[data-mode="culture"] .sticky-perspective-inner {
  border-radius: var(--radius-sm);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: var(--bg-surface);
  border: 1px solid #BDBDB5;
}
body[data-mode="culture"] .sticky-perspective-inner { border-color: #6A4850; }
.sticky-perspective-inner .mode-tab-btn { border-radius: var(--radius-xs, 4px); }
.sticky-perspective-inner .mode-tab-btn::before { content: none; }

/* Mobile hero lens switcher: full-width centered button from initial load (matches sticky button) */
@media (max-width: 768px) {
  .mode-switch-wrap {
    justify-content: center;
  }
  .mode-switcher-container {
    width: 100%;
    align-items: center;
  }
  .mode-switch-wrap .mode-switcher {
    display: flex;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    padding: 3px;
    gap: 2px;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    border: 1px solid #BDBDB5;
  }
  body[data-mode="culture"] .mode-switch-wrap .mode-switcher {
    border-color: #6A4850;
  }
  .mode-switch-wrap .mode-switcher .mode-tab-btn {
    flex: 1 1 0%;
    justify-content: center;
    min-height: 34px;
    padding: 0.3rem 0.5rem;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.74rem;
    letter-spacing: 0;
    border: 0;
    border-radius: var(--radius-xs, 4px);
  }
}

/* Hero heading: the h1 holds only the name; identity pill and thesis sit beside it, same look */
.hero-headline { font-family: var(--font-display); }
.hero-headline-title { margin: 0; font-size: inherit; line-height: inherit; letter-spacing: inherit; }
.hero-headline > p { margin-bottom: 0; }
@media (max-width: 768px) {
  /* the heading block takes rows 1-2 (the identity pill used to own row 1), so the prose never lands above the name */
  .hero-editorial-grid .hero-headline { grid-row: 1 / span 2; }
}

/* Palette jump targets take focus without a ring */
section[tabindex="-1"]:focus { outline: none; }

/* Spotify tabs on narrow phones: drop the index number so every playlist name fits */
@media (max-width: 360px) {
  .spotify-tab-num { display: none; }
  .spotify-carousel-tab { padding-left: 0.4rem; padding-right: 0.4rem; }
}

/* Header on phones: the cv chip steps aside (cv stays in the hero tiles) */
@media (max-width: 768px) {
  .nav-cv-chip { display: none; }
}

/* ai disclosure, last child of .essay-header. Red on purpose: owner rule, visitors must notice it (L-28) */
.ai-note {
  margin: 1rem 0 0;
  padding: 0.7rem 0.95rem;
  background: var(--accent-crimson-dim);
  border: 1px solid var(--border-crimson);
  border-left: 4px solid var(--accent-crimson);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.55;
  color: var(--text-primary);
  min-width: 0;
  overflow-wrap: anywhere;
}
.ai-note-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--accent-crimson);
  margin-right: 0.55rem;
}

/* ai note in the dark (culture) theme: inverted, a white box with red and black text so it still shouts (L-28) */
body[data-mode="culture"] .ai-note {
  background: #FFFFFF;
  border-color: #DC2626;
  border-left-color: #DC2626;
  color: #111110;
}
body[data-mode="culture"] .ai-note-label { color: #DC2626; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-width: 380px) { .mode-switcher { display: flex; max-width: 100%; } .mode-tab-btn { flex: 1 1 0%; } }
.essay-content code { overflow-wrap: anywhere; white-space: normal; } .essay-content pre code { white-space: pre; }

/* =============================================================================
   MOTION KIT (2026-10-15, track B task B3)
   transform and opacity only, no layout-property animation, no per-second text
   reflow. Reduced motion is honoured by the global rule above plus the block at
   the end of this section.
   ============================================================================= */

/* Ticker: two identical chunks scroll 0 to -50% over 40s. Pause on hover, on
   focus, and whenever the js pauses the strip (hidden tab or offscreen). */
.marquee-strip:hover .marquee-track,
.marquee-strip:focus-within .marquee-track,
.marquee-strip[data-paused="true"] .marquee-track {
  animation-play-state: paused;
}

/* Press feedback: instant settle on pointerdown, 120ms release. The transform lives
   on an inner `.press-settle` wrapper, so the control's own box and its focus ring
   never move (curator must-fix, 2026-10-15). */
.press-settle {
  display: inline-flex;
  align-items: center;
  gap: inherit;
  transition: transform 120ms linear;
}

.inquiry-btn:active .press-settle,
.btn-primary:active .press-settle,
.btn-secondary:active .press-settle,
.creative-btn:active .press-settle,
.proof-deck-btn:active .press-settle,
.essay-filter-btn:active .press-settle {
  transform: translateY(1px);
  transition: transform 0s;
}

@media (prefers-reduced-motion: reduce) {
  .inquiry-btn:active .press-settle,
  .btn-primary:active .press-settle,
  .btn-secondary:active .press-settle,
  .creative-btn:active .press-settle,
  .proof-deck-btn:active .press-settle,
  .essay-filter-btn:active .press-settle {
    transform: none;
  }

  .portrait-img,
  .portrait-img--layer,
  .nav-wave-bar {
    transition: none;
  }
}

/* =============================================================================
   PRINT / PDF EXPORT LAYER (2026-10-16, portfolio pack phase 1, task D1)
   Paper ground on whichever lens the page booted in, site chrome off, no motion,
   nothing broken through the middle of a figure or a callout. Every rule lives in
   this print layer, so screen rendering is unchanged (verified by a computed-style
   spot check in the 2026-10-16 receipt). Rendered to PDF by
   scripts/build_portfolio_pdf.py through headless Chromium --print-to-pdf.
   ============================================================================= */

@page {
  size: A4;
  margin: 14mm 15mm 16mm;
}

@media print {
  /* Paper tokens forced back on. Restated per selector because
     body[data-mode="culture"] otherwise wins on specificity and the culture lens
     would print dark. Same values as :root. */
  :root,
  body,
  body[data-mode="culture"] {
    --bg-primary: #FBFBFA;
    --bg-surface: #F2F2ED;
    --bg-surface-elevated: #ECECE6;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F8F8F4;
    --bg-input: #FFFFFF;
    --bg-code: #F0EFEA;
    --border-subtle: #E5E5DF;
    --border-active: #D4D4CE;
    --border-crimson: #DC2626;
    --border-glow: rgba(220, 38, 38, 0.2);
    --text-primary: #111110;
    --text-secondary: #555550;
    --text-accent: #DC2626;
    --text-muted: #555550;
    --text-code: #111110;
    --accent-crimson: #DC2626;
    --accent-crimson-hover: #B91C1C;
    --accent-crimson-dim: rgba(220, 38, 38, 0.08);
    --accent-wine: #991B1B;
    --shadow-card: none;
    --shadow-glow: none;
    --shadow-elevated: none;
    color-scheme: light;
  }

  /* A washer keeps its tint on paper: the browser drops background fills by
     default, and exact is asked for only where the tint carries meaning. */
  html,
  body,
  .ai-note,
  .note-tag,
  .concept-box,
  .failure-tree-card,
  .inquiry-card,
  pre,
  code,
  mark {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  html,
  body {
    background: var(--bg-primary);
    color: var(--text-primary);
  }

  /* Site chrome off. In this stylesheet the scroll affordance is the floating lens
     switcher; there is no separate scroll progress indicator to hide. */
  .skip-link,
  .site-header,
  .nav-links,
  .nav-link,
  .nav-back-link,
  .nav-search-chip,
  .nav-clock,
  .nav-cv-chip,
  .nav-audio-pill,
  .cmdk,
  .marquee-strip,
  .sticky-perspective-wrap,
  .mobile-bottom-dock,
  .mode-switch-wrap {
    display: none !important;
  }

  /* Motion off, and anything that was revealed on scroll is simply present. */
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    box-shadow: none !important;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Media never runs past the content column, and a horizontal scroll container
     prints its whole content instead of clipping it. */
  img,
  video,
  iframe,
  canvas {
    max-width: 100% !important;
    height: auto;
  }

  svg {
    max-width: 100% !important;
  }

  .scroll-x {
    overflow: visible !important;
  }

  /* No break through a figure, a callout, an arrow or a table row. */
  figure,
  figcaption,
  blockquote,
  pre,
  table,
  tr,
  .ai-note,
  .concept-box,
  .failure-tree-card,
  .failure-tree-text,
  .proof-card,
  .battle-card,
  .degrade-card,
  .sys-card,
  .essay-card,
  .flow-card,
  .loop-card,
  .note-item,
  .atelier-card,
  .moment {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* A heading never ends a sheet, and the opening block stays with its body. */
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  .essay-header {
    break-after: avoid;
    page-break-after: avoid;
  }

  /* Major sections: an explicit sheet start is opt-in through this utility, which
     the generated export cover uses. A blanket rule on every h2 was rejected: on a
     two page per work export it would spend the 20 page cap on half empty sheets. */
  .print-page-break {
    break-before: page;
    page-break-before: always;
  }

  a {
    color: var(--text-accent);
  }

  p,
  li {
    orphans: 3;
    widows: 3;
  }
}
