:root {
  color-scheme: dark;
  --bg: #0a0a12;
  --bg2: #0e0e1a;
  --card: rgba(255, 255, 255, .035);
  --line: rgba(255, 255, 255, .09);
  --tx: #f2f1fa;
  --tx2: rgba(242, 241, 250, .64);
  --tx3: rgba(242, 241, 250, .38);
  --a1: #7c5cff;
  --a2: #00e5c0;
  --glow1: rgba(124, 92, 255, .35);
  --glow2: rgba(0, 229, 192, .25);
  --font-display: 'Unbounded', sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f1f1f7;
  --bg2: #e7e7f0;
  --card: rgba(255, 255, 255, .72);
  --line: rgba(21, 18, 40, .13);
  --tx: #141220;
  --tx2: rgba(20, 18, 32, .72);
  --tx3: rgba(20, 18, 32, .46);
  --a1: #5b3df5;
  --a2: #00806c;
  --glow1: rgba(91, 61, 245, .2);
  --glow2: rgba(0, 128, 108, .16);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--a1) transparent;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background-color: var(--a1);
  background-image: linear-gradient(180deg, var(--a1), var(--a2));
  background-clip: padding-box;
  border: 1px solid var(--bg);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background-image: linear-gradient(180deg, var(--a2), var(--a1)); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--tx);
  font-family: var(--font-body);
  overflow-x: hidden;
  transition: background .4s, color .4s;
}

a { color: var(--tx); text-decoration: none; }
a:hover { color: var(--a2); }
::selection { background: var(--a1); color: #fff; }

button { font: inherit; }

[data-lang] { display: inline; }
html[lang="ru"] [data-lang="en"] { display: none; }
html[lang="en"] [data-lang="ru"] { display: none; }

[data-reveal] { opacity: 0; }

@keyframes rise { from { opacity: 0; transform: translateY(34px); } to { opacity: 1; transform: none; } }
@keyframes wordIn { 0% { opacity: 0; transform: translateY(95%) rotate(3deg); } 100% { opacity: 1; transform: none; } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }
@keyframes blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }

/* background canvas + scroll progress */

.bg-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 40;
  transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--a1), var(--a2));
}

/* nav */

.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center; gap: 20px;
  padding: 13px 26px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: color-mix(in oklab, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--line);
}

.brand { font-family: var(--font-mono); font-weight: 700; font-size: 14px; }
.brand .caret { color: var(--a2); animation: blink 1.1s steps(1, end) infinite; }

.nav-links { display: flex; gap: 22px; margin-left: auto; flex-wrap: wrap; }
.nav-link {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--tx2);
}
.nav-link:hover { color: var(--a2); }

.nav-actions { display: flex; gap: 8px; }

.btn-lang, .btn-theme {
  font-family: var(--font-mono); font-weight: 700;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--tx2); cursor: pointer; transition: all .25s;
}
.btn-lang { font-size: 11px; letter-spacing: .08em; }
.btn-lang:hover { border-color: var(--a2); color: var(--a2); }
.btn-theme { font-size: 13px; line-height: 1; padding: 6px 11px; }
.btn-theme:hover { border-color: var(--a1); color: var(--a1); }

@media (max-width: 625px) {
  .nav-links { display: none; }
  .nav-actions { margin-left: auto; }
}

/* hero */

.hero {
  position: relative; z-index: 1; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 120px 24px 60px;
  background:
    radial-gradient(ellipse 60% 45% at 50% 38%, var(--glow1), transparent 70%),
    radial-gradient(ellipse 45% 35% at 72% 70%, var(--glow2), transparent 70%);
}

.hero__eyebrow {
  margin: 0 0 26px; display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--tx3);
  animation: rise .8s .05s cubic-bezier(.2, .7, .2, 1) both;
}
.hero__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--a2); animation: pulse 2.4s infinite; }

.hero__name {
  margin: 0 0 14px; font-family: var(--font-mono); font-size: 13px; letter-spacing: .06em;
  color: var(--tx2); animation: rise .8s .1s cubic-bezier(.2, .7, .2, 1) both;
}

