/* ============================================================
   郭章煜 / Guo Zhangyu — Portfolio · JR-STYLE EDITION
   Poster-gothic · stark black & white · halftone · hairline grid
   ============================================================ */

:root {
  --paper: #ffffff;
  --ink: #0a0a0a;
  --ink-2: #5a5a5a;
  --ink-3: #9a9a9a;
  --line: rgba(0,0,0,0.16);
  --line-soft: rgba(0,0,0,0.09);
  --panel: #e8e7e3;
  --dark: #141414;
  --dark-2: #1d1d1d;

  /* signature accent — portfolio brand orange */
  --accent: #C55A11;
  --accent-soft: rgba(197,90,17,0.12);

  --display: "Archivo Black", "Noto Sans SC", system-ui, sans-serif;
  --sans: "Archivo", "Noto Sans SC", system-ui, sans-serif;
  --cn: "Noto Sans SC", system-ui, sans-serif;

  --pad-x: clamp(16px, 4vw, 56px);
  --bar-h: 64px;

  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-io: cubic-bezier(.16,1,.3,1);
  --t: .55s;
  --t-long: .95s;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { overflow-x: hidden; }
body.no-scroll { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: 0; cursor: pointer; }
::selection { background: var(--ink); color: var(--paper); }

/* utility label */
.lab {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.disp { font-family: var(--display); font-weight: 900; letter-spacing: -0.01em; line-height: 0.92; }

/* B&W image helper */
.bw { filter: grayscale(1) contrast(1.06); transition: filter var(--t-long) var(--ease); }

/* Halftone dot screen overlay */
.halftone { position: relative; }
.halftone::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(0,0,0,0.6) 30%, transparent 32%);
  background-size: 4px 4px;
  mix-blend-mode: soft-light;
  opacity: 0.55;
  pointer-events: none;
}

/* ============================================================
   PROGRESS + HEADER
   ============================================================ */
#progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  background: var(--ink); z-index: 300;
  transform: scaleX(0); transform-origin: left;
  transition: transform .1s linear;
}

.topbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--bar-h); z-index: 200;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: stretch;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.topbar .brand { display: flex; align-items: stretch; }
.topbar .cell {
  display: flex; align-items: center; justify-content: center;
  padding: 0 18px;
  border-right: 1px solid var(--line);
}
.topbar .cell.end { border-right: 0; border-left: 1px solid var(--line); }
.topbar .burger { gap: 5px; flex-direction: column; width: 22px; }
.topbar .burger span { display: block; width: 22px; height: 1.6px; background: var(--ink); transition: transform var(--t) var(--ease), opacity var(--t) var(--ease); }
.topbar .burger:hover span:nth-child(1) { transform: translateY(1.5px); }
.topbar .burger:hover span:nth-child(2) { transform: translateY(-1.5px); }

.monogram {
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px;
}
.monogram .mark {
  display: grid; place-items: center;
  width: 58px; height: 30px;
  border: 1.6px solid var(--ink);
  border-radius: 999px;
  font-family: var(--display); font-weight: 900;
  font-size: 14px; letter-spacing: 0.02em;
}
.monogram .nm {
  font-family: var(--sans); font-weight: 700;
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
}
@media (max-width: 640px) { .monogram .nm { display: none; } .monogram { padding: 0 14px; } }

.topbar .center {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-weight: 600;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-3);
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
}
@media (max-width: 880px) { .topbar .center { display: none; } }

