:root {
  --navy-950: #07182d;
  --navy-900: #0a2342;
  --navy-800: #123966;
  --navy-700: #1b4f86;
  --gold-500: #ed9b32;
  --gold-400: #f4b556;
  --ink: #122033;
  --muted: #5d6b7c;
  --line: #dce3ea;
  --paper: #ffffff;
  --warm: #fbf8f2;
  --mist: #f2f6f9;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --shadow: 0 18px 45px rgba(10, 35, 66, .09);
  --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.nav-open { overflow: hidden; }
main { display: flex; flex-direction: column; }
#about { order: 1; }
#projects { order: 2; }
#people { order: 3; }
#courses { order: 4; }
#publications { order: 5; }
#open_positions { order: 6; }
#contact { order: 7; }
img { display: block; max-width: 100%; }
a { color: var(--navy-700); text-decoration: none; }
a:hover { color: var(--navy-900); }
button, input, textarea { font: inherit; }
h1, h2, h3, h4, h5, h6, p { margin-top: 0; }
h1, h2, h3, h4, h5, h6 { line-height: 1.14; letter-spacing: -.025em; }
p { color: var(--muted); }
address { font-style: normal; }

.container { width: min(calc(100% - 40px), var(--container)); margin-inline: auto; }
.section { padding: 104px 0; position: relative; }
.section-heading { max-width: 720px; margin-bottom: 48px; }
.section-heading h2, .positions-panel h2, .contact-section h2 {
  margin-bottom: 18px;
  color: var(--navy-950);
  font-size: clamp(2.1rem, 3.8vw, 3.2rem);
  font-weight: 720;
}
.section-heading > p:last-child { margin-bottom: 0; font-size: 1.08rem; }
.split-heading { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr); gap: 56px; max-width: none; align-items: end; }
.split-heading > p { margin-bottom: 5px; }
.eyebrow {
  margin-bottom: 17px;
  color: var(--gold-500) !important;
  font-size: .75rem !important;
  font-weight: 780;
  letter-spacing: .15em;
  line-height: 1.3;
  text-transform: uppercase;
}
.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; z-index: 1000; top: 12px; left: 12px; padding: 10px 16px; color: white; background: var(--navy-950); border-radius: 6px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid var(--gold-400); outline-offset: 3px; }

/* Navigation */
.site-nav { position: fixed; z-index: 100; inset: 0 0 auto; height: 76px; color: white; border-bottom: 1px solid rgba(255,255,255,.14); transition: background .25s, box-shadow .25s; }
.site-nav.scrolled { background: rgba(7,24,45,.96); box-shadow: 0 8px 30px rgba(4,18,34,.18); backdrop-filter: blur(16px); }
.nav-shell { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.nav-brand { display: flex; align-items: center; gap: 12px; color: white; }
.nav-brand:hover { color: white; }
.nav-brand img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.75); }
.nav-brand span { display: flex; flex-direction: column; line-height: 1.15; }
.nav-brand strong { font-size: 1.05rem; letter-spacing: .08em; }
.nav-brand small { margin-top: 4px; color: rgba(255,255,255,.66); font-size: .68rem; }
.nav-menu { display: flex; align-items: center; gap: 28px; }
.nav-link { position: relative; padding: 9px 0; color: rgba(255,255,255,.8); font-size: .84rem; font-weight: 650; }
.nav-link:hover, .nav-link.active { color: white; }
.nav-link::after { content: ""; position: absolute; inset: auto 0 1px; height: 2px; background: var(--gold-500); transform: scaleX(0); transform-origin: left; transition: transform .2s; }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.nav-contact { padding: 9px 17px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; }
.nav-contact::after { display: none; }
.nav-toggle { display: none; width: 44px; height: 44px; padding: 10px; color: white; background: transparent; border: 1px solid rgba(255,255,255,.35); border-radius: 9px; }
.nav-toggle > span:not(.sr-only) { display: block; width: 100%; height: 2px; margin: 4px 0; background: currentColor; transition: transform .2s, opacity .2s; }

