/* ---------- Theme: tweak these to change the whole look ---------- */
:root {
  --bg: #ffffff;
  --text: #000000;      /* titles, intro */
  --muted: #6b6b6b;     /* descriptions */
  --faint: #a3a3a3;     /* years */
  --hover: #f3f3f3;     /* row hover background */
  --rule: #e5e5e5;      /* divider lines */
  --font: "Inter", system-ui, -apple-system, sans-serif;}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 520px;
  padding: 80px 24px 96px;
  margin-left: clamp(0px, 8vw, 120px);
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--text); color: var(--bg); }

/* ---------- Intro ---------- */
.intro { margin-bottom: 64px; }

.intro p {
  font-size: 22px;
  font-weight: 500;
  line-height: 30px;
  letter-spacing: -0.01em;
}

.intro p + p { margin-top: 12px; }

.intro a {
  text-decoration: underline;
  text-decoration-color: var(--faint);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.intro a:hover { text-decoration-color: var(--text); }

/* ---------- Section labels ---------- */
section { margin-top: 48px; }

h2 {
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

/* ---------- Rows: title  description ........ year ---------- */
.row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 1px 8px;
  margin: 0 -8px;
  border-radius: 3px;
}

.row:hover { background: var(--hover); }

.row > span { flex: 1; min-width: 0; }

.title { margin-right: 8px; }

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

.row time {
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

/* ---------- Cards: name on top, description below, thin dividers ---------- */
/* Thin line under every section header (except the footer's "Say hello") */
section:not(.footer) h2 {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}

/* cards sit right on the header line, so drop the gap */
section:has(.cards) h2 { margin-bottom: 0; }

.card {
  display: block;
  padding: 16px 0 4px;
}

.card h3 {
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  transition: opacity 0.15s;
}

.card p {
  margin-top: 6px;
  font-size: 16px;
  line-height: 24px;
  color: var(--muted);
}

.card:hover h3 { opacity: 0.55; }

/* ---------- Footer ---------- */
.footer p { color: var(--muted); }

.footer a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--faint);
  text-underline-offset: 3px;
}
.footer a:hover { text-decoration-color: var(--text); }

.meta {
  margin-top: 24px;
  font-size: 13px;
  color: var(--faint) !important;
  font-variant-numeric: tabular-nums;
}

/* ---------- Sub-pages (writing list + posts) ---------- */
.back {
  display: inline-block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 48px;
}
.back:hover { color: var(--text); }

.page-title {
  font-size: 22px;
  font-weight: 500;
  line-height: 30px;
  letter-spacing: -0.01em;
}

.subtitle {
  margin-top: 8px;
  font-style: italic;
  color: var(--muted);
}

.post-date {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  color: var(--faint);
}

/* Body text of a post */
.prose { margin-top: 40px; }
.prose p { margin-bottom: 20px; line-height: 28px; }
.prose h2 {                       /* sub-headings inside a post */
  font-size: 16px;
  text-transform: none;
  letter-spacing: 0;
  border: none;
  padding: 0;
  margin: 36px 0 12px;
}
.prose a {
  text-decoration: underline;
  text-decoration-color: var(--faint);
  text-underline-offset: 3px;
}
.prose a:hover { text-decoration-color: var(--text); }
.prose ul, .prose ol { padding-left: 20px; margin-bottom: 20px; }
.prose li { margin-bottom: 6px; line-height: 28px; }
.prose blockquote {
  border-left: 2px solid var(--rule);
  padding-left: 16px;
  color: var(--muted);
  margin-bottom: 20px;
}
.prose strong { font-weight: 500; }
.prose hr { border: none; border-top: 1px solid var(--rule); margin: 36px 0; }
.prose img { max-width: 100%; border-radius: 4px; margin: 8px 0 20px; }

/* ---------- Mobile ---------- */
@media (max-width: 520px) {
  main { padding-top: 56px; }
  .intro p { font-size: 20px; line-height: 28px; }
  .desc { display: block; }
  .row { padding-top: 4px; padding-bottom: 4px; }
}
