/* dvirz.com — shared styles */
:root {
  --bg: #f5f4f0;
  --ink: #111110;
  --muted: #86857f;
  --line: rgba(17, 17, 16, 0.12);
  --chip: rgba(17, 17, 16, 0.62);
  --pill: rgba(128, 127, 122, 0.62);
  --sans: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 72px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }

.small { font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.u-link { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .4s var(--ease); }
.u-link:hover, .u-link[aria-current="page"] { background-size: 100% 1px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr 1fr; align-items: center; gap: 16px;
  padding: 18px var(--gutter);
  background: linear-gradient(var(--bg) 55%, transparent);
}
.logo { font-family: var(--mono); font-size: 15px; text-transform: none; letter-spacing: -0.02em; letter-spacing: -0.02em; white-space: nowrap; }
.logo .flip { display: inline-block; transform: scaleY(-1) translateY(-1px); }
.clock { font-variant-numeric: tabular-nums; }
.header-mid { justify-self: center; display: flex; gap: 14px; }
.header-end { justify-self: end; }
@media (max-width: 760px) {
  .site-header { grid-template-columns: 1fr auto auto; gap: 14px; }
  .clock { display: none; }
  .logo { font-size: 13px; }
}
@media (max-width: 400px) {
  .logo { font-size: 12px; letter-spacing: -0.04em; }
  .site-header { gap: 10px; }
  .header-mid { gap: 10px; }
}

/* ---------- Floating pill nav + orb ---------- */
.pill {
  position: fixed; left: 50%; bottom: 22px; z-index: 60; transform: translateX(-50%);
  display: flex; align-items: center; gap: 2px; padding: 4px;
  background: var(--pill); color: #fff;
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  border-radius: 3px; font-size: 12.5px; white-space: nowrap;
}
.pill a, .pill button { padding: 6px 10px; border-radius: 2px; transition: background-color .25s; }
.pill a:hover, .pill button:hover, .pill [aria-current="page"], .pill [aria-pressed="true"] { background: rgba(255,255,255,.18); }
.pill .sep { width: 1px; height: 16px; background: rgba(255,255,255,.35); margin: 0 4px; }
.orb {
  position: fixed; right: var(--gutter); bottom: 18px; z-index: 60;
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; color: #fff;
  background: radial-gradient(circle at 50% 50%, #8a8984 0%, #b9b8b2 45%, #efeee9 72%);
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
  transition: transform .5s var(--ease);
}
.orb:hover { transform: scale(1.12); }
@media (max-width: 520px) { .orb { display: none; } }

/* ---------- Landing ---------- */
.landing { height: 100vh; height: 100svh; display: grid; grid-template-rows: 1fr auto; overflow: hidden; }
.hero { position: relative; display: grid; place-items: center; text-align: center; padding: 80px var(--gutter) 0; }
.hero h1 {
  margin: 0; font-weight: 400; letter-spacing: -0.035em; line-height: 1.02;
  font-size: clamp(44px, 7.4vw, 112px); max-width: 11ch;
  transition: opacity .35s var(--ease);
}
.hero .sub { margin-top: 22px; transition: opacity .35s var(--ease); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.reel { position: absolute; inset: 74px var(--gutter) 16px; overflow: hidden; background: #e7e6e1; transition: opacity .35s var(--ease); }
.reel video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s var(--ease); }
.reel video.on { opacity: 1; }
.landing.previewing .reel { opacity: 0; }
.hero-preview {
  position: absolute; inset: 90px var(--gutter) 24px; display: grid; place-items: center;
  pointer-events: none; opacity: 0; transition: opacity .35s var(--ease);
}
.hero-preview img { max-height: 100%; width: auto; max-width: min(100%, 980px); object-fit: contain; }
.hero-preview .label { position: absolute; left: 0; bottom: 0; }
.landing.previewing .hero h1, .landing.previewing .hero .sub { opacity: 0; }
.landing.previewing .hero-preview { opacity: 1; }

.strip { position: relative; padding: 0 0 74px; overflow: hidden; }
.strip-track { display: flex; gap: 4px; width: max-content; animation: marquee 60s linear infinite; }
.strip:hover .strip-track { animation-play-state: paused; }
.strip a { flex: none; width: 58px; aspect-ratio: 1; overflow: hidden; background: #e7e6e1; }
.strip img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease), filter .3s; }
.strip:hover img { filter: grayscale(1) opacity(.55); }
.strip a:hover img { filter: none; transform: scale(1.06); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Page shell ---------- */
main.page { padding: 120px var(--gutter) 140px; }
.page-title { margin: 0 0 clamp(40px, 7vw, 96px); text-align: center; font-weight: 400; letter-spacing: -0.035em; line-height: 1; font-size: clamp(48px, 8vw, 120px); }

/* ---------- Works ---------- */
.filters { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding-bottom: 14px; }
.filters ul { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 14px; margin: 0; padding: 0; list-style: none; }
.filters button { color: var(--muted); transition: color .2s; }
.filters button:hover, .filters button[aria-pressed="true"] { color: var(--ink); }
.filters button[aria-pressed="true"] { text-decoration: underline; text-underline-offset: 3px; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 16px; }
@media (max-width: 700px) { .grid { grid-template-columns: 1fr; gap: 36px; } }
.card .frame { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #e7e6e1; }
.card img, .card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.card video { opacity: 0; transition: opacity .4s; }
.card:hover img { transform: scale(1.03); }
.card.playing video { opacity: 1; }
.chips { position: absolute; left: 10px; bottom: 10px; display: flex; flex-wrap: wrap; gap: 4px; z-index: 2; }
.chip { background: var(--chip); color: #fff; padding: 3px 7px; font-size: 10.5px; letter-spacing: .02em; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.card .meta { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; font-size: 13px; }

.list { border-top: 1px solid var(--line); }
.list-head, .row { display: grid; grid-template-columns: 56px 1.4fr 1.6fr 1fr 56px; gap: 16px; align-items: baseline; }
.list-head { padding: 10px 0; color: var(--muted); border-bottom: 1px solid var(--line); }
.row { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; transition: opacity .3s; }
.row .title { font-size: clamp(15px, 1.4vw, 19px); }
.row .yr, .list-head .yr { text-align: right; }
.list:hover .row { opacity: .28; }
.list:hover .row:hover { opacity: 1; }
@media (max-width: 700px) {
  .list-head, .row { grid-template-columns: 34px 1fr 48px; }
  .list-head .c, .list-head .l, .row .c, .row .l { display: none; }
}
.cursor-preview {
  position: fixed; left: 0; top: 0; z-index: 40; width: 220px; aspect-ratio: 4 / 3; pointer-events: none;
  opacity: 0; transform: translate3d(-50%, -50%, 0) scale(.85); transition: opacity .25s, scale .35s var(--ease);
  overflow: hidden; background: #e7e6e1;
}
.cursor-preview.on { opacity: 1; }
.cursor-preview img { width: 100%; height: 100%; object-fit: cover; }
[hidden] { display: none !important; }

/* ---------- Project ---------- */
.project { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 72px); align-items: start; }
.project-info { position: sticky; top: 96px; }
.project-info h1 { margin: 0 0 28px; font-weight: 400; letter-spacing: -0.035em; line-height: 1; font-size: clamp(40px, 5.2vw, 84px); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 22px; margin: 0 0 28px; padding: 14px 0; border-block: 1px solid var(--line); font-size: 13px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.desc p { margin: 0 0 1em; max-width: 52ch; font-size: 15.5px; line-height: 1.6; }
.desc .eyebrow { display: block; margin-bottom: 8px; color: var(--muted); }
.gallery { display: grid; gap: 28px; }
.gallery figure { margin: 0; }
.gallery img, .gallery video { width: 100%; background: #e7e6e1; }
.gallery figcaption { display: flex; gap: 12px; padding-top: 8px; color: var(--muted); font-size: 12px; }
@media (max-width: 860px) {
  .project { grid-template-columns: 1fr; }
  .project-info { position: static; }
}
.next {
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px;
  margin-top: clamp(64px, 10vw, 140px); padding-top: 18px; border-top: 1px solid var(--line);
}
.next .t { font-size: clamp(36px, 6vw, 96px); letter-spacing: -0.035em; line-height: 1; transition: transform .6s var(--ease); }
.next:hover .t { transform: translateX(10px); }
.next img { width: clamp(120px, 18vw, 260px); aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 72px); align-items: start; }
.about .lead { margin: 0 0 40px; font-size: clamp(26px, 3.2vw, 46px); line-height: 1.12; letter-spacing: -0.025em; }
.about .body p { max-width: 60ch; font-size: 15.5px; line-height: 1.65; }
.about img { position: sticky; top: 96px; width: 100%; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } .about img { position: static; } }

/* ---------- Footer ---------- */
.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px;
  padding: 18px var(--gutter) 90px; border-top: 1px solid var(--line);
}
.site-footer nav { display: flex; gap: 18px; }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Small screens ---------- */
@media (max-width: 700px) {
  .pill .ext { display: none; }
  .filters { flex-direction: column; align-items: stretch; gap: 8px; }
  .filters ul { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .filters ul::-webkit-scrollbar { display: none; }
  .filters li { flex: none; }
}
