/* Carlos Velandia — Immersive Particle Portfolio */

:root {
  --bg: #030208;
  --fg: #f2f0ec;
  /* Secondary / lower-hierarchy text — brighter for readability (~82%) */
  --fg-muted: rgba(242, 240, 236, 0.82);
  --fg-muted-soft: rgba(242, 240, 236, 0.7);
  --accent: #e04a80;
  --line: rgba(242, 240, 236, 0.1);
  --nav-h: 64px;
  --font-display: "Archivo Black", Impact, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* stronger halo so muted type holds over particles */
  --text-legibility: 0 1px 2px rgba(0, 0, 0, 0.65), 0 0 22px rgba(0, 0, 0, 0.35),
    0 0 40px rgba(0, 0, 0, 0.2);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--bg);
  cursor: none;
}

body.is-touch {
  cursor: auto;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: none;
}

body.is-touch button {
  cursor: pointer;
}

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

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

/* WebGL backdrop */
#gl-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

#vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    transparent 35%,
    rgba(0, 0, 0, 0.55) 100%
  );
}

#grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.09;
  mix-blend-mode: overlay;
  background-repeat: repeat;
  background-size: 128px 128px;
}

/* Darkens backdrop as user scrolls text pages — set via --scroll-dim */
#scroll-veil {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: #020108;
  opacity: calc(var(--scroll-dim, 0) * 0.58);
  transition: opacity 0.12s linear;
}

/* Custom cursor */
#cursor,
#cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  border-radius: 50%;
  transform: translate3d(-100px, -100px, 0);
}

#cursor {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  background: var(--fg);
}

#cursor-ring {
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 1px solid rgba(242, 240, 236, 0.45);
  transition: width 0.25s var(--ease), height 0.25s var(--ease), margin 0.25s var(--ease),
    border-color 0.25s;
}

body.cursor-hover #cursor-ring {
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  border-color: var(--accent);
}

body.is-touch #cursor,
body.is-touch #cursor-ring {
  display: none;
}

/* Preloader */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #020108;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}

#preloader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#preloader-count {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 6rem);
  letter-spacing: -0.03em;
  line-height: 1;
}

#preloader-track {
  width: min(220px, 50vw);
  height: 1px;
  background: rgba(242, 240, 236, 0.15);
  overflow: hidden;
}

#preloader-bar {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: left center;
}

#preloader-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.45;
}

/* Nav */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  mix-blend-mode: difference;
}

.wordmark {
  font-family: var(--font-display);
  font-size: clamp(0.72rem, 1.5vw, 0.9rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: baseline;
  gap: 0.75rem;
  line-height: 1;
  min-width: 0;
  flex: 1 1 auto;
  max-width: calc(100% - 12rem);
}

.wordmark-name {
  display: inline-block;
  flex-shrink: 0;
}

.wordmark-tag {
  font-family: var(--font-body);
  font-size: clamp(0.52rem, 0.9vw, 0.62rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  list-style: none;
  flex-shrink: 0;
}

.nav-links a,
.nav-links button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.85;
  transition: opacity 0.25s;
  padding: 0.5rem 0;
  line-height: 1;
  height: auto;
  min-height: 0;
  will-change: transform;
  background: none;
  border: none;
  font-family: inherit;
  color: inherit;
}

.nav-links a:hover,
.nav-links button:hover,
.nav-links a:focus-visible,
.nav-links button:focus-visible,
.nav-links a.is-active {
  opacity: 1;
}

.nav-links a:focus-visible,
.nav-links button:focus-visible,
.wordmark:focus-visible,
.works-overlay a:focus-visible,
.work-title:focus-visible,
.prev-next a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--fg);
}

/* Works overlay */
.works-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(2, 1, 8, 0.94);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}

.works-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.works-overlay-inner {
  width: calc(min(720px, 90vw) + 120px);
  margin-left: -60px;
  margin-right: -60px;
  padding-left: 60px;
  padding-right: 60px;
  max-height: 80vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.works-overlay h2 {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.45;
  margin-bottom: 1.5rem;
}

.works-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.7;
}

.works-overlay a {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 1.15rem 0;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 3.2vw, 1.75rem);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  transition: padding 0.3s var(--ease), color 0.25s;
  overflow-wrap: normal;
  word-break: normal;
  border-bottom: 1px solid var(--line);
}

