:root {
  --bg: #0b0b0d;
  --bg-2: #121216;
  --surface: #16161b;
  --text: #f2f0eb;
  --muted: #9a978f;
  --dim: #5f5d58;
  --line: rgb(255 255 255 / .09);
  --accent: #d6ff3f;
  --accent-ink: #0b0b0d;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 20px;
  --gutter: 20px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}
@media (min-width: 768px) { :root { --gutter: 40px; } }
@media (min-width: 1280px) { :root { --gutter: 56px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
::selection { background: var(--accent); color: var(--accent-ink); }

.container { width: 100%; max-width: 1360px; margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

/* Film grain for depth */
.grain {
  position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.eyebrow {
  font-size: .78rem; font-weight: 500; text-transform: uppercase; letter-spacing: .16em;
  color: var(--muted); margin-bottom: 18px; display: flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: 1rem; text-decoration: none; border: 1px solid transparent;
  transition: transform .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
  cursor: pointer; white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -8px rgb(214 255 63 / .45); }
.btn--ghost { background: transparent; color: var(--text); border-color: rgb(255 255 255 / .2); }
.btn--ghost:hover { background: rgb(255 255 255 / .06); box-shadow: none; }
.btn--small { min-height: 42px; padding: 0 20px; font-size: .92rem; }

/* Nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background .4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgb(11 11 13 / .72);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom-color: var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.05rem; text-decoration: none; letter-spacing: -.01em; }
.brand__mark { width: 34px; height: 34px; filter: drop-shadow(0 0 10px rgb(214 255 63 / .35)); transition: transform .5s var(--ease); }
.brand:hover .brand__mark { transform: rotate(-8deg) scale(1.06); }
.brand em { color: var(--accent); font-size: 1.18em; margin-left: 1px; }
.nav__menu { display: flex; align-items: center; gap: 34px; }
.nav__menu a:not(.btn) { text-decoration: none; color: var(--muted); font-weight: 500; font-size: .95rem; transition: color .2s; }
.nav__menu a:not(.btn):hover { color: var(--text); }
.nav__toggle { display: none; }

@media (max-width: 767px) {
  .nav__toggle {
    display: grid; place-content: center; gap: 7px; position: relative; z-index: 2;
    width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 50%; background: rgb(255 255 255 / .04); cursor: pointer;
  }
  .nav__toggle span { display: block; width: 18px; height: 1.5px; background: var(--text); transition: transform .3s var(--ease); }
  .nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(4.25px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.25px) rotate(-45deg); }
  .nav__menu {
    position: fixed; inset: 0; z-index: 1;
    flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px;
    background: var(--bg); padding: 96px var(--gutter) 40px;
    opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s;
  }
  .nav__menu.is-open { opacity: 1; visibility: visible; }
  .nav__menu a:not(.btn) { font-family: var(--serif); font-size: 3rem; line-height: 1.2; color: var(--text); }
  .nav__menu .btn { margin-top: 28px; min-height: 54px; padding: 0 28px; font-size: 1rem; }
  body.menu-open { overflow: hidden; }
  /* backdrop-filter would trap the fixed menu inside the header */
  body.menu-open .nav { backdrop-filter: none; -webkit-backdrop-filter: none; background: transparent; }
  .brand { position: relative; z-index: 2; }
}

/* Aurora glow */
.aurora { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; animation: drift 18s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { width: 52vw; height: 52vw; max-width: 720px; max-height: 720px; right: -8vw; top: -14vw; background: radial-gradient(circle, #5b3cff, transparent 65%); }
.aurora i:nth-child(2) { width: 40vw; height: 40vw; max-width: 560px; max-height: 560px; right: 18vw; top: 10vw; background: radial-gradient(circle, #d6ff3f, transparent 65%); opacity: .22; animation-duration: 22s; animation-delay: -6s; }
.aurora i:nth-child(3) { width: 46vw; height: 46vw; max-width: 640px; max-height: 640px; left: -16vw; bottom: -24vw; background: radial-gradient(circle, #ff5a36, transparent 65%); opacity: .28; animation-duration: 26s; }
@keyframes drift { to { transform: translate3d(-6%, 8%, 0) scale(1.12); } }

/* Hero */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; padding: 130px 0 64px; overflow: hidden; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }
.hero__inner { position: relative; z-index: 1; }
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px 8px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: rgb(255 255 255 / .04); backdrop-filter: blur(8px);
  font-size: .88rem; color: var(--muted); margin-bottom: 32px;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #3ee08a; box-shadow: 0 0 0 0 rgb(62 224 138 / .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgb(62 224 138 / 0); } 100% { box-shadow: 0 0 0 0 rgb(62 224 138 / 0); } }

.hero__title {
  font-size: clamp(3.2rem, 11.5vw, 10.5rem);
  line-height: .92; letter-spacing: -.045em; font-weight: 500;
}
.hero__title em { color: var(--accent); letter-spacing: -.03em; padding-right: .04em; }
.reveal { display: block; animation: reveal 1s var(--ease) both; }
.reveal:nth-child(2) { animation-delay: .1s; }
.reveal:nth-child(3) { animation-delay: .2s; }
@keyframes reveal { from { opacity: 0; transform: translateY(40%); filter: blur(8px); } }

.hero__foot {
  display: grid; gap: 28px; margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line);
  animation: reveal 1s .35s var(--ease) both;
}
.hero__intro { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 900px) {
  .hero__foot { grid-template-columns: 1fr auto; align-items: end; }
}
@media (max-width: 479px) { .hero__actions .btn { flex: 1 1 100%; } }

/* Work */
.work { padding: 120px 0 80px; }
h2 { font-size: clamp(2.6rem, 6.5vw, 5.5rem); line-height: .95; letter-spacing: -.04em; font-weight: 500; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 36px; }
.search {
  display: flex; align-items: center; gap: 10px;
  background: rgb(255 255 255 / .04); border: 1px solid var(--line); border-radius: 999px;
  padding: 0 18px; height: 50px; width: 100%; max-width: 320px; transition: border-color .2s;
}
.search:focus-within { border-color: rgb(255 255 255 / .3); }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; flex: none; }
.search input { border: 0; background: transparent; color: var(--text); font: inherit; font-size: .95rem; width: 100%; outline: none; }
.search input::placeholder { color: var(--dim); }
@media (max-width: 599px) { .search { max-width: none; } }

.filters {
  display: flex; gap: 8px; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)) 48px; padding: 0 var(--gutter) 4px;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 40px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  font: inherit; font-size: .9rem; font-weight: 500; cursor: pointer; transition: all .25s var(--ease);
}
.chip:hover { color: var(--text); border-color: rgb(255 255 255 / .25); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 56px 32px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 72px 32px; } }
@media (min-width: 1100px) { .grid { gap: 88px 48px; } }

.card { display: flex; flex-direction: column; gap: 24px; animation: rise .8s var(--ease) both; }
/* Offset every second card on wide screens for an editorial rhythm */
@media (min-width: 720px) { .grid > .card:not(.card--featured):nth-child(even of :not(.card--featured)) { margin-top: 96px; } }

.card__media {
  position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: pointer;
  border-radius: var(--radius); overflow: hidden; isolation: isolate;
  background: color-mix(in srgb, var(--tint, #5b3cff) 80%, #0b0b0d);
  aspect-ratio: 4 / 3.1;
}
.card__media::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 90% at 100% 0%, rgb(255 255 255 / .22), transparent 55%),
    radial-gradient(90% 80% at 0% 100%, rgb(0 0 0 / .45), transparent 60%);
}
/* Browser frame */
.frame {
  position: absolute; left: 9%; right: 9%; top: 12%; bottom: -6%;
  border-radius: 12px 12px 0 0; overflow: hidden; background: #0f0f12;
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / .55), 0 0 0 1px rgb(255 255 255 / .12);
  transition: transform .8s var(--ease);
}
.frame__bar {
  height: 28px; display: flex; align-items: center; gap: 6px; padding: 0 12px;
  background: #1c1c21; border-bottom: 1px solid rgb(255 255 255 / .06);
}
.frame__bar i { width: 9px; height: 9px; border-radius: 50%; background: rgb(255 255 255 / .18); }
.frame__bar b {
  margin-left: 10px; flex: 1; max-width: 60%; height: 16px; border-radius: 6px; background: rgb(255 255 255 / .06);
  font-size: 10px; font-weight: 500; line-height: 16px; color: rgb(255 255 255 / .45); text-align: left; padding: 0 8px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.frame img { width: 100%; height: calc(100% - 28px); object-fit: cover; object-position: top; }
.card__media:hover .frame { transform: translateY(-4%) scale(1.02); }

.card__view {
  position: absolute; z-index: 2; left: 50%; top: 50%;
  width: 104px; height: 104px; margin: -52px 0 0 -52px; border-radius: 50%;
  display: grid; place-items: center; text-align: center;
  background: var(--accent); color: var(--accent-ink); font-size: .85rem; font-weight: 600; line-height: 1.2;
  transform: scale(.4); opacity: 0; transition: transform .5s var(--ease), opacity .3s;
}
.card__media:hover .card__view, .card__media:focus-visible .card__view { transform: scale(1); opacity: 1; }
@media (hover: none) { .card__view { display: none; } }
.card__count {
  position: absolute; z-index: 2; left: 16px; top: 16px;
  background: rgb(0 0 0 / .45); backdrop-filter: blur(8px); color: #fff; font-size: .75rem; font-weight: 500;
  padding: 5px 11px; border-radius: 999px; border: 1px solid rgb(255 255 255 / .12);
}

.card__body { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; align-items: baseline; }
.card__index { font-family: var(--serif); font-size: 1.4rem; color: var(--dim); grid-row: span 3; }
@media (max-width: 479px) { .card__body { grid-template-columns: 1fr; } .card__index { display: none; } }
.card__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.card__title { font-size: clamp(1.6rem, 2.6vw, 2.25rem); letter-spacing: -.03em; font-weight: 500; line-height: 1.1; }
.card__title a { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .5s var(--ease); }
.card__title a:hover { background-size: 100% 1px; }
.card__year { color: var(--dim); font-size: .9rem; font-variant-numeric: tabular-nums; }
.card__desc { color: var(--muted); max-width: 52ch; }
.card__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 10px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { border: 1px solid var(--line); color: var(--muted); padding: 3px 11px; border-radius: 999px; font-size: .78rem; font-weight: 500; }
.visit {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  color: var(--text); font-weight: 500; font-size: .95rem; text-decoration: none;
}
.visit__arrow {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgb(255 255 255 / .2); transition: background .3s var(--ease), color .3s, transform .3s var(--ease);
}
.visit:hover .visit__arrow { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); transform: rotate(45deg); }

/* Featured: full-width hero card */
@media (min-width: 720px) {
  .card--featured { grid-column: 1 / -1; }
  .card--featured .card__media { aspect-ratio: 16 / 8.2; }
  .card--featured .frame { left: 14%; right: 14%; top: 13%; }
  .card--featured .card__title { font-size: clamp(2.2rem, 4.2vw, 3.6rem); }
}
@media (min-width: 1100px) {
  .card--featured .card__body { grid-template-columns: auto 1fr 1fr; column-gap: 40px; }
  .card--featured .card__index { grid-row: span 2; }
  .card--featured .card__head { grid-row: span 2; align-self: start; }
  .card--featured .card__desc { font-size: 1.1rem; }
}
.feature-label { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: .8rem; font-weight: 500; text-transform: uppercase; letter-spacing: .14em; }

.empty { text-align: center; color: var(--muted); padding: 64px 0; font-family: var(--serif); font-size: 1.6rem; }

/* About */
.about { padding: 120px 0; }
.statement { font-size: clamp(2rem, 4.6vw, 4rem); line-height: 1.08; letter-spacing: -.035em; max-width: 22ch; }
.statement em { color: var(--accent); }
.steps { list-style: none; margin: 80px 0 0; padding: 0; display: grid; gap: 0; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { padding: 32px 28px 36px 0; border-bottom: 1px solid var(--line); display: grid; gap: 10px; align-content: start; }
@media (min-width: 720px) { .steps li + li { padding-left: 28px; border-left: 1px solid var(--line); } .steps li:nth-child(3) { border-left: 0; padding-left: 0; } }
@media (min-width: 1100px) { .steps li:nth-child(3) { border-left: 1px solid var(--line); padding-left: 28px; } }
.steps__n { font-family: var(--serif); font-size: 2.6rem; color: var(--accent); line-height: 1; margin-bottom: 18px; }
.steps strong { font-size: 1.2rem; font-weight: 600; letter-spacing: -.01em; }
.steps p { color: var(--muted); font-size: .98rem; }

/* CTA */
.cta { position: relative; overflow: hidden; padding: 140px 0 120px; border-top: 1px solid var(--line); }
.aurora--cta i:nth-child(1) { left: 20%; right: auto; top: 20%; opacity: .4; }
.aurora--cta i:nth-child(2) { left: 50%; right: auto; top: 40%; opacity: .18; }
.cta__inner { position: relative; z-index: 1; }
.cta__title { font-size: clamp(3.2rem, 11vw, 10rem); line-height: .9; letter-spacing: -.05em; }
.cta__title em { color: var(--accent); }
.cta__email {
  display: inline-flex; align-items: center; gap: 14px; margin-top: 48px;
  font-size: clamp(1.25rem, 3vw, 2rem); font-weight: 500; letter-spacing: -.02em; text-decoration: none;
  padding-bottom: 6px; border-bottom: 1px solid rgb(255 255 255 / .3); transition: border-color .3s, color .3s;
  word-break: break-all;
}
.cta__email:hover { color: var(--accent); border-color: var(--accent); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 32px 0; color: var(--muted); font-size: .9rem; }
.footer__inner { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
.socials { list-style: none; margin: 0; padding: 0; display: flex; gap: 24px; }
.socials a, .totop { text-decoration: none; transition: color .2s; }
.socials a:hover, .totop:hover { color: var(--text); }

/* Modal */
.modal {
  width: min(1080px, calc(100% - 2 * var(--gutter)));
  max-height: calc(100dvh - 40px);
  padding: 0; border: 1px solid var(--line); border-radius: 24px; overflow: auto;
  background: var(--bg-2); color: var(--text); box-shadow: 0 40px 120px rgb(0 0 0 / .6);
}
@media (max-width: 599px) { .modal { width: calc(100% - 24px); } }
.modal::backdrop { background: rgb(5 5 7 / .75); backdrop-filter: blur(10px); }
.modal[open] { animation: pop .45s var(--ease); }
.modal__close {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .15);
  background: rgb(0 0 0 / .5); backdrop-filter: blur(8px); color: #fff; cursor: pointer; display: grid; place-items: center;
  transition: transform .3s var(--ease);
}
.modal__close:hover { transform: rotate(90deg); }
.modal__close svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.gallery { position: relative; aspect-ratio: 16 / 10; background: #000; overflow: hidden; }
.gallery__track { display: flex; height: 100%; transition: transform .6s var(--ease); touch-action: pan-y; }
.gallery__track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; object-position: top; user-select: none; -webkit-user-drag: none; }
.gallery__btn {
  position: absolute; top: 50%; translate: 0 -50%;
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .2);
  background: rgb(0 0 0 / .45); backdrop-filter: blur(8px); color: #fff; font-size: 1.1rem; cursor: pointer;
  transition: background .2s;
}
.gallery__btn:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.gallery__btn--prev { left: 16px; }
.gallery__btn--next { right: 16px; }
.gallery__btn[hidden] { display: none; }
.gallery__dots { position: absolute; bottom: 16px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.gallery__dots button { width: 8px; height: 8px; padding: 0; border-radius: 999px; border: 0; background: rgb(255 255 255 / .45); cursor: pointer; transition: width .3s var(--ease), background .3s; }
.gallery__dots button[aria-current="true"] { width: 28px; background: var(--accent); }
.modal__body { padding: 28px 24px 32px; display: grid; gap: 14px; justify-items: start; }
.modal__body h3 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.035em; font-weight: 500; line-height: 1; }
.modal__body p { color: var(--muted); max-width: 62ch; font-size: 1.05rem; }
.modal__body .btn { margin-top: 10px; }
.modal__meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .85rem; color: var(--dim); }
@media (min-width: 768px) { .modal__body { padding: 40px 48px 48px; } }

@keyframes rise { from { opacity: 0; transform: translateY(40px); } }
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(.98); } }

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