@font-face {
  font-family: Golos;
  src: url('/assets/golos-text.woff') format('woff');
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #0c0c0c;
  --ink: #fff;
  --muted: #a4a4a4;
  --line: #303030;
  --gutter: clamp(16px, 2.5vw, 56px);
  --column-start: 42.1%;
  --body-size: clamp(15px, 1.125vw, 22px);
}

* { box-sizing: border-box }
html { scroll-behavior: smooth }
body {
  margin: 0;
  padding-inline: var(--gutter);
  background: var(--background);
  color: var(--ink);
  font: 400 var(--body-size)/1.35 Golos, Arial, sans-serif;
  letter-spacing: -.025em;
}

h1, h2, h3, p, ul, ol { margin: 0 }
h1, h2, h3 { font-weight: 400 }
ul, ol { list-style: none; padding: 0 }
a { color: inherit; text-decoration: none }
a:focus-visible { outline: 2px solid #7295ff; outline-offset: 5px }
img { display: block; max-width: 100%; height: auto }

.hero {
  --hero-edge: clamp(16px, min(2.5vw, 3.3svh), 56px);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding-block: var(--hero-edge);
  margin-bottom: calc(clamp(92px, 14vw, 224px) - var(--hero-edge));
}
.wordmark img { width: 100% }
.columns { display: grid; grid-template-columns: var(--column-start) minmax(0, 1fr) auto }
.contact-links { margin-top: clamp(16px, 2vw, 34px); color: var(--muted) }
.hero .contact-links { margin-top: clamp(10px, min(1.16vw, 2svh), 24px) }
.contact-links a { justify-self: start; white-space: nowrap }
.contact-links a:last-child { justify-self: end }
.contact-links a:hover { color: var(--ink) }

.hero-body { align-items: end; margin-top: auto; padding-top: clamp(16px, 4svh, 64px) }
.hero-controls { display: flex; align-items: end; gap: 12px }
.disciplines { line-height: clamp(1.16em, 3.05svh, 1.61em) }
.language-switch {
  --language-size: clamp(43px, min(4vw, 6.56svh), 84px);
  display: inline-flex;
  align-items: center;
  gap: calc(var(--language-size) * .0625);
  flex-shrink: 0;
  margin-left: auto;
  margin-right: 16.5%;
  padding: calc(var(--language-size) * .1);
  border: 0;
  border-radius: 999px;
  background: #fbfbfb;
  color: #0c0c0c;
  opacity: 1;
  font: inherit;
  font-size: calc(var(--language-size) * .3);
  letter-spacing: 0;
}
.language-switch a {
  display: grid;
  place-items: center;
  width: calc(var(--language-size) * .8);
  aspect-ratio: 1;
  border-radius: 50%;
}
.language-switch .language-active { background: #1b1b1c; color: #fff }

@media (hover: hover) and (pointer: fine) {
  .language-switch a:not(.language-active):hover {
    background-color: #e8e8e8;
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .language-switch a {
    transition: background-color 200ms ease, transform 200ms ease;
  }

  .language-switch a:hover { transform: scale(1.05) }
  .language-switch a:active { transform: scale(.96) }
}
.disciplines li::after, .tags li::before { content: '/'; color: var(--muted) }
.disciplines li::after { margin-left: .55em }
.hero-intro {
  --avatar-width: clamp(120px, calc((100svh - 17vw - 120px) / 1.09), min(28.8vw, 590px));
}
.hero-intro img { width: var(--avatar-width); margin-bottom: calc(var(--avatar-width) * -.213) }
.hero-intro p { position: relative; font-size: clamp(17px, 1.55vw, 30px); line-height: 1.27; padding-right: 12px }
.years { color: var(--muted); justify-self: end; white-space: nowrap }

.featured { position: relative; isolation: isolate; scroll-margin-top: 12px }
.project-surface {
  background: var(--background);
  padding-top: clamp(20px, 2vw, 38px);
  padding-bottom: 4px;
}
.feature:has(:focus-visible) { z-index: 1 }
.feature img { width: 100%; aspect-ratio: 1520 / 768; object-fit: cover }
.project-meta {
  display: grid;
  grid-template-columns: var(--column-start) minmax(0, 1fr) minmax(19%, 26%);
  align-items: end;
  gap: 0;
  padding-bottom: clamp(12px, 1.15vw, 22px);
}
.project-meta h2, .small-project h3 { font-size: inherit; line-height: 1.25 }
.project-meta h2 { padding-right: 12px }
.description { color: var(--muted); max-width: 34em; line-height: 1.35 }
.project-meta .description { padding-right: clamp(12px, 2vw, 32px) }
.tags { text-align: right; line-height: 1.55 }
.tags li::before { margin-right: .55em }
.case-link { display: block }

@media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
  .featured.is-stacked .feature {
    position: sticky;
    top: clamp(-35svh, calc(100svh - 48.5vw - 130px), 4svh);
  }
  .is-stacked .project-surface { transform-origin: center top }
}

.about { padding-block: clamp(120px, 15vw, 250px) clamp(120px, 15vw, 250px) }
.about-copy { margin-left: var(--column-start); max-width: 42em }
.about-copy h2 { font-size: clamp(27px, 3vw, 58px); letter-spacing: -.05em; line-height: 1.18 }
.about-copy p { margin-top: 1.6em; color: var(--muted); max-width: 30em; font-size: clamp(16px, 1.55vw, 28px) }
.skills { margin-top: clamp(48px, 8.5vw, 140px); display: grid; grid-template-columns: 42.1% 29% 1fr }
.skill { padding-right: clamp(10px, 1.5vw, 26px) }
.skill ul { display: flex; flex-wrap: wrap; gap: .55em; max-width: 27em }
.skill li { background: #232323; padding: .65em .8em; border-radius: 100px }
.skill h3 { margin-top: 1.35em; font-size: inherit; color: var(--muted) }

.other > h2, .experience > h2 { font-size: clamp(21px, 1.55vw, 30px); margin-bottom: clamp(22px, 2vw, 38px) }
.small-project {
  display: grid;
  grid-template-columns: var(--column-start) minmax(0, 1fr) 22%;
  border-top: 1px solid var(--line);
  padding-block: clamp(16px, 1.55vw, 30px);
}
.small-project:last-child { border-bottom: 1px solid var(--line) }
.small-project .description { margin-top: .65em; max-width: 27em; padding-right: 16px }
.small-project .project-cover { width: min(23vw, 440px); align-self: start }
.experience { padding-block: clamp(120px, 16.8vw, 280px) clamp(104px, 15.3vw, 250px) }
.experience ol { display: grid; grid-template-columns: .82fr 1.12fr 1.03fr .86fr; gap: clamp(16px, 3.2vw, 60px) }
.experience li { position: relative }
.experience li:not(:last-child)::after { content: '→'; position: absolute; top: 0; right: 0; color: var(--muted) }
.experience li:not(:last-child) h3 { padding-right: 1.6em }
.experience h3 { font-size: clamp(17px, 1.55vw, 30px); line-height: 1.2 }
.experience p { color: var(--muted); margin-top: .85em }

footer {
  overflow-y: clip;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding-block: clamp(12px, 2svh, 24px);
}
footer .contact-links { margin-top: clamp(10px, min(1.16vw, 2svh), 24px) }
.footer-body {
  --footer-avatar-width: clamp(128px, calc((100svh - 14vw - 106px) / 1.01), min(31.2vw, 580px));
  margin-top: auto;
  padding-top: clamp(14px, 3svh, 44px);
  align-items: end;
}
.footer-body img { width: var(--footer-avatar-width); margin-bottom: calc(var(--footer-avatar-width) * -.22) }
.work-button, .top-button {
  background: var(--ink);
  color: var(--background);
  border-radius: 100px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.work-button { justify-self: start; gap: clamp(12px, 2.3vw, 44px); padding: 7px 7px 7px 1.35em; font-size: clamp(14px, 1.35vw, 25px) }
.work-button span { display: grid; place-items: center; border-radius: 50%; width: 2.8em; aspect-ratio: 1; background: var(--background); color: var(--ink) }
.top-button { justify-self: end; width: clamp(46px, 5vw, 90px); aspect-ratio: 1; font-size: clamp(18px, 1.6vw, 31px) }
.work-button:hover, .top-button:hover { background: #ddd }

@media (max-width: 899px) {
  .skills { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px }
  .hero-intro p br { display: none }
}

@media (max-width: 640px) {
  .hero { margin-bottom: calc(64px - var(--hero-edge)) }
  .contact-links { grid-template-columns: 1fr auto; gap: 8px; font-size: 13px }
  .contact-links a:first-child { grid-column: 1 / -1 }
  .hero-body { grid-template-columns: 1fr auto; gap: 22px 10px; align-items: start; padding-top: 28px }
  .hero-controls { grid-column: 1 / -1; grid-row: 2; align-items: end }
  .disciplines { display: flex; flex-wrap: wrap; gap: 3px 10px; font-size: 13px }
  .language-switch { margin-right: 0 }
  .hero-intro { grid-column: 1 / -1 }
  .hero-intro img { width: min(58vw, 35svh); margin: 0 auto max(-12vw, -7.45svh) }
  .hero-intro p { padding-right: 0; font-size: 20px; max-width: 28em }
  .years { grid-row: 3; grid-column: 1 / -1; justify-self: start }
  .project-meta { grid-template-columns: 1fr auto; align-items: start; row-gap: 10px }
  .project-meta h2 { font-size: 19px }
  .project-meta .description { grid-area: 2 / 1 / 3 / -1; padding-right: 0 }
  .tags { font-size: 13px }
  .feature img { aspect-ratio: auto }
  .about { padding-block: 94px }
  .about-copy { margin: 0 }
  .about-copy h2 br { display: none }
  .skills { grid-template-columns: 1fr; gap: 25px }
  .skill h3 { margin-top: .65em }
  .small-project { grid-template-columns: 1fr auto; gap: 12px }
  .small-project .description { padding: 0 }
  .small-project .project-cover { grid-area: 2 / 1 / 3 / -1; width: min(100%, 368px) }
  .small-project .tags { grid-area: 1 / 2 / 2 / 3 }
  .experience { padding-block: 94px }
  .experience ol { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px }
  .experience li:nth-child(2)::after { content: none }
  .footer-body { grid-template-columns: 1fr auto; row-gap: 12px }
  .footer-body img { grid-row: 1; grid-column: 1 / -1; width: min(60vw, 42svh); justify-self: center; margin-bottom: max(-9vw, -6.3svh) }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto } }


.project-cover {
  position: relative;
  isolation: isolate;
  display: block;
  overflow: hidden;
  aspect-ratio: 1520 / 768;
  background: #171717;
}

.project-cover::before,
.project-cover::after {
  content: '';
  position: absolute;
  pointer-events: none;
}

.project-cover::before {
  /* Gradient artboard includes a blur margin outside the card. */
  z-index: -2;
  width: 230.9211%;
  height: 256.25%;
  left: -65.4605%;
  top: -40.1042%;
  background: var(--cover-gradient) center / 100% 100% no-repeat;
}

.project-cover::after {
  z-index: -1;
  inset: 0;
  background: url('/assets/home/cytonic-dither.png') repeat;
}

.project-cover img {
  position: absolute;
  left: var(--mockup-left, 0%);
  top: var(--mockup-top, -2.8646%);
  width: var(--mockup-width, 86.8421%);
  height: auto;
  aspect-ratio: auto;
}

[data-cover="cytonic"] { --cover-gradient: url('/assets/home/cytonic-gradient.svg') }
[data-cover="arcanum"] { --mockup-top: 0% }
.cover-laptop { --mockup-width: 71.1842%; --mockup-left: 14.4079% }

.small-project .project-cover { aspect-ratio: 368 / 185 }
.cover-compact { --mockup-width: 71.1957%; --mockup-left: 14.4022%; --mockup-top: -3.2432% }
.cover-forest { --mockup-width: 86.9565%; --mockup-left: 1.6304%; --mockup-top: -3.2432% }
.cover-fit { --mockup-width: 68.75%; --mockup-left: 6.25%; --mockup-top: 6.4865% }

[data-cover="arcanum"] { --cover-gradient: url("/assets/home/arcanum-gradient.svg") }
[data-cover="cytonic-ai"] { --cover-gradient: url("/assets/home/cytonic-ai-gradient.svg") }
[data-cover="tendee"] { --cover-gradient: url("/assets/home/tendee-gradient.svg") }
[data-cover="metida"] { --cover-gradient: url("/assets/home/metida-gradient.svg") }
[data-cover="gazprom"] { --cover-gradient: url("/assets/home/gazprom-gradient.svg") }
[data-cover="mvd"] { --cover-gradient: url("/assets/home/mvd-gradient.svg") }
[data-cover="forest"] { --cover-gradient: url("/assets/home/forest-gradient.svg") }
[data-cover="null-face"] { --cover-gradient: url("/assets/home/null-face-gradient.svg") }
[data-cover="fit-choice"] { --cover-gradient: url("/assets/home/fit-choice-gradient.svg") }
[data-cover="presentologi"] { --cover-gradient: url("/assets/home/presentologi-gradient.svg") }

@media (hover: hover) and (pointer: fine) {
  .small-project + .small-project { margin-block-start: 10px }

  .small-project {
    position: relative;
    container-type: inline-size;
  }

  .small-project::after {
    content: '';
    position: absolute;
    grid-area: 1 / 1 / 2 / -1;
    inset: 0 0 auto;
    height: calc(min(23vw, 440px) * 185 / 368);
  }
}

@media (max-width: 640px) and (hover: hover) and (pointer: fine) {
  .small-project::after {
    grid-area: 2 / 1 / 3 / -1;
    height: calc(min(100cqw, 368px) * 185 / 368);
  }
}
