:root {
  color-scheme: light;
  --paper: #f4f5f2;
  --paper-warm: #eeede7;
  --surface: #e4e8e7;
  --ink: #202628;
  --soft-ink: #445052;
  --muted: #737c7d;
  --line: rgba(32, 38, 40, 0.16);
  --line-strong: rgba(32, 38, 40, 0.28);
  --moss: #697469;
  --clay: #a99582;
  --white: #ffffff;
  --max: 1360px;
  --desktop-min: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: var(--desktop-min);
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  letter-spacing: 0;
}

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

.image-loader {
  position: relative;
  display: block;
  width: 100%;
  background:
    linear-gradient(110deg, transparent 8%, rgba(255, 255, 255, 0.38) 18%, transparent 33%),
    var(--surface);
  background-size: 220% 100%;
  overflow: hidden;
}

.image-loader:not(.is-loaded) {
  animation: image-placeholder 1.4s linear infinite;
}

@keyframes image-placeholder {
  from {
    background-position: 220% 0;
  }

  to {
    background-position: -220% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .image-loader {
    animation: none;
  }
}

.image-loader::after {
  content: "图片加载中，请稍等";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  color: rgba(68, 80, 82, 0.68);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-align: center;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    visibility 180ms ease;
}

.image-loader.is-loaded::after {
  opacity: 0;
  visibility: hidden;
}

.image-loader > img {
  width: 100%;
}

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

button {
  font: inherit;
}

.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--paper);
  position: relative;
  overflow: hidden;
}

.hero-panel {
  grid-column: 1;
  grid-row: 1;
  width: clamp(300px, 26vw, 420px);
  padding: clamp(28px, 4vw, 58px);
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  min-height: 100svh;
  background: linear-gradient(
    90deg,
    rgba(250, 250, 247, 0.86),
    rgba(250, 250, 247, 0.58)
  );
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-right: 1px solid var(--line);
  box-shadow: 24px 0 60px rgba(32, 38, 40, 0.08);
  z-index: 2;
}

