@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

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

:root {
  --bg: #0D1117;
  --surface: #161B22;
  --border: #21262D;
  --text: #E6EDF3;
  --muted: #8B949E;
  --accent: #378ADD;
  --accent-hover: #2a6db3;
  --btn-light-bg: #E6EDF3;
  --btn-light-text: #0D1117;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

a { color: inherit; text-decoration: none; }

/* ── SCROLL PROGRESS ── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, #378ADD, #60a5fa, #a78bfa);
  z-index: 1000;
  box-shadow: 0 0 10px rgba(55,138,221,0.9), 0 0 24px rgba(55,138,221,0.4);
  transition: width 0.08s linear;
}

/* ── BACKGROUND ── */
.bg-grid {
  position: fixed; inset: 0;
  background-image: radial-gradient(circle, rgba(33,38,45,0.9) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
  z-index: 0;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
  transition: transform 0.8s cubic-bezier(.22,1,.36,1);
}

.bg-orb-1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(55,138,221,0.18) 0%, transparent 70%);
  top: -280px; right: -180px;
  animation: float-orb 14s ease-in-out infinite;
}

.bg-orb-2 {
  width: 550px; height: 550px;
  background: radial-gradient(circle, rgba(124,58,237,0.12) 0%, transparent 70%);
  bottom: 80px; left: -180px;
  animation: float-orb 18s ease-in-out infinite reverse;
}

.bg-orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(55,138,221,0.09) 0%, transparent 70%);
  bottom: 40%; right: 10%;
  animation: float-orb 10s ease-in-out infinite 3s;
}

@keyframes float-orb {
  0%,100% { transform: translate(0,0); }
  33%      { transform: translate(25px,-18px); }
  66%      { transform: translate(-18px,25px); }
}

nav, .hero-section, section, .cta-section, footer, .section-divider {
  position: relative;
  z-index: 1;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(13,17,23,0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(33,38,45,0.7);
  padding: 0 24px;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

nav.scrolled {
  background: rgba(13,17,23,0.96);
  border-bottom-color: rgba(55,138,221,0.18);
  box-shadow: 0 1px 40px rgba(0,0,0,0.6);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}

.logo {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.logo span { color: var(--accent); }

.nav-links { display: flex; gap: 28px; list-style: none; }

.nav-links a {
  font-size: 0.88rem;
  color: var(--muted);
  transition: color 0.2s;
  position: relative;
  padding-bottom: 2px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-links a.active { color: var(--accent); }
.nav-links a.active::after { transform: scaleX(1); opacity: 0.7; }

.logo { cursor: pointer; user-select: none; }

/* ── BURGER ── */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s;
  flex-shrink: 0;
}

.burger:hover { background: rgba(255,255,255,0.06); }

.burger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(.22,1,.36,1), opacity 0.3s, width 0.3s;
  transform-origin: center;
}

.burger span:nth-child(3) { width: 65%; }

.burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); width: 100%; }

/* ── MOBILE MENU ── */
.mobile-menu {
  display: none;
  position: fixed;
  top: 64px; left: 0; right: 0;
  background: rgba(13,17,23,0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  z-index: 190;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(.22,1,.36,1), padding 0.3s;
}

.mobile-menu.open { max-height: 400px; padding: 16px 0 24px; }

.mobile-menu ul { list-style: none; display: flex; flex-direction: column; }

.mobile-menu ul a {
  display: block;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
  border-left: 2px solid transparent;
}

.mobile-menu ul a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.03);
  border-left-color: var(--accent);
}

.mobile-menu .mobile-cta { margin: 12px 24px 0; }

.mobile-menu .mobile-cta .btn { width: 100%; justify-content: center; padding: 13px; font-size: 0.95rem; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-accent { background: var(--accent); color: #fff; }

.btn-accent::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 55%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.28), transparent);
  transform: skewX(-15deg);
  pointer-events: none;
}

.btn-accent:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 28px rgba(55,138,221,0.6), 0 0 50px rgba(55,138,221,0.15);
}

.btn-accent:hover::after { animation: shimmer-btn 0.55s ease forwards; }

@keyframes shimmer-btn { to { left: 150%; } }

.btn-light { background: var(--btn-light-bg); color: var(--btn-light-text); }

