:root {
  --ink: #202124;
  --muted: #6c625a;
  --paper: #fffaf2;
  --line: #e7dccd;
  --coral: #e85d48;
  --green: #2f8f70;
  --gold: #d69f28;
  --violet: #6d5bd0;
  --shadow: 0 18px 60px rgba(32, 33, 36, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background:
    radial-gradient(circle at 18% 10%, rgba(232, 93, 72, 0.18), transparent 24rem),
    radial-gradient(circle at 85% 18%, rgba(47, 143, 112, 0.16), transparent 22rem),
    linear-gradient(135deg, #fffaf2 0%, #f8f1e8 48%, #f4fbf7 100%);
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.cursor-light {
  position: fixed;
  inset: auto;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(214, 159, 40, 0.22), transparent 68%);
  transform: translate(-50%, -50%);
  z-index: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3.5rem);
  border-bottom: 1px solid rgba(231, 220, 205, 0.75);
  background: rgba(255, 250, 242, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 2.45rem;
  height: 2.45rem;
  place-items: center;
  border: 2px solid var(--ink);
  background: #ffe7a6;
  box-shadow: 5px 5px 0 var(--ink);
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.nav-link,
.page-controls button,
.primary-action,
.icon-action,
.pager-btn {
  border: 1px solid var(--ink);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.nav-link {
  min-width: 4.5rem;
  min-height: 2.25rem;
  padding: 0.45rem 0.8rem;
}

.nav-link:hover,
.nav-link.is-active,
.primary-action:hover,
.icon-action:hover,
.page-controls button:hover,
.pager-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--ink);
}

.nav-link.is-active {
  background: #bfe9d6;
}

main {
  position: relative;
  z-index: 1;
  padding: clamp(1rem, 3vw, 2.5rem) clamp(1rem, 5vw, 4rem) 7rem;
}

.page {
  display: none;
  min-height: calc(100vh - 10rem);
  animation: pageIn 460ms ease both;
}

.page.is-active {
  display: block;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(18rem, 0.96fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  min-height: calc(100vh - 12rem);
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(5rem, 18vw, 12rem);
  line-height: 0.86;
  letter-spacing: 0;
}

.glitch {
  position: relative;
  display: inline-block;
  text-shadow: 5px 5px 0 #ffe7a6;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: -1;
}

.glitch::before {
  color: var(--coral);
  animation: glitchShift 2.6s infinite steps(2, end);
}

.glitch::after {
  color: var(--green);
  animation: glitchShift 3.1s infinite steps(2, end) reverse;
}

.typing {
  width: min(100%, 33rem);
  min-height: 2.2rem;
  margin: 1.4rem 0 0;
  color: #3d3934;
  font-size: clamp(1.1rem, 2.2vw, 1.55rem);
  line-height: 1.7;
}

.typing::after {
  content: "";
  display: inline-block;
  width: 0.14rem;
  height: 1.2em;
  margin-left: 0.24rem;
  vertical-align: -0.22em;
  background: var(--coral);
  animation: blink 900ms infinite;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 2rem;
}

.primary-action {
  min-height: 2.9rem;
  padding: 0.7rem 1.1rem;
  font-weight: 800;
  background: #ffcf64;
}

.icon-action {
  display: grid;
  width: 2.9rem;
  height: 2.9rem;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 900;
  background: #f6ddd2;
}

.hero-portrait {
  position: relative;
  display: grid;
  min-height: 32rem;
  place-items: center;
}

.sun {
  position: absolute;
  width: min(72vw, 25rem);
  aspect-ratio: 1;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 49%, rgba(32, 33, 36, 0.12) 50%, transparent 51%),
    linear-gradient(#ffd86f, #f28b62 60%, #7cc7a8);
  box-shadow: 0 28px 0 rgba(32, 33, 36, 0.08);
  animation: breathe 5s ease-in-out infinite;
}

.portrait-card {
  position: relative;
  display: grid;
  gap: 0.55rem;
  width: min(78vw, 21rem);
  padding: 2rem;
  border: 1px solid var(--ink);
  background: rgba(255, 250, 242, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.portrait-name {
  font-size: clamp(2rem, 6vw, 4.8rem);
  font-weight: 900;
  line-height: 0.96;
}

.portrait-line {
  color: var(--muted);
  font-weight: 700;
}

.orbit {
  position: absolute;
  border: 1px dashed rgba(32, 33, 36, 0.55);
  border-radius: 50%;
  animation: spin 18s linear infinite;
}

.orbit-one {
  width: 17rem;
  height: 7rem;
}

.orbit-two {
  width: 9rem;
  height: 24rem;
  animation-duration: 24s;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.home-notes {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(14rem, 0.8fr) minmax(14rem, 0.8fr);
  gap: 1rem;
  margin: 0 0 1rem;
}

.note-card {
  display: grid;
  align-content: start;
  gap: 0.85rem;
  min-height: 13rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.note-card:first-child {
  background:
    linear-gradient(135deg, rgba(255, 207, 100, 0.32), rgba(255, 255, 255, 0.78)),
    rgba(255, 255, 255, 0.72);
}

.note-card.accent-green {
  background: rgba(229, 247, 239, 0.82);
}

.note-card.accent-coral {
  background: rgba(255, 236, 226, 0.88);
}

.note-card span,
.story-kicker,
.work-highlights span {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.note-card h2 {
  max-width: 38rem;
  margin: 0;
  font-size: clamp(1.55rem, 3.2vw, 2.6rem);
  line-height: 1.12;
}

.note-card p,
.story-grid p,
.work-highlights p,
.album-notes p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.keyword-list,
.agenda-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.keyword-list li {
  min-height: 2.4rem;
  padding: 0.55rem 0.72rem;
  border: 1px solid rgba(32, 33, 36, 0.14);
  background: #fffaf2;
  font-weight: 800;
}

.agenda-list li {
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 1fr);
  gap: 0.65rem;
  align-items: baseline;
  color: var(--muted);
}

.agenda-list strong {
  color: var(--coral);
}

.stats-strip div,
.timeline article,
.work-page,
.upload-zone,
.gallery-grid figure,
.message-board,
.messages article {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow);
}

.stats-strip div {
  padding: 1.2rem;
}

.stats-strip strong {
  display: block;
  color: var(--coral);
  font-size: 2.35rem;
}

.stats-strip span {
  color: var(--muted);
  font-weight: 700;
}

.section-head {
  max-width: 48rem;
  margin: 2rem 0 2rem;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5.4rem);
  line-height: 1;
}

.section-head p:last-child {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
}

.shine {
  color: var(--ink);
  background: linear-gradient(90deg, var(--ink), var(--coral), var(--gold), var(--green), var(--ink));
  background-size: 240% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 5s linear infinite;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.timeline article {
  position: relative;
  min-height: 20rem;
  padding: 1.35rem;
  overflow: hidden;
}

.timeline article::before {
  content: "";
  position: absolute;
  inset: 0;
  height: 0.45rem;
  background: linear-gradient(90deg, var(--coral), var(--gold), var(--green));
}

.timeline span {
  display: inline-block;
  margin: 1rem 0 2.8rem;
  color: var(--green);
  font-size: 2.2rem;
  font-weight: 900;
}

.timeline h3,
.work-page h3 {
  margin: 0 0 0.8rem;
  font-size: 1.45rem;
}

.timeline p,
.work-page p {
  color: var(--muted);
  line-height: 1.8;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.story-grid article {
  min-height: 15rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
}

.story-grid h3 {
  margin: 1.1rem 0 0.65rem;
  font-size: 1.35rem;
}

.work-reader {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) 3rem;
  align-items: center;
  gap: 1rem;
}

.pager-btn {
  width: 3rem;
  height: 3rem;
  font-size: 2rem;
  font-weight: 800;
  background: #bfe9d6;
}

.work-page {
  min-height: 22rem;
  padding: clamp(1.2rem, 4vw, 3rem);
  overflow: hidden;
}

.work-page .number {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--ink);
  background: #ffcf64;
  font-weight: 900;
}

.work-season {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  margin-left: 0.5rem;
  padding: 0.2rem 0.65rem;
  border: 1px solid rgba(32, 33, 36, 0.18);
  color: var(--green);
  background: #f4fbf7;
  font-weight: 900;
}

.work-page h3 {
  margin-top: 2rem;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.05;
}

.work-page blockquote {
  margin: 1.25rem 0 0;
  padding: 0.9rem 1rem;
  border-left: 0.35rem solid var(--coral);
  color: #4b453f;
  background: rgba(255, 250, 242, 0.86);
  font-weight: 800;
  line-height: 1.7;
}

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

.tag-list span {
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--line);
  background: #fffaf2;
  color: #5d554e;
  font-weight: 700;
}

.dots {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.dots button {
  width: 0.85rem;
  height: 0.85rem;
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: transparent;
}

.dots button.is-active {
  background: var(--coral);
}

.work-highlights,
.album-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.work-highlights article,
.album-notes article {
  padding: 1.1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
}

.work-highlights h3 {
  margin: 0.75rem 0 0.5rem;
  font-size: 1.3rem;
}

.album-notes {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 1.2rem;
}

.album-notes strong {
  color: var(--coral);
  font-size: 1.1rem;
}

.upload-zone {
  position: relative;
  margin-bottom: 1.2rem;
}

.upload-zone input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.upload-zone label {
  display: grid;
  min-height: 12rem;
  place-items: center;
  gap: 0.4rem;
  padding: 1.5rem;
  border: 2px dashed rgba(32, 33, 36, 0.42);
  text-align: center;
}

.upload-icon {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border: 1px solid var(--ink);
  background: #bfe9d6;
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 1.8rem;
  font-weight: 900;
}

.upload-zone small {
  color: var(--muted);
  line-height: 1.5;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.gallery-grid figure {
  margin: 0;
  padding: 0.75rem;
  animation: photoIn 420ms ease both;
}

.gallery-grid img,
.sample {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  overflow: hidden;
}

.sample-one {
  background:
    radial-gradient(circle at 19% 22%, #fff1a8 0 11%, rgba(255, 241, 168, 0.08) 12% 20%, transparent 21%),
    linear-gradient(180deg, rgba(255, 198, 126, 0.92) 0 34%, rgba(244, 144, 116, 0.78) 35% 57%, rgba(75, 151, 134, 0.9) 58% 100%);
}

.sample-one::before {
  content: "";
  position: absolute;
  inset: 35% 0 35%;
  background:
    linear-gradient(90deg, rgba(39, 79, 81, 0.92) 0 13%, transparent 13% 16%, rgba(39, 79, 81, 0.82) 16% 31%, transparent 31% 36%, rgba(39, 79, 81, 0.88) 36% 52%, transparent 52% 58%, rgba(39, 79, 81, 0.78) 58% 73%, transparent 73% 80%, rgba(39, 79, 81, 0.86) 80% 100%),
    repeating-linear-gradient(90deg, transparent 0 2.2rem, rgba(255, 241, 168, 0.38) 2.2rem 2.45rem);
  clip-path: polygon(0 15%, 11% 2%, 19% 17%, 31% 4%, 39% 22%, 51% 5%, 61% 19%, 72% 8%, 81% 25%, 91% 10%, 100% 20%, 100% 100%, 0 100%);
}

.sample-one::after {
  content: "";
  position: absolute;
  inset: 54% -9% -8%;
  background:
    linear-gradient(104deg, transparent 0 43%, rgba(255, 255, 255, 0.88) 43.5% 47%, transparent 47.5% 53%, rgba(255, 255, 255, 0.88) 53.5% 57%, transparent 57.5% 100%),
    repeating-linear-gradient(90deg, transparent 0 12%, rgba(255, 255, 255, 0.88) 12% 18%),
    linear-gradient(160deg, #314c50, #1e3036 62%, #14252a);
  transform: perspective(12rem) rotateX(32deg);
  transform-origin: bottom;
}

.sample-two {
  background:
    linear-gradient(45deg, rgba(47, 143, 112, 0.78), rgba(255, 250, 242, 0.8)),
    repeating-linear-gradient(0deg, rgba(32, 33, 36, 0.11) 0 1px, transparent 1px 16px);
}

.sample-three {
  background:
    radial-gradient(circle at 25% 28%, #ffcf64 0 16%, transparent 17%),
    linear-gradient(135deg, rgba(109, 91, 208, 0.62), rgba(232, 93, 72, 0.5), rgba(47, 143, 112, 0.58));
}

.sample-four {
  background:
    linear-gradient(180deg, rgba(148, 179, 195, 0.82) 0 42%, rgba(74, 104, 116, 0.9) 43% 100%),
    repeating-linear-gradient(90deg, rgba(255, 250, 242, 0.9) 0 0.6rem, transparent 0.6rem 2.2rem);
}

.sample-four::before {
  content: "";
  position: absolute;
  inset: 54% 0 0;
  background:
    radial-gradient(ellipse at 50% 25%, rgba(255, 255, 255, 0.7), transparent 34%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.28) 0 0.25rem, transparent 0.25rem 2.4rem);
}

.sample-five {
  background:
    radial-gradient(circle at 70% 28%, rgba(255, 207, 100, 0.9) 0 10%, transparent 11%),
    linear-gradient(135deg, rgba(39, 79, 81, 0.9), rgba(232, 93, 72, 0.74));
}

.sample-five::before {
  content: "";
  position: absolute;
  inset: 18% 16%;
  border: 0.55rem solid rgba(255, 250, 242, 0.82);
  box-shadow: 1rem 1rem 0 rgba(32, 33, 36, 0.2);
}

.gallery-grid figcaption {
  padding-top: 0.65rem;
  color: var(--muted);
  font-weight: 800;
}

.message-board {
  display: grid;
  grid-template-columns: minmax(16rem, 0.8fr) minmax(0, 1.2fr);
  gap: 1rem;
  padding: 1rem;
}

form,
.messages,
.message-side {
  display: grid;
  gap: 0.85rem;
}

.prompt-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.prompt-panel button {
  min-height: 2.35rem;
  padding: 0.48rem 0.72rem;
  border: 1px solid rgba(32, 33, 36, 0.18);
  color: var(--ink);
  background: #fffaf2;
  font-weight: 800;
}

.prompt-panel button:hover {
  border-color: var(--ink);
  background: #bfe9d6;
}

label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  padding: 0.8rem;
  color: var(--ink);
  background: #fffaf2;
  outline: none;
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(232, 93, 72, 0.16);
}

.messages article {
  padding: 1rem;
  box-shadow: none;
}

.messages strong {
  color: var(--green);
}

.messages p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.page-controls {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: min(calc(100% - 2rem), 28rem);
  padding: 0.75rem;
  border: 1px solid var(--line);
  background: rgba(255, 250, 242, 0.9);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
  backdrop-filter: blur(16px);
}

.page-controls button {
  flex: 1;
  min-height: 2.4rem;
  background: #fff;
  font-weight: 800;
}

.page-controls span {
  min-width: 5.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes glitchShift {
  0%, 100% {
    transform: translate(0, 0);
  }
  32% {
    transform: translate(0.12em, -0.04em);
  }
  64% {
    transform: translate(-0.07em, 0.06em);
  }
}

@keyframes breathe {
  50% {
    transform: scale(1.04);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shine {
  to {
    background-position: 240% center;
  }
}

@keyframes photoIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(0.6rem);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-nav {
    justify-content: flex-start;
    width: 100%;
  }

  .nav-link {
    flex: 1 1 5rem;
  }

  .hero,
  .timeline,
  .gallery-grid,
  .message-board,
  .stats-strip,
  .home-notes,
  .story-grid,
  .work-highlights,
  .album-notes {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-portrait {
    min-height: 24rem;
  }

  .work-reader {
    grid-template-columns: 2.6rem minmax(0, 1fr) 2.6rem;
    gap: 0.55rem;
  }

  .pager-btn {
    width: 2.6rem;
    height: 2.6rem;
  }
}

@media (max-width: 520px) {
  main {
    padding-inline: 0.85rem;
  }

  h1 {
    font-size: clamp(4.5rem, 26vw, 7.5rem);
  }

  .section-head h2 {
    font-size: clamp(2.1rem, 13vw, 3.5rem);
  }

  .hero-actions,
  .page-controls {
    gap: 0.5rem;
  }

  .page-controls {
    width: calc(100% - 1rem);
    bottom: 0.5rem;
  }

  .page-controls span {
    min-width: 4.7rem;
    font-size: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
