:root {
  --bg: #fbfbfa;
  --surface: #f3f2ef;
  --ink-primary: #141413;
  --ink-secondary: #52514d;
  --ink-muted: #8a8882;
  --border: rgba(20, 20, 19, 0.09);
  --underline: rgba(20, 20, 19, 0.24);
  --underline-hover: rgba(20, 20, 19, 0.85);
  --accent: #6b5b4b;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", "Noto Sans SC", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #111110;
  --surface: #1b1b19;
  --ink-primary: #eceae4;
  --ink-secondary: #a19f98;
  --ink-muted: #6f6d67;
  --border: rgba(236, 234, 228, 0.1);
  --underline: rgba(236, 234, 228, 0.26);
  --underline-hover: rgba(236, 234, 228, 0.85);
  --accent: #b5a492;
  color-scheme: dark;
}

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

html {
  background-color: var(--bg);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color 0.18s ease, color 0.18s ease;
}

body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--bg);
  color: var(--ink-primary);
}

::selection {
  background-color: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--ink-primary);
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.shell {
  width: 100%;
  max-width: 540px;
  margin-inline: auto;
  padding: 56px var(--space-6) 72px;
}

@media (max-width: 520px) {
  .shell {
    padding: 40px var(--space-5) 56px;
  }
}

.site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-12);
}

.site-name {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--ink-primary);
}

.site-role {
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink-muted);
}

.header-controls {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
  margin-top: 1px;
}

.util-link {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-muted);
  border-bottom: 1px solid transparent;
  padding: 2px 0;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.util-link:hover {
  color: var(--ink-primary);
  border-bottom-color: var(--underline-hover);
}

.theme-toggle {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 4px;
  margin: -4px;
  color: var(--ink-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.theme-toggle:hover {
  color: var(--ink-primary);
  background-color: var(--surface);
}

.theme-toggle .icon-sun {
  display: none;
}

.theme-toggle .icon-moon,
[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

.prose-link {
  color: var(--ink-primary);
  border-bottom: 1px solid var(--underline);
  padding-bottom: 1px;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.prose-link:hover {
  border-bottom-color: var(--underline-hover);
}

.intro {
  margin-bottom: var(--space-12);
}

.intro p {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 15px;
}

.intro p + p {
  margin-top: var(--space-4);
}

.section {
  margin-top: var(--space-12);
}

.section-label {
  margin: 0 0 var(--space-5);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
}

.index-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.index-row {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  column-gap: var(--space-4);
  align-items: baseline;
  transition: opacity 0.22s ease;
}

@media (max-width: 480px) {
  .index-row {
    grid-template-columns: 48px 1fr;
    column-gap: var(--space-3);
  }
}

@media (hover: hover) {
  .index-list:has(> li:hover) > li:not(:hover),
  .index-list:has(> li:focus-within) > li:not(:focus-within) {
    opacity: 0.42;
  }
}

.index-year {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
  white-space: nowrap;
}

.index-body {
  min-width: 0;
}

.index-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}

.index-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-primary);
  line-height: 1.5;
}

.row-link {
  color: var(--ink-primary);
  border-bottom: 1px solid transparent;
  transition: border-color 0.18s ease;
}

.row-link::after {
  content: "";
  position: absolute;
  inset: -6px -8px;
}

.index-row:hover .row-link,
.row-link:focus-visible {
  border-bottom-color: var(--underline-hover);
}

.ext-arrow {
  display: inline-block;
  margin-left: 3px;
  font-size: 12.5px;
  color: var(--ink-muted);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), color 0.18s ease;
}

.index-row:hover .ext-arrow,
.elsewhere-link:hover .ext-arrow {
  transform: translate(1.5px, -1.5px);
  color: var(--ink-primary);
}

.index-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
  flex-shrink: 0;
}

.index-desc {
  margin: var(--space-1) 0 0;
  font-size: 14px;
  line-height: 1.62;
  color: var(--ink-secondary);
}

.contact-copy {
  margin: 0 0 var(--space-4);
  font-size: 14.5px;
  line-height: 1.68;
  color: var(--ink-secondary);
}

.elsewhere-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-6);
  margin: 0;
  padding: 0;
  list-style: none;
}

.elsewhere-link {
  display: inline-flex;
  align-items: center;
  font-size: 14.5px;
  color: var(--ink-primary);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.elsewhere-link:hover {
  color: var(--ink-primary);
  border-bottom-color: var(--underline-hover);
}

.elsewhere-note {
  margin: var(--space-3) 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  font-size: 13.5px;
  color: var(--ink-muted);
  line-height: 1.6;
}

.elsewhere-note__sep {
  opacity: 0.45;
}

.copy-handle {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--underline);
  padding: 0 0 1px;
  font: inherit;
  color: var(--ink-primary);
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.copy-handle:hover {
  color: var(--ink-primary);
  border-bottom-color: var(--underline-hover);
}

.copy-status {
  margin-left: 2px;
  font-size: 12px;
  color: var(--accent);
}

.site-footer {
  margin-top: var(--space-16);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: 13px;
  color: var(--ink-muted);
}

.site-footer > span {
  margin-inline-end: auto;
}

.footer-link {
  color: var(--ink-muted);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.footer-link:hover {
  color: var(--ink-primary);
  border-bottom-color: var(--underline-hover);
}

@keyframes blurReveal {
  0% {
    opacity: 0;
    filter: blur(4px);
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

.reveal {
  animation: blurReveal 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--reveal-delay, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  html {
    transition: none;
  }
  .reveal {
    animation: none;
    opacity: 1;
    filter: none;
    transform: none;
  }
  .index-row,
  .ext-arrow,
  .prose-link,
  .row-link,
  .util-link,
  .theme-toggle,
  .copy-handle,
  .footer-link {
    transition: none;
  }
}