:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #6b6b6b;
  --accent: #a2321f;
  --border: #e5e5e5;
  --max-width: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14141a;
    --fg: #ececec;
    --muted: #9a9a9a;
    --accent: #e07856;
    --border: #2a2a30;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

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

h1, h2, h3 { line-height: 1.25; }

/* Header */

.site-header {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.site-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--fg);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.95rem;
}

.site-nav a { color: var(--fg); }
.site-nav a:hover { color: var(--accent); }

/* Main content */

main.wrap {
  padding-top: 40px;
  padding-bottom: 60px;
  min-height: 60vh;
}

.post-back {
  margin: 0 0 8px;
  font-size: 0.9rem;
}

.post-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: -8px;
}

.tag {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--muted);
}

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

.post-content img,
.post-content iframe,
.home img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.post-content iframe {
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
}

figure {
  margin: 24px 0;
  text-align: center;
}

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

/* Post lists */

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

.post-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.post-list-title {
  color: var(--fg);
  font-weight: 500;
}

.post-list time {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Photography gallery */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 4px;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  color: var(--muted);
  font-size: 0.85rem;
}
