:root {
  --bg: #0c1117;
  --bg-elevated: #151b24;
  --bg-card: #1a222d;
  --border: #2a3544;
  --text: #e7edf5;
  --text-muted: #8b9cb3;
  --accent: #3dd6c6;
  --accent-dim: #2a9d8f;
  --accent-glow: rgba(61, 214, 198, 0.15);
  --warning: #f4a261;
  --font: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 12px;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--accent-glow), transparent),
    radial-gradient(ellipse 40% 30% at 100% 0%, rgba(59, 130, 246, 0.08), transparent);
}

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

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

code,
pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  line-height: 1.5;
}

code {
  background: var(--bg);
  padding: 0.15em 0.4em;
  border-radius: 6px;
  border: 1px solid var(--border);
}

pre code {
  background: none;
  border: none;
  padding: 0;
}

.container {
  width: min(var(--max), 100% - 2.5rem);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(12, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  overflow: visible;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  /* Nav row height unchanged — logo overflows via negative margins */
  padding: 1rem 0;
  min-height: 3.25rem;
  overflow: visible;
}

.logo {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
  margin: -1.35rem 0 -1.75rem;
  padding: 0.25rem 0;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
}

.logo-img {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  flex-shrink: 0;
  object-fit: cover;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
  gap: 0.15rem;
}

.logo-name {
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.logo-cli {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
}

.nav,
.nav-toggle {
  position: relative;
  z-index: 3;
  flex-shrink: 0;
}

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

.nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}

.nav a:not(.btn):hover,
.nav a:not(.btn).active {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

a.btn.btn-primary,
.nav a.btn-primary {
  background: var(--accent);
  color: #000000;
  font-weight: 700;
}

a.btn.btn-primary:hover,
.nav a.btn-primary:hover {
  color: #000000;
  background: #5ce8db;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--accent-glow);
  text-decoration: none;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.hero {
  position: relative;
  padding: 4.5rem 0 3.5rem;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
}

.hero-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
  text-shadow: 0 1px 2px rgba(12, 17, 23, 0.85);
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: -0.75rem -1.5rem -0.75rem -0.5rem;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    to right,
    rgba(12, 17, 23, 0.88) 0%,
    rgba(12, 17, 23, 0.45) 72%,
    transparent 100%
  );
}

.hero-shot {
  margin: 0;
  min-width: 0;
}

.hero-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  filter: brightness(1.08) contrast(1.05) saturate(0.95);
}

.hero-tagline {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.65rem;
  letter-spacing: -0.02em;
}

.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.thesis-section {
  padding: 4.5rem 0;
  background:
    radial-gradient(ellipse 70% 60% at 0% 50%, var(--accent-glow), transparent),
    var(--bg);
  border-bottom: 1px solid var(--border);
}

.thesis-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.thesis-copy h2 {
  font-size: 2rem;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.thesis-lead {
  font-size: 1.15rem;
  color: var(--text);
  margin: 0 0 1rem;
  line-height: 1.6;
}

.thesis-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.thesis-points li {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
}

.thesis-points strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.thesis-points span {
  display: block;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.workflow-section h2 {
  letter-spacing: -0.02em;
}

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

.workflow-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.65rem;
}

.workflow-card h3 {
  margin: 0 0 1rem;
  font-size: 1.2rem;
}

.workflow-old {
  border-color: color-mix(in srgb, var(--warning) 35%, var(--border));
}

.workflow-new {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: 0 12px 32px var(--accent-glow);
}

.workflow-steps {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.workflow-steps li {
  margin-bottom: 0.65rem;
}

.workflow-steps li:last-child {
  margin-bottom: 0;
}

.workflow-steps-short li {
  margin-bottom: 0.85rem;
}

.workflow-punchline {
  margin: 1.25rem 0 0;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--text-muted);
}

.workflow-punchline-accent {
  font-style: normal;
  color: var(--accent);
  font-weight: 600;
}

.workflow-closer {
  max-width: 44rem;
  font-size: 1.1rem;
  color: var(--text);
  margin: 0;
  line-height: 1.65;
}

.hero .lead {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin: 0 0 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge {
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--bg-elevated);
  border-block: 1px solid var(--border);
}

.section h2 {
  font-size: 2rem;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.section-intro {
  color: var(--text-muted);
  max-width: 42rem;
  margin: 0 0 2.5rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.problem-list {
  display: grid;
  gap: 1rem;
}

.problem-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.problem-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(244, 162, 97, 0.12);
  color: var(--warning);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.feature-shot {
  margin-top: 2rem;
}

.feature-shot figcaption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

/* Portrait screenshot — half content width, preserve aspect ratio (no stretch) */
.feature-shot--compact {
  display: block;
  width: min(560px, 50%);
  max-width: 100%;
  margin: 2rem auto 0;
}

.feature-shot--compact img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.screenshot-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 12px,
    rgba(42, 53, 68, 0.4) 12px,
    rgba(42, 53, 68, 0.4) 24px
  );
  color: var(--text-muted);
  text-align: center;
  padding: 2rem;
  font-size: 0.95rem;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.compare-table th,
.compare-table td {
  border: 1px solid var(--border);
  padding: 0.85rem 1rem;
  text-align: left;
  vertical-align: top;
}

.compare-table th {
  background: var(--bg-card);
}

.compare-table .yes {
  color: var(--accent);
}

.compare-table .no {
  color: var(--text-muted);
}

.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
  padding: 2.5rem 0 4rem;
  align-items: start;
}

.docs-nav {
  position: sticky;
  top: 5rem;
}

.docs-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.docs-nav li {
  margin-bottom: 0.35rem;
}

.docs-nav a {
  display: block;
  padding: 0.4rem 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.docs-nav a:hover,
.docs-nav a.active {
  color: var(--accent);
}

.docs-nav .group {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 1.25rem 0 0.5rem;
  font-weight: 600;
}

.doc-content h1 {
  font-size: 2.25rem;
  margin: 0 0 1rem;
}

.doc-content h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.doc-content h2:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 1.5rem;
}

.doc-content h3 {
  font-size: 1.15rem;
  margin: 1.5rem 0 0.5rem;
}

.doc-content p,
.doc-content ul,
.doc-content ol {
  color: var(--text-muted);
}

.doc-content li {
  margin-bottom: 0.35rem;
}

.callout {
  border-left: 4px solid var(--accent);
  background: var(--accent-glow);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}

.callout strong {
  color: var(--text);
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

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

.link-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.link-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

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

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .hero-copy::before {
    inset: -0.5rem;
    background: linear-gradient(
      to bottom,
      rgba(12, 17, 23, 0.9) 0%,
      rgba(12, 17, 23, 0.5) 55%,
      transparent 100%
    );
  }

  .hero-shot img {
    max-height: min(52vh, 22rem);
    width: auto;
    max-width: 100%;
    margin-inline: auto;
    object-fit: contain;
  }

  .thesis-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .workflow-compare {
    grid-template-columns: 1fr;
  }

  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
  }

  .docs-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
  }

  .docs-nav .group {
    width: 100%;
    margin-top: 0;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem;
    gap: 1rem;
  }

  .nav.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .header-inner {
    position: relative;
    flex-wrap: wrap;
  }

  .logo {
    margin: -0.85rem 0 -1.1rem;
    gap: 0.65rem;
  }

  .logo-img {
    width: 56px;
    height: 56px;
    border-radius: 12px;
  }

  .logo-name {
    font-size: 1.2rem;
  }

  .logo-cli {
    font-size: 0.78rem;
  }
}
