:root {
  color-scheme: dark;
  --bg: #080909;
  --ink: #f0f1ed;
  --muted: #aeb8b5;
  --line: #74817e66;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --mono: "IBM Plex Mono", Consolas, monospace;
  --sans: "IBM Plex Sans", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 86px; overflow-x: clip; scrollbar-gutter: stable; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--ink); font: 400 16px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
body.view-open { overflow: hidden; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid #fff; outline-offset: 5px; }
.shell { width: min(100% - 56px, 1540px); margin-inline: auto; }
.gallery-view { position: relative; min-height: 100svh; transition: opacity .55s ease, transform .9s var(--ease); }
.gallery-view.is-background { opacity: .13; transform: scale(.985); pointer-events: none; }

.site-header { position: fixed; z-index: 20; isolation: isolate; top: 0; left: 0; right: 0; height: 72px; display: flex; align-items: center; justify-content: space-between; padding-inline: 28px; transition: height .55s var(--ease); }
.site-header::before { content: ""; position: absolute; z-index: -1; top: 0; left: 0; right: 0; bottom: -72px; background: #080909a8; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); mask-image: linear-gradient(180deg, #000 0%, #000 32%, transparent 100%); pointer-events: none; }
.site-header.is-scrolled { height: 60px; }
.site-name { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; white-space: nowrap; }
.site-name__mark { display: block; width: 26px; height: 26px; flex: none; }
.site-name__word { font: 600 16px/1 var(--sans); letter-spacing: -.065em; }
.site-name__ai { align-self: stretch; display: flex; align-items: center; padding-left: 9px; border-left: 1px solid #8e9894; font: 500 11px/1 var(--mono); letter-spacing: -.03em; }
.site-header nav { display: flex; align-items: center; gap: 30px; }
.site-header nav a { position: relative; font: 500 10px/1 var(--mono); text-decoration: none; text-transform: uppercase; white-space: nowrap; }
.site-header nav a::after { content: ""; position: absolute; left: 0; bottom: -8px; width: 100%; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .6s var(--ease); }
.site-header nav a:hover::after, .site-header nav a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.site-header__line { position: absolute; bottom: -1px; left: 0; width: 100%; height: 2px; background: #fff; transform: scaleX(var(--scroll-progress, 0)); transform-origin: left; pointer-events: none; }

.hero { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; min-height: clamp(220px, 28svh, 320px); padding-top: 100px; padding-bottom: 16px; }
.hero::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); background: repeating-linear-gradient(103deg, transparent 0 161px, #69716a 162px, transparent 163px); opacity: .27; pointer-events: none; }
.hero__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; width: 100%; }
.hero h1 { margin: 0; font: 700 clamp(64px, 8vw, 124px)/.82 var(--sans); letter-spacing: -.095em; white-space: nowrap; }

.projects { position: relative; z-index: 1; padding-top: 26px; }
.filter-bar { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; padding-bottom: 4px; }
.filter-bar button { border: 1px solid #818d8d7a; border-radius: 99px; padding: 9px 14px; color: #d7dfdd; background: transparent; cursor: pointer; font: 500 10px/1 var(--mono); text-transform: uppercase; transition: color .4s, background .4s, border-color .4s, transform .5s var(--ease); }
.filter-bar button:hover { transform: translateY(-2px); border-color: var(--ink); }
.filter-bar button[aria-pressed="true"] { color: #13191a; background: var(--ink); border-color: var(--ink); }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 42px 12px; align-items: start; overflow-anchor: none; transition: height .7s var(--ease), opacity .28s ease, transform .7s var(--ease); }
.project-grid.is-switching { opacity: 0; transform: translateY(12px); pointer-events: none; }
.project-card { display: block; width: 100%; min-width: 0; padding: 0; border: 0; color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
.project-card[hidden] { display: none; }
.project-card__frame { display: block; position: relative; overflow: hidden; aspect-ratio: 1.53; background: #1c2224; isolation: isolate; }
.project-card__frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #03050514, transparent 55%, #03050591); opacity: .7; transition: opacity 1.2s ease; }
.project-card img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.012); transition: transform 2.2s cubic-bezier(.16, 1, .3, 1), filter 1.35s ease; will-change: transform; }
.project-card--alt img { object-position: 63% center; }
.project-card:hover img, .project-card:focus-visible img { transform: scale(1.13); filter: brightness(.76) contrast(1.08); }
.project-card:hover .project-card__frame::after, .project-card:focus-visible .project-card__frame::after { opacity: 1; }
.project-card__open { position: absolute; z-index: 2; right: 18px; bottom: 18px; display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #ffffffb0; border-radius: 50%; font: 500 20px/1 var(--mono); opacity: 0; transform: translate(-8px, 8px); transition: opacity .7s var(--ease), transform .8s var(--ease); }
.project-card:hover .project-card__open, .project-card:focus-visible .project-card__open { opacity: 1; transform: translate(0); }
.project-card__caption { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 15px 1px 0; font: 500 10px/1.25 var(--mono); text-transform: uppercase; }
.project-card__caption strong { display: inline-block; font-weight: 500; color: transparent; background: linear-gradient(100deg, #dce4e0 0%, #dce4e0 38%, #fff 50%, #819795 56%, #dce4e0 66%); background-size: 260% 100%; background-position: 100% 0; -webkit-background-clip: text; background-clip: text; }
.project-card:hover .project-card__caption strong, .project-card:focus-visible .project-card__caption strong { animation: caption-sweep 1.2s ease-in-out both; }
.project-card__caption > span { color: var(--muted); transition: color .6s; }
.project-card:hover .project-card__caption > span { color: #fff; }
@keyframes caption-sweep { from { background-position: 100% 0; } to { background-position: 0 0; } }
.project-card.is-entering { animation: card-in .85s var(--ease) both; }
.project-card.is-leaving { opacity: 0; transform: scale(.975); transition: opacity .3s, transform .3s; }
@keyframes card-in { from { opacity: 0; transform: translateY(20px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.motion-ready .project-card:not(.is-visible):not(.is-entering) { opacity: 0; transform: translateY(32px); }
.motion-ready .project-card.is-visible { transition: opacity 1s var(--ease), transform 1s var(--ease); }
.motion-ready .project-card.is-leaving { transition: opacity .3s ease, transform .3s ease; }

.site-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 110px; padding-block: 21px 28px; border-top: 1px solid var(--line); color: var(--muted); font: 500 10px/1.3 var(--mono); text-transform: uppercase; }
.site-footer a { text-decoration: none; transition: color .4s; }
.site-footer a:hover { color: #fff; }

.project-view { position: fixed; z-index: 50; inset: 0; overflow: hidden; color: #fff; background: #030607; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .58s ease, visibility 0s linear .58s; }
.project-view.is-visible { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .72s ease; }
.project-view.is-leaving { opacity: 0; transition: opacity .65s ease; }
.project-view__visual, .project-view__shade { position: absolute; inset: 0; }
.project-view__visual img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.045); }
.project-view.is-entering .project-view__visual img { animation: detail-image-in 1.5s var(--ease) both; }
@keyframes detail-image-in { from { opacity: .35; transform: scale(1.17); } to { opacity: 1; transform: scale(1.045); } }
.project-view__shade { background: linear-gradient(180deg, #030607ad 0%, transparent 22%, transparent 52%, #030607bc 100%); }
.project-view__top { position: absolute; z-index: 2; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 25px 29px; font: 500 10px/1 var(--mono); text-transform: uppercase; }
.project-view__top, .project-view__info { transition: opacity .28s ease, transform .32s var(--ease); }
.project-view.is-copy-leaving .project-view__top, .project-view.is-copy-leaving .project-view__info { opacity: 0; transform: translateY(16px); }
.project-view__back { display: inline-flex; align-items: center; gap: 14px; padding: 7px 0; border: 0; color: #fff; background: transparent; cursor: pointer; font: inherit; text-transform: inherit; }
.project-view__back span { font-size: 19px; transition: transform .5s var(--ease); }
.project-view__back:hover span { transform: translateX(-6px); }
.project-view__info { position: absolute; z-index: 2; left: 28px; right: 28px; bottom: 30px; }
.project-view__category { display: block; margin-bottom: 10px; font: 500 11px/1 var(--mono); text-transform: uppercase; }
.project-view__title { margin: 0; max-width: 90vw; font: 700 clamp(48px, 7vw, 108px)/.88 var(--sans); letter-spacing: -.085em; text-transform: uppercase; }
.project-view.is-entering .project-view__top, .project-view.is-entering .project-view__info { animation: detail-copy-in 1.05s .32s var(--ease) both; }
@keyframes detail-copy-in { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
.transition-layer { position: fixed; z-index: 90; inset: 0; overflow: hidden; pointer-events: none; }
.transition-layer img { display: block; position: fixed; max-width: none; object-fit: cover; }

@media (max-width: 900px) {
  .hero__row { flex-direction: column; align-items: flex-start; gap: 20px; }
  .filter-bar { justify-content: flex-start; width: 100%; }
}
@media (max-width: 700px) {
  html { scroll-padding-top: 70px; }
  .shell { width: min(100% - 36px, 1540px); }
  .site-header { height: 64px; padding-inline: 18px; }
  .site-name { gap: 7px; }
  .site-name__mark { width: 23px; height: 23px; }
  .site-name__word { font-size: 14px; }
  .site-name__ai { padding-left: 7px; font-size: 10px; }
  .site-header nav { gap: 15px; }
  .site-header nav a { font-size: 9px; }
  .hero { min-height: 210px; min-height: 27svh; padding-top: 85px; padding-bottom: 12px; }
  .hero__row { gap: 18px; }
  .hero h1 { font-size: clamp(49px, 13vw, 78px); }
  .projects { padding-top: 20px; }
  .filter-bar { flex-wrap: nowrap; overflow-x: auto; width: calc(100% + 36px); margin-inline: -18px; padding-inline: 18px; scrollbar-width: none; }
  .filter-bar::-webkit-scrollbar { display: none; }
  .filter-bar button { flex: none; }
  .project-grid { grid-template-columns: 1fr; gap: 34px; }
  .project-card__frame { aspect-ratio: 1.17; }
  .project-card__open { opacity: 1; transform: none; width: 36px; height: 36px; font-size: 17px; }
  .project-card__caption { padding-top: 12px; font-size: 9px; }
  .site-footer { margin-top: 78px; }
  .project-view__top { padding: 21px 18px; font-size: 9px; }
  .project-view__info { left: 18px; right: 18px; bottom: 24px; }
  .project-view__category { font-size: 10px; }
  .project-view__title { font-size: clamp(45px, 11vw, 74px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .motion-ready .project-card { opacity: 1 !important; transform: none !important; }
}