.eyebrow,
.section-index,
.small-title {
  margin: 0;
  color: var(--muted);
  font-size: 20px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-title {
  align-self: start;
  padding-top: clamp(28px, 6vw, 84px);
}

.hero-title h1,
.section-head h2,
.contact-section h2,
.project-copy h3,
.skill-header h3 {
  margin: 0;
  font-family:
    "Times New Roman", "Noto Serif SC", "Songti SC", SimSun, serif;
  font-weight: 500;
  line-height: 1.04;
}

.hero-title h1 {
  font-size: clamp(42px, 5vw, 84px);
}

.hero-title p {
  margin: 18px 0 0;
  color: var(--soft-ink);
  font-size: 14px;
}

.hero-menu {
  display: grid;
  gap: clamp(22px, 4vh, 44px);
  margin-bottom: clamp(34px, 8vh, 96px);
}

.hero-menu a {
  width: fit-content;
  font-family:
    "Times New Roman", "Noto Serif SC", "Songti SC", SimSun, serif;
  font-size: clamp(24px, 2.1vw, 34px);
  line-height: 1.1;
  border-bottom: 1px solid transparent;
  transition:
    color 180ms ease,
    border-color 180ms ease;
}

.hero-menu a:hover,
.hero-menu a:focus-visible {
  color: var(--moss);
  border-color: currentColor;
}

.hero-note {
  max-width: 260px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.hero-image {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  min-height: 100svh;
  z-index: 1;
}

.hero-image picture,
.hero-image img {
  width: 100%;
  height: 100%;
}

.hero-image picture {
  display: block;
}

.hero-image img {
  object-fit: cover;
}

.section {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(80px, 10vw, 150px) 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(140px, 0.28fr) minmax(0, 0.72fr);
  column-gap: clamp(28px, 5vw, 88px);
  align-items: end;
  margin-bottom: clamp(38px, 6vw, 76px);
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 56px);
  white-space: nowrap;
}

.section-head p:last-child {
  grid-column: 2;
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.projects-section .project-disclaimer {
  margin-top: 10px;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.projects-section .section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.projects-section .section-head .section-index {
  margin-bottom: 8px;
}

.projects-section .section-head h2 {
  margin-bottom: 12px;
}

.projects-section .section-head p:last-child {
  grid-column: auto;
}

.method-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.method-step {
  min-height: 140px;
  padding: clamp(16px, 1.8vw, 22px);
  border-right: 1px solid var(--line);
}

.method-step:last-child {
  border-right: 0;
}

.method-step span {
  color: var(--clay);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.method-step strong {
  display: block;
  margin-top: 18px;
  font-size: clamp(18px, 1.55vw, 23px);
  font-weight: 500;
}

.method-step p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.control-system {
  display: grid;
  grid-template-columns: minmax(180px, 0.24fr) minmax(0, 0.76fr);
  gap: clamp(20px, 2.8vw, 40px);
  margin-top: clamp(24px, 3vw, 38px);
  align-items: start;
}

.control-intro {
  position: sticky;
  top: 28px;
  padding-top: 4px;
}

.control-intro h3 {
  margin: 10px 0 0;
  font-family:
    "Times New Roman", "Noto Serif SC", "Songti SC", SimSun, serif;
  font-size: clamp(24px, 2.1vw, 34px);
  font-weight: 500;
  line-height: 1.12;
}

.control-intro p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.control-table {
  width: 100%;
  display: block;
  border-top: 1px solid var(--line-strong);
  border-collapse: collapse;
}

.control-table thead,
.control-table tbody {
  display: block;
}

.control-row {
  display: grid;
  grid-template-columns: minmax(92px, 0.16fr) minmax(220px, 0.42fr) minmax(220px, 0.42fr);
  gap: clamp(12px, 1.6vw, 22px);
  width: 100%;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.control-head {
  padding: 0 0 7px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.control-head th {
  color: var(--muted);
  font-weight: 500;
}

.control-row th {
  font-weight: 500;
  color: var(--ink);
  text-align: left;
}

.control-row th,
.control-row td {
  padding: 0;
  vertical-align: top;
}

.control-row td {
  color: var(--soft-ink);
}

.control-row:not(.control-head) td {
  font-size: 12px;
  line-height: 1.48;
}

.sop-pair {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: clamp(22px, 3vw, 36px);
  margin-top: clamp(42px, 5vw, 68px);
  align-items: start;
}

.sop-right {
  padding-top: 40px;
}

.sop-pair figure {
  margin: 0;
}

.sop-pair img {
  width: 100%;
  height: auto;
  background: var(--surface);
}

.sop-pair figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.sop-pair figcaption span,
.caption-kicker {
  color: var(--ink);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-right: 10px;
}

.work-card,
.project-hero-figure {
  margin: 0;
}

.work-card img,
.project-hero-figure img {
  width: 100%;
  height: auto;
  background: var(--surface);
}

.project-hero-figure figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.project-block {
  padding: clamp(56px, 8vw, 112px) 0;
  border-top: 1px solid var(--line);
}

.project-block:first-child {
  padding-top: 0;
  border-top: 0;
}

.project-opener {
  display: grid;
  grid-template-columns: minmax(260px, 0.34fr) minmax(0, 0.66fr);
  gap: clamp(26px, 4vw, 58px);
  align-items: end;
}

.project-copy {
  padding-bottom: 8px;
}

.project-copy .section-index {
  margin-bottom: 18px;
}

.project-copy h3 {
  font-size: clamp(36px, 5vw, 78px);
  white-space: nowrap;
}

.project-copy p {
  margin: 18px 0 0;
  color: var(--muted);
}

.project-tags,
.contact-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.project-tags span,
.contact-tags span {
  border: 1px solid var(--line);
  padding: 5px 10px;
  color: var(--soft-ink);
  font-size: 12px;
}

.project-divider {
  display: grid;
  grid-template-columns: minmax(160px, 0.26fr) minmax(0, 0.74fr);
  gap: 28px;
  margin: clamp(50px, 7vw, 92px) 0 24px;
  align-items: end;
}

.project-divider h4 {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 34px);
  font-weight: 500;
}

.project-divider p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.baseline-grid,
.gallery-grid,
.skill-gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 32px);
  align-items: start;
}

.baseline-grid .work-card:first-child {
  grid-column: span 8;
}

.baseline-grid .work-card:last-child {
  grid-column: span 4;
  margin-top: clamp(28px, 5vw, 70px);
}

.work-card {
  grid-column: span 4;
}

.work-card.is-wide {
  grid-column: span 7;
}

.work-card.is-medium {
  grid-column: span 5;
}

.work-card.is-square {
  grid-column: span 4;
}

.work-card.is-small {
  grid-column: span 3;
}

.work-card.is-tall {
  grid-column: span 4;
}

.work-card.is-full {
  grid-column: 1 / -1;
}

#skill-root .skill-block.is-material-rendering .work-card,
#skill-root .skill-block.is-material-rendering .work-card.is-small {
  grid-column: span 4;
}

#skill-root .skill-block.is-material-rendering .work-card img {
  aspect-ratio: 4 / 3;
  height: clamp(180px, 22vw, 280px);
  object-fit: cover;
}

.work-card img {
  transition:
    filter 220ms ease,
    transform 220ms ease;
}

.work-card:hover img {
  filter: saturate(0.95) contrast(1.02);
}

.image-caption {
  margin-top: 10px;
}

.prompt-trigger {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0 0 3px;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  color: var(--soft-ink);
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.prompt-trigger::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--moss);
}

