:root {
  --bg: #09090b;
  --surface: rgba(255,255,255,.055);
  --surface-strong: rgba(255,255,255,.085);
  --border: rgba(255,255,255,.1);
  --text: #f7f7f8;
  --muted: #a1a1aa;
  --accent-a: #8b5cf6;
  --accent-b: #22d3ee;
  --accent-c: #f472b6;
  --max: 1180px;
  --radius: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% -10%, rgba(139, 92, 246, .2), transparent 28%),
    radial-gradient(circle at 90% 20%, rgba(34, 211, 238, .09), transparent 26%),
    var(--bg);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.cursor-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,.1), rgba(34,211,238,.035) 38%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: -1;
  transition: opacity .2s ease;
}

.section-shell,
.site-header {
  width: min(calc(100% - 40px), var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 16px;
  z-index: 50;
  height: 68px;
  margin-top: 16px;
  padding: 0 14px 0 18px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border: 1px solid var(--border);
  background: rgba(13,13,16,.72);
  backdrop-filter: blur(20px) saturate(150%);
  border-radius: 18px;
  box-shadow: 0 16px 45px rgba(0,0,0,.18);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  letter-spacing: -.03em;
  width: fit-content;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #a78bfa, #22d3ee);
  color: #07070a;
  font-weight: 900;
  box-shadow: 0 0 30px rgba(139,92,246,.22);
}

.nav { display: flex; gap: 30px; }
.nav a,
.github-link {
  color: #c9c9cf;
  font-size: 14px;
  font-weight: 600;
  transition: .2s ease;
}
.nav a:hover,
.github-link:hover { color: white; }
.github-link { justify-self: end; display: inline-flex; gap: 7px; align-items: center; }

.hero {
  position: relative;
  min-height: calc(100vh - 100px);
  padding: 120px 0 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-badge {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #c8c8ce;
  background: rgba(255,255,255,.035);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .02em;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 14px #4ade80;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 50px;
  margin-top: 28px;
}

.hero h1 {
  margin: 0;
  max-width: 800px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(56px, 7.2vw, 104px);
  line-height: .92;
  letter-spacing: -.065em;
  font-weight: 800;
}

.gradient-text {
  background: linear-gradient(90deg, #b9a5ff 3%, #72e8ff 46%, #ffa6d3 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-text {
  margin: 28px 0 0;
  max-width: 650px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.65;
}

.hero-actions { display: flex; gap: 12px; margin-top: 38px; flex-wrap: wrap; }
.button {
  min-height: 52px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border-radius: 14px;
  font-weight: 750;
  font-size: 14px;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary { background: #f4f4f5; color: #09090b; }
.button-primary:hover { background: white; }
.button-ghost { border: 1px solid var(--border); color: #d8d8dd; background: rgba(255,255,255,.035); }
.button-ghost:hover { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.06); }

.hero-art {
  position: relative;
  height: 480px;
  isolation: isolate;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(4px);
}
.orb-a {
  width: 280px;
  height: 280px;
  left: 65px;
  top: 76px;
  background: radial-gradient(circle at 35% 35%, #c4b5fd, #7c3aed 46%, #312e81 78%, transparent 79%);
  box-shadow: 0 0 90px rgba(124,58,237,.35);
}
.orb-b {
  width: 170px;
  height: 170px;
  right: 20px;
  bottom: 65px;
  background: radial-gradient(circle at 35% 35%, #a5f3fc, #0891b2 50%, #164e63 76%, transparent 77%);
  opacity: .65;
  filter: blur(2px);
}

.floating-card {
  position: absolute;
  z-index: 3;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(15,15,20,.7);
  backdrop-filter: blur(18px);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.card-code {
  top: 35px;
  right: 0;
  width: min(330px, 86%);
  padding: 16px 18px 18px;
  transform: rotate(4deg);
  animation: floatA 6s ease-in-out infinite;
}
.card-code code { display: block; color: #d6d3d1; font-size: 12px; line-height: 1.9; }
.card-code code span { color: #a78bfa; }
.card-code code em { color: #67e8f9; font-style: normal; }
.window-dots { display: flex; gap: 5px; margin-bottom: 12px; }
.window-dots i { width: 7px; height: 7px; border-radius: 50%; background: #5f5f68; }
.card-stat {
  left: 10px;
  bottom: 70px;
  width: 185px;
  padding: 18px;
  transform: rotate(-5deg);
  animation: floatB 7s ease-in-out infinite;
}
.card-stat span { color: #a1a1aa; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.card-stat strong { display: block; margin-top: 5px; font-family: "Manrope"; font-size: 44px; line-height: 1; }
.spark { position: absolute; font-size: 28px; color: #d8b4fe; text-shadow: 0 0 25px rgba(216,180,254,.7); }
.spark-1 { left: 3px; top: 92px; }
.spark-2 { right: 50px; top: 250px; font-size: 16px; color: #67e8f9; }

.scroll-line {
  position: absolute;
  bottom: 28px;
  left: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #666671;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .16em;
}
.scroll-line i { width: 70px; height: 1px; background: linear-gradient(90deg, #555, transparent); }

.projects-section { padding: 90px 0 80px; }
.section-heading {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: end;
  margin-bottom: 36px;
}
.eyebrow {
  display: block;
  color: #7f7f89;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  margin-bottom: 12px;
}
.section-heading h2,
.manifesto h2,
.cta h2 {
  margin: 0;
  font-family: "Manrope";
  letter-spacing: -.045em;
  font-size: clamp(40px, 6vw, 74px);
  line-height: 1;
}
.section-heading p { margin: 0; color: var(--muted); line-height: 1.65; max-width: 520px; justify-self: end; }
.section-heading code { color: #d8b4fe; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.project-card {
  position: relative;
  grid-column: span 6;
  min-height: 360px;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.035);
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.project-card:nth-child(3n) { grid-column: span 12; min-height: 320px; }
.project-card:only-child { grid-column: span 12; min-height: 340px; }
.project-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.055); }
.project-card a { position: absolute; inset: 0; z-index: 5; }
.project-visual { position: absolute; inset: 0; overflow: hidden; }
.project-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(8,8,10,.25) 58%, rgba(8,8,10,.95) 100%);
}
.project-gradient {
  position: absolute;
  width: 80%;
  aspect-ratio: 1;
  border-radius: 50%;
  top: -34%;
  right: -12%;
  filter: blur(8px);
  opacity: .75;
}
.project-pattern {
  position: absolute;
  inset: 0;
  opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.22) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.22) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}
.project-meta {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 24px;
  z-index: 3;
}
.project-topline { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.project-tag { padding: 7px 10px; border: 1px solid rgba(255,255,255,.14); border-radius: 999px; color: #d8d8dd; font-size: 10px; font-weight: 800; letter-spacing: .12em; background: rgba(0,0,0,.2); backdrop-filter: blur(12px); }
.project-arrow { font-size: 22px; transition: transform .2s ease; }
.project-card:hover .project-arrow { transform: translate(4px,-4px); }
.project-title { margin: 0; font-family: "Manrope"; font-size: clamp(28px, 4vw, 43px); letter-spacing: -.045em; }
.project-desc { margin: 8px 0 0; color: #b2b2bb; max-width: 610px; line-height: 1.55; }
.empty-state { grid-column: 1 / -1; padding: 54px; border: 1px dashed rgba(255,255,255,.14); border-radius: var(--radius); text-align: center; color: var(--muted); }

.manifesto { padding: 90px 0; }
.manifesto-card {
  padding: clamp(28px, 5vw, 64px);
  border: 1px solid var(--border);
  border-radius: 36px;
  background:
    radial-gradient(circle at 100% 0, rgba(139,92,246,.18), transparent 28%),
    linear-gradient(135deg, rgba(255,255,255,.055), rgba(255,255,255,.025));
}
.manifesto-kicker { color: #7f7f89; font-size: 11px; font-weight: 800; letter-spacing: .18em; margin-bottom: 46px; }
.manifesto-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 55px; }
.manifesto h2 { font-size: clamp(42px, 5.4vw, 70px); }
.manifesto h2 span { color: #a78bfa; }
.manifesto-copy { color: #aaaab3; font-size: 17px; line-height: 1.7; }
.manifesto-copy p { margin-top: 0; }
.principles { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 56px; }
.principles article { padding: 24px 20px; border-top: 1px solid var(--border); }
.principles span { color: #73737d; font-size: 11px; }
.principles h3 { margin: 20px 0 8px; font-size: 16px; }
.principles p { margin: 0; color: #8f8f99; font-size: 13px; line-height: 1.6; }

.cta { padding: 70px 0 110px; }
.cta-inner {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 7vw, 80px);
  border-radius: 36px;
  text-align: center;
  background: #f4f4f5;
  color: #0a0a0d;
}
.cta-inner::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  right: -120px;
  top: -170px;
  background: radial-gradient(circle, rgba(139,92,246,.32), rgba(34,211,238,.08), transparent 70%);
}
.cta .eyebrow { color: #6b6b73; }
.cta h2 { position: relative; z-index: 1; font-size: clamp(38px, 5vw, 68px); }
.cta p { position: relative; z-index: 1; color: #66666e; margin: 18px auto 28px; max-width: 620px; }
.button-light { position: relative; z-index: 1; background: #0b0b0f; color: white; }

.footer {
  min-height: 120px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  color: #777781;
  font-size: 12px;
}
.footer p { margin: 0; text-align: center; }
.footer > a:last-child { justify-self: end; }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: .08s; }
.delay-2 { transition-delay: .16s; }
.delay-3 { transition-delay: .24s; }

@keyframes floatA { 0%,100% { transform: rotate(4deg) translateY(0); } 50% { transform: rotate(2.5deg) translateY(-12px); } }
@keyframes floatB { 0%,100% { transform: rotate(-5deg) translateY(0); } 50% { transform: rotate(-3deg) translateY(10px); } }

@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr auto; }
  .nav { display: none; }
  .hero { padding-top: 92px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { height: 380px; width: min(100%, 560px); margin: -10px auto 0; }
  .section-heading, .manifesto-grid { grid-template-columns: 1fr; }
  .section-heading p { justify-self: start; }
  .principles { grid-template-columns: 1fr; }
  .project-card, .project-card:nth-child(3n) { grid-column: span 12; min-height: 330px; }
}

@media (max-width: 600px) {
  .section-shell, .site-header { width: min(calc(100% - 24px), var(--max)); }
  .site-header { height: 60px; top: 8px; margin-top: 8px; }
  .brand { font-size: 14px; }
  .brand-mark { width: 29px; height: 29px; border-radius: 9px; }
  .github-link { font-size: 12px; }
  .hero { min-height: auto; padding: 92px 0 90px; }
  .hero h1 { font-size: clamp(50px, 16vw, 72px); }
  .hero-text { font-size: 16px; }
  .hero-actions { display: grid; }
  .button { width: 100%; }
  .hero-art { height: 320px; margin-top: 12px; }
  .orb-a { width: 220px; height: 220px; left: 32px; top: 62px; }
  .orb-b { width: 130px; height: 130px; right: 4px; bottom: 38px; }
  .card-code { width: 280px; max-width: 88%; }
  .card-stat { width: 155px; bottom: 35px; }
  .card-stat strong { font-size: 36px; }
  .scroll-line { display: none; }
  .projects-section, .manifesto { padding: 65px 0; }
  .project-card, .project-card:nth-child(3n) { min-height: 320px; border-radius: 22px; }
  .project-meta { left: 20px; right: 20px; bottom: 20px; }
  .manifesto-card, .cta-inner { border-radius: 24px; }
  .manifesto-kicker { margin-bottom: 28px; }
  .footer { grid-template-columns: 1fr auto; padding: 28px 0; }
  .footer p { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Контакты */
.contacts { padding: 40px 0 70px; }
.contacts-card {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 48px;
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid var(--border);
  border-radius: 32px;
  background:
    radial-gradient(circle at 0 100%, rgba(34,211,238,.12), transparent 30%),
    radial-gradient(circle at 100% 0, rgba(244,114,182,.09), transparent 28%),
    rgba(255,255,255,.035);
}
.contacts h2 {
  margin: 0;
  font-family: "Manrope";
  font-size: clamp(40px, 5vw, 66px);
  line-height: 1;
  letter-spacing: -.045em;
}
.contacts-card > div:first-child > p {
  margin: 20px 0 0;
  max-width: 520px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}
.contact-actions { display: grid; gap: 12px; align-content: center; }
.contact-link {
  position: relative;
  min-height: 102px;
  padding: 20px 58px 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255,255,255,.035);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.contact-link:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.06);
}
.contact-label {
  margin-bottom: 7px;
  color: #7f7f89;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.contact-link strong {
  overflow-wrap: anywhere;
  font-family: "Manrope";
  font-size: clamp(17px, 2vw, 23px);
  letter-spacing: -.025em;
}
.contact-arrow {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 23px;
  transition: transform .2s ease;
}
.contact-link:hover .contact-arrow { transform: translate(4px, calc(-50% - 4px)); }
.contact-mail {
  background: linear-gradient(135deg, rgba(139,92,246,.12), rgba(34,211,238,.045));
}

.empty-state {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.empty-state-mark {
  margin-bottom: 8px;
  color: #c4b5fd;
  font-size: 30px;
  text-shadow: 0 0 30px rgba(196,181,253,.5);
}
.empty-state strong {
  color: #e4e4e7;
  font-family: "Manrope";
  font-size: clamp(20px, 3vw, 30px);
  letter-spacing: -.03em;
}
.empty-state p { margin: 0; color: #777781; }

@media (max-width: 900px) {
  .contacts-card { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .contacts { padding: 20px 0 55px; }
  .contacts-card { border-radius: 24px; gap: 30px; }
  .contact-link { min-height: 92px; border-radius: 17px; }
}
