:root {
  --ink: #111827;
  --text: #374151;
  --muted: #9ca3af;
  --line: #e5e7eb;
  --paper: #ffffff;
  --soft: #f9fafb;
  --accent: #f58220;
  --accent-hover: #e0721a;
  --link: #f58220;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--paper);
  font-family: Manrope, "Noto Sans KR", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

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

/* ── Typography ── */
h1, h2, h3, .school {
  font-family: "Space Grotesk", "Noto Sans KR", Manrope, sans-serif;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  color: var(--ink);
  font-size: clamp(42px, 5.5vw, 70px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

h2 {
  margin-bottom: 0;
  color: var(--ink);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h3 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

p, li, address {
  word-break: keep-all;
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 12px auto 0;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 10px;
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.logo-title {
  display: flex;
  align-items: center;
  min-width: min(320px, 45vw);
}

.logo-title img {
  display: block;
  width: min(300px, 42vw);
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  padding: 7px 11px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  transition: color 150ms ease, background 150ms ease;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--ink);
  background: var(--soft);
}

.site-nav a.active {
  color: var(--accent);
  background: #fff4eb;
}

/* ── Page layout ── */
.page-hero,
.member-hero,
.section,
.site-footer {
  width: min(1180px, 100%);
  margin-right: auto;
  margin-left: auto;
  padding-right: 28px;
  padding-left: 28px;
}

/* ── Hero (full-width banner) ── */
.hero {
  position: relative;
  width: 100%;
  color: #fff;
  overflow: hidden;
}

.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(135deg, rgba(8, 6, 16, 0.82), rgba(8, 6, 16, 0.62));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(96px, 14vw, 160px) 28px clamp(72px, 10vw, 116px);
}

.hero h1 {
  max-width: 820px;
  margin-bottom: 16px;
  color: #fff;
  font-size: clamp(46px, 6vw, 84px);
}

.school {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .school {
  color: var(--accent);
}

.korean-title {
  margin-bottom: 22px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
}

.hero .korean-title {
  color: rgba(255, 255, 255, 0.72);
  font-size: 18px;
}

.intro, .lead {
  max-width: 680px;
  margin-bottom: 28px;
  font-size: 17px;
  color: var(--text);
}

.hero .intro {
  max-width: 660px;
  color: rgba(255, 255, 255, 0.78);
}

.notice {
  display: block;
  padding: 14px 18px;
  color: var(--accent-hover);
  background: #fff4eb;
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
}

.hero .notice {
  max-width: 660px;
  background: rgba(255, 255, 255, 0.08);
  border-left-color: var(--accent);
  color: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
}

/* ── Sections ── */
.section {
  padding-top: 48px;
  padding-bottom: 48px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section-heading a,
.back-link,
.clear-filters {
  color: var(--accent);
  font-weight: 700;
}

/* ── News (home) ── */
.news-list {
  display: grid;
  gap: 0;
  padding: 0;
  margin: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.news-list li {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  transition: transform 150ms ease;
}

.news-list li:hover {
  transform: translateX(3px);
}

.news-list time,
.news-archive-list time {
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
}

/* ── Research overview (home) ── */
.research-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.research-layout.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 768px) {
  .research-layout.three-col {
    grid-template-columns: 1fr;
  }
}

.research-layout article {
  padding: 24px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.research-layout article:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}

/* ── Publication list (home) ── */
.publication-list {
  display: grid;
  gap: 14px;
  padding-left: 22px;
  margin: 0;
}

.publication-list li {
  padding-left: 4px;
}

.publication-list strong,
.publication-list span {
  display: block;
}

.publication-list strong {
  color: var(--ink);
}

.publication-list span {
  color: var(--muted);
  font-size: 14px;
}

/* ── Team (home) ── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
}

.member {
  padding: 24px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.member:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}

.member p {
  margin-bottom: 8px;
}

.member a {
  color: var(--accent);
  font-weight: 700;
}

.advisor {
  background: var(--paper);
}

/* ── Contact (home inline) ── */
.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
  gap: 48px;
}

.contact-section address {
  color: var(--text);
  font-style: normal;
  line-height: 1.9;
}

/* ── Contact mini (home bottom) ── */
.contact-section-mini {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  padding-top: 32px;
  padding-bottom: 32px;
  border-top: 1px solid var(--line);
}

.contact-mini-label {
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-mini-left {
  font-size: 13px;
  color: var(--muted);
}

.contact-mini-left p {
  margin-bottom: 8px;
  line-height: 1.6;
}

.contact-mini-left a {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.contact-mini-address {
  font-size: 13px;
  font-style: normal;
  color: var(--muted);
  line-height: 1.85;
}

.contact-mini-address strong {
  color: var(--text);
  font-weight: 700;
}

@media (max-width: 700px) {
  .contact-section-mini {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

/* ── Contact page ── */
.contact-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}

.contact-professor-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding: 28px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 8px;
}

.contact-prof-photo img {
  display: block;
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--line);
}

.contact-professor-card h3 {
  margin-bottom: 4px;
}

.contact-professor-card p {
  margin-bottom: 6px;
}

.contact-professor-card a {
  color: var(--accent);
  font-weight: 700;
}

.contact-address-card {
  padding: 28px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.contact-address-card h3 {
  margin-bottom: 18px;
}

.location-list {
  display: grid;
  gap: 16px;
  margin: 0;
}

.location-list div {
  display: grid;
  gap: 2px;
}

.location-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.location-list dd {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
}

/* ── Open Positions / Skills ── */
.position-card,
.skills-card {
  padding: 24px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.position-tag {
  display: inline-block;
  margin: 0 0 10px;
  padding: 3px 8px;
  color: var(--accent);
  background: #fff4eb;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.position-card-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.position-card-tags .position-tag {
  margin-bottom: 0;
}

.closed-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: #dbeafe;
  color: #dc2626;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.closed-badge::before {
  content: "●";
  font-size: 7px;
}

.position-details,
.skills-list {
  display: grid;
  gap: 8px;
  padding-left: 18px;
  margin: 14px 0 0;
  color: var(--text);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
}

/* ── How to Apply steps ── */
.section-lead {
  max-width: 720px;
  margin-bottom: 28px;
  font-size: 17px;
  color: var(--text);
}

.inline-link {
  color: var(--accent);
  font-weight: 700;
}

.apply-steps {
  display: grid;
  gap: 0;
  padding: 0;
  margin: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  counter-reset: steps;
}

.apply-steps li {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.step-num {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
  font-family: "Space Grotesk", sans-serif;
  font-size: 17px;
  font-weight: 700;
  flex-shrink: 0;
}

.apply-steps h3 {
  margin-bottom: 6px;
}

.apply-steps p {
  margin-bottom: 0;
}

.apply-steps a {
  color: var(--accent);
  font-weight: 700;
}

@media (max-width: 820px) {
  .contact-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .contact-professor-card {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .contact-prof-photo img {
    width: 72px;
    height: 72px;
  }

  .apply-steps li {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 16px;
    padding: 22px 0;
  }
}

/* ── Footer ── */
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 28px;
  padding-bottom: 36px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 13px;
}

/* ── Page hero ── */
.page-hero {
  padding: clamp(64px, 8vw, 96px) 28px 48px;
}

.page-hero::before {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  margin-bottom: 20px;
  border-radius: 4px;
  background: var(--accent);
}

/* ── Team detail ── */
.team-detail-section {
  padding-top: 48px;
  padding-bottom: 48px;
}

.person-detail {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  padding: 28px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.person-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--line);
  max-height: 210px;
}

.person-photo.large,
.member-hero-photo {
  aspect-ratio: 1 / 1;
  max-width: 200px;
  max-height: 200px;
  border: 1px solid var(--line);
}

.person-info h3 span {
  color: var(--muted);
  font-weight: 600;
}

.person-info p {
  margin-bottom: 6px;
}

.person-info a {
  color: var(--muted);
  font-weight: 600;
}

.person-info a:hover {
  color: var(--text);
}

.person-info h3 a {
  color: var(--accent);
  font-weight: 700;
}

.person-info h3 a:hover {
  color: var(--accent-hover);
  font-weight: 800;
}

.person-photo-link {
  display: block;
  overflow: hidden;
}

.person-photo-link img,
.research-topic-card img,
.hero-image img,
.news-photo img {
  transition: transform 220ms ease;
}

.person-photo-link:hover img,
.research-topic-card:hover img,
.news-photo:hover img {
  transform: scale(1.035);
}

.person-photo-link:hover + .person-info h3 a,
.person-info h3 a:hover {
  color: var(--accent);
}

.member-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.single-gallery {
  grid-template-columns: minmax(240px, 320px);
}

.person-card-detail {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 8px;
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.person-card-detail:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}

.person-card-detail .person-photo-link,
.person-card-detail > .person-photo {
  max-height: 240px;
  background: var(--soft);
}

.person-card-detail .person-photo {
  height: 240px;
  aspect-ratio: auto;
  object-fit: contain;
  background: var(--soft);
}

.person-info {
  padding: 18px;
}

.person-card-detail .person-info {
  padding-top: 16px;
}

.role {
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}

.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.interest-tag {
  display: inline-block;
  padding: 2px 8px;
  background: #fff4eb;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}

[data-theme="dark"] .interest-tag {
  background: rgba(251, 146, 60, 0.15);
}

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

/* ── Member hero ── */
.member-hero {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  padding: clamp(56px, 7vw, 88px) 28px 48px;
}

.member-hero > div::before {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  margin-bottom: 16px;
  border-radius: 4px;
  background: var(--accent);
}

.member-hero h1 {
  font-size: clamp(24px, 3vw, 36px);
  margin-bottom: 8px;
  line-height: 1.2;
}

.member-hero h1 span {
  color: var(--muted);
  font-size: clamp(16px, 2vw, 22px);
}

.member-hero-photo {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--soft);
  border: 3px solid var(--line);
  border-radius: 50%;
}

.member-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 16px 0 0;
  list-style: none;
}

.member-links a {
  display: inline-flex;
  padding: 7px 12px;
  color: var(--accent);
  background: #fff4eb;
  border: 1px solid rgba(245, 130, 32, 0.3);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.member-links a:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.member-detail-panel {
  padding: 24px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.member-detail-panel ul {
  display: grid;
  gap: 10px;
  padding-left: 20px;
  margin: 0;
}

.member-profile-section {
  padding-top: 48px;
  padding-bottom: 48px;
}

/* ── Research page ── */
.research-page-hero {
  padding-bottom: 40px;
}

.research-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.research-topic-card {
  display: grid;
  grid-template-rows: auto 1fr;
  color: var(--text);
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.research-topic-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}

.research-topic-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  max-height: 140px;
  background: var(--soft);
}

.research-topic-card span,
.research-topic-card strong {
  display: block;
  padding-right: 18px;
  padding-left: 18px;
}

.research-topic-card span {
  padding-top: 14px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.research-topic-card strong {
  padding-top: 6px;
  padding-bottom: 18px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}

/* ── Research page language toggle ── */
.lang-toggle {
  display: flex;
  gap: 3px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 3px;
  align-self: center;
}
.lang-btn {
  background: none;
  border: none;
  padding: 4px 12px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  letter-spacing: 0.06em;
  transition: color 150ms, background 150ms;
}
.lang-btn.active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Hide/show language variants */
.research-lang-en [data-ko] { display: none; }
.research-lang-ko [data-en] { display: none; }

.research-detail {
  scroll-margin-top: 84px;
}

.research-detail-heading {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 28px;
}

.research-detail-heading p:last-child {
  max-width: 860px;
  margin-bottom: 0;
  font-size: 17px;
}

.research-number {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
  font-family: "Space Grotesk", sans-serif;
  font-size: 20px;
  font-weight: 700;
}

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

.research-detail-grid article {
  padding: 22px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.research-pub-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ongoing-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  vertical-align: middle;
  margin-left: 5px;
}

.ongoing-badge.submitted   { background: #dbeafe; color: #1d4ed8; }
.ongoing-badge.under-review { background: #fef9c3; color: #854d0e; }
.ongoing-badge.preparing   { background: var(--soft); color: var(--muted); border: 1px solid var(--line); }

.research-detail-grid ul {
  display: grid;
  gap: 10px;
  padding-left: 18px;
  margin: 0;
}

.back-link {
  display: inline-flex;
  margin-top: 20px;
  color: var(--accent);
  font-weight: 700;
}

/* ── Publication page ── */
.publication-page-hero {
  padding-bottom: 40px;
}

.filter-panel {
  display: grid;
  gap: 20px;
  padding: 22px;
  margin-bottom: 22px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.filter-group h3 {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.filter-chip,
.clear-filters {
  font: inherit;
  cursor: pointer;
}

.filter-chip {
  padding: 6px 12px;
  color: var(--text);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.filter-chip:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.filter-chip.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.clear-filters {
  padding: 6px 12px;
  color: var(--accent);
  background: transparent;
  border: 0;
  font-weight: 700;
}

.publication-status {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
}

.publication-status strong {
  color: var(--accent);
}

.publication-browser-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.publication-entry {
  padding: 20px 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  line-height: 1.58;
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.publication-entry[hidden] {
  display: none;
}

.publication-entry:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.pub-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.pub-meta span {
  display: inline-flex;
  padding: 3px 8px;
  color: var(--accent);
  background: #fff4eb;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.publication-entry h3 {
  margin-bottom: 6px;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.pub-badge {
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pub-badge.top-conf   { background: #dbeafe; color: #1e40af; }
.pub-badge.scie-jcr5  { background: #fef3c7; color: #92400e; }
.pub-badge.scie-jcr10 { background: #fef9c3; color: #854d0e; }
.pub-badge.scie-q1    { background: #dcfce7; color: #166534; }
.pub-badge.workshop   { background: var(--soft); color: var(--muted); border: 1px solid var(--line); }

.publication-entry p {
  margin-bottom: 4px;
}

.pub-authors strong {
  color: var(--accent);
}

.pub-authors a {
  color: var(--accent);
  font-weight: 700;
}

.pub-authors a:hover {
  text-decoration: underline;
}

.empty-state {
  padding: 22px;
  color: var(--muted);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

/* ── Course page ── */
.course-page-hero {
  padding-bottom: 40px;
}

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

.course-card {
  padding: 22px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 8px;
  line-height: 1.58;
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.course-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}

.course-card h3 {
  overflow-wrap: anywhere;
}

.wide-course {
  grid-column: 1 / -1;
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.course-meta span {
  display: inline-flex;
  padding: 3px 8px;
  color: var(--accent);
  background: #fff4eb;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.course-people {
  margin-bottom: 0;
}

.course-people a {
  color: var(--accent);
  font-weight: 700;
}

/* ── News page ── */
.news-page-hero {
  padding-bottom: 40px;
}

.news-filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px;
  margin-bottom: 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.news-archive-list {
  display: grid;
  gap: 0;
  padding: 0;
  margin: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.news-archive-list li {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 28px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  transition: transform 150ms ease;
}

.news-archive-list li:hover {
  transform: translateX(3px);
}

.news-archive-list li[hidden] {
  display: none;
}

.news-archive-list h3 {
  margin-bottom: 6px;
}

.news-archive-list p {
  margin-bottom: 0;
}

.news-photo {
  margin: 14px 0 0;
  overflow: hidden;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  max-width: 640px;
}

.news-photo img {
  display: block;
  width: 100%;
  max-height: 280px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 220ms ease;
}

.news-photo:hover img {
  transform: scale(1.025);
}

.news-photo img[src] {
  color: transparent;
}

.news-photo:has(img:not([src])),
.news-photo img:not([src]) {
  display: none;
}

/* ── Profile / people ── */
.profile-card {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding: 24px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.advisor-profile {
  background: var(--paper);
}

.profile-photo {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
  font-family: "Space Grotesk", sans-serif;
  font-size: 24px;
  font-weight: 700;
}

.profile-body h3 {
  margin-bottom: 4px;
}

.profile-meta {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
}

.profile-meta div {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 16px;
}

.profile-meta dt {
  color: var(--ink);
  font-weight: 700;
}

.profile-meta dd {
  margin: 0;
}

.profile-meta a,
.profile-card a {
  color: var(--accent);
  font-weight: 700;
}

.people-list,
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 18px;
}

.compact-profile {
  grid-template-columns: 64px minmax(0, 1fr);
  padding: 18px;
}

.compact-profile .profile-photo {
  width: 64px;
  height: 64px;
  font-size: 18px;
}

.empty-profile .profile-photo {
  background: var(--muted);
}

/* ── Responsive: 980px ── */
@media (max-width: 980px) {
  .site-header {
    align-items: stretch;
    width: calc(100% - 24px);
    margin-top: 8px;
  }

  .logo-title {
    min-width: 0;
  }

  .site-nav {
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
    justify-content: flex-start;
  }

  .site-nav a {
    flex: 0 0 auto;
  }

  .hero-content {
    padding-right: 22px;
    padding-left: 22px;
  }

  .contact-section,
  .research-detail-heading {
    grid-template-columns: 1fr;
  }

  .person-detail,
  .member-hero {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .person-photo.large,
  .member-hero-photo {
    max-width: 220px;
    max-height: 220px;
  }
}

/* ── Responsive: 700px ── */
@media (max-width: 700px) {
  body {
    font-size: 15px;
  }

  .site-header {
    top: 8px;
    width: calc(100% - 18px);
    padding: 10px 14px;
    flex-wrap: wrap;
    gap: 6px 12px;
  }

  .logo-title {
    flex: 1;
  }

  .logo-title img {
    width: min(160px, 44vw);
  }

  .site-nav {
    order: 3;
    width: 100%;
    flex-basis: 100%;
    padding-bottom: 0;
  }

  .hero,
  .page-hero,
  .member-hero,
  .section,
  .site-footer {
    padding-right: 18px;
    padding-left: 18px;
  }

  .hero-content {
    padding-right: 18px;
    padding-left: 18px;
  }

  .page-hero,
  .member-hero {
    padding-top: 48px;
    padding-bottom: 32px;
  }

  h1, .hero h1 {
    font-size: clamp(34px, 11vw, 50px);
  }

  h2 {
    font-size: clamp(22px, 7vw, 30px);
  }

  h3 {
    font-size: 17px;
  }

  .intro, .korean-title {
    font-size: 16px;
  }

  .notice {
    font-size: 14px;
  }

  .section {
    padding-top: 44px;
    padding-bottom: 44px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .news-list li,
  .news-archive-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .publication-entry,
  .course-card,
  .research-detail-grid article,
  .member-detail-panel,
  .filter-panel {
    padding: 16px;
  }

  .filter-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .filter-chip {
    justify-content: center;
    min-width: 0;
    white-space: normal;
  }

  .member-links {
    display: grid;
    grid-template-columns: 1fr;
  }

  .member-links a {
    justify-content: center;
  }

  .person-detail,
  .member-hero {
    grid-template-columns: 1fr;
  }

  .person-photo.large,
  .member-hero-photo {
    max-width: 160px;
    max-height: 160px;
  }

  .person-card-detail .person-photo {
    height: 240px;
  }

  .course-grid,
  .research-detail-grid {
    grid-template-columns: 1fr;
  }

  .profile-meta div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

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

/* ── Responsive: 430px ── */
@media (max-width: 430px) {
  .filter-options {
    grid-template-columns: 1fr;
  }

  .pub-meta,
  .course-meta {
    display: grid;
    grid-template-columns: 1fr;
  }

  .person-info {
    padding: 14px;
  }
}

/* ── Page hero Korean subtitle ── */
.page-hero .intro {
  margin-bottom: 8px;
}
.page-hero .lang-toggle {
  margin: 16px 0;
}

.intro-ko {
  max-width: 720px;
  margin-top: 0;
  margin-bottom: 0;
  color: var(--muted);
  font-family: "Noto Sans KR", Manrope, sans-serif;
  font-size: 14px;
  line-height: 1.85;
}

/* ── Theme toggle button ── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--text);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.theme-toggle:hover {
  color: var(--ink);
  background: var(--line);
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

/* ── Dark mode variables ── */
[data-theme="dark"] {
  --ink: #f0f0f0;
  --text: #c8c8c8;
  --muted: #707070;
  --line: #3c3c3c;
  --paper: #1e1e1e;
  --soft: #282828;
  --accent: #fb923c;
  --accent-hover: #f97316;
}

[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Hardcoded rgba/hex overrides */
[data-theme="dark"] .site-header {
  background: rgba(17, 24, 39, 0.94);
  border-color: rgba(55, 65, 81, 0.8);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .publication-entry,
[data-theme="dark"] .advisor,
[data-theme="dark"] .person-card-detail {
  background: var(--soft);
}

[data-theme="dark"] .filter-chip {
  background: #2d3748;
  border-color: var(--line);
}

[data-theme="dark"] .pub-meta span,
[data-theme="dark"] .course-meta span,
[data-theme="dark"] .position-tag {
  background: rgba(251, 146, 60, 0.18);
}

[data-theme="dark"] .closed-badge {
  background: rgba(59, 130, 246, 0.2);
  color: #f87171;
}

[data-theme="dark"] .notice {
  background: rgba(251, 146, 60, 0.12);
  color: rgba(249, 250, 251, 0.9);
  border-left-color: var(--accent);
}

[data-theme="dark"] .site-nav a.active {
  background: rgba(251, 146, 60, 0.15);
}

[data-theme="dark"] .member-links a {
  background: rgba(251, 146, 60, 0.15);
  border-color: rgba(251, 146, 60, 0.3);
}

[data-theme="dark"] .hero .notice {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(249, 250, 251, 0.88);
}

/* Smooth theme switch transition */
.theme-transitioning,
.theme-transitioning *,
.theme-transitioning *::before,
.theme-transitioning *::after {
  transition:
    background-color 220ms ease,
    border-color 220ms ease,
    color 220ms ease !important;
}

/* ── News member links ── */
.news-archive-list p a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.news-archive-list p a:hover {
  text-decoration: underline;
}

/* ── Lab Life ── */
.lablife-section {
  padding-top: 0;
}

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

@media (max-width: 640px) {
  .lablife-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.lablife-item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: pointer;
  background: var(--soft);
  margin: 0;
}

.lablife-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 300ms ease;
}

.lablife-item:hover img {
  transform: scale(1.04);
}

.lablife-item figcaption {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px;
  text-align: center;
  opacity: 0;
  transition: opacity 220ms ease;
}

.lablife-item:hover figcaption {
  opacity: 1;
}

.lablife-item figcaption time {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.75;
}

.lablife-item figcaption span {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

/* Placeholder tiles */
.lablife-placeholder {
  cursor: default;
}

.lablife-placeholder-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  opacity: 0.35;
}

.lablife-placeholder figcaption {
  position: static;
  background: none;
  color: var(--muted);
  opacity: 1;
  font-size: 12px;
  padding: 8px 0 0;
}

/* Lightbox */
.lablife-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

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

.lightbox-content {
  max-width: min(90vw, 800px);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}

.lightbox-caption {
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
}

.lightbox-caption time {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 4px;
}

.lightbox-caption p {
  font-size: 14px;
  font-weight: 500;
  margin: 0;
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 150ms;
}

.lightbox-close:hover {
  color: #fff;
}
