:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --bg-elev: #f4f5f7;
  --fg: #1a1d21;
  --fg-muted: #5b6570;
  --border: #e2e5ea;
  --accent: #2f6feb;
  --accent-fg: #ffffff;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.06);
}

:root[data-theme="dark"] {
  --bg: #0d1117;
  --bg-elev: #161b22;
  --fg: #e6edf3;
  --fg-muted: #9198a1;
  --border: #2a313c;
  --accent: #4c8dff;
  --accent-fg: #0d1117;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Follow the OS when the user hasn't chosen explicitly */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0d1117;
    --bg-elev: #161b22;
    --fg: #e6edf3;
    --fg-muted: #9198a1;
    --border: #2a313c;
    --accent: #4c8dff;
    --accent-fg: #0d1117;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.icon {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Square, sized to match the link buttons' rendered height:
     line-height (1.6rem) + vertical padding (2 x 0.7rem) + border (2 x 1px). */
  width: calc(3rem + 2px);
  height: calc(3rem + 2px);
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elev);
  color: var(--fg);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, transform 0.1s ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
}

.theme-toggle:active {
  transform: scale(0.94);
}

.theme-toggle .icon-moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle .icon-sun {
    display: none;
  }
  :root:not([data-theme]) .theme-toggle .icon-moon {
    display: block;
  }
}

/* Hero */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.25rem 4rem;
  max-width: 640px;
  margin: 0 auto;
}

.title {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  line-height: 1.1;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.tagline {
  /* Scale with the viewport so the slogan stays on a single line,
     shrinking on narrow screens rather than wrapping. */
  font-size: clamp(0.62rem, 2.55vw, 1.2rem);
  white-space: nowrap;
  color: var(--fg-muted);
  margin: 0 0 0.5rem;
}

.status {
  font-size: 0.95rem;
  color: var(--fg-muted);
  margin: 0 0 2.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Links */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elev);
  color: var(--fg);
  text-decoration: none;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, transform 0.15s ease, color 0.2s ease;
}

.link:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.link .icon {
  width: 22px;
  height: 22px;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 1.5rem 1.25rem 2rem;
  color: var(--fg-muted);
  font-size: 0.875rem;
}

.site-footer p {
  margin: 0;
}
