:root {
  --bg-canvas: #202020;
  --bg-surface: #303030;
  --bg-surface-hover: #383838;
  --text-primary: #e5e7eb;
  --text-muted: #a3a3a3;
  --accent-primary: #14b8a6;
  --accent-secondary: #0d9488;
  --border-subtle: #424242;
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elevation: 0 12px 32px -4px rgba(0, 0, 0, 0.35);
}

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

html, body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  line-height: 1.7;
  font-size: 16px;
  overflow-wrap: anywhere;
  hyphens: auto;
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s var(--ease-kinetic);
}

.link-grow {
  display: inline-block;
  position: relative;
  color: var(--accent-primary);
  font-weight: 600;
}

.link-grow::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background-color: var(--accent-primary);
  transition: width 0.3s var(--ease-kinetic);
}

.link-grow:hover::after,
.link-grow:focus-visible::after {
  width: 100%;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent-primary);
  color: #121212;
  font-weight: 700;
  padding: 0.85rem 1.65rem;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease-kinetic), background-color 0.2s ease;
  text-decoration: none;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: var(--accent-secondary);
  transform: translateY(-3px);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header: Inset rounded-end header box that scrolls with the document */
.site-header-wrap {
  padding: 1.25rem 1.25rem 0;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.site-header {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  margin-right: auto;
}

.brand-icon {
  width: 28px;
  height: 28px;
  background-color: var(--accent-primary);
  color: #121212;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.9rem;
}

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

.desktop-nav a {
  font-size: 0.95rem;
  color: var(--text-primary);
  position: relative;
  padding: 0.25rem 0;
}

.desktop-nav a:hover,
.desktop-nav a[aria-current="page"] {
  color: var(--accent-primary);
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.35rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.mobile-nav-panel {
  display: none;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  margin-top: 0.6rem;
  padding: 1rem 1.25rem;
}

.mobile-nav-panel.is-open {
  display: block;
}

.mobile-nav-panel ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* Hero Split */
.hero-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
  margin: 2.5rem 0;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 2.5rem;
}

.hero-copy h1 {
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.hero-copy p {
  color: var(--text-muted);
  font-size: 1.08rem;
  margin-bottom: 1.6rem;
  max-width: 62ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
}

.hero-media img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  display: block;
}

/* Bento Grid Layout */
.bento-section {
  margin: 3rem 0;
}

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

.section-kicker {
  color: var(--accent-primary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  display: block;
  margin-bottom: 0.25rem;
}

.section-header h2 {
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  line-height: 1.3;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

.bento-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 1.85rem;
  box-shadow: var(--shadow-elevation);
}

.span-12 { grid-column: span 12; }
.span-8 { grid-column: span 8; }
.span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; }
.span-4 { grid-column: span 4; }

.bento-box h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.bento-box p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Thin-divider rows with left-hand icons */
.ledger-list {
  list-style: none;
  margin-top: 0.75rem;
}

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

.ledger-row:first-child {
  border-top: 1px solid var(--border-subtle);
}

.ledger-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background-color: #262626;
  border: 1px solid var(--border-subtle);
  color: var(--accent-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

.ledger-content strong {
  display: block;
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 0.15rem;
}

.ledger-content span {
  display: block;
  color: var(--text-muted);
  font-size: 0.94rem;
}

/* Figures & Images */
.evidence-figure {
  margin: 1rem 0;
}

.evidence-figure img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  display: block;
}

.evidence-figure figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
}

table {
  width: 100%;
  border-collapse: collapse;
  background-color: #262626;
  text-align: left;
}

th, td {
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.94rem;
}

th {
  color: var(--accent-primary);
  font-weight: 700;
  background-color: #222222;
}

td {
  color: var(--text-primary);
}

/* Long-form prose */
.prose-region {
  max-width: 70ch;
  margin: 0 auto;
}

.prose-region h2 {
  font-size: 1.55rem;
  margin: 2rem 0 0.75rem;
}

.prose-region h3 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.5rem;
}

.prose-region p {
  margin-bottom: 1.15rem;
  color: var(--text-primary);
}

/* Forms */
.form-group {
  margin-bottom: 1.15rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  background-color: #222222;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 0.8rem 1.1rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.96rem;
}

.form-control:focus {
  outline: 2px solid var(--accent-primary);
  border-color: transparent;
}

.preview-box {
  background-color: #1c1c1c;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 1.25rem;
  font-family: monospace;
  white-space: pre-wrap;
  color: var(--text-primary);
  min-height: 150px;
  margin: 1rem 0;
  font-size: 0.9rem;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease-kinetic), transform 0.6s var(--ease-kinetic);
}

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

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

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

.footer-col h4 {
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.footer-col p, .footer-col li {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 0.45rem;
}

.footer-col ul {
  list-style: none;
}

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

@media (max-width: 960px) {
  .hero-split {
    grid-template-columns: 1fr;
  }
  .span-8, .span-7, .span-6, .span-5, .span-4 {
    grid-column: span 12;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .hero-split {
    padding: 1.5rem;
  }
}

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