/* ─────────────────────────────────────────────────────────────────────────
   tnm.sh — quiet light mono
   ───────────────────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'iA Writer Mono';
  src: url('/fonts/iAWriterMonoS-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'iA Writer Mono';
  src: url('/fonts/iAWriterMonoS-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Tinted warm cream paper, deep cool ink. Restrained strategy. */
  --bg:        oklch(0.965 0.012 80);
  --ink:       oklch(0.235 0.020 250);
  --ink-soft:  oklch(0.460 0.014 250);
  --ink-faint: oklch(0.700 0.010 250);
  --rule:      oklch(0.780 0.010 250);
  --link:      oklch(0.420 0.110 245);
  --link-hover:oklch(0.345 0.140 245);

  /* Type. 17px base × 1.529 line-height = 26px baseline. */
  font-family: 'iA Writer Mono', ui-monospace, 'SF Mono', SFMono-Regular,
               Menlo, Consolas, 'Liberation Mono', monospace;
  font-size: 17px;
  line-height: 1.529;
  font-feature-settings: 'kern' 1, 'liga' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;

  color-scheme: light;
}

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

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

/* ─── layout ────────────────────────────────────────────────────────────── */

main {
  /* Left-aligned with a generous left margin on larger screens,
     deliberately not centered. */
  max-width: 64ch;
  padding-block: clamp(2rlh, 8vh, 6rlh);
  padding-inline: clamp(1.25rem, 5vw, 3.5rem);
  margin: 0;
}

/* ─── name ──────────────────────────────────────────────────────────────── */

h1 {
  font-size: 1rem;        /* same size as body — voice is in weight, not scale */
  font-weight: 700;
  margin: 0;
  letter-spacing: 0;
  color: var(--ink);
}

/* ─── bio ───────────────────────────────────────────────────────────────── */

.bio {
  margin: 1rlh 0 2rlh;
  max-width: 56ch;
  text-wrap: pretty;
  color: var(--ink);
}

/* ─── rule (single short mark, not a full divider) ──────────────────────── */

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  width: 8ch;
  margin: 2rlh 0;
  height: 0;
}

/* ─── links: dt + leader + dd, dot-leadered like a man-page ─────────────── */

.links {
  margin: 0 0 3rlh;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.link {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) minmax(0, max-content);
  align-items: baseline;
  margin: 0;
  min-width: 0;
}

.link dt {
  grid-column: 1;
  margin: 0;
  color: var(--ink-soft);
  font-weight: 400;
  min-width: 0;
}

.link .leader {
  grid-column: 2;
  overflow: hidden;
  white-space: nowrap;
  color: var(--ink-faint);
  padding: 0 1ch;
  user-select: none;
  opacity: 0.55;
  min-width: 0;
}

.link .leader::before {
  content: ".................................................................................................";
}

.link dd {
  grid-column: 3;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* ─── links: anchor styling ─────────────────────────────────────────────── */

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
  border-radius: 1px;
}

/* ─── footer ────────────────────────────────────────────────────────────── */

footer {
  color: var(--ink-faint);
}

footer small {
  font-size: 0.8235rem;   /* 14/17 — a single step down, no smaller */
}

/* ─── responsive: drop the leader at narrow widths, stack dt over dd ───── */

@media (max-width: 640px) {
  .links {
    gap: 1rlh;
  }
  .link {
    display: block;
  }
  .link .leader {
    display: none;
  }
  .link dt {
    color: var(--ink-soft);
  }
  .link dd {
    padding-left: 2ch;
  }
}

/* ─── print ─────────────────────────────────────────────────────────────── */

@media print {
  :root {
    --bg: white;
    --ink: black;
    --ink-soft: #333;
    --ink-faint: #888;
    --rule: #ccc;
    --link: black;
  }
  main {
    max-width: none;
    padding: 2rem;
  }
  a { text-decoration: underline; }
}

/* ─── reduced motion (no animations exist, but be explicit) ─────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

