/* ==========================================================================
   EDIT ME: 颜色、字体、间距都集中在这个块里，改这里整页跟着变。

   设计刻意保持扁平：无渐变、无阴影、无圆角、无动画。
   结构来自细线、对齐与字号层级，而不是卡片和框。
   ========================================================================== */

:root {
  color-scheme: light;

  --color-bg: #fafafa;
  --color-border: #e2e2e2;
  --color-text: #101112;
  --color-text-muted: #6a6d70;
  --color-accent: #0f6b52;

  --font-sans:
    ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica,
    Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',
    'Source Han Sans SC', 'Noto Sans CJK SC', sans-serif;

  --rule: 1px solid var(--color-border);
  --page-width: 40rem;
  --gutter: 1.5rem;
}

/* 深色主题。两组选择器：一组跟随系统设置，一组跟随切换按钮。保持同步。 */

:root[data-theme='dark'] {
  color-scheme: dark;

  --color-bg: #0e0f10;
  --color-border: #26282a;
  --color-text: #f2f2f2;
  --color-text-muted: #9a9da0;
  --color-accent: #3fbf95;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;

    --color-bg: #0e0f10;
    --color-border: #26282a;
    --color-text: #f2f2f2;
    --color-text-muted: #9a9da0;
    --color-accent: #3fbf95;
  }
}