.works-overlay a:hover {
  padding-left: 0.75rem;
  color: var(--accent);
}

.works-overlay .year {
  margin-left: auto;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.4;
  flex-shrink: 0;
}

/* Main */
#app {
  position: relative;
  z-index: 10;
  min-height: 100dvh;
  padding-top: var(--nav-h);
}

#view {
  min-height: calc(100dvh - var(--nav-h));
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
}

#view.is-leaving {
  opacity: 0;
  transform: translateY(10px);
}

#view.is-entering {
  opacity: 0;
  transform: translateY(12px);
}

/* Home */
.page-home {
  min-height: calc(100dvh - var(--nav-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.75rem clamp(1rem, 4vw, 4rem) 2.5rem;
}

.works-scroll {
  position: relative;
  width: calc(min(50%, 720px) + 120px);
  max-width: calc(50vw + 120px);
  margin-left: -60px;
  margin-right: -60px;
  padding-left: 60px;
  padding-right: 60px;
  height: min(82vh, 780px);
  overflow: hidden;
  perspective: 900px;
  outline: none;
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000 6%,
    #000 94%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000 6%,
    #000 94%,
    transparent 100%
  );
  cursor: none;
}

body.is-touch .works-scroll {
  cursor: auto;
  touch-action: none;
}

.works-scroll-track {
  display: flex;
  flex-direction: column;
  will-change: transform;
}

.works-index {
  perspective: 900px;
  list-style: none;
  flex-shrink: 0;
  width: 100%;
}

.works-index li {
  line-height: 0.95;
}

.work-title {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4.2vw, 4.6rem);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--fg);
  /* Resting: no selection — soft, unhighlighted */
  opacity: 0.42;
  transform-style: preserve-3d;
  will-change: transform, opacity, filter;
  /* Opacity is set imperatively on hover; avoid CSS transitions here —
     continuous mouse-driven custom props were trapping transitions at 0.42 */
  transition: none;
  padding: 0.12em 0;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  max-width: 100%;
  transform: translate3d(
      calc(var(--push-x, 0px) + var(--disp-x, 0px)),
      calc(var(--push-y, 0px) + var(--disp-y, 0px)),
      0
    )
    rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.22),
    0 2px 0 rgba(0, 0, 0, 0.18),
    0 3px 0 rgba(0, 0, 0, 0.14),
    0 4px 0 rgba(0, 0, 0, 0.12),
    0 6px 0 rgba(0, 0, 0, 0.1),
    0 8px 16px rgba(0, 0, 0, 0.45),
    0 14px 28px rgba(0, 0, 0, 0.3),
    calc(var(--ca-x, 0px) * -1) 0 var(--ca-blur, 0px) rgba(255, 40, 90, 0.35),
    var(--ca-x, 0px) 0 var(--ca-blur, 0px) rgba(40, 180, 255, 0.3);
  filter: blur(var(--ca-blur, 0px));
}

.work-title .word {
  display: inline-block;
  white-space: nowrap;
}

.work-title .letter {
  display: inline-block;
}

.work-title .letter-inner {
  display: inline-block;
  animation: letter-float 4s ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
}

@keyframes letter-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-0.02em);
  }
}

/* While exploring: dim non-active; only the hovered title is fully highlighted */
.works-scroll.is-hovering .work-title:not(.is-active) {
  opacity: 0.22 !important;
  filter: blur(calc(2px + var(--ca-blur, 0px)));
}

.works-scroll.is-hovering .work-title.is-active {
  opacity: 1 !important;
  filter: blur(var(--ca-blur, 0px));
}

.work-title .meta-line {
  display: block;
  font-family: var(--font-body);
  font-size: clamp(0.7rem, 1.2vw, 0.85rem);
  font-weight: 600;
  letter-spacing: 0.18em;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(-6px);
  transition: none;
  margin-top: 0.15em;
  text-shadow: none;
  filter: none;
  white-space: nowrap;
  pointer-events: none;
}

.work-title.is-active .meta-line,
.work-title:focus-visible .meta-line {
  opacity: 0.75;
  max-height: 2.5rem;
  transform: translateY(0);
}

.home-hint {
  margin-top: 1.5rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.35;
  animation: hint-pulse 3s ease-in-out infinite;
}

