@font-face {
  font-family: Portfolio Helvetica;
  src: url('/assets/helvetica-roman.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: dark;
  font: 100% / 1.4 'Portfolio Helvetica', Helvetica, Arial, sans-serif;
  color: #fff;
  background: #000;
  --header-inline: clamp(15px, 2.28vw, 44px);
  --header-top: 12px;
}
* { box-sizing: border-box; }
body, h1, h2, p, figure { margin: 0; }
h1, h2 { font-weight: 400; }
a { color: inherit; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button[disabled] { cursor: default; }
img, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #fff; outline-offset: 5px; }
.sr-only, .form-trap {
  position: absolute;
  width: 1px; height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}
.skip {
  position: fixed; z-index: 20; top: .5rem; left: .5rem;
  transform: translateY(-150%);
  padding: .75rem; background: #fff; color: #000;
}
.skip:focus { transform: none; }
.site-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  position: fixed;
  z-index: 5;
  inset: 0 0 auto;
  padding: var(--header-top) var(--header-inline);
  background: linear-gradient(#0008, transparent);
  pointer-events: none;
}
.site-header a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  white-space: nowrap;
  text-decoration: none;
  pointer-events: auto;
}
.site-header a:hover { text-decoration: underline; text-underline-offset: .25em; }
.site-name { font-size: clamp(1.1rem, 1.88vw, 1.8rem); }
.site-header nav { display: flex; gap: .9rem; margin-left: auto; }
.site-header nav a { font-size: 1rem; }
.site-credit {
  position: fixed; z-index: 3;
  left: 1rem; bottom: max(.85rem, env(safe-area-inset-bottom));
  font-size: 1.125rem; pointer-events: none;
  text-shadow: 0 1px 5px #000;
}
.home .site-credit { left: auto; right: 1rem; }
.home-hero { position: relative; height: 100vh; height: 100svh; min-height: 320px; }
.hero-images, .hero-frame, .hero-images::after { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-images { isolation: isolate; overflow: hidden; }
.hero-frame { object-fit: cover; object-position: center; }
.frame-0, .frame-1 { opacity: 0; }
.hero-images::after { content: ''; background: #0008; pointer-events: none; }
.hero-title {
  position: absolute; inset: 50% 0 auto 0;
  transform: translateY(-50%);
  font-size: clamp(2rem, 4.2vw, 6rem);
  line-height: 1;
  letter-spacing: -.03em;
}
.hero-title span { position: absolute; top: 50%; transform: translateY(-50%); }
.hero-title span:nth-child(1) { left: 3.2%; }
.hero-title span:nth-child(2) { left: 50.45%; }
.hero-title span:nth-child(3) { left: 66.2%; }
@media (prefers-reduced-motion: no-preference) {
  .hero-intro .frame-0 { z-index: 1; animation: hero-first 900ms both; }
  .hero-intro .frame-1 { z-index: 2; animation: hero-second 1250ms both; }
  .hero-images::after { z-index: 3; }
  @keyframes hero-first { 0%, 46% { opacity: 1; } 85%, 100% { opacity: 0; } }
  @keyframes hero-second { 0%, 24% { opacity: 0; } 44%, 62% { opacity: 1; } 100% { opacity: 0; } }
}
.work-track {
  display: flex;
  height: 100vh;
  height: 100svh;
  min-height: 320px;
  overflow: auto hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.work-track::-webkit-scrollbar { display: none; }
.work-track:focus-visible { outline-offset: -5px; }
.work-card {
  display: block; flex: 0 0 90vw; position: relative;
  overflow: hidden; text-decoration: none; scroll-snap-align: start;
}
.work-card:focus-visible { outline-offset: -5px; z-index: 1; }
.work-card img { width: 100%; height: 100%; object-fit: cover; }
.work-card::after {
  content: ''; position: absolute; inset: 0;
  background: #0008;
  transition: opacity .2s;
}
.work-card:hover::after, .work-card:focus-visible::after { opacity: .72; }
.work-card-label {
  position: absolute; z-index: 1; inset: 50% 0 auto;
  transform: translateY(-50%); padding: 0 1rem;
  display: grid; grid-template-columns: 66.67% 16.67% 1fr;
  align-items: center; font-size: clamp(1.2rem, 1.88vw, 2rem); line-height: 1.1;
}
.work-card h2 { font-size: inherit; }
.work-controls {
  display: flex; gap: .4rem;
  position: fixed; z-index: 4; bottom: max(.55rem, env(safe-area-inset-bottom)); right: 1rem;
}
.work-controls button, .lightbox button {
  width: 44px; height: 44px; border: 1px solid #fff7; border-radius: 50%;
  color: #fff; background: #0009; font-size: 2rem; line-height: 1;
}
.work-controls button:disabled { opacity: .4; }
.work-controls button:not(:disabled):hover, .lightbox button:hover { background: #333; }
.current-project { font-size: .75rem; text-shadow: 0 1px 4px #000; }
.gallery { background: #000; padding-inline: 1px; }
.gallery-image { display: block; cursor: zoom-in; }
.gallery-image:focus-visible { outline-offset: -5px; }
.gallery img, .gallery video { width: 100%; height: auto; }
.gallery video { aspect-ratio: attr(width type(<number>)) / attr(height type(<number>)); }
.project-nav {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 2rem 1rem 4rem;
}
.project-nav a { text-underline-offset: .25em; }
.lightbox {
  position: fixed; inset: 0; margin: 0;
  width: 100%; height: 100%; max-width: none; max-height: none;
  border: 0; color: #fff; background: #080808f7;
  padding: 3.8rem clamp(1rem, 5vw, 4.5rem);
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: #000; }
.lightbox img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.lightbox button { position: absolute; z-index: 1; }
.lightbox-close { right: .8rem; top: .8rem; }
.lightbox-prev { left: .8rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: .8rem; top: 50%; transform: translateY(-50%); }
body:has(.lightbox[open]) { overflow: hidden; }
.about { --header-inline: clamp(15px, 1.2vw, 32px); }
.about .site-header { background: #000e; padding-right: clamp(16px, 2.7vw, 48px); }
.about-main { padding-top: clamp(92px, 10.5vw, 180px); }
.about-inner { width: 88.6%; margin-inline: auto; }
.about-intro { position: relative; isolation: isolate; min-height: clamp(280px, 24.5vw, 400px); padding: 1.2rem 0 3rem; }
.about-backdrop { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.about-intro::before { content: ''; position: absolute; z-index: -1; inset: 0; background: #0007; }
.about-inner h1, .about-inner h2 { font-size: clamp(2rem, 3.33vw, 4rem); line-height: 1.1; }
.about-inner p { margin-top: 1.65rem; max-width: 70rem; }
.clients { padding: .65rem 0 3.7rem; }
.clients p { margin-top: 2rem; font-size: 1.125rem; line-height: 1.3; max-width: 67rem; }
.contact { width: 90.7%; margin-inline: auto; padding: 5rem 0 5.5rem; scroll-margin-top: 70px; }
.contact h2 { font-size: clamp(2rem, 2.8vw, 3.5rem); line-height: 1.15; margin-bottom: .6rem; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.contact-form label { display: grid; gap: .4rem; font-size: .875rem; }
.contact-form input, .contact-form textarea {
  width: 100%; font-size: 1rem; color: #fff; background: #0b0b0b; border: 1px solid #151515;
  padding: .6rem .7rem; border-radius: 0; min-height: 44px;
}
.contact-form textarea { resize: vertical; }
.contact-form :is(input, textarea)::placeholder { color: #888; }
.message-field, .form-status, .contact-fallback { grid-column: 1 / -1; }
.contact-form button {
  background: #000; color: #fff; border: 1px solid #fff;
  border-radius: 999px; min-height: 44px; margin-top: .65rem;
}
.contact-form button:hover { background: #fff; color: #000; }
.contact-form button:disabled { opacity: .7; }
.form-status, .contact-fallback { margin-top: .5rem; }
.not-found { display: grid; place-content: center; gap: 1rem; min-height: 100vh; padding: 1rem; }

@media (max-width: 750px) {
  .site-header { padding: 10px 1rem; gap: .35rem; }
  .site-header nav { gap: clamp(.35rem, 2.2vw, .75rem); }
  .site-header a { min-height: 44px; }
  .site-header nav a { font-size: clamp(.7rem, 3.5vw, 1rem); }
  .site-name { font-size: 1rem; }
  .hero-title { font-size: clamp(1.65rem, 8vw, 3.35rem); }
  .hero-title span:nth-child(1) { left: 10.5%; }
  .hero-title span:nth-child(2) { left: 45%; }
  .hero-title span:nth-child(3) { left: 63%; }
  .work-card { flex-basis: 90vw; }
  .work-card-label {
    grid-template-columns: 1fr;
    padding: 0 1rem; font-size: clamp(1.15rem, 6vw, 1.5rem);
  }
  .work-card-label span { display: none; }
  .work-controls { left: 1rem; right: auto; }
  .work .site-credit, .project .site-credit { left: auto; right: 1rem; }
  .current-project { position: fixed; left: 1rem; bottom: 1rem; }
  .gallery-image:first-child img { min-height: 100svh; object-fit: cover; object-position: left center; }
  .project-nav { font-size: .875rem; }
  .about-inner, .contact { width: calc(100% - 2rem); }
  .about-main { padding-top: 110px; }
  .about-inner { width: calc(100% - 3rem); }
  .about-intro { padding: 3.7rem 0 3rem; }
  .about-inner h1, .about-inner h2 { font-size: 1.3rem; }
  .about-inner p, .clients p { margin-top: 2rem; font-size: .875rem; line-height: 1.35; }
  .clients { width: calc(100% - 4rem); padding-top: 4.35rem; padding-bottom: 2rem; }
  .contact { padding-top: 2rem; }
  .contact-form { grid-template-columns: 1fr; gap: .75rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; animation-duration: 0s !important; }
}
