/* ============================================================
   Kanghe Lyu site — page.css v2
   Shared by notes.html / projects.html.
   Subpage shell with canvas particles, cards, animations.
   ============================================================ */

body { background: var(--bg-deep); }

/* ---- Full math background canvas (shared with homepage) ---- */
#bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-deep);
  pointer-events: none;
  touch-action: none;
}

.page {
  position: relative;
  z-index: 2;
  width: min(960px, 92vw);
  margin: 0 auto;
  padding: 100px 0 80px;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 36px;
  color: var(--cyan);
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  transition: all 0.3s var(--ease-out-expo);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
}
.back:hover {
  color: var(--cyan-bright);
  border-color: var(--glass-border);
  background: var(--glass-bg);
  text-shadow: 0 0 12px rgba(168, 230, 230, 0.4);
  transform: translateX(-4px);
}

h1 {
  font-size: clamp(2.8rem, 6.5vw, 4.5rem);
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--paper);
  margin-bottom: 20px;
  text-shadow: 0 0 30px rgba(168, 230, 230, 0.12), 0 2px 4px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 0.8s var(--ease-out-expo) 0.15s both;
}

.intro {
  max-width: 680px;
  font-size: clamp(1rem, 1.7vw, 1.15rem);
  line-height: 1.85;
  color: var(--ink);
  margin-bottom: 48px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  animation: fadeInUp 0.8s var(--ease-out-expo) 0.3s both;
}

h2 {
  font-size: 1.2rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin: 40px 0 16px;
  text-shadow: 0 0 12px rgba(244, 217, 160, 0.2);
  position: relative;
  padding-left: 16px;
  animation: fadeInUp 0.8s var(--ease-out-expo) 0.35s both;
}
h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--gold), var(--cyan-dim));
  box-shadow: 0 0 8px rgba(244, 217, 160, 0.3);
}

/* ---- Liquid glass item cards ----
   Fill, border and backdrop come from the shared glass group in base.css,
   so cards look identical across pages. */
.note,
.project {
  min-width: 0;
  max-width: 100%;
  padding: 24px 24px 22px;
  border-radius: 20px;
  transition: transform 0.35s var(--ease-out-expo), border-color 0.35s ease, box-shadow 0.35s ease;
}
.note:hover,
.project:hover {
  border-color: rgba(224, 255, 255, 0.46);
  transform: translateY(-3px);
  box-shadow: 0 22px 58px rgba(0,0,0,0.24), 0 0 24px rgba(120, 226, 255, 0.1), inset 0 1px 0 rgba(255,255,255,0.23);
}
.note-actions,
.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 1;
}

/* ---- Subpage buttons ----
   Same shared glass material as the homepage buttons; only sizing differs. */
.page .button {
  padding: 9px 18px;
  color: var(--paper);
  text-decoration: none;
  font-size: 0.88rem;
  font-family: var(--font-body);
  border-radius: var(--radius-md);
  transition: all 0.3s var(--ease-out-expo);
  position: relative;
  z-index: 1;
}
.page .button:hover {
  border-color: var(--gold);
  color: #fff;
  transform: translateY(-2px);
  background: rgba(168, 230, 230, 0.08);
  box-shadow: 0 10px 28px rgba(168, 230, 230, 0.12), 0 2px 8px rgba(0,0,0,0.16);
}

.footer {
  margin-top: 60px;
  color: var(--muted);
  opacity: 0.95;
  letter-spacing: 0.15em;
  font-size: 0.88rem;
  animation: fadeInUp 0.8s var(--ease-out-expo) 0.5s both;
}

/* ---- Responsive ---- */
@media (max-width: 760px) {
  .page {
    width: min(92vw, 960px);
    padding: 92px 0 56px;
  }
  .note, .project { padding: 20px 18px 18px; }
  .note-actions, .project-actions { gap: 8px; }
  .page .button { padding: 8px 14px; font-size: 0.84rem; }
}

@media (max-width: 360px) {
  .page { width: 94vw; }
}
