:root {
  --bg-canvas: #ffffff;
  --bg-surface: #f1f5f9;
  --bg-surface-elevated: #f8fafc;
  --text-primary: #1e293b;
  --text-muted: #64748b;
  --accent-primary: #b45309;
  --accent-hover: #92400e;
  --accent-subtle: #fef3c7;
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --font-mono: ui-monospace, Consolas, "SF Mono", Menlo, Monaco, monospace;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ease-bench: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-bench: 0 4px 20px -2px rgba(180, 83, 9, 0.08), 0 2px 6px -1px rgba(30, 41, 59, 0.04);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-wrap: anywhere;
  hyphens: auto;
  position: relative;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(180, 83, 9, 0.04) 0%, transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(180, 83, 9, 0.05) 0%, transparent 50%);
  background-repeat: no-repeat;
  min-height: 100vh;
}

/* Base typography */
h1, h2, h3, h4, h5 {
  color: var(--text-primary);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 0.75rem; }
h2 { font-size: clamp(1.4rem, 2.5vw, 1.85rem); margin-bottom: 0.6rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }

p {
  margin-bottom: 1rem;
  color: #334155;
  font-size: 1rem;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-primary);
  font-weight: 600;
}

.timecode {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.15rem 0.4rem;
  color: var(--accent-primary);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1.5rem;
}

.prose {
  max-width: 70ch;
}

/* Header & Left Navigation */
header.site-header {
  position: relative;
  border-bottom: 1px solid var(--border-subtle);
  background: #ffffff;
  padding: 1.25rem 0 1rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.brand-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-mark {
  width: 32px;
  height: 32px;
  background: #1e293b;
  border-left: 4px solid var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #ffffff;
  font-size: 0.85rem;
}

.brand-name {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.brand-name span {
  color: var(--accent-primary);
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  overflow-x: auto;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.35rem 0;
  position: relative;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-primary);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-primary);
}

/* Mobile 3-dot trigger */
.nav-mobile-btn {
  display: none;
  background: none;
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.75rem;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--text-primary);
  cursor: pointer;
}

.nav-mobile-dropdown {
  display: none;
  flex-direction: column;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 1rem 0;
}

.nav-mobile-dropdown.open {
  display: flex;
}

.nav-mobile-dropdown .nav-link {
  padding: 0.6rem 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.8rem 1.6rem;
  text-decoration: none;
  cursor: pointer;
  border-radius: 0; /* strict square */
  transition: all 0.2s var(--ease-bench);
}

.btn-primary {
  border: 2px solid var(--accent-primary);
  color: #ffffff;
  background: var(--accent-primary);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-outline {
  border: 1.5px solid var(--accent-primary);
  color: var(--accent-primary);
  background: transparent;
}

.btn-outline:hover {
  background: var(--accent-subtle);
  color: var(--accent-hover);
}

/* Hero Section */
.hero-section {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
  align-items: center;
}

.hero-fact-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 1.75rem;
  box-shadow: var(--shadow-bench);
}

.hero-fact-panel h3 {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.hero-fact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fact-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.fact-index {
  font-family: var(--font-mono);
  color: #ffffff;
  background: var(--accent-primary);
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
  border-radius: 50%;
}

.fact-item p {
  margin: 0;
  font-size: 0.92rem;
  color: #334155;
}

/* Bento Regions Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.bento-col-12 { grid-column: span 12; }
.bento-col-8 { grid-column: span 8; }
.bento-col-6 { grid-column: span 6; }
.bento-col-4 { grid-column: span 4; }

.bento-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 1.75rem;
  border-radius: 0;
  position: relative;
  transition: transform 0.2s var(--ease-bench), box-shadow 0.2s var(--ease-bench);
}

.bento-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-bench);
}

.bento-highlight {
  background: var(--bg-surface);
  border-left: 4px solid var(--accent-primary);
}

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

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.75rem;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Icon-led list rows with thin dividers */
.bench-list {
  list-style: none;
  margin: 1rem 0;
}

.bench-row {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

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

.bench-icon-badge {
  width: 36px;
  height: 36px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  border-radius: 50%; /* round badge rule */
}

.bench-content h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.bench-content p {
  margin: 0;
  font-size: 0.92rem;
  color: #475569;
}

/* Timeline & Vector Visualizers */
.vector-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 1.5rem;
  margin: 1.25rem 0;
  border-radius: 0;
}

.timeline-strip {
  display: flex;
  gap: 2px;
  background: #334155;
  padding: 4px;
  margin-top: 1rem;
  overflow-x: auto;
}

.timeline-clip {
  flex: 1;
  min-width: 80px;
  background: #475569;
  padding: 0.5rem;
  color: #f8fafc;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  border-top: 3px solid var(--accent-primary);
}

.waveform-strip {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0.5rem 0;
}

.waveform-bar {
  flex: 1;
  background: var(--accent-primary);
  min-height: 4px;
  opacity: 0.75;
}

/* Vector Graphic SVGs */
.vector-illustration {
  width: 100%;
  height: auto;
  display: block;
}

/* Avatar element */
.bench-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border-subtle);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

th, td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

th {
  background: var(--bg-surface);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--accent-primary);
}

/* Contact Note Pad / Tool */
.note-pad-tool {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  padding: 2rem;
  border-radius: 0;
}

.note-input-group {
  margin-bottom: 1.25rem;
}

.note-input-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
  font-weight: 600;
}

.note-input, .note-textarea, .note-select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-primary);
  border-radius: 0;
}

.note-input:focus, .note-textarea:focus, .note-select:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.note-textarea {
  min-height: 120px;
  resize: vertical;
}

.tool-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* Notice box */
.status-msg {
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  display: none;
  background: var(--accent-subtle);
  border: 1px solid var(--accent-primary);
  color: #78350f;
}

/* Scroll reveal utility */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease-bench), transform 0.5s var(--ease-bench);
}

.reveal.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
footer.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  font-weight: 800;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--text-primary);
  display: inline-block;
  margin-bottom: 0.5rem;
}

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

.footer-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--accent-primary);
}

.footer-legal-bar {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-legal-bar a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-legal-bar a:hover {
  color: var(--accent-primary);
}

/* Responsive queries */
@media (max-width: 1024px) {
  .bento-col-8, .bento-col-6, .bento-col-4 {
    grid-column: span 12;
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }
  .nav-mobile-btn {
    display: block;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
