/* ============================================================
   間所研究室 / Madokoro Lab
   Design tokens, base, components. Light + dark, responsive.
   ============================================================ */

:root {
  --font: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI",
          "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;

  --accent: #4ca98f;
  --accent-strong: #2f7261;
  --accent-hover: #245a4c;
  --accent-contrast: #ffffff;
  --accent-soft: #e9f4f1;

  --bg: #f7faf9;
  --bg-hero: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f6f4;
  --text: #1d2725;
  --text-2: #55675f;
  --text-3: #5d7069;
  --border: #e1eae6;
  --border-strong: #cfdcd7;

  --shadow-sm: 0 1px 2px rgba(18, 42, 36, 0.05);
  --shadow-md: 0 2px 4px rgba(18, 42, 36, 0.05), 0 12px 32px -16px rgba(18, 42, 36, 0.18);
  --shadow-lift: 0 4px 8px rgba(18, 42, 36, 0.06), 0 18px 40px -18px rgba(18, 42, 36, 0.25);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;

  --header-h: 76px;
  --container: 1060px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  color-scheme: light;
}

[data-theme="dark"] {
  --accent: #55bfa4;
  --accent-strong: #6fd3b6;
  --accent-deep: #8fe0c6;
  --accent-contrast: #0c1512;
  --accent-soft: #16281f;

  --bg: #0e1513;
  --bg-hero: #0e1513;
  --surface: #151e1b;
  --surface-2: #1a2521;
  --text: #e8f0ed;
  --text-2: #a3b5ae;
  --text-3: #7c918a;
  --border: #24322c;
  --border-strong: #33453d;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.35), 0 12px 32px -16px rgba(0, 0, 0, 0.6);
  --shadow-lift: 0 4px 8px rgba(0, 0, 0, 0.4), 0 18px 40px -18px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 14px);
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.9;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
ul, ol { list-style: none; padding: 0; }
address { font-style: normal; }
::selection { background: var(--accent-strong); color: var(--accent-contrast); }

:focus-visible {
  outline: 3px solid var(--accent-strong);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- language switch ---------- */
[data-lang="ja"] .en,
[data-lang="en"] .ja { display: none; }

/* ---------- layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + 48px);
  margin-inline: auto;
  padding-inline: 24px;
}
.section { padding-block: 88px; }
.section + .section { border-top: 1px solid var(--border); }

.section-head { margin-bottom: 40px; }
.section-title {
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.3;
}
.section-sub {
  margin-top: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}
[data-lang="en"] .section-sub { text-transform: none; letter-spacing: 0.02em; font-size: 0.9rem; }

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--accent-strong);
  color: var(--accent-contrast);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 6px 16px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent);
  border-radius: 14px;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.brand:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}
.brand-logo { height: 46px; width: auto; }
[data-theme="dark"] .brand { border-color: color-mix(in srgb, var(--accent) 42%, transparent); }
[data-theme="dark"] .brand-logo { filter: brightness(1.35) saturate(1.1); }

.main-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-link {
  position: relative;
  padding: 8px 12px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-2);
  border-radius: 999px;
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
  white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link.is-active { color: var(--accent-strong); font-weight: 700; }
[data-theme="dark"] .nav-link.is-active { color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--text-2);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: color 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); border-color: var(--border); }
.icon-btn svg { width: 20px; height: 20px; }
.lang-btn { border: 1px solid var(--border-strong); }
.theme-btn .icon-sun, [data-theme="dark"] .theme-btn .icon-moon { display: none; }
[data-theme="dark"] .theme-btn .icon-sun { display: block; }
.nav-toggle { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  transition: background 0.18s var(--ease), color 0.18s var(--ease),
              border-color 0.18s var(--ease), transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.btn svg { width: 19px; height: 19px; flex-shrink: 0; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent-strong);
  color: var(--accent-contrast);
  box-shadow: 0 1px 2px rgba(18, 42, 36, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:hover { background: var(--accent-deep); box-shadow: var(--shadow-md); }
.btn-ghost {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }
.btn-text { padding-inline: 6px; color: var(--text-2); font-weight: 500; }
.btn-text:hover { color: var(--accent-strong); }
.btn-text svg { width: 16px; height: 16px; }
[data-theme="dark"] .btn-primary { box-shadow: none; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding-block: 108px 112px;
  background: var(--bg-hero);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto -20%;
  height: 130%;
  background:
    radial-gradient(42% 46% at 78% 18%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%),
    radial-gradient(34% 40% at 18% 78%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 72%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(color-mix(in srgb, var(--text) 9%, transparent) 1px, transparent 1.4px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(70% 85% at 50% 30%, black 20%, transparent 75%);
  mask-image: radial-gradient(70% 85% at 50% 30%, black 20%, transparent 75%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-flex;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 26px;
}
[data-theme="dark"] .hero-eyebrow { color: var(--accent); }
.hero-title {
  font-size: clamp(2.1rem, 5.2vw, 3.4rem);
  font-weight: 900;
  line-height: 1.28;
  letter-spacing: 0.01em;
  max-width: 22ch;
}
.hero-lead {
  margin-top: 22px;
  max-width: 62ch;
  font-size: 1.02rem;
  color: var(--text-2);
}
.hero-actions {
  margin-top: 38px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.22s var(--ease), transform 0.22s var(--ease), border-color 0.22s var(--ease);
}
.card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); border-color: var(--border-strong); }
.card-title {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.card-title::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--accent);
}

/* ---------- news ---------- */
.news-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.news-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 8px 24px;
  align-items: baseline;
  padding: 16px 26px;
  transition: background 0.16s var(--ease);
}
.news-item + .news-item { border-top: 1px solid var(--border); }
.news-item:hover { background: var(--surface-2); }
.news-item time {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-strong);
  font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .news-item time { color: var(--accent); }
