/* ============================================================
   ЛИЧНЫЙ САЙТ РАДИКА МАРДАНОВА — СТИЛИ v2
   ============================================================ */

:root,
[data-theme="dark"] {
  --bg: #0b0f1a;
  --card: #121a2b;
  --text: #e8ecf5;
  --muted: #9aa5b8;
  --border: rgba(255, 255, 255, .08);
  --track: rgba(255, 255, 255, .08);
  --header-bg: rgba(11, 15, 26, .78);
  --accent: #7c3aed;
  --accent-2: #22d3ee;
  --grad: linear-gradient(135deg, #7c3aed, #3b82f6, #22d3ee);
  --glow: 0 0 24px rgba(124, 58, 237, .35);
}

[data-theme="light"] {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #101425;
  --muted: #5b6472;
  --border: rgba(16, 20, 37, .12);
  --track: rgba(16, 20, 37, .08);
  --header-bg: rgba(255, 255, 255, .85);
  --glow: 0 0 24px rgba(124, 58, 237, .18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  font-family: 'Manrope', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background .3s, color .3s;
}

::selection { background: var(--accent); color: #fff; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

section { padding: 80px 0; }

h1, h2 {
  font-family: 'Unbounded', sans-serif;
  line-height: 1.15;
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  text-align: center;
  margin-bottom: 10px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-sub {
  color: var(--muted);
  text-align: center;
  max-width: 640px;
  margin: 0 auto 40px;
}

.logo, h1, .stat__num {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- КНОПКИ ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent-2);
  box-shadow: var(--glow);
}

.btn--primary {
  background: var(--grad);
  border: none;
  color: #fff;
  box-shadow: var(--glow);
}

.btn--small { min-height: 40px; padding: 8px 14px; font-size: .85rem; }
.btn--big   { padding: 16px 28px; font-size: 1.05rem; }

/* ---------- ШАПКА ---------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.logo {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  text-decoration: none;
}

.logo span {
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: .75rem;
  color: var(--muted);
}

.nav { display: flex; gap: 24px; }

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  transition: color .2s;
}

.nav a:hover, .nav a.active { color: var(--accent-2); }

.header__actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle, .burger {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  color: var(--text);
}

.burger { display: none; }

/* ---------- HERO ---------- */
.hero {
  padding: 130px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -20%; right: -10%;
  width: 60vw; height: 60vw;
  background: radial-gradient(circle, rgba(124,58,237,.25), transparent 60%);
  pointer-events: none;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 40px;
  align-items: center;
  position: relative;
}

.hero__badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, .4);
  background: rgba(34, 211, 238, .1);
  color: var(--accent-2);
  font-weight: 700;
  font-size: .85rem;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.hero__subtitle {
  font-weight: 700;
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  margin-bottom: 12px;
}

.hero__offer { color: var(--muted); max-width: 560px; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero__photo {
  background: var(--grad);
  padding: 4px;
  border-radius: 28px;
  position: relative;
  box-shadow: var(--glow);
}

.hero__photo img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
  border-radius: 24px;
  filter: saturate(.92) contrast(1.05);
}

.hero__photo::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 24px;
  background: repeating-linear-gradient(0deg,
      rgba(255,255,255,.05) 0 2px, transparent 2px 5px);
  pointer-events: none;
}

.scroll-hint {
  display: block;
  text-align: center;
  margin-top: 44px;
  color: var(--muted);
  text-decoration: none;
  font-size: .9rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(8px); }
}

/* ---------- ЦИФРЫ ---------- */
.stats__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 12px;
  text-align: center;
  transition: transform .2s, box-shadow .2s;
}

.stat:hover { transform: translateY(-4px); box-shadow: var(--glow); }

.stat__num {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  display: block;
}

.stat__label { color: var(--muted); font-size: .82rem; }

/* ---------- КОНСТРУКТОР ---------- */
.step { margin-bottom: 44px; }

.step h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 16px;
  text-align: center;
}

.roles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.role, .skin {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font-family: inherit;
  font-weight: 700;
  font-size: .95rem;
  padding: 16px;
  cursor: pointer;
  text-align: left;
  position: relative;
  transition: transform .2s, border-color .2s, box-shadow .2s, background .2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.role:hover, .skin:hover {
  transform: translateY(-3px);
  border-color: var(--accent-2);
}

.role.active {
  border-color: var(--accent-2);
  background: rgba(34, 211, 238, .1);
  box-shadow: var(--glow);
}

.skins {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.skin { display: flex; flex-direction: column; gap: 6px; }

.skin span {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 600;
}

.skin.active {
  border-color: var(--accent);
  background: rgba(124, 58, 237, .15);
  box-shadow: var(--glow);
}

.skin.active::after {
  content: "✓";
  position: absolute;
  top: 8px; right: 12px;
  color: var(--accent-2);
  font-weight: 800;
}

.character {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 32px;
  align-items: start;
}

.character__visual { position: relative; }

.character__visual img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
  border-radius: 20px;
  border: 1px solid var(--border);
  filter: saturate(.92) contrast(1.05);
  box-shadow: var(--glow);
}

.character__visual::before,
.character__visual::after {
  content: "";
  position: absolute;
  width: 46px; height: 46px;
  pointer-events: none;
}

.character__visual::before {
  top: -8px; left: -8px;
  border-top: 3px solid var(--accent-2);
  border-left: 3px solid var(--accent-2);
}

.character__visual::after {
  bottom: -8px; right: -8px;
  border-bottom: 3px solid var(--accent-2);
  border-right: 3px solid var(--accent-2);
}

.character__visual img.swap { animation: skinSwap .5s ease; }

@keyframes skinSwap {
  0%   { transform: scale(.96); filter: brightness(1.7) saturate(0); }
  100% { transform: scale(1);   filter: saturate(.92) contrast(1.05); }
}

.character__role {
  margin-top: 14px;
  text-align: center;
  font-weight: 800;
  color: var(--accent-2);
}

.character__panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
}

