:root {
  color-scheme: dark;
  --bg: 0 0% 4%;
  --surface: 0 0% 8%;
  --text: 0 0% 96%;
  --muted: 0 0% 53%;
  --stroke: 0 0% 12%;
  --accent: 0 0% 96%;
  --font-body: "Inter", sans-serif;
  --font-display: "Instrument Serif", serif;
  --gradient: linear-gradient(90deg, #89aacc 0%, #4e85bf 100%);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: hsl(var(--bg));
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: hsl(var(--bg));
  color: hsl(var(--text));
  font-family: var(--font-body);
  letter-spacing: 0;
  overflow-x: hidden;
}

body.is-loading {
  overflow: hidden;
}

a,
button {
  color: inherit;
  font: inherit;
}

a {
  text-decoration: none;
}

button {
  border: 0;
}

img,
video {
  display: block;
}

.accent-gradient {
  background: var(--gradient);
}

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: hsl(var(--bg));
  transition: opacity 420ms ease, visibility 420ms ease;
}

.loading-screen.is-complete {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-label {
  position: absolute;
  top: 30px;
  left: clamp(24px, 5vw, 64px);
  margin: 0;
  color: hsl(var(--muted));
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  animation: loader-rise 720ms ease both;
}

.loader-word {
  color: hsl(var(--text) / 0.8);
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 112px);
  font-style: italic;
  transition: opacity 240ms ease, transform 240ms ease;
}

.loader-word.is-changing {
  opacity: 0;
  transform: translateY(-18px);
}

.loader-count {
  position: absolute;
  right: clamp(22px, 5vw, 64px);
  bottom: 34px;
  color: hsl(var(--text));
  font-family: var(--font-display);
  font-size: clamp(72px, 12vw, 160px);
  font-variant-numeric: tabular-nums;
  line-height: 0.8;
}

.loader-progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: hsl(var(--stroke) / 0.5);
}

.loader-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--gradient);
  box-shadow: 0 0 8px rgba(137, 170, 204, 0.35);
  transform: scaleX(0);
  transform-origin: left;
}

.portfolio-close {
  position: fixed;
  top: 27px;
  right: clamp(18px, 4vw, 42px);
  z-index: 80;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 50%;
  background: rgb(8 8 8 / 0.5);
}

.portfolio-close span {
  position: absolute;
  width: 17px;
  height: 1px;
  background: hsl(var(--text));
}

.portfolio-close span:first-child {
  transform: rotate(45deg);
}

.portfolio-close span:last-child {
  transform: rotate(-45deg);
}

.portfolio-nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 70;
  display: flex;
  justify-content: center;
  padding: clamp(16px, 2.2vw, 24px) 58px 0;
  pointer-events: none;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 8px;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 999px;
  background: hsl(var(--surface) / 0.82);
  backdrop-filter: blur(18px);
  pointer-events: auto;
  transition: box-shadow 180ms ease;
}

.portfolio-nav.is-scrolled .nav-pill {
  box-shadow: 0 12px 34px rgb(0 0 0 / 0.28);
}

.nav-logo {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient);
  transition: transform 180ms ease;
}

.nav-logo:hover {
  transform: scale(1.1);
}

.nav-logo span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: hsl(var(--bg));
}

.nav-logo i {
  font-family: var(--font-display);
  font-size: 13px;
  font-style: italic;
}

.nav-divider {
  width: 1px;
  height: 20px;
  background: hsl(var(--stroke));
}

.nav-links {
  display: flex;
  gap: 2px;
}

.nav-links a,
.say-hi {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 15px;
  border-radius: 999px;
  color: hsl(var(--muted));
  font-size: 13px;
  font-weight: 600;
  transition: color 180ms ease, background 180ms ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  background: hsl(var(--stroke) / 0.55);
  color: hsl(var(--text));
}

.say-hi {
  color: hsl(var(--text));
}

.say-hi::before,
.button::before,
.section-link::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: inherit;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 180ms ease;
}

.say-hi:hover::before,
.button:hover::before,
.section-link:hover::before {
  opacity: 1;
}

.portfolio-hero {
  position: relative;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  padding: 140px 22px 92px;
}

