/* ── Custom Properties ─────────────────────────────────────────── */
:root {
  --bg:         #ffffff;
  --text:       #0a0a0a;
  --text-muted: #6b7280;
  --accent:     #000000;
  --surface:    #f9f9f9;
  --border:     #e5e7eb;
  --border-strong: #d1d5db;
  --nav-bg:     rgba(255, 255, 255, 0.88);
  --hero-dot:   #d1d5db;
}

body.dark {
  --bg:         #0a0a0a;
  --text:       #f0f0f0;
  --text-muted: #71717a;
  --accent:     #ffffff;
  --surface:    #111111;
  --border:     #1f1f1f;
  --border-strong: #2e2e2e;
  --nav-bg:     rgba(10, 10, 10, 0.88);
  --hero-dot:   transparent;
}

/* ── Reset & Base ──────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 200ms ease, color 200ms ease;
  -webkit-font-smoothing: antialiased;
  moz-osx-font-smoothing: grayscale;
}

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

/* ── Nav ───────────────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 200ms ease, border-color 200ms ease;
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
  height: 52px;
}

.wordmark {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 24px;
  flex: 1;
}

.nav-links a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 150ms ease;
}

.nav-links a:hover {
  color: var(--text);
}

#theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

#theme-toggle:hover {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border-strong);
}

.icon-sun { display: none; }
body.dark .icon-moon { display: none; }
body.dark .icon-sun  { display: block; }

/* ── Hero ──────────────────────────────────────────────────────── */
#hero {
  display: flex;
  align-items: center;
  min-height: calc(100vh - 52px);
  padding: 100px 32px;
  background-image: radial-gradient(circle, var(--hero-dot) 1px, transparent 1px);
  background-size: 24px 24px;
  transition: background-color 200ms ease;
}

.hero-inner {
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
  max-width: 620px;
}

.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 28px;
}

#hero h1 {
  font-size: clamp(34px, 5.5vw, 62px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.subtext {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 40px;
  letter-spacing: -0.01em;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: 1.5px solid var(--accent);
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease;
}

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

.btn-outline {
  border-color: var(--border-strong);
}
.btn-outline:hover {
  background: var(--surface);
  color: var(--text);
  border-color: var(--text);
}

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Sections ──────────────────────────────────────────────────── */
.section-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 96px 32px;
}

#tools,
#research,
#about {
  border-top: 1px solid var(--border);
}

.section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.section-heading {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 48px;
}

/* ── Card Grid ─────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 420px));
  gap: 16px;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: 2px solid var(--text);
  border-radius: 8px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.card:hover {
  border-color: var(--border-strong);
  border-top-color: var(--text);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

body.dark .card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.card-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.card-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.card-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}

.card-link {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  padding-bottom: 1px;
  border-bottom: 1px solid var(--border);
  transition: border-color 150ms ease;
  align-self: flex-start;
}

.card-link:hover {
  border-bottom-color: var(--text);
  text-decoration: none;
}

/* ── About ─────────────────────────────────────────────────────── */
.about-text {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text);
  max-width: 600px;
  border-left: 2px solid var(--border-strong);
  padding-left: 24px;
  font-style: normal;
}

/* ── Footer ────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 150ms ease;
}

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

.footer-sep {
  color: var(--border-strong);
  font-size: 13px;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Card variants ─────────────────────────────────────────────── */
.card-stealth {
  border-top-color: var(--border-strong);
}

.card-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 8px;
  align-self: flex-start;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

/* ── Mobile ────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-inner {
    padding: 0 20px;
    gap: 16px;
  }

  .nav-links {
    display: none;
  }

  #hero {
    padding: 72px 20px;
    min-height: auto;
  }

  .hero-inner {
    max-width: 100%;
  }

  .subtext {
    font-size: 16px;
  }

  .section-inner {
    padding: 64px 20px;
  }

  .section-heading {
    font-size: 22px;
    margin-bottom: 32px;
  }

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

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 20px;
    gap: 16px;
  }
}
