/* ==========================================================================
   alexdrost.com — shared stylesheet
   Design direction: warm editorial. Deliberately distinct from drost.us
   (near-black directory) and alex.drost.us (compact card). This is the
   narrative property, so it reads like paper, not like a dashboard.
   ========================================================================== */

/* Self-hosted so the site has no third-party font dependency. Fraunces is
   SIL OFL 1.1 — see assets/fonts/Fraunces-LICENSE.txt. 18 KB per weight. */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/fraunces-400.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/fraunces-600.woff2") format("woff2");
}

:root {
  /* The canonical portfolio headshot. One crop, one file, one address —
     every other property's schema `image` points at this same URL.
     Path is deliberately at the site root: https://alexdrost.com/alex-drost.jpg */
  --portrait: url("/alex-drost.jpg");

  --paper:      #fbf8f3;
  --paper-sunk: #f3ede2;
  --ink:        #17161a;
  --ink-soft:   #4b4750;
  --ink-faint:  #7c7681;
  --rule:       #e2d9c9;
  --accent:     #a03e24;
  --accent-dk:  #7d2f1b;

  --measure: 34rem;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --display: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- layout ------------------------------------------------------ */

.wrap {
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.wrap--wide { max-width: 58rem; }

main { display: block; }

section { padding-block: clamp(2.25rem, 5.5vw, 3.5rem); }

section + section { border-top: 1px solid var(--rule); }

.prose { max-width: var(--measure); }

/* ---------- type -------------------------------------------------------- */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  font-variation-settings: "SOFT" 0, "WONK" 0;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 6.5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.6vw, 2rem); }
h3 { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.005em; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

.lede {
  font-family: var(--display);
  font-size: clamp(1.375rem, 3.4vw, 1.875rem);
  line-height: 1.32;
  font-weight: 400;
  letter-spacing: -0.012em;
  color: var(--ink);
  max-width: 28ch;
  text-wrap: balance;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1.5rem;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: color-mix(in srgb, var(--accent) 38%, transparent);
  transition: color 120ms ease, text-decoration-color 120ms ease;
}
a:hover { color: var(--accent-dk); text-decoration-color: currentColor; }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- header / nav ------------------------------------------------ */

.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-block: 1.15rem;
}

.wordmark {
  font-family: var(--display);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark:hover { color: var(--accent); }

.nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }

.nav a {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  text-decoration: none;
}
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

/* ---------- hero -------------------------------------------------------- */

.hero { padding-block: clamp(2.75rem, 7vw, 5rem) clamp(2.5rem, 6vw, 4rem); }

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.75rem, 5vw, 3rem);
  align-items: center;
}

@media (min-width: 46rem) {
  .hero__grid { grid-template-columns: minmax(0, 1fr) 13rem; }
  .hero--about .hero__grid { grid-template-columns: minmax(0, 1fr) 16rem; }
}

.hero h1 { margin-bottom: 0.35em; }

/* ---------- portrait ---------------------------------------------------- */

.portrait {
  width: 100%;
  max-width: 13rem;
  aspect-ratio: 1 / 1;
  border-radius: 3px;
  background-color: var(--paper-sunk);
  background-image: var(--portrait);
  background-size: cover;
  background-position: center 18%;
  border: 1px solid var(--rule);
  box-shadow: 0 1px 0 rgba(23, 22, 26, 0.04),
              0 12px 30px -18px rgba(23, 22, 26, 0.45);
}

.hero--about .portrait { max-width: 16rem; }

/* ---------- three-up ---------------------------------------------------- */

.trio {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.25rem);
  grid-template-columns: 1fr;
}
@media (min-width: 44rem) {
  .trio { grid-template-columns: repeat(3, 1fr); }
}

.trio h3 { margin-bottom: 0.5rem; }
.trio p { font-size: 1rem; color: var(--ink-soft); }

/* ---------- credentials ------------------------------------------------- */

.creds { list-style: none; margin: 0; padding: 0; max-width: var(--measure); }

.creds li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  gap: 0.15rem;
}
.creds li:first-child { border-top: 1px solid var(--rule); }

.creds b { font-weight: 600; }
.creds span { color: var(--ink-soft); font-size: 0.9375rem; }

/* ---------- bookshelf --------------------------------------------------- */

.books { list-style: none; margin: 0; padding: 0; }

.books li {
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--rule);
  max-width: 40rem;
}
.books li:first-child { border-top: 1px solid var(--rule); }

.book__title {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.15rem;
  line-height: 1.28;
}
.book__meta {
  font-size: 0.875rem;
  color: var(--ink-faint);
  margin: 0 0 0.5rem;
}
.book__why { margin: 0; color: var(--ink-soft); }

/* ---------- callout / link-out ------------------------------------------ */

.callout {
  background: var(--paper-sunk);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: clamp(1.25rem, 3.5vw, 1.75rem);
  max-width: 40rem;
}
.callout p { margin: 0; }

/* ---------- link lists -------------------------------------------------- */

.links { list-style: none; margin: 0; padding: 0; max-width: 40rem; }

.links li {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  gap: 0.75rem 1.25rem;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
}
.links li:first-child { border-top: 1px solid var(--rule); }

.links a { font-weight: 500; text-decoration: none; }
.links a:hover { text-decoration: underline; }
.links span { color: var(--ink-faint); font-size: 0.9375rem; }

/* ---------- form -------------------------------------------------------- */

.form { max-width: 32rem; display: grid; gap: 1.1rem; }

.field { display: grid; gap: 0.4rem; }

.field label {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.field input,
.field textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0.7rem 0.8rem;
  width: 100%;
}
.field textarea { min-height: 9rem; resize: vertical; }

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.btn {
  justify-self: start;
  font: inherit;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 3px;
  padding: 0.7rem 1.5rem;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.btn:hover { background: var(--accent-dk); border-color: var(--accent-dk); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* honeypot */
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

/* ---------- footer ------------------------------------------------------ */

.foot {
  border-top: 1px solid var(--rule);
  padding-block: 2.25rem 3rem;
  font-size: 0.9375rem;
  color: var(--ink-faint);
}

.foot__inner {
  display: flex;
  gap: 1rem 1.75rem;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
}

.foot nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.foot a { color: var(--ink-soft); text-decoration: none; }
.foot a:hover { color: var(--accent); text-decoration: underline; }

/* ---------- utilities --------------------------------------------------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  z-index: 10;
  text-decoration: none;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

.stack > * + * { margin-top: 1.75rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