.topbar .tools { display: flex; align-items: stretch; }
.icon-btn {
  display: grid; place-items: center;
  width: 60px; border-left: 1px solid var(--line);
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
.icon-btn:hover { background: var(--ink); color: var(--paper); }
.icon-btn svg { width: 18px; height: 18px; }

/* ============================================================
   FULLSCREEN MENU
   ============================================================ */
#menu {
  position: fixed; inset: 0; z-index: 250;
  background: var(--paper);
  display: grid; grid-template-rows: var(--bar-h) 1fr auto;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .7s var(--ease-io);
  pointer-events: none;
}
#menu.open { clip-path: inset(0 0 0 0); pointer-events: auto; }
.menu-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad-x); border-bottom: 1px solid var(--line);
}
.menu-top .lab { color: var(--ink); }
.menu-close { display: flex; align-items: center; gap: 10px; }
.menu-close .x { font-family: var(--display); font-size: 22px; line-height: 1; }
.menu-body {
  display: grid; grid-template-columns: 1.4fr 1fr;
  align-items: start; gap: 40px;
  padding: clamp(30px, 6vh, 80px) var(--pad-x);
  overflow-y: auto;
}
.menu-nav { display: flex; flex-direction: column; }
.menu-nav a {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(40px, 7vw, 92px); line-height: 1.02;
  letter-spacing: -0.01em; text-transform: uppercase;
  color: var(--ink);
  display: flex; align-items: baseline; gap: 20px;
  padding: 6px 0;
  transition: color var(--t) var(--ease), transform var(--t) var(--ease);
}
.menu-nav a .en { font-family: var(--sans); font-weight: 600; font-size: 0.18em; letter-spacing: 0.18em; color: var(--ink-3); }
.menu-nav a:hover { color: var(--ink-2); transform: translateX(18px); }
.menu-index { border-top: 1px solid var(--line); }
.menu-index .mi-head { padding: 16px 0; }
.menu-index .mi {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 14px; align-items: baseline;
  padding: 13px 0; border-top: 1px solid var(--line-soft);
  transition: padding-left var(--t) var(--ease);
}
.menu-index .mi:hover { padding-left: 10px; }
.menu-index .mi .n { font-family: var(--sans); font-weight: 600; font-size: 11px; letter-spacing: 0.1em; color: var(--ink-3); }
.menu-index .mi .t { font-family: var(--cn); font-weight: 500; font-size: 15px; }
.menu-index .mi .y { font-family: var(--sans); font-weight: 600; font-size: 11px; letter-spacing: 0.1em; color: var(--ink-3); }
.menu-foot {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding: 18px var(--pad-x); border-top: 1px solid var(--line);
}
@media (max-width: 760px) { .menu-body { grid-template-columns: 1fr; } }

/* reveal stagger for menu links */
#menu .stag { opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease-io), transform .6s var(--ease-io); }
#menu.open .stag { opacity: 1; transform: none; }
#menu.open .stag:nth-child(1) { transition-delay: .10s; }
#menu.open .stag:nth-child(2) { transition-delay: .16s; }
#menu.open .stag:nth-child(3) { transition-delay: .22s; }
#menu.open .stag:nth-child(4) { transition-delay: .28s; }
#menu.open .stag:nth-child(5) { transition-delay: .34s; }

/* ============================================================
   REVEAL
   ============================================================ */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity var(--t-long) var(--ease-io), transform var(--t-long) var(--ease-io); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal][data-d="1"] { transition-delay: .08s; }
[data-reveal][data-d="2"] { transition-delay: .16s; }
[data-reveal][data-d="3"] { transition-delay: .24s; }

[data-clip] { clip-path: inset(0 0 100% 0); transition: clip-path 1.1s var(--ease-io); }
[data-clip].in { clip-path: inset(0 0 0 0); }

/* Inside project detail overlays, never gate content behind scroll-reveal —
   the modal is a scroll-container where IntersectionObserver + clip-path
   transitions are unreliable and can leave images permanently hidden.
   Always show modal content fully; the panel itself still animates in. */
.pmodal [data-reveal] { opacity: 1 !important; transform: none !important; }
.pmodal [data-clip] { clip-path: none !important; }

/* ============================================================
   HERO — featured carousel · image keeps native aspect (no crop)
   · right whitespace varies per image · bottom-left nav card
   ============================================================ */
#hero {
  position: relative;
  height: 100svh; min-height: 600px;
  margin-top: var(--bar-h);
  background: var(--paper);
  overflow: hidden;
}

