:root {
  --ink: #1d1c1c;
  --paper: #fff48d;
  --coral: #ff8a7a;
  --peach: #ffc4a8;
  --cream: #fff4b0;
  --mint: #7ef0d4;
  --sky: #7ec8ff;
  --violet: #b794ff;
  --white: #ffffff;
  --shadow: 4px 4px 0 var(--ink);
  --radius-pill: 999px;
  --font-display: "Syne", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "DM Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background: linear-gradient(135deg, var(--coral) 0%, var(--peach) 35%, var(--cream) 70%, var(--paper) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.container {
  width: min(1120px, calc(100% - 3rem));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 1.25rem;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow);
}

.logo-mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.03em;
}

.logo-divider {
  width: 1px;
  height: 1.1rem;
  background: var(--ink);
}

.header-tag {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  padding: 6.5rem 1.25rem 9rem;
  overflow: hidden;
}

.portrait-wrap {
  position: relative;
  width: min(100%, 22rem);
  max-width: 100%;
  margin-inline: auto;
  padding: 1rem 0.75rem 0.5rem;
}

.portrait-back {
  position: absolute;
  inset: 0.65rem 0.75rem 0.5rem 0.75rem;
  border: 2px solid var(--ink);
  border-radius: 1.35rem;
  box-shadow: var(--shadow);
}

.portrait-back--violet {
  background: var(--violet);
  transform: rotate(-6deg);
}

.portrait-frame {
  position: relative;
  margin: 0;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 3px solid var(--ink);
  border-radius: 1.35rem;
  overflow: hidden;
  box-shadow: 8px 8px 0 var(--ink);
  background: var(--white);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.portrait-frame--about {
  transform: rotate(2deg);
}

.portrait-wrap:hover .portrait-frame {
  transform: rotate(0deg) translate(-3px, -3px);
  box-shadow: 11px 11px 0 var(--ink);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}

.portrait-caption {
  position: absolute;
  left: 0.75rem;
  top: 0;
  z-index: 2;
  padding: 0.4rem 0.75rem;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow);
  font-weight: 700;
  font-size: 0.72rem;
  transform: rotate(-4deg);
  max-width: calc(100% - 1.5rem);
}

.hero-badge {
  position: absolute;
  top: clamp(5rem, 12vw, 8rem);
  right: clamp(1rem, 8vw, 6rem);
  width: clamp(7rem, 14vw, 9.5rem);
  height: clamp(7rem, 14vw, 9.5rem);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
  border-radius: 50%;
  background: var(--mint);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(0.72rem, 1.4vw, 0.85rem);
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  transform: rotate(8deg);
}

.hero-art-left,
.hero-art-right {
  position: absolute;
  width: clamp(8rem, 18vw, 14rem);
  opacity: 0.95;
}

.hero-art-left {
  left: clamp(-1rem, 4vw, 3rem);
  bottom: clamp(8rem, 18vh, 12rem);
  transform: rotate(-12deg);
}

.hero-art-right {
  right: clamp(-1rem, 4vw, 3rem);
  bottom: clamp(10rem, 22vh, 14rem);
  transform: rotate(10deg);
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero-kicker {
  margin: 0 0 1rem;
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  font-weight: 600;
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.2rem, 11vw, 9.5rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.hero-title span {
  display: block;
}

.hero-sub {
  margin: 2rem auto 0;
  max-width: 34rem;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  line-height: 1.65;
}

.scroll-cta {
  position: fixed;
  left: 50%;
  bottom: 5.5rem;
  transform: translateX(-50%);
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.35rem;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow);
  font-weight: 600;
  transition: transform 0.2s ease;
}

.scroll-cta:hover {
  transform: translateX(-50%) translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.scroll-cta-icon {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ink);
  animation: bounce 1.8s ease-in-out infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(4px);
  }
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0.35rem;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow);
}

.bottom-nav a {
  padding: 0.65rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  transition: background 0.2s ease;
}

.bottom-nav a:hover,
.bottom-nav a.active {
  background: var(--paper);
}

.lang-switch {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 45;
  display: flex;
  overflow: hidden;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow);
}

.lang-switch button {
  padding: 0.65rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.lang-switch button.active {
  background: var(--paper);
}

.faq-fab {
  position: fixed;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 45;
  width: 3.4rem;
  height: 3.4rem;
  display: grid;
  place-items: center;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 50%;
  box-shadow: var(--shadow);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.72rem;
}

section {
  padding: clamp(4rem, 10vw, 7rem) 0;
}

.section-intro {
  position: relative;
}

.section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.section-headline {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.section-lead {
  margin: 1.5rem 0 0;
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.7;
  max-width: 36rem;
}

.tagline-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 0.55rem 1rem;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow);
  font-weight: 700;
  font-size: 0.92rem;
}

.art-panel {
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0 1rem;
}

.phase-section {
  background: rgba(255, 255, 255, 0.28);
  border-block: 2px solid var(--ink);
}

.phase-label {
  margin: 0 0 2rem;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.phase-cards {
  display: grid;
  gap: 2rem;
}

.phase-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 1.5rem;
  box-shadow: var(--shadow);
}

.phase-number {
  width: 3.5rem;
  height: 3.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
}

