:root {
  --ink: #000;
  --navy: #030f21;
  --hero: #031021;
  --blue: #006ab5;
  --ice: #a9e0fc;
  --paper: #ebecee;
  --muted: #a6afbe;
  --content: 1040px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: #fff;
  font-family: Inter, Arial, Helvetica, sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
button, a { font: inherit; }
button { border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
p, h1, h2, h3, ul { margin: 0; }

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  width: 100%;
  padding: 0 80px;
  border-bottom: 1px solid transparent;
  background-color: transparent;
  transition: background-color 225ms ease, border-color 225ms ease;
}
.site-header.is-scrolled { border-bottom-color: #253448; background-color: #031021; }
.header-inner {
  width: 100%;
  max-width: 1040px;
  height: 88px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-name { color: #fff; font-size: 28px; line-height: 40px; text-decoration: none; opacity: 0; pointer-events: none; transition: opacity 225ms ease; }
.site-header.is-name-visible .header-name { opacity: 1; pointer-events: auto; }
#works, #about { scroll-margin-top: calc(88px + 1px); }
.header-nav { display: flex; align-items: center; gap: 24px; }
.mobile-menu-links, .mobile-menu-actions { display: contents; }
.menu-close, .mobile-home { display: none; }
.mobile-menu-links > a:not(.header-pill) { color: #fff; padding: 8px 12px; font-size: 14px; line-height: 1; font-weight: 500; text-decoration: none; }
@media (min-width: 801px) {
  .mobile-menu-links > a:not(.header-pill):not(.mobile-home) { display: flex; align-items: center; justify-content: center; height: 36px; padding: 0 16px; border-radius: 999px; background-color: transparent; transition: background-color 200ms ease-out; }
  .mobile-menu-actions .header-pill { order: 1; }
  .mobile-menu-actions .cv-button { order: 2; }
  .header-pill { transition: background-color 200ms ease-out; }
}
@media (min-width: 801px) and (hover: hover) and (pointer: fine) {
  .mobile-menu-links > a:not(.header-pill):hover { background-color: #000000; }
  .header-pill:hover { background-color: #E5E5E5; }
}
.header-pill { display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 16px; border: 1px solid #ffffffcc; border-radius: 999px; background: #fff; color: #000; font-size: 14px; font-weight: 500; text-decoration: none; }
.menu-toggle { display: none; background: none; padding: 9px; }
.menu-toggle span { display: block; width: 16px; height: 2px; margin: 3px 0; border-radius: 2px; background: #fff; }

.hero { position: relative; min-height: 628px; padding: 168px 80px 80px; overflow: hidden; background: var(--hero); }
@property --glow-offset-x {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 0%;
}
@property --glow-offset-y {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 0%;
}
.hero-glow {
  --glow-center-x: 56%;
  --glow-center-y: 61%;
  --glow-radius-x: 34%;
  --glow-radius-y: 65%;
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse var(--glow-radius-x) var(--glow-radius-y) at
      calc(var(--glow-center-x) + var(--glow-offset-x))
      calc(var(--glow-center-y) + var(--glow-offset-y)),
    #135181 0%,
    rgb(19 81 129 / 90%) 35%,
    rgb(19 81 129 / 55%) 62%,
    rgb(19 81 129 / 20%) 82%,
    rgb(19 81 129 / 0%) 100%
  );
  opacity: .88;
  animation: ambient-glow-drift 18s linear infinite;
}
@keyframes ambient-glow-drift {
  0%, 100% { --glow-offset-x: 15%; --glow-offset-y: 0%; }
  6.25% { --glow-offset-x: 13.9%; --glow-offset-y: 4.6%; }
  12.5% { --glow-offset-x: 10.6%; --glow-offset-y: 8.5%; }
  18.75% { --glow-offset-x: 5.7%; --glow-offset-y: 11.1%; }
  25% { --glow-offset-x: 0%; --glow-offset-y: 12%; }
  31.25% { --glow-offset-x: -5.7%; --glow-offset-y: 11.1%; }
  37.5% { --glow-offset-x: -10.6%; --glow-offset-y: 8.5%; }
  43.75% { --glow-offset-x: -13.9%; --glow-offset-y: 4.6%; }
  50% { --glow-offset-x: -15%; --glow-offset-y: 0%; }
  56.25% { --glow-offset-x: -13.9%; --glow-offset-y: -4.6%; }
  62.5% { --glow-offset-x: -10.6%; --glow-offset-y: -8.5%; }
  68.75% { --glow-offset-x: -5.7%; --glow-offset-y: -11.1%; }
  75% { --glow-offset-x: 0%; --glow-offset-y: -12%; }
  81.25% { --glow-offset-x: 5.7%; --glow-offset-y: -11.1%; }
  87.5% { --glow-offset-x: 10.6%; --glow-offset-y: -8.5%; }
  93.75% { --glow-offset-x: 13.9%; --glow-offset-y: -4.6%; }
}
.hero-inner { position: relative; max-width: var(--content); margin: 0 auto; display: grid; grid-template-columns: 1fr 380px; align-items: center; gap: 64px; }
.hero-copy { order: -1; display: flex; flex-direction: column; gap: 32px; }
.hero-photo { width: 380px; aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
.hero h1 { font-size: 28px; line-height: 40px; font-weight: 400; }
.hero h1 span { color: var(--ice); }
.hero-focus { display: flex; align-items: center; gap: 4px; width: fit-content; height: 1lh; font-size: 28px; line-height: 40px; white-space: nowrap; }
.caret { width: 1px; height: 26px; flex-shrink: 0; background: var(--ice); }
.hero-focus.is-paused .caret { animation: typewriter-caret-blink 1s step-end infinite; }
@keyframes typewriter-caret-blink { 50% { opacity: 0; } }
.hero-description { max-width: 596px; margin-bottom: 20px; font-size: 20px; line-height: 1.625; }
.audience-tags { display: flex; flex-wrap: wrap; gap: 12px 8px; padding: 0; list-style: none; }
.audience-tags li { padding: 8px 12px; border-radius: 100px; box-shadow: inset 1px 1px 1px #2d3945; background: #1d2633cc; color: #93a5b8; font-size: 16px; line-height: 18px; font-weight: 500; }

.work-section { padding: 80px; }
.work-dark { background: #000; color: #fff; }
.work-light { background: var(--paper); color: #000; }
.section-inner { max-width: var(--content); margin: 0 auto; display: flex; flex-direction: column; gap: 40px; }
.company-heading { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { flex: 0 0 auto; object-fit: contain; object-position: left center; }
.crypto-logo { width: 204px; height: 36px; }
.t-logo { width: 192px; height: 58px; object-fit: cover; }
.rutube-logo { width: 225px; height: 38px; }
.platforms { display: flex; flex-wrap: wrap; gap: 12px; }
.platforms span { height: 40px; padding: 8px 16px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #ffffff26; border-radius: 999px; background: #ffffff0d; color: #ffffffe6; font-size: 16px; line-height: 23px; font-weight: 500; }
.work-light .platforms span { border-color: #00000026; background: #0000000d; color: #000000e6; }
.project { display: flex; flex-direction: column; gap: 32px; }
.project-image { width: 100%; object-fit: cover; }
.wide-image { aspect-ratio: 1040 / 524; }
.rounded { border-radius: 40px; }
.project-image-zoom { overflow: hidden; border-radius: 40px; cursor: pointer; }
@media (hover: hover) and (pointer: fine) {
  .project-image-zoom .project-image { transition: transform 550ms cubic-bezier(0.22, 1, 0.36, 1); }
  .project-image-zoom:hover .project-image { transform: scale(1.05); }
}
.project-info { display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; }
.project-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 32px; }
.project-copy p { max-width: 790px; font-size: 20px; line-height: 28px; }
.date { width: 207px; flex: 0 0 207px; color: #ffffff80; font-size: 20px; line-height: 28px; text-align: right; white-space: nowrap; }
.date span { color: #fff; }
.work-light .date { color: #00000080; }
.work-light .date span { color: #000; }
.case-button { padding: 16px 24px; border-radius: 24px; background: var(--blue); color: #fff; font-size: 16px; line-height: 19px; font-weight: 500; cursor: pointer; transition: background-color 200ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1); }
@media (hover: hover) and (pointer: fine) {
  .case-button:hover { background-color: #005a9a; }
}
.case-button:active { transform: scale(0.97); transition: background-color 200ms ease, transform 120ms ease-out; }
.separator { width: 100%; height: 1px; margin: 24px 0; background: #ffffff33; }
.work-light .separator { background: #00000033; }
.rutube-section { padding-bottom: 80px; }

.about { padding: 80px; background: var(--navy); }
.about-inner { max-width: var(--content); margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.about h2 { font-size: 40px; line-height: 1.25; }
.hobbies { display: flex; flex-direction: column; gap: 24px; }
.hobby-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.hobby-card { min-height: 528px; padding: 20px; border-radius: 24px; background: #1a1f22; display: flex; flex-direction: column; gap: 16px; }
.hobby-visual { width: 100%; aspect-ratio: 1; border-radius: 12px; background: #13110e; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.hobby-visual img { width: 66%; height: 83%; object-fit: contain; }
.hobby-visual .metallica { width: 97%; height: auto; }
.hobby-visual.tarot { background: #101114; }
.hobby-visual.tarot img { width: 80%; height: 87%; }
.hobby-card h3 { color: #f8f8f8; font-size: 20px; line-height: 28px; font-weight: 400; }
.hobby-card p { color: var(--muted); font-size: 14px; line-height: 20px; }
.education { padding: 40px 0; display: flex; flex-direction: column; gap: 16px; }
.education h2 { margin-bottom: 8px; }
.education p { font-size: 20px; line-height: 28px; }
.education .muted { color: var(--muted); }

footer { padding: 32px 80px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #ffffff80; font-size: 14px; line-height: 1; }
footer span, footer a { color: #ffffffb3; text-decoration: none; }

@media (max-width: 800px) {
  body.menu-open { position: fixed; inset-inline: 0; width: 100%; overflow: hidden; }
  .site-header { height: 50px; padding: 0 8px 0 20px; }
  #works, #about { scroll-margin-top: 50px; }
  .header-inner { height: 50px; max-width: none; }
  .header-name { font-size: 14px; line-height: 1; font-weight: 500; }
  .menu-toggle { display: block; width: 34px; height: 34px; }
  .header-nav { position: fixed; z-index: 1; inset: 0; width: 100%; height: 100dvh; padding: calc(12px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left)); border: 0; border-radius: 0; background: transparent; flex-direction: column; align-items: stretch; gap: 12px; overflow-y: auto; visibility: hidden; pointer-events: none; transition: visibility 0s linear 250ms; }
  .header-nav::before { content: ''; position: fixed; z-index: 0; inset: 0; background: rgba(3, 16, 33, 0.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); opacity: 0; transition: opacity 250ms ease-out; }
  .header-nav > .menu-close, .header-nav > .mobile-menu-links, .header-nav > .mobile-menu-actions { position: relative; z-index: 1; opacity: 0; transition: opacity 250ms ease-out; }
  .header-nav.is-open { visibility: visible; pointer-events: auto; transition: visibility 0s; }
  .header-nav.is-open::before, .header-nav.is-open > .menu-close, .header-nav.is-open > .mobile-menu-links, .header-nav.is-open > .mobile-menu-actions { opacity: 1; }
  .menu-close { display: inline-flex; align-items: center; justify-content: center; align-self: flex-end; height: 52px; padding: 0 16px; border: 1px solid rgba(255,255,255,0.10); border-radius: 999px; background: #111b2a; color: #fff; font-size: 16px; font-weight: 500; }
  .mobile-menu-links { display: flex; flex-direction: column; padding: 8px 0; border: 1px solid rgba(255,255,255,0.10); border-radius: 24px; background: #111b2a; }
  .mobile-menu-links > a:not(.header-pill) { display: flex; align-items: center; min-height: 60px; padding: 14px 20px; color: #fff; font-size: 16px; line-height: 32px; font-weight: 400; text-decoration: none; }
  .mobile-home { display: flex; }
  .mobile-menu-actions { display: flex; flex-direction: column; gap: 12px; }
  .mobile-menu-actions .header-pill { width: 100%; height: 52px; margin: 0; border: 1px solid rgba(255,255,255,0.10); border-radius: 18px; background: #111b2a; color: #fff; font-size: 16px; }

  .hero { min-height: 529px; padding: 64px 16px 40px; }
  .hero-glow { --glow-center-x: 62%; --glow-center-y: 66%; --glow-radius-x: 107%; --glow-radius-y: 67%; }
  .hero-inner { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
  .hero-photo { width: 100px; height: 100px; order: -2; }
  .hero-copy { width: 100%; order: initial; gap: 20px; }
  .hero h1, .hero-focus { font-size: 24px; line-height: 32px; }
  .caret { height: 22px; }
  .hero-description { margin-bottom: 20px; font-size: 16px; line-height: 1.4; }
  .audience-tags li { font-size: 12px; line-height: 14px; }

  .work-section { padding: 40px 0; }
  .section-inner { gap: 24px; }
  .company-heading { min-height: 32px; padding: 0 16px; gap: 12px; }
  .crypto-logo { width: 136px; height: 24px; }
  .t-logo { width: 130px; height: 40px; }
  .rutube-logo { width: 145px; height: 25px; }
  .platforms { flex-wrap: nowrap; gap: 8px; }
  .platforms span { height: 32px; padding: 8px 12px; font-size: 12px; line-height: 14px; }
  .project { gap: 24px; }
  .project picture { width: 100%; }
  .project-image { width: 100%; border-radius: 0; }
  .project-image-zoom { border-radius: 0; }
  .wide-image { aspect-ratio: 375 / 189; }
  .tall-mobile { width: calc(100% - 32px); margin: 0 16px; height: auto; object-fit: contain; }
  .project-info { padding: 0 16px; flex-direction: column; gap: 16px; }
  .project-copy { width: 100%; gap: 24px; }
  .project-copy p { font-size: 16px; line-height: 1.4; }
  .date { order: -1; width: 180px; flex-basis: auto; font-size: 16px; line-height: 24px; text-align: left; }
  .project-copy:has(.case-button) + .date { order: -1; }
  .project-info:has(.case-button) .date { order: 0; }
  .project-info:has(.case-button) { gap: 16px; }
  .project-info:has(.case-button) .project-copy { display: contents; }
  .project-info:has(.case-button) .project-copy p { order: 0; }
  .project-info:has(.case-button) .date { order: 1; }
  .project-info:has(.case-button) .case-button { order: 2; width: 100%; }
  .case-button { padding: 14px 20px; font-size: 14px; line-height: 16px; }
  .separator { margin: 16px 0; }

  .about { padding: 40px 16px; }
  .about h2 { font-size: 24px; }
  .hobby-grid { display: flex; flex-direction: column; gap: 20px; }
  .hobby-card { min-height: 0; }
  .education { padding: 40px 0 0; }
  .education p { font-size: 16px; line-height: 1.4; }

  footer { padding: 24px 16px; font-size: 12px; }
}

@media (min-width: 801px) and (max-width: 1100px) {
  .site-header, .hero, .work-section, .about { padding-left: 48px; padding-right: 48px; }
  .hero-inner { grid-template-columns: minmax(0, 1fr) minmax(280px, 34vw); gap: 40px; }
  .hero-photo { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .site-header { transition: none; }
  .header-name { transition: none; }
  .mobile-menu-links > a { transition: none; }
  .header-nav { transition: none; }
  .header-nav::before, .header-nav > .menu-close, .header-nav > .mobile-menu-links, .header-nav > .mobile-menu-actions { transition: none; }
  .hero-focus.is-paused .caret { animation: none; }
  .hero-glow { animation: none; }
  .project-image-zoom .project-image { transition: none; }
  .project-image-zoom:hover .project-image { transform: none; }
  .case-button { transition: none; }
  .case-button:active { transform: none; }
}