/* Hero */
.hero { min-height: 780px; height: 94vh; display: grid; align-items: center; position: relative; overflow: hidden; color: white; background: var(--navy-950); isolation: isolate; }
.hero::before { content: ""; position: absolute; z-index: -2; inset: 0; background: linear-gradient(90deg, rgba(4,19,37,.97) 0%, rgba(7,29,54,.87) 49%, rgba(7,24,45,.62) 100%), url("../imgs/mll_back.jpg") center 44% / cover no-repeat; transform: scale(1.01); }
.hero::after { content: ""; position: absolute; z-index: -1; width: 600px; height: 600px; right: -150px; bottom: -280px; border: 1px solid rgba(237,155,50,.28); border-radius: 50%; box-shadow: 0 0 0 90px rgba(237,155,50,.035), 0 0 0 190px rgba(237,155,50,.025); }
.hero-pattern { position: absolute; z-index: -1; inset: 0; opacity: .2; background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); background-size: 64px 64px; mask-image: linear-gradient(to right, transparent 28%, black); }
.hero-content { padding-top: 90px; }
.hero-content .eyebrow { color: var(--gold-400) !important; }
.hero h1 { max-width: 920px; margin-bottom: 28px; font-size: clamp(3.8rem, 8.2vw, 7rem); font-weight: 760; letter-spacing: -.06em; line-height: .91; }
.hero h1 span { color: var(--gold-400); }
.hero-lead { max-width: 750px; margin-bottom: 38px; color: rgba(255,255,255,.78); font-size: clamp(1.1rem, 2vw, 1.35rem); line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 13px 23px; border: 1px solid transparent; border-radius: 999px; font-size: .9rem; font-weight: 730; transition: transform .2s, color .2s, background .2s, border-color .2s; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: var(--navy-950); background: var(--gold-400); }
.button-primary:hover { color: var(--navy-950); background: #ffc569; }
.button-secondary { color: white; border-color: rgba(255,255,255,.42); background: rgba(255,255,255,.05); }
.button-secondary:hover { color: white; background: rgba(255,255,255,.12); }
.button-light { color: var(--navy-950); background: white; }
.button-light:hover { color: var(--navy-950); background: var(--warm); }
.hero-topics { display: flex; flex-wrap: wrap; gap: 9px; margin: 48px 0 0; padding: 0; list-style: none; }
.hero-topics li { padding: 7px 13px; color: rgba(255,255,255,.73); border: 1px solid rgba(255,255,255,.17); border-radius: 999px; font-size: .75rem; }

/* About */
.intro-section { overflow: hidden; background: var(--paper); }
.focus-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow); }
.focus-card { min-height: 270px; padding: 34px 30px; background: white; border-right: 1px solid var(--line); }
.focus-card:last-child { border-right: 0; }
.focus-card > span { display: block; margin-bottom: 44px; color: var(--gold-500); font-size: .72rem; font-weight: 800; letter-spacing: .12em; }
.focus-card h3 { margin-bottom: 14px; color: var(--navy-900); font-size: 1.28rem; }
.focus-card p { margin-bottom: 0; font-size: .94rem; }