.hero-video,
.footer-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
  transform: translate(-50%, -50%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 40%, transparent 0 22%, rgb(0 0 0 / 0.18) 48%, rgb(0 0 0 / 0.56) 100%),
    rgb(0 0 0 / 0.2);
}

.hero-bottom-fade {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 220px;
  background: linear-gradient(to top, hsl(var(--bg)), transparent);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  width: min(100%, 840px);
  max-width: 840px;
  min-width: 0;
  text-align: center;
}

.eyebrow,
.section-eyebrow {
  color: hsl(var(--muted));
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 32px;
}

.hero-name {
  max-width: 100%;
  margin: 0 0 22px;
  color: hsl(var(--text));
  font-family: var(--font-display);
  font-size: clamp(72px, 13vw, 168px);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.9;
}

.name-word {
  display: inline-block;
}

.hero-role {
  margin: 0;
  color: hsl(var(--text) / 0.72);
  font-size: clamp(18px, 2.4vw, 28px);
}

.hero-role span {
  display: inline-block;
  color: hsl(var(--text));
  font-family: var(--font-display);
  font-style: italic;
  animation: role-fade-in 400ms ease-out;
}

.hero-copy {
  max-width: 480px;
  margin: 20px 0 0;
  color: hsl(var(--muted));
  font-size: clamp(14px, 1.3vw, 16px);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 46px;
}

.button,
.section-link {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  transition: transform 180ms ease, color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button {
  min-height: 48px;
  padding: 0 28px;
}

.button:hover {
  transform: scale(1.05);
}

.button-solid {
  background: hsl(var(--text));
  color: hsl(var(--bg));
}

.button-solid:hover {
  background: hsl(var(--bg));
  color: hsl(var(--text));
}

.button-outline {
  border: 2px solid hsl(var(--stroke));
  background: hsl(var(--bg));
  color: hsl(var(--text));
}

.button-outline:hover {
  border-color: transparent;
}

.scroll-indicator {
  position: absolute;
  bottom: 28px;
  left: 50%;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 10px;
  color: hsl(var(--muted));
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.scroll-indicator i {
  position: relative;
  display: block;
  width: 1px;
  height: 40px;
  overflow: hidden;
  background: hsl(var(--stroke));
}

.scroll-indicator i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: hsl(var(--text));
  animation: scroll-down 1.5s ease-in-out infinite;
}

.content-section,
.stats {
  background: hsl(var(--bg));
  padding: clamp(72px, 10vw, 112px) 0;
}

.section-inner {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 42px;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
}

.section-eyebrow span {
  display: inline-block;
  width: 32px;
  height: 1px;
  background: hsl(var(--stroke));
}

.section-head h2,
.exploration-center h2,
.footer-content h2 {
  margin: 0;
  color: hsl(var(--text));
  font-size: clamp(42px, 6vw, 86px);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 0.95;
}

em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
}

.section-head p,
.exploration-center p,
.footer-content p {
  max-width: 430px;
  color: hsl(var(--muted));
  line-height: 1.7;
}

.section-link {
  flex: none;
  min-height: 42px;
  padding: 0 18px;
  background: hsl(var(--surface));
  color: hsl(var(--text));
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.work-card {
  position: relative;
  grid-column: span 5;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid hsl(var(--stroke));
  border-radius: 32px;
  background: hsl(var(--surface));
}

.work-card.work-wide {
  grid-column: span 7;
  aspect-ratio: 7 / 5;
}

.work-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms ease;
}

.work-card:hover img {
  transform: scale(1.055);
}

.halftone {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, #000 1px, transparent 1px);
  background-size: 4px 4px;
  opacity: 0.2;
  mix-blend-mode: multiply;
}

.work-hover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: hsl(var(--bg) / 0.72);
  opacity: 0;
  backdrop-filter: blur(18px);
  transition: opacity 240ms ease;
}

.work-card:hover .work-hover {
  opacity: 1;
}

.work-hover span {
  border-radius: 999px;
  background: hsl(var(--text));
  color: hsl(var(--bg));
  padding: 13px 20px;
  font-size: 13px;
  font-weight: 700;
}

.work-card h3 {
  position: absolute;
  bottom: 22px;
  left: 24px;
  margin: 0;
  font-size: 18px;
}

.journal-list {
  display: grid;
  gap: 16px;
}

