:root {
  --paper: #fbfaf6;
  --card:  #ffffff;
  --ink:   #161616;
  --body:  #3a3a38;
  --gray:  #85827b;
  --faint: #d9d6ce;
  --rule:  #e0ddd5;
  --hint:  #7a2a22;
  --serif: "EB Garamond", Garamond, "Times New Roman", serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 41rem;
  margin: 0 auto;
  padding: clamp(3.5rem, 11vh, 5.5rem) 1rem 3rem;
}

@media (min-width: 30rem) {
  main { padding-left: 1.75rem; padding-right: 1.75rem; }
}


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

.name {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--ink);
}

.name a { color: inherit; text-decoration: none; }

nav {
  display: flex;
  gap: 1.6rem;
  margin: 0.55rem 0 3rem;
  font-variant: small-caps;
  letter-spacing: 0.06em;
  font-size: 1.05rem;
}

nav a { color: var(--gray); text-decoration: none; }
nav a:hover, nav a[aria-current] { color: var(--ink); }

/* ---------- text ---------- */

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--faint);
  text-underline-offset: 3px;
}

a:hover { text-decoration-color: var(--hint); }

p { margin: 0 0 1rem; }
.lead { color: var(--ink); }
.quiet { color: var(--gray); }

.about p { margin: 0; }
.about p + p { margin-top: 0.55rem; }
.about .now { margin-top: 1.4rem; }
.about .quiet { margin-top: 1.4rem; font-style: italic; }
.about b { font-weight: 500; color: var(--ink); }

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

/* ---------- writing ---------- */

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

.posts li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.posts li + li { margin-top: 0.9rem; }
.posts a { text-decoration: none; font-size: 1.15rem; }
.posts a:hover { color: var(--hint); }

time {
  color: var(--gray);
  font-style: italic;
  font-variant-numeric: oldstyle-nums;
  white-space: nowrap;
}

.article h2 {
  margin: 0;
  font-size: 2.1rem;
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
}

.article time { display: block; margin: 0.35rem 0 2rem; }

/* ---------- work cards ---------- */

.group + .group { margin-top: 3.25rem; }

.group h2 {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 400;
  font-variant: small-caps;
  letter-spacing: 0.08em;
  color: var(--gray);
}

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

.card {
  display: flex;
  flex-direction: column;
  min-height: 18.5rem; /* matches column width, so cards read as squares */
  padding: 1.25rem 1.25rem 1.1rem;
  background: var(--card);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(22, 22, 22, 0.035), 0 6px 18px rgba(22, 22, 22, 0.05);
}

@media (max-width: 34rem) {
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 0; }
}

.card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
}

.card p { margin: 0; font-size: 0.95rem; line-height: 1.45; }

/* evidence: a real snapshot pinned to the bottom of the card */

.ev {
  display: block;
  margin-top: auto;
  padding-top: 0.75rem;
  text-decoration: none;
  color: var(--gray);
}

.ev .shot {
  display: block;
  height: 6.25rem;
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 0 0 1px #ebe8e1;
}

.ev img { display: block; width: 100%; height: auto; }

.ev .cap {
  display: flex;
  justify-content: space-between;
  margin-top: 0.45rem;
  font-size: 0.88rem;
  font-style: italic;
}

.ev:hover .cap { color: var(--ink); }
.ev:hover .shot { box-shadow: 0 0 0 1px #d9d5cc; }

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

footer {
  margin-top: 4.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.95rem;
}

footer a { color: var(--gray); text-decoration: none; }
footer a:hover { color: var(--ink); }
footer span { display: flex; gap: 1.25rem; }
