/* HD website — the whole design, one file. No framework, no JavaScript, no external requests.
   Type: EB Garamond, the books' typeface, self-hosted WOFF2 subsets (tools/make-assets.sh) with
   Latin Extended-A for Turkish. Colour: paper, ink, one muted grey, one accent. Dark mode follows
   the reader's system setting. */

@font-face {
  font-family: "EB Garamond";
  src: url("/assets/fonts/ebgaramond-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "EB Garamond";
  src: url("/assets/fonts/ebgaramond-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #fbfaf7;
  --ink: #1e1b17;
  --muted: #6c655b;
  --accent: #8c2a21;
  --measure: 34rem;
  --gutter: 1.25rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161412;
    --ink: #e8e3d9;
    --muted: #a19a8e;
    --accent: #d98a7a;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: "EB Garamond", Garamond, Georgia, serif;
  font-size: clamp(1.1875rem, 1.1rem + 0.4vw, 1.3125rem);
  line-height: 1.6;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  font-variant-numeric: oldstyle-nums proportional-nums;
}

main {
  flex: 1;
  padding: clamp(3rem, 12vh, 7rem) var(--gutter) 4rem;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ── the author page ─────────────────────────────────────────────────────────────────────── */

.author {
  max-width: var(--measure);
  margin: 0 auto;
}

.author__photo {
  display: block;
  width: 10rem;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  margin: 0 auto 2.25rem;
  border-radius: 50%;
}

.author__name {
  margin: 0;
  text-align: center;
  font-weight: 500;
  font-size: clamp(2.4rem, 1.9rem + 2.4vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: 0.005em;
  text-wrap: balance;
}

.author__role {
  margin: 0.6rem 0 0;
  text-align: center;
  color: var(--muted);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.14em;
}

/* a short hairline between the name and the text */
.author__role::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 1px;
  margin: 2rem auto 2.25rem;
  background: var(--accent);
}

.author__bio p {
  margin: 0;
  text-wrap: pretty;
}

.author__bio p + p {
  text-indent: 1.5em;
}

/* ── page not found ──────────────────────────────────────────────────────────────────────── */

.notfound {
  max-width: var(--measure);
  margin: 0 auto;
  text-align: center;
}

.notfound__code {
  margin: 0;
  color: var(--muted);
  font-variant-numeric: lining-nums;
  letter-spacing: 0.14em;
}

.notfound h1 {
  margin: 0.25rem 0 1rem;
  font-weight: 500;
  font-size: clamp(2rem, 1.6rem + 2vw, 2.75rem);
  line-height: 1.15;
}

.notfound p {
  margin: 0 0 1rem;
}

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

.colophon {
  padding: 2rem var(--gutter) 2.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.875em;
  font-variant-numeric: lining-nums;
}
