:root {
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --bg: #fafafa;
  --surface: #ffffff;
  --text-primary: #171717;
  --text-secondary: #404040;
  --text-tertiary: #737373;
  --text-quaternary: #a3a3a3;
  --line: rgba(0, 0, 0, 0.12);
  --drawer-shadow: 0 18px 54px rgba(0, 0, 0, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
}

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

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

.sr-only,
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  left: 12px;
  top: 12px;
  z-index: 1001;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}

.menu-trigger {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1100;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.menu-trigger:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.06);
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 1020;
  opacity: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.2);
  transition: opacity 0.18s ease;
}

.side-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1030;
  width: min(300px, 84vw);
  border-right: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--drawer-shadow);
  transform: translateX(-103%);
  transition: transform 0.2s ease;
  padding: 14px 14px 24px;
  overflow-y: auto;
}

.menu-close {
  width: 32px;
  height: 32px;
  margin-left: auto;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.menu-close:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.06);
}

.nav-group + .nav-group {
  margin-top: 20px;
}

.nav-label {
  margin-bottom: 8px;
  color: var(--text-quaternary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list li + li {
  margin-top: 4px;
}

.nav-list a {
  display: block;
  border-radius: 8px;
  padding: 6px 8px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.nav-list a:hover,
.nav-list a.active {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.05);
}

html.menu-open .drawer-overlay {
  opacity: 1;
  pointer-events: auto;
}

html.menu-open .side-drawer {
  transform: translateX(0);
}

.subpage-topbar {
  position: sticky;
  top: 0;
  z-index: 900;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(6px);
}

.subpage-topbar-inner {
  width: 100%;
  margin: 0;
  padding: 10px 16px 10px 54px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.subpage-topbar-inner::-webkit-scrollbar {
  display: none;
}

.subpage-topbar-home,
.subpage-topbar-current {
  color: var(--text-tertiary);
  font-size: 0.95rem;
  line-height: 1.4;
  white-space: nowrap;
}

.subpage-topbar-home:hover {
  color: var(--text-primary);
}

.subpage-topbar-divider {
  color: var(--text-quaternary);
  font-size: 0.95rem;
  line-height: 1;
}

.subpage-topbar-current {
  color: var(--text-primary);
  font-weight: 500;
}

.page-main {
  display: flex;
  justify-content: center;
  padding: 64px 16px 88px;
}

.page-main-subpage {
  padding-top: 44px;
}

.content-column {
  width: min(42rem, 100%);
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 64px;
}

.avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 28px;
}

.hero h1 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.35;
  font-weight: 600;
}

.hero-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-name-link {
  color: inherit;
  text-decoration: none;
}

.hero-name-link:hover {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

.hero-name-link:focus-visible {
  outline: 1px solid var(--text-quaternary);
  outline-offset: 2px;
  border-radius: 4px;
}

.hero-about-link {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.hero .title {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1rem;
}

.hero .tagline {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 1.5rem;
  line-height: 1.35;
  font-weight: 600;
  max-width: 30ch;
  text-wrap: pretty;
}

.social-row {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
}

.social-row a {
  width: 40px;
  height: 40px;
  color: var(--text-quaternary);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.social-row a:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.04);
}

.about-copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.about-copy p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.65;
}

.about-gallery-section {
  margin-top: 32px;
}

.about-gallery-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.about-photo-wrap {
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #e5e7eb;
}

.about-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-photo-title {
  margin: 8px 0 0;
  color: var(--text-tertiary);
  font-size: 0.75rem;
  line-height: 1.5;
  text-align: center;
}

.section {
  margin-top: 60px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}

.section-header h2 {
  margin: 0;
  color: var(--text-quaternary);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.6;
}

.is-home .section-header h2 {
  color: var(--text-tertiary);
  font-weight: 600;
}

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

.section-title-link:hover {
  text-decoration: underline;
  text-decoration-thickness: 1.25px;
  text-underline-offset: 2px;
}

.section-title-link:focus-visible {
  outline: 1px solid var(--text-quaternary);
  outline-offset: 2px;
  border-radius: 4px;
}

.section-link {
  color: var(--text-quaternary);
  font-size: 1rem;
  line-height: 1.6;
}

.section-link:hover {
  color: var(--text-primary);
}

.section-link-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.line-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.line-item + .line-item {
  margin-top: 6px;
}

.line-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
}

.title-link {
  font-size: 1.25rem;
  line-height: 1.6;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

a.title-link:hover {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

.line-muted {
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 400;
  color: var(--text-quaternary);
}

.line-emphasis {
  color: var(--text-primary);
}

.line-submeta {
  margin-top: 2px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.line-muted-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--text-quaternary);
  text-underline-offset: 2px;
}

.line-muted-link:hover {
  color: var(--text-primary);
}

.module-block + .module-block {
  margin-top: 24px;
}

.module-head {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}

.module-head h3 {
  margin: 0;
  color: var(--text-quaternary);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.6;
}

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

.module-title-link:hover {
  text-decoration: underline;
  text-decoration-thickness: 1.25px;
  text-underline-offset: 2px;
}

.module-title-link:focus-visible {
  outline: 1px solid var(--text-quaternary);
  outline-offset: 2px;
  border-radius: 4px;
}

.module-block > p {
  margin: 0 0 6px;
  color: var(--text-tertiary);
  font-size: 1rem;
}

.read-more {
  color: var(--text-quaternary);
  font-size: 0.95rem;
}

.read-more:hover {
  color: var(--text-primary);
}

.read-more-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-note {
  margin-top: 56px;
  color: #c4c4c4;
  font-size: 0.85rem;
}

.page-title {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.35;
  font-weight: 600;
}

.page-intro {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
}

.year-group + .year-group {
  margin-top: 24px;
}

.year-title {
  margin: 0 0 8px;
  color: var(--text-quaternary);
  font-size: 0.95rem;
  font-weight: 600;
}

.student-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.student-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.student-card + .student-card {
  margin-top: 12px;
}

.student-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: #e5e7eb;
  flex: 0 0 auto;
}

.student-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
}

.student-card p {
  margin: 2px 0 0;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.5;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 7px;
  color: var(--text-tertiary);
  font-size: 0.75rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 12px;
}

.detail-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.detail-title h1 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.35;
  font-weight: 600;
}

.detail-title p {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 1rem;
}

.detail-block {
  margin-top: 24px;
}

.detail-block h2 {
  margin: 0 0 8px;
  color: var(--text-tertiary);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.detail-block p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1rem;
}

.detail-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 1rem;
}

.detail-list li + li {
  margin-top: 6px;
}

@media (min-width: 640px) {
  .page-main {
    padding-top: 128px;
  }

  .page-main-subpage {
    padding-top: 72px;
  }

  .line-item + .line-item {
    margin-top: 3px;
  }
}

@media (min-width: 900px) {
  .about-gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