.hero__title {
  margin: 0; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(38px, 6.5vw, 92px); line-height: 1.08; letter-spacing: -0.01em;
}
.hero__line { display: block; }
.hero__line:nth-child(1) { animation: rise .9s .15s cubic-bezier(.2, .7, .2, 1) both; }
.hero__line:nth-child(2) { animation: rise .9s .3s cubic-bezier(.2, .7, .2, 1) both; }
.hero__word-line { overflow: hidden; padding-bottom: .1em; animation: rise .9s .45s cubic-bezier(.2, .7, .2, 1) both; }

.hero__word {
  display: inline-block;
  animation: wordIn .55s cubic-bezier(.2, .7, .2, 1) both;
  background: linear-gradient(92deg, var(--a1), var(--a2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: .06em;
}

.hero__desc {
  margin: 30px 0 0; max-width: 600px; font-size: 17.5px; line-height: 1.65; color: var(--tx2);
  animation: rise .9s .6s cubic-bezier(.2, .7, .2, 1) both;
}

.hero__ctas {
  display: flex; gap: 44px; margin-top: 46px; flex-wrap: wrap; justify-content: center;
  animation: rise .9s .75s cubic-bezier(.2, .7, .2, 1) both;
}
.hero__cta {
  display: inline-flex; align-items: center; gap: 12px; padding: 10px 2px;
  font-family: var(--font-mono); font-size: 13px; font-weight: 500; letter-spacing: .16em;
  text-transform: uppercase; color: var(--tx);
  border-bottom: 1.5px solid var(--accent);
  transition: gap .3s, color .3s;
}
.hero__cta:hover { gap: 20px; color: var(--accent); }
.hero__cta-mark { color: var(--accent); }

.hero__scroll {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--tx3);
}
.hero__scroll-arrow { display: inline-block; animation: bob 1.8s ease-in-out infinite; }

/* marquee */

.marquee {
  position: relative; z-index: 1;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: color-mix(in oklab, var(--bg2) 80%, transparent);
  overflow: hidden; padding: 16px 0;
}
.marquee__track { display: flex; gap: 56px; width: max-content; animation: marquee 30s linear infinite; }
.marquee__group {
  display: flex; gap: 56px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--tx3); white-space: nowrap;
}
.marquee__group .dot-a1 { color: var(--a1); }
.marquee__group .dot-a2 { color: var(--a2); }

/* shared section header */

.section { position: relative; z-index: 1; padding: 100px 24px 60px; }
.section--principles, .section--contact { padding-top: 120px; }
.section__inner { max-width: 1160px; margin: 0 auto; display: flex; flex-direction: column; gap: 44px; }
.section__head { display: flex; flex-direction: column; gap: 12px; }
.eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--a2); }
.section__title {
  margin: 0; font-family: var(--font-display); font-weight: 600;
  font-size: clamp(26px, 3.4vw, 44px); line-height: 1.15;
}
.section__desc { margin: 0; max-width: 560px; font-size: 15.5px; line-height: 1.6; color: var(--tx2); }

/* principles */

.principles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.principle-card {
  display: flex; flex-direction: column; gap: 18px; padding: 34px 30px;
  border: 1px solid var(--line); border-radius: 22px; background: var(--card);
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), border-color .35s, box-shadow .35s;
}
.principle-card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 24px 60px -28px var(--glow); }
.principle-card__index {
  font-family: var(--font-mono); font-size: 13px;
  background: linear-gradient(92deg, var(--a1), var(--a2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.principle-card__title { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 24px; }
.principle-card__desc { margin: 0; font-size: 14.5px; line-height: 1.65; color: var(--tx2); }

/* projects */

.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.project-card {
  display: flex; flex-direction: column; gap: 16px; padding: 26px;
  border: 1px solid var(--line); border-radius: 20px; background: var(--card);
  color: var(--tx);
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), border-color .35s, box-shadow .35s;
}
.project-card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: 0 24px 60px -24px var(--glow); color: var(--tx); }
.project-card__head { display: flex; align-items: center; gap: 14px; }
.project-card__icon {
  width: 52px; height: 52px; flex: none; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 15px; color: #fff;
  position: relative; overflow: hidden; background: var(--logo-grad);
}
.project-card__icon--sm { font-size: 14px; }
.project-card__icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--bg2); }
.project-card__meta { display: flex; flex-direction: column; gap: 2px; }
.project-card__name { font-family: var(--font-display); font-size: 15px; font-weight: 600; }
.project-card__domain { font-family: var(--font-mono); font-size: 11px; color: var(--tx3); }
.project-card__arrow { margin-left: auto; font-size: 18px; color: var(--tx3); }
.project-card__desc { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--tx2); }
.project-card__tags {
  margin-top: auto; font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--tx3);
}

