@font-face { font-family: "Medium"; src: url(/fonts/medium.otf) format("opentype"); font-display: swap; }

:root {
  --wall: #26352F;
  --white: #F7F6F2;
  --black: #111;
  --dim: color-mix(in srgb, var(--white) 66%, var(--wall));
  --gutter: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; }
html { background: var(--wall); scrollbar-color: var(--dim) var(--wall); -webkit-text-size-adjust: 100%; }
body { font: 16px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif; color: var(--white); background: var(--wall); -webkit-font-smoothing: antialiased; }
::selection { background: var(--white); color: var(--wall); }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 1px solid var(--white); outline-offset: 4px; }
img { display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* Nav: translucent band, hides on scroll down */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: 64px; padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--wall) 40%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2);
  transition: transform .5s var(--ease);
}
.nav.hide { transform: translateY(-100%); }
.name { font-family: "Medium", "Helvetica Neue", Helvetica, sans-serif; font-weight: 700; font-size: 21px; letter-spacing: -.01em; white-space: nowrap; }
.links { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 32px); font-size: 15px; }
.links a { color: var(--dim); transition: color .2s; }
.links a:hover, .links a[aria-current] { color: var(--white); }
.links svg { width: 19px; height: 19px; display: block; fill: none; stroke: currentColor; stroke-width: 1.5; }

/* Hero: cover-fit crossfade */
.hero { position: relative; height: 100svh; overflow: hidden; background: var(--black); cursor: pointer; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.hero:focus-visible { outline-offset: -8px; }
.hero > .slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease-in-out; -webkit-user-drag: none; }
.hero > .slide.on { opacity: 1; }
.steps { position: absolute; left: var(--gutter); bottom: calc(var(--gutter) - 14px); display: flex; gap: 6px; }
.steps button { padding: 14px 0; background: none; border: 0; cursor: pointer; }
.steps i { display: block; width: 44px; height: 2px; background: color-mix(in srgb, var(--white) 30%, transparent); overflow: hidden; transition: background .2s; }
.steps button:hover i { background: color-mix(in srgb, var(--white) 60%, transparent); }
.steps .on i::after { content: ""; display: block; height: 100%; background: var(--white); animation: fill 6s linear forwards; transform-origin: left; }
.paused .steps .on i::after { animation-play-state: paused; }
@keyframes fill { from { transform: scaleX(0); } }

/* The wall: one piece per row, whole, never taller than the screen */
.wall {
  display: flex; flex-direction: column; align-items: center;
  gap: .5in; /* 48px */
  padding: clamp(96px, 12vw, 160px) var(--gutter);
}
.piece { width: min(100%, calc((100svh - 160px) * var(--ar))); }
.art { width: 100%; height: auto; aspect-ratio: var(--ar); background: #cfccc4; }

.js .piece { opacity: 0; transform: translateY(16px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .piece.in { opacity: 1; transform: none; }

/* Projects filter */
.filters { display: flex; flex-wrap: wrap; gap: 8px 28px; padding: 120px var(--gutter) 0; max-width: 1600px; margin: 0 auto; justify-content: center; }
.filters button { font: inherit; font-size: 15px; color: var(--dim); background: none; border: 0; padding: 4px 0; cursor: pointer; border-bottom: 1px solid transparent; }
.filters button:hover { color: var(--white); }
.filters button[aria-pressed="true"] { color: var(--white); border-color: var(--white); }
.filters + .wall { padding-top: clamp(56px, 8vw, 96px); }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 7vw, 120px); align-items: center; max-width: 1200px; margin: 0 auto; padding: 160px var(--gutter) 120px; }
.about .piece { width: min(100%, 440px); justify-self: center; }
.about h1 { font-size: clamp(28px, 3vw, 40px); font-weight: 400; letter-spacing: -.02em; line-height: 1.15; margin-bottom: 28px; }
.about p { max-width: 58ch; font-size: 17px; color: color-mix(in srgb, var(--white) 88%, var(--wall)); }
.about p + p { margin-top: 1em; }
.about .contact { margin-top: 40px; display: flex; gap: 28px; font-size: 15px; }
.about .contact a { border-bottom: 1px solid var(--dim); padding-bottom: 2px; }
@media (max-width: 760px) {
  .about { grid-template-columns: 1fr; padding-top: 112px; }
}

/* Footer: the close */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 16px; padding: 48px var(--gutter) 40px; border-top: 1px solid color-mix(in srgb, var(--white) 14%, transparent); font-size: 14px; color: var(--dim); }
.foot .name { color: var(--white); font-size: 18px; }
.foot a:hover { color: var(--white); }

@media (max-width: 640px) {
  .nav { flex-wrap: wrap; height: auto; padding-block: 14px 12px; row-gap: 10px; }
  .name { font-size: 17px; }
  .links { font-size: 14px; gap: 22px; }
  .filters { padding-top: 116px; }
}

@media (prefers-reduced-motion: reduce) {
  *, .js .piece { transition: none !important; animation: none !important; }
  .js .piece { opacity: 1; transform: none; }
}