.btn-light:hover {
  background: #d0d9e4;
  box-shadow: 0 4px 20px rgba(230,237,243,0.2);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(55,138,221,0.35);
}

.btn-outline:hover {
  background: rgba(55,138,221,0.08);
  border-color: rgba(55,138,221,0.6);
  box-shadow: 0 4px 20px rgba(55,138,221,0.15);
}

/* ── POPUP ── */
.popup-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.popup-overlay.open { opacity: 1; pointer-events: all; }

.popup {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px;
  width: 100%;
  max-width: 480px;
  position: relative;
  margin: auto;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(.22,1,.36,1);
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
}

.popup-overlay.open .popup { transform: translateY(0) scale(1); }

.popup-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.06);
  border: none; border-radius: 8px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  font-size: 1.1rem;
  transition: background 0.2s, color 0.2s;
  line-height: 1;
}

.popup-close:hover { background: rgba(255,255,255,0.1); color: var(--text); }

.popup-title { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.4px; margin-bottom: 6px; }

.popup-subtitle { font-size: 0.875rem; color: var(--muted); margin-bottom: 28px; }
.popup-consent { font-size: 0.75rem; line-height: 1.5; color: var(--muted); margin-top: 18px; }
.popup-consent a { color: var(--accent); }
.popup-consent a:hover { text-decoration: underline; }

.popup-contacts { display: flex; flex-direction: column; gap: 12px; }

.contact-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: border-color 0.25s, background 0.25s, transform 0.2s, box-shadow 0.25s;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  position: relative;
  overflow: hidden;
}

.contact-link::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 55%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
  transform: skewX(-15deg);
}

.contact-link:hover::after { animation: shimmer-btn 0.5s ease forwards; }

.contact-link:hover { transform: translateX(4px); box-shadow: 0 4px 20px rgba(0,0,0,0.3); }

.contact-link.tg {
  background: rgba(55,138,221,0.07);
  border-color: rgba(55,138,221,0.25);
}

.contact-link.tg:hover {
  border-color: rgba(55,138,221,0.5);
  background: rgba(55,138,221,0.12);
}

.contact-link.max {
  background: rgba(85,51,238,0.06);
  border-color: rgba(85,51,238,0.2);
}

.contact-link.max:hover {
  border-color: rgba(85,51,238,0.4);
  background: rgba(85,51,238,0.1);
}

.contact-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.contact-link.tg   .contact-icon { background: none; }
.contact-link.max  .contact-icon { background: none; }
.contact-link.mail .contact-icon { background: none; }

.contact-link.mail {
  background: rgba(52,211,153,0.05);
  border-color: rgba(52,211,153,0.2);
}

.contact-link.mail:hover {
  border-color: rgba(52,211,153,0.45);
  background: rgba(52,211,153,0.09);
}

.contact-info { display: flex; flex-direction: column; gap: 2px; }

.contact-name { font-size: 0.95rem; font-weight: 700; }

.contact-handle { font-size: 0.8rem; color: var(--muted); }

.contact-arrow {
  margin-left: auto;
  color: var(--muted);
  font-size: 1rem;
  transition: transform 0.2s, color 0.2s;
}

.contact-link:hover .contact-arrow { transform: translateX(3px); color: var(--text); }

/* ── REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }

/* ── HERO SECTION ── */
.hero-section { overflow: hidden; }

.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  will-change: transform;
}

.aurora-1 {
  width: 640px; height: 320px;
  background: rgba(55,138,221,0.07);
  top: -60px; left: -80px;
  animation: aurora-1 9s ease-in-out infinite;
}

.aurora-2 {
  width: 500px; height: 280px;
  background: rgba(124,58,237,0.06);
  top: 40px; right: -60px;
  animation: aurora-2 11s ease-in-out infinite reverse;
}

@keyframes aurora-1 {
  0%,100% { transform: translate(0,0) rotate(0deg); }
  40%      { transform: translate(60px,40px) rotate(12deg); }
  70%      { transform: translate(-30px,60px) rotate(-8deg); }
}

@keyframes aurora-2 {
  0%,100% { transform: translate(0,0); }
  50%      { transform: translate(-60px,50px); }
}

.hero-wrap { max-width: 1100px; margin: 0 auto; position: relative; z-index: 1; }

