/* Starshard — cold-technical aesthetic
   Reference: Gwern.net / nostalgebraist / Karpathy blog
   Goals: high info density, monospace-friendly, no decoration, readable on phone */

:root {
  --bg: #fafaf7;
  --fg: #1a1a1a;
  --muted: #666;
  --border: #d0d0cc;
  --link: #0a4d8a;
  --link-visited: #5a3a8a;
  --code-bg: #f0efe9;
  --max-width: 720px;
  --serif: Charter, "Source Serif Pro", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15151a;
    --fg: #e6e6e0;
    --muted: #888;
    --border: #2a2a30;
    --link: #6ab0e0;
    --link-visited: #b090d0;
    --code-bg: #1f1f25;
  }
}

* { box-sizing: border-box; }

html { font-size: 16px; }

body {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--fg);
  background: var(--bg);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main, .site-header, .site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header {
  padding-top: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.site-header nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand {
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--fg);
  text-decoration: none;
}

.navlinks {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
}

.navlinks a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 0.9rem;
}

.navlinks a:hover { color: var(--link); }

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:visited { color: var(--link-visited); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.25;
  margin-top: 2em;
  margin-bottom: 0.5em;
}

h1 { font-size: 1.7rem; margin-top: 0.5em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }

p { margin: 0 0 1em; }

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

code {
  background: var(--code-bg);
  padding: 0.1em 0.3em;
  border-radius: 2px;
}

pre {
  background: var(--code-bg);
  padding: 0.85rem 1rem;
  overflow-x: auto;
  border-radius: 3px;
  line-height: 1.45;
  font-size: 0.82rem;
}

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

blockquote {
  border-left: 2px solid var(--border);
  padding-left: 1rem;
  margin: 1em 0;
  color: var(--muted);
  font-style: italic;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5em 0;
}

table {
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 0.9rem;
}

th, td {
  border: 1px solid var(--border);
  padding: 0.4rem 0.7rem;
  text-align: left;
}

th { background: var(--code-bg); }

.post-header {
  margin-bottom: 2rem;
}

.post-header h1 { margin-top: 0; }

.post-meta {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

.post-description {
  font-style: italic;
  color: var(--muted);
  margin-top: 1rem;
}

.post-body { margin-top: 1.5rem; }

.post-footnote {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--muted);
  font-style: italic;
}

.section-header { margin-bottom: 2rem; }
.section-header h1 { margin-top: 0; }

.section-intro {
  color: var(--muted);
  font-style: italic;
  margin-top: 0.5rem;
}

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-list li {
  padding: 0.85rem 0;
  border-bottom: 1px dashed var(--border);
}

.post-list a {
  font-size: 1.05rem;
  text-decoration: none;
}

.post-list a:hover { text-decoration: underline; }

.post-list-meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin-left: 0.7rem;
}

.post-list-description {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.landing-mission {
  margin: 0 0 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.mission-line {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.landing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 600px) {
  .landing-grid { grid-template-columns: 1fr; gap: 2rem; }
}

.landing-col h2 {
  margin-top: 0;
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: lowercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
}

.landing-col h2 a {
  color: var(--muted);
  text-decoration: none;
}

.landing-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.landing-list li {
  padding: 0.45rem 0;
  font-size: 0.95rem;
}

.landing-list a {
  text-decoration: none;
}

.landing-list a:hover { text-decoration: underline; }

.landing-meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  margin-left: 0.4rem;
}

.landing-content {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.site-footer {
  margin-top: 5rem;
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-meta { margin-bottom: 0.5rem; }
.footer-meta a { color: var(--muted); }
.footer-license { font-size: 0.78rem; line-height: 1.45; }