/* —— left: cycling featured image; width set by JS to image's native ratio —— */
.hero-stage {
  position: absolute; top: 0; left: 0; bottom: 0;
  width: 58%;
  overflow: hidden; background: #070707;
  border-right: 1px solid var(--ink);
  transition: width .9s var(--ease-io);
}
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.1s var(--ease); }
.hero-slide.active { opacity: 1; z-index: 1; }
.hero-slide img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.12) brightness(0.93);
  transform: scale(1.04); transition: transform 6.5s linear;
}
.hero-slide.active img { transform: scale(1); }
.hero-stage .htone {
  position: absolute; inset: 0; z-index: 2;
  background-image: radial-gradient(circle, rgba(0,0,0,0.5) 30%, transparent 32%);
  background-size: 5px 5px; mix-blend-mode: soft-light; opacity: 0.32; pointer-events: none;
}

/* —— right whitespace: kept intentionally empty, minimal corner detail —— */
.hero-corner {
  position: absolute; z-index: 3; top: clamp(18px, 3vh, 30px); right: var(--pad-x);
  display: flex; flex-direction: column; gap: 5px; text-align: right;
}
.hero-scrollcue {
  position: absolute; z-index: 3; right: var(--pad-x); bottom: clamp(20px, 4vh, 40px);
  display: inline-flex; align-items: center; gap: 12px; background: 0; cursor: pointer;
}
.hero-scrollcue .ln { width: 46px; height: 1px; background: var(--ink); transition: width var(--t) var(--ease); }
.hero-scrollcue:hover .ln { width: 72px; }

/* —— bottom-left navigation card (smaller, holds brand + featured + tabs) —— */
.hero-card {
  position: absolute; z-index: 4; left: clamp(14px, 2.2vw, 32px); bottom: clamp(16px, 4vh, 40px);
  width: min(348px, calc(100% - 28px));
  background: var(--paper); border: 1px solid var(--ink); cursor: pointer;
}
.hero-card .hc-brand { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 13px 18px 11px; border-bottom: 1px solid var(--ink); }
.hero-card .hc-mark { font-family: var(--cn); font-weight: 900; font-size: 22px; letter-spacing: 0.2em; }
.hero-card .hc-name { font-family: var(--sans); font-weight: 600; font-size: 10px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-3); }
.hero-card .hc-body { padding: 13px 18px 11px; }
.hero-card .hc-fl { font-family: var(--sans); font-weight: 700; font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-3); }
.hero-card .hc-title { font-family: var(--cn); font-weight: 700; font-size: clamp(18px, 1.7vw, 23px); line-height: 1.16; letter-spacing: 0.01em; margin-top: 7px; transition: opacity .4s var(--ease); }
.hero-card .hc-en { font-family: var(--sans); font-weight: 600; font-size: 9.5px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-3); margin-top: 6px; transition: opacity .4s var(--ease); }
.hero-card .hc-meta { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hero-card .hc-meta .l { font-family: var(--sans); font-weight: 600; font-size: 9.5px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-2); }
.hero-card .hc-meta .go { font-family: var(--sans); font-weight: 700; font-size: 9.5px; letter-spacing: 0.15em; text-transform: uppercase; display: inline-flex; gap: 7px; align-items: center; white-space: nowrap; }
.hero-card .hc-meta .go .ar { font-family: var(--display); font-size: 13px; transition: transform var(--t) var(--ease); }
.hero-card:hover .hc-meta .go .ar { transform: translate(2px,-2px); }

/* tabs — no numbers, no ruler; small index segments */
.hero-tabs { display: flex; border-top: 1px solid var(--ink); }
.hero-tabs button { flex: 1; height: 28px; background: transparent; border-right: 1px solid var(--line); position: relative; cursor: pointer; }
.hero-tabs button:last-child { border-right: 0; }
.hero-tabs button::after {
  content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 13px; height: 2px; background: var(--line);
  transition: background var(--t) var(--ease), width var(--t) var(--ease);
}
.hero-tabs button:hover::after { background: var(--ink-2); width: 17px; }
.hero-tabs button.active::after { background: var(--ink); width: 22px; }

