/* kevsun.org, variant A: calm editorial.
   Layout: one left-aligned reading column; a large Fraunces name, three plain lines,
   then a hairline-divided contact list. Palette and type come from the Helios Home
   design system (warm paper by day, blue-slate ink by night, one deep-teal accent). */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("fonts/geist.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg:          oklch(98.5% 0.005 85);
  --surface:     oklch(99.6% 0.003 85);
  --surface-2:   oklch(96.2% 0.007 85);
  --line:        oklch(91% 0.008 85);
  --line-strong: oklch(84% 0.010 85);
  --text:        oklch(23% 0.015 260);
  --text-2:      oklch(44% 0.014 260);
  --text-3:      oklch(53% 0.012 260);
  --accent:      oklch(47% 0.085 195);
  --accent-hover:oklch(41% 0.085 195);
  --accent-soft: oklch(94% 0.028 195);

  --font-display: "Fraunces", "Iowan Old Style", "Palatino", Georgia, serif;
  --font-body:    "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  --r-sm: 8px; --r-pill: 999px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg:          oklch(18% 0.010 260);
    --surface:     oklch(21.5% 0.011 260);
    --surface-2:   oklch(24.5% 0.012 260);
    --line:        oklch(29% 0.012 260);
    --line-strong: oklch(36% 0.014 260);
    --text:        oklch(94% 0.006 85);
    --text-2:      oklch(75% 0.010 260);
    --text-3:      oklch(65% 0.010 260);
    --accent:      oklch(77% 0.090 188);
    --accent-hover:oklch(83% 0.085 188);
    --accent-soft: oklch(29% 0.045 195);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:          oklch(18% 0.010 260);
  --surface:     oklch(21.5% 0.011 260);
  --surface-2:   oklch(24.5% 0.012 260);
  --line:        oklch(29% 0.012 260);
  --line-strong: oklch(36% 0.014 260);
  --text:        oklch(94% 0.006 85);
  --text-2:      oklch(75% 0.010 260);
  --text-3:      oklch(65% 0.010 260);
  --accent:      oklch(77% 0.090 188);
  --accent-hover:oklch(83% 0.085 188);
  --accent-soft: oklch(29% 0.045 195);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip {
  position: absolute; left: var(--s4); top: -100px;
  background: var(--surface); color: var(--text); padding: var(--s2) var(--s3);
  border-radius: var(--r-sm); z-index: 10;
}
.skip:focus { top: var(--s4); }

.page {
  max-width: 680px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: var(--s7);
  padding-block: var(--s5) var(--s6);
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}

/* ---- top bar: site mark + theme switch */
.bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.mark {
  font: 500 0.8125rem/1 var(--font-mono);
  color: var(--text-3);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.mark:hover { color: var(--text); }

.theme { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-pill); padding: 3px; margin: 0; }
.theme legend, .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; padding: 0; }
.theme input { position: absolute; opacity: 0; pointer-events: none; }
.theme label {
  font: 500 0.8125rem/1 var(--font-body);
  color: var(--text-2);
  padding: 9px 12px;
  min-height: 34px;
  display: inline-flex; align-items: center;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
  touch-action: manipulation;
}
.theme input:checked + label { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.theme input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---- intro */
main { display: flex; flex-direction: column; gap: var(--s7); flex: 1; }
.intro { display: flex; flex-direction: column; gap: var(--s5); padding-top: clamp(16px, 8vh, 96px); }
h1 {
  margin: 0;
  font: 380 clamp(3.25rem, 13vw, 6rem)/0.95 var(--font-display);
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.lede { display: flex; flex-direction: column; gap: var(--s3); max-width: 34em; }
.lede p { margin: 0; font-size: clamp(1.0625rem, 2.6vw, 1.25rem); line-height: 1.5; color: var(--text-2); text-wrap: pretty; }
.lede p:first-child { color: var(--text); }

/* ---- contact list: hairline rows, label left, value right */
.contact h2 {
  margin: 0 0 var(--s3);
  font: 500 1.125rem/1.2 var(--font-display);
}
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rows li {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s3);
  min-height: 56px;
  padding-block: var(--s2);
  border-bottom: 1px solid var(--line);
}
.rows .k { font: 500 0.8125rem/1.2 var(--font-body); color: var(--text-3); }
.rows .v { min-width: 0; overflow-wrap: anywhere; font-size: 1rem; }
.rows .v a { text-decoration: none; }
.rows .v a:hover { text-decoration: underline; }
.rows .data { font: 400 0.9375rem/1.3 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--text); }
.copy {
  font: 500 0.8125rem/1 var(--font-body);
  color: var(--text-2);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  min-height: 36px;
  padding: 0 var(--s3);
  cursor: pointer;
  transition: transform 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease);
  touch-action: manipulation;
}
.copy:hover { color: var(--text); border-color: var(--text-3); }
.copy:active { transform: scale(0.97); }
.copy[data-done] { color: var(--accent); border-color: var(--accent); }

footer { font: 400 0.8125rem/1.4 var(--font-body); color: var(--text-3); }

@media (max-width: 420px) {
  .rows li { grid-template-columns: 5rem minmax(0, 1fr) auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}
