@font-face {
  font-family: "DM Sans";
  src: url("media/dm-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: Geist;
  src: url("media/geist-cyrillic.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

:root {
  color-scheme: light;
  --ink: #09090b;
  --muted: #52525b;
  --paper: #f4f4f5;
  --white: #fff;
  --line: #ececee;
  --dark: #27272a;
  --radius: 36px;
  --button-radius: 14px;
  --gutter: clamp(18px, 5vw, 80px);
  --section-space: 80px;
  --header-height: 65px;
  font: 15px "DM Sans", Geist, system-ui, sans-serif;
  color: var(--ink);
  background: #fdfdfd;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, h3, p, figure, blockquote, dl, dd { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
p { line-height: 1.45; }
h1, h2, h3 { font-weight: 600; }
h1 { font-size: clamp(40px, 5vw, 64px); line-height: 1.05; letter-spacing: -.035em; }
h2 { font-size: clamp(28px, 3.5vw, 40px); line-height: 1.14; letter-spacing: -.025em; }
h3 { font-size: 21px; line-height: 1.2; }
:where(a, button, input, [tabindex]):focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
:where([id]) { scroll-margin-top: calc(var(--header-height) + 12px); }
.shell { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 4; top: 10px; left: 16px; background: var(--white); padding: 10px 14px; border-radius: var(--button-radius); }

.header { position: sticky; top: 0; z-index: 2; background: #fdfdfd; }
.header-inner { min-height: var(--header-height); display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.wordmark { font-size: 28px; font-weight: 700; letter-spacing: -.055em; white-space: nowrap; }
.main-nav, .header-actions { display: flex; align-items: center; gap: clamp(12px, 1.65vw, 28px); font-size: 14px; }
.main-nav { gap: 8px; }
.main-nav a, .header-actions a { white-space: nowrap; }

.glass-definitions { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }

.glass-surface {
  --glass-fill: rgb(246 247 249 / .52);
  --glass-glint: rgb(255 255 255 / .65);
  --glass-edge: rgb(99 101 111 / .2);
  --glass-rim: rgb(255 255 255 / .92);
  --glass-shade: rgb(28 31 40 / .17);
  position: relative;
  isolation: isolate;
  color: var(--ink);
  background: var(--glass-fill);
  backdrop-filter: var(--glass-refraction, blur(12px) brightness(1.04)) saturate(1.35);
  border: 1px solid var(--glass-edge);
  box-shadow: inset 0 0 2px 1px var(--glass-shade), inset 0 0 10px 3px var(--glass-glint), 0 3px 10px rgb(9 9 11 / .08);
}

.glass-surface::before, .glass-surface::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.glass-surface::before {
  background: linear-gradient(135deg, var(--glass-glint), transparent 42%, transparent 64%, var(--glass-glint));
}

.glass-surface::after {
  padding: 2px;
  background: linear-gradient(150deg, var(--glass-rim), transparent 45% 60%, var(--glass-rim));
  mask: linear-gradient(white 0 0) content-box, linear-gradient(white 0 0);
  mask-composite: exclude;
}

.glass-surface:hover {
  filter: brightness(1.06);
}

.main-nav a {
  border-radius: 9999px;
  padding: 8px 12px;
  line-height: 1.2;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  width: max-content;
  padding: 10px 16px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.15;
}
.button-dark {
  --glass-fill: rgb(22 24 29 / .91);
  --glass-glint: rgb(255 255 255 / .16);
  --glass-edge: rgb(14 15 19 / .65);
  --glass-rim: rgb(255 255 255 / .45);
  --glass-shade: rgb(0 0 0 / .52);
  color: var(--white);
}
.button-dark:focus-visible { outline-color: var(--ink); }
.button-ghost { --glass-fill: rgb(247 248 250 / .9); }
.button-ghost:focus-visible { outline-color: var(--white); }

.hero { display: grid; grid-template-columns: minmax(0, 1.46fr) minmax(0, 1fr); align-items: start; gap: clamp(24px, 6.2vw, 105px); padding-top: clamp(64px, 7.3vw, 100px); }
.hero-word { position: relative; display: inline-grid; color: #73737c; }
.hero-word > span { grid-area: 1 / 1; visibility: hidden; }
.hero-word > span:first-child { visibility: visible; }
@media (prefers-reduced-motion: no-preference) {
  .hero-word > span:first-child { animation: first-word 4.6s steps(1, end) both; }
  .hero-word > span:nth-child(2) { animation: second-word 4.6s steps(1, end) both; }
  .hero-word > span:nth-child(3) { animation: third-word 4.6s steps(1, end) both; }
}
@keyframes first-word { 0%, 89% { visibility: visible; } 24%, 88% { visibility: hidden; } }
@keyframes second-word { 0%, 56% { visibility: hidden; } 24% { visibility: visible; } }
@keyframes third-word { 0%, 89% { visibility: hidden; } 56% { visibility: visible; } }
.hero-side { padding-top: clamp(3px, .65vw, 8px); }
.hero-side > p { max-width: 45ch; color: #3f3f46; font-size: 18px; line-height: 1.45; }
.demo-form { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; margin-top: 40px; padding: 5px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); }
.demo-form input { min-width: 0; width: 100%; padding: 12px 14px; border: 0; border-radius: var(--button-radius); background: var(--white); color: var(--ink); }
.demo-form input::placeholder { color: #64646d; }
.demo-form .button { min-height: 48px; padding-inline: 18px; }
.work { margin-top: var(--section-space); }
.work h2 { margin-bottom: 20px; }
.work-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.project-card { min-width: 0; }
.project-select { display: grid; grid-template-rows: auto 1fr; width: 100%; height: 100%; padding: 0; overflow: hidden; border-radius: 24px; text-align: left; }
.project-select img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 38%; }
.project-select .work-title { padding: clamp(10px, 1.4vw, 16px); font-size: clamp(15px, 1.4vw, 18px); font-weight: 600; line-height: 1.2; }

.work-player { width: min(900px, 100% - 24px); max-height: calc(100dvh - 24px); padding: 0; overflow: visible; border: 0; border-radius: 24px; color: var(--ink); background: transparent; }
.work-player::backdrop { background: rgb(9 9 11 / .64); }
.work-dialog { position: relative; max-height: calc(100dvh - 24px); overflow: auto; padding: clamp(14px, 3vw, 28px); border: 1px solid var(--line); border-radius: inherit; background: var(--white); }
.work-close { position: absolute; z-index: 2; top: 14px; right: 14px; }
.work-close .button { min-width: 44px; padding: 0; font-size: 24px; }
.work-close .button:focus-visible { outline-offset: 2px; }
.work-panel { display: grid; grid-template-columns: min(42%, 43dvh, 350px) minmax(0, 1fr); gap: clamp(20px, 5vw, 52px); }
.work-media video { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: contain; border-radius: 20px; background: var(--ink); }
.work-thumbnail-transition { position: fixed; z-index: 1; max-width: none; object-fit: cover; pointer-events: none; }
.work-player[data-opening] video { visibility: hidden; }
.work-facts { display: grid; align-content: start; gap: 14px; padding-top: 52px; }
.work-facts > div { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.work-facts dt { color: var(--muted); font-size: 13px; }
.work-facts dd { margin-top: 4px; }
.work-facts .work-title { font-size: clamp(22px, 3vw, 36px); font-weight: 600; line-height: 1.15; }
.player-error { margin-top: 10px; }
.player-error a { text-decoration: underline; }
body:has(.work-player[open]) { overflow: hidden; }

@media (prefers-reduced-motion: no-preference) {
  .work-player[open] .work-dialog { animation: shade-in 480ms ease-out both; }
  .work-player[open]::backdrop { animation: shade-in 400ms ease-out both; }
  .work-player[open] .work-facts { animation: facts-in 360ms 160ms ease-out both; }
  .work-player[open][data-closing] { animation: work-out 180ms ease-in both; }
  .work-player[open][data-closing]::backdrop { animation: shade-out 180ms ease-in both; }
}

@keyframes work-out {
  from { opacity: var(--work-exit-opacity, 1); transform: none; }
  to { opacity: 0; transform: translateY(8px) scale(.96); }
}
@keyframes shade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes shade-out { from { opacity: var(--shade-exit-opacity, 1); } to { opacity: 0; } }
@keyframes facts-in { from { opacity: 0; filter: blur(4px); transform: translateY(6px); } to { opacity: 1; filter: none; transform: none; } }

.middle { margin-top: var(--section-space); padding-block: var(--section-space); background: var(--paper); }
.light-card { display: grid; align-content: start; gap: 18px; padding: clamp(24px, 3.6vw, 48px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.light-card p { color: var(--muted); }
.bio-card { grid-template-columns: minmax(0, 1fr) minmax(160px, .55fr); align-items: center; gap: clamp(18px, 6vw, 72px); }
.about-copy { max-width: 55ch; }
.about-copy p { margin-top: 12px; }
.portrait { justify-self: end; width: min(100%, 290px); height: auto; border: 1px solid var(--line); border-radius: 24px; }
.channel-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.dark-card { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 24px 48px; margin-top: 20px; padding: clamp(28px, 4.8vw, 64px); border-radius: var(--radius); background: var(--dark); color: var(--white); }
.dark-card h2 { max-width: 18ch; }
.dark-card .button { margin-top: 24px; }
.feature-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.feature-list li { display: flex; align-items: baseline; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid #52525b; font-size: 20px; }
.feature-list span { color: #d4d4d8; }
.image-band { background: var(--paper); }
.image-break { overflow: hidden; border-radius: clamp(36px, 6vw, 64px) clamp(36px, 6vw, 64px) 0 0; }
.image-break img { width: 100%; height: clamp(250px, 38vw, 550px); object-fit: cover; }

.image-break.scroll-reveal {
  clip-path: inset(var(--photo-trim-y, 0%) var(--photo-trim-x, 0%) round clamp(20px, 4vw, 48px) clamp(20px, 4vw, 48px) 0 0);
  transition: clip-path 160ms ease-out;
}
.image-break.scroll-reveal img { transform: scale(var(--photo-scale, 1)); transition: transform 160ms ease-out; }

.reviews { margin-top: var(--section-space); }
.reviews .section-heading { margin-bottom: 20px; }
.review-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 0; margin: 0; list-style: none; }
.review-card { display: grid; align-content: start; gap: 14px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.review-grid.scroll-reveal .review-card {
  clip-path: inset(0 0 var(--review-trim, 0%) 0 round var(--radius));
  transition: clip-path 160ms ease-out;
}
.review-grid blockquote { font-size: 17px; line-height: 1.45; }
.review-author { display: flex; align-items: center; gap: 12px; }
.review-avatar { flex: 0 0 44px; aspect-ratio: 1; overflow: hidden; border-radius: 50%; background: #eaeaec; }
.review-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.53); }
.review-card strong { color: var(--ink); overflow-wrap: anywhere; }
.footer { margin-top: clamp(48px, 8vw, 96px); padding-block: 32px 48px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; color: var(--muted); font-size: 14px; }
.footer .wordmark { color: var(--ink); }

@media (max-width: 1000px) {
  .work-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  :root { --header-height: 100px; }
  .header-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 12px; padding-top: 8px; }
  .header-actions { grid-area: 1 / 2; }
  .main-nav { grid-area: 2 / 1 / 3 / -1; flex-wrap: wrap; gap: 6px; padding-block: 8px 10px; }
}

@media (max-width: 760px) {
  :root { --section-space: 56px; }
  .hero { grid-template-columns: 1fr; padding-top: 52px; }
  .hero-side { padding-top: 0; }
  .demo-form { margin-top: 18px; }
  .work-panel { grid-template-columns: 1fr; padding-top: 48px; }
  .work-media video { width: min(100%, 32dvh, 290px); margin-inline: auto; }
  .work-facts { padding-top: 0; }
  .bio-card { grid-template-columns: 1fr; }
  .portrait { justify-self: start; width: min(100%, 240px); }
  .dark-card, .review-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header .wordmark { font-size: 20px; }
  .header-actions { gap: 8px; }
  .header-actions .button { padding-inline: 11px; font-size: 13px; }
}

@media (max-width: 380px) {
  .wordmark { font-size: 23px; }
  .header-inner { column-gap: 8px; }
  .header .wordmark { font-size: 15px; }
  .header-actions .button { padding-inline: 8px; font-size: 12px; }
  h1 { font-size: 35px; }
}
