/*
 * CSY portfolio — 2026-09-27 world-class UI layer.
 * This file deliberately sits last in the cascade: it unifies the latest site
 * without replacing any media, games, model viewers, or project experiences.
 */
:root {
  --wc-bg: #050a08;
  --wc-surface: #09110d;
  --wc-paper: #f2efe6;
  --wc-muted: #9da79f;
  --wc-acid: #c8ff2e;
  --wc-acid-soft: #dfff72;
  --wc-line: rgba(224, 239, 220, .16);
  --wc-line-strong: rgba(224, 239, 220, .31);
  --wc-pad: clamp(22px, 3.7vw, 72px);
  --wc-serif: Georgia, "Times New Roman", "Songti SC", STSong, serif;
  --wc-sans: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --wc-ease: cubic-bezier(.22, 1, .36, 1);
  --wc-shadow: 0 24px 80px rgba(0, 0, 0, .42);
  --scroll-progress: 0;
}

html {
  background: var(--wc-bg);
  scrollbar-color: #627631 #07100c;
  scrollbar-width: thin;
}

body {
  background: var(--wc-bg);
  color: var(--wc-paper);
  font-family: var(--wc-sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  background: var(--wc-acid);
  content: "";
  height: 2px;
  left: 0;
  position: fixed;
  top: 0;
  transform: scaleX(var(--scroll-progress));
  transform-origin: left center;
  width: 100%;
  z-index: 999;
}

::selection { background: var(--wc-acid); color: #081008; }

a,
button { -webkit-tap-highlight-color: transparent; }

a:focus-visible,
button:focus-visible,
model-viewer:focus-visible {
  outline: 2px solid var(--wc-acid);
  outline-offset: 4px;
}

/* Global editorial navigation */
.topbar {
  background: linear-gradient(180deg, rgba(3, 8, 6, .82), rgba(3, 8, 6, 0));
  border-bottom-color: rgba(231, 241, 226, .13);
  height: 78px;
  padding-inline: var(--wc-pad);
}

.brand { gap: 14px; }
.brand strong {
  font-family: var(--wc-serif);
  font-size: 27px;
  letter-spacing: -.07em;
}
.brand span,
.top-center,
.sound span { font-family: var(--wc-sans); letter-spacing: .22em; }

.work-nav {
  backdrop-filter: blur(16px);
  background: rgba(4, 9, 7, .92);
  border-color: var(--wc-line);
  min-height: 60px;
}

.work-nav a {
  position: relative;
  transition: color .25s ease;
}

.work-nav div a::after {
  background: var(--wc-acid);
  bottom: -10px;
  content: "";
  height: 1px;
  left: 0;
  position: absolute;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .35s var(--wc-ease);
  width: 100%;
}

.work-nav div a:hover,
.work-nav div a.is-active { color: var(--wc-paper); }
.work-nav div a:hover::after,
.work-nav div a.is-active::after { transform: scaleX(1); }

/* Hero — cinematic but calm */
.hero {
  background: #06100d;
  min-height: 720px;
}

.hero::after {
  background:
    linear-gradient(90deg, transparent 0 49.94%, rgba(225, 238, 219, .09) 50%, transparent 50.06%),
    linear-gradient(rgba(225, 238, 219, .045) 1px, transparent 1px);
  background-size: 100% 100%, 100% 72px;
  content: "";
  inset: 78px var(--wc-pad) 54px;
  pointer-events: none;
  position: absolute;
  z-index: 2;
}

.media { transition: transform .65s var(--wc-ease); }
.poster,
.hero-video {
  filter: brightness(.56) saturate(.74) contrast(1.09);
}

.shade {
  background:
    radial-gradient(circle at 50% 44%, rgba(27, 61, 47, .05), transparent 30%),
    linear-gradient(90deg, rgba(2, 7, 5, .88) 0%, rgba(3, 8, 6, .2) 49%, rgba(2, 7, 5, .76) 100%),
    linear-gradient(0deg, rgba(2, 6, 4, .94) 0%, transparent 48%, rgba(2, 7, 5, .33) 100%);
}

.grid-lines { inset: 78px var(--wc-pad) 54px; opacity: .19; }
.edition { left: var(--wc-pad); top: 112px; }

.hero-copy {
  left: var(--wc-pad);
  top: 46%;
  transform: translateY(-42%);
  width: min(68vw, 1120px);
}

.eyebrow {
  color: rgba(239, 243, 234, .72);
  font: 500 9px/1.4 var(--wc-sans);
  letter-spacing: .34em;
  margin-bottom: clamp(24px, 3vh, 38px);
}

.hero h1 {
  font-family: var(--wc-serif);
  font-size: clamp(78px, 11.2vw, 190px);
  letter-spacing: -.078em;
  line-height: .66;
  text-shadow: 0 22px 70px rgba(0, 0, 0, .48);
}

.hero h1 .second { margin-left: clamp(68px, 8.8vw, 164px); }
.hero h1 em { color: var(--wc-acid); font-style: italic; }

.hero-intro {
  gap: clamp(40px, 6vw, 110px);
  margin-left: clamp(62px, 9.5vw, 176px);
  margin-top: clamp(40px, 5vh, 62px);
}

.hero-intro > p {
  color: rgba(244, 242, 232, .86);
  font-size: 16px;
  line-height: 1.85;
  text-wrap: balance;
}

.enter {
  background: rgba(4, 10, 7, .38);
  border: 1px solid rgba(235, 242, 230, .5);
  border-radius: 1px;
  min-height: 72px;
  overflow: hidden;
  position: relative;
  transition: background .35s ease, border-color .35s ease, color .35s ease, transform .45s var(--wc-ease), box-shadow .35s ease;
  width: 322px;
}

.enter::before {
  background: var(--wc-acid);
  content: "";
  inset: 0;
  position: absolute;
  transform: translateX(-102%);
  transition: transform .55s var(--wc-ease);
}

.enter > * { position: relative; z-index: 1; }
.enter:hover {
  background: transparent;
  border-color: var(--wc-acid);
  box-shadow: 0 14px 44px rgba(150, 209, 26, .18);
  transform: translateY(-4px);
}
.enter:hover::before { transform: translateX(0); }

.category-rail {
  border-color: var(--wc-line-strong);
  right: var(--wc-pad);
  transform: translateY(-41%);
  width: min(350px, 25vw);
}

.rail-head { font-size: 7px; padding-bottom: 14px; }
.category-rail button {
  border-color: var(--wc-line);
  grid-template-columns: 34px 1fr 24px;
  height: 64px;
  min-height: 44px;
  transition: background .3s ease, color .3s ease, padding .4s var(--wc-ease);
}
.category-rail button > span { font-size: 15px; }
.category-rail small { font-size: 7px; }
.category-rail button:hover,
.category-rail button.active { background: rgba(199, 255, 46, .055); padding-left: 14px; }

.hero-foot { bottom: 23px; left: var(--wc-pad); right: var(--wc-pad); }
.scene-number { color: rgba(241, 242, 232, .1); }

/* One compact header system for all six sections */
.image-archive,
.video-archive,
.game-archive--approved,
.modeling-archive,
.product-project,
.workflow-placeholder {
  background-color: var(--wc-bg);
  border-top: 1px solid var(--wc-line);
  color: var(--wc-paper);
  position: relative;
}

.image-archive::before,
.video-archive::before,
.game-archive--approved::before,
.modeling-archive::before,
.product-project::before,
.workflow-placeholder::before {
  background-image:
    linear-gradient(rgba(226, 239, 220, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226, 239, 220, .035) 1px, transparent 1px),
    radial-gradient(circle at 58% 0%, rgba(118, 169, 73, .11), transparent 38%);
  background-size: 72px 72px, 72px 72px, auto;
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.archive-unified-head {
  align-items: end !important;
  display: grid !important;
  gap: clamp(24px, 3.2vw, 62px) !important;
  grid-template-columns: minmax(285px, .82fr) minmax(420px, 1.44fr) minmax(240px, .72fr) !important;
  min-height: 218px !important;
  padding: 34px var(--wc-pad) 30px !important;
  position: relative;
  z-index: 3;
}

.archive-unified-head h2 {
  align-self: center;
  font: 400 clamp(58px, 6.2vw, 112px)/.74 var(--wc-serif) !important;
  letter-spacing: -.07em !important;
  margin: 0 !important;
  text-wrap: balance;
  white-space: normal;
}

.archive-unified-head h2 em {
  color: var(--wc-acid) !important;
  display: block;
  font-style: italic;
}

.image-archive-entry,
.video-archive-entry,
.modeling-archive-entry,
.archive-unified-entry { align-self: center !important; }

.image-archive-entry > p,
.video-archive-entry > p,
.modeling-archive-entry > p,
.archive-unified-entry > p {
  color: var(--wc-paper) !important;
  font: 600 11px/1.2 var(--wc-sans) !important;
  letter-spacing: .19em !important;
  margin: 0 0 18px !important;
}

.image-archive-entry > a:not(.image-archive-button),
.video-archive-entry > span,
.modeling-archive-entry > span,
.archive-unified-entry > span {
  border-left: 2px solid var(--wc-acid) !important;
  color: var(--wc-muted) !important;
  font: 500 10px/1.3 var(--wc-sans) !important;
  letter-spacing: .16em !important;
  padding: 8px 0 8px 16px !important;
  width: auto !important;
}

.image-archive-entry > a.image-archive-button,
.video-archive-entry > a,
.modeling-archive-entry > a,
.archive-unified-entry > a {
  background: var(--wc-acid) !important;
  border: 1px solid var(--wc-acid) !important;
  border-radius: 2px !important;
  box-shadow: 0 0 0 1px rgba(200, 255, 46, .08), 0 14px 38px rgba(118, 171, 24, .13) !important;
  height: 54px !important;
  margin: 20px 0 0 !important;
  min-height: 54px !important;
  padding: 5px 6px 5px 20px !important;
  transition: background .25s ease, color .25s ease, transform .35s var(--wc-ease), box-shadow .25s ease !important;
  width: min(318px, 100%) !important;
}

.image-archive-entry > a.image-archive-button strong,
.video-archive-entry > a strong,
.modeling-archive-entry > a strong,
.archive-unified-entry > a strong {
  font: 700 17px/1.1 var(--wc-sans) !important;
  letter-spacing: -.02em !important;
  white-space: nowrap;
}

.image-archive-entry > a.image-archive-button i,
.video-archive-entry > a i,
.modeling-archive-entry > a i,
.archive-unified-entry > a i {
  background: #10200f !important;
  border-radius: 0 !important;
  color: var(--wc-acid-soft) !important;
  height: 42px !important;
  min-height: 42px !important;
  transition: transform .35s var(--wc-ease);
  width: 42px !important;
}

.image-archive-entry > a.image-archive-button:hover,
.video-archive-entry > a:hover,
.modeling-archive-entry > a:hover,
.archive-unified-entry > a:hover {
  background: var(--wc-acid-soft) !important;
  box-shadow: 0 0 0 1px rgba(223, 255, 114, .7), 0 20px 54px rgba(155, 217, 31, .22) !important;
  transform: translateY(-3px) !important;
}

.image-archive-entry > a.image-archive-button:hover i,
.video-archive-entry > a:hover i,
.modeling-archive-entry > a:hover i,
.archive-unified-entry > a:hover i { transform: translate(2px, -2px); }

.archive-unified-status,
.image-archive-head > div:last-child,
.video-archive-status,
.modeling-archive-status {
  align-self: end;
  color: rgba(224, 232, 220, .75) !important;
  font: 500 clamp(9px, .72vw, 12px)/1.65 var(--wc-sans) !important;
  gap: 9px !important;
  justify-content: flex-start !important;
  letter-spacing: .16em !important;
  position: static !important;
  text-align: left !important;
  white-space: normal;
}

.archive-unified-status b,
.image-archive-head > div:last-child b,
.video-archive-status b,
.modeling-archive-status b { background: var(--wc-acid); flex: 0 0 6px; height: 6px; width: 6px; }

/* Film lanes: dense, image-first, uninterrupted */
.image-archive { padding-bottom: 0; }
.image-reels { gap: 0 !important; }
.image-reel-loop {
  background: #050807;
  border-color: rgba(222, 234, 216, .14) !important;
  gap: 6px;
  padding: 15px 5px 17px !important;
}
.image-reel-loop::before,
.image-reel-loop::after { background-color: #202722; opacity: .92; }
.image-frame {
  border-color: rgba(235, 241, 231, .18);
  transition: border-color .25s ease, transform .45s var(--wc-ease), box-shadow .35s ease;
}
.image-frame img { transition: filter .35s ease, transform .7s var(--wc-ease); }
.image-frame:hover {
  border-color: var(--wc-acid);
  box-shadow: 0 16px 44px rgba(0, 0, 0, .42), 0 0 0 1px rgba(200, 255, 46, .2);
  transform: translateY(-3px) scale(1.012);
}
.image-frame:hover img { transform: scale(1.055); }

/* Video, games, 3D, projects: consistent divider and hover depth */
.motion-drum,
.game-approved-body,
.modeling-stage,
.project-approved-board { border-top: 1px solid var(--wc-line); }

/* Defer painting the expensive lower chapters until they approach the viewport. */
@supports (content-visibility: auto) {
  .game-archive--approved,
  .modeling-archive,
  .product-project,
  .workflow-placeholder {
    contain-intrinsic-size: auto 900px;
    content-visibility: auto;
  }
}

.motion-drum-arrow,
.modeling-controls button {
  min-height: 44px;
  min-width: 44px;
}

.game-approved-art,
.project-approved-board img { transition: filter .5s ease, transform .9s var(--wc-ease) !important; }
.game-approved-body:hover .game-approved-art,
.project-approved-board:hover img { filter: brightness(1.035) saturate(1.03); transform: scale(1.006); }

.project-archive-head h2 em { color: var(--wc-acid) !important; }
.project-archive-entry > a {
  background: var(--wc-acid) !important;
  border-color: var(--wc-acid) !important;
  box-shadow: 0 0 0 1px rgba(200, 255, 46, .08), 0 14px 38px rgba(118, 171, 24, .13) !important;
  color: #0b130a !important;
}
.project-archive-entry > a i { background: #10200f !important; color: var(--wc-acid-soft) !important; }
.project-approved-board { border-top-color: var(--wc-line); }

.modeling-viewer-wrap {
  border-color: rgba(200, 255, 46, .17);
  box-shadow: var(--wc-shadow), inset 0 0 90px rgba(76, 131, 76, .055);
}

/* Workflow inherits the same editorial stage instead of feeling like a footer. */
.workflow-placeholder {
  min-height: clamp(520px, 65vw, 820px);
  overflow: hidden;
}
.workflow-placeholder .workflow-copy h2 {
  font-family: var(--wc-serif);
  letter-spacing: -.06em;
}
.workflow-placeholder .workflow-copy h2 em { color: var(--wc-acid); }

/* Scroll reveal only enhances; content remains visible without JS. */
.wc-reveal-ready .wc-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s ease, transform .9s var(--wc-ease);
}
.wc-reveal-ready .wc-reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Compact responsive rules */
@media (max-width: 1180px) {
  .archive-unified-head {
    gap: 24px !important;
    grid-template-columns: minmax(270px, .8fr) minmax(360px, 1.2fr) minmax(190px, .6fr) !important;
  }
  .archive-unified-head h2 { font-size: clamp(52px, 6.3vw, 76px) !important; }
  .category-rail { width: 280px; }
}

@media (max-width: 950px) {
  .hero-copy { width: 74vw; }
  .hero h1 { font-size: 12.8vw; }
  .category-rail { display: none; }
  .archive-unified-head {
    align-items: start !important;
    grid-template-columns: 1fr 1fr !important;
    min-height: 260px !important;
    padding-block: 34px 28px !important;
  }
  .archive-unified-head h2 { font-size: clamp(50px, 9vw, 82px) !important; grid-column: 1 / -1; grid-row: 1; }
  .image-archive-entry,
  .video-archive-entry,
  .modeling-archive-entry,
  .archive-unified-entry { grid-column: 1; grid-row: 2; }
  .archive-unified-status,
  .image-archive-head > div:last-child,
  .video-archive-status,
  .modeling-archive-status { grid-column: 2; grid-row: 2; justify-self: end; max-width: 260px; }
}

@media (max-width: 700px) {
  :root { --wc-pad: 20px; }
  .topbar { height: 66px; }
  .hero { min-height: 690px; }
  .hero::after { inset: 66px 20px 50px; }
  .hero-copy { left: 20px; right: 20px; top: 42%; width: auto; }
  .hero h1 { font-size: clamp(60px, 18vw, 104px); line-height: .72; }
  .hero h1 .second { margin-left: 0; }
  .hero-intro { display: block; margin-left: 0; margin-top: 36px; }
  .hero-intro > p { font-size: 14px; margin-bottom: 22px; }
  .enter { min-height: 62px; width: min(100%, 340px); }
  .work-nav {
    height: 54px;
    min-height: 54px;
    padding: 0;
  }
  .work-nav .mini-brand,
  .work-nav > span { display: none; }
  .work-nav > div {
    align-items: center;
    display: flex;
    gap: 0;
    max-width: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 0 14px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    width: 100%;
  }
  .work-nav > div::-webkit-scrollbar { display: none; }
  .work-nav > div a {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    font-size: 8px;
    height: 54px;
    justify-content: center;
    letter-spacing: .16em;
    min-width: 58px;
    padding: 0 10px;
    scroll-snap-align: center;
  }
  .work-nav div a::after { bottom: 8px; left: 10px; width: calc(100% - 20px); }
  .archive-unified-head {
    display: flex !important;
    flex-direction: column;
    gap: 18px !important;
    min-height: 0 !important;
    padding: 34px 20px 28px !important;
  }
  .archive-unified-head h2 { font-size: clamp(48px, 14.5vw, 78px) !important; order: 1; }
  .image-archive-entry,
  .video-archive-entry,
  .modeling-archive-entry,
  .archive-unified-entry { order: 2; width: 100%; }
  .archive-unified-status,
  .image-archive-head > div:last-child,
  .video-archive-status,
  .modeling-archive-status { justify-self: auto; max-width: none; order: 3; }
  .image-archive-entry > a.image-archive-button,
  .video-archive-entry > a,
  .modeling-archive-entry > a,
  .archive-unified-entry > a { width: min(318px, 100%) !important; }
  .image-frame:hover { transform: none; }
}

@media (pointer: coarse) {
  .cursor { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
  .wc-reveal-ready .wc-reveal { opacity: 1; transform: none; }
}

/* Clear bilingual hierarchy: expressive English plus immediately readable Chinese. */
.hero h1 { line-height: .80; text-wrap: balance; }
.hero h1 > span { display: block; }
.hero h1 .second { margin-top: .045em; }
.hero-title-cn { color: rgba(244,246,237,.9); display:block; font-family:"Microsoft YaHei","PingFang SC",sans-serif; font-size:clamp(15px,1.15vw,21px); font-weight:650; letter-spacing:.26em; line-height:1.15; margin:.7em 0 0 .28em; text-transform:none; }
.section-title-en { display:block; }
.archive-unified-head h2 .section-title-cn,.game-mobile h2 .section-title-cn,.workflow-copy h2 .section-title-cn { color:rgba(244,246,237,.88); display:block; font-family:"Microsoft YaHei","PingFang SC",sans-serif; font-size:clamp(14px,1.05vw,19px); font-style:normal; font-weight:650; letter-spacing:.22em; line-height:1.2; margin:clamp(12px,1.35vw,20px) 0 0 .34em; text-transform:none; }
@media (max-width:700px) { .hero h1{line-height:.84}.hero h1 .second{margin-top:.07em}.hero-title-cn{font-size:13px;letter-spacing:.18em;margin-top:.75em}.archive-unified-head h2 .section-title-cn,.game-mobile h2 .section-title-cn,.workflow-copy h2 .section-title-cn{font-size:12px;margin-top:11px} }
