:root {
  color-scheme: light;
  --ink: #13202b;
  --muted: #5f6f7c;
  --text-secondary: #344854;
  --nav-link: #40515e;
  --line: #dce4ea;
  --line-soft: #eef2f5;
  --soft: #f5f8fa;
  --paper: #ffffff;
  --surface: #ffffff;
  --accent: #123b5d;
  --accent-2: #245d86;
  --accent-soft: #eaf1f6;
  --warm: #b46a2a;
  --header-bg: rgba(255,255,255,.92);
  --hero-start: #f8fbfd;
  --hero-end: #ffffff;
  --hover-border: #afc2cf;
  --branch-line: #c2d0da;
  --button-hover: #0d2e49;
  --shadow: 0 18px 55px rgba(25, 45, 60, .09);
  --hover-shadow: 0 16px 40px rgba(28,51,68,.08);
  --small-shadow: 0 8px 20px rgba(20,50,70,.07);
  --footer-bg: #102838;
  --footer-ink: #d7e1e8;
  --footer-muted: #b5c4ce;
  --footer-link: #dceaf3;
  --footer-faint: #91a6b5;
  --radius: 18px;
  --container: 1120px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #edf3f7;
  --muted: #a9bac6;
  --text-secondary: #c1ced7;
  --nav-link: #c0ced7;
  --line: #334550;
  --line-soft: #263640;
  --soft: #17242d;
  --paper: #0f171d;
  --surface: #151f27;
  --accent: #8cc6eb;
  --accent-2: #9bd1f2;
  --accent-soft: #1a3445;
  --warm: #e0a265;
  --header-bg: rgba(15,23,29,.93);
  --hero-start: #14212a;
  --hero-end: #0f171d;
  --hover-border: #557080;
  --branch-line: #48606d;
  --button-hover: #a9d9f6;
  --shadow: 0 18px 55px rgba(0,0,0,.28);
  --hover-shadow: 0 16px 40px rgba(0,0,0,.25);
  --small-shadow: 0 8px 20px rgba(0,0,0,.18);
  --footer-bg: #091117;
  --footer-ink: #dce7ed;
  --footer-muted: #a8bac4;
  --footer-link: #dff1fb;
  --footer-faint: #8198a5;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color .18s ease, color .18s ease;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { color: var(--accent); }
button, input, textarea, select { font: inherit; }
address { font-style: normal; }

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 3px;
}

.container { width: min(var(--container), calc(100% - 40px)); margin-inline: auto; }
.narrow-container { max-width: 900px; }
.section-pad { padding: 82px 0; }
.section-soft { background: var(--soft); border-block: 1px solid var(--line-soft); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.nav-wrap { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 26px; }
.brand { display: inline-flex; align-items: center; color: var(--ink); font-weight: 700; letter-spacing: -.02em; }
.brand:hover { color: var(--ink); }
.brand-name { white-space: nowrap; }
.nav-actions { display: flex; align-items: center; gap: 6px; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { color: var(--nav-link); font-size: .94rem; font-weight: 600; padding: 10px 10px; border-radius: 9px; }
.site-nav a:hover, .site-nav a.active { color: var(--accent); background: var(--accent-soft); }
.nav-toggle, .theme-toggle {
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  cursor: pointer;
}
.theme-toggle { font-size: 1.05rem; }
.theme-toggle:hover, .nav-toggle:hover { background: var(--accent-soft); color: var(--accent); }
.nav-toggle { display: none; font-size: 1.65rem; }

.hero { padding-top: 94px; padding-bottom: 92px; }
.hero-grid { display: grid; grid-template-columns: 290px minmax(0,1fr); gap: 66px; align-items: center; }
.hero-photo-wrap { position: relative; }
.hero-photo-wrap::before {
  content: ""; position: absolute; width: 78%; height: 78%; border-radius: 30px;
  background: var(--accent-soft); right: -18px; bottom: -18px; z-index: -1;
}
.hero-photo { width: 290px; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%; border-radius: 26px; box-shadow: var(--shadow); }
.eyebrow { color: var(--warm); text-transform: uppercase; letter-spacing: .13em; font-size: .76rem; font-weight: 800; margin-bottom: 9px; }
.hero h1 { margin: 0; font-size: clamp(2.45rem, 5vw, 4.2rem); line-height: .98; letter-spacing: -.055em; max-width: 820px; }
.hero-role { margin: 18px 0 2px; font-size: 1.28rem; font-weight: 700; color: var(--accent); }
.hero-affiliation { margin: 0 0 23px; color: var(--muted); }
.hero-affiliation a { color: inherit; border-bottom: 1px solid transparent; }
.hero-affiliation a:hover { color: var(--accent); border-bottom-color: var(--hover-border); }
.hero-bio { font-size: 1.07rem; max-width: 790px; margin: 0; color: var(--text-secondary); }
.topic-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 25px 0 23px; }
.topic-pills span { padding: 7px 11px; background: var(--soft); border: 1px solid var(--line); border-radius: 999px; font-size: .82rem; font-weight: 650; color: var(--text-secondary); }
.social-links { display: flex; flex-wrap: wrap; gap: 9px; }
.social-link { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; background: var(--surface); font-size: .88rem; font-weight: 650; transition: .18s ease; }
.social-link:hover { border-color: var(--hover-border); transform: translateY(-1px); box-shadow: var(--small-shadow); }

.section-heading { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 32px; }
.section-heading h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.25rem); line-height: 1.12; letter-spacing: -.035em; }
.section-heading p { margin: 7px 0 0; color: var(--muted); }
.section-icon, .page-icon { width: 43px; height: 43px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 auto; background: var(--accent-soft); color: var(--accent); font-size: 1.24rem; }