.hero {
  padding: 104px 24px 88px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(55,138,221,0.09);
  border: 1px solid rgba(55,138,221,0.28);
  color: var(--accent);
  padding: 7px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  animation: badge-enter 0.55s cubic-bezier(.22,1,.36,1) both;
  box-shadow: 0 0 24px rgba(55,138,221,0.07);
}

@keyframes badge-enter {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.badge::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4caf50;
  flex-shrink: 0;
  animation: dot-pulse 2s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(76,175,80,0.6); opacity: 1; }
  50%      { box-shadow: 0 0 0 5px rgba(76,175,80,0); opacity: 0.7; }
}

.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  max-width: 740px;
  animation: hero-up 0.65s 0.12s cubic-bezier(.22,1,.36,1) both;
}

.gradient-text {
  background: linear-gradient(90deg, #378ADD 0%, #60a5fa 45%, #378ADD 100%);
  background-size: 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer-text 4s linear infinite;
}

@keyframes shimmer-text {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes hero-up {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero p {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 540px;
  line-height: 1.78;
  animation: hero-up 0.65s 0.26s cubic-bezier(.22,1,.36,1) both;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  animation: hero-up 0.65s 0.38s cubic-bezier(.22,1,.36,1) both;
}

.hero-buttons .btn { padding: 13px 26px; font-size: 0.95rem; }

/* ── STATS SECTION ── */
.stats-section {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 64px 24px;
  overflow: hidden;
}

.stats-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 120% at 50% 50%, rgba(55,138,221,0.04), transparent);
  pointer-events: none;
}

.stats-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 0;
}

.stat-item {
  flex: 1;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 40px;
  border-right: 1px solid var(--border);
  cursor: default;
  transition: transform 0.25s cubic-bezier(.22,1,.36,1);
  position: relative;
}

.stat-item::after {
  content: '';
  position: absolute;
  bottom: 0; left: 20%; right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0);
  transition: transform 0.35s;
  opacity: 0.6;
}

.stat-item:hover { transform: translateY(-5px); }
.stat-item:hover::after { transform: scaleX(1); }
.stat-item:last-child { border-right: none; }

.stat-value {
  font-size: clamp(2.8rem, 5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -3px;
  line-height: 1;
  transition: text-shadow 0.3s;
}

.stat-item:hover .stat-value {
  text-shadow: 0 0 30px rgba(55,138,221,0.45), 0 0 60px rgba(55,138,221,0.15);
}

.stat-acc { color: var(--accent); }

.stat-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-align: center;
}

/* ── SECTIONS ── */
section { max-width: 1100px; margin: 0 auto; padding: 88px 24px; }

.section-header { margin-bottom: 52px; }

.section-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--accent);
  margin-bottom: 10px;
  cursor: default;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.5px;
}

.section-subtitle { margin-top: 8px; font-size: 0.93rem; color: var(--muted); }

/* ── CARDS ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.card-wrap {
  position: relative;
  border-radius: 15px;
}

.card-wrap::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 15px;
  background: conic-gradient(
    from var(--angle),
    transparent 0deg,
    rgba(55,138,221,0.7) 60deg,
    rgba(167,139,250,0.5) 120deg,
    transparent 180deg
  );
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 0;
}

.card-wrap:hover::before {
  opacity: 1;
  animation: border-spin 3s linear infinite;
}

@keyframes border-spin { to { --angle: 360deg; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 30px;
  transition: border-color 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
  z-index: 1;
  will-change: transform;
  transform-style: preserve-3d;
}

.card::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 14px;
  background: radial-gradient(280px at var(--mx, -999px) var(--my, -999px),
    rgba(55,138,221,0.07), transparent 70%);
  pointer-events: none;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(55,138,221,0.6), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.card-wrap:hover .card::before { opacity: 1; }

.card-wrap:hover .card {
  border-color: transparent;
  box-shadow: 0 16px 48px rgba(0,0,0,0.55);
}

.card-icon {
  display: block;
  width: 52px; height: 52px;
  margin-bottom: 22px;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
}

.card-wrap:hover .card-icon { transform: scale(1.1) rotate(-4deg); }

.card-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; }

.card-text { font-size: 0.875rem; color: var(--muted); line-height: 1.7; }

.card-list {
  list-style: none;
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-list li {
  font-size: 0.82rem;
  color: var(--muted);
  padding-left: 18px;
  position: relative;
  transition: color 0.2s;
}

.card-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.75rem;
  transition: transform 0.2s;
}

.card-wrap:hover .card-list li::before { transform: translateX(3px); }

/* ── PORTFOLIO ── */
.portfolio-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
  will-change: transform;
  transform-style: preserve-3d;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.portfolio-wrap {
  position: relative;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
}

