/* =========================================================
   WebHarbor — Maritime Precision
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Instrument+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --bg:          #F6F5F0;
  --bg-alt:      #EDECE6;
  --surface:     #FFFFFF;
  --text:        #0C1222;
  --text-soft:   #3D4559;
  --text-muted:  #6B7280;
  --border:      #D6D3C8;
  --border-soft: #E8E5DC;

  --accent:      #1B4B8F;
  --accent-ink:  #0F2E5A;
  --accent-soft: #E8EFF8;
  --accent-glow: rgba(27,75,143,0.12);
  --teal:        #0D7377;
  --teal-soft:   #E6F5F5;
  --warm:        #C4713B;
  --warm-soft:   #FDF0E6;
  --warn:        #A63D2F;
  --warn-soft:   #FAECE9;

  --serif: "DM Serif Display", "Georgia", serif;
  --sans:  "Instrument Sans", system-ui, -apple-system, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --shadow-sm: 0 1px 2px rgba(12,18,34,.03), 0 2px 6px rgba(12,18,34,.05);
  --shadow-md: 0 4px 12px rgba(12,18,34,.06), 0 2px 4px rgba(12,18,34,.04);
  --shadow-lg: 0 12px 40px rgba(12,18,34,.10), 0 4px 12px rgba(12,18,34,.05);
  --shadow-xl: 0 20px 60px rgba(12,18,34,.14);

  --radius:    16px;
  --radius-sm: 10px;
  --radius-lg: 24px;

  --max: 1320px;
}

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv01", "cv02", "ss01";
  text-wrap: pretty;        /* smarter line breaks for body text */
}
h1, h2, h3, h4, .hinge-a, .hero-title {
  text-wrap: balance;       /* even line lengths for headings */
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }

code, pre { font-family: var(--mono); }
code {
  background: var(--bg-alt);
  padding: 0.15em 0.45em;
  border-radius: 5px;
  font-size: 0.88em;
  color: var(--text);
  border: 1px solid var(--border-soft);
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 36px;
}

/* ---- SCROLL REVEAL ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(.22,1,.36,1), transform 0.7s cubic-bezier(.22,1,.36,1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- NAV ---- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246,245,240,0.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 36px;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: 0.01em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  color: var(--accent);
  font-size: 1.25rem;
}
.site-nav nav {
  display: flex;
  gap: 26px;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.site-nav nav a {
  color: var(--text-muted);
  transition: color 0.2s;
  position: relative;
}
.site-nav nav a:hover {
  color: var(--accent);
  text-decoration: none;
}
.site-nav nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.25s ease;
}
.site-nav nav a:hover::after { width: 100%; }

.nav-cta-group {
  display: flex;
  gap: 10px;
  align-items: center;
}
.nav-cta {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: var(--accent);
  color: #fff;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1.5px solid var(--accent);
  transition: background 0.2s, transform 0.15s, border-color 0.2s, color 0.2s;
}
.nav-cta:hover { background: var(--accent-ink); border-color: var(--accent-ink); text-decoration: none; transform: translateY(-1px); }
.nav-cta-ghost {
  background: transparent;
  color: var(--accent);
}
.nav-cta-ghost:hover {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

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

/* ---- HERO ---- */
.hero {
  padding: 100px 0 50px;
  overflow: hidden;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -100px -300px auto -300px;
  height: 600px;
  background:
    radial-gradient(ellipse 50% 60% at 20% 30%, rgba(27,75,143,0.08), transparent 70%),
    radial-gradient(ellipse 40% 50% at 75% 10%, rgba(13,115,119,0.06), transparent 70%),
    radial-gradient(ellipse 30% 40% at 50% 60%, rgba(196,113,59,0.03), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
/* subtle grain texture */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.79rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 7px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  animation: fadeInDown 0.6s ease both;
}
.eyebrow .dot {
  width: 8px; height: 8px;
  background: var(--teal);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(13,115,119,.2);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(13,115,119,.2); }
  50% { box-shadow: 0 0 0 7px rgba(13,115,119,.05); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 4.8vw, 3.8rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  font-weight: 400;
  margin: 32px 0 28px;
  text-align: center;
  max-width: 100%;
  animation: fadeInUp 0.7s 0.1s ease both;
}
.accent { color: var(--accent); }

.hero-sub {
  font-size: 1.12rem;
  color: var(--text-soft);
  max-width: 100%;
  width: 100%;
  margin: 0 0 44px;
  line-height: 1.7;
  text-align: center;
  animation: fadeInUp 0.7s 0.2s ease both;
}

/* highlights: 6-col sub-grid → row 1: 3 cards, row 2: 2 cards centered */
.hero-highlights {
  list-style: none;
  padding: 0;
  margin: 0 0 48px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  width: 100%;
  text-align: left;
  animation: fadeInUp 0.7s 0.3s ease both;
}
.hero-highlights li:nth-child(-n+3) { grid-column: span 2; }
.hero-highlights li:nth-child(4) { grid-column: 2 / 4; }
.hero-highlights li:nth-child(5) { grid-column: 4 / 6; }

@media (max-width: 900px) {
  .hero-highlights { grid-template-columns: repeat(2, 1fr); }
  .hero-highlights li:nth-child(-n+3),
  .hero-highlights li:nth-child(4),
  .hero-highlights li:nth-child(5) { grid-column: auto; }
}
@media (max-width: 560px) {
  .hero-highlights { grid-template-columns: 1fr; }
}

.hero-highlights li {
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.5;
  padding: 20px 22px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
  position: relative;
  overflow: hidden;
}
.hero-highlights li::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.2s;
}
.hero-highlights li:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}
.hero-highlights li:hover::before { opacity: 1; }

