:root {
  color-scheme: light;
  --paper: #f3e9d9;
  --ink: #493729;
  --muted: #7e6855;
  --line: #d9c6ac;
  --accent: #945337;
  --body: #6b5544;
  --hover: #e8d8bf;
  --selection: #dfc6a1;
  --vignette-middle: rgb(65 38 19 / 5%);
  --vignette-edge: rgb(65 38 19 / 15%);
  font-family: "Cascadia Code", "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(ellipse at 50% 42%, transparent 28%, var(--vignette-middle) 65%, var(--vignette-edge) 100%);
}
::selection { background: var(--selection); }
main { width: min(100% - 64px, 560px); margin: 0 auto; padding: clamp(48px, 11vh, 112px) 0 40px; }
.masthead { display: flex; align-items: center; justify-content: flex-end; margin-bottom: 76px; }
.site-name, .eyebrow, footer { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.site-name { font-size: 12px; color: var(--muted); }
.eyebrow { font-size: 11px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--accent); margin: 0 0 18px; }
h1 { font-size: clamp(40px, 8vw, 54px); font-weight: 600; line-height: 1.15; letter-spacing: -1.8px; margin: 0 0 27px; }
h1 span { color: var(--accent); }
.bio { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 17px; line-height: 1.85; color: var(--body); margin: 0 0 16px; max-width: 510px; }
.bio a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 4px; }
.bio a:hover { color: var(--accent); }
.links { margin-top: 43px; border-top: 1px solid var(--line); }
.links a { display: grid; grid-template-columns: 1fr auto 16px; align-items: center; gap: 26px; min-height: 67px; padding: 8px 2px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; transition: color 150ms, background-color 150ms; }
.link-name { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 500; }
.link-icon { flex: none; width: 19px; height: 19px; color: var(--muted); }
.link-detail { color: var(--muted); font-size: 13px; }
.arrow { font-size: 19px; color: var(--muted); transition: transform 150ms; }
.links a:hover { color: var(--accent); background: var(--hover); }
.links a:hover .arrow { color: var(--accent); transform: translate(2px, -2px); }
a:focus-visible, .theme-control:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 5px; }
.header-tools { display: flex; align-items: center; gap: 20px; }
.theme-control { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--muted); cursor: pointer; }
.theme-control:hover { background: var(--hover); color: var(--ink); }
.theme-icon { width: 20px; height: 20px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.sun { display: var(--sun-display, none); }
.moon { display: var(--moon-display, block); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]):not(:has(#theme:checked)) {
  color-scheme: dark;
  --paper: #2d251f;
  --ink: #fff0db;
  --muted: #d9c1a2;
  --line: #524234;
  --accent: #efba96;
  --body: #ecd8bf;
  --hover: #3d3026;
  --selection: #705039;
  --vignette-middle: rgb(18 10 5 / 16%);
  --vignette-edge: rgb(18 10 5 / 48%);
  --sun-display: block;
  --moon-display: none;
  }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]):has(#theme:checked) {
  color-scheme: light;
  --paper: #f3e9d9;
  --ink: #493729;
  --muted: #7e6855;
  --line: #d9c6ac;
  --accent: #945337;
  --body: #6b5544;
  --hover: #e8d8bf;
  --selection: #dfc6a1;
  --vignette-middle: rgb(65 38 19 / 5%);
  --vignette-edge: rgb(65 38 19 / 15%);
  --sun-display: none;
  --moon-display: block;
  }
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]):has(#theme:checked) {
  color-scheme: dark;
  --paper: #2d251f;
  --ink: #fff0db;
  --muted: #d9c1a2;
  --line: #524234;
  --accent: #efba96;
  --body: #ecd8bf;
  --hover: #3d3026;
  --selection: #705039;
  --vignette-middle: rgb(18 10 5 / 16%);
  --vignette-edge: rgb(18 10 5 / 48%);
  --sun-display: block;
  --moon-display: none;
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --paper: #f3e9d9;
  --ink: #493729;
  --muted: #7e6855;
  --line: #d9c6ac;
  --accent: #945337;
  --body: #6b5544;
  --hover: #e8d8bf;
  --selection: #dfc6a1;
  --vignette-middle: rgb(65 38 19 / 5%);
  --vignette-edge: rgb(65 38 19 / 15%);
  --sun-display: none;
  --moon-display: block;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #2d251f;
  --ink: #fff0db;
  --muted: #d9c1a2;
  --line: #524234;
  --accent: #efba96;
  --body: #ecd8bf;
  --hover: #3d3026;
  --selection: #705039;
  --vignette-middle: rgb(18 10 5 / 16%);
  --vignette-edge: rgb(18 10 5 / 48%);
  --sun-display: block;
  --moon-display: none;
}
footer { display: flex; align-items: center; gap: 8px; margin-top: 35px; font-size: 10px; line-height: 1.8; color: var(--muted); }
.location-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
@media (max-width: 480px) {
  main { width: calc(100% - 48px); padding-top: 40px; }
  .masthead { margin-bottom: 64px; }
  h1 { letter-spacing: -2px; }
  .bio { font-size: 16px; }
  .links a { grid-template-columns: 1fr 16px; gap: 6px 12px; padding: 16px 2px; }
  .link-detail { grid-column: 1; grid-row: 2; padding-left: 31px; font-size: 12px; }
  .arrow { grid-column: 2; grid-row: 1 / 3; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
