:root {
  --navy: #102942;
  --ink: #102a45;
  --blue: #24577f;
  --ice: #b8d7ed;
  --paper: #fbfcfd;
  --muted: #526679;
  --rule: #cedbe5;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 20px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--sans); }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, .item-role { font-family: var(--serif); font-weight: 400; }
ul { list-style: none; padding: 0; margin: 0; }
a { color: var(--blue); text-underline-offset: .25em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #518cc0; outline-offset: 4px; }
.wrap { width: min(1110px, calc(100% - 104px)); margin-inline: auto; }
.skip { position: absolute; top: -5rem; left: 1rem; z-index: 5; background: white; padding: .5rem 1rem; }
.skip:focus { top: 1rem; }

.header, .footer { color: white; background: var(--navy); }
.profile-spread {
  color: white;
  background: linear-gradient(168deg, var(--navy) 30%, #163851 64%, #235976 100%);
}
.header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 20px; border-bottom: 1px solid #456079; }
.brand { color: white; font: 21px/1.2 var(--serif); text-decoration: none; }
nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 38px); }
nav a { color: #e3edf4; padding-block: 10px; font-size: 14px; text-decoration: none; }
nav a:hover, .footer a:hover { color: white; text-decoration: underline; }
.hero { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(205px, .8fr); align-items: center; gap: clamp(32px, 7vw, 106px); padding-block: clamp(42px, 5vw, 72px); }
.eyebrow { color: var(--ice); font-size: 13px; letter-spacing: .045em; margin-bottom: 17px; }
h1 { font-size: clamp(3.4rem, 6.1vw, 5.7rem); letter-spacing: -.055em; line-height: .99; }
h1 em { display: block; color: #c5dfef; font-weight: 400; }
.intro { max-width: 540px; margin-top: 21px; color: #e0eaf1; font-size: clamp(16px, 1.4vw, 18px); line-height: 1.62; }
.actions { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.hero .actions { margin-top: 26px; }
.hero .actions a { font-size: 14px; font-weight: 550; text-decoration: none; }
.resume-link { display: inline-flex; align-items: center; gap: 14px; padding: 11px 18px; border: 1px solid #d8ebf7; border-radius: 3px; background: #d5eaf8; color: var(--navy); }
.resume-link:hover { background: white; }
.projects-link { color: #e2eff8; padding-block: 6px; border-bottom: 1px solid #7898b2; }
.projects-link:hover { border-color: white; }
.portrait { width: min(100%, 282px); justify-self: center; }
.portrait-frame { padding: 8px; border: 1px solid #91aec4; background: #1c3852; box-shadow: 0 10px 25px rgb(3 16 29 / 20%); }
.portrait-mat { padding: 7px; background: #e4edf3; }
.portrait img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 4.6; object-fit: cover; object-position: center 40%; }
.portrait figcaption { display: flex; align-items: center; gap: 9px; color: #bbcfdf; font: italic 14px/1.5 var(--serif); margin-top: 10px; }
.portrait figcaption::before { content: ""; width: 24px; height: 1px; background: #7191aa; }

.section { padding-block: clamp(38px, 4vw, 62px); border-bottom: 1px solid var(--rule); }
h2 { font-size: clamp(32px, 3.5vw, 46px); line-height: 1.1; letter-spacing: -.04em; }
.section-intro { display: flex; align-items: baseline; justify-content: space-between; gap: 22px; }
.section-intro > p, .section-intro > a { font-size: 14px; color: var(--muted); }
#projects .section-intro { padding-bottom: 24px; border-bottom: 2px solid var(--ink); }
#projects .ledger { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 5vw, 74px); }
#projects .item { display: flex; flex-direction: column; align-items: flex-start; padding-block: 25px; border-bottom: 1px solid var(--rule); }
#projects .item-head { order: 1; }
#projects .item-org { order: 0; color: var(--blue); font-size: 12px; letter-spacing: .035em; margin: 0 0 7px; }
#projects .item-lead { order: 2; margin-top: 9px; }
#projects .project-details { order: 3; }
#projects .proj-actions { order: 4; margin-top: auto; padding-top: 15px; }
.item-role { font-size: clamp(22px, 2.2vw, 30px); line-height: 1.2; letter-spacing: -.025em; }
.item-role a { color: var(--ink); text-decoration: none; }
.item-role a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.item-lead { color: #3d5369; line-height: 1.6; font-size: 15px; }
.dots { display: none; }
.fig, .item-org { color: var(--muted); font-size: 13px; }
.project-details { margin-top: 11px; }
.project-details summary { width: fit-content; cursor: pointer; font-size: 13px; color: var(--muted); padding-block: 3px; }
.project-details summary:hover { color: var(--ink); }
.bullets { list-style: disc; padding-left: 19px; margin-top: 12px; font-size: 14px; color: #41576b; }
.bullets li + li { margin-top: 5px; }
.bullets li::marker { color: #648aa9; }
.btn { display: inline-flex; gap: 9px; align-items: center; color: var(--blue); font-size: 14px; font-weight: 580; text-decoration: none; }
.btn:hover { text-decoration: underline; }
.btn svg { width: 17px; height: 17px; }
.section:not(#projects) .section-in { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 2.7fr); gap: min(5vw, 72px); align-items: start; }
.section:not(#projects) .section-intro { display: block; }
.section:not(#projects) .section-intro a { display: inline-block; margin-top: 16px; }
.section:not(#projects) .item + .item { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--rule); }
.section:not(#projects) .item-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 15px; }
.section:not(#projects) .item-org { margin-top: 6px; }
.section:not(#projects) .item-lead { margin-top: 13px; }
#resume { background: #eef4f8; }
#resume .fig { display: block; margin-top: 4px; font-variant-numeric: tabular-nums; }
#resume .item-org { font-size: 15px; color: var(--blue); }
#resume .bullets { max-width: 74ch; }
#resume .bullets li + li { margin-top: 7px; }

.contact-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  border-top: 1px solid rgb(196 224 241 / 38%);
  padding-block: 13px 18px;
}
.contact-inner h2 { font-size: clamp(23px, 2.4vw, 30px); font-style: italic; color: #d6e9f5; }
.contact-links { display: flex; align-items: center; flex-wrap: wrap; column-gap: 25px; }
.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: #f5faff;
  font-size: 15px;
  text-decoration-color: #8ab7d0;
  text-underline-offset: 5px;
}
.contact-links a:hover { text-decoration-color: white; }
.profile-spread :focus-visible { outline-color: #b9e3ff; }
.footer { padding-block: 24px; }
.footer .copyright { font-size: 12px; color: #afc7da; }

.contact-links .message-button {
  border: 1px solid #c8e1f2;
  border-radius: 3px;
  padding: 0 15px;
  background: #d5eaf8;
  color: var(--navy);
  font-weight: 550;
  text-decoration: none;
}
.contact-links .message-button:hover { background: white; }
.contact-links { row-gap: 5px; }
body:has(.message-dialog[open]) { overflow: hidden; }
.message-dialog {
  width: min(460px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: clamp(20px, 4vw, 32px);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #93afc3;
  border-top: 4px solid var(--ice);
  border-radius: 4px;
  box-shadow: 0 16px 64px rgb(5 21 37 / 30%);
}
.message-dialog::backdrop { background: rgb(6 23 40 / 70%); }
.message-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.message-heading h2 { font-size: 32px; }
.message-dialog button { font: inherit; cursor: pointer; }
#contact-close {
  width: 44px; height: 44px; padding: 0;
  color: var(--muted); font-size: 26px;
  border: 0; border-radius: 3px; background: transparent;
}
#contact-close:hover { background: #e7f0f6; }
.message-dialog fieldset { display: grid; gap: 15px; min-width: 0; margin: 18px 0; padding: 0; border: 0; }
.message-dialog label { display: grid; gap: 5px; font-size: 14px; font-weight: 550; }
.message-dialog input:not([type="hidden"], [type="checkbox"]), .message-dialog textarea {
  width: 100%; min-height: 44px; padding: 8px 11px;
  border: 1px solid #859bab; border-radius: 3px;
  font: 400 16px/1.45 var(--sans); color: var(--ink); background: white;
}
.message-dialog textarea { resize: vertical; }
#contact-submit {
  padding: 10px 18px; min-height: 44px; border: 0; border-radius: 3px;
  color: white; background: var(--navy); font-size: 15px; font-weight: 550;
}
#contact-submit:hover { background: var(--blue); }
#contact-submit:disabled { opacity: .7; cursor: wait; }
#contact-status:not(:empty) { margin-top: 14px; font-size: 15px; }
.message-direct { margin-top: 21px; padding-top: 16px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 14px; }

@media (max-width: 800px) {
  .wrap { width: calc(100% - 48px); }
  .hero { gap: 26px; grid-template-columns: minmax(0, 1.5fr) minmax(175px, .8fr); }
  .section:not(#projects) .section-in { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 600px) {
  .wrap { width: calc(100% - 38px); }
  .header .wrap { min-height: 60px; gap: 12px; }
  .brand { font-size: 17px; }
  nav { gap: 12px; }
  nav a { font-size: 13px; }
  .hero { grid-template-columns: minmax(0, 1fr) 30%; column-gap: 14px; row-gap: 18px; padding-block: 33px; }
  .hero-copy { display: contents; }
  .hero-heading { grid-row: 1; grid-column: 1; }
  .hero h1 { font-size: clamp(2.45rem, 8vw, 3.2rem); }
  .eyebrow { font-size: 11px; margin-bottom: 13px; }
  .portrait { grid-row: 1; grid-column: 2; }
  .portrait-frame { padding: 3px; }
  .portrait-mat { padding: 3px; }
  .portrait figcaption { font-size: 11px; gap: 4px; margin-top: 6px; }
  .portrait figcaption::before { width: 9px; }
  .intro, .hero .actions { grid-column: 1 / -1; margin: 0; }
  .hero .actions { gap: 18px; }
  #projects .ledger { grid-template-columns: 1fr; }
  .section-intro { display: block; }
  .contact-links { column-gap: 15px; margin-top: 8px; }
  .contact-links .message-button { flex: 0 0 auto; }
  .contact-inner { align-items: start; flex-direction: column; gap: 2px; padding-block: 15px 12px; }
  .section-intro > p { margin-top: 9px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  .header, .footer, .skip, .actions, .project-details { display: none; }
  .wrap { width: 100%; }
  .hero { padding: 14px 0; }
  .profile-spread, #resume { background: white; }
  .contact-inner h2, .contact-links a { color: black; }
  .hero-band, .hero h1 em, .eyebrow, .portrait figcaption, .intro { color: black; }
  .portrait { width: 112px; }
  .section { padding-block: 18px; }
  .item { break-inside: avoid; }
}
