/* ==========================================================================
   JUNG JIWOO — 3D Modeling & Level Art Portfolio
   Design tokens → base → layout → components → sections → motion
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg: #0b0b0c;
  --bg-2: #131315;
  --bg-3: #1a1a1d;
  --line: #242427;
  --line-2: #34343a;
  --text: #f2f2f0;
  --text-2: #a3a3a8;
  --text-3: #6d6d73;
  --accent: #e8763a;

  --font-display: "Inter Tight", "Pretendard Variable", Pretendard, system-ui, sans-serif;
  --font-body: "Pretendard Variable", Pretendard, "Inter Tight", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --pad: clamp(20px, 4vw, 64px);
  --gap: clamp(16px, 2vw, 32px);
  --max: 1680px;
  --header-h: 72px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  word-break: keep-all;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

::selection { background: var(--accent); color: #0b0b0c; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease-out);
}
.skip-link:focus { transform: none; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  transition: background-color 0.4s var(--ease-out), border-color 0.4s var(--ease-out),
    transform 0.5s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(11, 11, 12, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}
.site-header.is-hidden { transform: translateY(-100%); }

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.brand__role { color: var(--text-2); font-weight: 400; }

.nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 40px); }
.nav a {
  position: relative;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  transition: color 0.3s;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease-out);
}
.nav a:hover,
.nav a[aria-current="true"] { color: var(--text); }
.nav a:hover::after,
.nav a[aria-current="true"]::after { transform: scaleX(1); transform-origin: left; }

@media (max-width: 640px) {
  .brand__role { display: none; }
  .nav { gap: 18px; }
  .nav a { font-size: 11px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 40%;
  transform: scale(1.08);
  animation: hero-zoom 2.8s var(--ease-out) 0.1s forwards;
  will-change: transform;
}
.hero::before {
  /* cinematic vignette + bottom fade into page */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(11, 11, 12, 0.55) 0%, rgba(11, 11, 12, 0) 22%),
    linear-gradient(0deg, var(--bg) 0%, rgba(11, 11, 12, 0.88) 18%, rgba(11, 11, 12, 0.25) 52%, rgba(11, 11, 12, 0) 70%),
    radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}

.hero__content {
  width: 100%;
  padding-bottom: clamp(32px, 6vh, 72px);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: var(--gap);
}

.hero__eyebrow { margin-bottom: clamp(16px, 2.5vh, 28px); color: rgba(242, 242, 240, 0.8); }

.hero__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(56px, 12.5vw, 216px);
  line-height: 0.86;
  letter-spacing: -0.045em;
  margin-left: -0.04em;
}

.hero__role {
  margin-top: clamp(14px, 2.2vh, 24px);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(20px, 2.9vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.hero__role span { display: block; }
.hero__role .amp { display: inline; color: var(--accent); }

.hero__tagline {
  margin-top: clamp(16px, 2.4vh, 28px);
  max-width: 36ch;
  font-family: var(--font-display);
  font-size: clamp(15px, 1.15vw, 18px);
  line-height: 1.5;
  color: var(--text-2);
}

.hero__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 28px;
  text-align: right;
}

.hero__featured {
  display: grid;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  min-width: 240px;
}
.hero__featured dt { color: var(--text-3); }
.hero__featured dd { font-family: var(--font-display); font-size: 15px; color: var(--text); }
.hero__featured a { transition: color 0.3s; }
.hero__featured a:hover { color: var(--accent); }

.btn {
  --h: 52px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  height: var(--h);
  padding: 0 26px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.45s var(--ease-out), border-color 0.45s var(--ease-out);
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--text);
  transform: translateY(101%);
  transition: transform 0.5s var(--ease-out);
}
.btn:hover { color: var(--bg); border-color: var(--text); }
.btn:hover::before { transform: none; }
.btn__arrow { transition: transform 0.45s var(--ease-out); }
.btn:hover .btn__arrow { transform: translateY(3px); }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 1px;
  height: clamp(40px, 7vh, 72px);
  background: rgba(255, 255, 255, 0.15);
  overflow: hidden;
  transform: translateX(-50%);
}
.scroll-cue::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--text);
  animation: scroll-cue 2.2s var(--ease-io) infinite;
}

