:root {
  color-scheme: light;
  --ink: #171a1d;
  --muted: #5d6268;
  --paper: #ffffff;
  --soft: #f1f4f6;
  --line: #d5dade;
  --blue: #2463eb;
  --green: #13775a;
  --red: #b83a31;
  --yellow: #f3c34f;
  --header-height: 72px;
  --shell: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; text-rendering: optimizeLegibility; }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 4px; }
button, a { -webkit-tap-highlight-color: transparent; }
.page-shell { width: min(calc(100% - 48px), var(--shell)); margin: 0 auto; }
.section-anchor { scroll-margin-top: var(--header-height); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -70px; left: 16px; z-index: 100; padding: 12px 16px; background: var(--ink); color: white; font-weight: 700; }
.skip-link:focus { top: 12px; }

.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-height); border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(12px); }
.header-inner { width: min(calc(100% - 48px), var(--shell)); height: 100%; display: flex; align-items: stretch; justify-content: space-between; margin: 0 auto; }
.brand { display: flex; flex-direction: column; justify-content: center; min-width: 230px; text-decoration: none; }
.brand strong { font-size: 16px; line-height: 1.1; }
.brand span { margin-top: 4px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.site-nav { display: flex; align-items: stretch; }
.site-nav a { display: grid; place-items: center; min-width: max-content; padding: 0 13px; border-left: 1px solid var(--line); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; font-weight: 800; text-decoration: none; text-transform: uppercase; }
.site-nav a:hover, .site-nav a:focus-visible, .site-nav a[aria-current="true"] { background: var(--ink); color: white; outline: none; }
.menu-button { display: none; width: 56px; border: 0; border-left: 1px solid var(--line); background: transparent; }
.menu-button > span:first-child, .menu-button > span:first-child::before, .menu-button > span:first-child::after { display: block; width: 20px; height: 2px; margin: 0 auto; background: var(--ink); content: ""; transition: transform 160ms ease; }
.menu-button > span:first-child::before { transform: translateY(-6px); }
.menu-button > span:first-child::after { transform: translateY(4px); }
.menu-button[aria-expanded="true"] > span:first-child { background: transparent; }
.menu-button[aria-expanded="true"] > span:first-child::before { transform: translateY(0) rotate(45deg); }
.menu-button[aria-expanded="true"] > span:first-child::after { transform: translateY(-2px) rotate(-45deg); }

.profile-intro { padding-top: 72px; border-bottom: 1px solid var(--ink); }
.profile-grid { min-height: 540px; display: grid; grid-template-columns: 330px 1fr; gap: 70px; align-items: center; padding-bottom: 72px; }
.portrait-frame { width: 330px; aspect-ratio: 4 / 5; margin: 0; border: 1px solid var(--ink); background: var(--soft); overflow: hidden; }
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.section-label { margin: 0 0 16px; color: var(--blue); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; font-weight: 900; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 24px; font-family: Georgia, "Times New Roman", serif; font-size: 72px; font-weight: 500; line-height: 0.96; }
.role { max-width: 720px; margin-bottom: 24px; font-family: Georgia, "Times New Roman", serif; font-size: 27px; line-height: 1.28; }
.affiliation { margin-bottom: 28px; color: var(--muted); font-size: 16px; font-weight: 600; line-height: 1.65; }
.profile-links { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-links a, .card-links a, .contact-links a { display: inline-flex; align-items: center; min-height: 42px; padding: 0 14px; border: 1px solid var(--ink); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; font-weight: 900; text-decoration: none; text-transform: uppercase; }
.profile-links a:first-child { background: var(--ink); color: white; }
.profile-links a:hover, .profile-links a:focus-visible, .card-links a:hover, .card-links a:focus-visible, .contact-links a:hover, .contact-links a:focus-visible { background: var(--blue); border-color: var(--blue); color: white; outline: none; }
.focus-rail { border-top: 1px solid var(--ink); background: var(--yellow); }
.focus-rail-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.focus-rail span { min-height: 66px; display: grid; place-items: center; border-left: 1px solid var(--ink); font-size: 11px; font-weight: 900; text-align: center; text-transform: uppercase; }
.focus-rail span:last-child { border-right: 1px solid var(--ink); }

.section { border-bottom: 1px solid var(--ink); padding: 94px 0; }
.editorial-grid { display: grid; grid-template-columns: 0.4fr 0.6fr; gap: 86px; }
.section-heading { padding-right: 52px; border-right: 1px solid var(--line); }
h2 { margin-bottom: 0; font-family: Georgia, "Times New Roman", serif; font-size: 48px; font-weight: 500; line-height: 1.06; }
.prose-large p { margin-bottom: 24px; font-family: Georgia, "Times New Roman", serif; font-size: 20px; line-height: 1.65; }
.prose-large .availability { margin-bottom: 0; padding: 20px 22px; border-left: 5px solid var(--green); background: var(--soft); font-family: inherit; font-size: 16px; font-weight: 700; }
.wide-heading { display: grid; grid-template-columns: 1fr 370px; gap: 70px; align-items: end; margin-bottom: 46px; }
.wide-heading > p { margin-bottom: 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.research-band { background: var(--soft); }
.research-list { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.research-list article { min-height: 420px; padding: 28px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); background: white; }
.item-index, .project-meta, .contribution-state, .contribution-repo { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.research-list article:nth-child(1) .item-index { color: var(--blue); }
.research-list article:nth-child(2) .item-index { color: var(--green); }
.research-list article:nth-child(3) .item-index { color: var(--red); }
.research-list h3 { margin: 104px 0 18px; font-family: Georgia, "Times New Roman", serif; font-size: 31px; font-weight: 500; }
.research-list p { min-height: 96px; color: var(--muted); line-height: 1.6; }
.research-list ul { padding: 18px 0 0; margin: 24px 0 0; border-top: 1px solid var(--line); list-style: none; }
.research-list li { padding: 6px 0; font-size: 12px; font-weight: 800; text-transform: uppercase; }

.projects-band { background: var(--ink); color: white; }
.light-heading .section-label { color: #8eb4ff; }
.light-heading > p { color: #b8c0c6; }
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid #596168; border-left: 1px solid #596168; }
.project-card { min-height: 380px; display: flex; flex-direction: column; padding: 32px; border-right: 1px solid #596168; border-bottom: 1px solid #596168; background: #20252a; }
.project-card-featured { background: var(--blue); }
.project-meta { display: flex; justify-content: space-between; color: #bac4cc; }
.project-card-featured .project-meta { color: white; }
.project-card h3 { margin: 72px 0 16px; font-family: Georgia, "Times New Roman", serif; font-size: 46px; font-weight: 500; }
.project-card p { max-width: 560px; color: #c9d0d5; font-size: 15px; line-height: 1.7; }
.project-card-featured p { color: white; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: auto 0 22px; padding-top: 28px; }
.tag-row span { padding: 6px 8px; border: 1px solid #6d767d; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.project-card-featured .tag-row span { border-color: rgba(255, 255, 255, 0.7); }
.card-links { display: flex; flex-wrap: wrap; gap: 8px; }
.card-links a { border-color: white; }
.card-links a:hover, .card-links a:focus-visible { background: white; border-color: white; color: var(--ink); }

.contribution-list { border-top: 1px solid var(--ink); }
.contribution-row { min-height: 112px; display: grid; grid-template-columns: 190px 1fr 130px; gap: 24px; align-items: center; border-bottom: 1px solid var(--ink); text-decoration: none; }
.contribution-row strong { font-family: Georgia, "Times New Roman", serif; font-size: 20px; font-weight: 500; line-height: 1.35; }
.contribution-state { text-align: right; }
.contribution-row:hover, .contribution-row:focus-visible { padding: 0 18px; background: var(--yellow); outline: none; }

.timeline-band { background: #e8f2ee; }
.timeline { border-top: 1px solid var(--ink); }
.timeline article { display: grid; grid-template-columns: 150px 1fr; gap: 32px; padding: 28px 0; border-bottom: 1px solid var(--ink); }
.timeline time { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; font-weight: 900; }
.timeline h3 { margin-bottom: 8px; font-family: Georgia, "Times New Roman", serif; font-size: 24px; font-weight: 500; }
.timeline p { margin-bottom: 0; color: var(--muted); line-height: 1.55; }

.contact-band { padding: 100px 0; background: var(--red); color: white; }
.contact-band .section-label { color: white; }
.contact-grid { display: grid; grid-template-columns: 1fr 0.65fr; gap: 90px; align-items: end; }
.contact-grid h2 { max-width: 700px; font-size: 58px; }
.contact-copy > p { margin-bottom: 28px; font-size: 17px; line-height: 1.65; }
.primary-contact { display: block; margin-bottom: 28px; overflow-wrap: anywhere; font-family: Georgia, "Times New Roman", serif; font-size: 27px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 8px; }
.contact-links a { border-color: white; }
.contact-links a:hover, .contact-links a:focus-visible { background: white; border-color: white; color: var(--ink); }
.site-footer { min-height: 78px; display: flex; align-items: center; background: var(--ink); color: white; }
.site-footer .page-shell { display: flex; justify-content: space-between; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; font-weight: 800; }

@media (max-width: 900px) {
  :root { --header-height: 66px; }
  .page-shell, .header-inner { width: min(calc(100% - 32px), var(--shell)); }
  .menu-button { display: block; }
  .site-nav { display: none; position: absolute; top: var(--header-height); left: 0; right: 0; grid-template-columns: repeat(2, 1fr); border-bottom: 1px solid var(--ink); background: white; }
  .site-nav.open { display: grid; }
  .site-nav a { min-height: 50px; border-bottom: 1px solid var(--line); }
  .profile-grid { grid-template-columns: 260px 1fr; gap: 42px; }
  .portrait-frame { width: 260px; }
  h1 { font-size: 56px; }
  .role { font-size: 23px; }
  .focus-rail-inner { grid-template-columns: repeat(2, 1fr); }
  .focus-rail span:nth-child(2) { border-right: 1px solid var(--ink); }
  .focus-rail span:nth-child(-n+2) { border-bottom: 1px solid var(--ink); }
  .editorial-grid, .contact-grid { grid-template-columns: 1fr; gap: 46px; }
  .section-heading { padding: 0 0 34px; border-right: 0; border-bottom: 1px solid var(--line); }
  .wide-heading { grid-template-columns: 1fr; gap: 22px; }
  .research-list { grid-template-columns: 1fr; }
  .research-list article { min-height: 330px; }
  .research-list h3 { margin-top: 60px; }
}

@media (max-width: 620px) {
  .brand { min-width: 0; }
  .brand span { font-size: 8px; }
  .profile-intro { padding-top: 38px; }
  .profile-grid { min-height: 0; grid-template-columns: 1fr; gap: 34px; padding-bottom: 44px; }
  .portrait-frame { width: min(100%, 320px); }
  h1 { font-size: 48px; }
  .role { font-size: 21px; }
  .profile-links a { flex: 1 1 calc(50% - 8px); justify-content: center; }
  .focus-rail-inner { width: 100%; }
  .section { padding: 68px 0; }
  h2 { font-size: 38px; }
  .prose-large p { font-size: 18px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 350px; }
  .project-card h3 { margin-top: 54px; font-size: 40px; }
  .contribution-row { grid-template-columns: 1fr; gap: 10px; padding: 24px 0; }
  .contribution-row:hover, .contribution-row:focus-visible { padding: 24px 14px; }
  .contribution-state { text-align: left; }
  .timeline article { grid-template-columns: 1fr; gap: 12px; }
  .contact-band { padding: 72px 0; }
  .contact-grid h2 { font-size: 42px; }
  .primary-contact { font-size: 22px; }
  .site-footer .page-shell { min-height: 78px; flex-direction: column; justify-content: center; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
