:root {
  color-scheme: light;
  font-family: Georgia, "Times New Roman", serif;
  font-synthesis: none;
  color: #182b3a;
  background: #fdfdfb;
  --muted: #68737a;
  --rule: #d9dbd7;
  --meta: Georgia, "Times New Roman", serif;
  --card: #ffffff;
  --well: #f4f5f3;
  --accent: #003b5c;
  --accent-bright: #00547b;
  --gold-bright: #946708;
  --outline: #b4bec3;
  --radius: 12px;
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; }
html { scroll-padding-top: 32px; scrollbar-gutter: stable both-edges; }
html, body { margin: 0; min-height: 100%; }
body { -webkit-font-smoothing: antialiased; }
.page { width: min(820px, calc(100% - 64px)); margin-inline: auto; }
.home-page { --home-width: min(820px, calc(100% - 64px)); width: var(--home-width); height: 100dvh; display: flex; flex-direction: column; overflow-anchor: none; }
.home-page main { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; justify-content: safe center; }
html:has(.home-page), body:has(.home-page) { overflow: clip; }
#name:focus { outline: none; }
a { color: inherit; text-decoration-color: #182b3a50; text-decoration-thickness: 1px; text-underline-offset: 4px; transition: text-decoration-color 140ms ease; }
a:hover { text-decoration-color: currentColor; }
.bio a, .bio-reveal { color: var(--accent); text-decoration: none; }
.bio-reveal {
  color: var(--accent-bright);
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}
.bio a:is(:hover, :focus-visible),
.bio-reveal:where(:enabled):not([aria-expanded="true"]):is(:hover, :focus-visible) {
  color: #00577f;
  text-decoration: underline;
}
.bio-reveal[aria-expanded="true"] { cursor: auto; }
.bio-reveal:disabled, .bio .text-only-expansion { color: #000; opacity: 1; }
.bio .expanded-link, .home-footer .links a { color: var(--muted); }
.bio .expanded-link:is(:hover, :focus-visible),
.home-footer .links a:is(:hover, :focus-visible) { color: #495257; }
.typing-word { display: inline-block; white-space: nowrap; }
.bio-caret {
  position: relative;
  display: inline;
}
.bio-caret::after {
  position: absolute;
  bottom: -.08em;
  left: 0;
  width: 2px;
  height: 1.08em;
  background: #000;
  content: "";
  pointer-events: none;
}
.masthead { display: flex; justify-content: flex-end; padding-block: 24px; }
.masthead nav { display: flex; gap: 15px; align-items: center; font-size: 14px; color: var(--muted); }
.masthead nav a { text-decoration: none; padding-block: 8px; }
.masthead nav a:hover, .masthead nav a[aria-current="page"] { color: #182b3a; text-decoration: underline; }
.home-page.bio-expanded .masthead nav a { color: var(--gold-bright); }
.nav-divider { color: #abb2b3; font-size: 12px; }
.hero { width: 100%; padding: 48px 0 64px; }
.intro { min-width: 0; --bio-font-size: 16px; }
h1 { margin: 0 0 20px; font-size: clamp(34px, 4vw, 42px); line-height: 1.15; font-weight: 400; letter-spacing: -.04em; }
.intro h1 { margin: 0; font-size: clamp(42px, 5.3vw, 52px); line-height: 1.15; color: #003b5c; font-kerning: normal; letter-spacing: -.02em; }
.intro-subheading { color: var(--muted); font-size: 14px; margin: -2px 0 calc(var(--bio-font-size) * 1.65); padding-left: 0; text-align: left; }
p { margin: 0 0 12px; font-size: 16px; line-height: 1.65; letter-spacing: -.008em; }
.bio { max-width: 530px; }
.bio p { font-size: var(--bio-font-size); margin-bottom: 1lh; }
.bio p:last-child { margin-bottom: 0; }
.intro-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, min(35%, 250px));
  grid-template-areas: "bio portrait";
  align-items: start;
  gap: 12px clamp(24px, 5vw, 72px);
}
.intro-content .bio { grid-area: bio; }
.intro > h1, .intro-subheading, .intro-content .bio:not([aria-hidden]) {
  translate: 0 var(--text-offset, 0px);
}
.intro-content .bio:has(+ .bio-reserve) { contain: size; }
.bio-reserve { visibility: hidden; padding-bottom: 1lh; }
.portrait-column { grid-area: portrait; }
.portrait {
  position: relative;
  overflow: clip;
  width: 100%;
  min-width: 0;
  aspect-ratio: 5 / 7;
  border: 1px solid var(--outline);
}
.portrait img {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left 38%;
  filter: saturate(1.14);
}
.links { display: flex; flex-wrap: wrap; gap: 22px; font-size: .9rem; color: var(--muted); }
.access-code-input {
  width: min(176px, 100%);
  padding: 6px 8px 5px;
  border: 1px solid #003b5c55;
  border-bottom: 2px solid var(--accent);
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  font: 13px/1.4 "Cascadia Mono", Consolas, Menlo, monospace;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .04em;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.access-code-input[aria-invalid="true"] { border-color: #a3402f; animation: code-shake 320ms ease; }
@keyframes code-shake { 25% { translate: -4px 0; } 50% { translate: 4px 0; } 75% { translate: -2px 0; } }
.access-code-input::placeholder { color: var(--muted); font-size: 12px; opacity: .85; }
.access-code-input:hover { border-color: #003b5c; }
.access-code-input:focus-visible { border-color: #003b5c; background: #003b5c04; outline: none; }
.chapter { border-top: 1px solid var(--rule); display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 30px; padding: 20px 0 24px; }
h2 { font-size: 20px; font-weight: 400; letter-spacing: -.025em; margin: 0 0 10px; line-height: 1.3; }
.entries { min-width: 0; }
.entry-title, .school-title { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 5px 16px; margin-bottom: 8px; }
h3 { font-size: 19px; font-weight: 400; letter-spacing: -.025em; line-height: 1.3; margin: 0; }
.date { color: var(--muted); font: 11px/1.6 var(--meta); white-space: nowrap; margin: 0; }
.degree { font-size: 14px; margin: 0; }
.experience + .experience { margin-top: 24px; }
.school-title { margin-bottom: 6px; }
footer { padding: 20px 0 28px; color: var(--muted); }
footer p { margin: 0; font-size: 12px; }
.home-footer {
  position: relative;
  flex: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--rule);
}
.home-footer .access-code-input {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(28%, 176px);
}
.home-footer p { flex: none; text-align: right; }
.subpage { padding: 28px 0 40px; }
.coming-soon-page {
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.project-placeholders > li, .entry-placeholder {
  background: #f1f2f1;
  border-radius: var(--radius);
}
.project-placeholders > li { height: 280px; }
.entry-placeholder { height: 100px; }
.page-heading { margin-bottom: 30px; }
.home-link { display: inline-block; color: var(--muted); font-size: 13px; text-decoration: none; margin-bottom: 24px; }
.home-link:hover { text-decoration: underline; }
.page-heading h1 { margin-bottom: 10px; }
.page-description { color: var(--muted); }
.projects-section { border-top: 1px solid var(--rule); padding-top: 24px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; list-style: none; padding: 0; margin: 0; }
@media (max-width: 599px) { .tiles { grid-template-columns: 1fr; gap: 12px; } }
.tile { position: relative; display: flex; flex-direction: column; overflow: hidden; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); transition: border-color 160ms ease, transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .tile:hover { border-color: var(--outline); transform: translateY(-2px); }
  .tile:hover .tile-name, .tile:hover .tile-cue, .tile:focus-within .tile-cue { color: var(--accent); }
  .tile:hover .tile-cue, .tile:focus-within .tile-cue { opacity: 1; transform: translateX(2px); }
}
.tile:has(.tile-name button:active) { transform: translateY(0) scale(.992); }
.thumb { display: flex; align-items: center; justify-content: center; min-height: 184px; padding: 24px; background: var(--well); font-family: var(--mono); user-select: none; }
.thumb .hl { color: var(--accent); font-weight: 500; }
.thumb .ink { color: #182b3a; }
.thumb-art { margin: 0; font: inherit; color: var(--muted); line-height: 1.35; white-space: pre; }
.thumb-fiada { --cols: 25; --max: 14px; }
.thumb-papr { --cols: 27; --max: 12.5px; }
.thumb-baskr { --cols: 25; --max: 12.5px; }
.tile-well { height: 156px; min-height: 0; padding: 12px 14px; border-bottom: 1px solid var(--rule); container-type: inline-size; }
.tile-well .thumb-art { font-size: min(var(--max, 13px), calc((100cqi / var(--cols) - 1px) / .6)); line-height: 1.25; }
.tile-body { display: flex; flex-direction: column; flex: 1 1 0%; gap: 4px; padding: 14px 18px 16px; }
.tile-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.tile-name { margin: 0; color: #182b3a; font-size: 18px; font-weight: 400; letter-spacing: -.015em; line-height: 1.35; transition: color 140ms ease; }
.tile-name button { all: unset; cursor: pointer; }
.tile-name button::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.tile-name button:focus-visible { outline: none; }
.tile-name button:focus-visible::after { outline: 2px solid var(--accent); outline-offset: -2px; }
.tile-cue { flex-shrink: 0; color: var(--muted); opacity: .7; font-size: 13px; transition: color 140ms ease, opacity 160ms ease, transform 180ms var(--ease-out); }
.tile-kind { margin: 0; color: #4c5d68; font-size: 14px; line-height: 1.45; }
.tile-award { margin: 2px 0 0; color: #B08018; font-size: 12.5px; line-height: 1.45; }
.tile-links { display: flex; flex-wrap: wrap; gap: 0 14px; width: fit-content; margin: auto 0 0; padding-top: 12px; font-size: 13px; line-height: 1.4; }
.tile-links a, .tile-links span { padding: 4px 0; }
.tile-links a { position: relative; z-index: 1; color: #182b3a; }
.tile-links a:hover { color: var(--accent); }
.tile-links span { color: var(--muted); }
.sheet { width: min(620px, calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow-y: auto; overscroll-behavior: contain; color: #182b3a; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); opacity: 0; transform: translateY(6px) scale(.97); transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), overlay 200ms var(--ease-out) allow-discrete, display 200ms var(--ease-out) allow-discrete; }
.sheet[open] { opacity: 1; transform: translateY(0) scale(1); }
@starting-style { .sheet[open] { opacity: 0; transform: translateY(8px) scale(.965); } }
.sheet::backdrop { background: color-mix(in srgb, #fdfdfb 85%, transparent); opacity: 0; transition: opacity 200ms var(--ease-out), overlay 200ms var(--ease-out) allow-discrete, display 200ms var(--ease-out) allow-discrete; }
.sheet[open]::backdrop { opacity: 1; }
@starting-style { .sheet[open]::backdrop { opacity: 0; } }
:root:has(.sheet[open]) { overflow: hidden; }
.sheet-inner { position: relative; }
.sheet-close { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border: 0; border-radius: 999px; background: transparent; color: #182b3a; font: 22px/1 Georgia, "Times New Roman", serif; cursor: pointer; transition: color 140ms ease, transform 160ms var(--ease-out); }
.sheet-close:hover { color: var(--accent); }
.sheet-close:active { transform: scale(.94); }
.sheet-close:focus-visible { outline-offset: -4px; }
.sheet-body { display: flex; flex-direction: column; gap: 8px; padding: 20px 24px 24px; }
.sheet-kicker { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.sheet-title { margin: 2px 0 0; color: #182b3a; font-size: 24px; font-weight: 400; letter-spacing: -.025em; line-height: 1.25; }
.sheet-deck { margin: 2px 0 0; color: #182b3a; font-style: italic; font-size: 16px; line-height: 1.5; }
.sheet-summary { margin: 6px 0 0; color: #4c5d68; font-size: 15px; line-height: 1.65; max-width: 62ch; }
.sheet-award { margin: 6px 0 0; color: #B08018; font-size: 12.5px; line-height: 1.5; }
.sheet-chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 10px 0 0; }
.chip { padding: 3px 9px; border: 1px solid var(--rule); border-radius: 999px; background: var(--well); color: #182b3a; font: 11px/1.4 var(--mono); }
.sheet-links { margin-top: 8px; padding-top: 6px; }
.sheet-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 13px; }
.sheet-nav-btn { display: inline-flex; align-items: center; gap: 6px; margin: -4px -8px; padding: 8px 12px; border: 0; border-radius: 8px; background: transparent; color: #182b3a; font: inherit; cursor: pointer; transition: color 140ms ease, background-color 140ms ease, transform 160ms var(--ease-out); }
.sheet-nav-btn:hover { color: var(--accent); background: var(--well); }
.sheet-nav-btn:active { transform: scale(.97); }
.sheet-count { color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 639px) {
  .tile-well { height: 140px; padding: 10px 8px; }
  .tile-body { padding: 12px 14px 14px; }
  .tile-name { font-size: 17px; }
  .tile-kind { font-size: 13px; }
  .sheet .thumb { min-height: 0; padding: 20px 12px; }
  .sheet-body { padding: 18px 20px 20px; }
}
.writing-page { min-height: 400px; }
.writing-list { border-top: 1px solid var(--rule); }
.writing-entry { padding: 24px 0; }
.writing-entry + .writing-entry { border-top: 1px solid var(--rule); }
.writing-entry h2 { font-size: 24px; margin-bottom: 7px; }
.writing-entry h2 a { text-decoration: none; }
.writing-entry h2 a:hover { text-decoration: underline; }
.writing-summary { color: var(--muted); margin: 12px 0 0; max-width: 65ch; }
.essay-page { max-width: 680px; margin-inline: auto; }
.essay-heading h1 { font-size: clamp(30px, 5vw, 42px); line-height: 1.15; overflow-wrap: break-word; }
.essay-heading .date { margin-top: 18px; }
.essay-body { border-top: 1px solid var(--rule); padding-top: 28px; line-height: 1.8; }
.essay-body p { margin: 0 0 1.4em; }
.essay-return { border-top: 1px solid var(--rule); padding-top: 20px; margin-top: 32px; font-size: 14px; }
.cat-body { height: 100dvh; min-height: 0; }
.cat-page { display: flex; flex-direction: column; min-height: 0; padding-bottom: 24px; }
.cat-page .page-heading { margin-bottom: 20px; }
.cat-gallery { flex: 1 1 auto; min-height: 0; margin: 0; padding-top: 20px; border-top: 1px solid var(--rule); container-type: size; display: flex; justify-content: center; align-items: flex-start; gap: 12px; }
/* Equal heights: one row sized to fit both the row width and the remaining viewport height. */
.cat-gallery { flex-wrap: wrap; align-content: flex-start; }
.cat-gallery img { display: block; height: min(100cqh, (100cqw - 26px) / 2.0622); width: auto; aspect-ratio: var(--ar); object-fit: cover; border: 1px solid var(--outline); background: var(--well); }
/* In a tall, narrow space, two rows (two photos, then one) show the photos larger. */
@container (aspect-ratio < 3 / 4) {
  .cat-gallery img { height: min((100cqw - 14px) / 1.5, (100cqh - 12px) / 2); }
}
.empty-state { color: var(--muted); border-top: 1px solid var(--rule); padding-top: 25px; }
:focus-visible { outline: 1px solid var(--muted); outline-offset: 5px; }
.skip-link { position: absolute; top: 12px; left: 20px; padding: 8px; background: #fdfdfb; transform: translateY(-180%); z-index: 3; }
.skip-link:focus { transform: translateY(0); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (max-width: 800px) {
  .page { width: calc(100% - 48px); }
  .chapter { grid-template-columns: 120px minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 800px) {
  .page { width: calc(100% - 40px); }
  .home-page { --home-width: min(560px, calc(100% - 48px)); }
  .intro-content {
    column-gap: 24px;
  }
  .home-page main { justify-content: flex-start; }
  .masthead { padding-block: 20px; }
  .masthead nav { font-size: 13px; }
  .hero { padding: 36px 0 24px; }
  h1 { font-size: 36px; }
  .chapter { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 20px 0 24px; }
  .chapter h2 { margin: 0; }
  .school-title { gap: 4px 10px; }
  .school-title h3 { font-size: 17px; }
  .school-title .date { font-size: 10px; }
  .entry-title { gap: 5px 12px; }
  .context { font-size: 10px; }
  footer p { font-size: 11px; }
  .subpage { padding-top: 20px; }
  .writing-page { min-height: 350px; }
}
@media (max-width: 480px) {
  .intro-content {
    column-gap: 12px;
  }
  .home-page { --home-width: calc(100% - 36px); }
  .hero { padding-top: 24px; }
  .intro { --bio-font-size: .97rem; }
}
@media (max-height: 740px) {
  .home-page .masthead { padding-block: 8px; }
  .home-page .hero { padding-block: 12px; }
  .home-footer { padding-block: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .sheet { transform: none; }
}
@media print {
  .home-page { min-height: 0; }
  .page { width: 100%; }
  .hero { padding: 15px 0 30px; }
  .skip-link, .masthead, .home-link { display: none; }
  .chapter { grid-template-columns: 120px 1fr; gap: 25px; padding-block: 24px; }
  .tile, .experience { break-inside: avoid; }
  body { background: white; }
}

/* Visually hidden labels remain available to assistive technology. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
