:root {
  --bg: #0f1115;
  --bg-elevated: #171a21;
  --text: #e8eaed;
  --muted: #9aa3b2;
  --border: #2a3140;
  --accent: #6ea8fe;
  --accent-strong: #3d8bfd;
  --radius: 14px;
  --pad-x: clamp(1rem, 3vw, 2.5rem);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

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

.wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.5rem var(--pad-x) 2.5rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.logo {
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

nav a {
  color: var(--muted);
  font-size: 0.95rem;
}
nav a:hover { color: var(--text); }

.hero {
  margin-bottom: 2.75rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.lead {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 60ch;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-strong);
  color: #fff;
}
.btn-primary:hover {
  filter: brightness(1.08);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--muted);
  text-decoration: none;
}

.feed {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 0.5rem;
  margin-bottom: 2rem;
}

.feed-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.feed h2 {
  margin: 0;
  font-size: 1.05rem;
}

.feed-all {
  font-size: 0.9rem;
  white-space: nowrap;
}

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

.feed-list li {
  border-top: 1px solid var(--border);
  padding: 0.9rem 0;
}

.feed-list a {
  color: var(--text);
  font-weight: 600;
}
.feed-list a:hover { color: var(--accent); }

.feed-meta {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.feed-loading,
.feed-error {
  color: var(--muted);
  border-top: none !important;
  padding-top: 0.25rem !important;
}

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

@media (min-width: 640px) {
  .links { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1100px) {
  .feed-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2rem;
  }

  .feed-list li {
    border-top: none;
    border-bottom: 1px solid var(--border);
  }

  .feed-loading,
  .feed-error {
    grid-column: 1 / -1;
  }
}

.links article {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  background: rgba(23, 26, 33, 0.5);
}

.links h3 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
}

.links p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.page h1 {
  margin: 0 0 1rem;
  font-size: 1.8rem;
}

.content {
  color: var(--muted);
}
.content h2, .content h3 {
  color: var(--text);
  margin-top: 1.5rem;
}
.content p, .content li { max-width: 65ch; }
.content a { word-break: break-word; }

.site-footer {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}

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