/* Layout: portrait and name share a row at desk width, stack on phones. One family, Fraunces,
   worked hard across its optical-size and wonk axes: huge and quirky for the name, quiet for text. */
:root {
  --paper: #fcfbf8;
  --ink: #1c1d1f;
  --ink-soft: #8b8c90;
  --rule: #e2e0d8;
  --accent: #3d5a68;
  --font: "Fraunces", Georgia, "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111214;
    --ink: #ebebe8;
    --ink-soft: #7f8186;
    --rule: #272a2e;
    --accent: #a2c4d6;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #111214;
  --ink: #ebebe8;
  --ink-soft: #7f8186;
  --rule: #272a2e;
  --accent: #a2c4d6;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-variation-settings: "opsz" 14, "SOFT" 0, "WONK" 0;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 38rem;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 12vh 10vh;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* --- plate: the note sits left of the picture, its title beneath, like a catalogue entry --- */

.plate {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "note image"
    "cap  cap";
  align-items: end;
  column-gap: 1.75rem;
  row-gap: 0.75rem;
}

.plate-note { grid-area: note; }

.plate-note p {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.55;
  max-width: 22rem;
}

.portrait {
  grid-area: image;
  width: 240px;
  aspect-ratio: 4 / 5;
  max-width: 100%;
  object-fit: cover;
  display: block;
  border-radius: 10px;
}

.plate figcaption {
  grid-area: cap;
  font-size: 0.9rem;
  font-weight: 600;
  font-variation-settings: "opsz" 14, "SOFT" 0, "WONK" 0;
  letter-spacing: 0.005em;
}

h1 {
  font-size: clamp(2.25rem, 9vw, 3.25rem);
  font-variation-settings: "opsz" 144, "SOFT" 20, "WONK" 1;
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

h2 {
  font-size: 1.0625rem;
  font-variation-settings: "opsz" 14, "SOFT" 0, "WONK" 0;
  font-weight: 600;
  margin: 1.5rem 0 0;
  text-wrap: balance;
}

p { margin: 0; max-width: 34rem; }

.soft { color: var(--ink-soft); }

a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: border-color 150ms ease, color 150ms ease;
}
a:hover { border-bottom-color: var(--ink); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* --- the one ornament: a stitch line, borrowed from a garment seam --- */

.seam {
  border: 0;
  border-top: 1px dashed var(--rule);
  margin: 0.75rem 0 0;
}

/* --- navigation --- */

nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
}

nav a { border-bottom-color: transparent; color: var(--ink-soft); }
nav a:hover { border-bottom-color: var(--rule); color: var(--ink); }
nav a[aria-current="page"] { color: var(--ink); }

.back { color: var(--ink-soft); border-bottom-color: transparent; font-size: 0.95rem; }
.back:hover { color: var(--ink); border-bottom-color: var(--rule); }

/* --- entries and empty states --- */

.entries {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.entries li { min-width: 0; }

.empty { color: var(--ink-soft); font-style: italic; }

/* --- social links --- */

.social {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.social a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-bottom-color: transparent;
  font-size: 0.95rem;
}
.social a:hover { border-bottom-color: var(--rule); }
.social a:hover .mark { border-color: var(--ink); }

.social .mark {
  width: 1.45rem;
  height: 1.45rem;
  flex: 0 0 auto;
  border: 1px solid var(--rule);
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 600;
  font-variation-settings: "opsz" 14, "SOFT" 0, "WONK" 0;
  line-height: 1;
  transition: border-color 150ms ease;
}

.social .pending { color: var(--ink-soft); }
.social .pending .mark { border-style: dashed; }

/* --- photo grid --- */

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.grid .cell {
  aspect-ratio: 4 / 5;
  max-width: 100%;
  background: var(--rule);
  opacity: 0.45;
  border-radius: 10px;
}

@media (prefers-reduced-motion: reduce) {
  a, .social .mark { transition: none; }
}

/* --- professional life: dated entries --- */

.roles {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.roles li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.roles .role {
  font-weight: 600;
  font-variation-settings: "opsz" 14, "SOFT" 0, "WONK" 0;
}

.roles .when {
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 560px) {
  .plate {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "image"
      "cap"
      "note";
    align-items: start;
    row-gap: 0.6rem;
  }
  .plate-note { margin-top: 0.5rem; }
  .plate-note p { max-width: none; }
  .portrait { width: 100%; max-width: 280px; }
}

@media (max-width: 440px) {
  .page { padding-block: 8vh 8vh; }
}