@media (max-width: 760px) {
  .hero-corner { color: #fff; mix-blend-mode: difference; }
  .hero-scrollcue { color: #fff; mix-blend-mode: difference; }
  .hero-scrollcue .ln { background: #fff; }
}
@media (max-width: 520px) {
  .hero-card { left: 12px; right: 12px; width: auto; bottom: 12px; }
}

/* ============================================================
   MARQUEE DIVIDER
   ============================================================ */
.marquee {
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
  overflow: hidden; white-space: nowrap; padding: 16px 0;
  display: flex;
}
.marquee .run {
  display: inline-flex; gap: 28px; align-items: center;
  padding-right: 28px;
  animation: scroll-x 28s linear infinite;
  font-family: var(--display); font-weight: 900;
  font-size: 20px; letter-spacing: 0.02em; text-transform: uppercase;
  color: var(--ink);
}
.marquee .run .dot { color: var(--ink-3); }
@keyframes scroll-x { to { transform: translateX(-50%); } }

/* ============================================================
   SECTION HEADS
   ============================================================ */
section.block { padding: clamp(60px, 9vh, 130px) var(--pad-x); }
.sec-head { text-align: center; display: grid; justify-items: center; gap: 18px; }
.sec-head .kicker { display: flex; align-items: center; gap: 14px; }
.sec-head .kicker .ln { width: 30px; height: 1px; background: var(--ink-3); }
.sec-head .big {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(54px, 11vw, 150px); line-height: 0.9;
  letter-spacing: -0.01em; text-transform: uppercase;
}
.sec-head .big .en { display: block; }
.sec-head .big.cn { letter-spacing: 0.04em; }

/* ============================================================
   WORKS — compact horizontal quick-listing strip
   ============================================================ */
#works .strip-wrap { margin-top: clamp(36px, 5vh, 64px); position: relative; }
.strip {
  display: flex; gap: clamp(16px, 2vw, 30px);
  overflow-x: auto;
  scrollbar-width: none; -ms-overflow-style: none;
  padding: 4px var(--pad-x) 30px; margin: 0 calc(-1 * var(--pad-x));
  scroll-behavior: auto;
  -webkit-overflow-scrolling: touch;
}
.strip::-webkit-scrollbar { display: none; }

.scard {
  flex: 0 0 300px; width: 300px;
  display: block; text-align: left; color: inherit;
}
.scard .si { position: relative; overflow: hidden; aspect-ratio: 3/2; background: #efeee9; }
.scard .si img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.05); transform: scale(1.01);
  transition: filter var(--t-long) var(--ease), transform 1.2s var(--ease);
}
.scard:hover .si img { filter: grayscale(0) contrast(1); transform: scale(1.06); }
.scard .si .corner {
  position: absolute; top: 12px; left: 12px;
  background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-weight: 700; font-size: 10px; letter-spacing: 0.14em; padding: 5px 9px;
}
.scard .sc-cap { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--ink); }
.scard .sc-row { display: flex; justify-content: space-between; gap: 10px; font-family: var(--sans); font-weight: 600; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.scard h3 { font-family: var(--cn); font-weight: 700; font-size: 18px; letter-spacing: 0.01em; line-height: 1.3; }
.scard .en { font-family: var(--sans); font-weight: 600; font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); margin-top: 5px; }
.scard .desc { margin-top: 11px; font-family: var(--cn); font-weight: 400; font-size: 12.5px; line-height: 1.7; color: var(--ink-2); text-wrap: pretty; }
.scard .cue { margin-top: 13px; font-family: var(--sans); font-weight: 700; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; display: inline-flex; gap: 8px; align-items: center; border-bottom: 1px solid var(--ink); padding-bottom: 5px; }

.strip-ctrl { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.strip-bar { position: relative; height: 22px; cursor: pointer; touch-action: none; }
.strip-bar::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); transform: translateY(-50%); }
.strip-bar .bar { position: absolute; top: 50%; transform: translateY(-50%); height: 3px; background: var(--ink); cursor: grab; transition: height var(--t) var(--ease); will-change: left, width; }
.strip-bar:hover .bar, .strip-bar.dragging .bar { height: 6px; }
.strip-bar.dragging .bar { cursor: grabbing; }
.strip-count { font-family: var(--sans); font-weight: 700; font-size: 11px; letter-spacing: 0.16em; }
.strip-count .tot { color: var(--ink-3); }
.strip-arrows { display: flex; gap: 10px; }
.strip-arrows button { width: 42px; height: 42px; border: 1px solid var(--ink); display: grid; place-items: center; font-family: var(--display); font-size: 18px; transition: background var(--t) var(--ease), color var(--t) var(--ease); }
.strip-arrows button:hover { background: var(--ink); color: var(--paper); }

