:root {
  color-scheme: light;
  --page: #f7f7f4;
  --surface: #ffffff;
  --text: #181816;
  --muted: #6f706a;
  --line: #deded8;
  --accent: #e05b36;
  --accent-soft: #f6dfd7;
  --shadow: 0 20px 55px rgba(26, 26, 22, 0.08);
}

[data-theme="dark"] {
  color-scheme: dark;
  --page: #171816;
  --surface: #20211e;
  --text: #f2f2ec;
  --muted: #aaa9a1;
  --line: #3b3c37;
  --accent: #f17852;
  --accent-soft: #492a21;
  --shadow: 0 20px 55px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    var(--page);
  background-size: 80px 80px;
  color: var(--text);
  font-family:
    "IBM Plex Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei",
    sans-serif;
  line-height: 1.65;
  transition:
    background-color 180ms ease,
    color 180ms ease;
}

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

button {
  font: inherit;
}

.shell {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 72px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 11px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 4px;
  background: var(--text);
  color: var(--page);
  font-size: 1rem;
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  gap: 34px;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-nav a,
.site-footer a {
  transition: color 160ms ease;
}

.site-nav a:hover,
.site-footer a:hover {
  color: var(--accent);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
  min-width: 78px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    transform 160ms ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.theme-icon {
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: inset 4px 0 0 currentColor;
}

.intro {
  padding-block: clamp(96px, 14vw, 180px) clamp(80px, 11vw, 140px);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.intro h1 {
  max-width: 880px;
  margin: 0;
  font-family: Georgia, "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(3rem, 7vw, 6.8rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.intro-copy {
  max-width: 620px;
  margin: 36px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.2rem);
}

.content-section {
  padding-block: 76px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: end;
  gap: 28px;
  margin-bottom: 38px;
}

.section-heading .eyebrow {
  margin-bottom: 8px;
}

.section-heading h2 {
  margin: 0;
  font-family: Georgia, "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 500;
}

.section-line {
  flex: 1;
  height: 1px;
  margin-bottom: 11px;
  background: var(--line);
}

.empty-state {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 32px;
  align-items: start;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.empty-index {
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 1.8rem;
}

.empty-state h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.empty-state p,
.about-grid p {
  margin: 0;
  color: var(--muted);
}

.about {
  padding-bottom: 120px;
}

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

.about-grid p {
  max-width: 520px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-inner p {
  margin: 0;
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 32px, 1120px);
  }

  .header-inner {
    grid-template-columns: 1fr auto;
    min-height: 64px;
  }

  .site-nav {
    display: none;
  }

  .theme-toggle {
    min-width: auto;
  }

  .theme-toggle #theme-label {
    display: none;
  }

  .intro {
    padding-block: 72px 84px;
  }

  .intro h1 {
    font-size: clamp(2.7rem, 14vw, 4.2rem);
    letter-spacing: -0.035em;
  }

  .content-section {
    padding-block: 56px;
  }

  .empty-state {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 28px;
  }

  .about {
    padding-bottom: 84px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
