:root {
  --bg: #060507;
  --bg-2: #130d12;
  --panel: rgba(16, 12, 16, 0.9);
  --panel-soft: rgba(23, 17, 22, 0.86);
  --text: #f6efe3;
  --muted: #b6aba1;
  --line: rgba(246, 239, 227, 0.12);
  --line-strong: rgba(246, 239, 227, 0.22);
  --accent: #c94f32;
  --page-max: 1180px;
  --content-max: 940px;
  --serif: "Baskerville", "Iowan Old Style", "Songti SC", "STSong", "Times New Roman", serif;
  --sans: "Helvetica Neue", "Arial Narrow", "PingFang SC", sans-serif;
  --mono: "Menlo", "SFMono-Regular", "Courier New", monospace;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--sans);
  background:
    radial-gradient(circle at 18% 12%, rgba(201, 79, 50, 0.18), transparent 24%),
    radial-gradient(circle at 82% 16%, rgba(91, 109, 210, 0.12), transparent 22%),
    linear-gradient(180deg, #040305 0%, #0b080c 22%, #050407 100%);
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.02) 0,
      rgba(255, 255, 255, 0.02) 1px,
      transparent 1px,
      transparent 5px
    ),
    linear-gradient(90deg, transparent 0, rgba(255, 255, 255, 0.03) 50%, transparent 100%);
  opacity: 0.25;
  mix-blend-mode: soft-light;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 14%, rgba(255, 255, 255, 0.05) 14.1%, transparent 14.2%),
    linear-gradient(90deg, transparent 86%, rgba(255, 255, 255, 0.05) 86.1%, transparent 86.2%);
  opacity: 0.25;
}

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

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

button {
  font: inherit;
}

.background-orbit {
  position: fixed;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0.5;
}

.background-orbit-a {
  width: 38rem;
  height: 38rem;
  inset: 8rem auto auto -14rem;
  border: 1px solid rgba(201, 79, 50, 0.12);
}

.background-orbit-b {
  width: 28rem;
  height: 28rem;
  inset: auto -10rem 8rem auto;
  border: 1px solid rgba(123, 137, 220, 0.12);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.1rem;
  padding: 1rem 1.25rem 0.9rem;
  background: rgba(6, 5, 7, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.wordmark,
.topnav a {
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.45rem 0.68rem;
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.topnav {
  display: flex;
  gap: 0.55rem;
}

.wordmark:hover,
.wordmark:focus-visible,
.topnav a:hover,
.topnav a:focus-visible {
  color: var(--accent);
  border-color: rgba(201, 79, 50, 0.32);
  transform: translateY(-1px);
}

.page-shell {
  width: min(calc(100% - 2rem), var(--page-max));
  margin: 0 auto;
  padding-bottom: 7rem;
}

.hero,
.section,
.signal-strip,
.work-dossier {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 720ms ease, transform 720ms ease;
}

.hero.is-visible,
.section.is-visible,
.signal-strip.is-visible,
.work-dossier.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero {
  position: relative;
  width: min(100%, var(--content-max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 2rem;
  align-items: center;
  min-height: calc(100vh - 5rem);
  padding: 4.8rem 0 2.2rem;
}

.hero::before {
  content: "JULIA FUNG / DOSSIER";
  position: absolute;
  left: -1.2rem;
  top: 3rem;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  color: rgba(246, 239, 227, 0.34);
}

.hero::after {
  content: "four works / unstable archive";
  position: absolute;
  right: 0;
  bottom: 0.7rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(246, 239, 227, 0.34);
}

.hero-copy {
  position: relative;
  padding-left: 1.25rem;
}

.hero-copy::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3rem;
  bottom: 0.3rem;
  width: 1px;
  background: linear-gradient(180deg, rgba(201, 79, 50, 0.75), rgba(246, 239, 227, 0.08));
}

.eyebrow {
  margin: 0 0 0.9rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1,
.section-heading h2,
.work-title-group h3,
.panel h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 0.88;
  letter-spacing: -0.04em;
}

.hero h1 {
  max-width: 9ch;
  font-size: clamp(4rem, 7.8vw, 7.4rem);
}

.hero-intro,
.about-copy p,
.timeline,
.contact-card,
.statement-content,
.work-excerpt,
.work-fragment,
.hero-facts {
  font-size: 0.98rem;
  line-height: 1.72;
  color: var(--muted);
}

.hero-intro {
  max-width: 42ch;
  margin: 1.35rem 0 0;
}

.hero-actions {
  margin: 1.9rem 0 1.25rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.9rem 1.2rem;
  border: 1px solid rgba(201, 79, 50, 0.34);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(201, 79, 50, 0.95), rgba(118, 35, 20, 0.95));
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(246, 239, 227, 0.08), 0 16px 36px rgba(201, 79, 50, 0.18);
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.hero-facts li {
  padding: 0.42rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-visual {
  position: relative;
  min-height: 29rem;
}

.hero-card {
  position: absolute;
  overflow: hidden;
  background: #09080b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.hero-card::before {
  content: attr(data-note);
  position: absolute;
  left: 0.65rem;
  bottom: 0.65rem;
  z-index: 2;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(246, 239, 227, 0.75);
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.42));
}

.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.05) saturate(1.04);
}

.hero-card-a {
  inset: 1.4rem 1rem 5.2rem 0;
  clip-path: polygon(0 0, 100% 0, 100% 85%, 92% 100%, 0 100%);
}

.hero-card-b {
  inset: auto 0 0.8rem 6rem;
  width: 13rem;
  height: 8.8rem;
  transform: rotate(-5deg);
}

.hero-card-c {
  inset: 0 auto auto 6.8rem;
  width: 10.8rem;
  height: 14.5rem;
  transform: rotate(7deg);
}

.signal-strip {
  width: min(100%, var(--content-max));
  margin: 0 auto 2.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: linear-gradient(90deg, rgba(201, 79, 50, 0.08), rgba(90, 104, 192, 0.06), rgba(201, 79, 50, 0.08));
  overflow: hidden;
}

.signal-strip-track {
  white-space: nowrap;
  padding: 0.72rem 0;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(246, 239, 227, 0.72);
}

.section {
  width: min(100%, var(--content-max));
  margin: 0 auto;
  padding: 0.8rem 0 0.6rem;
}

.section-heading {
  display: grid;
  gap: 0.8rem;
  justify-items: center;
  text-align: center;
  margin-bottom: 1.6rem;
}

.section-heading h2 {
  max-width: 11ch;
  font-size: clamp(2.4rem, 4.6vw, 4.4rem);
}

.work-nav {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.7rem;
}

.work-nav-link {
  flex: 0 0 auto;
  padding: 0.48rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.work-nav-link.is-active,
.work-nav-link:hover,
.work-nav-link:focus-visible {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 50%, white 15%);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

.works {
  width: min(100%, 1060px);
  margin: 1rem auto 0;
  display: grid;
  gap: 4.5rem;
}

.work-dossier {
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.15rem 0 1.2rem;
}

.work-dossier::before {
  content: attr(data-year);
  position: absolute;
  right: 0.4rem;
  top: 0.2rem;
  font-family: var(--serif);
  font-size: clamp(4rem, 10vw, 8rem);
  line-height: 1;
  color: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.work-dossier::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--work-accent) 16%, transparent), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 30%);
  pointer-events: none;
}