@keyframes hint-pulse {
  0%,
  100% {
    opacity: 0.25;
  }
  50% {
    opacity: 0.5;
  }
}

/* Pages */
.page {
  padding: 2rem clamp(1rem, 4vw, 4rem) 6rem;
  max-width: 1200px;
}

.page-wide {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: clamp(1.25rem, 5vw, 3rem);
  padding-right: clamp(1.25rem, 5vw, 3rem);
}

.page-work {
  max-width: 960px;
  margin: 0 auto;
  padding-left: clamp(1.25rem, 5vw, 3rem);
  padding-right: clamp(1.25rem, 5vw, 3rem);
}

.page-work .page-header,
.page-work .meta-grid,
.page-work .work-note,
.page-work .awards-list,
.page-work .work-desc,
.page-work .video-wrap,
.page-work .prev-next {
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.page-work .work-desc {
  text-align: left;
}

.page-work .key-image-wrap {
  width: 100%;
  margin-left: 0;
  max-width: 100%;
}

.page-work .gallery-grid {
  width: 100%;
}

.page-header {
  margin-bottom: 3rem;
}

.page-kicker {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 0.75rem;
}

/* Collab (and any kicker marked bright): full white label above the title */
.page-kicker.is-bright {
  color: #ffffff;
  opacity: 1;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  max-width: 16ch;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.page-title.sticky-title {
  position: sticky;
  top: calc(var(--nav-h) + 0.5rem);
  z-index: 5;
  mix-blend-mode: difference;
  pointer-events: none;
  margin-bottom: 2rem;
}

.meta-grid {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1.25rem 1.5rem;
  margin: 0 0 2.5rem;
  padding: 1.35rem 1.15rem;
  border-top: none;
  border-bottom: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

/* Soft blurred dim plate behind meta (edges feather, text stays sharp) */
.meta-grid::before {
  content: "";
  position: absolute;
  inset: -18px -28px;
  z-index: -1;
  pointer-events: none;
  border-radius: 48% / 42%;
  background: radial-gradient(
    ellipse 70% 65% at 50% 50%,
    rgba(0, 0, 0, 0.58) 0%,
    rgba(0, 0, 0, 0.38) 48%,
    rgba(0, 0, 0, 0.12) 72%,
    transparent 100%
  );
  filter: blur(22px);
  opacity: 0.95;
}

.meta-item dt {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.65;
  color: var(--fg-muted);
  text-shadow: var(--text-legibility);
  margin-bottom: 0.35rem;
}

.meta-item dd {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
}

.awards-list {
  position: relative;
  isolation: isolate;
  list-style: none;
  margin: 0 0 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 1rem 1.15rem;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

/* Soft blurred dim plate behind awards */
.awards-list::before {
  content: "";
  position: absolute;
  inset: -16px -24px -16px -20px;
  z-index: -1;
  pointer-events: none;
  border-radius: 42% / 55%;
  background: radial-gradient(
    ellipse 75% 70% at 35% 50%,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.4) 42%,
    rgba(0, 0, 0, 0.14) 70%,
    transparent 100%
  );
  filter: blur(24px);
  opacity: 0.95;
}

.awards-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 400;
  font-style: italic;
  color: var(--fg-muted);
  text-shadow: var(--text-legibility);
  padding: 0.12rem 0;
  line-height: 1.45;
  opacity: 1;
}

.awards-list .award-mark {
  flex-shrink: 0;
  font-size: 0.5rem;
  line-height: 1.6;
  font-style: normal;
  opacity: 0.7;
  color: var(--fg-muted-soft);
  margin-top: 0.2em;
}

.awards-list .award-text {
  color: var(--fg-muted);
  font-style: italic;
  font-weight: 400;
  text-shadow: var(--text-legibility);
}

.work-desc {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.7;
  max-width: 68ch;
  opacity: 0.94;
  margin-bottom: 3rem;
}

.work-desc p + p {
  margin-top: 1.25rem;
}

.work-note {
  font-size: 0.9rem;
  font-style: italic;
  font-weight: 400;
  color: var(--fg-muted);
  text-shadow: var(--text-legibility);
  opacity: 1;
  margin: -1.5rem 0 2.5rem;
  max-width: 60ch;
}

/* Media */
.media-section {
  margin: 2.5rem 0;
  position: relative;
  z-index: 0;
}

.key-image-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 0 2rem;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  z-index: 1;
  --hero-scale: 1;
  transform: scale(var(--hero-scale));
  transform-origin: center center;
  will-change: transform;
}

.media-frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #050308;
  will-change: transform;
  transform-style: preserve-3d;
  transform-origin: center center;
  transition: box-shadow 0.35s ease;
}

