:root {
  --bg: #f4f7f6;
  --bg-raised: #ffffff;
  --bg-soft: #e8efed;
  --text: #14201f;
  --muted: #61706e;
  --line: #ccd8d5;
  --accent: #006c62;
  --accent-strong: #00564f;
  --accent-soft: #cce9e4;
  --warm: #d9764a;
  --header: rgba(244, 247, 246, 0.82);
  --shadow: 0 22px 60px rgba(18, 54, 50, 0.10);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shell: min(1180px, calc(100vw - 40px));
  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

html[data-theme="dark"] {
  --bg: #0f1716;
  --bg-raised: #172321;
  --bg-soft: #1d2d2a;
  --text: #edf5f3;
  --muted: #a6b6b3;
  --line: #30423e;
  --accent: #5cd5c5;
  --accent-strong: #8ae4d8;
  --accent-soft: #213f3b;
  --warm: #f0a27d;
  --header: rgba(15, 23, 22, 0.84);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
::selection { background: var(--accent-soft); color: var(--text); }

.shell { width: var(--shell); margin-inline: auto; }
.section-pad { padding-block: 116px; }
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 9999;
  transform: translateY(-150%); background: var(--text); color: var(--bg);
  padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--header); backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 8px 30px rgba(0,0,0,.05); }
.nav { height: 76px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 760; letter-spacing: -.02em; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 50%; background: var(--text); color: var(--bg); font-size: .78rem;
  letter-spacing: .04em;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links > a { font-size: .91rem; color: var(--muted); font-weight: 600; transition: color .2s ease; }
.nav-links > a:hover, .nav-links > a:focus-visible { color: var(--accent); }
.theme-toggle {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--bg-raised); color: var(--text); cursor: pointer; display: grid; place-items: center;
}
.theme-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
html[data-theme="light"] .moon-icon { display: none; }
html[data-theme="dark"] .sun-icon { display: none; }
.menu-toggle { display: none; background: transparent; border: 0; padding: 8px; cursor: pointer; }
.menu-toggle span { display: block; width: 23px; height: 2px; margin: 5px; background: var(--text); transition: .2s ease; }

.hero {
  min-height: calc(100vh - 76px); display: grid; grid-template-columns: 1.22fr .78fr;
  gap: 88px; align-items: center; position: relative; overflow: clip;
}
.hero-copy { position: relative; z-index: 2; }
.eyebrow, .section-kicker, .pub-type, .timeline-type {
  margin: 0 0 18px; color: var(--accent); font-size: .76rem; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase;
}
.hero h1 {
  margin: 0; max-width: 850px; font-family: var(--font-display); font-size: clamp(3.2rem, 7vw, 6.8rem);
  line-height: .98; letter-spacing: -.055em; font-weight: 500;
}
.hero h1 span { color: var(--accent); }
.hero-lede { max-width: 720px; margin: 32px 0 0; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.2rem); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 22px;
  border-radius: 999px; font-weight: 750; font-size: .92rem; transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button.primary { background: var(--accent); color: #fff; }
html[data-theme="dark"] .button.primary { color: #07110f; }
.button.primary:hover { background: var(--accent-strong); }
.button.secondary { border: 1px solid var(--line); background: var(--bg-raised); }
.button.secondary:hover { border-color: var(--accent); }
.hero-meta { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 28px; }
.hero-meta a, .text-link { color: var(--muted); font-size: .9rem; font-weight: 650; border-bottom: 1px solid transparent; }
.hero-meta a:hover, .text-link:hover { color: var(--accent); border-color: currentColor; }

.hero-visual { position: relative; min-height: 620px; display: grid; place-items: center; }
.portrait-frame {
  width: min(410px, 100%); aspect-ratio: .74; position: relative; z-index: 2;
  border-radius: 220px 220px var(--radius-xl) var(--radius-xl); overflow: hidden;
  background: var(--accent-soft); box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.55);
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.portrait-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,29,26,.58)); pointer-events: none; }
.portrait-caption { position: absolute; z-index: 2; left: 28px; right: 28px; bottom: 24px; color: #fff; display: flex; justify-content: space-between; font-size: .72rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.orbit { position: absolute; border: 1px solid var(--line); border-radius: 50%; }
.orbit-one { width: 510px; height: 510px; }
.orbit-two { width: 650px; height: 650px; opacity: .55; }
.dot { position: absolute; border-radius: 50%; background: var(--warm); z-index: 3; }
.dot-one { width: 18px; height: 18px; top: 17%; right: 5%; }
.dot-two { width: 10px; height: 10px; bottom: 12%; left: 2%; background: var(--accent); }

.statement { background: var(--text); color: var(--bg); padding-block: 86px; }
.statement-grid { display: grid; grid-template-columns: 1fr 3fr; gap: 40px; align-items: start; }
.statement .section-kicker { color: var(--warm); }
.statement blockquote { margin: 0; font-family: var(--font-display); font-size: clamp(2rem, 4.6vw, 4.5rem); line-height: 1.12; letter-spacing: -.035em; }

.section-heading { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(240px, .55fr); gap: 80px; align-items: end; margin-bottom: 56px; }
.section-heading h2 { margin: 0; max-width: 800px; font-family: var(--font-display); font-size: clamp(2.6rem, 5vw, 5rem); line-height: 1.05; letter-spacing: -.045em; font-weight: 500; }
.section-heading > p { margin: 0 0 10px; color: var(--muted); }

.research-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.research-card {
  position: relative; min-height: 390px; padding: 34px; border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--bg-raised); overflow: hidden; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.research-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: transparent; }