@media (max-width: 900px) {
  .hero__content { grid-template-columns: 1fr; }
  .hero__aside { align-items: flex-start; text-align: left; flex-direction: column-reverse; }
  .hero__featured { min-width: 0; width: 100%; }
  .hero__media img { object-position: 84% 50%; }
  .scroll-cue { display: none; }
}

/* ---------- Section scaffolding ---------- */
.section { padding-block: clamp(96px, 14vw, 200px); }

.section-head {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
  align-items: end;
  margin-bottom: clamp(48px, 7vw, 104px);
}
.section-head__title {
  grid-column: 1 / span 8;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(44px, 7.4vw, 128px);
  line-height: 0.92;
  letter-spacing: -0.04em;
}
.section-head__title sup {
  font-family: var(--font-mono);
  font-size: 0.16em;
  font-weight: 400;
  letter-spacing: 0.04em;
  vertical-align: top;
  margin-left: 0.4em;
  color: var(--accent);
  position: relative;
  top: 0.6em;
}
.section-head__desc {
  grid-column: 9 / -1;
  color: var(--text-2);
  font-size: 15px;
  max-width: 40ch;
}
.section-head .eyebrow { grid-column: 1 / -1; margin-bottom: -8px; }

@media (max-width: 900px) {
  .section-head__title,
  .section-head__desc { grid-column: 1 / -1; }
}

/* ---------- Works grid ---------- */
.works {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gap);
  row-gap: clamp(72px, 9vw, 140px);
}

.work { grid-column: 1 / -1; }
.work--wide { grid-column: 1 / -1; }
.work--left { grid-column: 1 / span 7; }
.work--right { grid-column: 8 / -1; margin-top: clamp(80px, 14vw, 240px); }

@media (max-width: 900px) {
  .work--left,
  .work--right { grid-column: 1 / -1; margin-top: 0; }
}

.work__link { display: block; }

.work__media {
  position: relative;
  overflow: hidden;
  background: var(--bg-2);
  aspect-ratio: 16 / 9;
  transition: box-shadow 0.6s var(--ease-out);
}
.work--wide .work__media { aspect-ratio: 21 / 9; }
.work--left .work__media,
.work--right .work__media { aspect-ratio: 4 / 3; }

@media (max-width: 640px) {
  .work--wide .work__media,
  .work--left .work__media,
  .work--right .work__media { aspect-ratio: 4 / 3; }
}

.work__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform 1.2s var(--ease-out), filter 0.7s var(--ease-out);
  filter: brightness(0.90);
}
.work__link:hover .work__media,
.work__link:focus-visible .work__media {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.work__link:hover .work__media img,
.work__link:focus-visible .work__media img {
  transform: scale(1.04);
  filter: brightness(1.03);
}

/* image mask reveal on scroll */
.work__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg);
  transform-origin: top;
  transition: transform 1.2s var(--ease-io);
}
.work.is-in .work__media::after { transform: scaleY(0); }

.work__badge {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 1;
  padding: 6px 10px;
  background: rgba(11, 11, 12, 0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.work__meta {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px 24px;
  align-items: baseline;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  margin-top: 20px;
  transition: border-color 0.5s var(--ease-out);
}
.work__link:hover .work__meta,
.work__link:focus-visible .work__meta { border-top-color: var(--line-2); }
.work__no { color: var(--accent); }
.work__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 2.4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.work__title small {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
}
.work__year { color: var(--text-2); }

.work__details {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  margin-top: 8px;
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  padding: 5px 11px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-2);
  white-space: nowrap;
}
.work__tools { color: var(--text-3); }
.work__tools span + span::before { content: " / "; color: var(--line-2); }

.work__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  grid-column: 2 / -1;
  color: var(--text-2);
  transition: color 0.3s, gap 0.45s var(--ease-out);
}
.work__link:hover .work__cta,
.work__link:focus-visible .work__cta { color: var(--accent); gap: 16px; }

