:root {
  --ink: #0c0c0b;
  --ink-2: #131312;
  --paper: #ecebe6;
  --dim: rgba(236, 235, 230, .58);
  --faint: rgba(236, 235, 230, .34);
  --line: rgba(236, 235, 230, .13);
  --accent: #d8572a;
  --display: 'Karantina', 'Heebo', sans-serif;
  --sans: 'Heebo', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --pad: clamp(20px, 4.5vw, 64px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.locked { overflow: hidden; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 300 17px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::after {
  content: '';
  position: fixed; inset: -50%;
  pointer-events: none; z-index: 100;
  opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection { background: var(--accent); color: var(--ink); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
p { text-wrap: pretty; }
.mono { font-family: var(--mono); font-weight: 400; letter-spacing: .08em; direction: ltr; unicode-bidi: isolate; }

.skip { position: absolute; right: -999px; top: 8px; background: var(--paper); color: var(--ink); padding: 6px 12px; z-index: 200; }
.skip:focus { right: 8px; }

/* header */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px var(--pad);
  transition: background .4s, padding .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.top.solid { background: rgba(12, 12, 11, .92); padding-block: 14px; border-color: var(--line); }
.brand { font-family: var(--display); font-size: 30px; font-weight: 400; line-height: 1; letter-spacing: .01em; }
.top nav { display: flex; gap: clamp(16px, 3vw, 40px); font-size: 14px; font-weight: 400; }
.top nav a { color: var(--dim); position: relative; transition: color .25s; }
.top nav a:hover { color: var(--paper); }
.top nav a::after {
  content: ''; position: absolute; inset: auto 0 -4px 0; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease);
}
.top nav a:hover::after { transform: scaleX(1); }

/* hero */
.hero { padding: clamp(120px, 18vh, 190px) var(--pad) clamp(56px, 8vw, 110px); }
.eyebrow { display: flex; gap: 14px; align-items: baseline; font-size: 13px; color: var(--dim); font-weight: 400; }
.eyebrow .mono { font-size: 11px; color: var(--accent); }
.hero-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px 48px; flex-wrap: wrap; margin-top: 18px; }
.hero-name {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(110px, 19vw, 320px);
  line-height: .8; letter-spacing: .005em;
  animation: rise 1.1s .1s var(--ease) both;
}
.hero-lede { max-width: 31ch; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.6; color: var(--dim); padding-bottom: .6em; animation: rise 1.1s .25s var(--ease) both; }

.screen {
  position: relative; display: block; width: 100%;
  aspect-ratio: 2.39 / 1;
  margin-top: clamp(48px, 7vw, 96px);
  background: var(--ink-2);
  overflow: hidden;
  animation: rise 1.2s .4s var(--ease) both;
}
.screen-img {
  position: absolute; inset: 0;
  background: center / cover no-repeat;
  transition: transform 1.6s var(--ease), opacity .6s;
}
.screen:hover .screen-img { transform: scale(1.03); }
.screen-label {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; gap: 18px;
  font-family: var(--display); font-size: clamp(40px, 5vw, 72px); font-weight: 400; line-height: 1;
}
.screen-meta { position: absolute; bottom: 18px; left: 22px; font-size: 10px; color: var(--faint); }

.play {
  width: 58px; height: 58px; border-radius: 50%;
  border: 1px solid var(--faint);
  position: relative; flex: none; display: block;
  transition: border-color .3s, background .3s, transform .5s var(--ease);
}
.play::after {
  content: ''; position: absolute; top: 50%; left: 52%;
  border-style: solid; border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent var(--paper);
  transform: translate(-50%, -50%);
}
.screen:hover .play { background: var(--accent); border-color: var(--accent); transform: scale(1.06); }

.marks i { position: absolute; width: 18px; height: 18px; border: 0 solid var(--faint); }
.marks i:nth-child(1) { top: 16px; right: 16px; border-top-width: 1px; border-right-width: 1px; }
.marks i:nth-child(2) { top: 16px; left: 16px; border-top-width: 1px; border-left-width: 1px; }
.marks i:nth-child(3) { bottom: 16px; right: 16px; border-bottom-width: 1px; border-right-width: 1px; }
.marks i:nth-child(4) { bottom: 16px; left: 16px; border-bottom-width: 1px; border-left-width: 1px; }

/* works */
.works { padding: clamp(40px, 6vw, 80px) var(--pad) clamp(80px, 10vw, 140px); }
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 24px;
  border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: clamp(28px, 4vw, 48px);
}
.section-head h2, .about h2 {
  font-family: var(--display); font-weight: 400; font-size: clamp(64px, 8vw, 120px); line-height: .85;
}
.count { font-size: 12px; color: var(--accent); vertical-align: top; margin-right: 8px; line-height: 2; }
.filters { display: flex; flex-wrap: wrap; gap: 6px 26px; font-size: 15px; font-weight: 400; }
.filters button { color: var(--faint); padding: 4px 0; position: relative; transition: color .25s; }
.filters button:hover { color: var(--dim); }
.filters button[aria-selected="true"] { color: var(--paper); }
.filters button[aria-selected="true"]::after {
  content: ''; position: absolute; inset: auto 0 -2px 0; height: 1px; background: var(--paper);
}
.filters sup { font-size: 9px; margin-right: 3px; color: var(--faint); }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(36px, 4vw, 56px) clamp(20px, 2.4vw, 36px); }
.card { opacity: 0; transform: translateY(18px); }
.grid.in .card { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i) * 60ms); }
.card-btn { display: block; width: 100%; text-align: right; }

