:root {
  --fg: #f2f2f2;
  --dim: #8c8c8c;
  --mute: #9a9a9a;
  --line: #1f1f1f;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { background: #000; color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: #000;
  color: var(--fg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 1px solid var(--fg); outline-offset: 4px; border-radius: 2px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.bg-img {
  position: absolute; inset: 0 0 0 30%;
  background: center / cover no-repeat;
  opacity: 0;
  transition: opacity .7s ease;
}
.bg-img.on { opacity: .6; }
.bg-img video, .media video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity .5s ease;
}
.bg-img video.ready, .media video.ready { opacity: 1; }
#ripple { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: screen; }
.scrim {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, #000 0%, rgba(0,0,0,.9) 30%, rgba(0,0,0,.35) 50%, rgba(0,0,0,.15) 80%, rgba(0,0,0,.35) 100%);
}

.site {
  position: relative; z-index: 1;
  width: min(1200px, 100% - 48px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex; flex-direction: column;
}

.top { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 32px 0 0; }
.name { font-size: 20px; font-weight: 500; letter-spacing: -.01em; }
.links { display: flex; gap: 6px; margin-right: -8px; }
.links a { display: grid; place-items: center; width: 36px; height: 36px; color: var(--mute); transition: color .2s; }
.links a:hover { color: var(--fg); }
.links svg { width: 20px; height: 20px; fill: currentColor; }

main { flex: 1; padding: 14vh 0 8vh; }

.projects { list-style: none; margin: 0; padding: 0; width: min(560px, 100%); }
.project { border-bottom: 1px solid var(--line); }
.project:first-child { border-top: 1px solid var(--line); }

.project-link { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 18px 0; }
.project-name {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 400;
  letter-spacing: -.02em;
  line-height: 1.1;
  color: var(--dim);
  transition: color .2s;
}
.project-meta { font: 12px var(--mono); color: var(--mute); white-space: nowrap; }

.project-detail {
  display: grid; grid-template-rows: 0fr; opacity: 0;
  transition: grid-template-rows .35s ease, opacity .25s;
}
.project-detail-inner { min-height: 0; overflow: hidden; }
.project-detail-inner > :last-child { padding-bottom: 20px; }
.project-detail p { margin: 0; max-width: 48ch; font-size: 14px; line-height: 1.55; color: var(--mute); }
.media { display: none; }
.project-detail .project-actions { display: flex; gap: 20px; margin-top: 10px; font: 12px var(--mono); }
.project-actions a { color: var(--fg); }
.project-actions a:hover { text-decoration: underline; text-underline-offset: 3px; }

.project.active .project-name,
.project-link:hover .project-name { color: var(--fg); }
.project.active .project-detail { grid-template-rows: 1fr; opacity: 1; }

.foot {
  padding: 0 0 28px;
  font: 12px/1.5 var(--mono); color: var(--mute);
}

@media (max-width: 760px), (hover: none) {
  .scrim { background: rgba(0,0,0,.65); }
  .bg-img { display: none; }
  main { padding: 48px 0 40px; }
  .projects { width: 100%; }
  .project-name { color: var(--fg); }
  .project-link { padding-bottom: 8px; }
  .project-detail { grid-template-rows: 1fr; opacity: 1; }
  .project-detail-inner > :last-child { padding-bottom: 28px; }
  .media {
    display: block; position: relative; overflow: hidden;
    aspect-ratio: 16 / 10; border-radius: 6px; margin: 6px 0 14px; background: #111;
  }
  .media img { display: block; width: 100%; height: 100%; object-fit: cover; }
}

@media (max-width: 480px) {
  .site { width: calc(100% - 32px); }
  .top { padding-top: 24px; }
  .project-link { flex-direction: column; gap: 4px; }
}

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