:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #eef3f8;
  --text: #13263b;
  --muted: #5d6d7e;
  --line: #dbe4ed;
  --blue: #165c9c;
  --blue-strong: #0b3f70;
  --cyan: #36a6bd;
  --nav: rgba(248, 250, 252, 0.88);
  --shadow: 0 20px 60px rgba(18, 47, 74, 0.12);
  --radius: 18px;
  --max: 1160px;
}

:root[data-theme="dark"] {
  --bg: #0b1420;
  --surface: #101e2c;
  --surface-soft: #14283a;
  --text: #edf5fb;
  --muted: #a9b8c7;
  --line: #27394a;
  --blue: #72b9f2;
  --blue-strong: #a4d4fa;
  --cyan: #6fd4e3;
  --nav: rgba(11, 20, 32, 0.88);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.72;
  transition: background .25s ease, color .25s ease;
}
a { color: inherit; }
img { display: block; max-width: 100%; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 20%);
  background: var(--nav);
  backdrop-filter: blur(16px);
}
.nav-wrap {
  width: min(var(--max), calc(100% - 40px));
  min-height: 74px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 3px 9px 3px 4px;
  color: var(--text);
  border: 0;
  background: transparent;
  text-decoration: none;
  transition: color .25s ease;
}
.brand-emblem {
  width: 44px;
  height: 48px;
  overflow: hidden;
  flex: 0 0 auto;
}
.brand-emblem img {
  max-width: none;
  width: auto;
  height: 48px;
}
.brand-wordmark {
  display: grid;
  gap: 3px;
  color: var(--text);
  line-height: 1;
}
.brand-title {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -.035em;
}
.brand-subtitle {
  color: var(--muted);
  font-size: .5rem;
  font-weight: 700;
  letter-spacing: .025em;
  line-height: 1.18;
  text-transform: uppercase;
}
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a {
  color: var(--muted);
  font-size: .92rem;
  font-weight: 650;
  text-decoration: none;
  transition: color .2s ease;
}
.site-nav a:hover, .site-nav a:focus-visible { color: var(--blue); }
.icon-button, .menu-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
}
.theme-sun, :root[data-theme="dark"] .theme-moon { display: none; }
:root[data-theme="dark"] .theme-sun { display: block; }
.menu-button { display: none; border-radius: 11px; }

main { overflow: hidden; }
.hero {
  position: relative;
  width: min(var(--max), calc(100% - 40px));
  min-height: 690px;
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, .65fr);
  align-items: center;
  gap: clamp(48px, 7vw, 100px);
  padding: 96px 0 84px;
}
.hero::before {
  content: "";
  position: absolute;
  width: 560px;
  height: 560px;
  right: -260px;
  top: 25px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--cyan), transparent 78%), transparent 66%);
  pointer-events: none;
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
h1, h2, h3 { margin-top: 0; line-height: 1.15; }
h1 {
  margin-bottom: 20px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.2rem, 7vw, 6.4rem);
  font-weight: 600;
  letter-spacing: -.055em;
  white-space: nowrap;
}
.hero-role {
  max-width: 660px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: clamp(1.15rem, 2.2vw, 1.48rem);
  line-height: 1.55;
}
.hero-role strong { color: var(--text); font-weight: 700; }
.hero-copy { max-width: 670px; margin: 0 0 34px; color: var(--muted); }
.hero-profile-link {
  color: inherit;
  text-decoration-color: color-mix(in srgb, currentColor, transparent 58%);
  text-underline-offset: 4px;
}
.hero-profile-link:hover { color: var(--blue); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 19px;
  border: 1px solid var(--blue-strong);
  border-radius: 12px;
  background: var(--blue-strong);
  color: var(--bg);
  font-size: .92rem;
  font-weight: 750;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 10px 24px color-mix(in srgb, var(--blue), transparent 72%); }
.button.secondary { color: var(--blue-strong); background: transparent; }
.profile-frame {
  position: relative;
  z-index: 1;
  width: clamp(230px, 23vw, 280px);
  aspect-ratio: 1 / 1;
  margin-left: auto;
}
.profile-photo {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 10%;
  border-radius: 50%;
  box-shadow: var(--shadow);
  filter: saturate(.88) contrast(1.03);
}
.profile-note {
  display: none;
}

.section { padding: 94px 0; }
.section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.container { width: min(var(--max), calc(100% - 40px)); margin: auto; }
.section-head {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 42px;
  margin-bottom: 54px;
}
.section-kicker { color: var(--blue); font-size: .78rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.section-title { margin: 7px 0 0; font-family: Georgia, serif; font-size: clamp(2rem, 4vw, 3.45rem); letter-spacing: -.035em; }
.section-intro { max-width: 720px; margin: 8px 0 0; color: var(--muted); font-size: 1.06rem; }
.research-news-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(56px, 7vw, 96px);
  align-items: start;
}
.column-title {
  margin: 0 0 24px;
  font-size: clamp(2rem, 3vw, 2.55rem);
  line-height: 1.1;
  letter-spacing: -.035em;
}
.research-overview p {
  margin: 0 0 16px;
  line-height: 1.78;
}
.research-directions {
  display: grid;
  gap: 11px;
  margin: 30px 0 28px;
  padding: 0;
  list-style: none;
  color: var(--muted);
}
.research-directions li {
  position: relative;
  padding-left: 18px;
}
.research-directions li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .72em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cyan);
}
.text-link {
  color: var(--text);
  text-decoration-color: color-mix(in srgb, var(--text), transparent 45%);
  text-underline-offset: 4px;
}
.text-link:hover { color: var(--blue); }