.prompt-trigger:hover,
.prompt-trigger:focus-visible {
  color: var(--ink);
  outline: 0;
}

.prompt-panel {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    max-height 240ms ease,
    opacity 200ms ease,
    padding-top 240ms ease;
}

.work-card.is-open .prompt-panel {
  max-height: 520px;
  opacity: 1;
  padding-top: 14px;
}

.prompt-panel dl {
  display: grid;
  grid-template-columns: minmax(74px, 0.24fr) minmax(0, 0.76fr);
  gap: 7px 14px;
  margin: 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
}

.prompt-panel dt {
  color: var(--muted);
  font-size: 12px;
}

.prompt-panel dd {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.55;
}

.skill-block {
  padding: clamp(44px, 6vw, 84px) 0;
  border-top: 1px solid var(--line);
}

.skill-block:first-child {
  padding-top: 0;
  border-top: 0;
}

.skill-header {
  display: grid;
  grid-template-columns: minmax(180px, 0.26fr) minmax(0, 0.74fr);
  gap: 28px;
  margin-bottom: 28px;
  align-items: end;
}

.skill-header h3 {
  font-size: clamp(28px, 3.4vw, 52px);
}

.skill-header p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
}

.contact-section {
  width: 100%;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line-strong);
  position: relative;
  overflow: hidden;
}

.contact-visual {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--surface);
}

.contact-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.contact-overlay {
  position: absolute;
  left: clamp(32px, 7vw, 148px);
  right: auto;
  bottom: clamp(28px, 4.4vw, 64px);
  display: grid;
  grid-template-columns: minmax(220px, 0.86fr) minmax(190px, 0.48fr);
  width: min(66vw, 780px);
  gap: clamp(18px, 3vw, 42px);
  align-items: end;
  padding-top: clamp(14px, 1.8vw, 24px);
  border-top: 1px solid rgba(32, 38, 40, 0.18);
  color: rgba(32, 38, 40, 0.82);
}

.contact-section h2 {
  margin: 0;
  font-size: clamp(30px, 3.4vw, 52px);
}

.contact-section p {
  margin: 8px 0 0;
  color: rgba(68, 80, 82, 0.78);
  font-size: clamp(12px, 1vw, 14px);
}

.contact-stack {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.contact-methods {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-style: normal;
  color: rgba(32, 38, 40, 0.8);
}

.contact-methods a {
  width: fit-content;
  border-bottom: 1px solid rgba(32, 38, 40, 0.22);
}

.contact-methods span {
  display: inline-block;
  min-width: 34px;
  margin-right: 10px;
  color: rgba(68, 80, 82, 0.62);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.sop-zoomable {
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sop-zoomable:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.zoom-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.zoom-modal img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  cursor: zoom-out;
}

.zoom-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
  z-index: 10000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.zoom-modal-close:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}
