/* judyzhu.xyz — still water */

:root {
  --paper: #F2F4F1;
  --paper-warm: #EDEEEA;
  --ink: #2A3A3A;
  --ink-soft: #3E4F4F;
  --stone: #6B8784;
  --mist: #B4C4BC;
  --mist-pale: #D4DED7;
  --rice: #E8DCC4;
  --rice-deep: #C9B994;
  --seal: #8B3A2E;
  --line: rgba(42, 58, 58, 0.12);
  --line-soft: rgba(42, 58, 58, 0.06);

  --serif-cn: "Noto Serif SC", "Songti SC", serif;
  --serif-jp: "Noto Serif JP", serif;
  --sans: "Neue Montreal", "Söhne", -apple-system, "Helvetica Neue", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --ease-water: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-settle: cubic-bezier(0.16, 1, 0.3, 1);
}

@font-face {
  font-family: "Neue Montreal";
  src: url("https://cdn.jsdelivr.net/gh/fontsource/fontsource@main/packages/inter-tight/files/inter-tight-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
  text-transform: lowercase;
  letter-spacing: 0.005em;
}

body.modal-open {
  overflow: hidden;
}

/* Proper-noun exceptions */
.tc { text-transform: none; }

/* ——— Layout ——— */

.page {
  width: 100%;
  min-height: 100vh;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 640px) {
  .container { padding: 0 20px; }
}

/* ——— Nav ——— */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  mix-blend-mode: difference;
  color: #F2F4F1;
  pointer-events: none;
}

.nav > * { pointer-events: auto; }

.nav-mark {
  font-family: var(--serif-cn);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}

.nav-mark .latin {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.12em;
  opacity: 0.85;
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.nav-links a {
  color: inherit;
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.4s var(--ease-water);
}

.nav-links a:hover { opacity: 1; }

.nav-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.14em;
  padding: 6px 12px;
  border: 1px solid rgba(242, 244, 241, 0.35);
  border-radius: 100px;
}

.nav-status .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #9BD6B8;
  box-shadow: 0 0 8px #9BD6B8;
  animation: breathe 3.2s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

@media (max-width: 720px) {
  .nav { padding: 18px 20px; }
  .nav-links { display: none; }
  .nav-status .label { display: none; }
}

/* ——— Section chrome ——— */

.section {
  padding: 140px 0;
  position: relative;
}

@media (max-width: 640px) {
  .section { padding: 88px 0; }
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 64px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.section-index {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--stone);
  min-width: 40px;
}

.section-cn {
  font-family: var(--serif-cn);
  font-size: 32px;
  color: var(--ink);
  font-weight: 400;
}

.section-en {
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--stone);
  margin-left: auto;
}

@media (max-width: 640px) {
  .section-head { margin-bottom: 40px; gap: 14px; }
  .section-cn { font-size: 24px; }
  .section-en { font-size: 11px; }
}

/* ——— Typography primitives ——— */

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--stone);
  text-transform: uppercase;
}

.poetic {
  font-family: var(--serif-cn);
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

/* ——— Tweaks panel ——— */

.tweaks-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  background: rgba(242, 244, 241, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  padding: 20px;
  width: 280px;
  font-size: 12px;
  box-shadow: 0 20px 60px rgba(42, 58, 58, 0.12);
  display: none;
}

.tweaks-panel.visible { display: block; }

.tweaks-panel h3 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--stone);
  margin-bottom: 14px;
}

.tweaks-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 12px;
}

.tweaks-row label { color: var(--ink-soft); letter-spacing: 0.04em; }
.tweaks-row input[type="range"] { flex: 1; accent-color: var(--stone); }
.tweaks-row select {
  background: transparent;
  border: 1px solid var(--line);
  padding: 4px 8px;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink);
  text-transform: lowercase;
}
