:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --text: #1c2430;
  --muted: #5a6573;
  --border: #e1ddd3;
  --accent: #1f5f8b;
  --accent-text: #ffffff;
  --accent-soft: #e4eef5;
  --thread: #b9770e;
  --note-bg: #fbf3e2;
  --note-border: #ecd5a3;
  --focus: #f2b134;
  --radius: 12px;
  --shadow: 0 1px 2px rgb(20 30 40 / 6%), 0 4px 16px rgb(20 30 40 / 5%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12161c;
    --surface: #1a2029;
    --text: #e6e9ee;
    --muted: #9aa5b3;
    --border: #2b3340;
    --accent: #6fb1e0;
    --accent-text: #0d1620;
    --accent-soft: #1d2e3d;
    --thread: #f2b134;
    --note-bg: #2a2416;
    --note-border: #4d4026;
    --shadow: none;
  }
}

:root[data-theme="dark"] {
  --bg: #12161c;
  --surface: #1a2029;
  --text: #e6e9ee;
  --muted: #9aa5b3;
  --border: #2b3340;
  --accent: #6fb1e0;
  --accent-text: #0d1620;
  --accent-soft: #1d2e3d;
  --thread: #f2b134;
  --note-bg: #2a2416;
  --note-border: #4d4026;
  --shadow: none;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--accent); text-underline-offset: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  z-index: 10;
}
.skip:focus { top: 8px; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
}
.site-header nav { display: flex; gap: 20px; }
.site-header nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.site-header nav a:hover { color: var(--text); }

/* Hero */
.hero { padding: 56px 0 40px; }
.eyebrow {
  margin: 0 0 12px;
  color: var(--thread);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}
.hero h1 {
  margin: 0 0 16px;
  max-width: 20ch;
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.lede {
  max-width: 64ch;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 1.1rem;
}
.note {
  max-width: 64ch;
  margin: 0;
  padding: 12px 16px;
  background: var(--note-bg);
  border: 1px solid var(--note-border);
  border-radius: var(--radius);
  font-size: 0.95rem;
}

/* Projects */
.projects { padding: 16px 0 64px; }
.projects h2 { margin: 0 0 4px; font-size: 1.6rem; }
.section-lede { margin: 0 0 24px; color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 20px;
}
.card-wide { grid-column: 1 / -1; }

.card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 0;
}
.card > p { margin: 0 0 14px; }
.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  margin-bottom: 10px;
}
.card h3 { margin: 0; font-size: 1.3rem; }
.kind { color: var(--muted); font-size: 0.9rem; }

.facts {
  margin: 0 0 16px;
  padding-left: 1.2em;
  color: var(--muted);
}
@media (min-width: 760px) {
  .facts { columns: 2; column-gap: 32px; }
  .facts li { break-inside: avoid; }
}

.shot {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.release {
  margin-top: auto !important;
  font-size: 0.95rem;
  color: var(--muted);
}
.release .version {
  display: inline-block;
  padding: 1px 8px;
  margin-right: 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: none;
  line-height: 1.2;
}
.button:hover { filter: brightness(1.08); }
.button.secondary {
  background: transparent;
  color: var(--accent);
}
.button .size { margin-left: 6px; font-weight: 400; opacity: 0.8; font-size: 0.85em; }
.button.yours::after {
  content: "Your system";
  margin-left: 8px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgb(255 255 255 / 22%);
  font-size: 0.72em;
  font-weight: 600;
}

.links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.95rem; }
.small { color: var(--muted); font-size: 0.875rem; margin-bottom: 0 !important; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 0.95rem;
}
.site-footer p { margin: 0 0 6px; max-width: 70ch; }
