@font-face {
  font-family: Inter;
  src: url("inter.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("instrument-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("instrument-regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --paper: #000;
  --ink: #ebebe9;
  --body: #b8b8b4;
  --muted: #8a8a85;
  --line: #292928;
  --button: #0b0b0b;
  --serif: "Instrument Serif", Georgia, serif;
}
:root[data-theme="light"] {
  color-scheme: light;
  --paper: #fbfbfa;
  --ink: #111110;
  --body: #3c3c3a;
  --muted: #6e6e6a;
  --line: #d7d7d4;
  --button: #fff;
}
* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: Inter, system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
::selection { color: var(--paper); background: var(--ink); }

.falling-particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
}
.falling-particles i {
  position: absolute;
  top: 0;
  width: var(--flake-size);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #f7faff 30%, #dce8f3 60%, transparent 76%);
  animation: drift-down linear infinite;
}
[data-theme="light"] .falling-particles i {
  width: var(--flower-size);
  border-radius: 0;
  background: url("cherry-blossom.svg") center / contain no-repeat;
}
[data-theme="light"] .falling-particles i:nth-child(n + 34) { display: none; }
@keyframes drift-down {
  from { transform: translate3d(0, -24px, 0) rotate(var(--tilt)); }
  50% { transform: translate3d(var(--drift), 50vh, 0) rotate(calc(var(--tilt) + 40deg)); }
  to { transform: translate3d(0, calc(100vh + 24px), 0) rotate(calc(var(--tilt) + 100deg)); }
}
.intro, .home-footer, .archive, .archive-footer { position: relative; z-index: 1; }
@media (max-width: 640px) {
  .falling-particles i:nth-child(n + 30) { display: none; }
  [data-theme="light"] .falling-particles i:nth-child(n + 17) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .falling-particles i { animation: none; top: var(--rest); transform: rotate(var(--tilt)); }
}
@media print {
  .falling-particles { display: none; }
}

a {
  color: var(--ink);
  text-decoration-color: var(--line);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 2px; }
.skip {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 5;
  padding: 6px 12px;
  background: var(--paper);
  transform: translateY(-180%);
}
.skip:focus { transform: none; }
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--body);
  background: var(--button);
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--muted); color: var(--ink); }
.theme-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .sun, [data-theme="light"] .moon { display: none; }
[data-theme="light"] .theme-toggle .sun { display: block; }
.home-toggle { position: fixed; top: 24px; right: 24px; z-index: 2; }
.home { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.intro, .home-footer { width: min(100%, 608px); margin-inline: auto; }
.intro { margin-top: auto; padding: 36px 24px 0; }
.identity { display: flex; align-items: center; gap: 17px; margin-bottom: 30px; }
.identity img { display: block; width: 72px; height: 72px; border-radius: 9px; object-fit: cover; }
h1, h2 { font-family: var(--serif); color: var(--ink); font-weight: 400; }
h1 { margin: 0; font-style: italic; font-size: 2.5rem; letter-spacing: -.03em; line-height: 1.08; }
.identity h1 { font-size: 3rem; line-height: 1; margin: 0 0 4px; }
.identity p { font-size: .9375rem; letter-spacing: .04em; line-height: 1.7; margin: 0; color: var(--muted); }
.bio p { margin: 0 0 15px; font-size: .96875rem; }
.bio p:last-child { margin-bottom: 26px; }
.bio a, .summary a, .entry p a { font-weight: 500; }
.home-links { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 26px; padding-bottom: 8px; }
.home-links a, .archive-footer a { text-decoration: none; color: var(--body); font-size: .9375rem; font-weight: 500; }
.home-links a:hover, .archive-footer a:hover, .back:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.home-footer {
  margin-bottom: auto;
  padding: 26px 24px 30px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: .875rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.separator { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }
.masthead {
  position: fixed;
  inset: 0 0 auto;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--paper);
  padding: 11px 40px;
}
.wordmark { color: var(--ink); font: italic 1.125rem/1.3 var(--serif); text-decoration: none; }
.masthead .theme-toggle { width: 32px; height: 32px; }
.masthead .theme-toggle svg { width: 15px; height: 15px; }
.archive, .archive-footer { max-width: 640px; margin: 0 auto; padding-inline: 32px; }
.archive { padding-top: 80px; padding-bottom: 48px; }
.back { display: inline-block; color: var(--muted); font-size: .875rem; text-decoration: none; margin-bottom: 26px; }
.summary { font-size: .96875rem; margin: 8px 0 32px; }
.entries { list-style: none; padding: 0; margin: 0; }
.entry { border-top: 1px solid var(--line); padding: 19px 0 22px; }
.entry:last-child { border-bottom: 1px solid var(--line); }
.entry .meta { font-size: .8125rem; letter-spacing: .045em; text-transform: uppercase; color: var(--muted); margin: 0 0 7px; }
.entry h2 { font-size: 1.45rem; letter-spacing: -.02em; line-height: 1.22; margin: 0; }
.entry h2 a { text-decoration: none; }
.entry h2 a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.entry p { font-size: .96875rem; margin: 9px 0 0; }
.archive-footer { display: flex; align-items: center; justify-content: space-between; padding-block: 8px 32px; gap: 24px; }
.archive-footer nav { display: flex; flex-wrap: wrap; gap: 16px; }
.archive-footer .wordmark { font: italic 1.125rem/1.3 var(--serif); }
.archive-footer nav a { font-size: .875rem; }
@media (max-width: 768px) {
  .intro { padding-top: 40px; }
  .home-toggle { top: 16px; right: 16px; width: 38px; height: 38px; }
  .home-links { gap: 6px 16px; }
}
@media (max-width: 640px) {
  .identity { gap: 13px; padding-right: 25px; }
  .identity h1 { font-size: 2.1rem; }
  .identity img { width: 62px; height: 62px; border-radius: 8px; }
  .identity p { font-size: .875rem; line-height: 1.45; }
  .home-footer { font-size: .8125rem; padding-block: 24px 32px; }
  .masthead { padding: 10px 24px; }
  .archive, .archive-footer { padding-inline: 24px; }
  .archive { padding-top: 68px; padding-bottom: 40px; }
  .archive h1 { font-size: 2rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .intro, .archive { animation: enter .45s ease-out both; }
  @keyframes enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
}
