/* =========================================================
   Портфолио: основные стили
   Все цвета и шрифты меняются в блоке :root ниже
   ========================================================= */

:root {
  --font-display: 'Unbounded', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --container: 1180px;
  --header-h: 76px;
  --radius: 18px;

  --bg: #08080e;
  --bg-soft: #0d0d16;
  --panel: #11111c;
  --panel-2: #161624;
  --text: #f4f4fa;
  --muted: #9b9bad;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);

  --accent: #8b7cff;
  --accent-2: #22d3ee;
  --accent-3: #c084fc;
  --accent-soft: rgba(139, 124, 255, 0.12);

  --grid: rgba(255, 255, 255, 0.035);
  --header-bg: rgba(8, 8, 14, 0.72);
  --glow-1: rgba(139, 124, 255, 0.3);
  --glow-2: rgba(34, 211, 238, 0.18);
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.75);

  --green: #4ade80;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f5f5fa;
  --bg-soft: #ededf5;
  --panel: #ffffff;
  --panel-2: #f7f7fc;
  --text: #101018;
  --muted: #5c5c70;
  --border: rgba(16, 16, 24, 0.1);
  --border-strong: rgba(16, 16, 24, 0.2);

  --accent: #6552f5;
  --accent-2: #0891b2;
  --accent-3: #9333ea;
  --accent-soft: rgba(101, 82, 245, 0.1);

  --grid: rgba(16, 16, 24, 0.045);
  --header-bg: rgba(245, 245, 250, 0.78);
  --glow-1: rgba(101, 82, 245, 0.18);
  --glow-2: rgba(8, 145, 178, 0.12);
  --shadow: 0 30px 80px -30px rgba(30, 30, 60, 0.18);

  --green: #16a34a;
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.35s ease, color 0.35s ease;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.15;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Утилиты ---------- */
.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.section {
  position: relative;
  padding: clamp(4.5rem, 9vw, 8rem) 0;
}

.section__head {
  max-width: 700px;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.section__lead {
  max-width: 560px;
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: 1.02rem;
}

.text-gradient {
  background: linear-gradient(105deg, var(--accent) 10%, var(--accent-2) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border: 1px solid rgba(139, 124, 255, 0.3);
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.92rem 1.55rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease,
    background-color 0.25s ease, color 0.25s ease;
}

.btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.25s ease;
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn--primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 12px 30px -12px rgba(101, 82, 245, 0.7);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -14px rgba(101, 82, 245, 0.85);
}

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

.btn--ghost:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ---------- Появление при скролле ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--delay, 0ms);
}

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

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 300;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

/* =========================================================
   Header
   ========================================================= */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease,
    backdrop-filter 0.3s ease;
}

.header.is-scrolled,
.header.menu-open {
  background: var(--header-bg);
  border-bottom-color: var(--border);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo__mark {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
}

.logo__dot {
  color: var(--accent-2);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 1.9rem);
}

.nav__link {
  position: relative;
  padding: 0.4rem 0;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.25s ease;
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--text);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%) scale(0);
  transition: transform 0.25s ease;
}

.nav__link.is-active::after {
  transform: translateX(-50%) scale(1);
}

.nav__cta {
  padding: 0.66rem 1.15rem;
  font-size: 0.8rem;
  margin-left: 0.4rem;
}

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

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--panel);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
}

.icon-moon {
  display: none;
}

[data-theme="light"] .icon-sun {
  display: none;
}

[data-theme="light"] .icon-moon {
  display: block;
}

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 50%;
}

.burger span {
  display: block;
  width: 100%;
  height: 1.5px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  isolation: isolate;
  padding: calc(var(--header-h) + clamp(3rem, 7vw, 5.5rem)) 0 0;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 85% 70% at 50% 20%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 85% 70% at 50% 20%, #000 25%, transparent 78%);
  pointer-events: none;
}

.hero__glow {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
}

.hero__glow--1 {
  top: -180px;
  right: -90px;
  width: 520px;
  height: 520px;
  background: var(--glow-1);
}