.hero-highlights li:nth-child(1)::before { background: var(--accent); }
.hero-highlights li:nth-child(2)::before { background: var(--teal); }
.hero-highlights li:nth-child(3)::before { background: var(--warm); }
.hero-highlights li:nth-child(4)::before { background: #7C3AED; }
.hero-highlights li:nth-child(5)::before { background: #059669; }

.hero-highlights li:nth-child(2):hover { border-color: var(--teal); }
.hero-highlights li:nth-child(3):hover { border-color: var(--warm); }
.hero-highlights li:nth-child(4):hover { border-color: #7C3AED; }
.hero-highlights li:nth-child(5):hover { border-color: #059669; }

.hero-highlights li strong {
  color: var(--text);
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

/* hero quickstart */
.hero-quickstart {
  margin: 0 0 40px;
  width: 100%;
  max-width: 900px;
  animation: fadeInUp 0.7s 0.4s ease both;
}
.hero-qs-label {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0 0 14px;
  text-align: center;
}
.hero-qs-cmd {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #0A0E1A;
  border: 1px solid #1E2536;
  border-radius: var(--radius-sm);
  padding: 18px 24px;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.04);
}
.hero-qs-cmd code {
  flex: 1;
  font-family: var(--mono);
  font-size: 0.88rem;
  color: #C8D5E6;
  background: none;
  padding: 0;
  border: none;
  white-space: nowrap;
  overflow-x: auto;
}
.hero-qs-cmd .copy-btn {
  flex-shrink: 0;
  border-color: #2E3A50;
  color: #8899B0;
}
.hero-qs-cmd .copy-btn:hover {
  border-color: var(--teal);
  color: #fff;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 56px;
  justify-content: center;
  animation: fadeInUp 0.7s 0.5s ease both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(27,75,143,0.25);
}
.btn-primary:hover { background: var(--accent-ink); box-shadow: 0 4px 16px rgba(27,75,143,0.3); }
.btn-primary .arr { opacity: 0.7; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

/* hero stats (hidden by current HTML but kept for compatibility) */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 20px;
  margin-bottom: 52px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.stat-num {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1;
}
.stat-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 10px;
}
@media (max-width: 720px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}

/* hero strip */
.hero-strip {
  margin: 0 -36px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.strip-track {
  display: flex;
  gap: 20px;
  animation: scroll-x 70s linear infinite;
  width: max-content;
  padding: 8px 0 12px;
}
.strip-track img {
  height: 180px;
  width: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  background: var(--surface);
  object-fit: cover;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.strip-track img:hover { transform: scale(1.03); }
@keyframes scroll-x {
  from { transform: translateX(0); }
  to   { transform: translateX(-33.333%); }
}

/* ---- SECTIONS ---- */
.section {
  padding: 100px 0;
  position: relative;
}
.section.bordered { border-top: 1px solid var(--border-soft); }

.section-head {
  max-width: 100%;
  margin-bottom: 60px;
}
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.79rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 14px;
  border-radius: 6px;
  margin-bottom: 24px;
  border: 1px solid rgba(27,75,143,0.12);
}
.section h2 {
  font-family: var(--serif);
  font-size: clamp(1.65rem, 2.6vw, 2.2rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin: 0 0 20px;
  color: var(--text);
}
.section-lede {
  font-size: 1.06rem;
  color: var(--text-soft);
  line-height: 1.7;
  max-width: 64ch;
  margin: 0;
}

/* ---- MOTIVATION ---- */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}
@media (max-width: 900px) { .problem-grid { grid-template-columns: 1fr; } }

.problem-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.problem-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.problem-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.prob-id {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--warn);
  background: var(--warn-soft);
  padding: 3px 10px;
  border-radius: 5px;
  font-weight: 600;
}
.problem-head h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 400;
  margin: 0;
}
.prob-sub {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.problem-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.65;
}

.thesis {
  margin-top: 40px;
  padding: 28px 32px;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  display: flex;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
}
.thesis-kicker {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  flex-shrink: 0;
}
.thesis p {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text);
  flex: 1 1 300px;
  line-height: 1.7;
}

/* ---- COMPARISON TABLE ---- */
.compare-wrap {
  margin-top: 60px;
}
.compare-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  margin: 0 0 28px;
  color: var(--text);
}
.compare-table-scroll {
  overflow-x: auto;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  background: var(--surface);
}
.compare-table {
  width: 100%;
  min-width: 840px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
  line-height: 1.55;
}
/* ---- thead ---- */
.compare-table thead th {
  padding: 18px 22px;
  text-align: left;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
  background: var(--bg-alt);
  border-bottom: 2px solid var(--border);
  border-right: 1px solid var(--border);
  white-space: nowrap;
  position: relative;
}
.compare-table thead th:last-child { border-right: none; }
.compare-table thead th.compare-dim {
  text-align: left;
  background: var(--bg-alt);
  min-width: 170px;
}
.compare-table thead th.compare-ours {
  color: #fff;
  background: var(--accent);
  border-bottom-color: var(--accent-ink);
}

/* ---- tbody ---- */
.compare-table td {
  padding: 15px 22px;
  border-bottom: 1px solid var(--border-soft);
  border-right: 1px solid var(--border-soft);
  color: var(--text-soft);
  vertical-align: middle;
  text-align: left;
}
.compare-table td:last-child { border-right: none; }
.compare-table tbody tr:last-child td { border-bottom: none; }

/* dimension column (left) */
.compare-table td.compare-dim {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  text-align: left;
  white-space: nowrap;
  min-width: 170px;
  background: var(--bg);
  border-right: 2px solid var(--border);
}

/* WebHarbor column highlight */
.compare-table td.compare-ours {
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 500;
  border-right: none;
}

/* row hover */
.compare-table tbody tr:hover td {
  background: rgba(27,75,143,0.04);
}
.compare-table tbody tr:hover td.compare-dim {
  background: rgba(27,75,143,0.06);
}
.compare-table tbody tr:hover td.compare-ours {
  background: rgba(27,75,143,0.1);
}

/* zebra striping */
.compare-table tbody tr:nth-child(even) td {
  background: rgba(0,0,0,0.015);
}
.compare-table tbody tr:nth-child(even) td.compare-dim {
  background: var(--bg-alt);
}
.compare-table tbody tr:nth-child(even) td.compare-ours {
  background: rgba(27,75,143,0.06);
}

/* color badges */
.cmp-good {
  display: inline-block;
  color: #047857;
  font-weight: 700;
  background: #ECFDF5;
  padding: 2px 10px;
  border-radius: 5px;
  border: 1px solid #A7F3D0;
  font-size: 0.84rem;
}
.cmp-ok {
  display: inline-block;
  color: #92650D;
  font-weight: 600;
  background: #FFFBEB;
  padding: 2px 10px;
  border-radius: 5px;
  border: 1px solid #FDE68A;
  font-size: 0.84rem;
}
.cmp-bad {
  display: inline-block;
  color: #991B1B;
  font-weight: 600;
  background: #FEF2F2;
  padding: 2px 10px;
  border-radius: 5px;
  border: 1px solid #FECACA;
  font-size: 0.84rem;
}

/* ---- HINGE ---- */
.hinge {
  padding: 90px 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  text-align: center;
  position: relative;
}
.hinge-q {
  font-family: var(--mono);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin: 0 0 22px;
}
.hinge-a {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1.4;
  font-weight: 400;
  max-width: 100%;
  margin: 0 auto;
  color: var(--text);
}

/* ---- APPROACH / UNLOCKED ---- */
.approach-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 980px) { .approach-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .approach-grid { grid-template-columns: 1fr; } }

