:root {
  --ink: #15202b;
  --text: #344255;
  --muted: #687588;
  --line: #dce4ea;
  --panel: #ffffff;
  --soft: #f3f7f8;
  --accent: #0c8c9a;
  --accent-strong: #006f7d;
  --gold: #c8a24a;
  --shadow: 0 18px 55px rgba(31, 45, 56, 0.13);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Inter", "Noto Sans TC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  background: #ffffff;
}

body.is-lightbox-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: 100%;
  padding: 18px clamp(22px, 4vw, 58px);
  color: #ffffff;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.site-header.is-scrolled {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(18, 31, 43, 0.1);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid currentColor;
  border-radius: 8px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
  line-height: 1.1;
}

.brand small {
  color: currentColor;
  font-size: 0.74rem;
  opacity: 0.72;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  font-size: 0.94rem;
  font-weight: 700;
}

.site-nav a {
  opacity: 0.82;
}

.site-nav a:hover {
  opacity: 1;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid currentColor;
  border-radius: 8px;
  color: inherit;
  background: transparent;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
}

.hero {
  position: relative;
  display: grid;
  min-height: 92vh;
  overflow: hidden;
  color: #ffffff;
  isolation: isolate;
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  z-index: -2;
  object-fit: cover;
}

.hero-overlay {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(9, 22, 31, 0.86), rgba(9, 22, 31, 0.48) 48%, rgba(9, 22, 31, 0.25)),
    linear-gradient(180deg, rgba(9, 22, 31, 0.1), rgba(9, 22, 31, 0.55));
}

.hero-content {
  width: min(var(--max), calc(100% - 44px));
  margin: auto;
  padding: 120px 0 86px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #7de5ec;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 100%;
  margin: 0;
  color: #ffffff;
  font-size: clamp(3.1rem, 6.4vw, 5.7rem);
  line-height: 1.02;
  letter-spacing: 0;
  white-space: nowrap;
}

.hero-copy {
  max-width: 690px;
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.1rem, 2.1vw, 1.45rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 800;
}

.button.primary {
  color: #08242b;
  background: #8fe9ef;
}

.button.secondary {
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #ffffff;
}

.section {
  width: min(var(--max), calc(100% - 44px));
  margin: 0 auto;
  padding: 88px 0;
}

.section.muted {
  width: 100%;
  max-width: none;
  padding-inline: max(22px, calc((100vw - var(--max)) / 2));
  background: var(--soft);
}

.intro-band {
  padding-top: 72px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.25fr);
  gap: 42px;
  align-items: end;
  margin-bottom: 36px;
}

.section-heading h2,
.contact-section h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 46px;
  align-items: start;
}

