/* =========================================================
   lamos.top — студия веб-дизайна
   Стили: тёмная/светлая тема, адаптив, анимации
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --bg: #050912;
  --bg-soft: #080e1b;
  --surface: #0b1322;
  --surface-2: #101b30;
  --surface-3: #16243f;
  --border: rgba(111, 170, 255, 0.12);
  --border-strong: rgba(111, 170, 255, 0.24);
  --text: #f2f6ff;
  --text-soft: #c9d6ea;
  --muted: #93a6c4;
  --accent: #2f8cff;
  --accent-text: #6cc4ff;
  --accent-2: #8a6cff;
  --accent-soft: rgba(47, 140, 255, 0.16);
  --green: #3ddc97;
  --green-soft: rgba(61, 220, 151, 0.14);
  --shadow: 0 28px 70px rgba(0, 3, 12, 0.55);
  --shadow-sm: 0 12px 30px rgba(0, 3, 12, 0.35);
  --radius: 20px;
  --radius-sm: 13px;
  --maxw: 1160px;
  --header-h: 74px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f4f7fd;
  --bg-soft: #eaf0fa;
  --surface: #ffffff;
  --surface-2: #f5f8ff;
  --surface-3: #e6eefb;
  --border: rgba(15, 45, 95, 0.12);
  --border-strong: rgba(15, 45, 95, 0.22);
  --text: #0a1424;
  --text-soft: #263a55;
  --muted: #4f627d;
  --accent: #1466e8;
  --accent-text: #0b57c9;
  --accent-2: #6a4dff;
  --accent-soft: rgba(20, 102, 232, 0.1);
  --green: #128a5a;
  --green-soft: rgba(18, 138, 90, 0.1);
  --shadow: 0 28px 70px rgba(20, 40, 80, 0.16);
  --shadow-sm: 0 12px 30px rgba(20, 40, 80, 0.1);
  color-scheme: light;
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.35s ease, color 0.35s ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(46rem 34rem at 82% -6%, rgba(47, 140, 255, 0.18), transparent 65%),
    radial-gradient(40rem 30rem at -8% 34%, rgba(138, 108, 255, 0.12), transparent 60%);
}

[data-theme="light"] body::before {
  background:
    radial-gradient(46rem 34rem at 82% -6%, rgba(20, 102, 232, 0.1), transparent 65%),
    radial-gradient(40rem 30rem at -8% 34%, rgba(106, 77, 255, 0.07), transparent 60%);
}

h1, h2, h3, h4, p, figure, blockquote, dl, dd, ol, ul {
  margin: 0;
  padding: 0;
}

ol, ul { list-style: none; }

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

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

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

button { cursor: pointer; }

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

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

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 12px 20px;
  border-radius: 10px;
  background: var(--accent);
  color: #101218;
  font-weight: 700;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 16px; }

/* ---------- Layout ---------- */
.container {
  width: min(var(--maxw), 100% - 48px);
  margin-inline: auto;
}

.container--narrow { max-width: 840px; }

.section {
  position: relative;
  padding-block: clamp(72px, 9vw, 118px);
}

.section--soft { background: var(--bg-soft); }

.section--soft::before,
.section--soft::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}
.section--soft::before { top: 0; }
.section--soft::after { bottom: 0; }