@media (max-width: 640px) {
  .work__meta { grid-template-columns: auto 1fr; }
  .work__year { grid-column: 2; grid-row: 2; }
  .work__details { flex-direction: column; }
}

/* ---------- Disciplines marquee strip ---------- */
.strip {
  border-block: 1px solid var(--line);
  overflow: hidden;
  padding-block: 22px;
}
.strip__track {
  display: flex;
  width: max-content;
  gap: 48px;
  animation: marquee 38s linear infinite;
}
.strip__item {
  display: inline-flex;
  align-items: center;
  gap: 48px;
  font-family: var(--font-display);
  font-size: clamp(18px, 1.8vw, 26px);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-2);
  white-space: nowrap;
}
.strip__item::after {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent);
  transform: rotate(45deg);
}

/* ---------- About ---------- */
.about__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
}
.about__photo {
  grid-column: 1 / span 4;
  align-self: start;
  position: sticky;
  top: calc(var(--header-h) + 32px);
}
.about__photo figure {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--bg-2);
}
.about__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  filter: grayscale(1) contrast(1.05) brightness(0.92);
  transition: filter 0.9s var(--ease-out), transform 1.2s var(--ease-out);
}
.about__photo figure:hover img { filter: grayscale(0) contrast(1) brightness(1); transform: scale(1.02); }
.about__photo figcaption {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  color: var(--text-3);
}

.about__body { grid-column: 6 / -1; }