/* about */

.about-grid { display: grid; grid-template-columns: minmax(320px, 1fr) auto; gap: 48px; align-items: start; }
.about__lead { display: flex; flex-direction: column; gap: 20px; }
.about__text { margin: 0; font-size: 16px; line-height: 1.7; color: var(--tx2); }
.about__facts { display: flex; flex-direction: column; gap: 10px; }
.about__fact { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; color: var(--tx2); }
.about__side { display: flex; flex-direction: column; gap: 28px; }

@media (max-width: 720px) {
  .about-grid { grid-template-columns: 1fr; }
}

.stats-grid { display: grid; grid-template-columns: repeat(2, 128px); gap: 16px; }
.stat-card {
  box-sizing: border-box;
  display: flex; flex-direction: column; gap: 6px; padding: 18px 14px;
  border: 1px solid var(--line); border-radius: 18px; background: var(--card);
}
.stat-card__num {
  font-family: var(--font-display); font-weight: 800; font-size: 30px;
  background: linear-gradient(92deg, var(--a1), var(--a2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-card__label { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--tx3); white-space: nowrap; }

.badges { display: flex; flex-direction: column; gap: 16px; }
.badges__row { display: flex; gap: 16px; flex-wrap: wrap; }
.badge-img { display: block; width: 128px; transition: transform .3s cubic-bezier(.2, .7, .2, 1); }
.badge-img:hover { transform: translateY(-4px); }
.badge-img img { display: block; width: 100%; height: auto; }
.badges__edu { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; color: var(--tx2); }
.badge__tag {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  padding: 3px 7px; border-radius: 6px; color: #fff;
  background: linear-gradient(92deg, var(--a1), var(--a2));
}

/* contact */

.contact__inner {
  opacity: 0; max-width: 760px; margin: 0 auto; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  padding: 56px 48px; border: 1px solid var(--line); border-radius: 28px; background: var(--card);
}
.contact__title {
  margin: 0; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(30px, 4.6vw, 58px); line-height: 1.12;
}
.contact__accent {
  background: linear-gradient(92deg, var(--a1), var(--a2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.contact__desc { margin: 0; font-size: 16px; line-height: 1.65; color: var(--tx2); }

.contact__list {
  display: flex; flex-direction: column; width: 100%; max-width: 640px;
  margin-top: 20px; border-top: 1px solid var(--line); text-align: left;
}
.contact__row {
  display: flex; align-items: center; gap: 18px; padding: 22px 4px;
  border-bottom: 1px solid var(--line); color: var(--tx);
  transition: padding-left .35s cubic-bezier(.2, .7, .2, 1), color .3s, border-color .3s;
}
.contact__row:hover { padding-left: 20px; }
.contact__row--a1:hover { color: var(--a1); border-color: var(--a1); }
.contact__row--a2:hover { color: var(--a2); border-color: var(--a2); }
.contact__icon { width: 22px; height: 22px; flex: none; color: var(--tx3); }
.contact__value { font-family: var(--font-display); font-size: clamp(14px, 2.6vw, 20px); font-weight: 600; }
.contact__arrow { margin-left: auto; color: var(--tx3); font-size: 16px; }

/* footer */

.footer {
  position: relative; z-index: 1; border-top: 1px solid var(--line); padding: 30px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
}
.footer__line { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em; color: var(--tx2); }
.footer__line--muted { font-size: 11px; letter-spacing: .1em; color: var(--tx3); }
