* {
  box-sizing: border-box;
}

:root {
  --bg: #0d0f16;
  --surface: #151824;
  --surface-2: #1c2030;
  --line: rgba(255, 255, 255, 0.08);
  --text: #eceef5;
  --muted: #9aa1b5;
  --acc1: #c8ff00;
  --acc2: #7b5cff;
  --acc3: #ff4d9d;
  --radius: 20px;
  --max: 1120px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(rgba(123, 92, 255, 0.12) 1px, transparent 1px);
  background-size: 26px 26px;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: "Unbounded", "Manrope", sans-serif;
}

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

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  z-index: 999;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Topbar ---------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  backdrop-filter: blur(14px);
  background: rgba(13, 15, 22, 0.72);
  border-bottom: 1px solid var(--line);
}

.logo {
  font-family: "Unbounded", sans-serif;
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.logo__accent {
  color: var(--acc1);
}

.nav {
  display: flex;
  gap: 1.75rem;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 600;
}

.nav a {
  color: var(--muted);
  transition: color 0.2s;
  position: relative;
}

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

.nav__cta {
  color: #0d0f16 !important;
  background: var(--acc1);
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
}

.nav__cta:hover {
  box-shadow: 0 0 24px rgba(200, 255, 0, 0.35);
}

.burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}

.burger span {
  width: 26px;
  height: 2px;
  background: var(--text);
  transition: 0.25s;
}

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem clamp(1rem, 4vw, 2.5rem) 5rem;
}

.hero__glow {
  position: absolute;
  width: 620px;
  height: 620px;
  top: -180px;
  left: -180px;
  background: radial-gradient(circle, rgba(123, 92, 255, 0.35), transparent 65%);
  filter: blur(20px);
  pointer-events: none;
  animation: float 9s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(40px, 30px); }
}

.hero__inner {
  position: relative;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--acc1);
  margin: 0 0 1rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(200, 255, 0, 0.3);
  border-radius: 999px;
  background: rgba(200, 255, 0, 0.06);
}

.hero__title {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 900;
  line-height: 1.05;
  margin: 0 0 1.25rem;
  letter-spacing: -0.03em;
}

