:root {
  color-scheme: light;
  --bg: #e6eefa;
  --ink: #0b2545;
  --sub: #4a6283;
  --line: #c9d8ee;
  --accent: #0e6e7e;
  --accent-ink: #0b5a67;
  --card: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans", -apple-system, sans-serif;
  line-height: 1.6;
}

a { color: var(--accent-ink); }
a:visited { color: var(--accent-ink); }
a:hover { color: var(--accent); }

header.top {
  padding: 2.75rem 1.5rem 1.25rem;
  text-align: center;
}

header.top h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.1rem, 6vw, 3.1rem);
  margin: 0 0 0.3rem;
}

header.top h1 em {
  color: var(--accent);
  font-style: normal;
}

header.top p.tag {
  color: var(--sub);
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

nav {
  padding: 0.6rem 0 1.4rem;
  text-align: center;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 0.5rem;
  margin: 0;
  padding: 0 1rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

nav a {
  color: var(--sub);
  text-decoration: none;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  display: inline-block;
  transition: background 0.15s ease, color 0.15s ease;
}

nav a:hover {
  background: var(--line);
  color: var(--ink);
}

nav a[aria-current="page"] {
  background: var(--accent);
  color: #ffffff;
  font-weight: 500;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
}

/* Images dropped into page content are full-size files; keep them inside
   the column instead of overflowing it. */
main img { max-width: 100%; height: auto; }

/* Resume employers: a rule and some air between each one. */
.org {
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
}
.org h3 { margin: 0 0 0.75rem; }

/* Transcript tables. Titles wrap on narrow screens; the short code, credit
   and grade columns stay on one line so nothing scrolls sideways. */
main table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 1rem;
  background: var(--card);
  font-size: 0.95rem;
}
main th, main td {
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
main th {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--sub);
  text-align: left;
}
main td:first-child, main td:nth-child(n+3) { white-space: nowrap; }
@media (max-width: 480px) {
  main th, main td { padding: 0.35rem 0.3rem; }
  main table { font-size: 0.85rem; }
}

.notice {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  padding: 1rem 1.25rem;
  border-radius: 10px;
  color: var(--sub);
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 1px 2px rgba(27, 36, 54, 0.04);
}

.notice a { color: var(--accent-ink); }

section.gallery-group {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

section.gallery-group:last-child {
  border-bottom: none;
}

.gallery-group h2 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: 1.5rem;
  margin: 0 0 0.75rem;
}

.gallery-group .thumb-row {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}

.gallery-group .thumb-row img {
  width: 130px;
  height: 130px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

/* Year subheads inside a gallery group, e.g. Travel. */
.gallery-group .group-year {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--sub);
  margin: 0.9rem 0 0.35rem;
}

.sub-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  font-size: 0.95rem;
}

.sub-items li { color: var(--sub); }

.sub-items li.live a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
}

h2 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
}

/* Browser defaults shrink h5 below body text, which inverts the hierarchy
   on long write-ups like the propeller stand. h3 stays at the default
   1.17em, which the resume and transcripts already rely on. */
h4 { font-size: 1.05rem; }
h5 { font-size: 1rem; }

.wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.wall a { display: block; }

.wall img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  transition: transform 0.15s ease;
}

.wall a:hover img {
  transform: scale(1.02);
}

.back {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--sub);
}

.hero {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(27, 36, 54, 0.05);
}

.hero img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}

/* The portrait's backdrop is near-white, same as the card, so a hairline in
   the palette's rule color keeps its edge visible. */
.hero img.portrait { border: 1px solid var(--line); }

.hero .bio { flex: 1; min-width: 260px; }

.social-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0;
  margin: 1rem 0 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
}

.social-links a {
  text-decoration: none;
  color: var(--ink);
  background: var(--line);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  display: inline-block;
}

.social-links a:hover {
  background: var(--accent);
  color: #ffffff;
}

.gone-notice {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--sub);
  padding: 1rem 1.25rem;
  border-radius: 10px;
  color: var(--sub);
  margin-bottom: 1.5rem;
}

footer {
  text-align: center;
  padding: 2rem 1rem 3rem;
  color: var(--sub);
  font-size: 0.85rem;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.resume-entry {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.resume-entry:last-child {
  border-bottom: none;
}

.resume-entry h3 {
  font-size: 1.1rem;
  margin: 0 0 0.35rem;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
}

.resume-entry p {
  margin: 0;
  color: var(--ink);
}

.phototile {
  display: block;
  color: var(--ink);
  text-decoration: none;
}

.phototile .thumb-row img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.15s ease;
}

.phototile:hover .thumb-row img {
  transform: scale(1.02);
}

.phototile p {
  margin: 0.5rem 0 0;
  font-weight: 600;
}

div.phototile p { color: var(--sub); font-weight: 400; }
