/* SHUOZHE — scholarly learning terminal */
:root {
  --bg: #071018;
  --bg-soft: #0b1822;
  --surface: #10212c;
  --surface-2: #16303c;
  --text: #eef6f3;
  --muted: #8aa8a4;
  --faint: #5c7874;
  --accent: #5ee0b5;
  --accent-deep: #1f8f6e;
  --gold: #d7b56a;
  --line: rgba(176, 214, 206, 0.14);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --font-serif: "Fraunces", "Iwanami Mincho", "Songti SC", serif;
  --font-sans: "Source Sans 3", "Noto Sans SC", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
  --container: 1120px;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(94, 224, 181, 0.12), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(215, 181, 106, 0.07), transparent 50%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  letter-spacing: 0.01em;
}
body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  z-index: 0;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; }
.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--accent);
  color: #052017;
  padding: 8px 12px;
  z-index: 20;
}
.skip:focus { top: 12px; }

.wrap {
  width: min(var(--container), calc(100% - 40px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
  background: rgba(7, 16, 24, 0.78);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
}
.brand:hover { text-decoration: none; color: var(--accent); }
.brand-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
}
.nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav a {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--accent);
  padding-bottom: 2px;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(16, 33, 44, 0.7);
}
.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  padding: 6px 10px;
  cursor: pointer;
}
.lang-switch button[aria-pressed="true"] {
  background: var(--accent);
  color: #052017;
  font-weight: 600;
}

.menu-toggle {
  display: none;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}

.hero {
  padding: 72px 0 48px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 16px;
}
h1, h2, h3 { font-family: var(--font-serif); font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(2.4rem, 5vw, 4.1rem); }
h1 em, h2 em { font-style: italic; color: var(--accent); font-weight: 450; }
.lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 38rem;
  margin: 22px 0 32px;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 600;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.98rem;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #052017; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.terminal {
  background: linear-gradient(180deg, #102631, #0c1b24);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}
.dots { display: flex; gap: 6px; margin-right: 8px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; display: block; background: #3a4f55; }
.dots i:first-child { background: #d7b56a; }
.terminal-body {
  padding: 20px 18px 24px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.7;
  color: #cfe8e1;
  min-height: 260px;
}
.prompt { color: var(--accent); }
.muted { color: var(--muted); }
.cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: var(--accent);
  margin-left: 3px;
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.section { padding: 72px 0; position: relative; z-index: 1; }
.section-head { margin-bottom: 32px; max-width: 40rem; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
.section p { color: var(--muted); }

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.principle {
  background: rgba(16, 33, 44, 0.72);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 22px 24px;
}
.principle .num {
  font-family: var(--font-serif);
  color: var(--gold);
  font-size: 1.2rem;
  margin-bottom: 12px;
}
.principle h3 { font-size: 1.35rem; margin-bottom: 8px; }
.principle p { margin: 0; }

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.card {
  background: rgba(16, 33, 44, 0.8);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
}
.card h3 { font-size: 1.5rem; }
.card p { margin: 0; flex: 1; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.band {
  border-block: 1px solid var(--line);
  background: rgba(16, 33, 44, 0.45);
}
.band-inner { padding: 56px 0; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 32px; align-items: center; }
.legal-name { font-family: var(--font-serif); font-size: 1.15rem; color: var(--text); margin: 0 0 8px; }

.audience { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.prose { max-width: 46rem; }
.prose h2 { margin: 0 0 16px; }
.prose p { font-size: 1.08rem; }
.stack { display: grid; gap: 18px; margin-top: 28px; }
.stack article {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 18px;
}
.stack h3 { font-size: 1.25rem; margin-bottom: 6px; }

.form-card {
  background: rgba(16, 33, 44, 0.85);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
}
form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { font-size: 0.86rem; color: var(--muted); }
input, select, textarea {
  font: inherit;
  color: var(--text);
  background: #0b1822;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}
textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: 0.86rem; color: var(--faint); margin: 0; }
.success {
  display: none;
  border: 1px solid rgba(94, 224, 181, 0.4);
  background: rgba(94, 224, 181, 0.1);
  border-radius: 16px;
  padding: 24px;
}
.form-card.is-success form { display: none; }
.form-card.is-success .success { display: block; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 48px;
  color: var(--muted);
  position: relative;
  z-index: 1;
}
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-legal { max-width: 36rem; }
.footer-legal strong { color: var(--text); font-weight: 600; display: block; margin-bottom: 6px; }
.footer-nav { display: flex; gap: 16px; }

.page-hero { padding: 64px 0 24px; }
.page-hero h1 { max-width: 16ch; }

@media (max-width: 860px) {
  .hero, .band-inner, .principles, .cards, .field-row { grid-template-columns: 1fr; }
  .menu-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    top: 72px;
    right: 20px;
    left: 20px;
    background: #0c1b24;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .header-inner { position: relative; }
  body.nav-open .nav { display: flex; }
  h1 { font-size: 2.3rem; }
  .section { padding: 52px 0; }
}

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