/* People, including legacy content markup */
.people-section { background: var(--mist); }
.people-section .section-heading { margin-bottom: 54px; }
.group-title, .people-section h3[data-toggle="collapse"] { margin: 44px 0 18px !important; color: var(--navy-900); font-size: 1.1rem; font-weight: 760; letter-spacing: .01em; }
.people-section h3[data-toggle="collapse"] { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 18px 22px; cursor: pointer !important; background: white; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.people-section h3[data-toggle="collapse"]:hover { border-color: #bac8d6; }
.collapse-icon::before { content: "+"; display: grid; place-items: center; width: 26px; height: 26px; color: var(--navy-800); background: var(--mist); border-radius: 50%; font-style: normal; transition: transform .2s; }
[aria-expanded="true"] .collapse-icon::before { content: "−"; transform: rotate(180deg); }
.collapse { display: block; }
.js .people-section .collapse { display: none; }
.js .people-section .collapse.show { display: block; animation: reveal .25s ease-out; }
@keyframes reveal { from { opacity: 0; transform: translateY(-5px); } }
.row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.people-section .row > [class*="col-"] { min-width: 0; }
.people-section .card { height: 100%; min-height: 178px; padding: 24px; background: white; border: 1px solid var(--line); border-radius: var(--radius-sm); transition: transform .2s, box-shadow .2s, border-color .2s; }
.people-section .card:hover { transform: translateY(-3px); border-color: #bdc9d5; box-shadow: 0 13px 35px rgba(10,35,66,.08); }
.people-section .card-header { display: flex; gap: 15px; align-items: center; }
.member-avatar { flex: 0 0 48px; width: 48px; height: 48px; display: grid; place-items: center; color: white; background: linear-gradient(145deg, var(--navy-800), var(--navy-950)); border-radius: 13px; font-size: .83rem; font-weight: 800; letter-spacing: .05em; }
.people-section .card-header h4 { margin: 0; color: var(--navy-950); font-size: 1rem; line-height: 1.35; }
.people-section .member-project { max-width: 240px; margin: 7px 0 0; color: var(--muted); font-size: .76rem; line-height: 1.4; }
.people-section .card-body { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; }
.people-section .card-body:empty::after { content: "Profile details coming soon"; color: #8591a0; font-size: .78rem; }
.people-section .card-body a { margin: 0 !important; padding: 5px 9px; color: var(--navy-700); background: var(--mist); border-radius: 999px; font-size: .72rem; font-weight: 680; }
.people-section .card-body a:hover { color: white; background: var(--navy-800); }
.people-section .card-body a::before, .contact-links a::before {
  content: "";
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 6px;
  vertical-align: -2px;
  background: currentColor;
  mask: var(--service-icon) center / contain no-repeat;
  -webkit-mask: var(--service-icon) center / contain no-repeat;
}
.people-section a[title="Email"] { --service-icon: url("../icons/email.svg"); }
.people-section a[title="Scholar"], .people-section a[title="Google Scholar"] { --service-icon: url("../icons/scholar.svg"); }
.people-section a[title="GitHub"] { --service-icon: url("../icons/github.svg"); }
.people-section a[title="LinkedIn"] { --service-icon: url("../icons/linkedin.svg"); }
.people-section .card-body a::after { content: attr(title); }
.people-section .card-body i { display: none; }
.people-section .mt-2 { margin: 0; }
.people-section .mt-5 { margin-top: 44px !important; }
.people-section .mb-3 { margin-bottom: 18px !important; }

/* Research */
.research-section { color: white; background: var(--navy-950); overflow: hidden; }
.research-section::before { content: ""; position: absolute; width: 560px; height: 560px; top: -300px; right: -180px; border: 1px solid rgba(237,155,50,.18); border-radius: 50%; box-shadow: 0 0 0 100px rgba(237,155,50,.025); }
.research-section .section-heading h2 { color: white; }
.research-section .section-heading > p { color: rgba(255,255,255,.62); }
.research-grid { position: relative; border-top: 1px solid rgba(255,255,255,.16); }
.research-card { border-bottom: 1px solid rgba(255,255,255,.16); }
.research-card summary { display: grid; grid-template-columns: 70px 1fr; gap: 18px; align-items: start; padding: 30px 50px 30px 0; cursor: pointer; list-style: none; position: relative; }
.research-card summary::-webkit-details-marker { display: none; }
.research-card summary::after { content: "+"; position: absolute; right: 8px; top: 30px; width: 30px; height: 30px; display: grid; place-items: center; color: var(--gold-400); border: 1px solid rgba(255,255,255,.25); border-radius: 50%; }
.research-card[open] summary::after { content: "−"; }
.research-number { padding-top: 5px; color: var(--gold-400); font-size: .73rem; font-weight: 800; letter-spacing: .12em; }
.research-card summary strong { display: block; color: white; font-size: clamp(1.15rem, 1.8vw, 1.75rem); line-height: 1.25; }
.research-card summary small { display: block; margin-top: 8px; color: rgba(255,255,255,.62); font-size: 1rem; line-height: 1.5; }
.research-body { padding: 0 70px 30px; max-width: 930px; }
.research-body h3 { margin: 22px 0 7px; color: var(--gold-400); font-size: .88rem; letter-spacing: .02em; }
.research-body p { margin: 0; color: rgba(255,255,255,.69); }
.research-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 0 36px; max-width: none; }

/* Courses */
.courses-section { background: var(--warm); }
.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.course-card { min-height: 220px; display: flex; flex-direction: column; padding: 28px; background: white; border: 1px solid #e8e1d6; border-radius: var(--radius-sm); transition: transform .2s, box-shadow .2s; }
.course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.course-card > span { color: var(--gold-500); font-size: .74rem; font-weight: 780; letter-spacing: .09em; text-transform: uppercase; }
.course-card h3 { margin: 28px 0 34px; color: var(--navy-950); font-size: 1.35rem; }
.course-card a, .course-card p { margin: auto 0 0; font-size: .82rem; font-weight: 700; }
.course-card p { color: #89919a; font-weight: 550; }

/* Publications, positions, contact */
.publication-section { padding: 0; background: var(--warm); }
.publication-panel { min-height: 360px; display: flex; align-items: center; justify-content: space-between; gap: 60px; padding: 64px; color: white; background: linear-gradient(130deg, var(--navy-800), var(--navy-950)); border-radius: var(--radius-lg); }
.publication-panel h2 { margin-bottom: 18px; color: white; font-size: clamp(2.1rem, 3.8vw, 3.2rem); }
.publication-panel p:not(.eyebrow) { max-width: 660px; margin: 0; color: rgba(255,255,255,.65); }
.publication-panel .button { flex: 0 0 auto; }
.positions-section { padding-top: 128px; background: var(--warm); }
.positions-panel { display: grid; grid-template-columns: .55fr 1.5fr auto; gap: 46px; align-items: center; padding-bottom: 104px; border-bottom: 1px solid #dfd8cd; }
.positions-panel .eyebrow { margin: 0; }
.positions-panel h2 { margin-bottom: 12px; font-size: clamp(1.9rem, 3.6vw, 3rem); }
.positions-panel p { margin: 0; }
.contact-section { color: white; background: var(--navy-950); }
.contact-section .eyebrow { color: var(--gold-400) !important; }
.contact-section h2 { color: white; font-size: clamp(2.4rem, 4.5vw, 4.1rem); }
.contact-grid { display: grid; grid-template-columns: 1.4fr .6fr; gap: 110px; align-items: end; }
.contact-grid > div > p:not(.eyebrow) { max-width: 700px; color: rgba(255,255,255,.62); }
.contact-email { display: inline-flex; gap: 18px; align-items: center; margin-top: 24px; color: var(--gold-400); font-size: clamp(1.15rem, 3vw, 1.8rem); font-weight: 720; border-bottom: 1px solid rgba(244,181,86,.4); }
.contact-email::before { content: ""; flex: 0 0 auto; width: .9em; height: .9em; background: currentColor; mask: url("../icons/email.svg") center / contain no-repeat; -webkit-mask: url("../icons/email.svg") center / contain no-repeat; }
.contact-email:hover { color: white; }
.contact-grid address { display: flex; flex-direction: column; padding: 28px; color: white; border: 1px solid rgba(255,255,255,.15); border-radius: var(--radius-md); }
.contact-grid address strong { margin-bottom: 10px; }
.contact-grid address > span { color: rgba(255,255,255,.57); font-size: .9rem; }
.contact-links { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.13); }
.contact-links a { color: var(--gold-400); font-size: .8rem; font-weight: 700; }
.contact-links a[href*="github.com"] { --service-icon: url("../icons/github.svg"); }
.contact-links a[href*="youtube.com"] { --service-icon: url("../icons/youtube.svg"); }
.contact-links a[href*="t.me"] { --service-icon: url("../icons/telegram.svg"); }

/* Footer */
.site-footer { padding: 28px 0; background: #041323; border-top: 1px solid rgba(255,255,255,.08); }
.footer-shell { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-brand { display: flex; align-items: center; gap: 11px; color: white; }
.footer-brand:hover { color: white; }
.footer-brand img { border-radius: 50%; }
.footer-brand span { display: flex; flex-direction: column; line-height: 1.25; }
.footer-brand strong { font-size: .82rem; }
.footer-brand small { color: rgba(255,255,255,.42); font-size: .65rem; }
.site-footer p { margin: 0; color: rgba(255,255,255,.42); font-size: .75rem; }

@media (max-width: 980px) {
  .section { padding: 84px 0; }
  .split-heading { grid-template-columns: 1fr; gap: 14px; }
  .focus-grid { grid-template-columns: 1fr 1fr; }
  .focus-card:nth-child(2) { border-right: 0; }
  .focus-card:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .row, .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .positions-panel { grid-template-columns: 1fr; gap: 22px; }
  .positions-panel .button { justify-self: start; }
  .contact-grid { grid-template-columns: 1fr; gap: 54px; }
}

@media (max-width: 780px) {
  .container { width: min(calc(100% - 28px), var(--container)); }
  .site-nav { height: 68px; background: rgba(7,24,45,.96); }
  .nav-brand img { width: 43px; height: 43px; }
  .js .nav-toggle { display: block; }
  .nav-toggle[aria-expanded="true"] > span:nth-of-type(2) { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] > span:nth-of-type(3) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] > span:nth-of-type(4) { transform: translateY(-6px) rotate(-45deg); }
  .nav-menu { position: fixed; inset: 68px 0 0; display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 24px 20px; background: var(--navy-950); }
  .js .nav-menu { visibility: hidden; opacity: 0; transform: translateY(-10px); transition: opacity .2s, transform .2s, visibility .2s; }
  .js .nav-menu.open { visibility: visible; opacity: 1; transform: translateY(0); }
  .nav-link { padding: 15px 6px; font-size: 1.05rem; border-bottom: 1px solid rgba(255,255,255,.1); }
  .nav-link::after { display: none; }
  .nav-contact { margin-top: 16px; text-align: center; border: 1px solid rgba(255,255,255,.3); }
  .hero { min-height: 720px; height: auto; }
  .hero-content { padding-top: 130px; padding-bottom: 75px; }
  .hero h1 { font-size: clamp(3.55rem, 18vw, 5.5rem); }
  .hero::before { background-position: 60% center; }
  .publication-panel { min-height: 420px; flex-direction: column; align-items: flex-start; justify-content: center; padding: 42px 30px; }
  .publication-panel .button { flex: none; }
  .research-card summary { grid-template-columns: 42px 1fr; padding-right: 42px; }
  .research-body { padding-left: 60px; padding-right: 5px; }
  .research-columns { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .section { padding: 72px 0; }
  .section-heading { margin-bottom: 34px; }
  .section-heading h2 { font-size: 2.3rem; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-actions .button { width: 100%; }
  .hero-topics { margin-top: 38px; }
  .focus-grid, .row, .course-grid { grid-template-columns: 1fr; }
  .focus-card { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .focus-card:last-child { border-bottom: 0; }
  .focus-card > span { margin-bottom: 24px; }
  .people-section .card { min-height: 160px; }
  .research-card summary { grid-template-columns: 1fr; gap: 6px; }
  .research-body { padding-left: 0; }
  .publication-section { padding-inline: 8px; }
  .publication-panel { border-radius: var(--radius-md); }
  .contact-email { font-size: 1rem; }
  .footer-shell { align-items: flex-start; flex-direction: column; }
}

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