.publications-head { max-width: 760px; margin-bottom: 48px; }
.publications-head .section-title { margin: 0 0 14px; }
.publications-head p { margin: 0; color: var(--muted); }
.publication-year + .publication-year { margin-top: 44px; }
.publication-year-title {
  margin: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 1.06rem;
}
.publication-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.publication-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 28px 0 24px;
  border-bottom: 1px solid var(--line);
}
.pub-visual {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 20px;
  place-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line), transparent 18%);
  border-radius: 10px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--surface), var(--cyan) 5%), var(--bg));
}
.pub-visual img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.pub-visual-fallback {
  position: absolute;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.pub-visual:not(.is-fallback) .pub-visual-fallback { opacity: 0; }
.pub-visual.is-fallback .pub-visual-fallback { opacity: 1; }
.pub-meta {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 750;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.publication-card h4 { margin: 0 0 10px; font-size: 1.06rem; line-height: 1.45; }
.pub-authors { margin: 0 0 17px; color: var(--muted); font-size: .9rem; line-height: 1.62; }
.pub-authors strong { color: var(--text); }
.pub-actions { display: flex; gap: 14px; margin-top: auto; }
.pub-actions a { color: var(--text); font-size: .88rem; text-underline-offset: 4px; }
.pub-actions a:hover { color: var(--blue); }

.news-column { scroll-margin-top: 100px; }
.news-list { border-top: 1px solid var(--line); }
.news-item { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 18px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.news-item[hidden] { display: none; }
.news-date { color: var(--muted); font-size: .86rem; font-weight: 650; }
.news-item p { margin: 0; line-height: 1.62; }
.news-toggle {
  margin-top: 20px;
  padding: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--text), transparent 45%);
  text-underline-offset: 4px;
  cursor: pointer;
}
.news-toggle:hover { color: var(--blue); }
.news-toggle:focus-visible { outline: 2px solid var(--cyan); outline-offset: 5px; border-radius: 2px; }
.activities-head { margin-bottom: 48px; }
.activities-head .section-title { margin-top: 8px; }
.activity-group + .activity-group { margin-top: 64px; }
.activity-group-heading {
  display: grid;
  grid-template-columns: max-content minmax(40px, 1fr);
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}
.activity-group-heading h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  letter-spacing: -.02em;
}
.activity-group-heading span { height: 1px; background: var(--line); }
.activity-list { display: grid; gap: 0; }
.activity-entry {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 28px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.activity-entry:first-child { padding-top: 4px; }
.activity-date { color: var(--muted); font-size: .9rem; font-weight: 600; }
.activity-content h4, .activity-service-grid h4 {
  margin: 0 0 5px;
  font-size: 1.02rem;
  line-height: 1.45;
}
.activity-place { margin: 0; color: var(--muted); font-size: .9rem; }
.activity-badge {
  display: inline-block;
  margin-left: 10px;
  padding: 1px 9px;
  border: 1px solid color-mix(in srgb, var(--blue), transparent 20%);
  border-radius: 999px;
  color: var(--blue);
  font-size: .74rem;
  font-weight: 650;
  line-height: 1.6;
  vertical-align: 1px;
}
.activity-talk { margin: 8px 0 0; color: var(--muted); font-family: Georgia, "Times New Roman", serif; font-style: italic; line-height: 1.55; }
.activity-talk-list {
  margin: 8px 0 0;
  padding-left: 1.45rem;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  line-height: 1.55;
}
.activity-talk-list li + li { margin-top: 5px; }
.activity-service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 64px; }
.activity-bullets { margin: 12px 0 0; padding-left: 20px; color: var(--muted); }
.activity-bullets li + li { margin-top: 8px; }

footer { width: min(var(--max), calc(100% - 40px)); margin: auto; padding: 34px 0 44px; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: .85rem; }
.footer-meta { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.footer-separator { color: color-mix(in srgb, var(--muted), transparent 28%); }
.visitor-counter { white-space: nowrap; }
.visitor-counter [data-visitor-count] { font-weight: inherit; font-variant-numeric: tabular-nums; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .reveal { opacity: 1; transform: none; transition: none; } }

@media (max-width: 820px) {
  .menu-button { display: inline-grid; }
  .site-nav {
    position: absolute;
    top: 73px;
    left: 20px;
    right: 20px;
    display: none;
    padding: 18px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 8px; }
  .nav-tools { display: flex; gap: 8px; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding: 64px 0 74px; }
  .profile-frame { grid-row: 1; width: min(58vw, 240px); margin: 0 auto; }
  h1 { font-size: clamp(3.2rem, 15vw, 5rem); }
  .section-head { grid-template-columns: 1fr; gap: 20px; }
  .research-news-grid { grid-template-columns: 1fr; gap: 64px; }
  .publication-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .activity-service-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .nav-wrap, .hero, .container, footer { width: min(100% - 28px, var(--max)); }
  .brand { gap: 6px; padding-right: 7px; }
  .brand-emblem { width: 38px; height: 42px; }
  .brand-emblem img { height: 42px; }
  .brand-title { font-size: 1.02rem; }
  .brand-subtitle { font-size: .44rem; }
  .hero { gap: 48px; }
  .profile-note { right: -4px; }
  .section { padding: 72px 0; }
  .news-item { grid-template-columns: 1fr; gap: 2px; }
  .activity-entry { grid-template-columns: 1fr; gap: 4px; }
  .activity-badge { display: table; margin: 8px 0 0; }
  .publication-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; }
  .footer-meta { justify-content: flex-start; }
}