.hero__glow--2 {
  top: 240px;
  left: -160px;
  width: 460px;
  height: 460px;
  background: var(--glow-2);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: clamp(2.5rem, 5vw, 4.5rem);
}

.hero__content {
  max-width: 640px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.48rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.05);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero__title {
  margin: 1.5rem 0 1.35rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.hero__text {
  max-width: 520px;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.2vw, 1.08rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.1rem;
}

.hero__stats {
  display: flex;
  gap: clamp(1.6rem, 4vw, 2.8rem);
  max-width: 470px;
  margin-top: 2.8rem;
  padding-top: 1.7rem;
  border-top: 1px solid var(--border);
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.stat > span {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
}

/* ---------- Код-карточка ---------- */
.hero__visual {
  position: relative;
  width: 100%;
  max-width: 520px;
  justify-self: end;
}

.code-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background: linear-gradient(180deg, #14141f 0%, #0d0d15 100%);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: perspective(1200px) rotateX(2deg) rotateY(-5deg);
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.hero__visual:hover .code-card {
  transform: perspective(1200px) rotateX(0deg) rotateY(0deg);
}

.code-card__top {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  height: 46px;
  padding: 0 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.025);
}

.code-card__dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.dot--red { background: #ff5f57; }
.dot--yellow { background: #febc2e; }
.dot--green { background: #28c840; }

.code-card__file {
  color: #8f8fa8;
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.code-card__lang {
  margin-left: auto;
  padding: 0.15rem 0.45rem;
  border: 1px solid rgba(139, 124, 255, 0.3);
  border-radius: 5px;
  color: #a99dff;
  font-family: var(--font-mono);
  font-size: 0.58rem;
}

.code-card__code {
  padding: 1.2rem 1.35rem;
  color: #b8bdd4;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.85;
  overflow: hidden;
  tab-size: 2;
}

.tok-key { color: #c792ea; }
.tok-var { color: #82aaff; }
.tok-prop { color: #7fdbca; }
.tok-str { color: #c3e88d; }
.tok-bool { color: #ff9cac; }
.tok-fn { color: #ffcb6b; }

.caret {
  display: inline-block;
  width: 7px;
  height: 14px;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--accent);
  animation: blink 1.1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.code-card__status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(74, 222, 128, 0.04);
  color: #8f9a8f;
  font-family: var(--font-mono);
  font-size: 0.64rem;
}

.code-card__status .status-dot {
  width: 6px;
  height: 6px;
}

.code-card__time {
  margin-left: auto;
  color: #6f768f;
}

.float-card {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.72rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  animation: floaty 6s ease-in-out infinite;
}

.float-card--score {
  top: -1.6rem;
  right: -1.7rem;
  align-items: baseline;
}

.float-card__score {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.float-card__label {
  color: var(--muted);
  font-size: 0.7rem;
}

.float-card--speed {
  bottom: -3.9rem;
  left: -2rem;
  animation-delay: -3s;
}

.float-card__bolt {
  width: 20px;
  height: 20px;
  fill: var(--accent-2);
}

.float-card--speed strong {
  display: block;
  font-size: 0.85rem;
  line-height: 1.2;
}

.float-card--speed span {
  color: var(--muted);
  font-size: 0.65rem;
}

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

/* ---------- Бегущая строка ---------- */
.marquee {
  margin-top: clamp(3rem, 6vw, 5rem);
  padding: 1.1rem 0;
  overflow: hidden;
  border-top: 1px solid var(--border);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 34s linear infinite;
}

.marquee:hover .marquee__track {
  animation-play-state: paused;
}

.marquee__group {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  padding-right: 2.2rem;
}

.marquee__group span {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.marquee__group .marquee__sep {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0;
}

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

/* =========================================================
   About
   ========================================================= */
.about__grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5rem);
}

.about__visual {
  position: relative;
  z-index: 0;
  width: 100%;
  max-width: 400px;
  justify-self: center;
}

.about__visual::before {
  content: "";
  position: absolute;
  inset: 20px -20px -20px 20px;
  z-index: -1;
  border: 1px solid var(--border);
  border-radius: 30px;
}

.about__photo {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  aspect-ratio: 4 / 5;
  padding: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 26px;
  background:
    radial-gradient(circle at 28% 18%, rgba(139, 124, 255, 0.45), transparent 55%),
    radial-gradient(circle at 78% 88%, rgba(34, 211, 238, 0.3), transparent 55%),
    linear-gradient(160deg, #1a1a2e, #0b0b14);
}

.about__photo::before {
  content: "";
  position: absolute;
  top: 43%;
  left: 50%;
  width: 62%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.about__photo::after {
  content: "";
  position: absolute;
  top: 43%;
  left: 50%;
  width: 86%;
  aspect-ratio: 1;
  border: 1px dashed rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: spin 50s linear infinite;
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.about__initials {
  position: absolute;
  top: 42%;
  left: 50%;
  z-index: 1;
  font-family: var(--font-display);
  font-size: clamp(4rem, 8vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.09em;
  line-height: 1;
  transform: translate(-50%, -50%);
  background: linear-gradient(120deg, #a596ff, #5ee7f7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.about__photo-label {
  position: relative;
  z-index: 2;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(10, 10, 18, 0.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.about__photo-label strong {
  display: block;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
}

.about__photo-label span {
  color: #b7b7c9;
  font-size: 0.72rem;
}

.about__badge {
  position: absolute;
  top: 1.5rem;
  right: -1.7rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  animation: floaty 6s ease-in-out infinite;
}

.about__badge strong {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.about__badge span {
  max-width: 110px;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.35;
}

.about__text {
  max-width: 580px;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.about__text:first-of-type {
  margin-top: 1.3rem;
}

.about__list {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.8rem;
}

.about__list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.about__cta {
  margin-top: 2.1rem;
}

/* =========================================================
   Skills
   ========================================================= */
.skills {
  overflow: hidden;
  background: var(--bg-soft);
  border-block: 1px solid var(--border);
}

.skills::before {
  content: "";
  position: absolute;
  top: -220px;
  right: -120px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: var(--glow-1);
  filter: blur(120px);
  opacity: 0.35;
  pointer-events: none;
}

.skills__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.skill-card {
  position: relative;
  padding: 1.75rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--panel);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.skill-card::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--glow-1);
  opacity: 0;
  filter: blur(50px);
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.skill-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.skill-card:hover::before {
  opacity: 0.5;
}

.skill-card__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 1.2rem;
  border: 1px solid rgba(139, 124, 255, 0.25);
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.skill-card__icon svg {
  width: 21px;
  height: 21px;
}

.skill-card h3 {
  position: relative;
  margin-bottom: 1.1rem;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.chips {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chips li {
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.76rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.chips li:hover {
  color: var(--text);
  border-color: var(--accent);
}

/* =========================================================
   Projects
   ========================================================= */
.projects__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(2.2rem, 4vw, 3.2rem);
}

.projects__head .section__head {
  margin-bottom: 0;
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.4rem 1.75rem;
}

.project {
  min-width: 0;
}

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

.project__inner {
  display: block;
}

.project__preview {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
  container-type: inline-size;
  transition: border-color 0.3s ease, box-shadow 0.4s ease;
}

.project__inner:hover .project__preview {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.project__overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 8, 14, 0.45);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.project__overlay span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-size: 0.78rem;
  font-weight: 600;
  transform: translateY(8px);
  transition: transform 0.35s ease;
}

.project__overlay svg {
  width: 14px;
  height: 14px;
}

.project__inner:hover .project__overlay {
  opacity: 1;
}

.project__inner:hover .project__overlay span {
  transform: translateY(0);
}

.project__body {
  padding: 1.2rem 0.15rem 0;
}

.project__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.project__meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.project__flag {
  padding: 0.2rem 0.5rem;
  border: 1px solid rgba(74, 222, 128, 0.25);
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.08);
  color: var(--green);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.project__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  transition: color 0.25s ease;
}

.project__inner:hover .project__title {
  color: var(--accent);
}

.project__year {
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.65rem;
}

.project__desc {
  max-width: 92%;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.project__demo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.8rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.project__demo span {
  margin-right: 0.2rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project__demo a {
  padding: 0.24rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.68rem;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.project__demo a:hover {
  border-color: rgba(139, 124, 255, 0.5);
  background: var(--accent-soft);
  color: var(--text);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.85rem;
}

.tags li {
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-soft);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.66rem;
}

/* ---------- Мини-браузер внутри карточки ---------- */
.pv {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.pv__chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 32px;
  padding: 0 12px;
  background: #e9e8ef;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.pv__dots {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.pv__dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #cfcfda;
}

.pv__dots i:nth-child(1) { background: #ff6058; }
.pv__dots i:nth-child(2) { background: #febc2e; }
.pv__dots i:nth-child(3) { background: #28c840; }

.pv__url {
  flex: 0 1 190px;
  margin: 0 auto;
  padding: 2px 10px;
  overflow: hidden;
  border-radius: 5px;
  background: #f7f7fb;
  color: #7c7c8a;
  font-family: var(--font-mono);
  font-size: 8px;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pv__chrome--dark {
  background: #14141e;
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.pv__chrome--dark .pv__url {
  background: rgba(255, 255, 255, 0.06);
  color: #8a8aa3;
}

.pv__page {
  position: absolute;
  inset: 32px 0 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 12px 14px;
  overflow: hidden;
}

/* Реальный проект: скриншот */
.pv--photo .pv__page {
  display: block;
  padding: 0;
}

.pv-screenshot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.pv-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

.pv-brand {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.pv-navlinks {
  display: flex;
  gap: 7px;
}

.pv-navlinks i {
  width: 17px;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.18;
}

.pv-cart {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2a241e;
  color: #f3ede4;
  font-family: var(--font-mono);
  font-size: 6.5px;
}

.pv-pill {
  padding: 3px 7px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 5.8px;
  opacity: 0.72;
  white-space: nowrap;
}

.pv-kicker {
  font-family: var(--font-mono);
  font-size: 5.8px;
  letter-spacing: 0.14em;
  opacity: 0.55;
}

.pv-btn {
  margin-top: 3px;
  padding: 3.5px 8px;
  border-radius: 999px;
  background: #2a241e;
  color: #f3ede4;
  font-size: 6.2px;
  line-height: 1.4;
  white-space: nowrap;
}

/* Shop */
.pv--shop .pv__page {
  background: #f3ede4;
  color: #2a241e;
}

.pv-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 10px;
  flex: 1;
  min-height: 0;
}

.pv-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.pv-title {
  font-family: var(--font-display);
  font-size: clamp(11px, 4.4cqw, 17px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.pv-text {
  width: 76%;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.13;
}

.pv-text--s {
  width: 50%;
}

.pv-photo {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(150deg, #c9a27a, #8a5b3b);
}

.pv-photo::before {
  content: "";
  position: absolute;
  left: 14%;
  bottom: 17%;
  width: 72%;
  height: 42%;
  border-radius: 26px 26px 8px 8px;
  background: linear-gradient(180deg, #ecdcc8, #cfb193);
  box-shadow: 0 10px 18px rgba(60, 30, 10, 0.22);
}

.pv-photo::after {
  content: "";
  position: absolute;
  left: 22%;
  bottom: 14%;
  width: 56%;
  height: 3px;
  border-radius: 2px;
  background: #5b3a24;
}

.pv-products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  height: 52px;
  flex-shrink: 0;
}

.pv-item {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
}

.pv-item::before {
  content: "";
  position: absolute;
  inset: 4px 4px 17px;
  border-radius: 4px;
  background: linear-gradient(135deg, #e6d5c3, #cbb49a);
}

.pv-item:nth-child(2)::before {
  background: linear-gradient(135deg, #d7dece, #9fae8e);
}

.pv-item:nth-child(3)::before {
  background: linear-gradient(135deg, #e8d3cd, #c49a90);
}

.pv-item::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 24px;
  bottom: 7px;
  height: 3px;
  border-radius: 2px;
  background: rgba(42, 36, 30, 0.16);
}

/* Dashboard */
.pv--dash .pv__page {
  display: flex;
  flex-direction: row;
  gap: 0;
  padding: 0;
  background: #0d0f16;
  color: #e8e8f2;
}

.pv-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 21%;
  flex-shrink: 0;
  padding: 10px 9px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.pv-side__logo {
  width: 16px;
  height: 16px;
  margin-bottom: 2px;
  border-radius: 5px;
  background: linear-gradient(135deg, #8b7cff, #22d3ee);
}

.pv-side__link {
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
}

.pv-side__link.is-active {
  width: 82%;
  background: linear-gradient(90deg, rgba(139, 124, 255, 0.85), rgba(34, 211, 238, 0.5));
}

.pv-side__link:nth-child(3) { width: 74%; }
.pv-side__link:nth-child(4) { width: 66%; }
.pv-side__link:nth-child(5) { width: 78%; }

.pv-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 11px 12px;
}

.pv-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pv-top__title {
  color: #f1f1fa;
  font-family: var(--font-display);
  font-size: 8.5px;
}

.pv-ava {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.pv-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.pv-stats span {
  position: relative;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

.pv-stats span::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  width: 13px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.16);
}

.pv-stats span::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 14px;
  width: 24px;
  height: 5px;
  border-radius: 2px;
  background: linear-gradient(90deg, #8b7cff, #22d3ee);
}

.pv-chart {
  display: flex;
  flex: 1;
  align-items: flex-end;
  gap: 4px;
  min-height: 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.02);
}

.pv-chart i {
  flex: 1;
  height: 30%;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, rgba(139, 124, 255, 0.9), rgba(139, 124, 255, 0.15));
}

.pv-chart i:nth-child(2) { height: 48%; }
.pv-chart i:nth-child(3) { height: 38%; }
.pv-chart i:nth-child(4) { height: 62%; }
.pv-chart i:nth-child(5) { height: 54%; }
.pv-chart i:nth-child(6) { height: 78%; }
.pv-chart i:nth-child(7) { height: 45%; }
.pv-chart i:nth-child(8) { height: 88%; }
.pv-chart i:nth-child(9) { height: 66%; }

/* Studio */
.pv--studio .pv__page {
  background: #e9e6df;
  color: #181817;
}

.pv-studio-hero {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 12px;
  flex: 1;
  min-height: 0;
}

.pv-studio-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.pv-studio-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(14px, 5.2cqw, 25px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.pv-studio-title em {
  color: #8a6f4d;
}

.pv-studio-meta {
  display: flex;
  gap: 8px;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 5.8px;
  opacity: 0.55;
}

.pv-studio-img {
  position: relative;
  overflow: hidden;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(155deg, #b9ae9c, #6d6558);
}

.pv-studio-img::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(115deg, transparent 0 18px, rgba(255, 255, 255, 0.08) 18px 19px);
}

.pv-studio-img::after {
  content: "";
  position: absolute;
  top: 26%;
  left: 27%;
  width: 46%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
}

/* Food */
.pv--food .pv__page {
  background: #f7f3e9;
  color: #23301f;
}

.pv--food .pv-brand,
.pv--food .pv-pill {
  color: #2f6b3a;
}

.pv-food-hero {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-height: 0;
}

.pv-food-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.pv-food-title {
  font-family: var(--font-display);
  font-size: clamp(13px, 4.4cqw, 19px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.pv-food-title em {
  color: #4f8a3d;
}

.pv-btn--green {
  background: #2f6b3a;
  color: #f7f3e9;
}

.pv-plate {
  position: relative;
  width: min(82%, 150px);
  aspect-ratio: 1;
  margin-left: auto;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f6e6c1, #e8c781 55%, #d3a95a);
  box-shadow: inset 0 0 0 7px #fffdf7, 0 12px 22px rgba(80, 60, 15, 0.16);
}

.pv-plate::before {
  content: "";
  position: absolute;
  inset: 27%;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #9ccb6e, #4f8a3d 72%);
}

.pv-plate::after {
  content: "";
  position: absolute;
  top: 23%;
  left: 25%;
  width: 20%;
  height: 12%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: rotate(-28deg);
}

.pv-food-badges {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.pv-food-badges span {
  padding: 2.5px 6px;
  border: 1px solid rgba(47, 107, 58, 0.25);
  border-radius: 999px;
  background: rgba(47, 107, 58, 0.05);
  color: #3f6b36;
  font-size: 5.6px;
  white-space: nowrap;
}

/* =========================================================
   Process
   ========================================================= */
.process {
  overflow: hidden;
}

.process__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}

.step {
  position: relative;
  padding: 1.6rem 1.4rem 1.8rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--panel), transparent);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.step::before {
  content: attr(data-num);
  position: absolute;
  right: 0.9rem;
  bottom: -0.5rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 4.6rem;
  font-weight: 700;
  line-height: 1;
  opacity: 0.035;
  pointer-events: none;
}

.step:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.step__num {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
}

.step h3 {
  margin: 1rem 0 0.55rem;
  font-family: var(--font-display);
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.step p {
  color: var(--muted);
  font-size: 0.86rem;
}

/* =========================================================
   Contact
   ========================================================= */
.contact {
  overflow: hidden;
}

.contact__box {
  position: relative;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(2rem, 5vw, 4rem);
  padding: clamp(1.6rem, 4.5vw, 3.5rem);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    radial-gradient(circle at 0% 0%, var(--accent-soft), transparent 45%),
    linear-gradient(160deg, var(--panel), var(--bg-soft));
  box-shadow: var(--shadow);
}

.contact__box::before {
  content: "";
  position: absolute;
  top: -150px;
  left: -100px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: var(--glow-1);
  filter: blur(90px);
  opacity: 0.7;
  pointer-events: none;
}

.contact__info,
.form {
  position: relative;
}

.contact__title {
  max-width: 480px;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.2vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.contact__text {
  max-width: 440px;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.contact__links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 1.9rem;
}

.contact__link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  max-width: 300px;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-soft);
  transition: border-color 0.25s ease, transform 0.25s ease, background-color 0.25s ease;
}

.contact__link:hover {
  transform: translateX(4px);
  border-color: var(--accent);
  background: var(--panel);
}

.contact__link--static {
  cursor: default;
}

.contact__link--static:hover {
  transform: none;
  border-color: var(--border);
  background: var(--bg-soft);
}

.contact__link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--accent);
}

.contact__link span {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.contact__link small {
  color: var(--muted);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact__link strong {
  overflow: hidden;
  font-size: 0.83rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact__status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.6rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
  align-self: center;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-soft);
  color: var(--text);
  font-size: 0.88rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
  opacity: 0.55;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--panel);
  box-shadow: 0 0 0 3px rgba(139, 124, 255, 0.14);
}

.form .btn {
  width: 100%;
  margin-top: 0.15rem;
}

.form__note {
  color: var(--muted);
  font-size: 0.7rem;
  text-align: center;
}

.form__status {
  min-height: 1.1em;
  margin-top: -0.2rem;
  color: var(--accent);
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: center;
}

/* =========================================================
   Footer
   ========================================================= */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.logo--footer {
  font-size: 0.95rem;
}

.footer__copy {
  color: var(--muted);
  font-size: 0.76rem;
}

.footer__socials {
  display: flex;
  gap: 0.5rem;
}

.footer__social {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.footer__social:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--text);
}

.footer__social svg {
  width: 16px;
  height: 16px;
}

/* ---------- Кнопка наверх ---------- */
.to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease,
    border-color 0.25s ease;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  border-color: var(--accent);
}

.to-top svg {
  width: 17px;
  height: 17px;
}

/* =========================================================
   Адаптивность
   ========================================================= */
@media (max-width: 1120px) {
  .nav__cta {
    display: none;
  }
}

@media (max-width: 1000px) {
  .process__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 980px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }

  .hero__content {
    max-width: 720px;
  }

  .hero__visual {
    justify-self: center;
    max-width: 560px;
  }

  .hero__stats {
    max-width: 520px;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .about__visual {
    max-width: 360px;
  }

  .about__content {
    max-width: 700px;
  }

  .contact__box {
    grid-template-columns: 1fr;
  }

  .contact__title {
    max-width: 620px;
  }

  .contact__links {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
  }

  .contact__link {
    width: auto;
    min-width: 240px;
  }

  .form {
    max-width: 620px;
  }
}

@media (max-width: 900px) {
  .burger {
    display: flex;
  }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    box-shadow: var(--shadow);
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  }

  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav__link {
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
  }

  .nav__link::after {
    display: none;
  }

  .nav__cta {
    display: inline-flex;
    justify-content: center;
    margin: 1.25rem 0 0;
    padding: 0.85rem 1.2rem;
    font-size: 0.88rem;
  }

  body.nav-open {
    overflow: hidden;
  }

  .burger.is-active span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }

  .burger.is-active span:nth-child(2) {
    opacity: 0;
  }

  .burger.is-active span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }

  .skills__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .skill-card:last-child {
    grid-column: span 2;
  }

  .projects__head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .projects__grid {
    grid-template-columns: 1fr;
    gap: 2.2rem;
  }

  .project__desc {
    max-width: 100%;
  }

  .code-card {
    transform: none;
  }

  .float-card--score {
    top: -1.2rem;
    right: -0.5rem;
  }

  .float-card--speed {
    bottom: -3.2rem;
    left: -0.5rem;
  }

  .footer__inner {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 68px;
  }

  .container {
    width: min(100% - 2rem, var(--container));
  }

  .hero__stats {
    gap: 1.4rem;
  }

  .hero__actions .btn {
    padding: 0.85rem 1.2rem;
    font-size: 0.85rem;
  }

  .about__visual {
    max-width: 330px;
  }

  .about__visual::before {
    inset: 12px -12px -12px 12px;
  }

  .about__badge {
    top: 1rem;
    right: -0.5rem;
  }

  .skills__grid {
    grid-template-columns: 1fr;
  }

  .skill-card:last-child {
    grid-column: auto;
  }

  .process__grid {
    grid-template-columns: 1fr;
  }

  .form__row {
    grid-template-columns: 1fr;
  }

  .contact__box {
    border-radius: 22px;
  }

  .contact__links {
    flex-direction: column;
  }

  .contact__link {
    width: 100%;
    max-width: none;
  }

  .code-card__code {
    padding: 1rem;
    font-size: 11.5px;
    line-height: 1.8;
  }

  .code-card__top {
    height: 42px;
  }

  .float-card {
    display: none;
  }

  .hero__glow--1 {
    width: 360px;
    height: 360px;
    opacity: 0.7;
  }

  .hero__glow--2 {
    width: 320px;
    height: 320px;
    opacity: 0.7;
  }

  .marquee {
    margin-top: 3rem;
  }
}

@media (max-width: 460px) {
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__stats {
    justify-content: space-between;
    gap: 0.8rem;
  }

  .about__visual {
    max-width: 300px;
  }

  .about__initials {
    font-size: 4rem;
  }

  .code-card__status {
    font-size: 0.58rem;
  }

  .to-top {
    right: 1rem;
    bottom: 1rem;
    width: 40px;
    height: 40px;
  }
}

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .marquee__track {
    animation: none;
    transform: none;
  }
}