.portfolio-wrap::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: 15px;
  background: conic-gradient(
    from var(--angle),
    transparent 0deg,
    rgba(55,138,221,0.6) 60deg,
    rgba(167,139,250,0.4) 120deg,
    transparent 180deg
  );
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 0;
}

.portfolio-wrap:hover::before {
  opacity: 1;
  animation: border-spin 3s linear infinite;
}

.portfolio-card { position: relative; z-index: 1; }

.portfolio-wrap:hover .portfolio-card {
  border-color: transparent;
  box-shadow: 0 16px 48px rgba(0,0,0,0.55);
}

.portfolio-img {
  height: 180px;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--border);
  position: relative; overflow: hidden;
}

.portfolio-img::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #0e1b30 0%, #1a2e4a 50%, #0e1b30 100%);
  background-size: 200% 200%;
  animation: img-gradient 5s ease infinite;
}

@keyframes img-gradient {
  0%,100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.portfolio-img svg {
  position: relative; z-index: 1;
  width: 64px; height: 64px;
  color: var(--accent);
  transition: transform 0.4s cubic-bezier(.34,1.56,.64,1);
}

.portfolio-wrap:hover .portfolio-img svg { transform: scale(1.1); }

.portfolio-img::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 50%, rgba(55,138,221,0.12), transparent);
  transform: scale(0.8);
  opacity: 0;
  transition: transform 0.4s, opacity 0.4s;
}

.portfolio-wrap:hover .portfolio-img::after { transform: scale(1.3); opacity: 1; }

.portfolio-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }

.portfolio-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

.tag {
  background: rgba(55,138,221,0.09);
  border: 1px solid rgba(55,138,221,0.2);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: 0.3px;
}

.portfolio-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 6px; }

.portfolio-desc { font-size: 0.82rem; color: var(--muted); line-height: 1.6; }

.portfolio-footer {
  margin-top: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── ABOUT ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 56px;
  align-items: start;
}

.about-text .section-tag { margin-bottom: 10px; }

.about-text h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.about-text p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.82;
  margin-bottom: 14px;
}

.about-text p:last-child { margin-bottom: 0; }

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px;
  position: relative;
  overflow: hidden;
}

.about-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
  opacity: 0.7;
}

.about-card-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 20px;
}

.about-rows { display: flex; flex-direction: column; }

.about-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}

.about-row:first-child { padding-top: 0; }
.about-row:last-child  { border-bottom: none; padding-bottom: 0; }

.about-row-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
}

.about-row-value { font-size: 0.88rem; font-weight: 600; color: var(--text); }

.about-row-value--accent { color: var(--accent); font-size: 1rem; letter-spacing: -0.3px; }

/* ── CTA ── */
.cta-section {
  position: relative; overflow: hidden;
  background: linear-gradient(-45deg, #0d1117, #0d1f38, #0d1117, #16092a);
  background-size: 400% 400%;
  animation: cta-gradient 12s ease infinite;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 100px 24px;
  text-align: center;
  z-index: 1;
}

@keyframes cta-gradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(55,138,221,0.06) 0%, transparent 60%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: cta-pulse 6s ease-in-out infinite;
}

@keyframes cta-pulse {
  0%,100% { transform: translate(-50%,-50%) scale(1);   opacity: 1; }
  50%      { transform: translate(-50%,-50%) scale(1.2); opacity: 0.6; }
}

.cta-inner { max-width: 600px; margin: 0 auto; position: relative; z-index: 1; }

.cta-section h2 {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-weight: 800;
  margin-bottom: 14px;
  letter-spacing: -0.8px;
}

.cta-section p {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 36px;
  line-height: 1.75;
}