.character__hint { color: var(--muted); font-size: .92rem; margin-bottom: 14px; }

.character__badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 40px;
}

.character__badges li {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(34, 211, 238, .12);
  border: 1px solid rgba(34, 211, 238, .4);
  font-size: .84rem;
  font-weight: 700;
  animation: pop .3s ease;
}

@keyframes pop { from { transform: scale(.6); opacity: 0; } }

.match { margin-top: 20px; }

.match__top {
  display: flex;
  justify-content: space-between;
  font-size: .9rem;
  margin-bottom: 8px;
}

#matchPercent { color: var(--accent-2); font-weight: 800; }

.match__bar {
  height: 12px;
  border-radius: 999px;
  background: var(--track);
  overflow: hidden;
}

.match__fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--grad);
  box-shadow: var(--glow);
  transition: width .6s ease;
}

.character__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.confetti {
  position: fixed;
  top: -10px;
  width: 8px; height: 8px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 99;
  animation: fall 1.3s ease-in forwards;
}

@keyframes fall {
  to { transform: translateY(70vh) rotate(540deg); opacity: 0; }
}

/* ---------- ОБО МНЕ ---------- */
.about__inner {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 40px;
  align-items: center;
}

.about h2 { text-align: left; }

.about__photo {
  background: var(--grad);
  padding: 4px;
  border-radius: 24px;
  box-shadow: var(--glow);
}

.about__photo img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
  border-radius: 20px;
}

.about__text p { color: var(--muted); margin-bottom: 18px; }

.theses { list-style: none; }

.theses li {
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  font-weight: 600;
}

/* ---------- ОПЫТ ---------- */
.timeline {
  position: relative;
  margin-top: 36px;
  padding-left: 32px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 10px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(var(--accent), var(--accent-2));
}

.tl-item {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
  transition: transform .2s, box-shadow .2s;
}

.tl-item:hover { transform: translateX(6px); box-shadow: var(--glow); }

.tl-item::before {
  content: "";
  position: absolute;
  left: -29px; top: 26px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: var(--glow);
}

.tl-item h3 { font-size: 1.1rem; }

.tl-meta { color: var(--muted); font-size: .88rem; margin: 6px 0 10px; }

.tl-item ul { padding-left: 18px; }
.tl-item li { margin-bottom: 6px; font-size: .95rem; }

/* ---------- РЕЗУЛЬТАТЫ ---------- */
.achievements {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.ach {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  text-align: center;
  font-size: 2rem;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}

.ach:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--glow);
}

.ach strong {
  display: block;
  font-family: 'Unbounded', sans-serif;
  font-size: 1.35rem;
  margin-top: 6px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ach span { display: block; color: var(--muted); font-size: .85rem; margin-top: 4px; }

/* ---------- ИНСТРУМЕНТЫ ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 28px;
}

.chip {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  font-weight: 700;
  font-size: .9rem;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}

.chip:hover {
  transform: translateY(-3px);
  border-color: var(--accent-2);
  box-shadow: var(--glow);
}

/* ---------- ОБРАЗОВАНИЕ ---------- */
.edu { list-style: none; max-width: 720px; margin: 28px auto 0; }

.edu li {
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
}

.edu strong { color: var(--accent-2); }

/* ---------- КОНТАКТЫ ---------- */
.contacts { text-align: center; }

.contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 30px;
}

.contacts__info { color: var(--muted); margin-top: 26px; font-size: .95rem; }

/* ---------- ФУТЕР ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  color: var(--muted);
  font-size: .9rem;
}

.footer__links a { color: var(--accent-2); text-decoration: none; }
.footer__links a:hover { text-decoration: underline; }

/* ---------- ПОЯВЛЕНИЕ ПРИ СКРОЛЛЕ ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.visible { opacity: 1; transform: none; }

/* ============================================================
   ПЛАНШЕТ (до 1023px)
   ============================================================ */
@media (max-width: 1023px) {
  section { padding: 64px 0; }

  .burger { display: block; }

  .nav {
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    flex-direction: column;
    gap: 0;
    padding: 12px 20px 20px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-130%);
    transition: transform .3s ease;
  }

  .nav.open { transform: none; }
  .nav a { padding: 12px 0; font-size: 1.05rem; }

  .hero__inner { grid-template-columns: 1fr; }
  .hero__photo { max-width: 420px; margin: 0 auto; }

  .stats__grid { grid-template-columns: repeat(3, 1fr); }
  .skins { grid-template-columns: repeat(3, 1fr); }
  .character { grid-template-columns: 1fr; }
  .character__visual { max-width: 420px; margin: 0 auto; }
  .about__inner { grid-template-columns: 1fr; }
  .about__photo { max-width: 380px; }
  .about h2 { text-align: center; }
}

/* ============================================================
   МОБИЛЬНЫЙ (до 767px)
   ============================================================ */
@media (max-width: 767px) {
  section { padding: 52px 0; }
  .hero { padding-top: 110px; }

  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .skins { grid-template-columns: repeat(2, 1fr); }

  .hero__actions, .contact-grid, .character__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .header__actions .btn--small { display: none; }
  .footer__inner { flex-direction: column; text-align: center; }

  /* Увеличиваем зону тапа на мобильных */
  .role, .skin { padding: 14px 12px; font-size: .92rem; }
}