:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #eef4ff;
  --text: #1c2431;
  --muted: #617086;
  --line: #dde5f0;
  --primary: #163d77;
  --primary-2: #2d64b3;
  --accent: #14a3a5;
  --shadow: 0 14px 40px rgba(17, 34, 68, 0.08);
  --radius: 18px;
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f7faff 0%, #f4f7fb 100%);
  line-height: 1.65;
  overflow-x: hidden;
}

a {
  color: var(--primary-2);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

input,
button,
textarea,
select {
  font: inherit;
}

.container {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  padding: 2.5rem 0 4rem;
}

.section {
  padding: 2.25rem 0;
}

.section-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.15;
}

.section-intro {
  max-width: 760px;
  color: var(--muted);
  margin: 0 0 1.75rem;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(246, 248, 251, 0.88);
  border-bottom: 1px solid rgba(221, 229, 240, 0.9);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  font-weight: 700;
  color: var(--text);
  min-width: 0;
  flex: 1 1 auto;
}

.brand:hover {
  text-decoration: none;
}

.brand-media {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid rgba(221, 229, 240, 0.95);
  box-shadow: var(--shadow);
  overflow: hidden;
  flex: 0 0 auto;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  box-shadow: var(--shadow);
}

.brand-text {
  min-width: 0;
}

.brand-text small {
  display: block;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.78rem;
}

.nav-menu {
  position: relative;
}

.nav-toggle {
  display: none;
  border: 0;
  background: var(--surface);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  margin-left: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--surface);
  color: var(--primary);
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(22, 61, 119, 0.08);
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(22, 61, 119, 0.98), rgba(20, 163, 165, 0.95));
  color: #fff;
  padding: clamp(2rem, 5vw, 4rem);
  box-shadow: var(--shadow);
}

.hero::after {
  content: '';
  position: absolute;
  inset: auto -4rem -5rem auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.45fr 0.95fr;
  gap: 1.5rem;
  align-items: center;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.1rem, 5vw, 3.8rem);
  line-height: 1.05;
}

.hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  max-width: 660px;
}

.hero-actions {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.button,
button.button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.button:hover,
button.button:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.button.primary {
  background: #fff;
  color: var(--primary);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.hero-card,
.card,
.panel {
  background: var(--surface);
  border: 1px solid rgba(221, 229, 240, 0.8);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 1.35rem;
  color: var(--text);
}

.hero-visual {
  padding: 0;
  overflow: hidden;
}

.hero-visual img {
  display: block;
  width: min(100%, 300px);
  height: clamp(132px, 14vw, 176px);
  margin: 1rem auto 0;
  object-fit: cover;
  object-position: center;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(17, 34, 68, 0.12);
}

.hero-visual-copy {
  padding: 1.2rem 1.2rem 1.35rem;
}

/* Light card inside dark hero: override .hero / .hero p so copy is readable */
.hero-visual-copy h3 {
  color: var(--text);
}

.hero-visual-copy p {
  color: var(--muted);
  max-width: none;
}

.hero-card h3,
.card h3,
.panel h3 {
  margin-top: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.stat {
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  padding: 1rem;
}

.stat strong {
  display: block;
  font-size: 1.55rem;
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 1.25rem;
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card,
.panel {
  padding: 1.3rem;
}

.card p:last-child,
.panel p:last-child {
  margin-bottom: 0;
}

.muted {
  color: var(--muted);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--surface-2);
  color: var(--primary);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
}

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 1rem;
}

.profile-photo {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: var(--shadow);
  border: 1px solid rgba(221, 229, 240, 0.9);
  background: #eef3fb;
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.list-clean {
  margin: 0;
  padding-left: 1.1rem;
}

.list-clean li + li {
  margin-top: 0.45rem;
}

.timeline {
  display: grid;
  gap: 1rem;
}

.timeline-item {
  padding: 1.25rem;
  border-left: 4px solid var(--accent);
  background: var(--surface);
  border-radius: 0 18px 18px 0;
  box-shadow: var(--shadow);
}

.year-block {
  display: grid;
  gap: 1rem;
}

.year-label {
  display: inline-block;
  margin-bottom: 0.25rem;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--primary);
  text-transform: uppercase;
}

.search-row {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.search-row input {
  width: min(100%, 460px);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  font: inherit;
  background: var(--surface);
}

.pub-list {
  display: grid;
  gap: 0.9rem;
}

.pub-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem 1.1rem;
}

.notice {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: #fff6e8;
  color: #84551b;
  border: 1px solid #f0d7a9;
}

.science-art-card {
  overflow: hidden;
}

.science-art-image {
  width: calc(100% + 2.6rem);
  max-width: none;
  margin: -1.3rem -1.3rem 1rem;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #eef3fb;
}

.gallery-card {
  overflow: hidden;
  padding: 0;
}

.gallery-card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #eef3fb;
}

.gallery-card .content {
  padding: 1rem 1rem 1.15rem;
}

.contact-box {
  display: grid;
  gap: 1rem;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
}

.footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1.4rem 0 2rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.footer-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: contain;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid rgba(221, 229, 240, 0.9);
  box-shadow: 0 6px 18px rgba(17, 34, 68, 0.06);
}

.badge-row {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.badge {
  background: var(--surface-2);
  color: var(--primary);
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.82rem;
}

.split-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.25rem;
}

.table-like {
  display: grid;
  gap: 0.85rem;
}