.card-frame {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 16 / 9; background: var(--tone, #171715);
}
.card-frame img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.4s var(--ease), filter .6s;
  filter: saturate(.9);
}
.title-card {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 24px; text-align: center;
  transition: transform 1.4s var(--ease);
}
.tc-cat { font-size: 12px; font-weight: 400; color: var(--faint); letter-spacing: .04em; display: flex; align-items: center; gap: 10px; }
.tc-cat::before, .tc-cat::after { content: ''; width: 18px; height: 1px; background: var(--line); }
.tc-title {
  font-family: var(--display); font-weight: 400; color: rgba(236, 235, 230, .88);
  font-size: clamp(44px, 5vw, 76px); line-height: .9; max-width: 12ch;
}
.card-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(12, 12, 11, .35); opacity: 0; transition: opacity .4s;
}
.card-play .play { border-color: var(--paper); transform: scale(.85); }
.card-btn:hover .card-play, .card-btn:focus-visible .card-play { opacity: 1; }
.card-btn:hover .card-play .play { background: var(--accent); border-color: var(--accent); transform: scale(1); }
.card-btn:hover img, .card-btn:hover .title-card { transform: scale(1.035); }

.card-info { display: flex; align-items: baseline; gap: 16px; padding-top: 16px; }
.card-num { font-size: 11px; color: var(--faint); flex: none; padding-top: 2px; }
.card-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.card-title { font-family: var(--display); font-size: clamp(32px, 3vw, 44px); font-weight: 400; line-height: .95; }
.card-meta { font-size: 14px; color: var(--dim); }
.tag { font-size: 12px; color: var(--dim); border: 1px solid var(--line); padding: 2px 10px; flex: none; white-space: nowrap; }