.journal-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) auto 40px;
  align-items: center;
  gap: 22px;
  min-height: 112px;
  padding: 16px;
  border: 1px solid hsl(var(--stroke));
  border-radius: 40px;
  background: hsl(var(--surface) / 0.35);
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.journal-row:hover {
  background: hsl(var(--surface));
  border-color: hsl(var(--text) / 0.22);
  transform: translateX(8px);
}

.journal-row img {
  width: 80px;
  height: 80px;
  border-radius: 999px;
  object-fit: cover;
}

.journal-copy {
  min-width: 0;
}

.journal-row h3 {
  margin: 0 0 6px;
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 600;
}

.journal-row p,
.journal-row time {
  margin: 0;
  color: hsl(var(--muted));
  font-size: 13px;
  white-space: nowrap;
}

.journal-arrow {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid hsl(var(--stroke));
  border-radius: 50%;
  color: hsl(var(--muted));
  transition: transform 220ms ease, border-color 220ms ease, color 220ms ease;
}

.journal-row:hover .journal-arrow {
  border-color: hsl(var(--text) / 0.34);
  color: hsl(var(--text));
  transform: rotate(45deg);
}

.explorations {
  position: relative;
  min-height: 300vh;
  background: hsl(var(--bg));
}

.exploration-stage {
  position: relative;
  min-height: 300vh;
  overflow: hidden;
}

.exploration-pin {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 2;
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  text-align: center;
}

.exploration-pin.is-pinned {
  position: fixed;
  top: 0;
}

.exploration-pin.is-released {
  position: absolute;
  top: auto;
  bottom: 0;
}

.exploration-center {
  display: grid;
  justify-items: center;
  width: min(520px, calc(100% - 42px));
}

.exploration-center .section-eyebrow {
  margin-bottom: 20px;
  justify-content: center;
}

.exploration-center h2 {
  margin-bottom: 16px;
  font-size: clamp(42px, 5.6vw, 76px);
}

.exploration-center .button {
  margin-top: 34px;
}

.exploration-columns {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 320px));
  justify-content: space-between;
  gap: clamp(48px, 12vw, 160px);
  width: min(1400px, calc(100% - 48px));
  margin: 0 auto;
  pointer-events: none;
}

.exploration-column {
  display: flex;
  flex-direction: column;
  gap: clamp(80px, 12vh, 132px);
  will-change: transform;
}

.exploration-column-one {
  align-items: flex-end;
  padding-top: 35vh;
  transform: translateY(80px);
}

.exploration-column-two {
  align-items: flex-start;
  padding-top: 70vh;
  transform: translateY(260px);
}

.explore-card {
  aspect-ratio: 1;
  width: min(24vw, 320px);
  overflow: hidden;
  border-radius: 28px;
  background: hsl(var(--surface));
  cursor: pointer;
  pointer-events: auto;
  transform: rotate(var(--rot, 0deg));
  transition: transform 500ms ease;
}

.explore-rotate-pos-3 {
  --rot: 3deg;
}

.explore-rotate-pos-2 {
  --rot: 2deg;
}

.explore-rotate-pos-1 {
  --rot: 1deg;
}

.explore-rotate-neg-1 {
  --rot: -1deg;
}

.explore-rotate-neg-2 {
  --rot: -2deg;
}

.explore-rotate-neg-3 {
  --rot: -3deg;
}

.explore-card:hover {
  transform: rotate(0deg) scale(1.04);
}

.explore-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.stat {
  min-height: 220px;
  padding: 32px;
  border: 1px solid hsl(var(--stroke));
  border-radius: 32px;
  background: hsl(var(--surface) / 0.55);
}

.stat strong {
  display: block;
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-size: clamp(64px, 8vw, 112px);
  font-weight: 400;
  line-height: 0.9;
}

.stat span {
  color: hsl(var(--muted));
  font-weight: 700;
}

.portfolio-footer {
  position: relative;
  overflow: hidden;
  min-height: 720px;
  padding: 110px 0 32px;
  background: hsl(var(--bg));
}

.footer-video {
  transform: translate(-50%, -50%) scaleY(-1);
}

.footer-overlay {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 0.62);
}

