@font-face {
  font-family: "Aileron";
  src: url("/fonts/Aileron-Regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --text-muted: #9e9e9e;
  --card: #eaeaea;
  --card-radius: 24px;
  --peek-opacity: 0.43;

  --col: min(887px, 100vw - 32px); /* content column / slide width */
  --gap: 20px; /* space between slides */
  --pad: calc((100vw - var(--col)) / 2);
  --header-h: 80px;
  --first-row-top: 160px; /* logo row y in the 1440 frame */
  --ease: cubic-bezier(0.22, 0.8, 0.2, 1);
  --dur: 0.7s;
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text-muted);
  font-family: "Aileron", system-ui, sans-serif;
  font-size: 14px;
  letter-spacing: -0.01em; /* -0.14px at 14px */
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }

/* header */
.top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  height: var(--header-h);
}
.top-inner {
  width: var(--col);
  margin: 0 auto;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.who p { line-height: 17px; }
#site-nav { display: flex; gap: 17.5px; }
#site-nav a { line-height: 17px; transition: color 0.2s; }
#site-nav a:hover, #site-nav a:focus-visible { color: #1a1a1a; }

/* projects */
#projects {
  padding-top: 0;
  padding-bottom: max(0px, calc(100vh - 852.83px));
}

.project {
  margin-bottom: 54.64px;
}

