/* ── Subpage layout (Apple glass) ── */
.page-hero {
  padding: calc(var(--nav-h) + 3rem) 0 2.5rem;
  text-align: center;
  background: transparent;
}

.page-hero .container { max-width: var(--max-w); }

.breadcrumb {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.breadcrumb a { color: var(--accent); font-weight: 500; }
.breadcrumb a:hover { text-decoration: underline; }

.page-hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.page-hero .lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

.page-body {
  padding: 2.5rem 0 5rem;
  background: transparent;
}

.page-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  align-items: start;
}

/* ── Sidebar ── */
.page-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.sidebar-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-nav { display: flex; flex-direction: column; gap: 0.15rem; }

.sidebar-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  transition: all 0.15s;
}

.sidebar-nav a:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.sidebar-nav a.active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

.page-main { min-width: 0; }

/* ── Hub cards (overview pages) ── */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.hub-card {
  display: block;
  padding: 1.75rem;
  border-radius: var(--radius);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.hub-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(3, 81, 147, 0.1);
}

.hub-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.hub-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.hub-card .arrow {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
}

/* ── Content cards ── */
.content-card {
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
}

.content-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.content-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.25rem 0 0.5rem;
  color: var(--accent);
}

.content-card p, .content-card li {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.content-card ul, .content-card ol {
  padding-left: 1.25rem;
  margin: 0.5rem 0;
}

.content-card li { margin: 0.3rem 0; }

/* ── Members ── */
.member-group { margin-bottom: 2.5rem; }

.member-group h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.member-card {
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  overflow: visible;
}

.member-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(3, 81, 147, 0.08);
}

.member-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  overflow: hidden;
}

.member-avatar--photo {
  background: var(--bg-alt);
  padding: 0;
  overflow: hidden;
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
  transform-origin: center center;
}

.member-avatar--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (hover: hover) {
  .member-avatar--photo:hover {
    transform: scale(1.32);
    box-shadow: 0 10px 28px rgba(3, 81, 147, 0.2);
    z-index: 10;
    position: relative;
  }
}

.member-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.15rem; }
.member-card .korean-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  letter-spacing: -0.01em;
}
.member-card .dept { font-size: 0.8rem; color: var(--text-light); margin-bottom: 0.65rem; }
.member-card .contact { font-size: 0.8rem; color: var(--text-muted); line-height: 1.6; }
.member-card .contact a { color: var(--accent); }

.member-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
  align-items: center;
}

.member-link {
  padding: 0.25rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(3, 81, 147, 0.08);
  border-radius: var(--radius-pill);
  transition: background 0.2s;
}

.member-link:hover { background: rgba(3, 81, 147, 0.16); }

.member-link--icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 999px;
}

.member-link--icon svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: currentColor;
}

.alumni-list { display: flex; flex-direction: column; gap: 0.5rem; }

.alumni-item {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.alumni-item strong { color: var(--text); }
.alumni-item .alumni-email { color: inherit; overflow-wrap: anywhere; }
.alumni-item .alumni-email:hover { color: var(--text); }

/* ── Profile (supervisor) ── */
.supervisor-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.profile-banner {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  padding: 2rem 2.5rem;
  border-radius: var(--radius);
  text-align: left;
  overflow: visible;
}

.profile-banner-media {
  flex-shrink: 0;
  overflow: visible;
}

.profile-photo {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
}

.profile-photo--banner {
  width: 200px;
  height: 200px;
  margin: 0;
  font-size: 2.75rem;
}

.profile-photo--image {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
}

.profile-photo--hover-scale {
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
  transform-origin: center center;
}

.profile-photo--hover-scale img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (hover: hover) {
  .profile-photo--hover-scale:hover {
    transform: scale(1.12);
    box-shadow: 0 14px 40px rgba(3, 81, 147, 0.22);
    z-index: 10;
    position: relative;
  }
}

.profile-banner-info {
  flex: 1;
  min-width: 0;
}

.profile-banner-info h2 {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.profile-banner-info .title {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.1rem;
}

.profile-contact {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.profile-contact a { color: var(--accent); }

.supervisor-sections {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.supervisor-sections .content-card {
  margin-bottom: 0;
}

/* Legacy profile sidebar (unused) */
.profile-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2.5rem;
  align-items: start;
}

.profile-sidebar {
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
}

.profile-sidebar h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.35rem; }
.profile-sidebar .title { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 1rem; }

/* ── Publications list ── */
.pub-list-pro { display: flex; flex-direction: column; }

.pub-carousel {
  display: flex;
  flex-direction: column;
}

.pub-carousel-page {
  display: flex;
  flex-direction: column;
}

.pub-carousel-page[hidden] {
  display: none !important;
}

.pub-carousel-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.pub-carousel-status {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  flex: 1 1 auto;
}

.pub-carousel-btn {
  appearance: none;
  border: 1px solid var(--border-light);
  background: #fff;
  color: var(--text);
  border-radius: var(--radius);
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
}

.pub-carousel-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.pub-carousel-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pub-entry {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-light);
}

.pub-carousel-page .pub-entry:first-child { border-top: 1px solid var(--border-light); }
.pub-list-pro > .pub-entry:first-child { border-top: 1px solid var(--border-light); }

.pub-entry .year {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  padding-top: 0.1rem;
}

.pub-entry h3 {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 0.3rem;
}

.pub-title-link {
  color: inherit;
  text-decoration: none;
}

.pub-title-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.pub-entry .venue {
  font-size: 0.85rem;
  color: var(--text-light);
  font-style: italic;
}

/* ── Awards ── */
.award-list { display: flex; flex-direction: column; gap: 0.75rem; }

.award-item {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
}

.award-year-label {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.award-badge {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fef3c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.award-item h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.2rem; }
.award-item .venue { font-size: 0.85rem; color: var(--text-muted); }
.award-item .recipient { font-size: 0.85rem; color: var(--accent); font-weight: 500; margin-top: 0.25rem; }

/* ── Projects ── */
.project-list-pro { display: flex; flex-direction: column; gap: 0.75rem; }

.project-card {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
}

.project-card h3 { font-size: 0.95rem; font-weight: 600; line-height: 1.5; margin-bottom: 0.4rem; }
.project-meta { font-size: 0.8rem; color: var(--text-light); }
.project-meta .role { color: var(--accent); font-weight: 600; }

/* ── Seminar ── */
.seminar-table { width: 100%; border-collapse: collapse; }

.seminar-table th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-light);
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--border-light);
  background: var(--bg-alt);
}