@media (max-width: 640px) {
  .scard { flex: 0 0 76vw; width: 76vw; }
  .strip-ctrl { grid-template-columns: 1fr; gap: 14px; }
}

/* ============================================================
   ABOUT
   ============================================================ */
#about { border-top: 1px solid var(--ink); }
.about-wrap { margin-top: clamp(40px, 6vh, 70px); display: grid; grid-template-columns: 5fr 7fr; gap: clamp(36px, 5vw, 80px); align-items: start; }
.about-portrait { position: relative; }
.about-portrait img { width: 100%; aspect-ratio: 4/5; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.about-portrait .tag {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--ink);
  display: flex; justify-content: space-between;
  font-family: var(--sans); font-weight: 600; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2);
}
.about-lead {
  font-family: var(--cn); font-weight: 700;
  font-size: clamp(26px, 3vw, 46px); line-height: 1.3; letter-spacing: 0.01em;
  text-wrap: balance; margin-bottom: 40px;
}
.about-lead em { font-style: normal; -webkit-text-stroke: 0; color: var(--ink); background: linear-gradient(transparent 62%, rgba(0,0,0,0.12) 62%); padding: 0 2px; }
.about-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 46px; }
.about-cols p { font-family: var(--cn); font-weight: 400; font-size: 14px; line-height: 1.9; color: var(--ink-2); text-wrap: pretty; }
.about-table { border-top: 1px solid var(--ink); }
.about-table .row { display: grid; grid-template-columns: 130px 1fr; gap: 20px; padding: 15px 0; border-bottom: 1px solid var(--line-soft); align-items: baseline; }
.about-table .k { font-family: var(--sans); font-weight: 700; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.about-table .v { font-family: var(--cn); font-weight: 500; font-size: 13.5px; color: var(--ink); }
@media (max-width: 760px) { .about-wrap { grid-template-columns: 1fr; } .about-cols { grid-template-columns: 1fr; gap: 22px; } }

/* ============================================================
   CONTACT / FOOTER
   ============================================================ */
#contact { border-top: 1px solid var(--ink); display: grid; grid-template-columns: 1.05fr 1fr; }
.foot-light { background: var(--panel); padding: clamp(48px, 7vh, 96px) var(--pad-x); display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.foot-light h2 { font-family: var(--cn); font-weight: 700; font-size: clamp(34px, 4.4vw, 72px); line-height: 1.02; letter-spacing: 0.01em; }
.foot-light h2 .en { display: block; font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: 0.52em; margin-top: 14px; letter-spacing: -0.01em; }
.foot-light .lead { font-family: var(--cn); font-weight: 400; font-size: 15px; line-height: 1.8; color: var(--ink-2); max-width: 40ch; margin-top: 24px; }
.foot-light .stamp { display: flex; gap: 14px; align-items: center; }
.foot-light .stamp .mk { display: grid; place-items: center; width: 58px; height: 30px; border: 1.6px solid var(--ink); border-radius: 999px; font-family: var(--display); font-weight: 900; font-size: 14px; }
.foot-light .stamp .tx { font-family: var(--sans); font-weight: 600; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }

.foot-dark { background: var(--dark); color: var(--paper); padding: clamp(48px, 7vh, 96px) var(--pad-x); display: flex; flex-direction: column; }
.foot-dark .lab { color: rgba(255,255,255,0.5); }
.foot-dark .clist { list-style: none; margin-top: 30px; }
.foot-dark .clist li { display: grid; grid-template-columns: 96px 1fr auto; gap: 18px; align-items: baseline; padding: 22px 0; border-top: 1px solid rgba(255,255,255,0.16); }
.foot-dark .clist li:last-child { border-bottom: 1px solid rgba(255,255,255,0.16); }
.foot-dark .clist .k { font-family: var(--sans); font-weight: 700; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.5); }
.foot-dark .clist .v { font-family: var(--sans); font-weight: 600; font-size: 17px; letter-spacing: 0.02em; user-select: all; }
.foot-dark .clist .v.cn { font-family: var(--cn); font-weight: 500; }
.foot-dark .clist .go { font-family: var(--display); font-size: 16px; opacity: 0.5; transition: opacity var(--t) var(--ease), transform var(--t) var(--ease); }
.foot-dark .clist a:hover .go { opacity: 1; transform: translate(2px,-2px); }
.foot-dark .big-mail { margin-top: auto; padding-top: 40px; }
.foot-dark .big-mail a { font-family: var(--display); font-weight: 900; font-size: clamp(20px, 2.4vw, 34px); letter-spacing: -0.01em; word-break: break-all; line-height: 1.05; display: inline-block; }
.foot-dark .big-mail a:hover { color: rgba(255,255,255,0.6); }

.colophon {
  grid-column: 1 / -1; background: var(--ink); color: var(--paper);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  padding: 26px var(--pad-x);
  font-family: var(--sans); font-weight: 600; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.55);
}
.colophon b { display: block; color: var(--paper); font-weight: 700; margin-bottom: 6px; }
@media (max-width: 880px) { #contact { grid-template-columns: 1fr; } .colophon { grid-template-columns: 1fr 1fr; } }

/* ============================================================
   PROJECT DETAIL OVERLAY
   ============================================================ */
.pmodal { position: fixed; inset: 0; z-index: 400; visibility: hidden; pointer-events: none; }
.pmodal.open { visibility: visible; pointer-events: auto; }
.pmodal-back { position: absolute; inset: 0; background: rgba(10,10,10,0.6); opacity: 0; transition: opacity var(--t-long) var(--ease); }
.pmodal.open .pmodal-back { opacity: 1; }
.pmodal-inner {
  position: absolute; inset: 0; background: var(--paper); overflow-y: auto; overflow-x: hidden;
  transform: translateY(34px); opacity: 0;
  transition: transform var(--t-long) var(--ease-io), opacity var(--t-long) var(--ease-io);
  scrollbar-width: thin; scrollbar-color: var(--ink-3) transparent;
}
.pmodal.open .pmodal-inner { transform: none; opacity: 1; }

.pbar {
  position: sticky; top: 0; z-index: 10;
  display: grid; grid-template-columns: auto 1fr auto; align-items: stretch;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); height: var(--bar-h);
}
.pbar .pb-close { display: flex; align-items: center; gap: 10px; padding: 0 22px; border-right: 1px solid var(--line); transition: background var(--t) var(--ease), color var(--t) var(--ease); }
.pbar .pb-close:hover { background: var(--ink); color: var(--paper); }
.pbar .pb-close .x { font-family: var(--display); font-size: 18px; line-height: 1; }
.pbar .pb-close .lab { color: inherit; }
.pbar .pb-mid { display: flex; align-items: center; gap: 16px; padding: 0 22px; }
.pbar .pb-mid .num { font-family: var(--sans); font-weight: 700; font-size: 11px; letter-spacing: 0.14em; color: var(--ink); }
.pbar .pb-mid .nm { font-family: var(--cn); font-weight: 600; font-size: 14px; }
.pbar .pb-nav { display: flex; }
.pbar .pb-nav button { width: 58px; border-left: 1px solid var(--line); font-family: var(--display); font-size: 18px; transition: background var(--t) var(--ease), color var(--t) var(--ease); }
.pbar .pb-nav button:hover { background: var(--ink); color: var(--paper); }
@media (max-width: 640px) { .pbar .pb-mid .nm { display: none; } }

