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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #0d0d0d;
  background: #fff;
  max-width: 640px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ---- Nav ---- */

header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4rem;
}

.site-name {
  font-weight: 600;
  font-size: 1.70625rem;
  color: #0d0d0d;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.nav-links a,
.about-toggle {
  font-family: inherit;
  font-size: 0.875rem;
  color: #666;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}

.nav-links a:hover,
.about-toggle:hover {
  color: #0d0d0d;
}

.about-toggle[aria-expanded="true"] {
  color: #0d0d0d;
}

/* ---- About ---- */

.about {
  margin-bottom: 4rem;
}

.about p {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: #333;
  letter-spacing: -0.005em;
}

.about a {
  color: #0d0d0d;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: #ccc;
  transition: text-decoration-color 0.15s;
}

.about a:hover {
  text-decoration-color: #0d0d0d;
}

.about-links {
  margin-top: 1rem;
  display: flex;
  gap: 1.25rem;
  font-size: 0.875rem;
}

.about-links a {
  font-size: 0.875rem;
  color: #666;
}

.about-links a:hover {
  color: #0d0d0d;
}

/* ---- Writing ---- */

.writing h2 {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #999;
  margin-bottom: 1.5rem;
}

.coming-soon {
  font-size: 0.9375rem;
  color: #999;
}

.post-list {
  list-style: none;
}

.post-list li {
  border-top: 1px solid #eee;
}

.post-list li a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2rem;
  padding: 1rem 0;
  text-decoration: none;
  transition: background 0.15s;
}

.post-list li a:hover {
  background: #fafafa;
  margin: 0 -1rem;
  padding: 1rem;
  border-radius: 6px;
}

.post-title {
  font-size: 1rem;
  font-weight: 500;
  color: #0d0d0d;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.post-date {
  font-size: 0.8125rem;
  color: #999;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---- Article pages ---- */

.article-back {
  display: inline-block;
  font-size: 0.875rem;
  color: #666;
  text-decoration: none;
  margin-bottom: 3rem;
  transition: color 0.15s;
}

.article-back:hover {
  color: #0d0d0d;
}

.article-header {
  margin-bottom: 2.5rem;
}

.article-header h1 {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}

.article-meta {
  font-size: 0.8125rem;
  color: #999;
}

.article-hero {
  width: calc(100% + 3rem);
  margin-left: -1.5rem;
  margin-bottom: 2.5rem;
  border-radius: 0;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.article-body p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #333;
  letter-spacing: -0.005em;
  margin-bottom: 1.5rem;
}

.article-body p:last-child {
  margin-bottom: 0;
}

.article-body h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.article-summary {
  background: #f7f7f7;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0 2rem;
  border-radius: 6px;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #333;
}

.article-body table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0 1.5rem;
}

.article-body th,
.article-body td {
  text-align: left;
  padding: 0.5rem 0.625rem;
  border-bottom: 1px solid #eee;
  font-size: 0.875rem;
  line-height: 1.5;
}

.article-body td:last-child {
  text-align: right;
}

.article-body th {
  font-size: 0.75rem;
  font-weight: 500;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.article-body tr.result td {
  font-weight: 600;
  color: #0d0d0d;
}

.article-sources {
  font-size: 0.8125rem;
  color: #666;
  line-height: 1.6;
  margin-top: 2rem;
}

/* ---- Responsive ---- */

@media (max-width: 480px) {
  body {
    padding: 2rem 1.25rem;
  }

  header nav {
    margin-bottom: 3rem;
  }

  .about {
    margin-bottom: 3rem;
  }

  .post-list li a {
    flex-direction: column;
    gap: 0.25rem;
  }

  .post-list li a:hover {
    margin: 0 -0.75rem;
    padding: 0.75rem;
  }

  .article-header h1 {
    font-size: 1.625rem;
  }

  .article-hero {
    width: calc(100% + 2.5rem);
    margin-left: -1.25rem;
  }
}