.work-banner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: end;
  margin-bottom: 0.9rem;
}

.work-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  min-height: 2.4rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.work-title-group {
  max-width: 26rem;
}

.work-label {
  margin: 0 0 0.38rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--work-accent);
}

.work-title-group h3 {
  font-size: clamp(2.1rem, 3.2vw, 3.35rem);
  max-width: 10ch;
}

.work-year {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(246, 239, 227, 0.68);
}

.work-stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(250px, 320px);
  gap: 1rem;
  align-items: start;
}

.work-dossier:nth-child(even) .work-stage {
  grid-template-columns: minmax(250px, 320px) minmax(300px, 1fr);
}

.work-dossier:nth-child(even) .work-sheet {
  order: -1;
}

.work-collage {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: 86px;
  gap: 0.42rem;
}

.collage-item {
  position: relative;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #09080b;
  overflow: hidden;
  cursor: zoom-in;
}

.collage-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.44));
  opacity: 0;
  transition: opacity 180ms ease;
}

.collage-item:hover::after,
.collage-item:focus-visible::after {
  opacity: 1;
}

.collage-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease, filter 240ms ease;
}

.collage-item:hover img,
.collage-item:focus-visible img {
  transform: scale(1.04);
  filter: contrast(1.05) saturate(1.06);
}

.collage-item-1 {
  grid-column: 1 / span 4;
  grid-row: 1 / span 3;
}

.collage-item-2 {
  grid-column: 5 / span 2;
  grid-row: 1 / span 1;
}

.collage-item-3 {
  grid-column: 5 / span 2;
  grid-row: 2 / span 2;
}

.collage-item-4 {
  grid-column: 1 / span 2;
  grid-row: 4 / span 2;
}

.collage-item-5 {
  grid-column: 3 / span 2;
  grid-row: 4 / span 2;
}

.collage-item-6 {
  grid-column: 5 / span 2;
  grid-row: 4 / span 1;
}

.collage-item-7 {
  grid-column: 5 / span 2;
  grid-row: 5 / span 1;
}

.collage-item-8 {
  grid-column: 1 / span 6;
  grid-row: 6 / span 1;
}

.work-collage.has-eight-images .collage-item-6 {
  grid-column: 5 / span 2;
  grid-row: 4 / span 2;
}

.work-collage.has-eight-images .collage-item-7 {
  grid-column: 1 / span 2;
  grid-row: 6 / span 2;
}

.work-collage.has-eight-images .collage-item-8 {
  grid-column: 3 / span 4;
  grid-row: 6 / span 2;
}

.work-sheet {
  position: sticky;
  top: 6.5rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 42%),
    rgba(10, 9, 12, 0.88);
  box-shadow: var(--shadow);
}