/* detail hero — outlined title over halftone B&W */
.detail-hero { position: relative; height: 72vh; min-height: 460px; overflow: hidden; background: #060606; }
.detail-hero img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.2) brightness(0.82); }
.detail-hero .htone { position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(255,255,255,0.5) 30%, transparent 32%); background-size: 5px 5px; mix-blend-mode: overlay; opacity: 0.5; }
.detail-hero .dh-title {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 0 var(--pad-x);
}
.detail-hero .dh-title h1 {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(40px, 9vw, 150px); line-height: 0.94; letter-spacing: -0.01em;
  color: transparent; -webkit-text-stroke: 1.6px #fff; text-stroke: 1.6px #fff;
}
.detail-hero .dh-title h1 em { font-style: normal; color: #fff; -webkit-text-stroke: 0; }
.detail-hero .dh-sub { position: absolute; left: var(--pad-x); bottom: 26px; color: #fff; font-family: var(--sans); font-weight: 600; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; }
.detail-hero .dh-yr { position: absolute; right: var(--pad-x); bottom: 26px; color: #fff; font-family: var(--display); font-weight: 900; font-size: 18px; }

.detail { padding: 0 var(--pad-x); }
.detail-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0;
  border-bottom: 1px solid var(--ink); 
}
.detail-meta .m { padding: 26px 0; border-right: 1px solid var(--line-soft); padding-right: 24px; }
.detail-meta .m:last-child { border-right: 0; }
.detail-meta .m .k { font-family: var(--sans); font-weight: 700; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.detail-meta .m .v { font-family: var(--cn); font-weight: 500; font-size: 14px; line-height: 1.5; }
@media (max-width: 640px) { .detail-meta .m { border-right: 0; border-bottom: 1px solid var(--line-soft); padding: 18px 0; } }

.detail-lead { max-width: 820px; padding: clamp(60px,9vh,120px) 0; }
.detail-lead .lab { display: flex; align-items: center; gap: 14px; margin-bottom: 30px; }
.detail-lead .lab::before { content: ""; width: 30px; height: 1px; background: var(--ink-3); }
.detail-lead .body { font-family: var(--cn); font-weight: 500; font-size: clamp(15px, 1.15vw, 18px); line-height: 1.8; text-wrap: pretty; color: var(--ink-2); }
.detail-lead .body em { font-style: normal; color: var(--ink); background: linear-gradient(transparent 64%, rgba(0,0,0,0.13) 64%); padding: 0 2px; }
.detail-lead .body p + p { margin-top: 20px; }

/* spreads (full color — work reads honestly) */
.sp { padding: clamp(28px,4vh,56px) 0; }
.sp figure { margin: 0; }
.sp img { width: 100%; display: block; }
.sp .cap { margin-top: 14px; display: flex; gap: 18px; font-family: var(--sans); font-weight: 600; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.sp.full img { width: 100%; }
.sp.contain figure { max-width: 1000px; margin: 0 auto; }
.sp.contain img { background: #f1f0eb; }
.sp .label2 { font-family: var(--sans); font-weight: 700; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 22px; }

/* —— detail-page justified image gallery (JS absolute positioning, no crop) —— */
.jgrid { position: relative; width: 100%; }
.jfig { position: absolute; top: 0; left: 0; margin: 0; overflow: hidden; opacity: 0; transition: opacity .55s var(--ease-io); }
.jgrid.ready .jfig { opacity: 1; }
.jgrid.animate .jfig { transition: transform .5s var(--ease-io), opacity .55s var(--ease-io); }
.jfig img { width: 100%; height: 100%; display: block; object-fit: cover; background: #f1f0eb; }
.jfig figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 14px 11px;
  font-family: var(--sans); font-weight: 600; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,0.55));
  opacity: 0; transform: translateY(6px);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease);
}
.jfig:hover figcaption { opacity: 1; transform: none; }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px,1.6vw,24px); align-items: start; }
.row3 { display: grid; grid-template-columns: repeat(3,1fr); gap: clamp(14px,1.6vw,24px); align-items: start; }
.row4 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px,1.6vw,24px); align-items: start; }
.duet2 { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(14px,1.6vw,24px); align-items: start; }
.duet2.flip { grid-template-columns: 5fr 7fr; }
.duet2 img, .row2 img, .row3 img, .row4 img { width: 100%; height: auto; object-fit: contain; display: block; }
.textimg { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px,4vw,60px); align-items: start; }
.textimg .tx h3 { font-family: var(--cn); font-weight: 700; font-size: clamp(22px,2vw,30px); line-height: 1.3; margin-bottom: 18px; }
.textimg .tx p { font-family: var(--cn); font-weight: 400; font-size: 14.5px; line-height: 1.9; color: var(--ink-2); text-wrap: pretty; }
.textimg img { width: 100%; }
@media (max-width: 760px) { .row3 { grid-template-columns: 1fr 1fr; } .duet2, .duet2.flip, .textimg { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .row2, .row3, .row4 { grid-template-columns: 1fr; } }

.detail-cta { padding: clamp(40px,6vh,80px) 0; text-align: center; }
.detail-cta a {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--sans); font-weight: 700; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  border: 1px solid var(--ink); padding: 18px 30px;
  transition: background var(--t) var(--ease), color var(--t) var(--ease), gap var(--t) var(--ease);
}
.detail-cta a:hover { background: var(--ink); color: var(--paper); gap: 22px; }