/* ── FOOTER ── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 56px 24px 28px;
  position: relative; z-index: 1;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 48px;
}

.footer-brand { max-width: 340px; }
.footer-logo { font-size: 1.4rem; font-weight: 800; }
.footer-logo span { color: var(--accent); }
.footer-tagline { margin: 14px 0 20px; font-size: 0.88rem; color: var(--muted); line-height: 1.6; }
.footer-cta { padding: 11px 26px; font-size: 0.9rem; }

.footer-cols { display: flex; gap: 72px; flex-wrap: wrap; }

.footer-col-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 18px;
}

.footer-nav { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-nav a { font-size: 0.88rem; color: var(--text); transition: color 0.2s; cursor: pointer; }
.footer-nav a:hover { color: var(--accent); }

/* ── FOOTER BOTTOM (копирайт + реквизиты) ── */
.footer-bottom {
  max-width: 1100px;
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-copy, .footer-meta { font-size: 0.78rem; color: var(--muted); }

@media (max-width: 600px) {
  footer { padding: 44px 20px 24px; }
  .footer-inner { gap: 36px; }
  .footer-cols { gap: 48px; }
  .footer-cta { width: 100%; }
}

/* ── DIVIDER ── */
.section-divider {
  max-width: 1100px;
  margin: 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border) 30%, var(--border) 70%, transparent);
}

/* ── ABOUT TASKS ── */
.about-tasks { margin-top: 22px; }

.about-tasks-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 10px;
}

.about-task-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 14px;
}

.about-task-list li {
  font-size: 0.85rem;
  color: var(--muted);
  padding-left: 18px;
  position: relative;
  line-height: 1.5;
  transition: color 0.2s;
}

.about-task-list li::before {
  content: '—';
  position: absolute; left: 0;
  color: var(--accent);
  opacity: 0.7;
}

.about-tasks-note {
  font-size: 0.8rem;
  color: var(--muted);
  opacity: 0.65;
  line-height: 1.6;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ── PORTFOLIO TASK LIST ── */
.portfolio-task-list {
  list-style: none;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.portfolio-task-list li {
  font-size: 0.82rem;
  color: var(--muted);
  padding-left: 18px;
  position: relative;
  line-height: 1.5;
  transition: color 0.2s;
}

.portfolio-task-list li::before {
  content: '→';
  position: absolute; left: 0;
  color: var(--accent);
  font-size: 0.75rem;
  transition: transform 0.2s;
}

.portfolio-wrap:hover .portfolio-task-list li::before { transform: translateX(3px); }

/* ── NETWORK NOTE ── */
.network-note {
  margin-top: 28px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 22px 26px;
  background: rgba(55,138,221,0.04);
  border: 1px solid rgba(55,138,221,0.14);
  border-radius: 14px;
  transition: border-color 0.3s, background 0.3s;
}

.network-note:hover {
  border-color: rgba(55,138,221,0.28);
  background: rgba(55,138,221,0.07);
}

.network-note > svg {
  width: 36px; height: 36px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
  opacity: 0.85;
}

.network-note-title {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.network-note-desc {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.72;
}

/* ── PORTFOLIO EXP TAGS ── */
.exp-tags-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.exp-tag {
  background: rgba(55,138,221,0.06);
  border: 1px solid rgba(55,138,221,0.16);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.portfolio-wrap:hover .exp-tag {
  border-color: rgba(55,138,221,0.32);
  color: var(--text);
  background: rgba(55,138,221,0.1);
}

.exp-fl-cta {
  display: inline-block;
  margin-top: 18px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  transition: opacity 0.2s, transform 0.2s;
}

.exp-fl-cta:hover { opacity: 0.75; transform: translateX(3px); }

/* ── REQS POPUP ── */
.popup--wide { max-width: 540px; }

.req-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin: 22px 0 10px;
}

.req-table {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.req-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.req-row:last-child { border-bottom: none; }

.req-row:nth-child(even) { background: rgba(255,255,255,0.015); }

.req-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  flex-shrink: 0;
  width: 86px;
}

.req-val {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  word-break: break-all;
  min-width: 0;
}

.req-copy {
  flex-shrink: 0;
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--muted);
  font-size: 0.75rem;
  padding: 2px 8px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  line-height: 1.6;
}

.req-copy:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
}

/* ── RESPONSIVE ── */
@media (max-width: 500px) {
  .req-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 12px 14px;
  }
  .req-label { width: auto; }
  .req-val { font-size: 0.8rem; width: 100%; }
  .req-copy { margin-left: auto; flex-shrink: 0; }
}

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

