:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #6b6b6b;
  --line: #e5e5e5;
  --accent: #1a1a1a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111111;
    --fg: #e8e8e8;
    --muted: #8a8a8a;
    --line: #2a2a2a;
    --accent: #e8e8e8;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  color-scheme: light dark;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
  max-width: 40rem;
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
  -webkit-font-smoothing: antialiased;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 3rem;
}

header .site-name {
  font-family: "Snell Roundhand", "Brush Script MT", "Segoe Script", cursive;
  font-weight: bold;
  font-size: 1.8rem;
  text-decoration: none;
  color: var(--fg);
}

nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1.25rem;
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--fg);
}

h1 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 2.5rem 0 0.75rem;
}

h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  margin: 1.25rem 0 0.5rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}

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

.muted {
  color: var(--muted);
}

/* Post lists (home + blog index) */
.post-list {
  list-style: none;
}

.post-list li {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.post-list time {
  color: var(--muted);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  min-width: 6.5rem;
}

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

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

/* Book lists */
.book-list {
  list-style: none;
}

.book-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}

.book-list li:first-child {
  padding-top: 0;
}

.book-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.book-list a {
  display: block;
  color: var(--fg);
  text-decoration: none;
}

.book-list a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}

.book-list .muted {
  display: block;
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

/* Contact links row */
.links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.links a {
  color: var(--muted);
  text-decoration: none;
}

.links a:hover {
  color: var(--fg);
}

/* Article (blog post) pages */
article .post-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 2rem;
}

article h1 {
  margin-bottom: 0.25rem;
}

article ul,
article ol {
  margin: 0 0 1rem 1.25rem;
}

article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.875em;
  background: var(--line);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

article pre {
  background: var(--line);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 1rem;
}

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

article img {
  max-width: 100%;
  border-radius: 6px;
}

article figure {
  margin: 1.5rem 0;
}

article figcaption {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.4rem;
}

article blockquote {
  border-left: 2px solid var(--line);
  padding-left: 1rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

article table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

article th,
article td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--line);
}

article th {
  color: var(--muted);
  font-weight: 600;
}

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

.travel-map {
  max-width: 100%;
  border-radius: 6px;
  margin: 1.5rem 0;
}

footer {
  margin-top: 4rem;
  color: var(--muted);
  font-size: 0.85rem;
}