.card-grid { display: grid; gap: 18px; }
.card-grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.card-grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.info-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 27px; }
.info-card h3, .info-card h2 { margin: 17px 0 8px; font-size: 1.15rem; line-height: 1.25; letter-spacing: -.015em; }
.info-card p { margin: 0; color: var(--muted); }
.card-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent); color: var(--paper); font-size: 1.15rem; }
html[data-theme="dark"] .card-icon { color: #0f171d; }
.research-card { transition: .2s ease; }
.research-card:hover { transform: translateY(-3px); box-shadow: var(--hover-shadow); border-color: var(--hover-border); }
.section-actions { margin-top: 26px; }
.text-link { display: inline-flex; align-items: center; gap: 7px; font-weight: 750; color: var(--accent); }
.text-link.small { font-size: .88rem; }
.compact-link { margin-top: 14px; font-size: .82rem; }

.timeline { position: relative; }
.timeline-item { display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 24px; padding: 22px 0; border-top: 1px solid var(--line); }
.timeline-item:first-child { border-top: 0; padding-top: 0; }
.timeline-date { color: var(--warm); font-size: .8rem; font-weight: 800; letter-spacing: .02em; }
.timeline-content h3 { margin: 0 0 4px; font-size: 1.06rem; line-height: 1.35; }
.timeline-content h3 a { color: var(--ink); }
.timeline-content h3 a:hover { color: var(--accent); }
.timeline-content p { margin: 0; color: var(--muted); }
.institution { color: var(--accent); font-weight: 650; font-size: .92rem; margin: 2px 0 5px; }

.project-stack { display: grid; gap: 16px; max-width: 920px; }
.project-stack.large { max-width: 980px; }
.project-card { position: relative; display: grid; grid-template-columns: 60px minmax(0,1fr); gap: 22px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.project-child { margin-left: 68px; }
.project-child::before { content: ""; position: absolute; left: -35px; top: -18px; width: 35px; height: 56px; border-left: 2px solid var(--branch-line); border-bottom: 2px solid var(--branch-line); border-bottom-left-radius: 12px; }
.project-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 15px; background: var(--accent-soft); color: var(--accent); font-size: 1.35rem; }
.project-kicker { color: var(--warm); text-transform: uppercase; letter-spacing: .1em; font-weight: 800; font-size: .7rem; }
.project-card h3, .project-card h2 { margin: 3px 0 1px; font-size: 1.35rem; letter-spacing: -.02em; }
.project-card h3 a, .project-card h2 a { color: var(--ink); }
.project-card h3 a:hover, .project-card h2 a:hover { color: var(--accent); }
.project-subtitle { color: var(--accent); font-weight: 650; font-size: .92rem; }
.project-card p { margin: 12px 0 10px; color: var(--muted); }
.inline-links { display: flex; flex-wrap: wrap; gap: 15px; }
.inline-links a, .publication-links a { font-size: .84rem; font-weight: 750; color: var(--accent); }

.publication-list { border-top: 1px solid var(--line); }
.publication-item { display: grid; grid-template-columns: 72px minmax(0,1fr); gap: 24px; padding: 27px 0; border-bottom: 1px solid var(--line); }
.publication-year { color: var(--warm); font-size: .82rem; font-weight: 800; padding-top: 4px; }
.publication-main h3, .publication-main h2 { margin: 0 0 6px; font-size: 1.08rem; line-height: 1.35; letter-spacing: -.012em; }
.full-list .publication-main h2 { font-size: 1.15rem; }
.publication-main h3 a, .publication-main h2 a { color: var(--ink); }
.publication-main h3 a:hover, .publication-main h2 a:hover { color: var(--accent); }
.publication-authors, .publication-venue { margin: 2px 0; color: var(--muted); font-size: .91rem; }
.publication-venue { font-style: italic; }
.publication-links { display: flex; gap: 14px; margin-top: 9px; }
.pub-type { display: inline-block; margin-bottom: 5px; color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; }

.course-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.course-card { display: grid; grid-template-columns: 50px minmax(0,1fr); gap: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 24px; }
.course-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 1.2rem; }
.course-meta { font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; color: var(--warm); font-weight: 800; }
.course-card h3, .course-card h2 { margin: 2px 0 2px; font-size: 1.25rem; }
.course-card p { margin: 0 0 7px; color: var(--muted); }
.teaching-note { margin: 20px 0 0; color: var(--muted); font-size: .9rem; }