.footer-top-fade {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1;
  height: 160px;
  background: linear-gradient(to bottom, hsl(var(--bg)), transparent);
}

.marquee {
  position: relative;
  z-index: 2;
  display: flex;
  width: max-content;
  color: hsl(var(--text) / 0.08);
  font-size: clamp(80px, 15vw, 210px);
  font-weight: 700;
  letter-spacing: -0.08em;
  line-height: 0.85;
  text-transform: uppercase;
  animation: marquee 40s linear infinite;
}

.marquee span {
  white-space: nowrap;
}

.footer-content {
  position: relative;
  z-index: 3;
  display: grid;
  justify-items: center;
  margin: 120px auto 0;
  width: min(760px, calc(100% - 44px));
  text-align: center;
}

.footer-bar {
  position: absolute;
  right: clamp(24px, 6vw, 76px);
  bottom: 28px;
  left: clamp(24px, 6vw, 76px);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: hsl(var(--muted));
  font-size: 13px;
}

.footer-bar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-bar p {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.footer-bar p span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.45);
  animation: pulse-dot 1.7s ease-out infinite;
}

.reveal-on-scroll,
.name-reveal,
.blur-in {
  opacity: 0;
  transform: translateY(34px);
}

.reveal-on-scroll.is-visible,
.name-reveal.is-visible,
.blur-in.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 900ms cubic-bezier(0.25, 0.1, 0.25, 1), transform 900ms cubic-bezier(0.25, 0.1, 0.25, 1), filter 900ms ease;
}

.blur-in {
  filter: blur(10px);
}

.blur-in.is-visible {
  filter: blur(0);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgb(0 0 0 / 0.82);
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: min(960px, 92vw);
  max-height: 82vh;
  border-radius: 28px;
  object-fit: contain;
}

.lightbox button {
  position: absolute;
  top: 22px;
  right: 26px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: hsl(var(--surface));
  color: hsl(var(--text));
  cursor: pointer;
  font-size: 26px;
}

@keyframes loader-rise {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scroll-down {
  from { transform: translateY(-100%); }
  to { transform: translateY(200%); }
}

@keyframes role-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes pulse-dot {
  to { box-shadow: 0 0 0 12px rgba(74, 222, 128, 0); }
}

@media (max-width: 820px) {
  .portfolio-nav {
    padding-inline: 14px 56px;
  }

  .nav-divider {
    display: none;
  }

  .nav-links a {
    padding-inline: 11px;
  }

  .say-hi {
    display: none;
  }

  .section-head,
  .footer-bar {
    align-items: start;
    flex-direction: column;
  }

  .works-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .work-card,
  .work-card.work-wide {
    grid-column: auto;
    aspect-ratio: 4 / 3;
  }

  .journal-row {
    grid-template-columns: 64px minmax(0, 1fr) 40px;
    border-radius: 28px;
    gap: 14px;
  }

  .journal-row img {
    width: 64px;
    height: 64px;
  }

  .journal-row time {
    display: none;
  }

  .journal-arrow {
    grid-column: 3;
    grid-row: 1;
  }

  .exploration-columns {
    width: min(100%, calc(100% - 28px));
    gap: 24px;
    opacity: 0.76;
  }

  .exploration-column {
    gap: 72px;
  }

  .exploration-column-one {
    padding-top: 32vh;
  }

  .exploration-column-two {
    padding-top: 64vh;
  }

  .explore-card {
    width: min(38vw, 220px);
  }
}

@media (max-width: 520px) {
  .portfolio-close {
    top: 18px;
    right: 14px;
    z-index: 90;
    border-color: rgb(255 255 255 / 0.22);
    background: rgb(8 8 8 / 0.72);
  }

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

  .nav-pill {
    max-width: calc(100vw - 72px);
    overflow: auto;
  }

  .hero-name {
    font-size: clamp(58px, 18vw, 72px);
    overflow-wrap: normal;
    text-wrap: balance;
  }

  .hero-name .name-word {
    display: block;
  }

  .hero-copy {
    width: min(100%, 280px);
    font-size: 14px;
  }

  .hero-actions {
    display: grid;
    width: 100%;
    max-width: 320px;
    gap: 12px;
  }

  .button {
    width: 100%;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  .reveal-on-scroll,
  .name-reveal,
  .blur-in {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