.research-card.feature-card { background: var(--accent); color: #fff; border-color: transparent; }
html[data-theme="dark"] .research-card.feature-card { color: #07110f; }
.card-index { position: absolute; right: 30px; top: 24px; font-family: var(--font-display); font-size: 4rem; opacity: .12; }
.research-icon { width: 72px; height: 72px; border-radius: 20px; background: var(--accent-soft); display: grid; place-items: center; color: var(--accent); }
.feature-card .research-icon { background: rgba(255,255,255,.16); color: #fff; }
html[data-theme="dark"] .feature-card .research-icon { color: #07110f; background: rgba(7,17,15,.13); }
.research-icon svg { width: 48px; height: 48px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.research-card h3 { margin: 54px 0 12px; font-size: 1.55rem; letter-spacing: -.025em; }
.research-card p { max-width: 520px; margin: 0; color: var(--muted); }
.feature-card p { color: rgba(255,255,255,.78); }
html[data-theme="dark"] .feature-card p { color: rgba(7,17,15,.72); }
.research-card ul { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; margin: 28px 0 0; padding: 0; }
.research-card li { border: 1px solid var(--line); border-radius: 999px; padding: 6px 11px; font-size: .75rem; font-weight: 700; color: var(--muted); }
.feature-card li { border-color: rgba(255,255,255,.32); color: #fff; }
html[data-theme="dark"] .feature-card li { border-color: rgba(7,17,15,.24); color: #07110f; }

.publication-section { background: var(--bg-soft); }
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.filter { border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); padding: 8px 14px; cursor: pointer; font-size: .83rem; font-weight: 750; }
.filter.active, .filter:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.publication-list { border-top: 1px solid var(--line); }
.publication {
  display: grid; grid-template-columns: 90px 1fr 56px; gap: 22px; align-items: center;
  padding: 30px 4px; border-bottom: 1px solid var(--line); transition: opacity .25s ease, transform .25s ease;
}
.publication[hidden] { display: none; }
.pub-year { font-family: var(--font-display); font-size: 1.75rem; color: var(--accent); }
.pub-content h3 { margin: 2px 0 8px; font-size: clamp(1.1rem, 2vw, 1.45rem); line-height: 1.35; letter-spacing: -.02em; }
.pub-content p:last-child { margin: 0; color: var(--muted); font-size: .9rem; }
.pub-type { margin-bottom: 3px; }
.pub-link { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); font-size: 1.3rem; transition: .2s ease; }
.pub-link:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: rotate(45deg); }
html[data-theme="dark"] .pub-link:hover { color: #07110f; }

.timeline { max-width: 950px; margin-left: auto; }
.timeline-item { display: grid; grid-template-columns: 170px 24px 1fr; gap: 28px; min-height: 160px; }
.timeline-date { color: var(--muted); font-weight: 700; padding-top: 4px; }
.timeline-dot { position: relative; }
.timeline-dot::before { content: ""; position: absolute; top: 8px; left: 50%; width: 11px; height: 11px; transform: translateX(-50%); border-radius: 50%; background: var(--accent); }
.timeline-dot::after { content: ""; position: absolute; top: 25px; bottom: 0; left: 50%; width: 1px; transform: translateX(-50%); background: var(--line); }
.timeline-item:last-child .timeline-dot::after { display: none; }
.timeline-content { padding-bottom: 44px; }
.timeline-content h3 { margin: 0 0 5px; font-size: 1.4rem; letter-spacing: -.02em; }
.timeline-content p:last-child { color: var(--muted); margin: 0; }
.timeline-type { margin-bottom: 6px; }

.awards-section { background: var(--text); color: var(--bg); }
.awards-section .section-kicker { color: var(--warm); }
.awards-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.award-card { min-height: 250px; padding: 28px; border-radius: var(--radius-lg); border: 1px solid rgba(255,255,255,.14); display: flex; flex-direction: column; }
html[data-theme="dark"] .award-card { border-color: rgba(0,0,0,.24); }
.award-card span { color: var(--warm); font-weight: 800; }
.award-card h3 { margin: auto 0 12px; font-size: 1.25rem; line-height: 1.3; }
.award-card p { margin: 0; opacity: .7; font-size: .88rem; }

.contact-section { background: var(--accent-soft); }
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 90px; align-items: start; }
.contact-grid h2 { margin: 0; font-family: var(--font-display); font-size: clamp(2.8rem, 5.5vw, 5.7rem); line-height: 1.02; letter-spacing: -.05em; font-weight: 500; }
.contact-panel { background: var(--bg-raised); padding: 34px; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.contact-panel > p { color: var(--muted); margin: 0 0 26px; }
.contact-details { display: grid; gap: 3px; margin-top: 22px; color: var(--muted); font-size: .86rem; }

.footer { padding-block: 28px; border-top: 1px solid var(--line); }
.footer-inner { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 20px; color: var(--muted); font-size: .82rem; }
.footer-inner p { margin: 0; }
.footer-inner p:nth-child(2) { text-align: center; }
.footer-inner a { text-align: right; color: var(--text); font-weight: 700; }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 980px) {
  .section-pad { padding-block: 88px; }
  .menu-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 68px; left: 20px; right: 20px; padding: 20px;
    background: var(--bg-raised); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
    flex-direction: column; align-items: stretch; gap: 6px;
  }
  .nav-links.open { display: flex; }
  .nav-links > a { padding: 10px 4px; }
  .theme-toggle { margin-top: 8px; }
  .hero { grid-template-columns: 1fr; gap: 52px; min-height: auto; padding-top: 70px; }
  .hero-visual { min-height: 540px; }
  .portrait-frame { width: min(390px, 84vw); }
  .orbit-one { width: 460px; height: 460px; }
  .orbit-two { width: 560px; height: 560px; }
  .statement-grid { grid-template-columns: 1fr; }
  .section-heading { grid-template-columns: 1fr; gap: 24px; }
  .research-grid { grid-template-columns: 1fr; }
  .awards-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .contact-grid { grid-template-columns: 1fr; gap: 42px; }
}

@media (max-width: 640px) {
  :root { --shell: min(100% - 28px, 1180px); }
  .brand-name { display: none; }
  .section-pad { padding-block: 72px; }
  .hero { padding-top: 48px; }
  .hero h1 { font-size: clamp(3rem, 15vw, 4.6rem); }
  .hero-visual { min-height: 430px; }
  .portrait-frame { width: min(310px, 82vw); }
  .orbit-one { width: 350px; height: 350px; }
  .orbit-two { width: 430px; height: 430px; }
  .portrait-caption { left: 20px; right: 20px; bottom: 18px; flex-direction: column; gap: 3px; }
  .statement { padding-block: 68px; }
  .research-card { padding: 26px; min-height: 360px; }
  .publication { grid-template-columns: 62px 1fr 42px; gap: 12px; }
  .pub-year { font-size: 1.35rem; }
  .pub-link { width: 38px; height: 38px; }
  .timeline-item { grid-template-columns: 1fr; gap: 6px; min-height: 0; padding-left: 26px; border-left: 1px solid var(--line); margin-left: 6px; }
  .timeline-dot { display: none; }
  .timeline-date { color: var(--accent); }
  .timeline-content { padding-bottom: 46px; }
  .awards-grid { grid-template-columns: 1fr; }
  .award-card { min-height: 210px; }
  .contact-panel { padding: 26px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-inner p:nth-child(2), .footer-inner a { text-align: left; }
}

/* Updated CV-based sections */
.experience-section { background: var(--bg-raised); }
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.project-card {
  min-height: 320px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.project-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: transparent; }
.project-feature { background: var(--accent); color: #fff; border-color: transparent; }
html[data-theme="dark"] .project-feature { color: #07110f; }
.project-meta { display: flex; justify-content: space-between; gap: 16px; color: var(--accent); font-size: .76rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.project-feature .project-meta { color: rgba(255,255,255,.84); }
html[data-theme="dark"] .project-feature .project-meta { color: rgba(7,17,15,.72); }
.project-card h3 { margin: 62px 0 14px; font-size: clamp(1.45rem, 2.4vw, 2rem); line-height: 1.2; letter-spacing: -.03em; }
.project-card p { margin: 0; color: var(--muted); }
.project-feature p { color: rgba(255,255,255,.8); }
html[data-theme="dark"] .project-feature p { color: rgba(7,17,15,.72); }
.project-role { margin-top: auto; padding-top: 34px; color: var(--muted); font-size: .82rem; font-weight: 750; }
.project-feature .project-role { color: #fff; }
html[data-theme="dark"] .project-feature .project-role { color: #07110f; }

.teaching-section { background: var(--bg-soft); }
.teaching-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.info-panel { padding: 34px; border-radius: var(--radius-lg); background: var(--bg-raised); border: 1px solid var(--line); }
.panel-kicker { margin: 0 0 10px; color: var(--accent); font-size: .76rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.info-panel h3 { margin: 0 0 24px; font-size: 1.6rem; letter-spacing: -.025em; }
.info-panel ul { margin: 0; padding-left: 20px; color: var(--muted); }
.info-panel li + li { margin-top: 10px; }

.awards-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.patent-section { background: var(--bg-raised); }
.compact-heading { margin-bottom: 38px; }
.patent-list { border-top: 1px solid var(--line); }
.patent-item { display: grid; grid-template-columns: minmax(190px, .36fr) 1fr; gap: 34px; padding: 28px 4px; border-bottom: 1px solid var(--line); align-items: baseline; }
.patent-item span { color: var(--accent); font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.patent-item h3 { margin: 0; font-size: clamp(1.1rem, 2vw, 1.42rem); line-height: 1.38; letter-spacing: -.02em; }
.contact-details a { margin-top: 5px; color: var(--accent); font-weight: 700; }

@media (max-width: 980px) {
  .project-grid, .teaching-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .project-card { min-height: 290px; padding: 26px; }
  .project-card h3 { margin-top: 44px; }
  .info-panel { padding: 26px; }
  .patent-item { grid-template-columns: 1fr; gap: 10px; }
}