/* ==========================================================================
   Base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--color-accent);
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: 0;
  left: var(--gutter);
  translate: 0 -200%;
  padding: 0.5rem 0.75rem;
  border: var(--rule);
  background: var(--color-bg);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  z-index: 2;
}

.skip-link:focus-visible {
  translate: 0 0;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
}

.icon {
  width: 1.125rem;
  height: 1.125rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

/* 小型大写分区标签 */
.label {
  color: var(--color-text-muted);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.label--sub {
  margin-top: 2.25rem;
  padding-bottom: 0.625rem;
  border-bottom: var(--rule);
  letter-spacing: 0.1em;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.page {
  width: 100%;
  max-width: var(--page-width);
  margin-inline: auto;
  padding: clamp(3.5rem, 12vh, 7rem) var(--gutter) 4rem;
}

.section {
  margin-top: 3.5rem;
  scroll-margin-top: 1.5rem;
}

.section__title {
  display: flex;
  align-items: baseline;
  gap: 0.625rem;
  padding-bottom: 0.875rem;
  border-bottom: var(--rule);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.section__no {
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.section__lede {
  max-width: 34rem;
  margin-top: 1rem;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

/* ==========================================================================
   Profile header
   ========================================================================== */

.profile__avatar {
  display: block;
  width: 60px;
  height: 60px;
}

.profile__name {
  margin-top: 1.75rem;
  font-size: clamp(1.875rem, 7vw, 2.375rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.profile__tagline {
  max-width: 30rem;
  margin-top: 0.75rem;
  font-size: 1.0625rem;
  text-wrap: pretty;
}

.profile__meta {
  margin-top: 1rem;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* ==========================================================================
   Link list — 细线行，不用卡片
   ========================================================================== */

.links {
  margin-top: 2.75rem;
  border-top: var(--rule);
}

.links li {
  border-bottom: var(--rule);
}

.link {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1.125rem 0;
  color: inherit;
  text-decoration: none;
}

.link__index {
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.link__body {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.link__title {
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.link__meta {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.link__arrow {
  margin-left: auto;
  color: var(--color-text-muted);
  align-self: center;
}

.link:hover .link__title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

/* ==========================================================================
   数字一览
   ========================================================================== */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
  gap: 1.25rem 1rem;
  margin-top: 1.75rem;
  padding-bottom: 1.75rem;
  border-bottom: var(--rule);
}

.stats__num {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.stats__unit {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.stats__label {
  display: block;
  margin-top: 0.125rem;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}

/* ==========================================================================
   正文段落
   ========================================================================== */

.prose {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin-top: 1.5rem;
  max-width: 36rem;
  font-size: 0.9375rem;
  line-height: 1.75;
  text-wrap: pretty;
}

.prose strong {
  font-weight: 600;
  color: var(--color-accent);
}

/* ==========================================================================
   荣誉标签
   ========================================================================== */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tags li {
  padding: 0.25rem 0.625rem;
  border: var(--rule);
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}

/* ==========================================================================
   专业分组
   ========================================================================== */

.groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.group__title {
  padding-bottom: 0.5rem;
  border-bottom: var(--rule);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-accent);
}

.group__list {
  margin-top: 0.5rem;
}

.group__list li {
  padding: 0.5rem 0;
  border-bottom: var(--rule);
  font-size: 0.9375rem;
}

.group__list li:last-child {
  border-bottom: 0;
}

/* ==========================================================================
   条目块（升学 / 师资 / 联系）
   ========================================================================== */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.5rem 2rem;
  margin-top: 1.5rem;
}

.fact__title {
  padding-bottom: 0.5rem;
  border-bottom: var(--rule);
  font-size: 0.9375rem;
  font-weight: 600;
}

.fact__body {
  margin-top: 0.625rem;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
  text-wrap: pretty;
}

.big-link {
  font-size: 1.0625rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}

.big-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================================
   照片系列
   ========================================================================== */

.series {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.series__tab {
  padding: 0.375rem 0.875rem;
  border: var(--rule);
  background: none;
  color: var(--color-text-muted);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

.series__tab:hover {
  color: var(--color-text);
}

.series__tab[aria-selected='true'] {
  border-color: var(--color-accent);
  color: var(--color-accent);
  font-weight: 600;
}

.panel {
  margin-top: 1.25rem;
}

.panel__note {
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 0.875rem;
}

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

.shot {
  display: block;
  width: 100%;
  padding: 0;
  border: var(--rule);
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: zoom-in;
}

.shot img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--color-border);
}

.shot__cap {
  display: block;
  padding: 0.375rem 0.5rem;
  border-top: var(--rule);
  color: var(--color-text-muted);
  font-size: 0.75rem;
}

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

.shot:hover .shot__cap {
  color: var(--color-text);
}

.hint {
  margin-top: 1.25rem;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}

.hint code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78em;
}

/* ==========================================================================
   灯箱
   ========================================================================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: var(--gutter);
}

.lightbox[hidden] {
  display: none;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 9, 10, 0.92);
}

.lightbox__figure {
  position: relative;
  margin: 0;
  max-width: min(56rem, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lightbox__img {
  display: block;
  max-width: 100%;
  max-height: 76vh;
  object-fit: contain;
  background: #16181a;
}

.lightbox__cap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: #f2f2f2;
  font-size: 0.875rem;
}

.lightbox__count {
  color: #9a9da0;
  font-variant-numeric: tabular-nums;
}

.lightbox__btn {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid #3a3d40;
  background: rgba(20, 22, 24, 0.85);
  color: #f2f2f2;
  cursor: pointer;
}

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

.lightbox__btn--close {
  position: absolute;
  top: 0;
  right: 0;
}

.lightbox__btn--prev {
  position: absolute;
  top: 50%;
  left: -3.25rem;
  translate: 0 -50%;
}

.lightbox__btn--next {
  position: absolute;
  top: 50%;
  right: -3.25rem;
  translate: 0 -50%;
}

@media (max-width: 46rem) {
  .lightbox__btn--prev {
    left: 0;
  }

  .lightbox__btn--next {
    right: 0;
  }
}

/* ==========================================================================
   Elsewhere
   ========================================================================== */

.elsewhere {
  margin-top: 3.5rem;
}

.elsewhere__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 1.5rem;
  margin-top: 0.875rem;
}

.elsewhere__list a {
  color: var(--color-text);
  font-size: 0.9375rem;
  text-decoration: none;
}

.elsewhere__list a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: var(--rule);
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}

.footer a {
  color: inherit;
  text-underline-offset: 3px;
}

.footer__note {
  margin-top: 0.5rem;
  max-width: 34rem;
  line-height: 1.7;
}

/* ==========================================================================
   Toolbar（主题切换 + 复制链接）
   ========================================================================== */

.toolbar {
  position: fixed;
  top: var(--gutter);
  right: var(--gutter);
  display: flex;
  gap: 0.5rem;
  z-index: 1;
}

.toolbar__button {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: var(--rule);
  background: var(--color-bg);
  color: var(--color-text-muted);
  cursor: pointer;
}

.toolbar__button:hover {
  color: var(--color-text);
}

.icon--dark {
  display: none;
}

:root[data-theme='dark'] .icon--light {
  display: none;
}

:root[data-theme='dark'] .icon--dark {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .icon--light {
    display: none;
  }

  :root:not([data-theme='light']) .icon--dark {
    display: block;
  }
}

/* 尊重「减少动态效果」的系统设置 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