.about__lead {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(26px, 3vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.about__lead em { font-style: normal; color: var(--text-2); }

.about__intro {
  margin-top: clamp(28px, 3vw, 44px);
  display: grid;
  gap: 16px;
  max-width: 62ch;
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.85;
}

.info {
  margin-top: clamp(56px, 6vw, 88px);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 var(--gap);
}
.info__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding-block: 22px;
  border-top: 1px solid var(--line);
}
.info__row--full { grid-column: 1 / -1; }
.info dt { color: var(--text-3); }
.info dd { font-size: 15px; line-height: 1.6; }
.info dd small { display: block; color: var(--text-2); font-size: 14px; }
.focus-list { display: flex; flex-wrap: wrap; gap: 8px; }

.tools {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 6px;
}
.tool {
  background: var(--bg);
  padding: 22px 20px 20px;
  display: grid;
  gap: 18px;
  align-content: start;
  transition: background-color 0.4s var(--ease-out);
}
.tool:hover { background: var(--bg-2); }
.tool__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.tool__icon--maya { background: #0f8b8d1f; color: #3fc1c9; box-shadow: inset 0 0 0 1px #3fc1c955; }
.tool__icon--zbrush { background: #e1e1e114; color: #e8e8e8; box-shadow: inset 0 0 0 1px #e8e8e840; }
.tool__icon--painter { background: #c7e25b1a; color: #c7e25b; box-shadow: inset 0 0 0 1px #c7e25b55; }
.tool__icon--unity { background: #ffffff10; color: #fff; box-shadow: inset 0 0 0 1px #ffffff40; }
.tool__icon svg { width: 22px; height: 22px; }
.tool__name { font-family: var(--font-display); font-weight: 600; font-size: 16px; line-height: 1.2; }
.tool__use { margin-top: 6px; color: var(--text-2); font-size: 13px; line-height: 1.55; }

@media (max-width: 1100px) {
  .tools { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .about__photo { grid-column: 1 / -1; position: static; max-width: 420px; }
  .about__body { grid-column: 1 / -1; margin-top: 24px; }
}
@media (max-width: 640px) {
  .info { grid-template-columns: 1fr; }
}

/* ---------- Contact ---------- */
.contact {
  position: relative;
  padding-block: clamp(120px, 16vw, 240px) clamp(48px, 6vw, 80px);
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.contact__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 10.5vw, 188px);
  line-height: 0.88;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}
.contact__title span { display: block; }
.contact__title .outline {
  /* solid dim fill instead of text-stroke: variable-font glyphs have overlapping contours */
  color: #3a3a3f;
}
.contact__row {
  margin-top: clamp(48px, 6vw, 88px);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
  align-items: end;
}
.contact__thanks {
  grid-column: 1 / span 5;
  color: var(--text-2);
  font-size: 16px;
}
.contact__links { grid-column: 7 / -1; display: grid; gap: 0; }
.contact__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 22px;
  border-top: 1px solid var(--line);
  transition: color 0.3s, padding 0.5s var(--ease-out);
}
.contact__link:last-child { border-bottom: 1px solid var(--line); }
.contact__link-label { color: var(--text-3); min-width: 96px; }
.contact__link-value {
  flex: 1;
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 500;
  letter-spacing: -0.015em;
}
.contact__link-arrow { transition: transform 0.5s var(--ease-out); }
a.contact__link:hover { color: var(--accent); padding-left: 10px; }
a.contact__link:hover .contact__link-arrow { transform: translate(4px, -4px); }
.copy-btn {
  padding: 8px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--text-2);
  transition: color 0.3s, border-color 0.3s;
}
.copy-btn:hover { color: var(--text); border-color: var(--text-2); }

@media (max-width: 900px) {
  .contact__thanks,
  .contact__links { grid-column: 1 / -1; }
}

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 28px;
  color: var(--text-3);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
}
.site-footer a { transition: color 0.3s; }
.site-footer a:hover { color: var(--text); }

/* ---------- Motion ---------- */
@keyframes hero-zoom { to { transform: scale(1); } }
@keyframes scroll-cue {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(100%); }
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* split-line rise used for hero & headings */
.rise { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.rise > span {
  display: block;
  transform: translateY(105%);
  animation: rise 1.2s var(--ease-out) forwards;
  animation-delay: calc(var(--d, 0) * 1s);
}
@keyframes rise { to { transform: none; } }

.fade-in {
  opacity: 0;
  animation: fade-in 1.2s var(--ease-out) forwards;
  animation-delay: calc(var(--d, 0) * 1s);
}
@keyframes fade-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* scroll reveal (JS adds .is-in) */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 1s);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* cross-document page transitions (supported browsers) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 0.45s var(--ease-io) both; }
::view-transition-new(root) { animation: vt-in 0.6s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-16px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(24px); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .rise > span, .fade-in { transform: none; opacity: 1; }
  .strip__track { animation: none; }
}

/* ==========================================================================
   Project Detail Pages
   ========================================================================== */
.detail-hero {
  position: relative;
  min-height: clamp(460px, 76vh, 840px);
  display: flex;
  align-items: flex-end;
  padding-top: calc(var(--header-h) + 40px);
  padding-bottom: clamp(40px, 6vh, 80px);
  overflow: hidden;
  isolation: isolate;
}
.detail-hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--bg-2);
}
.detail-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: hero-zoom 2.4s var(--ease-out) forwards;
}
.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(11, 11, 12, 0.65) 0%, rgba(11, 11, 12, 0.15) 35%),
    linear-gradient(0deg, var(--bg) 0%, rgba(11, 11, 12, 0.88) 28%, rgba(11, 11, 12, 0.3) 65%, transparent 100%);
}
.detail-hero__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-2);
  transition: color 0.3s, gap 0.4s var(--ease-out);
}
.back-link:hover { color: var(--text); gap: 14px; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(11, 11, 12, 0.55);
  backdrop-filter: blur(8px);
  color: var(--text);
}
.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.detail-hero__kicker { color: var(--accent); margin-bottom: 12px; }
.detail-hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 6.4vw, 108px);
  line-height: 0.94;
  letter-spacing: -0.04em;
  max-width: 16ch;
}
.detail-hero__sub {
  margin-top: 16px;
  color: var(--text-2);
  font-size: clamp(15px, 1.25vw, 19px);
  max-width: 56ch;
}

