:root {
  --bg: #0e0a08;
  --text: #f0e6d6;
  --text-muted: #948575;
  --text-faint: #5e5448;
  --accent: #c98140;
  --border: rgba(240, 230, 214, 0.08);
  --border-hover: rgba(240, 230, 214, 0.18);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Source Serif 4', 'Source Serif Pro', Georgia, 'Times New Roman', serif;
  font-weight: 400;
  font-feature-settings: "kern" 1, "liga" 1, "onum" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: 1.7;
  letter-spacing: -0.003em;
  min-height: 100vh;
}
.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 96px 32px 160px;
}
a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

/* Wordmark */
.wordmark {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  display: inline-block;
  margin-bottom: 88px;
  opacity: 0;
  animation: fade-in 1.1s ease-out 0.1s forwards;
}
.wordmark .dot { color: var(--accent); }
.wordmark:hover { color: var(--text); }
.wordmark:hover .dot { color: var(--text); }

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Home: writing list */
.writing-list {
  list-style: none;
  opacity: 0;
  animation: fade-in 1.1s ease-out 0.35s forwards;
}
.writing-list li {
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}
.writing-list li:first-child {
  border-top: 1px solid var(--border);
}
.writing-list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
}
.writing-title {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: color 0.2s ease;
}
.writing-date {
  font-size: 14px;
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
.writing-list a:hover .writing-title { color: var(--accent); }
.writing-list a:hover .writing-date { color: var(--text); }

/* About */
.about-prose {
  font-size: 19px;
  line-height: 1.8;
  max-width: 580px;
  opacity: 0;
  animation: fade-in 1.1s ease-out 0.35s forwards;
}
.about-prose a {
  border-bottom: 1px solid var(--border-hover);
  padding-bottom: 1px;
}
.about-prose a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Essay */
.essay-meta {
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 0;
  margin-bottom: 18px;
  opacity: 0;
  animation: fade-in 1.1s ease-out 0.2s forwards;
}
.essay-title {
  font-size: 38px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.018em;
  margin-bottom: 56px;
  opacity: 0;
  animation: fade-in 1.1s ease-out 0.3s forwards;
}
.essay-body {
  font-size: 19px;
  line-height: 1.78;
  opacity: 0;
  animation: fade-in 1.3s ease-out 0.45s forwards;
}
.essay-body p {
  margin-bottom: 1.4em;
}
.essay-body p:first-of-type {
  font-size: 22px;
  line-height: 1.6;
  letter-spacing: -0.008em;
  margin-bottom: 1.3em;
}
.essay-body em { font-style: italic; }

.essay-end {
  margin-top: 96px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  opacity: 0;
  animation: fade-in 1.1s ease-out 0.7s forwards;
}
.essay-end a {
  border-bottom: 1px solid var(--border-hover);
  padding-bottom: 1px;
}
.essay-end a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

::selection {
  background: rgba(201, 129, 64, 0.3);
  color: var(--text);
}

@media (max-width: 640px) {
  .wrap { padding: 64px 24px 96px; }
  .essay-title { font-size: 28px; }
  .essay-body { font-size: 17px; }
  .essay-body p:first-of-type { font-size: 19px; }
  .about-prose { font-size: 17px; }
  .writing-title { font-size: 17px; }
  .wordmark { margin-bottom: 64px; }
  .essay-end { flex-direction: column; gap: 12px; }
}