.approach-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.approach-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.approach-ico {
  font-size: 1.2rem;
  color: var(--accent);
  font-family: var(--mono);
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid rgba(27,75,143,0.1);
  line-height: 1;
}
.approach-card h3 {
  font-family: var(--sans);
  font-size: 1.05rem;
  margin: 0 0 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.approach-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ---- EVOLVING ---- */
.evolving {
  background: var(--bg);
  border-top: 1px solid var(--border-soft);
}

.evo-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 16px;
  align-items: stretch;
  margin-top: 20px;
}
.evo-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.evo-step:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.evo-num {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--accent);
  width: 38px; height: 38px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: var(--accent-soft);
}
.evo-step h4 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.evo-step p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.55;
}
.evo-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--border);
  font-family: var(--mono);
  font-size: 1.4rem;
}
@media (max-width: 1000px) {
  .evo-flow {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .evo-arrow { transform: rotate(90deg); padding: 0; font-size: 1.2rem; }
}

/* ---- GALLERY ---- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 980px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .gallery { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.card-shot {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-alt);
  border: 0;
  border-bottom: 1px solid var(--border-soft);
  padding: 0;
  margin: 0;
  cursor: zoom-in;
  font: inherit;
  color: inherit;
  text-align: left;
}
.card-shot .shot-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.5s ease;
}
.card:hover .card-shot .shot-media { transform: scale(1.03); }

.card-shot .shot-label {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  background: rgba(10,14,26,0.88);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  backdrop-filter: blur(8px);
  z-index: 2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.card-shot .shot-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  font-weight: 600;
  padding: 4px 10px 4px 20px;
  border-radius: 6px;
  background: rgba(220, 38, 38, 0.94);
  color: #fff;
  z-index: 2;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 6px rgba(220,38,38,0.2);
}
.card-shot .shot-badge::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: live-pulse 1.4s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1;   box-shadow: 0 0 0 0 rgba(255,255,255,0.55); }
  50%      { opacity: 0.5; box-shadow: 0 0 0 6px rgba(255,255,255,0); }
}

.card-shot .shot-zoom {
  position: absolute;
  top: 10px;
  right: 10px;
  font-family: var(--mono);
  font-size: 0.88rem;
  line-height: 1;
  padding: 7px 9px;
  border-radius: 6px;
  background: rgba(10,14,26,0.72);
  color: #fff;
  z-index: 2;
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.card:hover .card-shot .shot-zoom {
  opacity: 1;
  transform: scale(1);
}
.card-shot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.card-body {
  padding: 18px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.card-title {
  font-family: var(--sans);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
}
.card-port {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 5px;
  font-weight: 500;
  border: 1px solid rgba(27,75,143,0.1);
}
.card-meta {
  display: flex;
  gap: 14px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}
.card-meta .dot { color: var(--border); }

/* ---- QUICKSTART ---- */
.quickstart { background: var(--bg-alt); }
.quickstart.bordered { border-top: 1px solid var(--border-soft); }

.code-block {
  background: #0A0E1A;
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 0 40px;
  border: 1px solid #1E2536;
  box-shadow: var(--shadow-lg);
}
.code-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid #1E2536;
  background: #0D1224;
}
.code-lbl {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5B6B82;
}
.copy-btn {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid #2E3A50;
  color: #8899B0;
  padding: 5px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.copy-btn:hover { border-color: var(--teal); color: #fff; background: rgba(13,115,119,0.12); }
.copy-btn.copied { border-color: #4ADE80; color: #4ADE80; }
.code-block pre {
  margin: 0;
  padding: 22px 24px;
  color: #C8D5E6;
  font-size: 0.9rem;
  overflow-x: auto;
  line-height: 1.7;
}
.code-block pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
  font-family: var(--mono);
}

/* ---- Prism line-numbers integration (dark code-block) ---- */
.code-block pre.line-numbers {
  padding: 22px 24px 22px 4.2em !important;   /* override the generic pre rule */
  position: relative;
  counter-reset: linenumber;
  max-height: 600px;
  overflow: auto;
  white-space: pre;
}
.code-block pre.line-numbers > code {
  white-space: pre;
  position: relative;
}
.code-block pre.line-numbers .line-numbers-rows {
  position: absolute;
  pointer-events: none;
  top: 0;                /* code is the containing block; align to its top */
  left: -3.5em;          /* push out of code's content area into pre's padding */
  width: 2.6em;
  letter-spacing: -1px;
  border-right: 1px solid #1E2536;
  user-select: none;
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1.7;
}
.code-block pre.line-numbers .line-numbers-rows > span {
  display: block;
  counter-increment: linenumber;
  pointer-events: none;
}
.code-block pre.line-numbers .line-numbers-rows > span::before {
  content: counter(linenumber);
  color: #5B6B82;
  display: block;
  padding-right: 0.9em;
  text-align: right;
}

/* The prompt block is large — give it a custom feel */
.code-block.prompt-block {
  background: #0A0E1A;
}
.code-block.prompt-block pre {
  font-size: 0.85rem;
}

.port-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.port-table table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.84rem;
}
.port-table th {
  text-align: left;
  padding: 14px 20px;
  background: var(--bg-alt);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}
.port-table td {
  padding: 13px 20px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-soft);
}
.port-table tbody tr:last-child td { border-bottom: none; }
.port-table tbody tr:hover td { background: rgba(27,75,143,0.03); }
.port-table td:first-child { color: var(--accent); font-weight: 600; }
.port-table td:nth-child(2) { color: var(--text); font-family: var(--sans); font-weight: 500; }
.port-table tr.total td { background: var(--bg-alt); color: var(--text); font-weight: 600; }

