@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --paper: #ffffff;
  --surface: #f2f2f2;
  --card: #ffffff;
  --ink: #111111;
  --muted: #5d5d5d;
  --line: #d0d0d0;
  --accent: #111111;
  --accent-soft: #f3f3f3;
  --sans: 'DM Sans', Arial, sans-serif;
  --mono: 'IBM Plex Mono', monospace;
  --gutter: clamp(20px, 3.2vw, 48px);
  --radius: 0;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
}
::selection { background: #111; color: #fff; }
a { color: inherit; text-decoration: none; }
a, button { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
button { color: inherit; font: inherit; cursor: pointer; }
button:disabled { cursor: default; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin: 0; }
section { scroll-margin-top: 32px; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter); }
.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;
}
.mono, .eyebrow { font: 400 10px/1.6 var(--mono); letter-spacing: .06em; }
.muted { color: var(--muted); }
.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 18px;
  border-radius: 0;
  background: var(--accent);
  color: white;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

/* Navigation */
.header { position: relative; z-index: 20; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 88px; border-bottom: 1px solid var(--ink); }
.brand { display: flex; align-items: center; min-height: 44px; flex-shrink: 0; }
.brand-name { font-size: 22px; font-weight: 600; line-height: 1.2; letter-spacing: -.045em; white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 1.5vw, 20px); font: 11px/1.5 var(--mono); }
.nav-links a { position: relative; padding-block: 9px; color: var(--muted); transition: color .18s; }
.nav-links a { white-space: nowrap; }
.nav-links a::after { content: ''; position: absolute; bottom: 4px; left: 0; right: 0; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .18s; }
.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a[aria-current='page'] { color: var(--ink); }
.nav-links a[aria-current='page']::after { transform: scaleX(1); }
.nav-links a.nav-gallery, .nav-links a.nav-gallery:hover, .nav-links a.nav-gallery[aria-current='page'] { color: #1d4ed8; }
.nav-links a.nav-gallery::after, .nav-links a.nav-gallery[aria-current='page']::after { background: #1d4ed8; transform: scaleX(0); }
.nav-links a.nav-gallery:hover::after, .nav-links a.nav-gallery:focus-visible::after { transform: scaleX(1); }
.menu-button { display: none; min-height: 40px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 0; background: var(--card); font-size: 12px; }

/* Section rhythm */
.section { padding-block: 72px; border-bottom: 1px solid var(--ink); }
.section-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 32px; margin-bottom: 34px; }
.section-title { font-size: clamp(28px, 3vw, 38px); font-weight: 600; letter-spacing: -.055em; line-height: 1.1; text-transform: uppercase; }
.section-title sup { display: inline-block; margin: 3px 0 0 9px; vertical-align: top; font: 11px var(--mono); letter-spacing: 0; }
.section-kicker { margin-bottom: 13px; color: var(--muted); }
.section-heading > p { max-width: 410px; justify-self: end; color: var(--muted); font: 12px/1.75 var(--mono); }
.text-link { display: inline-flex; align-items: center; gap: 14px; font: 12px/1.6 var(--mono); }
.text-link .arrow { font-size: 19px; line-height: 1; }
.text-link:hover { color: var(--accent); }
.page-section { padding-top: 48px; }

/* Links between the independent portfolio pages */
.page-directory { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; margin-top: 38px; }
.page-link { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-width: 0; padding: 22px 0; border-top: 1px solid var(--line); }
.page-link h2, .page-link h3, .page-link strong { font-size: 20px; font-weight: 500; line-height: 1.4; letter-spacing: -.025em; }
.page-link p, .page-link small { display: block; margin-top: 6px; color: var(--muted); font: 11px/1.7 var(--mono); }
.page-link > .arrow { flex-shrink: 0; font-size: 23px; }
.page-link:hover { border-color: var(--ink); }
.page-link-gallery h2, .page-link-gallery h3, .page-link-gallery strong, .page-link-gallery > .arrow { color: #1d4ed8; }
.page-link-gallery:hover { border-color: #1d4ed8; }
.page-link-gallery-wide { grid-column: 1 / -1; }

/* Extracurricular activities */
.activity-row { display: grid; grid-template-columns: 150px minmax(0, .9fr) minmax(0, 1.1fr); gap: 28px; align-items: start; padding: 26px 0; border-top: 1px solid var(--ink); }
.activity-period { padding-top: 3px; color: var(--muted); font-size: 10px; }
.activity-heading h2 { font-size: 19px; font-weight: 500; line-height: 1.35; letter-spacing: -.035em; }
.activity-role, .activity-organization { margin-top: 8px; color: var(--muted); font: 11px/1.7 var(--mono); }
.activity-description { font-size: 14px; line-height: 1.75; }

/* About and original Summary */
.about-first { padding-top: 48px; }
.about-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 44px; align-items: stretch; }
.profile-card { padding: 0 32px 0 0; border: 0; border-right: 1px solid var(--ink); border-radius: 0; background: transparent; min-width: 0; }
.portrait { width: 200px; height: 250px; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 40%; border-radius: 0; background: #efefef; }
.profile-name { margin-top: 22px; font-size: 26px; font-weight: 600; line-height: 1.2; letter-spacing: -.05em; }
.profile-role { margin-top: 10px; font: 11px/1.65 var(--mono); color: var(--ink); }
.profile-location { margin-top: 13px; font: 11px/1.65 var(--mono); color: var(--muted); }
.profile-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 19px; }
.profile-links a { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 2px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; font: 10px/1.5 var(--mono); transition: border-color .18s; }
.profile-links a:hover { background: transparent; border-color: var(--ink); }
.profile-links svg { width: 15px; height: 15px; }
.professional-summary { display: flex; flex-direction: column; align-items: flex-start; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; min-width: 0; }
.summary-label { margin-bottom: 24px; color: var(--muted); font: 400 11px/1.5 var(--mono); letter-spacing: .025em; }
.about-summary { max-width: 72ch; font: 400 clamp(15px, 1.32vw, 18px)/1.8 var(--mono); letter-spacing: -.035em; }
.about-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.about-affiliation { width: 100%; margin-top: 30px; padding-top: 23px; border-top: 1px solid var(--line); color: var(--muted); font: 11px/1.8 var(--mono); }
.about-note { margin-top: 17px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.timeline { display: block; }
.timeline-item { display: grid; grid-template-columns: 150px minmax(0, .9fr) minmax(0, 1.1fr); gap: 28px; align-items: start; padding: 26px 0; border-top: 1px solid var(--ink); }
.timeline-date { padding-top: 3px; color: var(--muted); font-size: 10px; letter-spacing: 0; }
.timeline-item h3 { font-size: 19px; font-weight: 500; line-height: 1.35; letter-spacing: -.035em; }
.timeline-item h3 a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.timeline-item .role { margin-top: 9px; font: 11px/1.7 var(--mono); }
.timeline-item .description { margin-top: 0; color: var(--muted); font-size: 14px; line-height: 1.75; }
.experience-group { margin-top: 38px; }
.experience-group + .experience-group { margin-top: 54px; }
.experience-group-title { margin-bottom: 20px; font-size: 24px; font-weight: 500; line-height: 1.3; letter-spacing: -.035em; }


.about-links .pill-link { padding: 10px 15px; }
.about-links .pill-link:hover { background: var(--ink); color: #fff; }

/* Independent education section */
.education-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 54px; align-items: start; padding-top: 28px; border-top: 1px solid var(--ink); }
.education-details { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 22px; min-width: 0; }
.education-details h3 { font-size: clamp(24px, 2.6vw, 34px); font-weight: 500; line-height: 1.25; letter-spacing: -.04em; }
.education-details > div > p { margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.education-period, .education-location { color: var(--muted); font: 11px/1.8 var(--mono); }
.education-photo { min-width: 0; }
.education-photo img { width: 100%; height: auto; object-fit: contain; }
.education-photo figcaption { margin-top: 11px; color: var(--muted); font: 10px/1.7 var(--mono); }

/* Certificates and score reports retain the complete original image. */
.certificate-list { display: grid; gap: 48px; }
.certificate-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 25px; padding-top: 28px; border-top: 1px solid var(--ink); }
.certificate-copy { min-width: 0; }
.certificate-copy h2 { font-size: 24px; font-weight: 500; line-height: 1.35; letter-spacing: -.035em; }
.certificate-copy p { max-width: 75ch; margin-top: 11px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.certificate-copy .mono, .certificate-copy .eyebrow { font: 10px/1.8 var(--mono); letter-spacing: .04em; }
.certificate-copy > .eyebrow:first-child { margin-top: 0; margin-bottom: 12px; }
.certificate-copy .certificate-score { color: var(--ink); font-size: 18px; font-weight: 500; }
.certificate-image-link { display: block; width: 100%; min-width: 0; }
.certificate-image-link .text-link { margin-top: 12px; padding-bottom: 3px; border-bottom: 1px solid var(--line); }
.certificate-image-link:hover .text-link { border-color: var(--ink); }
.certificate-image { display: block; width: 100%; height: auto; object-fit: contain; border: 1px solid var(--line); }

/* Conference participation: a numbered album with uncropped photographs. */
.album-navigation { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.album-link { display: inline-flex; align-items: center; gap: 12px; min-height: 40px; padding: 9px 14px; border: 1px solid var(--line); font: 11px/1.6 var(--mono); transition: border-color .18s, background .18s; }
.album-link:hover, .album-link:focus-visible { border-color: var(--ink); background: var(--surface); }
.album-link .album-count { color: var(--muted); font-size: 10px; }
.conference-album { padding-top: 30px; border-top: 1px solid var(--ink); }
.conference-album + .conference-album { margin-top: 64px; }
.conference-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 48px; margin-bottom: 38px; }
.conference-meta h2 { margin-top: 12px; font-size: clamp(27px, 3.4vw, 43px); font-weight: 500; line-height: 1.15; letter-spacing: -.045em; }
.conference-name { max-width: 48ch; margin-top: 16px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.conference-meta > .mono { margin-top: 14px; color: var(--muted); }
.conference-meta > .text-link { margin-top: 19px; border-bottom: 1px solid var(--line); padding-bottom: 3px; }
.conference-meta > .text-link:hover { border-color: var(--ink); }
.conference-summary { max-width: 46ch; justify-self: end; color: var(--muted); font-size: 14px; line-height: 1.85; }
.conference-summary > .mono { margin-top: 20px; }
.participation-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 34px 22px; align-items: start; }
.participation-photo { min-width: 0; }
.photo-open { display: block; width: 100%; aspect-ratio: 3 / 4; overflow: hidden; padding: 0; border: 0; background: var(--surface); cursor: zoom-in; }
.photo-open img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: opacity .18s; }
.photo-open:hover img { opacity: .88; }
.participation-photo figcaption { display: grid; grid-template-columns: 23px minmax(0, 1fr); gap: 10px; margin-top: 13px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font: 11px/1.7 var(--mono); }
.participation-photo figcaption > .mono { color: var(--ink); }

/* Native dialog keeps keyboard focus inside the full-size photo viewer. */
.photo-dialog { width: min(1280px, calc(100vw - 32px)); max-width: none; height: min(1000px, calc(100dvh - 32px)); max-height: calc(100dvh - 32px); padding: 18px 22px; border: 1px solid #444; background: #151515; color: #fff; overflow: hidden; }
.photo-dialog[open] { display: flex; flex-direction: column; gap: 14px; }
.photo-dialog::backdrop { background: rgba(0, 0, 0, .88); }
.photo-viewer-header { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 20px; }
.photo-viewer-header h2 { font: 12px/1.6 var(--mono); letter-spacing: .01em; }
.photo-close, .photo-prev, .photo-next { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 8px 12px; border: 1px solid #555; background: transparent; color: #fff; font: 12px/1.5 var(--mono); transition: background .18s, border-color .18s; }
.photo-close:hover, .photo-prev:hover, .photo-next:hover { border-color: #fff; background: #292929; }
.photo-dialog button:focus-visible { outline-color: #fff; }
.photo-viewer-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 16px; align-items: center; }
.photo-viewer-image { width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; }
.photo-viewer-caption { flex-shrink: 0; max-height: 64px; overflow: auto; color: #ddd; text-align: center; font: 11px/1.7 var(--mono); }
.photo-position { flex-shrink: 0; color: #aaa; text-align: center; font: 10px/1.5 var(--mono); }

/* Publications and work in progress */
.publication-tools { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--ink); }
.filter-buttons { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-button { min-height: 38px; padding: 8px 2px; margin-right: 18px; border: 0; border-bottom: 1px solid transparent; border-radius: 0; background: transparent; font: 11px/1.5 var(--mono); transition: border-color .18s; }
.filter-button[aria-pressed='true'] { background: transparent; border-color: var(--ink); color: var(--ink); }
.filter-button:hover:not([aria-pressed='true']) { background: transparent; border-color: var(--line); }
.publication { display: grid; grid-template-columns: 52px minmax(0, 1fr) 90px; align-items: start; gap: 23px; padding: 27px 0; border-bottom: 1px solid var(--line); }
.publication:last-child { border-bottom: 0; }
.pub-year { padding-top: 3px; color: var(--muted); letter-spacing: 0; font-size: 11px; }
.pub-title { font-size: 19px; font-weight: 500; line-height: 1.45; letter-spacing: -.025em; }
.pub-title a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.pub-authors { margin-top: 12px; color: var(--muted); font: 11px/1.8 var(--mono); }
.pub-authors strong { color: var(--ink); font-weight: 600; }
.pub-authors sup { margin-left: 1px; font-size: 10px; }
.pub-meta { margin-top: 7px; color: var(--muted); font: 11px/1.7 var(--mono); }
.pub-award { display: inline-block; margin-top: 13px; padding: 3px 7px; border: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--ink); font: 10px/1.6 var(--mono); }
.pub-links { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; padding-top: 2px; font: 11px/1.6 var(--mono); }
.pub-links a { display: inline-flex; justify-content: flex-end; min-width: 60px; padding: 2px 0; border: 0; border-bottom: 1px solid transparent; border-radius: 0; line-height: 1.5; transition: border-color .18s; }
.pub-links a:hover { background: transparent; border-color: var(--ink); color: var(--ink); }
.status { color: var(--muted); font: 10px/1.6 var(--mono); text-align: right; }
.pub-status-note { margin-top: 22px; color: var(--muted); font: 10px/1.8 var(--mono); }

/* Projects */
.project-category-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; margin-top: 12px; }
.project-category-link { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-width: 0; min-height: 58px; padding: 15px 0; border-top: 1px solid var(--line); font: 11px/1.7 var(--mono); transition: border-color .18s; }
.project-category-link:hover { border-color: var(--ink); }
.project-category-link .project-category-count, .project-category-link .count, .project-category-link sup { flex-shrink: 0; color: var(--muted); font: 10px/1.6 var(--mono); }
.project-group { margin-top: 54px; }
.project-group-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.project-group-title { min-width: 0; font-size: 24px; font-weight: 500; line-height: 1.3; letter-spacing: -.035em; }
.project-group-title sup { display: inline-block; margin: 3px 0 0 9px; vertical-align: top; font: 10px/1.6 var(--mono); letter-spacing: 0; color: var(--muted); }
.project-group-heading > p { max-width: 46ch; color: var(--muted); font: 11px/1.8 var(--mono); }
.project-row { display: grid; grid-template-columns: 30px minmax(190px, .85fr) minmax(0, 1.25fr); align-items: start; gap: 22px; padding: 26px 0; border-top: 1px solid var(--line); }
.project-row .number { padding-top: 4px; color: var(--muted); letter-spacing: 0; }
.project-row h3 { font-size: 19px; font-weight: 500; line-height: 1.4; letter-spacing: -.025em; }
.project-row .tag { margin-top: 9px; color: var(--muted); font: 10px/1.7 var(--mono); }
.project-row p { color: var(--muted); font-size: 14px; line-height: 1.8; }
.project-row .project-role { margin-top: 12px; font: 10px/1.7 var(--mono); }
.project-row .project-context { margin-top: 11px; color: var(--muted); font: 10px/1.8 var(--mono); overflow-wrap: anywhere; }
.project-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.project-badges .pub-award { margin-top: 0; }
.project-resource-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 15px; font: 10px/1.7 var(--mono); }
.project-resource-links a { padding-block: 3px; border-bottom: 1px solid var(--line); }
.project-resource-links a:hover { border-color: var(--ink); }
.project-links { display: flex; gap: 20px; margin-top: 24px; }

/* Recognition and contact */
.recognition-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 64px; }
.award-row { display: grid; grid-template-columns: 85px minmax(0, 1fr); gap: 20px; padding: 20px 0; border-top: 1px solid var(--line); }
.award-row h3 { font-size: 17px; font-weight: 500; line-height: 1.5; letter-spacing: -.02em; }
.award-row p { margin-top: 7px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.award-row .scholarship-amount { margin-top: 12px; color: var(--ink); font: 11px/1.7 var(--mono); }
.recognition-links { margin-top: 20px; }

/* Patent records are independent of awards and scholarships. */
.patent-list { border-top: 1px solid var(--ink); }
.patent-entry { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; align-items: start; gap: 24px; padding: 28px 0; border-top: 1px solid var(--line); }
.patent-entry:first-child { border-top: 0; }
.patent-year { padding-top: 4px; color: var(--muted); font: 10px/1.7 var(--mono); }
.patent-details { min-width: 0; }
.patent-details h2 { font-size: 22px; font-weight: 500; line-height: 1.45; letter-spacing: -.03em; }
.patent-details > p { margin-top: 12px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.patent-reference, .patent-reference p, .patent-details > .patent-reference { margin-top: 12px; color: var(--muted); font: 10px/1.8 var(--mono); overflow-wrap: anywhere; }
.patent-status { display: inline-block; justify-self: start; padding: 4px 8px; border: 1px solid var(--line); font: 10px/1.6 var(--mono); }

.contact { padding-top: 52px; padding-bottom: 24px; }
.contact-heading { font-size: 30px; font-weight: 500; line-height: 1.3; letter-spacing: -.035em; }
.contact-email { display: inline-block; margin-top: 15px; font-size: clamp(16px, 2vw, 21px); line-height: 1.7; letter-spacing: -.02em; overflow-wrap: anywhere; }
.contact-email a { border-bottom: 1px solid var(--ink); }
.contact-email a:hover { color: var(--accent); }
.contact-bottom { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 29px; }
.social-links { display: flex; flex-wrap: wrap; gap: 24px; font: 11px/1.6 var(--mono); color: var(--muted); }
.social-links a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--ink); color: var(--muted); font: 9px/1.7 var(--mono); letter-spacing: .015em; }

/* Research detail pages */
.case-hero { padding: 40px 0 38px; }
.back-link { display: inline-flex; align-items: center; gap: 13px; color: var(--muted); font-size: 12px; }
.back-link:hover { color: var(--accent); }
.case-title { max-width: 950px; margin-top: 34px; font-size: clamp(32px, 4.5vw, 54px); font-weight: 500; line-height: 1.12; letter-spacing: -.045em; }
.case-subtitle { max-width: 760px; margin-top: 20px; color: var(--muted); font-size: 18px; line-height: 1.7; letter-spacing: -.012em; }
.case-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 25px; margin-top: 35px; padding-top: 23px; border-top: 1px solid var(--line); }
.case-meta p { margin-top: 8px; font: 11px/1.8 var(--mono); }
.case-art { border-radius: 0; }
.case-art img { width: 100%; height: auto; object-fit: contain; border: 0; border-radius: 0; }
.art-caption { margin-top: 10px; color: var(--muted); font: 10px/1.6 var(--mono); }
.case-body { max-width: 940px; margin: 48px auto; }
.case-section { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 40px; padding: 30px 0; border-top: 1px solid var(--line); }
.case-section h2 { font-size: 20px; font-weight: 500; line-height: 1.5; letter-spacing: -.025em; }
.case-section p { color: var(--muted); font-size: 16px; line-height: 1.9; }
.case-resource-links { display: flex; flex-wrap: wrap; align-items: start; gap: 10px; }
.pill-link { display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-height: 40px; padding: 9px 15px; border: 1px solid var(--ink); border-radius: 0; background: transparent; font: 11px/1.6 var(--mono); transition: background .18s, color .18s; }
.pill-link:hover { border-color: var(--accent); background: var(--accent); color: white; }
.next-case { padding: 32px 0; border-top: 1px solid var(--line); }
.next-case a { display: flex; align-items: center; justify-content: space-between; gap: 25px; }
.next-case h2 { margin-top: 13px; font-size: clamp(24px, 2.8vw, 34px); font-weight: 500; line-height: 1.3; letter-spacing: -.03em; }
.next-case .arrow { font-size: 34px; line-height: 1; color: var(--accent); }
.not-found { padding-block: 90px; }
.not-found h1 { font-size: 88px; font-weight: 500; line-height: 1.1; letter-spacing: -.06em; }
.not-found p { max-width: 480px; margin-top: 20px; color: var(--muted); }
.not-found a { margin-top: 25px; }

@media (max-width: 1000px) {
  .nav-links { gap: 22px; }
  .recognition-grid { gap: 34px; }
  .project-category-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1200px) {
  .nav { flex-wrap: wrap; gap: 0 24px; }
  .menu-button { display: block; border-color: var(--ink); background: transparent; font-family: var(--mono); }
  .nav-links { display: none; position: absolute; left: var(--gutter); right: var(--gutter); top: 87px; padding: 17px 20px; border: 1px solid var(--line); background: var(--card); flex-wrap: wrap; gap: 10px 24px; }
  .nav-links.is-open { display: flex; }
}

@media (max-width: 1120px) {
  .education-layout { gap: 32px; }
  .participation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px 26px; }
}

@media (max-width: 760px) {
  .education-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .education-details { gap: 15px; }
  .education-details h3 { font-size: 27px; }
  .page-directory { gap: 0 28px; }
  .page-link { align-items: flex-start; }
  .conference-heading { gap: 28px; }
  .participation-grid { gap: 28px 20px; }
  .section { padding-block: 48px; }
  .about-first { padding-top: 34px; }
  .section-heading { grid-template-columns: minmax(0, 1fr); gap: 17px; margin-bottom: 27px; }
  .section-heading > p { justify-self: start; }
  .about-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .profile-card { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 0 22px; align-content: center; padding: 0 0 24px; border-right: 0; border-bottom: 1px solid var(--ink); }
  .profile-card .portrait { grid-column: 1; grid-row: 1 / 6; width: 144px; height: 180px; }
  .profile-name { grid-column: 2; margin-top: 0; font-size: 23px; }
  .profile-role, .profile-location, .profile-links { grid-column: 2; }
  .profile-role { margin-top: 6px; font-size: 12px; }
  .profile-location { margin-top: 6px; }
  .profile-links { margin-top: 11px; }
  .professional-summary { padding: 0; }
  .about-summary { font-size: 17px; line-height: 1.85; }
  .about-affiliation { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
  .timeline { grid-template-columns: minmax(0, 1fr); }
  .timeline-item { grid-template-columns: 90px minmax(0, 1fr); gap: 18px; }
  .activity-row { grid-template-columns: 120px minmax(0, 1fr); gap: 18px; }
  .activity-description { grid-column: 2; }
  .timeline-item .description { grid-column: 2; }
  .publication { grid-template-columns: 42px minmax(0, 1fr); gap: 15px; padding-block: 23px; }
  .pub-links { grid-column: 2; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; padding-top: 0; }
  .status { text-align: left; }
  .pub-title { font-size: 17px; }
  .project-row { grid-template-columns: 24px minmax(0, 1fr); gap: 14px; padding-inline: 0; }
  .project-row .project-description { grid-column: 2; }
  .project-group-heading { align-items: flex-start; flex-direction: column; gap: 11px; }
  .project-group-heading > p { max-width: 58ch; }
  .recognition-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .patent-entry { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-block: 24px; }
  .patent-details h2 { font-size: 20px; }
  .patent-year { padding-top: 0; }
  .case-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
  .case-section { grid-template-columns: minmax(0, 1fr); gap: 14px; padding-block: 26px; }
  .case-body { margin-block: 30px; }
  .case-subtitle { font-size: 17px; }
}

@media (max-width: 600px) {
  .education-details { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  html { scroll-padding-top: 22px; }
  .nav { min-height: 76px; }
  .brand-name { font-size: 20px; }
  .menu-button { display: block; border-color: var(--ink); background: transparent; font-family: var(--mono); }
  .nav-links { display: none; position: absolute; left: var(--gutter); right: var(--gutter); top: 75px; padding: 17px 20px; border: 1px solid var(--line); border-radius: 0; background: var(--card); box-shadow: none; flex-wrap: wrap; gap: 10px 22px; }
  .nav-links.is-open { display: flex; }
  .page-directory { grid-template-columns: minmax(0, 1fr); }
  .page-directory { margin-top: 28px; }
  .page-link { padding-block: 20px; }
  .education-layout { padding-top: 22px; }
  .education-details h3 { font-size: 25px; }
  .certificate-list { gap: 36px; }
  .certificate-card { padding-top: 22px; gap: 20px; }
  .certificate-copy h2 { font-size: 22px; }
  .certificate-copy p { font-size: 13px; }
  .certificate-copy .mono, .certificate-copy .eyebrow { font-size: 10px; }
  .conference-album { padding-top: 24px; }
  .conference-album + .conference-album { margin-top: 48px; }
  .album-navigation { margin-bottom: 26px; }
  .conference-heading { grid-template-columns: minmax(0, 1fr); gap: 22px; margin-bottom: 28px; }
  .conference-summary { justify-self: start; font-size: 13px; }
  .conference-name { font-size: 13px; margin-top: 13px; }
  .photo-dialog { width: calc(100vw - 16px); height: calc(100dvh - 16px); max-height: calc(100dvh - 16px); padding: 12px; }
  .photo-dialog[open] { gap: 10px; }
  .photo-viewer-header h2 { font-size: 11px; }
  .photo-viewer-body { grid-template-columns: 38px minmax(0, 1fr) 38px; gap: 6px; }
  .photo-prev, .photo-next { min-width: 38px; padding-inline: 6px; }
  .photo-viewer-caption { font-size: 10px; }
  .section-title { font-size: 30px; }
  .section-kicker { margin-bottom: 8px; }
  .profile-card { grid-template-columns: 120px minmax(0, 1fr); gap: 0 17px; padding: 0 0 24px; }
  .profile-card .portrait { width: 120px; height: 150px; border-radius: 0; }
  .profile-name { font-size: 21px; }
  .profile-role { font-size: 11px; }
  .profile-location { font-size: 11px; }
  .profile-links { gap: 6px; margin-top: 9px; }
  .profile-links a { min-height: 30px; padding: 4px 7px; font-size: 10px; }
  .professional-summary { padding: 0; }
  .summary-label { margin-bottom: 15px; }
  .about-summary { font-size: 16px; line-height: 1.9; }
  .about-links { gap: 9px; margin-top: 23px; }
    .about-affiliation { font-size: 11px; }
  .timeline-item { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 22px 0; }
  .activity-row { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 22px 0; }
  .activity-description { grid-column: auto; }
  .timeline-item h3 { font-size: 17px; }
  .timeline-item .description { grid-column: auto; font-size: 13px; }
  .experience-group { margin-top: 30px; }
  .experience-group + .experience-group { margin-top: 40px; }
  .experience-group-title, .project-group-title { font-size: 22px; }
  .project-group { margin-top: 40px; }
  .project-group-heading { margin-bottom: 18px; }
  .publication-tools { align-items: flex-start; padding-bottom: 15px; }
  .publication-tools > .mono { display: none; }
  .filter-buttons { gap: 6px; }
  .filter-button { padding: 7px 11px; font-size: 11px; min-height: 36px; }
  .publication { grid-template-columns: 34px minmax(0, 1fr); gap: 12px; }
  .pub-year { font-size: 10px; }
  .pub-title { font-size: 16px; }
  .pub-authors, .pub-meta { font-size: 12px; }
  .pub-status-note { font-size: 11px; }
  .project-row h3 { font-size: 18px; }
  .project-row p { font-size: 13px; }
  .project-row .tag { font-size: 9px; }
  .award-row { grid-template-columns: 74px minmax(0, 1fr); gap: 16px; }
  .award-row h3 { font-size: 16px; }
  .award-row p { font-size: 12px; }
  .contact { padding-top: 38px; }
  .contact-heading { font-size: 27px; }
  .contact-bottom { align-items: flex-start; flex-direction: column; gap: 22px; }
  .social-links { gap: 13px 20px; }
  .footer { flex-direction: column; gap: 8px; font-size: 8px; }
  .case-hero { padding-top: 28px; padding-bottom: 28px; }
  .case-title { font-size: 34px; margin-top: 28px; }
  .case-subtitle { font-size: 16px; margin-top: 16px; }
  .case-meta { margin-top: 26px; padding-top: 19px; gap: 19px; }
  .case-meta p { font-size: 12px; }
  .case-section p { font-size: 15px; }
  .case-section h2 { font-size: 19px; }
  .next-case h2 { font-size: 24px; }
  .next-case .arrow { font-size: 27px; }
}

@media (max-width: 480px) {
  .project-category-nav { grid-template-columns: minmax(0, 1fr); }
  .project-category-link { min-height: 50px; padding-block: 12px; }
  .participation-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .participation-photo figcaption { margin-top: 12px; }
}

@media (max-width: 360px) {
  .profile-card { display: block; padding: 0 0 24px; }
  .profile-card .portrait { width: 128px; height: 160px; }
  .profile-name { margin-top: 17px; }
  .profile-links { margin-top: 14px; }
  .professional-summary { padding: 0; }
  .about-links { flex-direction: column; align-items: stretch; width: 100%; }
  }

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

@media print {
  body { background: #fff; color: #111; }
  .wrap { max-width: none; padding-inline: 0; }
  .header, .filter-buttons, .contact, .footer, .next-case { display: none; }
  .section { padding-block: 24px; }
  .about-layout, .recognition-grid { display: block; }
  .profile-card, .professional-summary { border: 0; padding: 0; background: none; box-shadow: none; }
  .profile-card { margin-bottom: 20px; }
  .profile-card .portrait { width: 90px; height: 112.5px; }
  .timeline { display: block; }
  .timeline-item { margin-block: 12px; break-inside: avoid; }
  .experience-group-title, .project-group-heading { break-after: avoid; }
  .project-category-nav { display: none; }
  .experience-group, .experience-group + .experience-group, .project-group { margin-top: 30px; }
  .publication, .project-row, .award-row, .patent-entry { break-inside: avoid; }
  .case-art img { max-height: 240px; border: 0; object-fit: contain; }
  .education-layout { grid-template-columns: 1fr 1fr; gap: 24px; }
  .education-photo, .participation-photo { break-inside: avoid; }
  .certificate-card { break-inside: avoid; }
  .photo-dialog { display: none !important; }
  .case-section { grid-template-columns: 140px minmax(0, 1fr); gap: 25px; }
}

/* Full-width portfolio pages with a simple, responsive navigation. */
:root { --gutter: clamp(24px, 5vw, 88px); }
.wrap { max-width: none; padding-inline: var(--gutter); }
.header.wrap, main.wrap, .contact.wrap { max-width: none; border-inline: 0; box-shadow: none; }
.header.wrap {
  position: sticky; top: 0; z-index: 30; padding-top: 8px;
  background: rgba(255,255,255,.97); backdrop-filter: blur(12px);
}
.nav { min-height: 75px; align-items: center; gap: 14px; border-bottom-color: #d7d7d2; }
.brand { align-self: center; margin-right: auto; }
main.wrap {
  min-height: calc(100svh - 160px);
  padding-top: clamp(36px, 5vh, 72px);
  padding-bottom: clamp(48px, 7vh, 96px);
  background: none;
}
.contact.wrap { min-height: 150px; padding-top: 32px; background: none; }

@media (min-width: 1201px) {
  .nav-links {
    position: static; display: flex; width: auto; max-width: calc(100% - 220px);
    margin-left: auto; padding: 0; flex: 0 1 auto; flex-direction: row;
    flex-wrap: wrap; align-items: center; justify-content: flex-end;
    gap: clamp(12px, 1.4vw, 20px); overflow: visible;
    border: 0; background: transparent; box-shadow: none;
  }
  .nav-links a {
    display: inline-flex; width: auto; min-width: 0; min-height: 36px;
    flex: 0 0 auto; align-items: center; justify-content: center;
    padding: 8px 0; border: 0; border-radius: 0; background: transparent;
    box-shadow: none; color: var(--muted); font-size: 10px; white-space: nowrap;
    transition: color .18s ease;
  }
  .nav-links a::after { display: block; bottom: 3px; }
  .nav-links a:hover, .nav-links a:focus-visible { transform: none; border: 0; background: transparent; box-shadow: none; }
  .nav-links a[aria-current='page'] { transform: none; border: 0; background: transparent; box-shadow: none; color: var(--ink); }
  .nav-links a.nav-gallery,
  .nav-links a.nav-gallery:hover,
  .nav-links a.nav-gallery[aria-current='page'] { color: #1d4ed8; }
  .nav-links a.nav-gallery::after,
  .nav-links a.nav-gallery[aria-current='page']::after { transform: scaleX(0); }
  .nav-links a.nav-gallery:hover::after,
  .nav-links a.nav-gallery:focus-visible::after { transform: scaleX(1); }
}

/* About sits above the full-width Contents list on the homepage. */
.home-layout {
  display: grid; grid-template-columns: minmax(0, 1fr);
  align-items: start; row-gap: 64px;
}
.home-layout > .home-about,
.home-layout > .contents-section { min-width: 0; margin: 0; padding: 0; border: 0; }
.home-layout > .contents-section { padding-top: 42px; border-top: 1px solid var(--ink); }
.home-about .section-heading,
.contents-section .section-heading {
  display: block; margin: 0 0 26px;
}
.home-about .section-title,
.contents-section .section-title { text-transform: none; }
.home-about .about-layout {
  grid-template-columns: minmax(145px, .72fr) minmax(0, 1fr);
  gap: clamp(20px, 2.4vw, 36px); align-items: start;
}
.home-about .profile-card { padding-right: 22px; }
.home-about .portrait { width: min(100%, 190px); height: auto; aspect-ratio: 4 / 5; }
.home-about .profile-name { font-size: clamp(20px, 2vw, 26px); }
.home-about .summary-label { margin-bottom: 14px; }
.home-about .about-summary { font-size: clamp(15px, 1.22vw, 17px); line-height: 1.75; }
.home-about .about-affiliation { margin-top: 19px; padding-top: 16px; }
.home-about .about-links { margin-top: 18px; }
.contents-section .section-title { font-size: clamp(32px, 3vw, 42px); }
.home-contents { display: block; margin-top: 0; counter-reset: chapter; }
.home-contents .page-link {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) 18px;
  align-items: center; gap: 14px; padding: 11px 0; border-top: 1px solid #e9e9e5;
}
.home-contents .page-link::before {
  content: counter(chapter, decimal-leading-zero); counter-increment: chapter;
  color: #898981; font: 10px/1.6 var(--mono);
}
.home-contents .page-link > span:first-of-type { min-width: 0; }
.home-contents .page-link strong { display: block; font-size: clamp(15px, 1.35vw, 18px); font-weight: 500; }
.home-contents .page-link small { margin-top: 3px; font-size: 10px; line-height: 1.45; }
.contents-arrow { color: #85857d; font-size: 15px; text-align: right; }
.home-contents .page-link:hover { border-color: #777; }
.home-contents .page-link-gallery strong,
.home-contents .page-link-gallery .contents-arrow { color: #1d4ed8; }
.home-contents .page-link-gallery:hover { border-color: #1d4ed8; }

/* Gallery: a continuous, Instagram-style photo grid with no page breaks. */
#participation .section-heading { margin-bottom: 24px; }
.album-navigation { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 28px; }
.album-link {
  display: inline-flex; align-items: center; gap: 10px; min-height: 38px;
  padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; font: 10px/1.6 var(--mono); transition: background .18s, border-color .18s;
}
.album-link:hover, .album-link:focus-visible { border-color: var(--ink); background: #f6f6f4; }
.conference-album { padding-top: 24px; border-top: 1px solid #e7e7e3; }
.conference-album + .conference-album { margin-top: 48px; }
.conference-heading {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: start; gap: clamp(24px, 5vw, 72px); margin-bottom: 25px;
}
.conference-meta h2 { margin-top: 7px; font-size: clamp(25px, 3vw, 36px); font-weight: 500; line-height: 1.15; letter-spacing: -.045em; }
.conference-name { max-width: 54ch; margin-top: 9px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.conference-meta > .mono { margin-top: 9px; color: var(--muted); }
.conference-meta > .text-link { margin-top: 12px; padding-bottom: 2px; border-bottom: 1px solid var(--line); }
.conference-meta > .text-link:hover { border-color: var(--ink); }
.conference-summary { max-width: 50ch; justify-self: end; padding-top: 18px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.conference-summary > .mono { margin-top: 9px; }
.participation-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; align-items: start; }
.participation-photo { position: relative; min-width: 0; overflow: hidden; aspect-ratio: 1; background: #f2f2f2; }
.photo-open { position: absolute; inset: 0; display: block; width: 100%; height: 100%; aspect-ratio: auto; overflow: hidden; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.photo-open img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .24s ease, opacity .18s; }
.photo-open:hover img { transform: scale(1.035); opacity: 1; }
.participation-photo figcaption {
  position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 9px;
  padding: 13px; border: 0; background: linear-gradient(transparent 48%, rgba(0,0,0,.62));
  color: #fff; font: 10px/1.45 var(--mono); opacity: 0; pointer-events: none;
  transition: opacity .18s ease;
}
.participation-photo figcaption > .mono { flex: 0 0 auto; color: #fff; }
.participation-photo:hover figcaption,
.participation-photo:focus-within figcaption { opacity: 1; }

/* A short horizontal transition makes route changes feel like switching tabs. */
@view-transition { navigation: auto; }
::view-transition-group(root) { animation-duration: 240ms; animation-timing-function: cubic-bezier(.22, .61, .36, 1); }
::view-transition-old(root) { animation: portfolio-route-leave 180ms ease-in both; }
::view-transition-new(root) { animation: portfolio-route-enter 240ms cubic-bezier(.22, .61, .36, 1) both; }
@keyframes portfolio-route-leave { to { opacity: .45; transform: translateX(-14px); } }
@keyframes portfolio-route-enter { from { opacity: .45; transform: translateX(14px); } to { opacity: 1; transform: translateX(0); } }

.contact.wrap { display: block; position: relative; isolation: auto; min-height: 150px; padding-top: 32px; padding-bottom: 24px; border: 0; background: none; }
.contact.wrap::before { content: none; }
.contact-heading, .contact-email, .contact-bottom, .footer { grid-column: auto; grid-row: auto; }
.contact-bottom { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 29px; }
.social-links { flex-direction: row; align-items: center; gap: 24px; }
.footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 28px; padding-top: 15px; border-top: 1px solid #e8e8e3; }

@media (max-width: 1200px) {
  .nav { min-height: 76px; align-items: center; }
  .brand { align-self: auto; }
}
@media (max-width: 1000px) {
  .home-layout { grid-template-columns: minmax(0, 1fr); row-gap: 54px; }
  .home-about .about-layout { grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); }
  .conference-heading { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .conference-summary { max-width: 70ch; justify-self: start; padding-top: 0; }
  .participation-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .wrap { padding-inline: var(--gutter); }
  main.wrap { min-height: calc(100svh - 170px); padding-top: 28px; padding-bottom: 44px; }
  .home-layout { row-gap: 46px; }
  .home-about .about-layout { grid-template-columns: minmax(0, 1fr); }
  .home-about .profile-card { margin-bottom: 24px; padding-right: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .home-about .professional-summary { padding-top: 0; }
  .home-contents .page-link { grid-template-columns: 26px minmax(0, 1fr) 18px; gap: 10px; }
  .conference-heading { margin-bottom: 18px; }
  .conference-album { padding-top: 20px; }
  .conference-album + .conference-album { margin-top: 36px; }
  .participation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .contact.wrap { padding-top: 38px; }
  .contact-heading { font-size: 27px; }
  .contact-bottom { align-items: flex-start; flex-direction: column; gap: 22px; }
  .social-links { align-items: flex-start; flex-wrap: wrap; gap: 13px 20px; }
  .footer { flex-direction: column; gap: 8px; font-size: 8px; }
}
@media (hover: none) {
  .participation-photo figcaption { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  html { scroll-behavior: auto; }
}