.student-cta { display: grid; grid-template-columns: 70px minmax(0,1fr) auto; gap: 26px; align-items: center; border: 1px solid var(--line); border-radius: 24px; padding: 30px 34px; background: linear-gradient(135deg,var(--surface),var(--soft)); }
.cta-icon { width: 62px; height: 62px; border-radius: 18px; background: var(--accent); color: var(--paper); display: grid; place-items: center; font-size: 1.5rem; }
.student-cta h2 { margin: 0 0 7px; font-size: 1.4rem; letter-spacing: -.025em; }
.student-cta p { margin: 0; color: var(--muted); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent); color: var(--paper); border: 1px solid var(--accent); border-radius: 11px; padding: 11px 16px; font-weight: 750; font-size: .9rem; }
.button:hover { color: var(--paper); background: var(--button-hover); }
html[data-theme="dark"] .button, html[data-theme="dark"] .cta-icon { color: #0f171d; }
html[data-theme="dark"] .button:hover { color: #0f171d; }
.button.secondary { background: var(--surface); color: var(--accent); border-color: var(--hover-border); }
.button.secondary:hover { background: var(--accent-soft); }
.button.compact { padding: 8px 12px; font-size: .84rem; }

.page-hero { padding: 82px 0 58px; background: linear-gradient(180deg,var(--hero-start) 0%,var(--hero-end) 100%); border-bottom: 1px solid var(--line-soft); }
.page-hero .page-icon { margin-bottom: 17px; }
.page-hero h1 { max-width: 900px; margin: 0; font-size: clamp(2.3rem,5vw,3.75rem); line-height: 1.03; letter-spacing: -.05em; }
.lead { max-width: 830px; margin: 18px 0 0; font-size: 1.12rem; color: var(--muted); }
.page-hero-grid { display: grid; grid-template-columns: minmax(0,1fr) 150px; align-items: end; gap: 50px; }
.about-photo { width: 150px; aspect-ratio: 1; object-fit: cover; object-position: center 20%; border-radius: 24px; box-shadow: var(--shadow); }
.page-link-row { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }

.content-grid { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 58px; align-items: start; }
.prose { max-width: 760px; }
.prose h2 { font-size: 1.65rem; letter-spacing: -.03em; margin: 0 0 12px; }
.prose h2:not(:first-child) { margin-top: 46px; }
.prose p { color: var(--text-secondary); }
.sidebar-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 23px; position: sticky; top: 98px; background: var(--surface); }
.sidebar-card h2 { font-size: .9rem; margin: 0 0 12px; color: var(--ink); }
.sidebar-card h2:not(:first-child) { margin-top: 24px; }
.sidebar-card p { margin: 0; color: var(--muted); font-size: .9rem; }
.sidebar-links { display: grid; gap: 4px; }
.sidebar-links a { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 8px; color: var(--text-secondary); font-weight: 650; font-size: .9rem; }
.sidebar-links a:hover { background: var(--soft); color: var(--accent); }
.professional-address { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }

.email-image { display: block; width: min(100%, 220px); height: auto; margin: 4px 0 2px; }
html[data-theme="dark"] .email-image { background: #ffffff; border-radius: 6px; padding: 3px 5px; }
.academic-profile-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
.academic-profile-link {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  color: var(--accent); font-size: .88rem; font-weight: 700;
}
.academic-profile-link:hover { background: var(--accent-soft); border-color: var(--hover-border); }
.publication-group + .publication-group { margin-top: 72px; }
.publication-group-heading { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.publication-group-heading .eyebrow { margin-bottom: 2px; }
.publication-group-heading h2 { margin: 0; font-size: 1.65rem; letter-spacing: -.03em; }

.review-grid { display: grid; gap: 16px; }
.review-card { display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 18px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.review-card-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; background: var(--accent-soft); color: var(--accent); font-size: 1.15rem; }
.review-card h3 { margin: 0 0 12px; font-size: 1.1rem; }
.review-list { list-style: none; padding: 0; margin: 0; }
.review-list li { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-top: 1px solid var(--line-soft); color: var(--text-secondary); }
.review-list li:first-child { border-top: 0; padding-top: 0; }
.review-count { flex: 0 0 auto; color: var(--muted); font-size: .82rem; white-space: nowrap; }
.review-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.review-chips span { padding: 7px 10px; background: var(--soft); border: 1px solid var(--line); border-radius: 999px; color: var(--text-secondary); font-size: .84rem; font-weight: 700; }

.sidebar-institution-logos { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-bottom: 13px; }
.sidebar-institution-logos a, .institution-logo {
  background: #ffffff;
  border: 1px solid #e1e7eb;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-institution-logos a { min-height: 68px; padding: 8px; }
.sidebar-institution-logos img { max-width: 100%; max-height: 48px; object-fit: contain; }
.sidebar-institution-logos .logo-poli { max-height: 53px; }

.research-detail-list { display: grid; gap: 0; }
.research-detail { display: grid; grid-template-columns: 72px minmax(0,1fr); gap: 28px; padding: 34px 0; border-top: 1px solid var(--line); }
.research-detail:first-child { border-top: 0; padding-top: 0; }
.research-detail-icon { width: 62px; height: 62px; border-radius: 18px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 1.5rem; }
.research-detail h2 { margin: 0 0 8px; font-size: 1.55rem; letter-spacing: -.025em; }
.research-detail p { color: var(--muted); max-width: 850px; }
.topic-list { margin: 17px 0 0; padding-left: 19px; color: var(--text-secondary); columns: 2; gap: 44px; }
.topic-list li { margin: 5px 0; break-inside: avoid; }
.topic-list.compact { columns: 1; font-size: .9rem; }
.split-callout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 60px; align-items: start; }
.split-callout h2 { margin: 0; font-size: 1.7rem; line-height: 1.2; letter-spacing: -.03em; }
.split-callout p { margin: 0; color: var(--muted); }
.contact-strip { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 40px; align-items: center; }
.contact-strip h2 { margin: 0 0 6px; font-size: 1.5rem; }
.contact-strip p { margin: 0; color: var(--muted); max-width: 780px; }

.site-footer { padding: 52px 0 28px; background: var(--footer-bg); color: var(--footer-ink); }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; }
.footer-name { color: #fff; font-size: 1.04rem; font-weight: 750; }
.site-footer p { color: var(--footer-muted); font-size: .88rem; margin: 6px 0 0; }
.institution-logos { display: flex; align-items: stretch; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.institution-logo { width: 92px; height: 64px; padding: 7px 9px; transition: transform .18s ease, box-shadow .18s ease; }
.institution-logo:hover { transform: translateY(-2px); box-shadow: 0 7px 18px rgba(0,0,0,.18); }
.institution-logo img { max-width: 100%; max-height: 49px; object-fit: contain; }
.institution-logo .logo-poli { max-height: 53px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 34px; padding-top: 18px; display: flex; justify-content: space-between; gap: 18px; color: var(--footer-faint); font-size: .78rem; }
.error-page { min-height: 55vh; display: flex; align-items: center; }

@media (max-width: 900px) {
  .site-header { position: sticky; }
  .nav-toggle { display: grid; }
  .site-nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 12px 20px 18px; box-shadow: var(--hover-shadow); flex-direction: column; align-items: stretch;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 11px 12px; }
  .hero-grid { grid-template-columns: 220px minmax(0,1fr); gap: 42px; }
  .hero-photo { width: 220px; }
  .card-grid-3, .card-grid-2 { grid-template-columns: 1fr; }
  .content-grid { grid-template-columns: 1fr; gap: 35px; }
  .sidebar-card { position: static; }
  .course-grid { grid-template-columns: 1fr; }
  .student-cta { grid-template-columns: 60px minmax(0,1fr); }
  .student-cta .button { grid-column: 2; justify-self: start; }
  .project-child { margin-left: 45px; }
  .topic-list { columns: 1; }
}

@media (max-width: 650px) {
  .container { width: min(100% - 28px, var(--container)); }
  .section-pad { padding: 58px 0; }
  .nav-wrap { gap: 12px; }
  .brand-name { font-size: .94rem; }
  .nav-actions { gap: 2px; }
  .hero { padding-top: 54px; }
  .hero-grid { grid-template-columns: 1fr; gap: 31px; }
  .hero-photo-wrap { width: 160px; }
  .hero-photo { width: 160px; aspect-ratio: 1; border-radius: 23px; }
  .hero-photo-wrap::before { right: -12px; bottom: -12px; border-radius: 22px; }
  .hero h1 { font-size: clamp(2.35rem, 12vw, 3.35rem); }
  .hero-role { font-size: 1.1rem; }
  .hero-bio { font-size: 1rem; }
  .social-link span { display: none; }
  .social-link { width: 40px; height: 40px; justify-content: center; padding: 0; font-size: 1rem; }
  .section-heading { gap: 12px; }
  .section-icon { width: 39px; height: 39px; }
  .timeline-item { grid-template-columns: 1fr; gap: 5px; padding: 18px 0; }
  .project-card { grid-template-columns: 44px minmax(0,1fr); gap: 16px; padding: 20px; }
  .project-icon { width: 44px; height: 44px; border-radius: 12px; }
  .project-child { margin-left: 18px; }
  .project-child::before { left: -12px; width: 12px; }
  .publication-item { grid-template-columns: 1fr; gap: 5px; }
  .publication-year { padding-top: 0; }
  .course-card { grid-template-columns: 44px minmax(0,1fr); padding: 20px; }
  .course-icon { width: 44px; height: 44px; }
  .student-cta { grid-template-columns: 1fr; padding: 25px; }
  .student-cta .button { grid-column: 1; }
  .page-hero { padding: 58px 0 46px; }
  .page-hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .about-photo { width: 120px; }
  .research-detail { grid-template-columns: 52px minmax(0,1fr); gap: 18px; }
  .research-detail-icon { width: 50px; height: 50px; border-radius: 14px; font-size: 1.2rem; }
  .review-card { grid-template-columns: 1fr; }
  .review-list li { flex-direction: column; gap: 1px; }
  .split-callout, .contact-strip { grid-template-columns: 1fr; gap: 18px; }
  .footer-grid { grid-template-columns: 1fr; }
  .institution-logos { justify-content: flex-start; }
  .institution-logo { width: 82px; height: 58px; }
  .footer-bottom { flex-direction: column; }
}

/* Institutional header */
.institution-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 4px 0;
}
.institution-brand:hover { opacity: .92; }
.header-logo-wrap {
  height: 46px;
  min-width: 66px;
  max-width: 108px;
  padding: 5px 8px;
  background: #fff;
  border: 1px solid #e1e7eb;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.header-logo {
  max-width: 100%;
  max-height: 35px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.header-logo.logo-pcs { max-width: 96px; max-height: 35px; }
.header-logo.logo-poli { max-height: 38px; }
.header-logo.logo-usp { max-height: 34px; }
html[data-theme="dark"] .header-logo-wrap { border-color: #3b4b55; }

.footer-grid-simple { grid-template-columns: 1fr; }

@media (min-width: 901px) {
  .card-grid-2 { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .header-logo-wrap { height: 42px; min-width: 58px; max-width: 88px; padding: 5px 6px; }
  .header-logo { max-height: 31px; }
  .institution-brand { gap: 5px; }
}

@media (max-width: 650px) {
  .header-logo-wrap { height: 37px; min-width: 48px; max-width: 66px; padding: 4px 5px; border-radius: 7px; }
  .header-logo { max-height: 27px; }
  .header-logo.logo-pcs { max-width: 58px; max-height: 25px; }
  .header-logo.logo-poli { max-height: 28px; }
  .header-logo.logo-usp { max-height: 26px; }
}

/* v5: ensino, publicações e rodapé */
.teaching-photo { object-position: center 18%; }
.course-title { font-weight: 700; color: var(--text); margin-bottom: 8px !important; }
.course-description { margin: 0 0 16px !important; color: var(--text-secondary) !important; line-height: 1.55; }
.footer-address { margin-top: 12px; color: var(--footer-muted); font-size: .86rem; line-height: 1.55; font-style: normal; }
.publication-type-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.publication-type-nav a { display: inline-flex; align-items: center; gap: 5px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text-secondary); font-size: .86rem; }
.publication-type-nav a:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--hover-border); }
.publication-group { scroll-margin-top: 92px; }
@media (max-width: 650px) { .publication-type-nav { flex-direction: column; align-items: stretch; } .publication-type-nav a { justify-content: flex-start; } }

/* v6: bilingual navigation and LinkedIn-style profile header */
.language-toggle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 1.28rem;
  line-height: 1;
  background: transparent;
  color: var(--ink);
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}
.language-toggle:hover {
  background: var(--accent-soft);
  border-color: var(--line);
  transform: translateY(-1px);
}
.header-logo-wrap {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.header-logo-wrap:hover {
  transform: translateY(-1px);
  box-shadow: var(--small-shadow);
  border-color: var(--hover-border);
}

.profile-hero {
  padding: 38px 0 74px;
}
.profile-banner {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 1;
  min-height: 220px;
  overflow: hidden;
  border-radius: 22px;
  background: var(--soft);
  border: 1px solid var(--line);
  box-shadow: var(--small-shadow);
}
.profile-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  filter: saturate(.78) brightness(.78);
  transform: scale(1.015);
}
.profile-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,25,38,.08) 0%, rgba(8,25,38,.34) 100%);
}
.profile-hero-body {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 215px minmax(0, 1fr);
  gap: 38px;
  align-items: end;
  margin-top: -76px;
  padding: 0 28px;
}
.linkedin-style-photo {
  width: 205px;
}
.linkedin-style-photo::before { display: none; }
.linkedin-style-photo .hero-photo {
  width: 205px;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 50%;
  border: 6px solid var(--paper);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.profile-hero-body .hero-content {
  padding-top: 96px;
}
.profile-hero-body .hero-content h1 {
  margin: 0;
  font-size: clamp(2.45rem, 5vw, 4.15rem);
  line-height: 1;
  letter-spacing: -.055em;
}
.profile-hero-body .hero-bio {
  margin-top: 17px;
  max-width: 790px;
}

@media (max-width: 900px) {
  .profile-banner { min-height: 185px; }
  .profile-hero-body {
    grid-template-columns: 175px minmax(0,1fr);
    gap: 30px;
    margin-top: -62px;
    padding-inline: 22px;
  }
  .linkedin-style-photo,
  .linkedin-style-photo .hero-photo { width: 170px; }
  .profile-hero-body .hero-content { padding-top: 76px; }
}

@media (max-width: 650px) {
  .profile-hero { padding-top: 22px; padding-bottom: 52px; }
  .profile-banner {
    aspect-ratio: 2.7 / 1;
    min-height: 118px;
    border-radius: 16px;
  }
  .profile-hero-body {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: -54px;
    padding: 0 14px;
  }
  .linkedin-style-photo,
  .linkedin-style-photo .hero-photo { width: 126px; }
  .linkedin-style-photo .hero-photo { border-width: 5px; }
  .profile-hero-body .hero-content { padding-top: 0; }
  .profile-hero-body .hero-content h1 { font-size: clamp(2.25rem, 11vw, 3.2rem); }
  .profile-hero-body .hero-bio { margin-top: 12px; }
  .language-toggle, .theme-toggle, .nav-toggle { width: 38px; height: 38px; }
  .language-toggle { font-size: 1.12rem; }
}
