:root {
  --blue: #4169e1;
  --blue-light: #eef2fb;
  --blue-mid: #c5d3f5;
  --text: #111827;
  --muted: #6b7280;
  --bg: #ffffff;
  --border: #e5e7eb;
}

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

html {
  font-size: 18px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

/* ── Nav ── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
}

.nav-name {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--blue);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--blue);
}

/* ── Page wrapper ── */
main {
  max-width: 680px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
}

/* ── About page ── */
.about-intro {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.about-intro span {
  color: var(--blue);
}

.about-body {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.8;
}

.about-body p + p {
  margin-top: 1.2rem;
}

.about-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.about-links a {
  color: var(--blue);
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--blue-mid);
  padding-bottom: 1px;
  transition: border-color 0.15s;
}

.about-links a:hover {
  border-color: var(--blue);
}

/* ── Writings index ── */
.page-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 2.5rem;
  color: var(--text);
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-item {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.1s;
}

.post-item:first-child {
  border-top: 1px solid var(--border);
}

.post-item:hover .post-title {
  color: var(--blue);
}

.post-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.3rem;
  transition: color 0.15s;
}

.post-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.post-excerpt {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ── Individual post ── */
.post-header {
  margin-bottom: 2.5rem;
}

.post-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin-bottom: 0.6rem;
}

.post-date {
  font-size: 0.85rem;
  color: var(--muted);
}

.post-content {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text);
}

.post-content p + p {
  margin-top: 1.4rem;
}

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

.post-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 2rem 0 0.6rem;
}

.post-content a {
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px solid var(--blue-mid);
}

.post-content a:hover {
  border-color: var(--blue);
}

.post-content blockquote {
  border-left: 3px solid var(--blue);
  margin: 1.5rem 0;
  padding: 0.5rem 1.2rem;
  color: var(--muted);
  font-style: italic;
}

.back-link {
  display: inline-block;
  margin-top: 3rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.back-link:hover {
  color: var(--blue);
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ── Responsive ── */
@media (max-width: 600px) {
  nav {
    padding: 1.2rem 1.2rem;
  }

  main {
    padding: 2.5rem 1.2rem 5rem;
  }

  .about-intro {
    font-size: 1.6rem;
  }
}
