/* SONG MENGCHU — Editorial portfolio
   Replace the four color tokens below to change the whole visual system. */
:root {
  --paper: #f4f1e8;
  --ink: #11110f;
  --blue: #2038E8;
  --acid: #D8FF32;
  --muted: #69675f;
  --line: #24241f;
  --sans: "Archivo", "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --cn: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --page: 1480px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.modal-open { overflow: hidden; }
::selection { background: var(--blue); color: #fff; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; font: inherit; }
img { display: block; max-width: 100%; }
p, h1, h2, h3, figure, dl, dd { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }
.slash { color: var(--blue); }

/* Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 241, 232, .96);
}
.nav {
  width: min(calc(100% - 64px), var(--page));
  min-height: 72px;
  margin: 0 auto;
  border-bottom: 2px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
}
.nav-logo {
  justify-self: start;
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -.055em;
  line-height: 1;
}
.logo-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 4px;
  background: var(--blue);
}
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-link {
  position: relative;
  display: inline-flex;
  gap: 5px;
  align-items: baseline;
  padding: 26px 0 24px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 4px;
  background: var(--blue);
  transition: right .25s ease;
}
.nav-link:hover::after,
.nav-link.is-active::after { right: 0; }
.nav-link.is-active { color: var(--blue); }
.nav-en { font-size: 10px; letter-spacing: .04em; }
.nav-badge {
  justify-self: end;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
}
.nav-badge span { color: var(--blue); font-size: 16px; margin-left: 4px; }

main {
  width: min(calc(100% - 64px), var(--page));
  margin: 0 auto;
}

/* Shared type and buttons */
.section-title {
  font-size: clamp(32px, 3.4vw, 52px);
  font-weight: 900;
  letter-spacing: -.055em;
  line-height: .95;
}
.section-sub {
  margin-top: 7px;
  color: var(--blue);
  font-family: var(--cn);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
}
.btn {
  min-height: 42px;
  width: fit-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  border: 1.5px solid var(--ink);
  border-radius: 0;
  padding: 10px 16px;
  background: transparent;
  font-family: var(--cn);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.btn span { font-family: var(--sans); font-size: 17px; }
.btn:hover { background: var(--ink); color: var(--paper); transform: translate(-2px, -2px); }
.btn-solid { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-solid:hover { background: var(--ink); border-color: var(--ink); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
  align-items: center;
  gap: 38px;
  padding: 38px 0 42px;
}
.hero-text { min-width: 0; }
.hero-eyebrow {
  margin-bottom: 18px;
  font-family: var(--cn);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
}
.hero-title {
  font-size: clamp(64px, 8.1vw, 126px);
  font-weight: 900;
  letter-spacing: -.075em;
  line-height: .82;
  white-space: nowrap;
}
.title-underline { position: relative; display: inline-block; }
.squiggle {
  position: absolute;
  width: 54%;
  height: 16px;
  left: 16%;
  bottom: -16px;
  color: var(--blue);
  overflow: visible;
}
.hero-cn {
  margin-top: 38px;
  font-family: var(--cn);
  font-size: clamp(16px, 1.5vw, 21px);
  font-weight: 500;
  letter-spacing: .04em;
}
.hero-fields {
  margin-top: 13px;
  font-family: var(--cn);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
}
.hero-fields-en {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .12em;
}
.hero-text > .btn { margin-top: 25px; }
.hero-visual { position: relative; min-width: 0; }
.hero-figure {
  aspect-ratio: 1.23 / 1;
  overflow: hidden;
  background: #dedbd2;
}
.hero-figure img { width: 100%; height: 100%; object-fit: cover; }
.collab-badge {
  position: absolute;
  left: -18px;
  bottom: 26px;
  padding: 10px 12px;
  border: 1px solid var(--ink);
  background: var(--acid);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.05;
  transform: rotate(-2deg);
}
.collab-badge span { display: block; margin-top: 3px; }

/* Works */
.works { border-top: 2px solid var(--line); padding: 23px 0 28px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.filters { display: flex; flex-wrap: wrap; justify-content: flex-end; }
.filter-btn {
  min-height: 34px;
  border: 0;
  border-left: 1px solid rgba(17, 17, 15, .35);
  border-radius: 0;
  padding: 8px 13px;
  background: transparent;
  font-family: var(--cn);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.filter-btn:hover { color: var(--blue); }
.filter-btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.works-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 58px 26px;
  margin-top: 30px;
  padding-bottom: 48px;
}
.work-card {
  display: block;
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.work-card:nth-child(even) { margin-top: 52px; }
.work-media { position: relative; display: block; aspect-ratio: 1.48 / 1; overflow: hidden; background: #d9d6ce; }
.work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .65s cubic-bezier(.2, .65, .25, 1), filter .3s ease;
}
.work-card:hover .work-media img,
.work-card:focus-visible .work-media img { transform: scale(1.045); }
.view-tip {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 10px 13px;
  background: var(--acid);
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
}
.work-card:hover .view-tip,
.work-card:focus-visible .view-tip { opacity: 1; transform: translateY(0); }
.work-caption {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 28px;
  align-items: center;
  gap: 15px;
  padding-top: 14px;
}
.work-heading { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.work-num { font-size: 20px; font-weight: 900; letter-spacing: -.04em; }
.work-title { font-family: var(--cn); font-size: 18px; font-weight: 800; letter-spacing: .02em; }
.work-en {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.work-meta {
  border-left: 1px solid rgba(17, 17, 15, .45);
  padding-left: 15px;
  font-family: var(--cn);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.55;
  white-space: nowrap;
}
.work-meta span { display: block; font-family: var(--sans); letter-spacing: .05em; }
.work-arrow { justify-self: end; font-size: 25px; font-weight: 400; transition: transform .2s ease; }
.work-card:hover .work-arrow { transform: translate(3px, -3px); color: var(--blue); }
.works-note { color: var(--muted); font-family: var(--cn); font-size: 10px; letter-spacing: .03em; }

/* About */
.about { border-top: 2px solid var(--line); padding: 30px 0 38px; }
.about-grid { display: grid; grid-template-columns: minmax(230px, .78fr) minmax(0, 2fr); gap: 38px; }
.photo-placeholder {
  position: relative;
  aspect-ratio: 1.5 / 1;
  min-height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #aaa89f;
  background: #dcd9cf;
  color: #77756d;
}
.photo-placeholder::before,
.photo-placeholder::after {
  content: "";
  position: absolute;
  background: #aaa89f;
}
.photo-placeholder::before { width: 1px; height: 100%; left: 50%; }
.photo-placeholder::after { width: 100%; height: 1px; top: 50%; }
.photo-placeholder > span:first-child {
  z-index: 1;
  padding: 5px 9px;
  background: #dcd9cf;
  font-size: clamp(30px, 4vw, 54px);
  font-weight: 900;
  letter-spacing: -.05em;
}
.photo-note {
  position: absolute;
  z-index: 1;
  right: 10px;
  bottom: 9px;
  font-family: var(--cn);
  font-size: 9px;
}
.about-body {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-content: start;
  column-gap: 28px;
}
.about-index {
  grid-row: 1 / 8;
  color: transparent;
  font-size: 112px;
  font-weight: 400;
  letter-spacing: -.08em;
  line-height: .85;
  -webkit-text-stroke: 1.5px #8b8980;
}
.about-body .section-title { font-size: clamp(34px, 4vw, 60px); }
.about-lead {
  margin-top: 19px;
  font-family: var(--cn);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.7;
}
.about-desc,
.about-more {
  max-width: 600px;
  margin-top: 12px;
  color: #45443e;
  font-family: var(--cn);
  font-size: 12px;
  line-height: 1.9;
}
.about-more { color: var(--ink); }
.about-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 17px; }
.about-tags li { border: 1px solid #9c9a92; padding: 5px 9px; font-family: var(--cn); font-size: 10px; }
.about-body .btn { margin-top: 18px; }

/* Contact */
.contact { position: relative; border-top: 2px solid var(--line); padding: 31px 0 26px; }
.contact-title { font-size: clamp(48px, 6.5vw, 98px); font-weight: 900; letter-spacing: -.065em; line-height: .85; }
.contact-title-blue { color: var(--blue); }
.contact-cn { margin-top: 22px; font-family: var(--cn); font-size: 14px; font-weight: 500; letter-spacing: .05em; }
.contact-actions { position: absolute; right: 0; top: 44%; display: flex; gap: 9px; }
.contact-list {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 20px;
  margin-top: 34px;
  border-top: 1px solid rgba(17, 17, 15, .45);
  padding-top: 18px;
}
.contact-item dt { margin-bottom: 7px; font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.contact-item dd { font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.contact-item a { border-bottom: 1px solid transparent; }
.contact-item a:hover { border-color: var(--blue); color: var(--blue); }
.contact-item .is-placeholder { color: var(--muted); font-family: var(--cn); font-size: 11px; font-weight: 400; }

/* Footer */
.site-footer {
  width: min(calc(100% - 64px), var(--page));
  min-height: 64px;
  margin: 0 auto;
  border-top: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .05em;
}
.footer-links { color: var(--muted); }
.back-top { border: 0; padding: 12px 0 12px 12px; background: transparent; font-size: 9px; font-weight: 800; cursor: pointer; }
.back-top:hover { color: var(--blue); }
.back-top span { margin-left: 6px; font-size: 15px; }

/* Project dialog */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 28px; opacity: 0; transition: opacity .2s ease; }
.modal.is-open { opacity: 1; }
.modal-overlay { position: absolute; inset: 0; background: rgba(12, 12, 10, .76); }
.modal-panel {
  position: relative;
  width: min(1120px, 100%);
  max-height: min(820px, calc(100svh - 56px));
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  overflow: auto;
  border: 1px solid var(--ink);
  background: var(--paper);
  box-shadow: 10px 10px 0 var(--blue);
}
.modal-close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 0;
  background: var(--ink);
  color: #fff;
  font-size: 27px;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { background: var(--blue); }
.modal-media { min-height: 540px; background: #d8d5cc; }
.modal-media img { width: 100%; height: 100%; object-fit: cover; }
.modal-info { display: flex; flex-direction: column; padding: 54px 30px 28px; }
.modal-num { color: var(--blue); font-size: 13px; font-weight: 800; letter-spacing: .08em; }
.modal-title { margin-top: 12px; font-family: var(--cn); font-size: 32px; font-weight: 900; line-height: 1.2; }
.modal-en { margin-top: 7px; font-size: 10px; font-weight: 700; letter-spacing: .05em; }
.modal-meta { margin-top: 25px; border-block: 1px solid #a4a199; padding: 13px 0; font-family: var(--cn); font-size: 11px; line-height: 1.8; }
.modal-desc { margin-top: 22px; font-family: var(--cn); font-size: 13px; line-height: 1.9; }
.modal-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 28px; }
.modal-nav .btn { gap: 8px; padding-inline: 11px; font-size: 10px; }

/* Restrained entrance motion; content stays visible without JavaScript. */
.reveal-init .reveal { opacity: 0; transform: translateY(18px); }
.reveal-init .reveal.is-visible { opacity: 1; transform: translateY(0); transition: opacity .65s ease, transform .65s ease; }

@media (max-width: 1080px) {
  .hero { gap: 26px; }
  .hero-title { font-size: 7.9vw; }
  .nav { grid-template-columns: 1fr auto; }
  .nav-badge { display: none; }
  .about-grid { grid-template-columns: minmax(200px, .7fr) 2fr; gap: 26px; }
  .about-body { grid-template-columns: 85px minmax(0, 1fr); column-gap: 20px; }
  .about-index { font-size: 82px; }
  .contact-actions { position: static; margin-top: 22px; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 72px; }
  .nav, main, .site-footer { width: min(calc(100% - 36px), var(--page)); }
  .nav { min-height: 62px; gap: 12px; }
  .nav-logo { font-size: 20px; }
  .logo-dot { width: 6px; height: 6px; }
  .nav-links { gap: 16px; }
  .nav-link { padding: 22px 0 20px; font-size: 10px; }
  .nav-en { display: none; }
  .hero { grid-template-columns: 1fr; gap: 36px; padding: 30px 0 34px; }
  .hero-title { font-size: clamp(54px, 14.5vw, 104px); }
  .hero-cn { margin-top: 34px; }
  .hero-visual { width: calc(100% - 12px); margin-left: 12px; }
  .hero-figure { aspect-ratio: 1.35 / 1; }
  .collab-badge { left: -12px; bottom: 18px; }
  .section-head { display: block; }
  .filters { justify-content: flex-start; margin-top: 20px; }
  .filter-btn:first-child { border-left: 0; padding-left: 10px; }
  .works-grid { grid-template-columns: 1fr; gap: 40px; padding-bottom: 24px; }
  .work-card:nth-child(even) { margin-top: 0; }
  .work-caption { grid-template-columns: minmax(0, 1fr) auto 24px; gap: 10px; }
  .work-title { font-size: 17px; }
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .photo-placeholder { aspect-ratio: 1.8 / 1; min-height: 0; }
  .about-body { grid-template-columns: 72px minmax(0, 1fr); column-gap: 17px; }
  .about-index { font-size: 70px; }
  .contact-list { grid-template-columns: 1.4fr 1fr; row-gap: 24px; }
  .footer-links { display: none; }
  .modal { padding: 16px; }
  .modal-panel { grid-template-columns: 1fr; max-height: calc(100svh - 32px); box-shadow: 6px 6px 0 var(--blue); }
  .modal-media { min-height: 0; aspect-ratio: 1.35 / 1; }
  .modal-info { padding: 28px 22px 22px; }
  .modal-nav { margin-top: 0; }
}

@media (max-width: 430px) {
  .nav-links { gap: 12px; }
  .hero-title { font-size: 14.2vw; }
  .hero-fields { font-size: 10px; }
  .hero-fields-en { font-size: 8px; letter-spacing: .06em; }
  .section-title { font-size: 31px; }
  .filter-btn { padding-inline: 9px; font-size: 10px; }
  .work-meta { padding-left: 9px; font-size: 8px; }
  .work-heading { gap: 8px; }
  .work-num { font-size: 17px; }
  .work-en { max-width: 230px; }
  .about-body { display: block; position: relative; }
  .about-index { position: absolute; right: 0; top: 0; font-size: 56px; opacity: .55; }
  .about-body .section-title { position: relative; font-size: 36px; }
  .contact-title { font-size: 13.2vw; }
  .contact-actions { flex-wrap: wrap; }
  .contact-list { grid-template-columns: 1fr 1fr; }
  .contact-item:first-child { grid-column: 1 / -1; }
  .footer-name { font-size: 8px; }
}

/* =========================================================
   EDITORIAL MOTION LAYER — layout tokens remain unchanged
   ========================================================= */
.scroll-progress {
  position: fixed;
  z-index: 180;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}
.site-header .nav { transition: min-height .25s ease; }
.site-header.is-compact .nav { min-height: 52px; }
.site-header.is-compact .nav-link { padding-top: 17px; padding-bottom: 15px; }
.site-header.is-compact .nav-logo { font-size: 21px; }
.nav-links { position: relative; }
.nav-underline {
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--blue);
  pointer-events: none;
}

/* Intro: only initialized by JS on the first session visit. */
.intro {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--paper);
}
.intro-word {
  position: relative;
  display: flex;
  align-items: baseline;
  font-size: clamp(58px, 12vw, 180px);
  font-weight: 900;
  letter-spacing: -.075em;
  line-height: .8;
  white-space: nowrap;
}
.intro-word > span { display: inline-block; will-change: transform; }
.intro-square { width: .12em; height: .12em; margin-left: .08em; background: var(--blue); }
.intro-caption {
  position: absolute;
  bottom: 28px;
  left: 32px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
}

.page-transition {
  position: fixed;
  inset: 0;
  z-index: 450;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: #fff;
  transform: translateX(101%);
  pointer-events: auto;
}
.page-transition > span { font-size: clamp(68px, 14vw, 210px); font-weight: 900; letter-spacing: -.075em; line-height: .8; }
.page-transition > small { position: absolute; bottom: 28px; left: 32px; font-size: 9px; letter-spacing: .14em; }

/* Native cursor + Lenis integration. No custom cursor rendering loop. */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* Hero typography and image laboratory */
.hero-line { display: block; }
.hero-line:first-child { overflow: hidden; padding-bottom: .06em; }
.hero-line.title-underline { width: fit-content; overflow: visible; }
.title-word { position: relative; display: inline-block; white-space: nowrap; }
.char-mask { display: inline-block; overflow: hidden; vertical-align: bottom; }
.char { display: inline-block; will-change: transform; }
.title-word::before,
.title-word::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: var(--blue);
  opacity: 0;
  pointer-events: none;
}
.title-word.is-glitching::before { opacity: .9; clip-path: inset(15% 0 58% 0); transform: translateX(6px); }
.title-word.is-glitching::after { opacity: .75; clip-path: inset(62% 0 12% 0); transform: translateX(-5px); }
.hero-figure { position: relative; transform-style: preserve-3d; will-change: transform; }
.hero-figure:focus-visible { outline-offset: 6px; }
.hero-figure img { will-change: transform; }
.hero-explore {
  position: absolute;
  z-index: 4;
  left: 14px;
  bottom: 14px;
  padding: 8px 10px;
  background: var(--blue);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
  opacity: 0;
  transform: translateY(7px);
  transition: opacity .2s ease, transform .2s ease;
}
.hero-figure:hover .hero-explore,
.hero-figure:focus-visible .hero-explore { opacity: 1; transform: translateY(0); }
.hero-crosshair,
.lab-crosshair,
.about-crosshair {
  --cross-x: 50%;
  --cross-y: 50%;
  position: absolute;
  z-index: 3;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}
.hero-figure:hover .hero-crosshair { opacity: 1; }
.hero-crosshair::before,
.hero-crosshair::after,
.about-crosshair::before,
.about-crosshair::after {
  content: "";
  position: absolute;
  background: var(--blue);
}
.hero-crosshair::before,
.about-crosshair::before { left: var(--cross-x); top: 0; width: 1px; height: 100%; }
.hero-crosshair::after,
.about-crosshair::after { top: var(--cross-y); left: 0; width: 100%; height: 1px; }
.collab-badge { margin: 0; font-family: var(--sans); cursor: pointer; will-change: transform; }
.distortion-canvas { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.distortion-canvas.is-ready { opacity: 1; }

/* Work cards: separate parallax wrapper keeps the original grid geometry. */
.work-media { perspective: 900px; transform-style: preserve-3d; }
.work-media::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  background: rgba(32, 56, 232, .12);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.work-media::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0;
  border: 1px solid var(--blue);
  clip-path: inset(0 100% 0 0);
  transition: clip-path .45s cubic-bezier(.2,.7,.2,1);
  pointer-events: none;
}
.work-card:hover .work-media::before { opacity: 1; }
.work-card:hover .work-media::after { clip-path: inset(0 0 0 0); }
.work-parallax { position: absolute; inset: -6% 0; display: block; will-change: transform; }
.work-parallax > img { width: 100%; height: 100%; object-fit: cover; }
.work-card .work-num,
.work-card .work-title { transition: color .2s ease, letter-spacing .35s ease; }
.work-card:hover .work-num { color: var(--blue); }
.work-card:hover .work-title { letter-spacing: .045em; }
.work-arrow { display: inline-flex; align-items: center; gap: 0; }
.work-arrow::after { content: ""; width: 0; height: 1px; background: var(--blue); transition: width .25s ease; }
.work-card:hover .work-arrow::after { width: 12px; }
.view-tip { z-index: 4; }
.work-title .word-mask { display: inline-block; overflow: hidden; vertical-align: bottom; }
.work-title .word { display: inline-block; }

/* Sliding filter selection; FLIP motion is handled in JS. */
.filters { position: relative; }
.filter-marker { position: absolute; z-index: 0; top: 0; left: 0; height: 34px; background: var(--ink); pointer-events: none; }
.filter-btn { position: relative; z-index: 1; }
.filter-btn[aria-pressed="true"] { background: transparent; color: var(--paper); }
.filters:not(.has-marker) .filter-btn[aria-pressed="true"] { background: var(--ink); }

/* About and CTA motion accents */
.about-photo { position: relative; overflow: hidden; }
.about-photo:hover .about-crosshair { opacity: 1; }
.about-index svg { display: block; width: 100%; height: auto; overflow: visible; }
.about-index text { fill: transparent; stroke: #8b8980; stroke-width: 1.4; font-family: var(--sans); font-size: 96px; font-weight: 400; }
.contact-title-blue { display: inline-block; transform-origin: left center; }
.contact-list { position: relative; }
.contact-list::before { content: ""; position: absolute; top: -1px; left: 0; width: 100%; height: 1px; background: var(--blue); transform: scaleX(0); transform-origin: left; }
.word-reveal { display: inline-block; overflow: hidden; vertical-align: bottom; }
.word-reveal > span { display: inline-block; }

/* Full editorial case study. Homepage UI is intentionally untouched. */
.modal { padding: 18px; }
.modal-panel {
  width: 100%;
  max-height: calc(100svh - 36px);
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: 8px 8px 0 var(--blue);
}
.case-layout { display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(340px, .78fr); }
.modal-media {
  position: sticky;
  top: 0;
  align-self: start;
  height: calc(100svh - 38px);
  min-height: 560px;
  overflow: hidden;
  background: #d8d5cc;
}
.modal-media img { width: 100%; height: 100%; object-fit: cover; }
.modal-media figcaption {
  position: absolute;
  left: 16px;
  bottom: 15px;
  padding: 7px 9px;
  background: var(--paper);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .1em;
}
.modal-info { display: block; padding: 58px 34px 0; }
.case-intro { min-height: calc(100svh - 96px); display: flex; flex-direction: column; }
.case-intro .modal-desc { margin-bottom: 30px; }
.case-story { border-top: 2px solid var(--ink); }
.story-step { position: relative; min-height: 58vh; padding: 28px 0 46px 45px; border-bottom: 1px solid #99968e; }
.story-step::before { content: ""; position: absolute; left: 9px; top: 0; bottom: 0; width: 1px; background: #aaa79e; }
.story-step::after { content: ""; position: absolute; left: 5px; top: 32px; width: 9px; height: 9px; background: var(--paper); border: 1px solid var(--ink); transition: background-color .25s ease; }
.story-step.is-active::after { background: var(--blue); border-color: var(--blue); }
.story-index { position: absolute; left: 0; top: 25px; transform: translateX(-50%); background: var(--paper); padding: 3px 0; color: var(--blue); font-size: 9px; font-weight: 800; }
.story-label { font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.story-step h4 { margin: 16px 0 14px; font-family: var(--cn); font-size: 24px; line-height: 1.3; }
.story-step > p:last-child { font-family: var(--cn); font-size: 12px; line-height: 1.9; }
.process-strip { display: flex; gap: 9px; margin-top: 24px; padding-bottom: 9px; overflow-x: auto; scroll-snap-type: x mandatory; }
.process-frame { flex: 0 0 80%; scroll-snap-align: start; }
.process-frame > span { display: block; aspect-ratio: 1.25; overflow: hidden; background: #ddd; }
.process-frame img { width: 100%; height: 100%; object-fit: cover; }
.process-frame:nth-child(2) img { object-position: 25% 50%; transform: scale(1.25); }
.process-frame:nth-child(3) img { object-position: 80% 60%; transform: scale(1.4); }
.process-frame figcaption { display: flex; justify-content: space-between; margin-top: 7px; font-size: 8px; font-weight: 700; letter-spacing: .07em; }
.case-final { grid-column: 1 / -1; height: min(88svh, 900px); position: relative; overflow: hidden; background: #ccc; }
.case-final img { width: 100%; height: 115%; object-fit: cover; will-change: transform; }
.case-final figcaption { position: absolute; inset: auto 0 0; display: flex; justify-content: space-between; padding: 14px 18px; background: var(--paper); font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.modal-nav { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 10px; margin: 0; padding: 22px 24px; border-top: 2px solid var(--ink); }

/* Independent typography specimen, never modifies the original project image. */
.type-lab { margin-top: 34px; border-top: 2px solid var(--ink); padding-top: 18px; }
.type-lab-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.type-lab-head p { font-size: 8px; font-weight: 700; letter-spacing: .1em; }
.type-lab-head h4 { margin: 6px 0 0; font-size: 22px; letter-spacing: -.04em; }
.type-lab-actions { display: flex; gap: 5px; }
.type-lab-actions button { border: 1px solid var(--ink); border-radius: 0; padding: 6px 8px; background: transparent; font-size: 8px; font-weight: 800; cursor: pointer; }
.type-lab-actions button:hover,
.type-lab-actions button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.type-stage {
  position: relative;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin-top: 15px;
  overflow: hidden;
  border: 1px solid #aaa79e;
  background-color: var(--paper);
  background-image: linear-gradient(rgba(32,56,232,.13) 1px, transparent 1px), linear-gradient(90deg, rgba(32,56,232,.13) 1px, transparent 1px);
  background-size: 28px 28px;
  touch-action: pan-y;
}
.type-stage:not(.show-grid) { background-image: none; }
.type-char { position: relative; z-index: 2; display: inline-block; font-family: var(--cn); font-size: clamp(54px, 6vw, 84px); font-weight: 900; line-height: 1; user-select: none; touch-action: none; will-change: transform; }
.type-char:focus-visible { color: var(--blue); }
.type-stage-note { position: absolute; left: 9px; bottom: 8px; font-size: 7px; font-weight: 700; letter-spacing: .06em; }
.type-stage.show-grid .lab-crosshair { opacity: 1; }
.lab-crosshair::before,
.lab-crosshair::after { content: ""; position: absolute; background: var(--blue); }
.lab-crosshair::before { left: var(--cross-x); top: 0; width: 1px; height: 100%; }
.lab-crosshair::after { top: var(--cross-y); left: 0; width: 100%; height: 1px; }
.shared-image-clone { position: fixed; z-index: 440; margin: 0; object-fit: cover; pointer-events: none; will-change: transform, width, height; }

@media (max-width: 900px) {
  .case-layout { grid-template-columns: 1fr; }
  .modal-media { position: relative; height: 58svh; min-height: 360px; }
  .modal-info { padding: 34px 24px 0; }
  .case-intro { min-height: 0; padding-bottom: 42px; }
  .story-step { min-height: 0; padding-bottom: 50px; }
  .case-final { height: 64svh; }
  .type-char { font-size: 64px; }
}
@media (max-width: 760px) {
  .intro-word { font-size: 16vw; }
  .intro-caption, .page-transition > small { left: 18px; bottom: 18px; }
  .page-transition > span { font-size: 19vw; }
  .modal { padding: 0; }
  .modal-panel { max-height: 100svh; border: 0; box-shadow: none; }
  .modal-media { height: 52svh; min-height: 300px; }
  .modal-info { padding: 28px 18px 0; }
  .modal-title { font-size: 30px; }
  .case-final { height: 55svh; }
  .case-final figcaption { font-size: 7px; }
  .modal-nav { padding: 16px 12px; gap: 5px; }
  .modal-nav .btn { min-height: 38px; padding: 8px; font-size: 9px; }
  .type-stage { height: 260px; }
  .type-char { font-size: 54px; }
  .hero-explore { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal-init .reveal { opacity: 1; transform: none; }
  .work-card:hover .work-media img { transform: none; }
  .intro, .page-transition { display: none !important; }
  .work-parallax { inset: 0; transform: none !important; }
  .case-final img { height: 100%; transform: none !important; }
}
