:root {
  --ink: #050505;
  --paper: #f7f7f7;
  --muted: #6f6f6f;
  --line: rgba(5, 5, 5, 0.13);
  --blue: #0700ff;
  --dark: #1d1d1d;
  --dark-line: rgba(255, 255, 255, 0.14);
  --dark-muted: rgba(255, 255, 255, 0.62);
  --accent: #d7ff38;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "Poppins", Arial, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.detail-open {
  overflow: hidden;
}

body.lightbox-open {
  overflow: hidden;
}

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

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

[hidden] {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  padding: 20px clamp(19px, 5vw, 76px);
  border-bottom: 1px solid var(--line);
  background: rgba(247, 247, 247, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: clamp(48px, 6vw, 74px);
  height: clamp(48px, 6vw, 74px);
  object-fit: contain;
}

.brand-name {
  color: var(--ink);
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

.nav a,
.ticker span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--muted);
  font-family: "SFMono-Regular", "Roboto Mono", "IBM Plex Mono", ui-monospace, "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 520;
  letter-spacing: 0.04em;
  line-height: 1.35;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: clamp(22px, 3vw, 46px);
  align-items: center;
}

.nav a {
  position: relative;
  padding: 8px 0;
}

.nav a::after {
  position: absolute;
  right: 0;
  bottom: 4px;
  left: 0;
  height: 1px;
  content: "";
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.menu-button,
.close-button {
  display: none;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.menu-button span,
.close-button span {
  position: absolute;
  width: 16px;
  height: 1px;
  background: var(--ink);
}

.menu-button span:first-child {
  transform: translateY(-4px);
}

.menu-button span:last-child {
  transform: translateY(4px);
}

.intro {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  min-height: calc(78svh - 82px);
  padding: clamp(64px, 11vw, 136px) clamp(19px, 5vw, 76px) 42px;
  background: var(--blue);
  color: #fff;
}

.intro-copy {
  position: relative;
  z-index: 1;
  max-width: 1120px;
}

.ascii-logo {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  pointer-events: auto;
}

.intro .eyebrow {
  color: rgba(255, 255, 255, 0.78);
}

.intro h1 {
  display: grid;
  max-width: 1040px;
  margin: 16px 0 0;
  font-size: clamp(48px, 8.7vw, 126px);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: 0;
  text-transform: uppercase;
}

.intro h1 span {
  display: block;
}

.rotating-word {
  min-height: 0.92em;
  color: #fff;
  transition: opacity 180ms ease, transform 180ms ease;
}

.rotating-word.is-changing {
  opacity: 0;
  transform: translateY(0.12em);
}

.intro-actions {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  justify-items: end;
}

.text-link {
  border-bottom: 1px solid currentColor;
  color: inherit;
  font-size: 14px;
  font-weight: 560;
  text-transform: uppercase;
}

.ticker {
  overflow: hidden;
  max-width: 100%;
  border-block: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: slide 28s linear infinite;
}

.ticker span {
  padding: 14px 28px;
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
}

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

.work-section,
.profile,
.footer {
  padding: clamp(58px, 9vw, 112px) clamp(19px, 5vw, 76px);
}

.work-section {
  background: #fff;
  color: var(--ink);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
  border-bottom: 1px solid currentColor;
  padding-bottom: 24px;
}

.section-heading h2,
.profile h2,
.detail-head h2 {
  margin: 0;
  font-size: clamp(32px, 5.8vw, 82px);
  font-weight: 520;
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-heading p,
.profile p,
.detail-meta p,
dd,
.footer p {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.45;
}

.work-section .section-heading p,
.work-section .eyebrow {
  color: var(--muted);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 clamp(28px, 5vw, 58px);
}

.filter-button {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.filter-button:hover,
.filter-button[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(28px, 4.5vw, 68px) clamp(18px, 2.8vw, 34px);
}

.work-card {
  grid-column: span 4;
  align-self: start;
}

.work-card.is-large {
  grid-column: span 8;
}

.work-button {
  display: grid;
  width: 100%;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: transparent;
}

.is-large .media-frame {
  aspect-ratio: 16 / 10;
}

.media-frame img {
  height: 100%;
  object-fit: cover;
  transition: transform 700ms ease, opacity 700ms ease;
}

.work-button:hover img {
  transform: scale(1.045);
  opacity: 0.82;
}

.work-button:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 8px;
}

.view-cue {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  background: rgba(5, 5, 5, 0.62);
  color: #fff;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.work-button:hover .view-cue,
.work-button:focus-visible .view-cue {
  opacity: 1;
  transform: translateY(0);
}

.work-info {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  min-height: 46px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0 14px;
}

.work-info > span {
  font-size: clamp(17px, 1.7vw, 24px);
  font-weight: 520;
}

.project-detail {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  padding: clamp(12px, 2vw, 24px);
  background: rgba(5, 5, 5, 0.38);
  color: var(--ink);
  backdrop-filter: blur(12px);
}

.detail-backdrop {
  position: fixed;
  inset: 0;
}

.detail-shell {
  position: relative;
  z-index: 1;
  overflow-y: auto;
  width: min(100%, 1440px);
  max-height: 100%;
  margin: auto;
  padding: clamp(24px, 4vw, 58px);
  border: 1px solid var(--line);
  outline: 0;
  background: #fff;
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.38);
}

.detail-head {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: start;
}

.close-button {
  position: sticky;
  top: 0;
  display: grid;
  flex: 0 0 auto;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(10px);
}

.close-button span {
  background: var(--ink);
}

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

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

.detail-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.52fr);
  gap: 24px;
  margin: 32px 0 28px;
}

.detail-meta p,
.project-detail dd,
.project-detail .eyebrow {
  color: var(--muted);
}

dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

dt {
  margin-bottom: 4px;
}

dd {
  max-width: none;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 34px);
}