.section__head {
  max-width: 720px;
  margin-bottom: clamp(36px, 5vw, 60px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  color: var(--accent-text);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.section__title {
  font-size: clamp(1.9rem, 4vw, 2.85rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.section__lead {
  margin-top: 18px;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.7;
}

.grad {
  background: linear-gradient(100deg, var(--accent-2) 0%, var(--accent) 55%, #9db8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.97rem;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), background-color 0.25s ease,
    border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.btn svg { transition: transform 0.25s var(--ease); }

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

.btn--primary {
  background: linear-gradient(135deg, #0e5fd8 0%, #6a3df0 100%);
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(32, 92, 255, 0.32);
}
.btn--primary:hover {
  box-shadow: 0 18px 40px rgba(74, 92, 255, 0.42);
}

.btn--ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent-text);
  background: var(--accent-soft);
}

.btn--sm {
  min-height: 42px;
  padding: 0 20px;
  font-size: 0.88rem;
}

.btn--full { width: 100%; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent-text);
}

.icon { width: 19px; height: 19px; }

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

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

.header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom-color: var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--mono);
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.logo__mark {
  display: inline-flex;
  filter: drop-shadow(0 6px 14px rgba(47, 140, 255, 0.38));
}

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

.nav__panel {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__link {
  position: relative;
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 550;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.nav__link:hover { color: var(--text); }
.nav__link.is-active { color: var(--text); }
.nav__link.is-active::after { transform: scaleX(1); }

.nav__cta { display: none; margin-left: 10px; }

.header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  border-color: transparent;
  background: transparent;
}

.burger span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.2s ease;
}

.nav.is-open ~ .header__actions .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-open ~ .header__actions .burger span:nth-child(2) { opacity: 0; }
.nav.is-open ~ .header__actions .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(48px, 8vw, 92px));
  padding-bottom: clamp(48px, 6vw, 78px);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(48rem 32rem at 76% 8%, var(--accent-soft), transparent 62%),
    radial-gradient(38rem 30rem at 14% 48%, rgba(79, 209, 197, 0.1), transparent 65%);
}

.hero__bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 68px 68px;
  opacity: 0.34;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000 10%, transparent 78%);
  mask-image: radial-gradient(70% 60% at 50% 30%, #000 10%, transparent 78%);
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  align-items: center;
  gap: clamp(40px, 5vw, 72px);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 550;
  letter-spacing: 0.01em;
}

.status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5);
  animation: pulse 2.4s ease-out infinite;
  flex-shrink: 0;
}

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

.hero__title {
  margin-top: 22px;
  font-size: clamp(2.45rem, 5.7vw, 4.45rem);
  font-weight: 720;
  line-height: 1.04;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.hero__lead {
  margin-top: 22px;
  max-width: 52ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  line-height: 1.72;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
  color: var(--muted);
  font-size: 0.83rem;
}

.hero__meta .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border-strong);
}

/* Hero visual */
.hero__visual {
  position: relative;
  perspective: 1200px;
}

.code-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #0c0e16;
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: rotate(-1.1deg);
  transition: transform 0.5s var(--ease);
  color: #e8eaf2;
}

.code-card:hover { transform: rotate(0deg) translateY(-4px); }

.code-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(130deg, rgba(255, 176, 75, 0.5), transparent 34%, transparent 66%, rgba(79, 209, 197, 0.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.code-card__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.025);
}

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

.code-card__dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3a3f52;
}