.intro-grid > p {
  margin: 0;
  color: var(--text);
  font-size: 1.1rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stats div,
.research-grid article,
.project-card,
.table-row,
.news-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.stats div {
  padding: 22px 18px;
}

.stats strong {
  display: block;
  color: var(--ink);
  font-size: 2.15rem;
  line-height: 1;
}

.stats span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.research-grid article {
  min-height: 275px;
  padding: 26px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.research-grid article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.research-grid span {
  color: var(--gold);
  font-weight: 900;
}

.research-grid h3,
.table-row h3,
.news-grid h3 {
  margin: 18px 0 10px;
  color: var(--ink);
  line-height: 1.25;
}

.research-grid p,
.table-row p,
.news-grid p {
  margin: 0;
  color: var(--muted);
}

.project-section {
  padding-top: 40px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.project-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 18px;
  min-height: 320px;
  padding: 24px;
  border-top: 4px solid var(--accent);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.project-card:hover,
.project-card:focus-visible {
  outline: none;
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.project-card:focus-visible {
  border-color: var(--accent);
}

.project-number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--accent-strong);
  font-weight: 900;
  line-height: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.project-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid rgba(12, 140, 154, 0.22);
  border-radius: 8px;
  color: var(--accent-strong);
  background: #eef8f9;
  font-size: 0.76rem;
  font-weight: 900;
}

.project-card h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.25;
}

.project-card p {
  margin: 0;
  color: var(--text);
}

.project-points {
  display: grid;
  gap: 6px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.project-points li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.project-points li::before {
  content: "";
  position: absolute;
  top: 0.78em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  transform: translateY(-50%);
}

.project-action {
  display: inline-flex;
  align-items: center;
  margin-top: 18px;
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 900;
}

.project-action::after {
  content: ">";
  margin-left: 8px;
  color: var(--gold);
}

.life-album-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.life-album-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.life-album-card:hover,
.life-album-card:focus-visible {
  outline: none;
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.life-album-card:focus-visible {
  border-color: var(--accent);
}

.life-album-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--soft);
}

.life-album-card div {
  padding: 18px;
}

.life-album-card span {
  display: block;
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.life-album-card h3 {
  margin: 8px 0 8px;
  color: var(--ink);
  font-size: 1.25rem;
  line-height: 1.3;
}

.life-album-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.table-row a {
  color: var(--accent-strong);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.table-row h3 {
  margin: 0;
}

.people-table,
.paper-table,
.thesis-table {
  display: grid;
  gap: 10px;
}

.table-row {
  display: grid;
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
}

.people-table .table-row {
  grid-template-columns: 96px minmax(140px, 0.75fr) minmax(190px, 1fr) minmax(220px, 1.25fr);
}

.paper-table .table-row {
  grid-template-columns: 88px minmax(240px, 1.25fr) minmax(180px, 0.9fr) minmax(180px, 0.9fr);
}

.publication-status {
  margin: -10px 0 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.publication-status a {
  color: var(--accent-strong);
  font-weight: 900;
}

.doi-link {
  display: inline-block;
  margin-top: 4px;
  color: var(--accent-strong);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.thesis-table .table-row {
  grid-template-columns: 78px minmax(130px, 0.7fr) minmax(100px, 0.55fr) minmax(260px, 1.35fr) minmax(180px, 0.9fr);
}

.table-head {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #eef5f6;
}

.photo-cell {
  display: grid;
  place-items: center;
  width: 76px;
  aspect-ratio: 1;
  border-radius: 8px;
  color: var(--accent-strong);
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(12, 140, 154, 0.12), rgba(200, 162, 74, 0.18)),
    #ffffff;
  font-weight: 900;
}

.professor-photo {
  color: #ffffff;
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.member-section-block + .member-section-block {
  margin-top: 54px;
}

.member-group-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.member-group-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  line-height: 1.2;
}

.member-group-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.member-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(31, 45, 56, 0.05);
}

.member-card img,
.member-placeholder {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  background: #e9f2f3;
}

.member-card img {
  cursor: zoom-in;
}

.member-placeholder {
  display: grid;
  place-items: center;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(12, 140, 154, 0.92), rgba(21, 32, 43, 0.92)),
    #0c8c9a;
  font-size: 1.45rem;
  font-weight: 900;
}

.member-card div:last-child {
  min-height: auto;
  padding: 0;
}

.member-card h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.25;
}

.member-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.member-role,
.member-meta {
  margin-bottom: 6px;
}

.member-thesis {
  margin-top: 8px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.45;
}

.english-title {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-style: italic;
  line-height: 1.45;
}

.member-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.4;
}

.member-source-note {
  margin: -4px 0 14px;
  color: var(--muted);
  font-size: 0.88rem;
}

.thesis-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}

.thesis-filter label {
  color: var(--ink);
  font-weight: 900;
}

.thesis-filter select {
  min-height: 40px;
  min-width: 170px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--ink);
  background: #ffffff;
  font: inherit;
  font-weight: 800;
}

.professor-card {
  background: var(--ink);
}

.professor-card h3,
.professor-card p {
  color: #ffffff;
}

.compact-thesis-list {
  display: grid;
  gap: 8px;
}