@media (max-width: 640px) {
  .nav-links, nav > .nav-inner > .btn { display: none; }
  .burger { display: flex; }
  .mobile-menu { display: block; }
  .stat-item { padding: 20px 20px; min-width: 120px; }
  .stat-item:nth-child(2) { border-right: none; }
  .stats-inner { gap: 0; }
  .hero { padding: 64px 16px 60px; }
  section { padding: 60px 16px; }
  .cta-section { padding: 72px 16px; }
  .popup { padding: 28px 20px; }
}

/* ── THEME TOGGLE BUTTON ── */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--muted);
  flex-shrink: 0;
  padding: 0;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.theme-toggle:hover { color: var(--text); background: rgba(128,128,128,0.08); }

.theme-toggle svg { width: 16px; height: 16px; flex-shrink: 0; }

.icon-moon { display: none; }
.icon-sun  { display: block; }

.theme-light .icon-sun  { display: none; }
.theme-light .icon-moon { display: block; }

/* ── LIGHT THEME ── */
.theme-light {
  --bg: #F6F8FA;
  --surface: #FFFFFF;
  --border: #D0D7DE;
  --text: #1F2328;
  --muted: #57606A;
  --accent: #0969DA;
  --accent-hover: #0550AE;
  --btn-light-bg: #1F2328;
  --btn-light-text: #F6F8FA;
}

/* Nav */
.theme-light nav {
  background: rgba(246,248,250,0.85);
  border-bottom-color: rgba(208,215,222,0.6);
}
.theme-light nav.scrolled {
  background: rgba(246,248,250,0.96);
  border-bottom-color: var(--border);
  box-shadow: 0 1px 0 var(--border), 0 4px 20px rgba(0,0,0,0.06);
}
.theme-light .mobile-menu { background: rgba(246,248,250,0.98); }
.theme-light .burger:hover { background: rgba(0,0,0,0.04); }

/* Background elements */
.theme-light .bg-grid {
  background-image: radial-gradient(circle, rgba(0,0,0,0.07) 1px, transparent 1px);
}
.theme-light .bg-orb-1 {
  background: radial-gradient(circle, rgba(9,105,218,0.1) 0%, transparent 70%);
}
.theme-light .bg-orb-2 {
  background: radial-gradient(circle, rgba(124,58,237,0.07) 0%, transparent 70%);
}
.theme-light .bg-orb-3 {
  background: radial-gradient(circle, rgba(9,105,218,0.06) 0%, transparent 70%);
}

/* Hero aurora */
.theme-light .aurora-1 { background: rgba(9,105,218,0.07); }
.theme-light .aurora-2 { background: rgba(124,58,237,0.05); }