.code-card__dots i:first-child { background: #ff6a5f; }
.code-card__dots i:nth-child(2) { background: #ffc04b; }
.code-card__dots i:nth-child(3) { background: #4ade80; }

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

.code-card__badge {
  margin-left: auto;
  padding: 2px 9px;
  border: 1px solid rgba(74, 222, 128, 0.35);
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.1);
  color: #7ee2a1;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.code {
  margin: 0;
  padding: 22px 20px 24px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: clamp(0.7rem, 1.08vw, 0.84rem);
  line-height: 1.85;
  tab-size: 2;
  scrollbar-width: thin;
}

.code code { font-family: inherit; }

.tok-com { color: #5f6b82; }
.tok-key { color: #ff9c6b; }
.tok-prop { color: #7cc7ff; }
.tok-str { color: #9be29b; }
.tok-num { color: #ffd479; }
.tok-fn { color: #c9a2ff; }

.code-card__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 54px;
}

.code-card__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: #a7aec1;
  font-size: 0.72rem;
}

.code-card__pill svg { color: #4ade80; }

.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: float 6s ease-in-out infinite;
}

.float-card--speed {
  top: -22px;
  right: -16px;
}

.float-card--projects {
  bottom: -26px;
  left: -20px;
  animation-delay: -3s;
}

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

.float-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  flex-shrink: 0;
}

.float-card__icon--green {
  background: var(--green-soft);
  color: var(--green);
}

.float-card__icon--accent {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.float-card__value {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
}

.float-card__value strong {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--green);
}

.float-card--projects .float-card__value strong { color: var(--accent-text); }

.float-card__caption {
  display: block;
  color: var(--muted);
  font-size: 0.71rem;
  line-height: 1.3;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(56px, 8vw, 88px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
  overflow: hidden;
}

.stat {
  padding: 24px 26px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
}

.stat__value {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.stat__suffix {
  color: var(--accent-text);
  font-size: 0.62em;
}

.stat__label {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

/* ---------- Cards / grids ---------- */
.grid {
  display: grid;
  gap: 20px;
}

.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1.5px 0 rgba(255, 255, 255, 0.03) inset;
  transition: transform 0.3s var(--ease), border-color 0.3s ease,
    box-shadow 0.3s ease, background-color 0.3s ease;
}

/* ---------- Services ---------- */
.service {
  padding: 28px 26px;
  overflow: hidden;
}

.service::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  top: -90px;
  right: -70px;
  border-radius: 50%;
  background: var(--accent-soft);
  opacity: 0;
  filter: blur(20px);
  transition: opacity 0.35s ease;
}

.service:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: var(--shadow-sm);
}

.service:hover::after { opacity: 1; }

.service__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--accent-text);
  transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease);
}

.service:hover .service__icon {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  transform: scale(1.05) rotate(-3deg);
}

.service__title {
  font-size: 1.13rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.service__text {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.68;
}

.service__meta {
  display: inline-block;
  margin-top: 18px;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 0.69rem;
  letter-spacing: 0.02em;
}

/* ---------- Chips ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.chip {
  padding: 4px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.chips--lg { margin-top: 24px; gap: 8px; }
.chips--lg .chip { padding: 6px 13px; font-family: var(--mono); font-size: 0.72rem; }

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(40px, 6vw, 84px);
  align-items: start;
}

.about__visual {
  position: sticky;
  top: calc(var(--header-h) + 28px);
}

.profile-card {
  position: relative;
  padding: 34px 28px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.profile-card__glow {
  position: absolute;
  top: -120px;
  left: 50%;
  width: 320px;
  height: 320px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft), transparent 65%);
  pointer-events: none;
}

.profile-card__avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 118px;
  height: 118px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 176, 75, 0.9), transparent 55%),
    linear-gradient(140deg, #ff8a5c, #e2532a 60%, #6f2a18);
  box-shadow: 0 18px 40px rgba(255, 106, 61, 0.3);
}

.profile-card__avatar::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px dashed var(--border-strong);
  border-radius: 50%;
}

.profile-card__avatar span {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #1a0f09;
}

.profile-card__name {
  font-size: 1.24rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.profile-card__role {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.84rem;
}

.profile-card__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 6px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 0.76rem;
}

.profile-card__status .status__dot { width: 7px; height: 7px; }

.profile-card__list {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  text-align: left;
}

.profile-card__list li {
  display: flex;
  align-items: baseline;
  gap: 9px;
  color: var(--muted);
  font-size: 0.83rem;
}

.profile-card__list li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  transform: translateY(-2px);
}

.profile-card__list strong { color: var(--text); font-weight: 620; }

.about__content .section__title { margin-bottom: 20px; }

.about__text {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.75;
}
.about__text + .about__text { margin-top: 14px; }

.checklist {
  display: grid;
  gap: 11px;
  margin-top: 26px;
}

.checklist li {
  position: relative;
  padding-left: 30px;
  color: var(--text-soft);
  font-size: 0.93rem;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234ade80' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

[data-theme="light"] .checklist li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23178a4c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

.skills {
  display: grid;
  gap: 16px;
  margin-top: 30px;
}

.skill__top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 7px;
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 550;
}

.skill__top span:last-child {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.74rem;
}

.bar {
  height: 7px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}

.bar__fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transition: width 1.1s var(--ease);
}

/* ---------- Process ---------- */
.process {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.process__step {
  position: relative;
  padding: 28px 24px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s ease;
}

.process__step:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}

.process__step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  width: 38px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
}

.process__num {
  display: block;
  margin-bottom: 30px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1;
}

.process__title {
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.process__text {
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

/* ---------- Contact ---------- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: start;
}

.contact__info .section__title { margin-bottom: 18px; }

.contact__list {
  display: grid;
  gap: 18px;
  margin-top: 32px;
}

.contact__list li {
  display: flex;
  align-items: center;
  gap: 14px;
}

.contact__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--accent-text);
  flex-shrink: 0;
}

.contact__label {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.contact__value {
  display: block;
  margin-top: 1px;
  font-size: 0.96rem;
  font-weight: 550;
  transition: color 0.2s ease;
}

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

.contact__value--plain { font-weight: 450; color: var(--text-soft); }

.contact__note {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 32px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8rem;
}

.form-card { padding: 28px; }

.form {
  display: grid;
  gap: 18px;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field { display: grid; gap: 7px; }

.field__label {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 550;
}

.field__input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.field__input::placeholder { color: var(--muted); opacity: 0.72; }

.field__input:hover { border-color: var(--border-strong); }

.field__input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field__input--area {
  min-height: 116px;
  resize: vertical;
  line-height: 1.6;
}

.field__select { position: relative; }

.field__select select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px;
  cursor: pointer;
}

.field__select > svg {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.field.has-error .field__input {
  border-color: #ff6a5f;
  box-shadow: 0 0 0 3px rgba(255, 106, 95, 0.12);
}

.field__error {
  min-height: 0;
  color: #ff8a80;
  font-size: 0.76rem;
  line-height: 1.4;
}

.field__error:empty { display: none; }

[data-theme="light"] .field__error { color: #c62f23; }

.field--check {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
}

.checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 19px;
  height: 19px;
  margin: 2px 0 0;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: var(--surface-2);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.checkbox:checked {
  border-color: var(--accent);
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316100a' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.checkbox__label {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
  cursor: pointer;
  user-select: none;
}

.field--check .field__error { grid-column: 2; }

.field--honey {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.form__error {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, #ff6a5f 42%, var(--border));
  border-radius: 13px;
  background: rgba(255, 106, 95, 0.08);
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.6;
}

.form__error[hidden] { display: none; }
.form__error strong { color: var(--text); }

.form__error a {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

[data-theme="light"] .form__error { background: rgba(198, 47, 35, 0.07); }

.form.is-sent .form__error { display: none; }

.form__hint {
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.45;
  text-align: center;
}

.form__hint a {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form__hint a:hover { opacity: 0.75; }

.form__success {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--green) 38%, var(--border));
  border-radius: 13px;
  background: var(--green-soft);
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.6;
}

.form__success[hidden] { display: none; }

.form__success strong { color: var(--text); }

.form__success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--green);
  color: #08130c;
  flex-shrink: 0;
}

.form__again {
  margin-top: 9px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-text);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s ease;
}

.form__again:hover { opacity: 0.72; }

.form.is-sent .form__row,
.form.is-sent > .field,
.form.is-sent > .btn,
.form.is-sent > .form__hint { display: none; }

/* ---------- Footer ---------- */
.footer {
  padding-block: 46px 32px;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: start;
}

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

.footer__tagline {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.84rem;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  padding-top: 5px;
}

.footer__nav a {
  color: var(--muted);
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

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

.footer__bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
}

.footer__bottom a {
  color: var(--muted);
  transition: color 0.2s ease;
}

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

.footer--simple { padding-block: 34px; }

.footer--simple .footer__bottom {
  padding-top: 0;
  border-top: 0;
}

/* ---------- Legal page ---------- */
.header--solid {
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom-color: var(--border);
}

.legal {
  padding-top: calc(var(--header-h) + clamp(44px, 7vw, 84px));
  padding-bottom: clamp(56px, 8vw, 96px);
}

.legal__title {
  margin-top: 6px;
  font-size: clamp(2rem, 4.4vw, 3rem);
  font-weight: 720;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.legal__meta {
  margin-top: 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
}

.legal__content {
  max-width: 780px;
  margin-top: clamp(30px, 4vw, 44px);
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.legal__content h2 {
  margin-top: 32px;
  font-size: 1.18rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.legal__content h2:first-child { margin-top: 24px; }

.legal__content p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.75;
}

.legal__content ul {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.legal__content li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.legal__content li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.68em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.legal__content a {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal__content strong { color: var(--text-soft); font-weight: 600; }

.legal__back { margin-top: 40px; }

@media (max-width: 520px) {
  .legal__back-link { padding-inline: 14px; }
}

/* ---------- To top ---------- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s var(--ease),
    border-color 0.2s ease, color 0.2s ease;
}

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

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

/* ---------- Reveal animations ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--d, 0ms);
}

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

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .hero__inner { gap: 40px; }

  .float-card--speed { top: -16px; right: -6px; }
  .float-card--projects { bottom: -18px; left: -6px; }
}

@media (max-width: 900px) {
  .header__actions { margin-left: auto; }

  .nav {
    display: contents;
  }

  .nav__panel {
    position: fixed;
    top: calc(var(--header-h) + 8px);
    left: 16px;
    right: 16px;
    z-index: 90;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px) scale(0.99);
    transform-origin: top center;
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s var(--ease);
  }

  .nav.is-open .nav__panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .nav__link { padding: 12px 14px; font-size: 0.96rem; }
  .nav__link::after { display: none; }
  .nav__link.is-active { background: var(--accent-soft); color: var(--accent-text); }

  .nav__cta {
    display: inline-flex;
    margin: 8px 2px 2px;
    width: calc(100% - 4px);
  }

  .burger { display: flex; }

  .hero__inner { grid-template-columns: 1fr; }
  .hero__content { max-width: 680px; }
  .hero__visual { max-width: 560px; width: 100%; }
  .stats { margin-top: 64px; }

  .about { grid-template-columns: 1fr; }
  .about__visual { position: static; max-width: 420px; }

  .contact { grid-template-columns: 1fr; }
  .contact__info { max-width: 640px; }
}

@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 20px; }

  .footer__inner { grid-template-columns: 1fr; }
  .footer__nav { padding-top: 0; }
  .footer__bottom { flex-direction: column; gap: 6px; }

  .form-card { padding: 22px; }
  .form__row { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .container { width: min(var(--maxw), 100% - 34px); }

  :root { --header-h: 66px; }

  .grid--3 { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr; }

  .hero__title { font-size: clamp(2.2rem, 11vw, 3rem); }

  .float-card { padding: 9px 11px; }
  .float-card--speed { top: -14px; right: -4px; }
  .float-card--projects { bottom: -14px; left: -4px; }
  .float-card__icon { width: 32px; height: 32px; border-radius: 9px; }
  .float-card__value { font-size: 0.74rem; }
  .float-card__caption { font-size: 0.65rem; }

  .code { font-size: 0.66rem; padding: 18px 14px 20px; }
  .code-card { transform: none; }

  .section { padding-block: 66px; }

  .profile-card { padding: 28px 22px 24px; }

  .footer__bottom { font-size: 0.74rem; }

  .to-top { right: 16px; bottom: 16px; }
}

@media (max-width: 420px) {
  .hero__actions .btn { width: 100%; }
  .hero__meta { font-size: 0.76rem; gap: 8px; }
  .stats { grid-template-columns: 1fr; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}