/* ---- IMPACT ---- */
.impact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 740px) { .impact-grid { grid-template-columns: 1fr; } }
.impact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.impact-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.impact-card h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
  margin: 0 0 12px;
  color: var(--text);
}
.impact-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.96rem;
  line-height: 1.65;
}

/* ---- FOOTER ---- */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  background: var(--surface);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.1rem;
  color: var(--text);
}
.footer-meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.footer-meta .sep { opacity: 0.3; }
.footer-meta .muted { color: var(--text-muted); }
.footer-meta a { color: var(--text-soft); }
.footer-meta a:hover { color: var(--accent); }

/* ---- CITATION ---- */
.citation-section .section-head h2 {
  font-size: clamp(1.3rem, 2vw, 1.7rem);
}
.citation-section .authors-block {
  margin-bottom: 32px;
  padding: 28px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.authors-line {
  font-size: 0.98rem;
  line-height: 1.85;
  color: var(--text);
  margin: 0 0 16px;
  text-align: center;
}
.authors-line strong { font-weight: 600; }
.authors-line sup {
  font-size: 0.68em;
  color: var(--accent);
  font-weight: 600;
}
.affiliations-line {
  font-size: 0.86rem;
  color: var(--text-soft);
  margin: 0;
  line-height: 1.6;
  text-align: center;
}
.affiliations-line sup {
  font-size: 0.72em;
  color: var(--accent);
  font-weight: 600;
}
.citation-section .code-block pre {
  font-size: 0.85rem;
  white-space: pre;
  overflow-x: auto;
  line-height: 1.75;
}

/* ---- OUTLINE ---- */
.section.outline {
  padding: 80px 0 70px;
  border-top: 1px solid var(--border-soft);
}
.section.outline .section-head { margin-bottom: 36px; }
.outline-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (max-width: 780px) { .outline-list { grid-template-columns: 1fr; } }

.outline-list li { margin: 0; }
.outline-list a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}
.outline-list a:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.outline-list a:hover .ol-arrow { color: var(--accent); transform: translateY(3px); }
.ol-num {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.3rem;
  color: var(--accent);
  min-width: 2.5ch;
}
.ol-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ol-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--text);
}
.ol-desc {
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.5;
}
.ol-desc code {
  font-size: 0.84em;
  padding: 1px 6px;
}
.ol-arrow {
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: color 0.2s, transform 0.25s;
}

