:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --text: #212529;
  --text-muted: #6c757d;
  --accent: #2f6690;
  --accent-soft: #e3edf5;
  --border: #e3e6ea;
  --shadow: 0 1px 2px rgba(20, 26, 31, 0.04), 0 8px 24px rgba(20, 26, 31, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16191c;
    --surface: #1f2327;
    --text: #eceef0;
    --text-muted: #9aa3ab;
    --accent: #6fa8d4;
    --accent-soft: #22323f;
    --border: #2c3236;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.3);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Yu Gothic", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

a {
  color: inherit;
}

/* header */

.site-header {
  padding: 1.75rem 0;
}

.site-title {
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  letter-spacing: 0.01em;
}

/* home / list */

.eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

main h1 {
  margin: 0 0 1.75rem;
  font-size: clamp(1.5rem, 4vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.empty-state {
  color: var(--text-muted);
}

.post-grid {
  list-style: none;
  margin: 0 0 3rem;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.post-card:hover {
  transform: translateY(-2px);
}

.post-card a {
  display: flex;
  gap: 1rem;
  padding: 0;
  text-decoration: none;
  align-items: stretch;
}

.thumb-frame {
  flex: 0 0 128px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-card-body {
  padding: 1rem 1.25rem 1rem 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
}

.post-card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5;
}

.post-card-excerpt {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* tags */

.tag-row {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
}

.post-meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* single article */

.post {
  padding-bottom: 3rem;
}

.hero-frame {
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
  margin: 0 0 1.75rem;
  box-shadow: var(--shadow);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

.post-header .tag-row {
  margin-bottom: 0.75rem;
}

.post-header h1 {
  margin: 0 0 0.5rem;
}

.post-content {
  font-size: 1.02rem;
}

.post-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  letter-spacing: -0.01em;
}

.post-content p {
  margin: 0 0 1.25rem;
}

.post-content img {
  width: 100%;
  border-radius: 14px;
  margin: 0.5rem 0 1.5rem;
  display: block;
}

.post-content a {
  color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

.source-note {
  margin: 2rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.source-note a {
  color: var(--accent);
}

/* footer */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

.site-footer .wrap {
  padding: 1.5rem;
}

.site-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 0 0 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
}

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

.site-footer p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* mobile */

@media (max-width: 480px) {
  .thumb-frame {
    flex-basis: 96px;
  }

  .post-card-body {
    padding: 0.85rem 1rem 0.85rem 0;
  }
}
