@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #f3efe6;
  --ink: #1b1a17;
  --muted: #5f5b52;
  --accent: #b93a1c;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --edge: clamp(1.25rem, 4vw, 3rem);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #141311;
    --ink: #ece7dc;
    --muted: #a19b8f;
    --accent: #ff7a59;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #141311;
  --ink: #ece7dc;
  --muted: #a19b8f;
  --accent: #ff7a59;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: var(--edge);
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--paper); }
p { margin: 0; }

a, button { color: inherit; cursor: pointer; }
a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  transition: text-decoration-thickness 120ms ease;
}
a:hover { text-decoration-thickness: 3px; }
a:active, button:active { opacity: 0.7; }
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 2px; }

.top, .bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 1.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
}
.top .name { color: var(--ink); font-weight: 600; }
.clock time { font-variant-numeric: tabular-nums; }

main {
  align-self: end;
  padding: 4rem 0 clamp(3rem, 10vh, 6rem);
}
h1 {
  margin: 0 0 1.5rem;
  max-width: 15ch;
  font-family: var(--serif);
  font-size: clamp(2.75rem, 9vw, 7.5rem);
  font-weight: 420;
  font-variation-settings: "SOFT" 100, "WONK" 0;
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h1 em {
  font-style: italic;
  font-weight: 380;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  color: var(--accent);
}
.about {
  max-width: 34rem;
  font-size: 1.125rem;
  color: var(--muted);
  text-wrap: pretty;
}

.links { display: flex; flex-wrap: wrap; gap: 0 1.5rem; margin: 0; padding: 0; list-style: none; }
.links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-size: 1rem;
}

.meta { display: flex; align-items: center; gap: 1.5rem; }
.theme { display: flex; gap: 0.25rem; margin-inline: -0.375rem; }
.theme button {
  min-height: 44px;
  padding: 0 0.375rem;
  border: 0;
  background: none;
  font: inherit;
  color: var(--muted);
  text-decoration: none;
  text-underline-offset: 0.25em;
}
.theme button:hover { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; }
.theme button[aria-pressed="true"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}
.theme button[aria-pressed="true"]:active { opacity: 1; }

/* Theme switch: the new theme grows out of the centre as a circle (driven from
   index.html). Turn off the default cross-fade so only the clip-path shows. */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
