:root {
  /* Palette aligned with Supn logo: black · deep plum · white · magenta accent */
  --bg: #000000;
  --bg-elevated: #120612;
  --surface: #2a0f2a;
  --surface-2: #3b153b;
  --plum-deep: #3b003b;
  --plum-mid: #500050;
  --text: #ffffff;
  --text-muted: #b9a8c4;
  --accent: #ffffff;
  --accent-dark: #000000;
  --magenta: #a020f0;
  --magenta-deep: #800080;
  /* UI accent: links, labels, focus — between plum and electric magenta */
  --purple: #c44bff;
  --purple-dim: rgba(160, 32, 240, 0.28);
  --border: rgba(255, 255, 255, 0.09);
  --glow: rgba(160, 32, 240, 0.38);
  --glow-soft: rgba(80, 0, 80, 0.45);
  --radius: 14px;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}

.orb-a {
  width: min(55vw, 420px);
  height: min(55vw, 420px);
  background: radial-gradient(
    circle,
    rgba(160, 32, 240, 0.42) 0%,
    rgba(128, 0, 128, 0.15) 45%,
    transparent 70%
  );
  top: -8%;
  right: -12%;
  animation: float 18s ease-in-out infinite;
}

.orb-b {
  width: min(48vw, 380px);
  height: min(48vw, 380px);
  background: radial-gradient(
    circle,
    rgba(80, 0, 80, 0.55) 0%,
    rgba(59, 0, 59, 0.22) 50%,
    transparent 72%
  );
  bottom: 8%;
  left: -18%;
  animation: float 22s ease-in-out infinite reverse;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(20px, -24px) scale(1.05);
  }
}

@media (prefers-reduced-motion: reduce) {
  .orb-a,
  .orb-b {
    animation: none;
  }
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 75% 60% at 50% -10%, black 20%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 3vw, 2.5rem);
  border-bottom: 1px solid transparent;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.88) 0%, rgba(18, 6, 18, 0.82) 100%);
  backdrop-filter: blur(16px);
  transition: border-color 0.25s, background 0.25s;
}

.header-scrolled {
  border-bottom-color: var(--border);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.94) 0%, rgba(26, 10, 26, 0.92) 100%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
}

/* Логотип — готовое круглое PNG: contain, без CSS-маски (не режем ваш круг) */
.logo-img {
  display: block;
  flex-shrink: 0;
  object-fit: contain;
  object-position: center;
}

.logo-img--sm {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 12px rgba(160, 32, 240, 0.4));
}

.logo-img--xs {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 8px rgba(160, 32, 240, 0.3));
}

.logo-hero-wrap {
  position: relative;
  grid-area: 1 / 1;
  z-index: 2;
  display: grid;
  place-items: center;
  align-self: center;
  justify-self: center;
  width: min(220px, 50vw);
  aspect-ratio: 1;
}

.logo-hero-wrap::before {
  content: "";
  position: absolute;
  inset: -16%;
  border-radius: 50%;
  background: radial-gradient(
    circle closest-side at 50% 50%,
    rgba(160, 32, 240, 0.38) 0%,
    rgba(160, 32, 240, 0.06) 48%,
    transparent 72%
  );
  z-index: 0;
  pointer-events: none;
}

.logo-img--hero {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  filter: drop-shadow(0 12px 36px rgba(0, 0, 0, 0.45));
}

.brand-text {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--text);
}

.nav-cta {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text) !important;
}

.nav-cta:hover {
  border-color: rgba(160, 32, 240, 0.45);
  background: var(--surface-2);
  box-shadow: 0 0 24px rgba(160, 32, 240, 0.15);
}

@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    inset: 0 0 0 0;
    top: 61px;
    flex-direction: column;
    align-items: stretch;
    padding: 1.25rem;
    gap: 0;
    background: rgba(0, 0, 0, 0.97);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .nav-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav a {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
  }

  .nav-cta {
    margin-top: 0.5rem;
    text-align: center;
    border-radius: 12px;
  }
}

main {
  position: relative;
  z-index: 1;
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 3vw, 2.5rem) 4rem;
}

.section-wide {
  max-width: none;
}

.hero {
  padding-bottom: 2.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
  }
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--purple);
  margin: 0 0 1rem;
}

.hero h1 {
  font-size: clamp(2rem, 4.8vw, 3.15rem);
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 1.25rem;
  letter-spacing: -0.03em;
}

.gradient-text {
  background: linear-gradient(120deg, #ffffff 0%, #e8b8ff 38%, #a020f0 72%, #800080 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 36rem;
  margin: 0 0 2rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero-orbit {
  position: relative;
  width: min(280px, 70vw);
  height: min(280px, 70vw);
  display: grid;
  grid-template: 1fr / 1fr;
  place-items: center;
}

.ring {
  position: absolute;
  grid-area: 1 / 1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: spin 24s linear infinite;
}

.ring-1 {
  inset: 0;
}

.ring-2 {
  inset: 12%;
  animation-duration: 32s;
  animation-direction: reverse;
  border-color: rgba(160, 32, 240, 0.35);
}

.ring-3 {
  inset: 24%;
  animation-duration: 20s;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.1);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ring {
    animation: none;
  }
}

.terminal {
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(165deg, var(--surface) 0%, var(--accent-dark) 100%);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.85rem;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.red {
  background: #ff5f57;
}

.dot.amber {
  background: #febc2e;
}

.dot.green {
  background: #28c840;
}

.terminal-title {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.terminal-body {
  margin: 0;
  padding: 1rem 1rem 1.15rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.65;
  color: var(--text-muted);
  overflow-x: auto;
}

.t-prompt {
  color: var(--purple);
}

.t-cmd {
  color: var(--text);
}

.t-out {
  display: block;
  color: #7d9a8c;
}

.t-out.dim {
  color: var(--text-muted);
}

.t-out.accent {
  color: #9ecf91;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
  padding: 1.35rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(59, 0, 59, 0.55), rgba(0, 0, 0, 0.88));
}

@media (max-width: 600px) {
  .stats-strip {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.stat-value {
  display: block;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1.4rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}

.btn-lg {
  padding: 0.95rem 1.75rem;
  font-size: 1rem;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-dark);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 16px 48px rgba(160, 32, 240, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(160, 32, 240, 0.5),
    0 20px 56px rgba(160, 32, 240, 0.45);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--surface);
  border-color: rgba(255, 255, 255, 0.14);
}

.section {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  border-top: 1px solid var(--border);
}

.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--purple);
  margin: 0 0 0.65rem;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin: 0 0 1.75rem;
  letter-spacing: -0.02em;
  max-width: 28rem;
}

.section-title + .bento,
.section-title + .marquee-wrap {
  margin-top: 0;
}

.bento {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto auto;
  }

  .bento-lg {
    grid-column: span 2;
  }

  .bento-accent {
    grid-column: span 2;
  }
}