.project-head {
  width: var(--col);
  margin: 0 auto 16.66px;
  height: 23.13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.project-head img { height: 23.13px; width: auto; display: block; }
.project-head .name { font-size: 16px; color: #1a1a1a; letter-spacing: -0.16px; }
.project-head .tagline { font-size: 16px; letter-spacing: -0.16px; white-space: nowrap; }

/* carousel: slides are positioned by their offset from the active one, so the strip loops */
.stage { overflow: hidden; }
.track {
  position: relative;
  height: calc(var(--col) * 598.4 / 887);
  touch-action: pan-y;
}

.slide {
  all: unset;
  box-sizing: border-box;
  position: absolute;
  top: 0;
  left: var(--pad);
  width: var(--col);
  aspect-ratio: 887 / 598.4;
  cursor: pointer;
  opacity: var(--peek-opacity);
  transform: translateX(calc(var(--o, 0) * (var(--col) + var(--gap))));
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
  will-change: transform;
}
.slide[aria-current="true"] { opacity: 1; cursor: e-resize; }
.slide[data-far="true"] { opacity: 0; pointer-events: none; }
.slide:focus-visible { outline: 2px solid #1a1a1a; outline-offset: 4px; }
.slide img {
  /* shown as uploaded: no background, radius or inset; only scaled down if larger than the slot */
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: scale-down;
  object-position: center;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.empty { width: var(--col); margin: 0 auto; }

@media (prefers-reduced-motion: reduce) {
  .track, .slide { transition: none; }
}

@media (max-width: 600px) {
  :root { --card-radius: 14px; --gap: 12px; }
  .dock { gap: 0; height: 64px; overflow-x: auto; scrollbar-width: none; }
  .dock::-webkit-scrollbar { display: none; }
  .dock-item { flex: 0 0 auto; }
  .dock .dock-clone { display: grid; }
  .dock { justify-content: flex-start; }
  .dock { transition: opacity .4s var(--ease), transform .4s var(--ease); }
  .dock.has-hero:not(.on-hero) { opacity: 0; pointer-events: none; transform: translateY(12px); }
  .dock-item { padding: 0 8px; }
  .dock-item img { height: 16px; }
  .project-head .tagline { font-size: 13px; white-space: normal; text-align: right; }
}

/* reveal: content fades in out of a blur, staggered; replays each time a project comes into view */
.reveal {
  opacity: 0;
  filter: blur(18px);
  transform: translateY(32px) scale(0.985);
  transition: opacity 0.25s ease, filter 0.25s ease, transform 0.25s ease;
}
.reveal.in {
  opacity: 1;
  filter: none; /* none (not blur(0)) so it doesn't become a backdrop root for the dock */
  transform: none;
  transition:
    opacity 0.9s var(--ease) var(--d, 0ms),
    filter 1.1s var(--ease) var(--d, 0ms),
    transform 1.2s var(--ease) var(--d, 0ms);
}
.stage.reveal { transform: translateY(48px) scale(0.97); transform-origin: 50% 0; }
.stage.reveal.in { transform: none; }

/* image settling into a card (first reveal + every time it becomes the active slide) */
@keyframes settle {
  from { opacity: 0; filter: blur(14px); transform: scale(1.045); }
  to   { opacity: 1; filter: blur(0);    transform: none; }
}
.slide img.settle { animation: settle 0.9s var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.in { opacity: 1; filter: none; transform: none; transition: none; }
  .slide img.settle { animation: none; }
}

/* dock: fixed client logos, click to jump to that project */
.dock {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 10;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: safe center;
  gap: 8px;
  --d: 300ms;
}
.dock.hidden { display: none; }
.dock-item {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  height: 44px;
  padding: 0 16px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--text-muted);
  opacity: 0.4;
  filter: grayscale(1);
  transition: opacity 0.3s var(--ease), background 0.3s var(--ease);
}
.dock-clone { display: none; }
.dock-item img { height: 20px; width: auto; display: block; }
.dock-item:hover, .dock-item:focus-visible { opacity: 0.8; background: #f4f4f4; }
.dock-item[aria-current="true"] { opacity: 1; }
.dock-item:focus-visible { outline: 2px solid #1a1a1a; outline-offset: -2px; }

/* progressive blur: stacked backdrop-blur layers, each masked to a band, plus a soft white fade */
.pblur {
  position: absolute;
  left: 0; right: 0;
  height: 140px;
  pointer-events: none;
  z-index: -1;
}
.pblur.top { top: 0; --dir: to bottom; }
.pblur.bottom { bottom: 0; --dir: to top; }
.pblur::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(var(--dir), rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.6) 45%, rgba(255,255,255,0) 100%);
}
.pblur i { position: absolute; inset: 0; }
.pblur i:nth-child(1) {
  -webkit-backdrop-filter: blur(0.5px); backdrop-filter: blur(0.5px);
  -webkit-mask-image: linear-gradient(var(--inv), #000 0%, #000 28.6%, transparent 42.9%); mask-image: linear-gradient(var(--inv), #000 0%, #000 28.6%, transparent 42.9%);
}
.pblur i:nth-child(2) {
  -webkit-backdrop-filter: blur(1px); backdrop-filter: blur(1px);
  -webkit-mask-image: linear-gradient(var(--inv), transparent 14.3%, #000 28.6%, #000 42.9%, transparent 57.1%); mask-image: linear-gradient(var(--inv), transparent 14.3%, #000 28.6%, #000 42.9%, transparent 57.1%);
}
.pblur i:nth-child(3) {
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  -webkit-mask-image: linear-gradient(var(--inv), transparent 28.6%, #000 42.9%, #000 57.1%, transparent 71.4%); mask-image: linear-gradient(var(--inv), transparent 28.6%, #000 42.9%, #000 57.1%, transparent 71.4%);
}
.pblur i:nth-child(4) {
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  -webkit-mask-image: linear-gradient(var(--inv), transparent 42.9%, #000 57.1%, #000 71.4%, transparent 85.7%); mask-image: linear-gradient(var(--inv), transparent 42.9%, #000 57.1%, #000 71.4%, transparent 85.7%);
}
.pblur i:nth-child(5) {
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  -webkit-mask-image: linear-gradient(var(--inv), transparent 57.1%, #000 71.4%, #000 85.7%, transparent 100.0%); mask-image: linear-gradient(var(--inv), transparent 57.1%, #000 71.4%, #000 85.7%, transparent 100.0%);
}
.pblur i:nth-child(6) {
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  -webkit-mask-image: linear-gradient(var(--inv), transparent 71.4%, #000 85.7%, #000 100%); mask-image: linear-gradient(var(--inv), transparent 71.4%, #000 85.7%, #000 100%);
}
.pblur.top { --inv: to top; }    /* mask 0% = inner edge (clear), 100% = screen edge (blurriest) */
.pblur.bottom { --inv: to bottom; }

/* about page */
.who { display: block; }
#site-nav a[aria-current="page"] { color: #1a1a1a; }

.about {
  width: var(--col);
  margin: 0 auto;
  padding: var(--first-row-top) 0 120px;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 64px;
  align-items: start;
}
/* desktop: the whole block sits in the middle of the viewport */
@media (min-width: 721px) {
  .about {
    box-sizing: border-box;
    min-height: 100vh;
    padding: var(--header-h) 0;
    align-items: center;
    align-content: center;
  }
  .about-text { padding-top: 0; }
}
.about-photo {
  aspect-ratio: 4 / 5;
  border-radius: var(--card-radius);
  background: var(--card);
  overflow: hidden;
  display: grid;
  place-items: center;
  font-size: 56px;
  letter-spacing: -0.04em;
  color: var(--text-muted);
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.about-text { padding-top: 4px; max-width: 480px; }
.about-lead { font-size: 28px; line-height: 1.25; letter-spacing: -0.03em; color: #1a1a1a; margin-bottom: 32px; }
.about-body { font-size: 16px; line-height: 1.55; letter-spacing: -0.01em; color: #6e6e6e; margin-bottom: 16px; }
.about-body a, .about-lead a { color: #1a1a1a; border-bottom: 1px solid #cfcfcf; transition: border-color 0.2s; }
.about-body a:hover, .about-body a:focus-visible, .about-lead a:hover, .about-lead a:focus-visible { border-color: #1a1a1a; }
.about-email { display: inline-block; margin-top: 16px; font-size: 16px; color: #1a1a1a; border-bottom: 1px solid #cfcfcf; transition: border-color 0.2s; }
.about-email:hover, .about-email:focus-visible { border-color: #1a1a1a; }

@media (max-width: 720px) {
  .about { grid-template-columns: 1fr; gap: 32px; padding-top: 120px; }
  .about-photo { width: 100%; max-width: 400px; margin-left: auto; justify-self: end; }
  .about-lead { font-size: 24px; }
}

/* locked project (NDA / coming soon): previews are blurred and carry a lock badge */
.locked .slide { overflow: hidden; border-radius: var(--card-radius); }
.locked .slide img { object-fit: cover; filter: blur(22px); transform: scale(1.12); }
.lock {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 18px;
  border-radius: 999px;
  background: #fff;
  color: #1a1a1a;
  font-size: 14px;
  white-space: nowrap;
  box-shadow: 0 0 0 1px #eaeaea;
}
.lock svg { flex: none; }
.locked .slide img.settle { animation: none; }

/* hero */
.hero {
  min-height: 100vh;
  width: var(--col);
  margin: 0 auto;
  padding: var(--header-h) 0 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}
.hero-text { flex: 0 0 auto; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.hero-title {
  font-weight: 400;
  font-size: clamp(30px, 3.6vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: #1a1a1a;
}
.hero-line { display: block; white-space: nowrap; }
.hero-muted { color: var(--text-muted); }
.hero-rotor { position: relative; }
.hero-sizer { visibility: hidden; display: block; white-space: nowrap; }
.hero-word { position: absolute; left: 0; top: 0; white-space: nowrap; opacity: 0; filter: blur(8px); transform: translateY(0.25em); transition: opacity .6s ease, filter .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.hero-word.on { opacity: 1; filter: blur(0); transform: none; }
.hero-word:first-child:last-of-type { position: static; }
.hero-sub { font-size: 16px; line-height: 1.45; letter-spacing: -0.01em; color: #6e6e6e; max-width: 420px; }
/* portrait shown as uploaded: no card, radius or background */
.hero-photo { flex: 0 0 auto; width: min(800px, 58%); min-width: 0; flex: 0 1 auto; }
.hero-photo img { width: 100%; height: auto; max-height: calc(100vh - var(--header-h) - 40px); mix-blend-mode: multiply; -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 100%); mask-image: linear-gradient(to bottom, #000 62%, transparent 100%); object-fit: contain; object-position: right center; display: block; user-select: none; -webkit-user-drag: none; }
@media (max-width: 700px) {
  .hero { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 12px; padding: calc(var(--header-h) + 28px) 0 88px; }
  .hero-text { gap: 14px; }
  .hero-title { font-size: clamp(38px, 11vw, 48px); }
  .hero-sub { font-size: 15px; }
  .hero-photo { width: 100%; max-width: 420px; align-self: center; }
  .hero-photo img { max-height: 56vh; object-position: center top; }
}

/* closing call-to-action */
.cta {
  box-sizing: border-box;
  min-height: 100vh;
  width: var(--col);
  margin: 0 auto;
  padding: 120px 0 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
}
.cta-title { font-weight: 400; font-size: clamp(34px, 4.6vw, 64px); line-height: 1.04; letter-spacing: -0.045em; color: #1a1a1a; max-width: 18ch; }
.cta-sub { font-size: 16px; line-height: 1.45; letter-spacing: -0.01em; color: #6e6e6e; max-width: 380px; }
.cta-btn {
  margin-top: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  height: 52px; padding: 0 28px;
  border-radius: 999px;
  background: #1a1a1a; color: #fff;
  font-size: 16px; letter-spacing: -0.01em;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.cta-btn:hover { background: #000; transform: translateY(-2px); }
.cta-btn:focus-visible { outline: 2px solid #1a1a1a; outline-offset: 3px; }
@media (max-width: 700px) {
  .cta { padding: 96px 0 96px; }
  .cta-btn { width: 100%; }
}