.work-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  list-style: none;
  padding: 0;
  margin: 0 0 0.85rem;
}

.work-meta li {
  padding: 0.34rem 0.48rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(246, 239, 227, 0.78);
}

.work-fragment {
  margin: 0 0 0.95rem;
  color: color-mix(in srgb, var(--work-accent) 62%, white 12%);
  font-family: var(--serif);
  font-size: 1.08rem;
  line-height: 1.45;
}

.work-excerpt {
  margin: 0 0 1.1rem;
  color: var(--text);
}

.statement {
  padding: 0.9rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.statement summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
}

.statement summary::-webkit-details-marker {
  display: none;
}

.statement summary::after {
  content: " +";
  color: var(--work-accent);
}

.statement[open] summary::after {
  content: " -";
}

.statement-content {
  margin-top: 1rem;
  white-space: pre-line;
}

.work-counter {
  margin: 0.9rem 0 0;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(246, 239, 227, 0.42);
}

.about,
.contact {
  width: min(100%, var(--content-max));
  margin: 0 auto;
  padding-top: 5rem;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 1.2rem;
}

.about-copy,
.panel,
.contact-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
}

.about-copy p,
.timeline {
  margin: 0;
}

.about-copy {
  display: grid;
  gap: 1rem;
}

.panel h3 {
  margin-bottom: 0.8rem;
  font-size: 1.8rem;
}

.timeline {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.95rem;
}

.timeline strong {
  display: block;
  margin-bottom: 0.18rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.contact-card {
  display: grid;
  gap: 0.45rem;
  transition: transform 180ms ease, border-color 180ms ease;
}

.contact-card:hover,
.contact-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(201, 79, 50, 0.36);
}

.contact-label {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.contact-card strong {
  font-size: 0.98rem;
  color: var(--text);
}

.lightbox {
  width: min(90vw, 72rem);
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 7, 10, 0.97);
  color: var(--text);
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
}

.lightbox-close {
  display: inline-flex;
  margin-left: auto;
  margin-bottom: 1rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lightbox-image {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
}

.lightbox-caption {
  margin: 0.85rem 0 0;
  color: var(--muted);
}

@media (max-width: 980px) {
  .hero,
  .work-stage,
  .work-dossier:nth-child(even) .work-stage,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .work-dossier:nth-child(even) .work-sheet {
    order: 0;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual {
    min-height: 24rem;
  }

  .hero-card-a {
    inset: 0.5rem 1rem 3.6rem 0;
  }

  .hero-card-b {
    width: 10rem;
    height: 7rem;
    inset: auto 0 0 4rem;
  }

  .hero-card-c {
    inset: 0 auto auto 5rem;
    width: 8.2rem;
    height: 11rem;
  }

  .work-sheet {
    position: static;
  }
}

@media (max-width: 820px) {
  .topbar {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.55rem;
  }

  .page-shell {
    width: min(calc(100% - 1rem), var(--page-max));
  }

  .hero {
    width: 100%;
    padding-top: 3rem;
  }

  .hero::before,
  .hero::after,
  body::after {
    display: none;
  }

  .hero-copy {
    padding-left: 0;
  }

  .hero-copy::before {
    display: none;
  }

  .hero h1 {
    font-size: clamp(3.2rem, 17vw, 5.8rem);
    max-width: 8ch;
  }

  .hero-visual {
    min-height: 20rem;
  }

  .signal-strip,
  .section,
  .about,
  .contact {
    width: 100%;
  }

  .section-heading {
    justify-items: start;
    text-align: left;
  }

  .work-nav {
    justify-content: flex-start;
  }

  .works {
    gap: 3rem;
  }

  .work-dossier::before {
    right: 0;
    top: 0.8rem;
    font-size: 3.4rem;
  }

  .work-banner {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .work-year {
    order: -1;
  }

  .work-title-group h3 {
    max-width: 100%;
    font-size: 2.4rem;
  }

  .work-collage {
    grid-auto-rows: 72px;
  }

  .collage-item-1 {
    grid-column: 1 / span 6;
    grid-row: 1 / span 3;
  }

  .collage-item-2 {
    grid-column: 1 / span 3;
    grid-row: 4 / span 1;
  }

  .collage-item-3 {
    grid-column: 4 / span 3;
    grid-row: 4 / span 1;
  }

  .collage-item-4 {
    grid-column: 1 / span 2;
    grid-row: 5 / span 1;
  }

  .collage-item-5 {
    grid-column: 3 / span 2;
    grid-row: 5 / span 1;
  }

  .collage-item-6 {
    grid-column: 5 / span 2;
    grid-row: 5 / span 1;
  }

  .collage-item-7,
  .collage-item-8 {
    grid-column: span 3;
    grid-row: auto;
  }

  .work-collage.has-eight-images .collage-item-6,
  .work-collage.has-eight-images .collage-item-7,
  .work-collage.has-eight-images .collage-item-8 {
    grid-column: span 3;
    grid-row: auto;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .hero,
  .section,
  .signal-strip,
  .work-dossier {
    opacity: 1;
    transform: none;
  }
}