@media (min-width: 960px) {
  .bento {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
  }

  .bento-lg {
    grid-column: span 2;
    grid-row: span 2;
  }

  .bento-accent {
    grid-column: span 2;
  }
}

.bento-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.35rem 1.45rem;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.bento-card:hover {
  border-color: rgba(160, 32, 240, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

.bento-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 0.65rem;
}

.bento-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.bento-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.bento-lg h3 {
  font-size: 1.25rem;
}

.bento-accent {
  background: linear-gradient(135deg, rgba(160, 32, 240, 0.2), rgba(59, 0, 59, 0.88));
  border-color: rgba(160, 32, 240, 0.28);
}

.marquee-wrap {
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  margin-bottom: 1.5rem;
}

.marquee {
  display: flex;
  flex-wrap: nowrap;
  gap: 2.5rem;
  padding: 0.85rem 0;
  width: max-content;
  animation: marquee 38s linear infinite;
}

.marquee span {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.marquee span::after {
  content: " · ";
  margin-left: 2.5rem;
  opacity: 0.35;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee {
    animation: none;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
    gap: 0.75rem 1.25rem;
  }

  .marquee span::after {
    content: "";
    margin: 0;
  }
}

.prose-center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.prose-wide {
  max-width: 46rem;
}

.prose {
  color: var(--text-muted);
  margin: 0;
  max-width: 40rem;
}

.prose-lead {
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

.section-vpn {
  background: linear-gradient(180deg, rgba(80, 0, 80, 0.35) 0%, rgba(0, 0, 0, 0) 100%);
  border-radius: 20px;
  border: 1px solid var(--border);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  margin-top: 0.5rem;
}

.vpn-list {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  max-width: 46rem;
}

.vpn-list li {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.vpn-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple);
  opacity: 0.8;
}

.vpn-list li strong {
  color: var(--text);
  font-weight: 600;
}

.vpn-note {
  font-size: 0.85rem;
  line-height: 1.55;
  opacity: 0.9;
}

.vpn-cta {
  margin-top: 1.25rem;
  margin-bottom: 0;
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  border-color: rgba(160, 32, 240, 0.3);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.section-cta {
  border-top: none;
  padding-top: 1rem;
}

.cta-panel {
  text-align: center;
  padding: clamp(2rem, 5vw, 3.25rem) 1.5rem;
  border-radius: 24px;
  border: 1px solid rgba(160, 32, 240, 0.25);
  background: linear-gradient(160deg, rgba(160, 32, 240, 0.2) 0%, var(--surface) 45%, var(--bg-elevated) 100%);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.cta-panel h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.cta-panel .prose {
  margin: 0 auto 1.5rem;
  max-width: 32rem;
}

.contact-line {
  margin: 1.25rem 0 0.5rem;
}

.hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.85;
  margin: 1rem 0 0;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

.footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem clamp(1rem, 3vw, 2.5rem);
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 72rem;
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.footer-meta {
  font-weight: 500;
  opacity: 0.65;
}

.footer-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.footer-line {
  font-size: 0.78rem;
  font-weight: 400;
  opacity: 0.72;
  max-width: 22rem;
  line-height: 1.35;
}

.text-bright {
  color: var(--text);
  font-weight: 600;
}

.section-title-wide {
  max-width: 40rem;
}

.projects-lead {
  margin-bottom: 1.75rem;
}

.projects-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1040px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.35rem 1.5rem;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.project-card:hover {
  border-color: rgba(160, 32, 240, 0.35);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.38);
  transform: translateY(-2px);
}

.project-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.project-name {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.project-badge {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.project-badge-live {
  color: #9ecf91;
  border-color: rgba(158, 207, 145, 0.35);
  background: rgba(158, 207, 145, 0.08);
}

.project-badge-soon {
  color: #e8c46c;
  border-color: rgba(232, 196, 108, 0.35);
  background: rgba(232, 196, 108, 0.08);
}

.project-desc {
  margin: 0 0 1.1rem;
  flex: 1;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.58;
}

.project-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--purple);
  text-decoration: none;
  align-self: flex-start;
  transition: color 0.2s, opacity 0.2s;
}

.project-link:hover {
  color: #e8a8ff;
}

@media (max-width: 560px) {
  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Scroll reveal */
.reveal {
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal-pending {
  opacity: 0;
  transform: translateY(18px);
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal[data-delay="1"] {
  transition-delay: 0.08s;
}

.reveal[data-delay="2"] {
  transition-delay: 0.16s;
}