.media-frame:hover {
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  z-index: 2;
}

.media-frame canvas,
.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  transform: scale(1.04);
  transition: filter 0.35s ease;
}

.media-frame:hover img {
  filter: contrast(1.08) saturate(1.12) brightness(1.05);
}

.portrait .media-frame:hover img,
.portrait .portrait-media:hover img {
  filter: brightness(0.88) contrast(1.08) saturate(1.05);
}

.media-frame .glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  background: radial-gradient(
    circle at var(--gx, 50%) var(--gy, 50%),
    rgba(255, 255, 255, 0.42) 0%,
    rgba(255, 255, 255, 0.08) 35%,
    transparent 62%
  );
  mix-blend-mode: soft-light;
}

.media-frame:hover .glare {
  opacity: 1;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  margin: 0 0 2.5rem;
  width: 100%;
  position: relative;
  z-index: 0;
  align-items: start;
}

.gallery-item {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  margin: 0;
  transform: none;
}

.gallery-item:nth-child(1),
.gallery-item:nth-child(2) {
  aspect-ratio: 16 / 11;
}

.gallery-item:nth-child(3),
.gallery-item:nth-child(4) {
  aspect-ratio: 16 / 12;
}

.video-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 0 2rem;
  background: #000;
  overflow: hidden;
  border: 1px solid var(--line);
  z-index: 1;
  --hero-scale: 1;
  transform: scale(var(--hero-scale));
  transform-origin: center center;
  will-change: transform;
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.prev-next {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.prev-next a {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.6;
  max-width: 45%;
  transition: opacity 0.25s;
}

.prev-next a:hover {
  opacity: 1;
}

.prev-next .lbl {
  display: block;
  font-size: 0.65rem;
  opacity: 0.5;
  margin-bottom: 0.35rem;
}

.prev-next .ttl {
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 2vw, 1.15rem);
  letter-spacing: 0;
  text-transform: uppercase;
}

/* About */
.pull-quote {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4.2vw, 3.15rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  max-width: 18ch;
  margin: 0;
  opacity: 0.96;
  min-width: 0;
}

/* Large bold excerpt left, bigger portrait right — no overlap */
.about-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 42%);
  gap: clamp(1.75rem, 4.5vw, 3.25rem);
  align-items: start;
  margin: 1.5rem 0 3rem;
}

.bio-lead {
  margin: 0;
}

.portrait {
  margin: 0;
  margin-top: clamp(1.75rem, 4vw, 3rem); /* sit slightly lower beside the quote */
  height: var(--portrait-h, 360px);
  max-height: none;
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  perspective: 900px;
  --hero-scale: 1;
  transform: scale(var(--hero-scale));
  transform-origin: center top;
  will-change: transform;
  transition: none;
}

.portrait .portrait-media,
.portrait .media-frame.portrait-media {
  width: auto;
  height: 100%;
  max-height: var(--portrait-h, 360px);
  max-width: 100%;
  aspect-ratio: auto;
  background: #0a0608;
  border: 1px solid var(--line);
}

.portrait .portrait-media img,
.portrait .media-frame.portrait-media img {
  width: auto;
  height: 100%;
  max-height: var(--portrait-h, 360px);
  max-width: min(100%, 420px);
  object-fit: contain;
  object-position: top center;
  transform: none;
  /* slightly darker portrait */
  filter: brightness(0.82) contrast(1.06) saturate(0.95);
}

.bio-text,
.collab-text {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  font-weight: 400;
  line-height: 1.75;
  max-width: 66ch;
  opacity: 0.9;
}

.bio-text p + p,
.collab-text p + p {
  margin-top: 1.25rem;
}

/* Exhibitions */
.exh-year {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: -0.02em;
  margin: 2.5rem 0 1rem;
  scroll-margin-top: calc(var(--nav-h) + 1.5rem);
}

.exh-list {
  list-style: none;
}

