:root {
  color-scheme: dark;
  --night: #090c14;
  --white: #f0f2fb;
  --ice: #a9baff;
  --masthead-height: 74px;
  --mono: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  background: var(--night);
  color: var(--white);
  scroll-behavior: smooth;
  scroll-padding-top: var(--masthead-height);
}
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, figure { margin: 0; }
p, figcaption, .wf-bubble, .crosspost-bubble { text-wrap: pretty; }
h2, h3 { text-wrap: balance; }
a { color: inherit; text-underline-offset: .32em; }
a:focus-visible, button:focus-visible { outline: 3px solid #889fff; outline-offset: 4px; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.wrap { width: min(88%, 1320px); margin-inline: auto; }
.skip { position: fixed; top: -6rem; padding: .8em; background: var(--night); z-index: 9; }
.skip:focus { top: 0; }
.masthead { position: sticky; top: 0; z-index: 5; height: var(--masthead-height); background: var(--night); border-bottom: 1px solid #ffffff29; }
.masthead-inner { display: flex; align-items: center; gap: 2rem; height: 100%; }
.masthead nav a { display: flex; align-items: center; min-height: 44px; white-space: nowrap; }
.masthead a { text-decoration: none; }
.monogram { display: inline-flex; align-items: center; min-height: 44px; margin-right: auto; }
.monogram img { display: block; width: clamp(62px, 7vw, 82px); height: auto; }
nav { display: flex; gap: 2rem; }
nav a, .header-contact { font-size: .95rem; }
.header-contact { border: 1px solid #424757; padding: .48rem 1rem; border-radius: 30px; }
nav a:hover, .header-contact:hover, .text-link:hover { color: var(--ice); }
.hero { position: relative; isolation: isolate; overflow: hidden; background: radial-gradient(ellipse at 78% 60%, #232d54 0%, #10182e 31%, transparent 66%); }
.digits, .gathering-digits { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.gathering-digits { z-index: 1; }
.hero-layout { position: relative; min-height: clamp(550px, 73svh, 810px); display: flex; align-items: center; }
.hero-art { position: absolute; inset: 0 -5% 0 44%; pointer-events: none; overflow: hidden; container-type: size; }
.halo { position: absolute; width: 90%; height: 55%; left: 7%; top: 22%; transform: rotate(-32deg); border-radius: 100%; border: 2px solid #bbccff; box-shadow: inset 0 0 7px #839eff, 0 0 5px #aeb9ff, 0 0 25px #667eff85, 0 0 80px #506fff80; }
.hero-photo { position: absolute; bottom: -6%; left: 1%; width: 100%; height: 103%; object-fit: contain; object-position: bottom; filter: grayscale(1) contrast(1.08); mask-image: linear-gradient(to bottom,black 78%,transparent 100%); }
.hero-copy { position: relative; padding-block: 3.2rem; z-index: 2; }
.eyebrow { font: .81rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .1em; display: flex; gap: .8rem; align-items: center; }
.eyebrow span { height: 2px; width: 2.3rem; background: currentColor; }
.location { color: #c2ceff; }
h1 { font-size: clamp(5rem, 9.6vw, 10rem); font-family: "Helvetica Neue", Arial, sans-serif; font-weight: 700; line-height: .91; letter-spacing: -.065em; padding: .25em 0 .18em; }
h1 span { color: #cbd5ff; }
.intro { font-size: clamp(1.2rem, 1.65vw, 1.65rem); line-height: 1.35; letter-spacing: -.03em; }
.actions { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; margin-top: 2rem; }
.primary { display: inline-block; background: #bfccff; color: #0e1430; padding: .95em 1.4em; border-radius: .4rem; text-decoration: none; font-weight: 580; transition: background .2s ease, transform .2s ease; }
.primary:hover { background: #e0e7ff; transform: translateY(-2px); }
.case { background: #e8ebf1; color: #141820; padding-block: clamp(1rem, 2vw, 2rem) clamp(4rem, 8vw, 8rem); }
.case-intro { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; }
.case-intro h2, .about h2 { font-size: clamp(3.4rem, 7vw, 7.5rem); letter-spacing: -.075em; line-height: .95; font-weight: 550; margin-top: .22em; }
.case-intro h2 span { color: #48556b; }
.case-intro > p { max-width: 29ch; font-size: clamp(1.03rem, 1.5vw, 1.4rem); line-height: 1.35; }
.case-intro > p span { display: block; text-wrap: balance; }
.case-intro > p span + span { margin-top: .35em; }
.showcase { background: radial-gradient(ellipse at 72% 49%,#546d59 0%,#304b42 34%,#152d2b 77%); color: #f0f5ec; border-radius: 12px; overflow: hidden; }
.show-head, .show-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.2rem clamp(1rem,3.6vw,3.1rem); }
.show-head { flex-wrap: wrap; row-gap: .65rem; }
.domain, .show-foot span { font: .86rem/1.4 var(--mono); }
.switch { display: flex; gap: .2rem; padding: .2rem; border-radius: 1.5rem; background: #102523; }
.switch button { border: 0; border-radius: 1.5rem; background: transparent; color: #f3f5f2; padding: .47rem .9rem; font-size: .9rem; }
.switch button[aria-pressed=true] { background: #dde9d8; color: #17291e; }
.stage { display: grid; place-items: center; height: clamp(290px,39vw,520px); perspective: 1200px; }
.device { grid-area: 1/1; }
.device.desktop {
  position: relative;
  overflow: hidden;
  box-shadow: 0 1.6rem 2.2rem -1rem #03130fc9;
  transform: rotateY(var(--turn, 0deg)) rotateX(var(--pitch, 0deg));
  transition: transform .55s cubic-bezier(.18,.75,.25,1);
}
.tilting .desktop { transition-duration: .16s; }
.desktop::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at var(--shine-x, 50%) var(--shine-y, 50%), #ecfaff38, transparent 55%);
  opacity: 0;
  transition: opacity .3s;
}
.tilting .desktop::after { opacity: 1; }
.desktop { width: min(78%,720px); max-height: 100%; border: 4px solid #303c39; border-radius: 11px; background: #46544f; }
.chrome { height: 15px; display: flex; align-items: center; gap: 4px; padding-left: .55rem; }
.chrome b { width: 4px; height: 4px; border-radius: 100%; background: #b8c3bc; }
.device img { display: block; width: 100%; height: auto; }
.showcase[data-screen=mobile] .stage { container-type: size; height: clamp(480px,70svh,650px); }
.device.mobile { width: min(72cqw, 43cqh); --iphone-tint: #f7f6ed; }
.site-screen img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.iphone-display > .iphone-screen.site-screen { bottom: 3.9%; }
.device:not([hidden]) { animation: reveal .55s ease-out; }
@keyframes reveal { from { opacity: .3; translate: 0 12px; } }
.case-notes { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.4rem,6vw,7rem); margin-top: 2rem; }
.case-notes > div { border-top: 1px solid #aeb6bf; padding-top: 1rem; }
.case-notes h3 { font-size: 1.38rem; font-weight: 580; letter-spacing: -.035em; }
.case-notes p, .about p:not(.eyebrow) { line-height: 1.6; max-width: 44ch; margin-top: .65rem; }
.about { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem,7vw,8rem); align-items: center; padding-block: clamp(4rem,8vw,8rem); }
.about figure { height: clamp(310px,34vw,470px); border-radius: 3px; overflow: hidden; }
.about img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 14%; }
.about h2 { font-size: clamp(3rem,5vw,5.2rem); margin: .25em 0; }
.about .eyebrow { color: var(--ice); }
.about p:not(.eyebrow) { color: #c3cbd6; }
.about .primary { margin-top: 1.5rem; }
@media(max-width: 720px) {
  .wrap { width: 90%; }
  :root { --masthead-height: 60px; }
  .masthead-inner { gap: 1.1rem; }
  nav { gap: 1rem; }
  nav a, .header-contact { font-size: .88rem; }
  .hero-layout { min-height: 0; display: grid; }
  .hero-art { position: relative; grid-row: 1; inset: auto; height: clamp(245px,62vw,350px); margin: .4rem -5.5% 0 5%; }
  .hero-photo { bottom: -8%; height: 115%; width: 85%; left: 10%; }
  .halo { width: 65%; height: 46%; left: 16%; top: 28%; }
  .hero-copy { padding: 0 0 2.5rem; }
  h1 { font-size: clamp(4.4rem,14.5vw,6.2rem); }
  .eyebrow { font-size: .76rem; }
  .actions { gap: 1.1rem; margin-top: 1.4rem; }
  .case-intro { display: grid; gap: 1rem; }
  .case-intro > p { max-width: 38ch; }
  .stage { height: clamp(220px,59vw,360px); }
  .desktop { width: 89%; }
  .showcase[data-screen=mobile] .stage { height: clamp(430px,68svh,540px); }
  .show-head,.show-foot { padding: .9rem; }
  .switch button { font-size: .8rem; padding: .43rem .6rem; }
  .domain { font-size: .75rem; }
  .case-notes,.about { grid-template-columns: 1fr; }
  .about figure { height: 300px; }
}
@media(prefers-reduced-motion:reduce) {
  :root { scroll-behavior: auto; }
  *, *::after, *::before { animation: none !important; transition: none !important; }
}

/* The photograph and its numeric exposure share an exact aspect ratio. */
.hero-sequence { position: relative; }
.hero { background-color: var(--night); padding-bottom: var(--assembly-runway, 0px); }
.hero-art { transform: translateY(var(--assembly-offset, 0px)); }
.scan-portrait {
  position: absolute;
  width: min(100cqw, 70.5cqh);
  height: auto;
  aspect-ratio: 3 / 4;
  max-width: 100%;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}
.scan-portrait::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(#0c1020 75%, #11182b);
  mask: url("assets/danil-cutout.webp") center / contain no-repeat;
}
.portrait-layers {
  position: absolute;
  inset: 0;
  mask-image: linear-gradient(black 85%, transparent);
}
.scan-portrait .hero-photo, .type-portrait {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mask-image: none;
}
.scan-portrait .hero-photo { opacity: var(--photo-opacity, 1); }
.type-portrait { opacity: var(--drawing-opacity, 0); }
.hero-sequence, .case { overflow-anchor: none; }
@media (min-width: 1041px) and (min-height: 520px) {
  .hero-layout { min-height: calc(100svh - var(--masthead-height)); }
}
@media(max-width:720px) {
  .scan-portrait { width: min(100cqw, 74.25cqh); bottom: 0; }
  .hero-layout { align-content: center; }
}
@media(prefers-reduced-motion:reduce) {
  .device.desktop { transform: none; }
  .type-portrait { display:none; }
}

/* Fit the opening spread to the width of a split browser window. */
@media (max-width: 1040px) {
  .hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    gap: clamp(14px, 2.5vw, 28px);
    min-height: 0;
    align-items: center;
    padding-block: clamp(30px, 4.8vw, 56px);
  }
  .hero-copy { grid-area: 1 / 1; min-width: 0; padding: 0; }
  .hero-art {
    grid-area: 1 / 2;
    position: relative;
    inset: auto;
    margin: 0;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    overflow: visible;
  }
  .scan-portrait { width: 100%; bottom: 0; }
  .halo { left: -2%; top: 23%; width: 108%; height: 51%; }
  .hero h1 { font-size: clamp(3.6rem, 8.9vw, 6rem); }
  .actions { gap: .9rem 1.25rem; margin-top: 1.6rem; }
  .actions a { white-space: nowrap; }
  .case { padding-block-end: clamp(3rem, 6vw, 5rem); }
}
@media (max-width: 599px) {
  .hero-layout { grid-template-columns: minmax(0,1fr); padding-block: 1.75rem 0; gap: 1.1rem; }
  .hero-copy { grid-area: 1 / 1; }
  .hero-art { grid-area: 2 / 1; width: min(100%, 320px); height: clamp(224px, 69vw, 310px); justify-self: end; }
  .scan-portrait { width: min(100cqw, 75cqh); }
  .hero h1 { font-size: clamp(3.8rem, 13.6vw, 5.2rem); }
  .intro br { display: none; }
  .actions { margin-top: 1.1rem; }
}
@media (max-width: 390px) {
  .masthead-inner { gap: .7rem; }
  .masthead nav { gap: .7rem; }
  .header-contact { padding-inline: .7rem; }
}
@media (min-width: 600px) and (max-height: 560px) {
  .hero-art { height: calc(100svh - var(--masthead-height) - 2 * clamp(30px, 4.8vw, 56px)); align-self: start; }
  .scan-portrait { width: min(100cqw, 75cqh); }
}
.about .evening-portrait {
  position: relative;
  isolation: isolate;
  justify-self: center;
  width: min(100%, 450px);
  border-radius: 52% 52% 18% 4% / 45% 45% 17% 4%;
  background: #111925;
}
.evening-portrait img { display: block; filter: saturate(.76) contrast(1.06); }
.evening-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(155deg, #26375536, transparent 52%, #0c142a59);
  box-shadow: inset 0 0 0 1px #d1dbff24;
}
@media (prefers-reduced-motion: no-preference) {
  .evening-portrait.await-exposure:not(.expose) img { clip-path: circle(0% at 54% 42%); }
  .evening-portrait.expose img {
    transform-origin: 54% 42%;
    animation: develop-portrait 1.05s cubic-bezier(.2,.7,.25,1) both;
  }
  @keyframes develop-portrait {
    from { clip-path: circle(3% at 54% 42%); transform: scale(1.07); filter: grayscale(1) brightness(.66); }
    to { clip-path: circle(90% at 54% 42%); transform: scale(1); filter: saturate(.76) contrast(1.06); }
  }
}

.contact-section {
  color: #121a35;
  background: #bdcbfa;
  padding-block: clamp(3.5rem, 7vw, 7rem);
}
.contact-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: end;
  gap: clamp(2rem, 6vw, 6rem);
}
.contact-section h2 {
  font: 650 clamp(3.5rem, 7.8vw, 8rem)/.93 "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -.065em;
  margin-top: .27em;
}
.contact-section em { font-family: Georgia, serif; font-weight: 400; }
.contact-copy p { max-width: 35ch; line-height: 1.5; font-size: 1.08rem; }
.contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 1.3rem;
  padding: .9rem 1.5rem;
  border-radius: .45rem;
  color: #f2f5ff;
  background: #182242;
  font-weight: 600;
  text-decoration: none;
}
.contact-button:hover { background: #293962; }
.contact-button:focus-visible { outline-color: #242f51; }
@media(max-width:650px) {
  .contact-layout { grid-template-columns: 1fr; align-items: start; }
}

.case-detail-link { display: inline-block; margin-top: .8rem; font-weight: 550; }

.project-index {
  display: flex;
  gap: .6rem 1.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: clamp(1.6rem, 3vw, 3rem);
  padding-bottom: 1rem;
  border-bottom: 1px solid #aeb6bf;
}
.project-index a { font-size: .95rem; text-decoration-color: #8693a6; }
.project-index a:hover { color: #37498c; text-decoration-color: currentColor; }

.programs { padding-block: clamp(3.5rem, 7vw, 7rem); background: #161b29; }
.programs h2 { font: 600 clamp(2.9rem, 6.2vw, 6rem)/.98 "Helvetica Neue", Arial, sans-serif; letter-spacing: -.065em; }
.assistant-project { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.9fr); align-items: center; gap: clamp(1.6rem,5vw,5rem); }
.program-preview { height: clamp(180px, 23vw, 330px); padding: clamp(1rem, 2.4vw, 2.5rem); display: grid; place-items: center; overflow: hidden; border-radius: 8px; }
.assistant-preview { background: #b1c1c1; }
.program-preview img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 5px; box-shadow: 0 8px 30px #090c142d; min-height: 0; }
.programs .platform { margin: 1.4rem 0 .4rem; font: .84rem var(--mono); color: var(--ice); }
.programs h3 { font-size: clamp(1.8rem,3.4vw,3.5rem); line-height: 1.1; letter-spacing: -.055em; margin-bottom: .6rem; }
.assistant-project > div > p:last-child { color: #c9d1df; line-height: 1.55; max-width: 46ch; }
.assistant-project .platform { margin-top: 0; }
@media(max-width: 660px) {
  .assistant-project { grid-template-columns: minmax(0,1fr); gap: 1.3rem; }
  .program-preview { height: clamp(205px,57vw,330px); }
}

.server-experience { margin-top: 1.6rem; padding-top: 1.35rem; border-top: 1px solid #424958; }
.server-experience h3 { font-size: clamp(1.4rem, 2.2vw, 2.1rem); font-weight: 570; letter-spacing: -.035em; }