/* ---------- Detail Sections ---------- */
.detail-section {
  padding-block: clamp(56px, 8vw, 112px);
  border-top: 1px solid var(--line);
}
.detail-section--tight { padding-top: clamp(32px, 5vw, 64px); border-top: 0; }

.detail-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.detail-section__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 3.2vw, 48px);
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.detail-section__note { color: var(--text-2); font-size: 14px; max-width: 52ch; }

/* ---------- Overview Grid ---------- */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(32px, 4vw, 64px);
}
.overview-meta {
  grid-column: 1 / span 5;
  display: grid;
  align-content: start;
}
.overview-meta__row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding-block: 16px;
  border-top: 1px solid var(--line);
}
.overview-meta__row:last-child { border-bottom: 1px solid var(--line); }
.overview-meta dt { color: var(--text-3); padding-top: 3px; }
.overview-meta dd { font-size: 15px; color: var(--text); }

.overview-body {
  grid-column: 6 / -1;
  display: grid;
  gap: 20px;
  align-content: start;
}
.overview-body__lead {
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 30px);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.02em;
}
.overview-list {
  display: grid;
  gap: 12px;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.75;
}
.overview-list li {
  position: relative;
  padding-left: 18px;
}
.overview-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 1px;
  background: var(--accent);
}

.metrics-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 12px;
}
.metric {
  background: var(--bg-2);
  padding: 18px 16px;
}
.metric__val {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 2.2vw, 32px);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.metric__lbl { margin-top: 6px; color: var(--text-3); font-size: 11px; }