.exh-row {
  display: flex;
  gap: 1rem;
  padding: 0.85rem 0 0.85rem 0.85rem;
  border-bottom: 1px solid var(--line);
  font-size: clamp(0.85rem, 1.2vw, 0.95rem);
  line-height: 1.4;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  border-left: 2px solid transparent;
}

.exh-row.is-visible {
  opacity: 0.8;
  transform: translateY(0);
}

.exh-row.is-award {
  border-left-color: rgba(242, 240, 236, 0.35);
}

.exh-row.is-award.is-visible {
  opacity: 1;
}

/* Text displace + chromatic aberration */
.text-displace {
  --disp-x: 0px;
  --disp-y: 0px;
  --ca-x: 0px;
  --ca-y: 0px;
  --ca-blur: 0px;
  --ca-str: 0;
  --mag-x: 0px;
  --mag-y: 0px;
  transform: translate3d(
    calc(var(--disp-x) + var(--mag-x)),
    calc(var(--disp-y) + var(--mag-y)),
    0
  );
  text-shadow:
    calc(var(--ca-x) * -1) calc(var(--ca-y) * -0.5) 0
      rgba(255, 40, 90, calc(0.15 + var(--ca-str) * 0.75)),
    var(--ca-x) calc(var(--ca-y) * 0.5) 0
      rgba(40, 200, 255, calc(0.12 + var(--ca-str) * 0.7)),
    0 0 calc(var(--ca-blur) * 2)
      rgba(255, 255, 255, calc(var(--ca-str) * 0.12));
  filter: blur(var(--ca-blur));
  will-change: transform, filter, text-shadow;
}

.text-displace--hot {
  z-index: 2;
}

.work-title.text-displace {
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.22),
    0 2px 0 rgba(0, 0, 0, 0.18),
    0 3px 0 rgba(0, 0, 0, 0.14),
    0 4px 0 rgba(0, 0, 0, 0.12),
    0 6px 0 rgba(0, 0, 0, 0.1),
    0 8px 16px rgba(0, 0, 0, 0.45),
    0 14px 28px rgba(0, 0, 0, 0.3),
    calc(var(--ca-x, 0px) * -1) calc(var(--ca-y, 0px) * -0.5) 0
      rgba(255, 40, 90, calc(0.2 + var(--ca-str, 0) * 0.8)),
    var(--ca-x, 0px) calc(var(--ca-y, 0px) * 0.5) 0
      rgba(40, 200, 255, calc(0.18 + var(--ca-str, 0) * 0.75)),
    0 0 calc(var(--ca-blur, 0px) * 2.5)
      rgba(255, 255, 255, calc(var(--ca-str, 0) * 0.15));
  filter: blur(var(--ca-blur, 0px));
}

.site-nav .text-displace {
  filter: blur(var(--ca-blur));
}

.magnetic {
  --mag-x: 0px;
  --mag-y: 0px;
}

.site-footer {
  position: relative;
  z-index: 10;
  padding: 2rem clamp(1rem, 4vw, 4rem) 2.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.4;
  border-top: 1px solid var(--line);
  margin-top: 2rem;
}

/* Stagger enter */
.stagger > * {
  opacity: 0;
  transform: translateY(16px);
  animation: stagger-in 0.7s var(--ease) forwards;
}

.stagger > *:nth-child(1) {
  animation-delay: 0.05s;
}
.stagger > *:nth-child(2) {
  animation-delay: 0.12s;
}
.stagger > *:nth-child(3) {
  animation-delay: 0.19s;
}
.stagger > *:nth-child(4) {
  animation-delay: 0.26s;
}
.stagger > *:nth-child(5) {
  animation-delay: 0.33s;
}
.stagger > *:nth-child(6) {
  animation-delay: 0.4s;
}
.stagger > *:nth-child(7) {
  animation-delay: 0.47s;
}
.stagger > *:nth-child(8) {
  animation-delay: 0.54s;
}

@keyframes stagger-in {
  to {
    opacity: 1;
    transform: none;
  }
}

/* Hide long tag before it collides with nav on mid widths */
@media (max-width: 1100px) {
  .wordmark-tag {
    display: none;
  }

  .wordmark {
    max-width: none;
    flex: 0 1 auto;
  }
}