.detail-foot { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--ink); }
.detail-foot button { padding: 36px 0; background: 0; text-align: left; display: grid; gap: 10px; }
.detail-foot .pf-prev { border-right: 1px solid var(--ink); padding-right: 30px; }
.detail-foot .pf-next { text-align: right; padding-left: 30px; }
.detail-foot .lab2 { font-family: var(--sans); font-weight: 700; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); }
.detail-foot .ti { font-family: var(--cn); font-weight: 700; font-size: clamp(18px,1.8vw,28px); transition: color var(--t) var(--ease); }
.detail-foot button:hover .ti { color: var(--ink-2); }

.detail-end { text-align: center; padding: clamp(50px,8vh,100px) 0; }
.detail-end .g { font-family: var(--display); font-weight: 900; font-size: 30px; }
.detail-end .t { font-family: var(--sans); font-weight: 600; font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-3); margin-top: 12px; }


/* ============================================================
   BRAND-ORANGE ACCENT — kept at end of file so it wins
   same-specificity ties against per-component color rules above.
   Restrained: small labels / numbers / em-keywords only.
   ============================================================ */

/* Keywords inside lead/body copy: <em> tags become subtle orange */
.detail-lead .body em,
.about-lead em { color: var(--accent); background: none; font-style: normal; }