@media (max-width: 900px) {
  .overview-meta, .overview-body { grid-column: 1 / -1; }
  .overview-meta__row { grid-template-columns: 100px 1fr; }
  .metrics-bar { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 3D Asset Inspector (Three.js) ---------- */
.viewer-shell {
  border: 1px solid var(--line);
  background: var(--bg-2);
  overflow: hidden;
}
.viewer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-3);
}
.viewer-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.viewer-btn {
  padding: 7px 13px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-2);
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.viewer-btn:hover { color: var(--text); border-color: var(--text-2); }
.viewer-btn[aria-pressed="true"] {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.viewer-stage {
  position: relative;
  width: 100%;
  height: clamp(380px, 56vh, 620px);
  background: radial-gradient(circle at 50% 42%, #1d1d22 0%, #0d0d10 100%);
  cursor: grab;
}
.viewer-stage:active { cursor: grabbing; }
.viewer-stage canvas { display: block; width: 100%; height: 100%; }

.viewer-hud {
  position: absolute;
  inset: auto 16px 16px 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none;
}
.viewer-specs, .viewer-hint {
  padding: 8px 12px;
  background: rgba(11, 11, 12, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  color: var(--text-2);
  font-size: 11px;
}
.viewer-specs strong { color: var(--text); font-weight: 500; }
.viewer-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: var(--text-2);
  background: rgba(11, 11, 12, 0.75);
  pointer-events: none;
}
.viewer-status[hidden] { display: none; }

/* ---------- Gallery & Lightbox ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(16px, 2vw, 28px);
}
.shot {
  grid-column: span 6;
  display: grid;
  gap: 10px;
  align-content: start;
}
.shot--wide { grid-column: 1 / -1; }
.shot--third { grid-column: span 4; }
.shot__trigger {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--bg-2);
  aspect-ratio: 16 / 9;
  cursor: zoom-in;
}
.shot--wide .shot__trigger { aspect-ratio: 21 / 9; }
.shot__trigger img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-out), filter 0.5s var(--ease-out);
}
.shot__trigger:hover img { transform: scale(1.03); }
.shot__zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 10px;
  background: rgba(11, 11, 12, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
  opacity: 0;
  transition: opacity 0.3s;
}
.shot__trigger:hover .shot__zoom,
.shot__trigger:focus-visible .shot__zoom { opacity: 1; }
.shot__cap {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-2);
  font-size: 13px;
}
.shot__cap span:first-child { color: var(--text-3); }

@media (max-width: 900px) {
  .shot, .shot--third { grid-column: 1 / -1; }
  .shot--wide .shot__trigger { aspect-ratio: 16 / 9; }
}

/* ---------- PBR Texture Maps Grid ---------- */
.pbr-group + .pbr-group { margin-top: 40px; }
.pbr-group__label { margin-bottom: 14px; color: var(--text-2); }
.pbr-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.pbr-grid--4 { grid-template-columns: repeat(4, 1fr); }
.pbr-card {
  border: 1px solid var(--line);
  background: var(--bg-2);
  overflow: hidden;
}
.pbr-card button {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: zoom-in;
}
.pbr-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.pbr-card button:hover img { transform: scale(1.05); }
.pbr-card__meta {
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-2);
  font-size: 12px;
}
@media (max-width: 900px) {
  .pbr-grid, .pbr-grid--4 { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Breakdown Cards ---------- */
.breakdown-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.breakdown-card {
  background: var(--bg);
  padding: clamp(22px, 3vw, 34px);
  display: grid;
  gap: 16px;
  align-content: start;
}
.breakdown-card__tag { color: var(--accent); }
.breakdown-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.breakdown-card ul {
  display: grid;
  gap: 10px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.7;
}
.breakdown-card li {
  position: relative;
  padding-left: 14px;
}
.breakdown-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 5px;
  height: 1px;
  background: var(--line-2);
}
@media (max-width: 900px) {
  .breakdown-grid { grid-template-columns: 1fr; }
}

/* ---------- Asset Credits ---------- */
.credits-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px var(--gap);
}
.credit-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  transition: border-color 0.3s, color 0.3s;
}
.credit-item:hover { border-color: var(--line-2); color: var(--accent); }
.credit-item small { display: block; color: var(--text-3); margin-top: 2px; }
@media (max-width: 760px) {
  .credits-list { grid-template-columns: 1fr; }
}

/* ---------- Next Project ---------- */
.next-project {
  border-top: 1px solid var(--line);
  padding-block: clamp(72px, 10vw, 140px);
}
.next-project__link {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
}
.next-project__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 5.5vw, 88px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  margin-top: 10px;
  transition: color 0.35s, transform 0.5s var(--ease-out);
}
.next-project__link:hover .next-project__title { color: var(--accent); transform: translateX(8px); }
.next-project__thumb {
  width: clamp(160px, 22vw, 320px);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-2);
}
.next-project__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}
.next-project__link:hover .next-project__thumb img { transform: scale(1.06); }
@media (max-width: 700px) {
  .next-project__link { grid-template-columns: 1fr; }
  .next-project__thumb { width: 100%; }
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(16px, 3vw, 32px);
  background: rgba(8, 8, 10, 0.94);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s var(--ease-out);
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-2);
}
.lightbox__close {
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--text);
}
.lightbox__stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  padding-block: 16px;
}
.lightbox__img {
  max-width: min(1440px, 92vw);
  max-height: 76vh;
  object-fit: contain;
  background: var(--bg-2);
}
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(11, 11, 12, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text);
}
.lightbox__nav--prev { left: 8px; }
.lightbox__nav--next { right: 8px; }
.lightbox__nav:hover { border-color: var(--text); }
.lightbox__caption {
  text-align: center;
  color: var(--text-2);
  font-size: 14px;
}
