@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400&family=Inter+Tight:wght@500;600&display=swap');

:root {
  --bg: #fcfbf9;
  --ink: #1c1b19;
  --muted: #6f6b64;
  --rule: #e8e5df;
  --accent: #1f4fd8;
  --accent-hover: #123bb0;
  --measure: 40rem;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Inter Tight', 'Helvetica Neue', Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161512;
    --ink: #eae6dc;
    --muted: #a39e93;
    --rule: #2b2924;
    --accent: #7ea0ff;
    --accent-hover: #a9c0ff;
  }
}

* { box-sizing: border-box; }

html { font-size: 17px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 3.5rem 1.25rem 5rem;
}

@media (min-width: 640px) {
  main { padding: 5rem 1.5rem 6rem; }
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s;
}
a:hover, a:focus { color: var(--accent-hover); border-bottom-color: currentColor; }

h1, h2, h3 {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0;
}

h1 { font-size: 2rem; letter-spacing: -0.02em; }
h2 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
h2::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  background: var(--accent);
  border-radius: 1px;
  flex: none;
}
h3 { font-size: 1.05rem; font-weight: 600; }

p { margin: 0 0 1.1rem; }

section { margin-top: 3.5rem; }

/* Header */
.intro {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (min-width: 560px) {
  .intro { grid-template-columns: 128px 1fr; gap: 2rem; }
}
.intro img, .intro .photo-placeholder {
  width: 128px;
  height: 128px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}
.photo-placeholder { background: var(--rule); }
.intro h1 { margin-bottom: 0.9rem; }
.intro h1::after {
  content: "";
  display: block;
  width: 2.25rem;
  height: 3px;
  background: var(--accent);
  margin-top: 0.7rem;
  border-radius: 2px;
}
.intro p:last-child { margin-bottom: 0; }

nav.sections {
  font-family: var(--sans);
  font-size: 0.9rem;
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
}
nav.sections a { color: var(--muted); }
nav.sections a:hover { color: var(--accent-hover); }

/* Lists of work */
.items { list-style: none; margin: 0; padding: 0; }
.items li { padding: 1.1rem 0; border-top: 1px solid var(--rule); }
.items li:last-child { border-bottom: 1px solid var(--rule); }
.items h3 { margin-bottom: 0.25rem; }
.items h3 a { color: var(--ink); border-bottom: 1px solid transparent; }
.items h3 a:hover { color: var(--accent-hover); border-bottom-color: currentColor; }
.items .meta {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.items p { margin: 0; }

/* About */
.about p:last-child { margin-bottom: 0; }

/* Footer / links */
footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

/* Essay pages */
article header { margin-bottom: 2rem; }
article header .back {
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--muted);
  display: inline-block;
  margin-bottom: 2rem;
}
article h1 { font-size: 2rem; margin-bottom: 0.6rem; }
article h1::after {
  content: "";
  display: block;
  width: 2.25rem;
  height: 3px;
  background: var(--accent);
  margin-top: 0.8rem;
  border-radius: 2px;
}
article .meta { font-family: var(--sans); font-size: 0.85rem; color: var(--muted); }
article p { font-size: 1.06rem; }