/* ---- LIGHTBOX ---- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 26, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}
body.lb-locked { overflow: hidden; }

.lightbox .lb-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: min(1400px, 96vw);
  max-height: 92vh;
}
.lightbox .lb-img {
  max-width: 100%;
  max-height: calc(92vh - 80px);
  width: auto;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xl);
  background: #0A0E1A;
  display: block;
}
.lightbox .lb-caption {
  color: #fff;
  text-align: center;
  max-width: 100%;
}
.lightbox .lb-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.1rem;
}
.lightbox .lb-sub {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  margin-top: 5px;
  letter-spacing: 0.03em;
}
.lightbox .lb-close,
.lightbox .lb-nav {
  position: fixed;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  font-size: 1.2rem;
  font-family: var(--sans);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 201;
}
.lightbox .lb-close:hover,
.lightbox .lb-nav:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.25);
}
.lightbox .lb-close { top: 20px; right: 20px; }
.lightbox .lb-prev  { left: 20px;  top: 50%; transform: translateY(-50%); font-size: 1.8rem; }
.lightbox .lb-next  { right: 20px; top: 50%; transform: translateY(-50%); font-size: 1.8rem; }
.lightbox .lb-prev:hover { transform: translateY(-50%) translateX(-2px); }
.lightbox .lb-next:hover { transform: translateY(-50%) translateX(2px); }
@media (max-width: 600px) {
  .lightbox { padding: 16px; }
  .lightbox .lb-close { top: 12px; right: 12px; width: 40px; height: 40px; }
  .lightbox .lb-prev { left: 8px; width: 40px; height: 40px; }
  .lightbox .lb-next { right: 8px; width: 40px; height: 40px; }
}

/* ---- UTIL ---- */
::selection { background: var(--accent-soft); color: var(--accent-ink); }
img { max-width: 100%; display: block; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