.compact-thesis-row {
  display: grid;
  grid-template-columns: 74px 110px minmax(170px, 0.85fr) minmax(260px, 1.35fr);
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.compact-thesis-row[hidden] {
  display: none;
}

.compact-thesis-row h3,
.compact-thesis-row p {
  margin: 0;
}

.compact-thesis-row h3 {
  color: var(--ink);
  font-size: 0.98rem;
}

.compact-thesis-row p {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.compact-thesis-row .member-thesis {
  color: var(--text);
}

time {
  color: var(--accent-strong);
  font-weight: 900;
}

.thesis-title {
  color: var(--text);
}

.thesis-title small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

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

.read-more-button {
  justify-self: center;
  min-height: 46px;
  margin-top: 18px;
  padding: 10px 20px;
  border: 1px solid var(--accent-strong);
  border-radius: 8px;
  color: var(--accent-strong);
  background: #ffffff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.read-more-button:hover {
  color: #ffffff;
  background: var(--accent-strong);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.news-grid article {
  padding: 24px;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 44px;
  width: min(var(--max), calc(100% - 44px));
  margin: 0 auto;
  padding: 92px 0;
}

.contact-section p {
  max-width: 680px;
  margin: 18px 0 0;
}

address {
  display: grid;
  gap: 8px;
  align-content: center;
  min-height: 220px;
  padding: 28px;
  border-left: 4px solid var(--accent);
  color: var(--text);
  font-style: normal;
  background: var(--soft);
}

address strong {
  color: var(--ink);
  font-size: 1.2rem;
}

address a {
  color: var(--accent-strong);
  font-weight: 800;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(22px, 4vw, 58px);
  color: #ffffff;
  background: var(--ink);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  font-weight: 800;
}

.photo-lightbox[hidden] {
  display: none;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 22px;
}

.photo-lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(9, 22, 31, 0.78);
  cursor: zoom-out;
}

.photo-lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  max-height: min(86vh, 760px);
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 16px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.34);
}

.photo-lightbox-panel img {
  max-width: 100%;
  max-height: calc(86vh - 100px);
  border-radius: 8px;
  object-fit: contain;
}

.photo-lightbox-panel p {
  margin: 0;
  color: var(--ink);
  font-weight: 900;
}

.photo-lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: rgba(21, 32, 43, 0.88);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.photo-lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: rgba(9, 22, 31, 0.72);
  font-size: 1.35rem;
  font-weight: 900;
  cursor: pointer;
  transform: translateY(-50%);
}

.photo-lightbox-nav[hidden] {
  display: none;
}

.photo-lightbox-prev {
  left: 16px;
}

.photo-lightbox-next {
  right: 16px;
}

@media (max-width: 980px) {
  .section-heading,
  .intro-grid,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .research-grid,
  .member-grid,
  .life-album-grid,
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .people-table .table-row,
  .paper-table .table-row,
  .thesis-table .table-row,
  .compact-thesis-row {
    grid-template-columns: 1fr 1fr;
  }

  .people-table .table-head,
  .paper-table .table-head,
  .thesis-table .table-head {
    display: none;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 14px 18px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 18px;
    right: 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #ffffff;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 12px;
  }

  .hero {
    min-height: 88vh;
  }

  .hero-content {
    width: min(100% - 34px, var(--max));
    padding-top: 108px;
  }

  h1 {
    font-size: clamp(2.35rem, 12vw, 4rem);
    white-space: normal;
  }

  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(9, 22, 31, 0.88), rgba(9, 22, 31, 0.56)),
      linear-gradient(180deg, rgba(9, 22, 31, 0.16), rgba(9, 22, 31, 0.62));
  }

  .section,
  .contact-section {
    width: min(100% - 34px, var(--max));
    padding: 66px 0;
  }

  .section.muted {
    padding-inline: 17px;
  }

  .research-grid,
  .member-grid,
  .life-album-grid,
  .news-grid,
  .project-grid,
  .stats {
    grid-template-columns: 1fr;
  }

  .project-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .member-group-heading {
    display: block;
  }

  .member-group-heading p {
    margin-top: 6px;
  }

  .research-grid article {
    min-height: auto;
  }

  .people-table .table-row,
  .paper-table .table-row,
  .thesis-table .table-row,
  .compact-thesis-row {
    grid-template-columns: 1fr;
  }

  .photo-cell {
    width: 86px;
  }

  .site-footer {
    flex-direction: column;
  }
}