.gradient-text {
  background: linear-gradient(100deg, var(--acc1) 10%, var(--acc2) 60%, var(--acc3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.7;
  color: var(--muted);
  max-width: 34rem;
  margin: 0 0 2rem;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.75rem;
}

.btn {
  display: inline-block;
  padding: 0.9rem 1.7rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn--fill {
  background: linear-gradient(100deg, var(--acc1), #9be800);
  color: #0d0f16;
}

.btn--fill:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(200, 255, 0, 0.3);
}

.btn--ghost {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.btn--ghost:hover {
  transform: translateY(-3px);
  border-color: var(--acc2);
  box-shadow: 0 12px 30px rgba(123, 92, 255, 0.25);
}

.stats {
  display: flex;
  gap: clamp(1.25rem, 4vw, 3rem);
  flex-wrap: wrap;
}

.stat b {
  display: block;
  font-family: "Unbounded", sans-serif;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 900;
  color: var(--acc1);
}

.stat span {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Карточка-таймлайн ---------- */
.hero__card {
  position: relative;
  perspective: 1000px;
}

.frame {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease-out;
}

.frame__top {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0.8rem 1rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.frame__top span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ff5f57;
}

.frame__top span:nth-child(2) { background: #febc2e; }
.frame__top span:nth-child(3) { background: #28c840; }

.frame__top p {
  margin: 0 0 0 auto;
  font-size: 0.75rem;
  color: var(--muted);
  font-family: monospace;
}

.frame__screen {
  position: relative;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #241a4d, #0f2b3d 60%, #3d1030);
}

.play {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.4);
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  backdrop-filter: blur(6px);
  animation: pulse 2.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.25); }
  50% { transform: scale(1.08); box-shadow: 0 0 0 18px rgba(255, 255, 255, 0); }
}

.frame__wave {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  gap: 4px;
  align-items: flex-end;
  height: 34px;
  opacity: 0.75;
}

.frame__wave i {
  flex: 1;
  background: var(--acc1);
  border-radius: 2px;
  animation: wave 1.1s ease-in-out infinite;
}

.frame__wave i:nth-child(3n) { background: var(--acc2); animation-delay: 0.15s; }
.frame__wave i:nth-child(3n+1) { background: var(--acc3); animation-delay: 0.3s; }
.frame__wave i:nth-child(2n) { animation-delay: 0.45s; }

@keyframes wave {
  0%, 100% { height: 20%; }
  50% { height: 100%; }
}

.frame__track {
  position: relative;
  padding: 14px 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.track {
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(0, 0, 0, 0.65);
  overflow: hidden;
}

.track span { position: relative; z-index: 1; }

.track--v { width: 82%; background: linear-gradient(90deg, var(--acc1), #7fd400); }
.track--v2 { width: 62%; background: linear-gradient(90deg, var(--acc2), #a58bff); }
.track--a { width: 92%; background: linear-gradient(90deg, var(--acc3), #ff8ab8); }

.playhead {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 20%;
  width: 2px;
  background: #fff;
  box-shadow: 0 0 12px #fff;
  animation: scrub 4s linear infinite;
}

@keyframes scrub {
  0% { left: 8%; }
  100% { left: 94%; }
}

.badge {
  position: absolute;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  animation: bob 5s ease-in-out infinite;
}

.badge--top { top: -18px; right: -10px; }
.badge--mid { top: 44%; left: -34px; animation-delay: 1.2s; }
.badge--bot { bottom: -16px; right: 10%; animation-delay: 2.4s; }

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.scroll-hint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.8rem;
  color: var(--muted);
  animation: hint 1.6s ease-in-out infinite;
}

@keyframes hint {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.5; }
  50% { transform: translate(-50%, 10px); opacity: 1; }
}

/* ---------- Секции ---------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 6rem clamp(1rem, 4vw, 2.5rem);
}

.section__head {
  margin-bottom: 2.75rem;
}

.section__head h2 {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-weight: 900;
  margin: 0.4rem 0 0;
  letter-spacing: -0.03em;
}

.section__sub {
  color: var(--muted);
  margin: 0.75rem 0 0;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.about-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.about-card:hover {
  transform: translateY(-6px);
  border-color: rgba(200, 255, 0, 0.35);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
}

.about-card h3 {
  font-size: 1.05rem;
  margin: 0 0 1rem;
}

.about-card p {
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.95rem;
  margin: 0 0 0.75rem;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  background: linear-gradient(135deg, rgba(200, 255, 0, 0.2), rgba(123, 92, 255, 0.25));
  border: 1px solid var(--line);
  margin-bottom: 1rem;
}

.checklist, .steps {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

.checklist li {
  padding: 0.45rem 0 0.45rem 1.6rem;
  position: relative;
}

.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--acc1);
  font-weight: 800;
}

.steps li {
  padding: 0.5rem 0;
  padding-left: 2rem;
  position: relative;
  counter-increment: step;
}

.steps {
  counter-reset: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--acc2);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.steps b { color: var(--text); }

.skills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.skill span {
  display: block;
  margin-top: 0.7rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.skill__bar {
  height: 8px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}

.skill__bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--acc1), var(--acc2));
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.skill.is-visible .skill__bar i {
  width: var(--v);
}

/* ---------- Проекты ---------- */
.filters {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.chip {
  font-family: "Manrope", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: 0.2s;
}

.chip:hover {
  color: var(--text);
  border-color: var(--acc2);
}

.chip.is-active {
  background: var(--acc1);
  border-color: var(--acc1);
  color: #0d0f16;
}

.projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.project {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.project:hover {
  transform: translateY(-8px);
  border-color: rgba(123, 92, 255, 0.5);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
}

.project.is-hidden {
  display: none;
}

.project__thumb {
  position: relative;
  height: 175px;
  display: grid;
  place-items: center;
}

.t1 { background: linear-gradient(135deg, #ff6a3d, #7b2ff7); }
.t2 { background: linear-gradient(135deg, #00c6ff, #0072ff); }
.t3 { background: linear-gradient(135deg, #f857a6, #ff5858); }
.t4 { background: linear-gradient(135deg, #11998e, #38ef7d); }
.t5 { background: linear-gradient(135deg, #f7971e, #ffd200); }
.t6 { background: linear-gradient(135deg, #8e2de2, #4a00e0); }

.project__play {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.6);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  color: #fff;
  backdrop-filter: blur(4px);
  transition: transform 0.25s, background 0.25s;
}

.project:hover .project__play {
  transform: scale(1.15);
  background: rgba(0, 0, 0, 0.6);
}

.project__thumb em {
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.6);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  color: #fff;
}

.project__body {
  padding: 1.35rem;
}

.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(200, 255, 0, 0.14);
  color: var(--acc1);
  border: 1px solid rgba(200, 255, 0, 0.3);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}

.tag--pink { background: rgba(255, 77, 157, 0.14); color: #ff7ab5; border-color: rgba(255, 77, 157, 0.35); }
.tag--green { background: rgba(56, 239, 125, 0.12); color: #5cf39a; border-color: rgba(56, 239, 125, 0.3); }

.project__body h3 {
  font-size: 1.02rem;
  margin: 0.85rem 0 0.5rem;
  line-height: 1.4;
}

.project__body p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0 0 1rem;
}

.project__meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.project__meta span {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}

/* ---------- CTA ---------- */
.cta {
  padding: 2rem clamp(1rem, 4vw, 2.5rem) 6rem;
}

.cta__box {
  max-width: var(--max);
  margin: 0 auto;
  text-align: center;
  padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem;
  border-radius: 28px;
  background:
    radial-gradient(circle at 20% 20%, rgba(200, 255, 0, 0.16), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(123, 92, 255, 0.3), transparent 50%),
    var(--surface);
  border: 1px solid var(--line);
}

.cta__box h2 {
  font-size: clamp(1.7rem, 4.5vw, 3rem);
  margin: 0 0 0.75rem;
  letter-spacing: -0.03em;
}

.cta__box p {
  color: var(--muted);
  margin: 0 0 2rem;
}

.cta__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 1.75rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.87rem;
}

.footer p { margin: 0; }

/* ---------- Модалка ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  place-items: center;
  padding: 1.25rem;
  background: rgba(5, 6, 10, 0.78);
  backdrop-filter: blur(8px);
}

.modal.is-open {
  display: grid;
}

.modal__card {
  position: relative;
  width: min(520px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.5rem;
  animation: pop 0.3s cubic-bezier(0.22, 1.4, 0.36, 1);
}

@keyframes pop {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.2s;
}

.modal__close:hover {
  background: var(--acc3);
  border-color: var(--acc3);
}

.modal__thumb {
  height: 190px;
  border-radius: 16px;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #7b5cff, #ff4d9d);
}

.modal__card h3 {
  margin: 0.9rem 0 0.6rem;
  font-size: 1.2rem;
}

.modal__card p {
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 1rem;
}

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__card { max-width: 480px; margin: 1.5rem auto 0; }
  .about-grid { grid-template-columns: 1fr; }
  .projects { grid-template-columns: repeat(2, 1fr); }
  .skills { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .burger { display: flex; }
  .nav {
    position: fixed;
    top: 64px;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.1rem;
    background: var(--surface);
    border-left: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 1.5rem;
    width: min(280px, 80vw);
    transform: translateX(110%);
    transition: transform 0.3s ease;
  }
  .nav.is-open { transform: none; }
  .projects { grid-template-columns: 1fr; }
  .badge--mid { left: -8px; }
  .stats { gap: 1.25rem; }
}