/* about */
.about {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 120px);
  padding: clamp(80px, 10vw, 140px) var(--pad);
  border-top: 1px solid var(--line);
}
.about h2 { margin-bottom: 36px; }
.about-text p { max-width: 58ch; color: var(--dim); margin-bottom: 1.1em; }
.about-text .about-lead { font-weight: 300; font-size: clamp(21px, 2vw, 27px); line-height: 1.55; color: var(--paper); margin-bottom: 1.2em; }
.portrait { margin: 0 0 40px; aspect-ratio: 4 / 5; overflow: hidden; background: var(--ink-2); }
.portrait img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.cv { margin: 0; padding-top: clamp(0px, 7vw, 108px); }
.cv > div { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.cv > div:last-child { border-bottom: 1px solid var(--line); }
.cv dt { font-size: 11px; color: var(--accent); padding-top: 4px; text-align: right; }
.cv dd { margin: 0; font-size: 15px; font-weight: 400; line-height: 1.5; }
.cv dd span { display: block; color: var(--dim); font-weight: 300; font-size: 14px; }

/* contact */
.contact { padding: clamp(80px, 10vw, 140px) var(--pad); border-top: 1px solid var(--line); }
.contact-mail {
  display: inline-block; margin: 28px 0 32px;
  font-family: var(--display); font-weight: 400; font-size: clamp(48px, 10vw, 168px); line-height: .9;
  letter-spacing: .01em; overflow-wrap: anywhere;
  background: linear-gradient(var(--accent), var(--accent)) no-repeat 100% 100% / 0 1px;
  transition: background-size .6s var(--ease), color .3s;
  padding-bottom: 6px;
}
.contact-mail:hover { background-size: 100% 1px; background-position-x: 0; }
.contact-row { display: flex; gap: 36px; font-size: 17px; font-weight: 400; }
.contact-row a { color: var(--dim); transition: color .25s; }
.contact-row a:hover { color: var(--paper); }

.foot {
  display: flex; justify-content: space-between; padding: 26px var(--pad);
  border-top: 1px solid var(--line); font-size: 13px; color: var(--faint);
}
.foot a:hover { color: var(--paper); }

/* player */
.player {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0;
  padding: clamp(16px, 3vw, 40px) var(--pad);
  background: rgba(8, 8, 7, .97); color: var(--paper); border: 0;
  display: none; flex-direction: column; justify-content: center; gap: 20px;
}
.player[open] { display: flex; animation: fade .35s ease both; }
.player::backdrop { background: transparent; }
.player-bar, .player-foot { width: 100%; max-width: 1280px; margin: 0 auto; }
.player-bar { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.player-cat { font-size: 10px; color: var(--accent); margin-bottom: 6px; direction: rtl; font-family: var(--sans); letter-spacing: .02em; font-size: 13px; }
.player h3 { font-family: var(--display); font-weight: 400; font-size: clamp(44px, 5vw, 76px); line-height: .9; }
.close { font-size: 14px; color: var(--dim); display: flex; gap: 10px; align-items: center; transition: color .2s; flex: none; }
.close:hover { color: var(--paper); }
.close span { font-size: 18px; }
.frame { width: 100%; max-width: 1280px; margin: 0 auto; aspect-ratio: 16 / 9; max-height: 72vh; background: #000; }
.frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.player-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 28px; align-items: center; }
.parts { display: flex; flex-wrap: wrap; gap: 6px; }
.parts button { font-size: 13px; min-width: 40px; padding: 5px 12px; border: 1px solid var(--line); color: var(--dim); transition: all .2s; }
.parts button:hover { border-color: var(--faint); color: var(--paper); }
.parts button[aria-selected="true"] { border-color: var(--paper); color: var(--paper); }
.player-desc { font-size: 14px; color: var(--dim); }
.player-desc .sep { color: var(--faint); margin: 0 10px; }

/* reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.seen { opacity: 1; transform: none; }

@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* responsive */
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .cv { padding-top: 0; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .top nav a:not([href="#works"]):not([data-open]) { display: none; }
  .grid { grid-template-columns: 1fr; }
  .screen { aspect-ratio: 16 / 9; }
  .play { width: 48px; height: 48px; }
  .cv > div { grid-template-columns: 80px 1fr; }
  .tag { display: none; }
  .contact-row { flex-direction: column; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .card, .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* custom video player */
.frame { position: relative; }
.vp { position: absolute; inset: 0; background: #000; overflow: hidden; }
.vp:fullscreen { width: 100vw; height: 100vh; }
.vp video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; cursor: pointer; }
.vp-big {
  position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%);
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.vp-big .play { width: 84px; height: 84px; border-color: var(--paper); background: rgba(12, 12, 11, .35); }
.vp-big .play::after { border-width: 11px 0 11px 18px; }
.vp-big:hover .play { background: var(--accent); border-color: var(--accent); }
.vp.paused .vp-big { opacity: 1; pointer-events: auto; }
.vp-bar {
  position: absolute; inset: auto 0 0 0;
  display: flex; align-items: center; gap: 14px;
  padding: 36px 18px 14px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .72));
  transition: opacity .4s, transform .4s var(--ease);
}
.vp.idle .vp-bar { opacity: 0; transform: translateY(8px); }
.vp.idle video { cursor: none; }
.vp-btn { width: 28px; height: 28px; display: grid; place-items: center; color: var(--paper); opacity: .8; transition: opacity .2s, color .2s; flex: none; }
.vp-btn:hover { opacity: 1; color: var(--accent); }
.vp-btn svg { width: 16px; height: 16px; }
.vp .i-play, .vp.paused .i-pause, .vp .i-mute, .vp.muted .i-vol { display: none; }
.vp.paused .i-play, .vp.muted .i-mute { display: block; }
.vp-time { font-size: 11px; color: var(--dim); min-width: 38px; letter-spacing: .04em; flex: none; }
.vp-track { position: relative; flex: 1; height: 18px; cursor: pointer; touch-action: none; }
.vp-track::before, .vp-buf, .vp-fill {
  content: ''; position: absolute; left: 0; top: 50%; height: 2px; margin-top: -1px;
  transition: height .2s, margin .2s;
}
.vp-track::before { right: 0; background: rgba(236, 235, 230, .2); }
.vp-buf { background: rgba(236, 235, 230, .35); width: 0; }
.vp-fill { background: var(--accent); width: 0; }
.vp-fill::after {
  content: ''; position: absolute; right: -6px; top: 50%; width: 12px; height: 12px; margin-top: -6px;
  border-radius: 50%; background: var(--paper); transform: scale(0); transition: transform .2s;
}
.vp-track:hover::before, .vp-track:hover .vp-buf, .vp-track:hover .vp-fill { height: 4px; margin-top: -2px; }
.vp-track:hover .vp-fill::after, .vp-track:focus-visible .vp-fill::after { transform: scale(1); }
.vp.loading .vp-big .play { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@media (max-width: 680px) {
  .vp-bar { gap: 8px; padding: 28px 10px 8px; }
  .vp-time#vp-dur { display: none; }
}

/* card stills and moving previews */
.card-vid {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .5s ease, transform 1.4s var(--ease);
  pointer-events: none;
}
.card-frame.playing .card-vid { opacity: 1; }
.card-btn:hover .card-vid { transform: scale(1.035); }
.has-image .card-play, .has-preview .card-play { background: transparent; align-items: flex-end; justify-content: flex-start; padding: 16px; }
.has-image .card-play .play, .has-preview .card-play .play { width: 44px; height: 44px; transform: none; }
.has-image .card-play .play::after, .has-preview .card-play .play::after { border-width: 6px 0 6px 10px; }
.card-frame.has-image::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(236, 235, 230, .06);
}