.gallery figure {
  grid-column: span 6;
  margin: 0;
}

.gallery figure.wide {
  grid-column: 1 / -1;
}

.detail-bottom-close {
  display: flex;
  grid-column: 1 / -1;
  justify-content: center;
  padding: clamp(18px, 4vw, 50px) 0 4px;
}

.bottom-close-button {
  display: inline-grid;
  grid-template-columns: auto auto;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
}

.bottom-close-button span {
  font-size: 22px;
  line-height: 1;
}

.gallery img {
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  cursor: zoom-in;
}

.gallery .wide img {
  max-height: 760px;
}

.video-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  min-height: 320px;
  background: var(--ink);
}

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

.video-fallback {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
}

.video-open-link {
  display: inline-flex;
  margin-top: 10px;
  color: var(--muted);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 54px);
  background: rgba(5, 5, 5, 0.92);
}

.lightbox img {
  display: block;
  max-width: min(100%, 1400px);
  max-height: 86svh;
  object-fit: contain;
}

.lightbox-close {
  position: fixed;
  top: clamp(14px, 3vw, 28px);
  right: clamp(14px, 3vw, 28px);
  z-index: 1;
  display: inline-grid;
  grid-template-columns: auto auto;
  gap: 9px;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.lightbox-close span {
  font-size: 22px;
  line-height: 1;
}

.profile {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(300px, 0.62fr);
  gap: 36px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.footer a {
  font-size: clamp(24px, 5vw, 64px);
  font-weight: 520;
  line-height: 1;
}

@media (max-width: 880px) {
  .menu-button {
    display: grid;
  }

  .nav {
    position: fixed;
    top: 82px;
    right: 0;
    left: 0;
    display: none;
    padding: 20px 18px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
  }

  .nav.is-open {
    display: grid;
  }

  .intro,
  .detail-meta,
  .profile,
  .footer {
    grid-template-columns: 1fr;
  }

  .intro {
    min-height: calc(86svh - 82px);
  }

  .intro-actions,
  .footer {
    justify-items: start;
    align-items: start;
  }

  .footer {
    flex-direction: column;
  }

  .section-heading {
    display: grid;
  }

  .filter-bar {
    gap: 7px;
    overflow-x: auto;
    flex-wrap: nowrap;
    margin-right: -18px;
    padding-right: 18px;
    scrollbar-width: none;
  }

  .filter-bar::-webkit-scrollbar {
    display: none;
  }

  .filter-button {
    flex: 0 0 auto;
  }

  .work-card,
  .work-card.is-large,
  .gallery figure,
  .gallery figure.wide {
    grid-column: 1 / -1;
  }

  .media-frame,
  .is-large .media-frame {
    aspect-ratio: 4 / 5;
  }

  .work-info {
    display: grid;
  }

  .view-cue {
    opacity: 1;
    transform: none;
  }

  .project-detail {
    padding: 0;
  }

  .detail-shell {
    width: 100%;
    height: 100%;
    max-height: none;
    padding: 22px 18px 42px;
    border: 0;
  }

  .detail-head {
    gap: 14px;
  }
}

@media (max-width: 520px) {
  .intro h1 {
    font-size: clamp(42px, 15vw, 64px);
  }

  .site-header {
    padding-inline: 14px;
  }

  .gallery img {
    min-height: 220px;
  }
}

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

  .ticker-track {
    animation: none;
  }

  .brand,
  .nav a::after,
  .media-frame img,
  .view-cue,
  .filter-button,
  .rotating-word {
    transition: none;
  }
}
