@import url("https://fonts.googleapis.com/css2?family=Hanken+Grotesk:ital,wght@0,400;0,500;0,600;1,400&display=swap");

:root {
  --bg: #ffffff;
  --text: #1a1a1f;
  --muted: #6e6e7a;
  --accent: #3333cc;
  --rule: #dcdcf5;
  --font: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #121212;
  --text: #ececf1;
  --muted: #9a9aa8;
  --accent: #8c8cff;
  --rule: #2a2a45;
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

/* ---------- header ---------- */

.site-header {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.wordmark {
  font-size: clamp(2.25rem, 6vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--accent);
}
.wordmark:hover { text-decoration: none; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-size: 1.15rem;
  font-weight: 500;
}
.site-nav a { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--accent); }

.theme-toggle {
  font: inherit;
  font-size: 0.9rem;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.theme-toggle:hover { color: var(--accent); }

/* ---------- main column ---------- */

main {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 5rem;
  flex: 1;
}

h1, h2, h3 {
  font-weight: 500;
  line-height: 1.25;
  margin: 0;
}

.page-title {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.5rem;
  color: var(--accent);
  margin: 3.5rem 0 1rem;
}
.section-title:first-child { margin-top: 0; }

/* ---------- feed entries (blog + writing) ---------- */

.entry { margin-bottom: 3.5rem; }

.entry-title {
  font-size: 1.75rem;
  line-height: 1.25;
}
.entry-title a { color: var(--accent); }
.entry-title a:hover { text-decoration: none; opacity: 0.8; }

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-top: 0.4rem;
}
.entry-meta .author { font-weight: 600; }
.entry-meta time,
.entry-meta .outlet { color: var(--muted); }

.entry-image {
  display: block;
  margin-top: 1.25rem;
}
.entry-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--rule);
}
.entry-image:hover { opacity: 0.9; }

.entry-excerpt { margin: 1rem 0 0; }

.read-more { white-space: nowrap; }

/* ---------- about ---------- */

.note { margin-bottom: 2.25rem; }
.note-date {
  display: block;
  font-weight: 600;
  line-height: 1.6;
}
.note p { margin: 0.25rem 0 0; }
.note .ps { margin-top: 0.75rem; }

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

hr.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 3rem 0;
}

/* ---------- single post ---------- */

.post-date {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 1rem;
}

.post-hero { margin: 0 0 2rem; }
.post-hero img { display: block; width: 100%; height: auto; }
.post-hero figcaption {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 0.6rem;
}

.post-byline { margin-top: 0.4rem; }

.post-more {
  margin-top: 4.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}
.post-more .entry { margin-bottom: 0; }

.post-title { font-size: 2rem; color: var(--accent); }
.post-subtitle { font-style: italic; margin: 0.5rem 0 0; color: var(--muted); line-height: 1.6; }

.post-body { margin-top: 2.5rem; line-height: 1.85; }
.post-body p { margin: 0 0 1.25rem; }
.post-body img { display: block; max-width: 100%; height: auto; margin: 2rem 0 0.5rem; }
.post-body figcaption { font-size: 0.9rem; font-style: italic; color: var(--muted); margin-bottom: 2rem; line-height: 1.6; }

.post-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--muted);
}

/* ---------- footer ---------- */

.site-footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0 1.5rem 2.5rem;
  line-height: 1.8;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }
.clock { font-variant-numeric: tabular-nums; }

@media (max-width: 560px) {
  .site-nav { gap: 1.25rem; font-size: 1.05rem; width: 100%; }
  .theme-toggle { margin-left: auto; }
  main { padding-top: 2.5rem; }
  .entry-title { font-size: 1.5rem; }
}