.seminar-table td {
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}

.seminar-table tr:hover td { background: var(--accent-soft); }
.seminar-table .date { font-weight: 600; color: var(--accent); white-space: nowrap; width: 100px; }
.seminar-table .presenter { color: var(--text-muted); font-size: 0.85rem; }
.seminar-table .slide { white-space: nowrap; width: 70px; text-align: center; }
.seminar-paper-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.seminar-paper-link:hover { text-decoration: underline; }
.seminar-slide-link {
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.seminar-slide-link:hover { text-decoration: underline; }

/* ── Gallery ── */
.gallery-pro {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(3, 81, 147, 0.1);
}

.gallery-carousel {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #e8eef4;
  overflow: hidden;
}

.gallery-carousel-track,
.gallery-carousel-slide {
  width: 100%;
  height: 100%;
}

.gallery-carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.45s var(--ease);
  pointer-events: none;
}

.gallery-carousel-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.gallery-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-carousel-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  background: linear-gradient(to top, rgba(3, 81, 147, 0.72) 0%, transparent 55%);
  pointer-events: none;
  z-index: 2;
}

.gallery-carousel-overlay span {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
}

.gallery-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s var(--ease), background 0.2s var(--ease);
}

.gallery-carousel:hover .gallery-carousel-btn {
  opacity: 1;
}

.gallery-carousel-btn:hover {
  background: #fff;
}

.gallery-carousel-prev { left: 0.65rem; }
.gallery-carousel-next { right: 0.65rem; }

.gallery-carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.65rem;
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  z-index: 3;
}

.gallery-carousel-dot {
  width: 0.45rem;
  height: 0.45rem;
  border: none;
  border-radius: 50%;
  padding: 0;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}

.gallery-carousel-dot.is-active {
  background: #fff;
  transform: scale(1.2);
}

.gallery-meta {
  padding: 1rem 1.25rem;
}

.gallery-meta time { font-size: 0.78rem; color: var(--accent); font-weight: 600; }
.gallery-meta p { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.2rem; }

/* ── Prose (guides) ── */
.prose { max-width: 720px; }

.prose h2 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 2rem 0 0.75rem;
  color: var(--text);
}

.prose h3 { font-size: 1.05rem; font-weight: 700; margin: 1.25rem 0 0.5rem; }

.prose p, .prose li {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.prose ul, .prose ol { padding-left: 1.25rem; margin: 0.5rem 0; }
.prose li { margin: 0.3rem 0; }

.prose code {
  font-family: Menlo, Monaco, Consolas, monospace;
  font-size: 0.86em;
  background: var(--bg-alt);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

.prose pre {
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1rem 0;
  font-size: 0.85rem;
}

.prose pre code { background: none; padding: 0; }

.pdf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.pdf-viewer {
  width: 100%;
  min-height: 720px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--bg-alt);
}

.note-box {
  padding: 1rem 1.25rem;
  background: var(--accent-soft);
  border-radius: var(--radius);
  margin: 1.25rem 0;
}

.note-box p { margin: 0; font-size: 0.9rem; color: var(--text-muted); }

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Glass on subpage surfaces */
.page-sidebar,
.hub-card,
.content-card,
.member-card,
.alumni-item,
.profile-banner,
.profile-sidebar,
.award-item,
.project-card,
.gallery-item,
.seminar-table {
  background: rgba(255, 252, 248, 0.78);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

@supports (backdrop-filter: blur(12px)) {
  .page-sidebar,
  .hub-card,
  .content-card,
  .member-card,
  .alumni-item,
  .profile-banner,
.profile-sidebar,
  .award-item,
  .project-card,
  .gallery-item {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
  }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .page-shell { grid-template-columns: 1fr; }
  .page-sidebar { position: static; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-banner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.75rem 1.5rem;
  }
  .profile-photo--banner {
    width: 160px;
    height: 160px;
    font-size: 2.25rem;
  }
  .profile-banner-info h2 { font-size: 1.35rem; }
  .profile-sidebar { position: static; }
  .seminar-table .date { white-space: normal; }
}

@supports (font-size: clamp(1rem, 2vw, 2rem)) {
  .page-hero h1 { font-size: clamp(1.75rem, 4vw, 2.2rem); }
}