.phase-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.phase-card p {
  margin: 0.85rem 0 0;
  line-height: 1.65;
  color: rgba(29, 28, 28, 0.88);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.project-card {
  padding: 1.5rem;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.project-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.project-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.project-card p {
  margin: 0.75rem 0 0;
  line-height: 1.6;
  font-size: 0.95rem;
}

.project-tag {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.35rem 0.7rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--mint);
}

.questions-section {
  padding-block: clamp(5rem, 12vw, 8rem);
}

.questions-kicker {
  margin: 0 0 2rem;
  font-size: 1rem;
  font-weight: 600;
}

.question-stack {
  display: grid;
  gap: 1rem;
}

.question-item {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.question-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.5rem;
  text-align: left;
}

.question-trigger h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.1rem, 2.5vw, 1.65rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.question-arrow {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  transition: transform 0.25s ease;
}

.question-item.open .question-arrow {
  transform: rotate(180deg);
}

.question-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.question-answer-inner {
  padding: 0 1.5rem 1.35rem;
  line-height: 1.65;
}

.cta-section {
  text-align: center;
  padding-bottom: 8rem;
}

.cta-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 7vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.cta-sub {
  margin: 1.25rem 0 2rem;
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.5rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow);
  font-weight: 700;
  transition: transform 0.2s ease;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.btn-primary {
  background: var(--ink);
  color: var(--white);
}

.btn-secondary {
  background: var(--white);
}

.site-footer {
  padding: 1.5rem 0 7rem;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.75;
}

.faq-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(29, 28, 28, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.faq-modal.open {
  opacity: 1;
  visibility: visible;
}

.faq-panel {
  width: min(640px, 100%);
  max-height: min(80vh, 720px);
  overflow: auto;
  padding: 1.75rem;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 1.5rem;
  box-shadow: 8px 8px 0 var(--ink);
}

.faq-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.faq-panel-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
}

.faq-close {
  width: 2.5rem;
  height: 2.5rem;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  font-size: 1.1rem;
  font-weight: 700;
}

.faq-list details {
  border-top: 2px solid rgba(29, 28, 28, 0.12);
  padding: 0.85rem 0;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  line-height: 1.4;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list p {
  margin: 0.75rem 0 0;
  line-height: 1.6;
  color: rgba(29, 28, 28, 0.85);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

[data-lang="en"] .lang-zh,
[data-lang="zh"] .lang-en {
  display: none;
}

@media (max-width: 900px) {
  .section-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  #about .section-grid {
    gap: 2rem;
  }

  #about .section-grid > div:first-child {
    order: 2;
  }

  #about .art-panel {
    order: 1;
  }

  .portrait-wrap {
    width: min(100%, 17.5rem);
  }

  .hero-art-left,
  .hero-art-right {
    opacity: 0.35;
    width: 5rem;
  }

  .hero-title {
    font-size: clamp(2.4rem, 12vw, 4.5rem);
  }

  .hero-sub {
    font-size: 1rem;
    margin-top: 1.25rem;
  }

  .bottom-nav {
    width: calc(100% - 1.5rem);
    justify-content: space-between;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .bottom-nav a {
    padding: 0.55rem 0.65rem;
    font-size: 0.72rem;
    white-space: nowrap;
  }

  .scroll-cta {
    width: calc(100% - 1.5rem);
    max-width: 22rem;
    justify-content: center;
    font-size: 0.82rem;
    padding: 0.75rem 1rem;
    bottom: 5.25rem;
  }

  .scroll-cta:hover {
    transform: translateX(-50%);
  }
}

@media (max-width: 600px) {
  .site-header {
    width: calc(100% - 1.5rem);
    justify-content: center;
    gap: 0.65rem;
    padding: 0.55rem 1rem;
  }

  .site-header .logo-divider,
  .site-header .header-tag {
    display: none;
  }

  .hero {
    padding-top: 5.5rem;
    padding-bottom: 8.5rem;
  }

  .hero-badge {
    top: 4.5rem;
    right: 0.75rem;
    width: 5.5rem;
    height: 5.5rem;
    font-size: 0.6rem;
    padding: 0.65rem;
  }

  .hero-art-left,
  .hero-art-right {
    display: none;
  }

  .section-headline {
    font-size: clamp(1.65rem, 8vw, 2.25rem);
  }

  .section-lead {
    font-size: 0.98rem;
  }

  .portrait-wrap {
    width: min(100%, 16rem);
    padding-inline: 0.5rem;
  }

  .portrait-frame--about,
  .portrait-wrap:hover .portrait-frame--about {
    transform: none;
  }

  .portrait-back--violet {
    transform: rotate(-3deg);
  }

  .portrait-caption {
    left: 0.5rem;
    font-size: 0.68rem;
  }

  .container {
    width: min(1120px, calc(100% - 1.5rem));
  }

  .phase-card {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .phase-number {
    width: 3rem;
    height: 3rem;
    font-size: 1.2rem;
  }

  .question-trigger {
    padding: 1rem 1.1rem;
  }

  .question-trigger h3 {
    font-size: 1rem;
  }

  .lang-switch,
  .faq-fab {
    bottom: 4.75rem;
  }

  .lang-switch button {
    padding: 0.55rem 0.75rem;
  }

  .faq-fab {
    width: 3rem;
    height: 3rem;
    left: 0.75rem;
  }

  .lang-switch {
    right: 0.75rem;
  }
}