.table-row {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 1rem;
  align-items: start;
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.callout {
  padding: 1.1rem 1.2rem;
  border-radius: 18px;
  background: linear-gradient(180deg, #edf5ff 0%, #f8fbff 100%);
  border: 1px solid #dce8fb;
}

@media (max-width: 1024px) {
  .hero-grid,
  .split-panel,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-wrap {
    align-items: center;
    padding: 0.8rem 0;
  }

  .nav-menu {
    width: auto;
    margin-left: auto;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 0;
    width: min(22rem, calc(100vw - 2rem));
    flex-direction: column;
    align-items: stretch;
    gap: 0.3rem;
    padding: 0.5rem;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
    justify-content: flex-start;
  }

  .nav-links a {
    width: 100%;
    border-radius: 14px;
    white-space: normal;
    padding: 0.9rem 1rem;
  }

  .nav-links.open {
    display: flex;
  }

  .hero-grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .split-panel {
    grid-template-columns: 1fr;
  }

  .hero-visual img {
    width: 100%;
    margin-top: 0;
    border-radius: 0;
    height: clamp(160px, 38vw, 220px);
    box-shadow: none;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    align-items: flex-start;
  }

  .table-row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(calc(100% - 1.25rem), var(--max));
  }

  main {
    padding-top: 1.5rem;
  }

  .hero {
    border-radius: 22px;
    padding: 1.4rem;
  }

  .hero h1 {
    line-height: 1.1;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .button {
    width: 100%;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .brand {
    gap: 0.7rem;
  }

  .brand-media {
    width: 44px;
    height: 44px;
    border-radius: 13px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 0.82rem;
  }

  .brand-text {
    font-size: 0.96rem;
  }

  .brand-text small {
    font-size: 0.72rem;
  }

  .section {
    padding: 1.6rem 0;
  }

  .card,
  .panel,
  .hero-card,
  .timeline-item {
    padding: 1rem;
  }

  .card-header {
    flex-direction: column;
  }

  .search-row input,
  .nav-links {
    width: 100%;
  }
}


:focus-visible {
  outline: 3px solid rgba(20, 163, 165, 0.28);
  outline-offset: 3px;
}

body.enhanced {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.enhanced main {
  opacity: 0;
  transform: translateY(18px);
  animation: page-enter 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.06s forwards;
}

body.is-leaving .topbar,
body.is-leaving main {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

@keyframes page-enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h1, h2, h3 {
  letter-spacing: -0.03em;
  text-wrap: balance;
}

p, li {
  text-wrap: pretty;
}

.hero,
.card,
.panel,
.timeline-item,
.gallery-card,
.table-row,
.pub-item,
.nav-toggle,
.nav-links,
.button,
.badge {
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease, opacity 0.24s ease, background-color 0.24s ease;
}

.card:hover,
.panel:hover,
.timeline-item:hover,
.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 44px rgba(17, 34, 68, 0.12);
}

.hero-card,
.card,
.panel,
.timeline-item,
.pub-item,
.table-row {
  backdrop-filter: blur(10px);
}

.hero::before {
  content: '';
  position: absolute;
  inset: -30% auto auto -5%;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.hero-card {
  background: rgba(255, 255, 255, 0.96);
}

.button {
  box-shadow: 0 12px 28px rgba(17, 34, 68, 0.12);
}

.button.secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.badge {
  border: 1px solid rgba(45, 100, 179, 0.08);
}

.footer {
  backdrop-filter: blur(10px);
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.34);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.24s ease, visibility 0.24s ease;
  z-index: 35;
}

.nav-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nav-links-header {
  display: none;
}

.nav-toggle {
  position: relative;
  z-index: 45;
}

@media (max-width: 820px) {
  body.menu-open {
    overflow: hidden;
  }

  .topbar {
    background: rgba(246, 248, 251, 0.94);
  }

  .nav-wrap {
    min-height: 72px;
  }

  .nav-links {
    display: flex;
    position: fixed;
    inset: 0 0 0 auto;
    width: min(24rem, 88vw);
    min-height: 100dvh;
    padding: 5.8rem 1rem 1.2rem;
    border: 0;
    border-radius: 28px 0 0 28px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: -18px 0 40px rgba(17, 34, 68, 0.16);
    transform: translateX(108%);
    opacity: 0;
    visibility: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    gap: 0.4rem;
    z-index: 40;
  }

  .nav-links.open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--primary);
    padding: 0 0.35rem 0.45rem;
    margin-bottom: 0.2rem;
  }

  .nav-links a {
    font-size: 1rem;
    padding: 1rem 1rem;
  }

  .hero,
  .card,
  .panel,
  .timeline-item {
    border-radius: 22px;
  }
}

@media (max-width: 560px) {
  .topbar {
    border-bottom-color: rgba(221, 229, 240, 0.84);
  }

  .nav-wrap {
    min-height: 68px;
  }

  .nav-links {
    width: min(22rem, 92vw);
    padding-top: 5.2rem;
  }

  .section-title {
    font-size: clamp(1.55rem, 6vw, 2.05rem);
  }

  .footer-brand {
    align-items: flex-start;
  }

  .footer-logo {
    width: 42px;
    height: 42px;
  }

  .hero {
    box-shadow: 0 16px 32px rgba(17, 34, 68, 0.12);
  }

  .hero-card,
  .card,
  .panel,
  .timeline-item,
  .pub-item,
  .table-row {
    box-shadow: 0 12px 26px rgba(17, 34, 68, 0.08);
  }
}

@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover {
    transform: translateY(-1px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  body.enhanced main,
  .reveal-on-scroll {
    opacity: 1;
    transform: none;
  }
}