/* Gradient text */
.theme-light .gradient-text {
  background: linear-gradient(90deg, #0969DA 0%, #2188FF 45%, #0969DA 100%);
  background-size: 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer-text 4s linear infinite;
}

/* Stats */
.theme-light .stats-section { background: var(--surface); }
.theme-light .stats-section::before {
  background: radial-gradient(ellipse 80% 120% at 50% 50%, rgba(9,105,218,0.04), transparent);
}
.theme-light .stat-item:hover .stat-value {
  text-shadow: 0 0 30px rgba(9,105,218,0.25), 0 0 60px rgba(9,105,218,0.08);
}

/* Cards */
.theme-light .card::after {
  background: radial-gradient(280px at var(--mx,-999px) var(--my,-999px),
    rgba(9,105,218,0.05), transparent 70%);
}
.theme-light .card-wrap:hover .card {
  box-shadow: 0 16px 48px rgba(0,0,0,0.1);
}

/* Portfolio image */
.theme-light .portfolio-img::before {
  background: linear-gradient(135deg, #dce8f8 0%, #c8dcf4 50%, #dce8f8 100%);
}
.theme-light .portfolio-img::after {
  background: radial-gradient(ellipse 60% 60% at 50% 50%, rgba(9,105,218,0.1), transparent);
}
.theme-light .portfolio-wrap:hover .portfolio-card {
  box-shadow: 0 16px 48px rgba(0,0,0,0.1);
}

/* Popups */
.theme-light .popup-overlay { background: rgba(0,0,0,0.3); }
.theme-light .popup { box-shadow: 0 24px 80px rgba(0,0,0,0.14); }
.theme-light .popup-close { background: rgba(0,0,0,0.04); }
.theme-light .popup-close:hover { background: rgba(0,0,0,0.08); color: var(--text); }
.theme-light .req-row:nth-child(even) { background: rgba(0,0,0,0.025); }

/* CTA */
.theme-light .cta-section {
  background: linear-gradient(-45deg, #EBF3FF, #F0F4FF, #EBF3FF, #F4F0FF);
  background-size: 400% 400%;
}
.theme-light .cta-section::before {
  background: radial-gradient(circle, rgba(9,105,218,0.06) 0%, transparent 60%);
}

/* Buttons */
.theme-light .btn-light:hover {
  background: #2d3339;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}
.theme-light .btn-accent:hover {
  box-shadow: 0 4px 28px rgba(9,105,218,0.4), 0 0 50px rgba(9,105,218,0.1);
}
.theme-light .btn-outline:hover {
  background: rgba(9,105,218,0.07);
  border-color: rgba(9,105,218,0.5);
}

/* Network note */
.theme-light .network-note {
  background: rgba(9,105,218,0.04);
  border-color: rgba(9,105,218,0.12);
}
.theme-light .network-note:hover {
  background: rgba(9,105,218,0.07);
  border-color: rgba(9,105,218,0.22);
}

/* Scroll progress */
.theme-light .scroll-progress {
  background: linear-gradient(90deg, #0969DA, #2188FF, #a78bfa);
  box-shadow: 0 0 10px rgba(9,105,218,0.7), 0 0 24px rgba(9,105,218,0.3);
}

/* ──────────────────────────────────────────────
   LEGAL PAGES (privacy / consent / cookies)
   ────────────────────────────────────────────── */
.legal-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,17,23,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.theme-light .legal-nav {
  background: rgba(246,248,250,0.9);
}
.legal-nav-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.legal-nav .logo { font-size: 1.15rem; font-weight: 800; cursor: pointer; }
.legal-nav .logo span { color: var(--accent); }
.legal-back {
  font-size: 0.85rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}
.legal-back:hover { color: var(--text); }

.legal {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 56px 24px 88px;
}
.legal h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 10px;
}
.legal .legal-date {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 36px;
}
.legal .legal-lead {
  color: var(--muted);
  font-size: 1.02rem;
  margin-bottom: 40px;
}
.legal h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 40px 0 16px;
  padding-top: 8px;
}
.legal p { margin-bottom: 14px; color: var(--text); }
.legal ul { margin: 0 0 16px 0; padding-left: 22px; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--accent); }
.legal a:hover { text-decoration: underline; }
.legal .legal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
  margin: 8px 0 24px;
}
.legal .legal-card p { margin-bottom: 6px; }
.legal .legal-card p:last-child { margin-bottom: 0; }
.legal .legal-card strong { color: var(--text); }

/* ──────────────────────────────────────────────
   COOKIE BANNER
   ────────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1100;
  max-width: 760px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 16px 60px rgba(0,0,0,0.4);
  padding: 18px 22px;
  display: none;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(.22,1,.36,1), opacity 0.4s;
}
.theme-light .cookie-banner { box-shadow: 0 16px 60px rgba(0,0,0,0.14); }
.cookie-banner.show { display: flex; }
.cookie-banner.visible { transform: translateY(0); opacity: 1; }
.cookie-text {
  flex: 1 1 380px;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--muted);
}
.cookie-text a { color: var(--accent); }
.cookie-text a:hover { text-decoration: underline; }
.cookie-banner .btn-accept {
  flex: 0 0 auto;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px 26px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.cookie-banner .btn-accept:hover { background: var(--accent-hover); }
.cookie-banner .btn-accept:active { transform: scale(0.97); }

@media (max-width: 560px) {
  .cookie-banner { padding: 16px 18px; }
  .cookie-banner .btn-accept { width: 100%; }
}