/* Responsive */
@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    inset: 0;
    background: rgba(2, 1, 8, 0.97);
    flex-direction: column;
    justify-content: center;
    gap: 1.75rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    mix-blend-mode: normal;
  }

  .nav-links.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a,
  .nav-links button {
    font-size: 1rem;
  }

  .site-nav {
    mix-blend-mode: normal;
  }

  .wordmark-tag {
    display: none;
  }

  .page-title.sticky-title {
    position: relative;
    top: 0;
    mix-blend-mode: normal;
  }

  .home-hint {
    display: none;
  }

  .works-scroll {
    width: 100%;
    max-width: 100%;
    height: min(78vh, 700px);
  }

  .work-title {
    font-size: clamp(1.75rem, 9.5vw, 2.8rem);
  }

  .about-intro {
    grid-template-columns: 1fr;
  }

  .portrait {
    height: auto !important;
    justify-content: flex-start;
  }

  .portrait img {
    height: auto;
    max-height: none;
    width: min(100%, 360px);
    max-width: 360px;
  }

  .page-work {
    max-width: 100%;
  }

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

  .gallery-item:nth-child(n) {
    aspect-ratio: 16 / 10;
  }
}

/* Contact page */
.page-contact .page-title {
  max-width: 12ch;
}

.contact-lead {
  margin-top: 1.5rem;
  max-width: 36ch;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.55;
  font-weight: 400;
  opacity: 0.78;
  color: var(--fg);
}

.contact-channels {
  display: flex;
  flex-direction: column;
  margin: 0.5rem 0 2.5rem;
  border-top: 1px solid var(--line);
}

.contact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 1.5rem;
  gap: 1rem 1.25rem;
  align-items: center;
  padding: 1.35rem 0.15rem;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: background 0.35s var(--ease), opacity 0.25s var(--ease);
  opacity: 0.88;
}

.contact-row.is-static {
  cursor: default;
  opacity: 0.92;
}

.contact-row.is-static:hover {
  background: transparent;
}

.contact-row:not(.is-static):hover,
.contact-row:not(.is-static):focus-visible {
  opacity: 1;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04),
    transparent 70%
  );
}

.contact-arrow--none {
  visibility: hidden;
}

.contact-idx {
  display: none;
}

.contact-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.contact-label {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.2vw, 1.55rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
}

.contact-hint {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  opacity: 1;
  color: var(--fg-muted);
  text-shadow: var(--text-legibility);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-value {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.8vw, 1.2rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: right;
  justify-self: end;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.contact-arrow {
  font-size: 1rem;
  opacity: 0.45;
  transition: transform 0.35s var(--ease), opacity 0.25s;
  justify-self: end;
}

.contact-row:hover .contact-arrow,
.contact-row:focus-visible .contact-arrow {
  opacity: 1;
  transform: translate(2px, -2px);
}

.contact-note {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  opacity: 1;
  color: var(--fg-muted-soft);
  text-shadow: var(--text-legibility);
  max-width: 40ch;
  line-height: 1.5;
  font-style: italic;
}

@media (max-width: 720px) {
  .contact-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "label arrow"
      "value arrow";
    gap: 0.35rem 0.85rem;
    padding: 1.15rem 0;
  }
  .contact-meta {
    grid-area: label;
  }
  .contact-value {
    grid-area: value;
    text-align: left;
    justify-self: start;
    font-size: 0.95rem;
  }
  .contact-arrow {
    grid-area: arrow;
    align-self: center;
  }
  .contact-hint {
    white-space: normal;
  }
}

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

  #view {
    transition: none;
  }

  .stagger > * {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .exh-row {
    opacity: 1;
    transform: none;
  }

  .work-title {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  }

  .home-hint {
    animation: none;
    opacity: 0.4;
  }

  .text-displace {
    transform: none !important;
    filter: none !important;
    text-shadow: none !important;
  }
}

/* Disable blur and chromatic aberration while preserving normal title depth */
.text-displace,
.text-displace--hot,
.site-nav .text-displace {
  filter: none !important;
  text-shadow: none !important;
}

.work-title.text-displace {
  filter: none !important;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.22),
    0 2px 0 rgba(0, 0, 0, 0.18),
    0 3px 0 rgba(0, 0, 0, 0.14),
    0 4px 0 rgba(0, 0, 0, 0.12),
    0 6px 0 rgba(0, 0, 0, 0.1),
    0 8px 16px rgba(0, 0, 0, 0.45),
    0 14px 28px rgba(0, 0, 0, 0.3) !important;
}