/* Detail-hero outlined title: the filled <em> token is the orange beat */
.detail-hero .dh-title h1 em { color: var(--accent); -webkit-text-stroke: 0; }

/* Section eyebrow kickers — small caps labels */
.sec-head .kicker .lab { color: var(--accent); }

/* Strip cards: number badge + "view work" cue */
.scard .si .corner { color: var(--accent); }
.scard .cue { color: var(--accent); border-bottom-color: var(--accent); }

/* Detail-page meta keys */
.detail-meta .m .k { color: var(--accent); }

/* About info table — left column keys */
.about-table .row .k { color: var(--accent); }

/* Hero card running label */
.hero-card .hc-fl { color: var(--accent); }

/* Project bar in detail overlay — current index */
.pbar .pb-mid .num { color: var(--accent); }

/* Contact column keys in the footer dark panel */
.foot-dark .clist li .k { color: var(--accent); }

/* Marquee — the dot separators pick up the accent */
.marquee .run .dot { color: var(--accent); }

/* Spread captions — section labels and the "End of detail" tail */
.sp .label2 { color: var(--accent); }
.detail-end .g { color: var(--accent); }


/* —— Brand-word continuity: the GZY logo mark is orange everywhere it shows —— */
.topbar .monogram .mark,
.foot-light .stamp .mk { color: var(--accent); border-color: var(--accent); }

/* —— The generic .ac span is the brand-word stencil for headline accents —— */
.sec-head .big .ac,
.foot-light h2 .ac { color: var(--accent); }

/* —— Reinforce: any em inside about-lead is orange (already declared; kept for clarity) —— */
.about-lead em { color: var(--accent); background: none; font-style: normal; }