.news-text { font-size: 0.97rem; }

/* ---------- prose ---------- */
.prose {
  max-width: 80ch;
  font-size: 1rem;
  color: var(--text);
}
.prose p + p { margin-top: 1em; }

/* ---------- members ---------- */
.members-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.professor { display: flex; align-items: center; gap: 16px; }
.professor-avatar {
  flex-shrink: 0;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: var(--accent-contrast);
  font-size: 1.5rem;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
[data-theme="dark"] .professor-avatar { box-shadow: none; }
.professor-name { font-size: 1.15rem; font-weight: 700; line-height: 1.4; }
.professor-name a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-decoration-color: color-mix(in srgb, currentColor 38%, transparent);
  transition: text-decoration-color 0.2s var(--ease);
}
.professor-name a:hover { text-decoration-color: currentColor; }
.professor-title { font-size: 0.9rem; color: var(--text-2); margin-top: 2px; }

.stat-list { display: grid; gap: 4px; }
.stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px;
  border-bottom: 1px dashed var(--border);
}
.stat:last-child { border-bottom: 0; }
.stat-num {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--accent-strong);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
[data-theme="dark"] .stat-num { color: var(--accent); }
.stat-label { font-size: 0.92rem; color: var(--text-2); text-align: right; }

/* ---------- research ---------- */
.research-list { display: grid; gap: 18px; }
.research-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 22px;
  align-items: start;
}
.research-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}
[data-theme="dark"] .research-icon { color: var(--accent); }
.research-icon svg { width: 30px; height: 30px; }
.research-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 1.18rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.5;
}
.research-body p { color: var(--text-2); font-size: 0.98rem; }
.research-body p + p { margin-top: 0.8em; }
.research-partners {
  margin-top: 14px;
  font-size: 0.88rem !important;
  font-weight: 700;
  color: var(--text-3) !important;
  letter-spacing: 0.04em;
}
.partner-banners {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.partner-banner {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  background: #ffffff;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.partner-banner:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.partner-banner img { height: 40px; width: auto; }

/* ---------- SDGs ---------- */
.sdg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--sdg-bg) 45%, black);
  background: var(--sdg-bg);
  color: var(--sdg-fg);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
}
.sdg-2  { --sdg-bg: #DDA63A; --sdg-fg: #33210b; }
.sdg-3  { --sdg-bg: #4C9F38; --sdg-fg: #142a0d; }
.sdg-7  { --sdg-bg: #FCC300; --sdg-fg: #3a2d00; }
.sdg-9  { --sdg-bg: #FD6925; --sdg-fg: #3a1a06; }
.sdg-11 { --sdg-bg: #FD9D24; --sdg-fg: #3d2404; }
.sdg-13 { --sdg-bg: #3F7E44; --sdg-fg: #ffffff; }
.sdg-14 { --sdg-bg: #0A97D9; --sdg-fg: #07263a; }
.sdg-15 { --sdg-bg: #56C02B; --sdg-fg: #1c3a0a; }
.sdg-row { display: inline-flex; gap: 6px; margin-left: auto; }

.sdgs-statement {
  max-width: 75ch;
  color: var(--text-2);
  margin-bottom: 26px;
}
.sdgs-statement a {
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.18s var(--ease);
}
.sdgs-statement a:hover { color: var(--accent-deep); }
[data-theme="dark"] .sdgs-statement a { color: var(--accent); }
[data-theme="dark"] .sdgs-statement a:hover { color: var(--accent-deep); }
.sdgs-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.sdgs-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.5;
}
.sdgs-item .sdg { width: 30px; height: 30px; border-radius: 8px; font-size: 0.9rem; }

/* ---------- lectures ---------- */
.lectures-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 18px;
  align-items: start;
}
.lecture-list { counter-reset: lecture; }
.lecture-list li {
  padding: 11px 2px;
  border-bottom: 1px dashed var(--border);
  font-size: 0.98rem;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.lecture-list li::before {
  content: counter(lecture, decimal-leading-zero);
  counter-increment: lecture;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-strong);
  font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .lecture-list li::before { color: var(--accent); }
.lecture-list li:last-child { border-bottom: 0; }

/* ---------- publications ---------- */
.pub-year { margin-bottom: 10px; }
.pub-year + .pub-year { margin-top: 34px; }
.pub-year-label {
  position: relative;
  display: inline-block;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--accent-strong);
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .pub-year-label { color: var(--accent); }
.pub-year-label::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 4px;
  width: 46px;
  height: 5px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--accent) 32%, transparent);
  z-index: -1;
}
.pub-list { display: grid; gap: 14px; }
.pub {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.pub:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.pub-authors { font-size: 0.85rem; color: var(--text-3); line-height: 1.6; }
.pub-title {
  margin-top: 5px;
  font-size: 0.99rem;
  font-weight: 700;
  line-height: 1.65;
}
.pub-meta { margin-top: 7px; font-size: 0.85rem; color: var(--text-2); line-height: 1.8; }
.pub-meta a { color: var(--accent-strong); font-weight: 500; }
[data-theme="dark"] .pub-meta a { color: var(--accent); }
.pub-meta a:hover { text-decoration: underline; }
.pub-pdf {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  background: var(--accent-soft);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.pub-pdf:hover { text-decoration: none; background: var(--accent-strong); color: var(--accent-contrast); }

/* ---------- footer ---------- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-block: 56px 28px;
  margin-top: 24px;
}
.footer-inner { display: grid; gap: 34px; }
.footer-main {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 40px;
  align-items: start;
}
.footer-logo { height: 64px; width: auto; }
[data-theme="dark"] .footer-logo { filter: brightness(1.3) saturate(1.05); }
.footer-title { margin-top: 16px; font-weight: 900; font-size: 1.05rem; letter-spacing: 0.02em; }
.footer-heading { font-size: 0.95rem; font-weight: 700; margin-bottom: 12px; letter-spacing: 0.03em; }
.footer-contact address { font-size: 0.95rem; line-height: 2; color: var(--text-2); }
.footer-contact address a { color: var(--text); font-weight: 500; }
.footer-contact address a:hover { color: var(--accent-strong); }
[data-theme="dark"] .footer-contact address a:hover { color: var(--accent); }
.footer-mail { margin-top: 12px; font-size: 0.95rem; color: var(--text-2); }
.footer-mail a { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.footer-mail a:hover { color: var(--accent-strong); }
[data-theme="dark"] .footer-mail a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-3);
}
.footer-top {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  color: var(--text-2);
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease), background 0.18s var(--ease);
}
.footer-top:hover { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }
[data-theme="dark"] .footer-top:hover { color: var(--accent); }
.footer-top svg { width: 15px; height: 15px; }

/* ---------- reveal animation ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  transition-delay: calc(var(--stagger, 0) * 70ms);
}
.js .reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1 !important; transform: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card, .pub, .nav-link, .partner-banner { transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .members-grid { grid-template-columns: 1fr 1fr; }
  .member-card:first-child { grid-column: 1 / -1; }
  .sdgs-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .section { padding-block: 64px; }
  .hero { padding-block: 72px 76px; }

  .brand { padding: 4px 12px; border-radius: 12px; }
  .brand-logo { height: 38px; }

  .main-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 10px 16px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
  }
  .site-header.nav-open .main-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }
  .nav-link { padding: 12px 14px; font-size: 1rem; border-radius: 10px; }
  .nav-toggle { display: inline-flex; }
  .header-actions { margin-left: auto; }
  .brand { margin-right: 8px; }
}

@media (max-width: 640px) {
  .container { padding-inline: 18px; }
  .members-grid { grid-template-columns: 1fr; }
  .lectures-grid { grid-template-columns: 1fr; }
  .sdgs-list { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr; gap: 28px; }
  .news-item { grid-template-columns: 1fr; gap: 2px; padding: 14px 18px; }
  .research-card { grid-template-columns: 1fr; gap: 14px; }
  .research-icon { width: 50px; height: 50px; border-radius: 14px; }
  .research-icon svg { width: 26px; height: 26px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .card { padding: 22px; }
}
