/* ============================================================
   Резюме — Константин Шерстюк
   Premium dark theme · disciplined single accent · warm neutrals
   ============================================================ */

:root {
  /* surfaces — deep, not pure black, a hair of warmth */
  --bg:        #0B0D10;
  --bg-2:      #0E1014;
  --surface:   #14171D;
  --surface-2: #181C23;
  --surface-3: #1E232B;

  /* hairlines */
  --line:   rgba(255, 255, 255, 0.075);
  --line-2: rgba(255, 255, 255, 0.13);

  /* text — warm whites for the slight warmth the brief asks for */
  --text:   #ECE9E3;
  --dim:    #ABA79F;
  --faint:  #76726B;

  /* accent — disciplined, single. Default: electric (cool, premium). */
  --accent:       #5B7CFF;
  --accent-ink:   #0A0C12;          /* text that sits on the accent fill */
  --accent-soft:  color-mix(in srgb, var(--accent) 16%, transparent);
  --accent-line:  color-mix(in srgb, var(--accent) 38%, transparent);
  --accent-faint: color-mix(in srgb, var(--accent) 9%, transparent);
  --accent-text:  color-mix(in srgb, var(--accent) 72%, #ffffff);

  /* hero glow intensity (tweakable) */
  --glow: 0.9;

  --maxw: 1140px;
  --pad: clamp(20px, 5vw, 56px);
  --radius: 20px;
  --radius-sm: 13px;

  --font-display: 'Onest', system-ui, sans-serif;
  --font-body: 'Golos Text', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -0.002em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------- layout primitives ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }

section { position: relative; }

.section-pad { padding-block: clamp(72px, 12vw, 160px); }

.kicker {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-text);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 26px;
}
.kicker::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--accent-line);
}

.section-head { margin-bottom: clamp(40px, 6vw, 72px); }
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0;
  max-width: 16ch;
  text-wrap: balance;
}
.section-head .lede {
  margin: 22px 0 0;
  color: var(--dim);
  font-size: clamp(17px, 2.2vw, 20px);
  max-width: 56ch;
  text-wrap: pretty;
}

/* ============================================================
   Top bar
   ============================================================ */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--pad);
  transition: background .4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.topbar.scrolled {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 11px;
}
.brand .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
}
.brand .role-mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--faint);
  text-transform: uppercase;
}
.topbar .scroll-progress {
  position: absolute;
  left: 0; bottom: -1px; height: 2px;
  width: var(--p, 0%);
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

/* ---------- buttons ---------- */
.btn {
  --b: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: transform .35s var(--ease), background .3s var(--ease),
              border-color .3s var(--ease), box-shadow .35s var(--ease), color .3s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-2px); border-color: var(--line-2); background: var(--surface-2); }
.btn .arrow { transition: transform .35s var(--ease); }
.btn:hover .arrow { transform: translate(3px, -3px); }

.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
  box-shadow: 0 8px 30px -8px color-mix(in srgb, var(--accent) 60%, transparent);
}
.btn.primary:hover {
  background: color-mix(in srgb, var(--accent) 90%, #ffffff);
  box-shadow: 0 14px 40px -8px color-mix(in srgb, var(--accent) 75%, transparent);
}
.btn.small { padding: 10px 16px; font-size: 13.5px; }
.btn.ghost { border-color: var(--line); color: var(--dim); }
.btn.ghost:hover { color: var(--text); }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; padding-top: 120px; overflow: clip; }
.hero-glow {
  position: absolute;
  pointer-events: none;
  top: -18%; left: 50%;
  width: min(1100px, 120vw); height: 760px;
  transform: translateX(-50%);
  background:
    radial-gradient(46% 52% at 50% 40%,
      color-mix(in srgb, var(--accent) calc(34% * var(--glow)), transparent) 0%,
      transparent 70%);
  filter: blur(20px);
  opacity: var(--glow);
  z-index: 0;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  padding-bottom: clamp(56px, 9vw, 110px);
}
.hero-copy { order: 2; }
.hero-photo { order: 1; }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(48px, 9vw, 104px);
  line-height: 0.94;
  letter-spacing: -0.045em;
  margin: 18px 0 0;
  text-wrap: balance;
}
.hero h1 .ln { display: block; }
.hero .title-row {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: clamp(13px, 1.6vw, 15px);
  letter-spacing: 0.04em;
  color: var(--accent-text);
  text-transform: uppercase;
}
.hero .title-row .bar { width: 30px; height: 1px; background: var(--accent-line); }
.hero .subtitle {
  margin: 28px 0 0;
  font-size: clamp(20px, 2.6vw, 27px);
  line-height: 1.32;
  font-weight: 500;
  letter-spacing: -0.02em;
  max-width: 20ch;
  color: var(--text);
}
.hero .meta {
  margin: 26px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--dim);
  letter-spacing: 0.01em;
}
.hero .meta span { display: inline-flex; align-items: center; gap: 18px; }
.hero .meta span:not(:last-child)::after {
  content: "·"; color: var(--accent); font-weight: 700;
}
.hero .cta { margin-top: 38px; display: flex; flex-wrap: wrap; gap: 14px; }

.portrait-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-2);
  aspect-ratio: 1085 / 1449;
  background: var(--surface);
  box-shadow: 0 40px 90px -40px rgba(0,0,0,0.8),
              0 0 0 1px var(--line);
}
.portrait-frame::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, color-mix(in srgb, var(--bg) 70%, transparent) 100%);
  pointer-events: none;
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; }
#portrait-hero { width: 100%; height: 100%; display: block; }
.mini-photo image-slot { width: 100%; height: 100%; display: block; }
.portrait-frame .glow-edge {
  position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 80px -30px color-mix(in srgb, var(--accent) calc(60% * var(--glow)), transparent);
  pointer-events: none; z-index: 2;
}

/* scroll hint */
.scroll-hint {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--faint);
  padding-bottom: 40px;
}
.scroll-hint .line {
  width: 1px; height: 34px;
  background: linear-gradient(var(--accent), transparent);
  animation: dropline 2.4s var(--ease) infinite;
}
@keyframes dropline {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  40% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  60% { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about { background: var(--bg-2); border-top: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: 0.4fr 0.6fr; gap: clamp(28px, 5vw, 80px); }
.about-lead {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 3.6vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0;
  text-wrap: balance;
}
.about-lead em { color: var(--accent-text); font-style: normal; }
.about-body p { margin: 0 0 18px; color: var(--dim); font-size: clamp(16px, 1.9vw, 18.5px); text-wrap: pretty; }
.about-body p:last-child { margin-bottom: 0; }
.about-body strong { color: var(--text); font-weight: 600; }
.about-tags {
  margin-top: 30px; display: flex; flex-wrap: wrap; gap: 10px;
}
.about-tags .pill {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em;
  color: var(--dim);
  padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
}

/* ============================================================
   EXPERIENCE / CASES
   ============================================================ */
.cases { display: flex; flex-direction: column; gap: clamp(20px, 3vw, 30px); }

.case {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: clamp(26px, 3.6vw, 48px);
  transition: transform .5s var(--ease), border-color .5s var(--ease), box-shadow .5s var(--ease), background .5s var(--ease);
  overflow: hidden;
}
.case::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(120% 140% at 100% 0%, var(--accent-faint), transparent 55%);
  opacity: 0; transition: opacity .5s var(--ease);
  pointer-events: none;
}
.case:hover {
  transform: translateY(-4px);
  border-color: var(--accent-line);
  background: var(--surface-2);
  box-shadow: 0 30px 70px -40px rgba(0,0,0,0.9);
}
.case:hover::before { opacity: 1; }

.case-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: start;
}
.logo-chip {
  width: 60px; height: 60px; flex: none;
  border-radius: 14px;
  background: #ffffff;
  display: grid; place-items: center;
  overflow: hidden;
  border: 1px solid var(--line-2);
  padding: 9px;
}
.logo-chip img { width: 100%; height: 100%; object-fit: contain; }
.logo-chip.bleed { padding: 0; }
.logo-chip.bleed img { object-fit: cover; }

.case-id {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--faint);
  letter-spacing: 0.08em;
  align-self: center;
  justify-self: end;
}
.case-title h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 2.8vw, 30px);
  letter-spacing: -0.025em;
  margin: 0;
  line-height: 1.1;
}
.case-title h3 a { transition: color .25s; }
.case-title h3 a:hover { color: var(--accent-text); }
.case-title h3 a .ext { font-size: 0.62em; vertical-align: super; color: var(--faint); margin-left: 4px; }
.case-meta {
  margin-top: 7px;
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  font-size: 14.5px; color: var(--dim);
}
.case-meta .role { color: var(--text); font-weight: 500; }
.case-meta .dates { font-family: var(--font-mono); font-size: 12.5px; color: var(--faint); letter-spacing: 0.02em; }
.case-context {
  margin: 22px 0 0;
  color: var(--dim);
  font-size: 15.5px;
  padding-left: 16px;
  border-left: 2px solid var(--line-2);
}

/* problem-solution-result + metric */
.case-body {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(26px, 4vw, 56px);
  align-items: start;
}
.psr { display: flex; flex-direction: column; gap: 20px; }
.psr-item { display: grid; grid-template-columns: 116px 1fr; gap: 18px; align-items: start; }
.psr-label {
  font-family: var(--font-mono);
  font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-text);
  padding-top: 4px;
  display: flex; align-items: center; gap: 9px;
}
.psr-label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.psr-text { color: var(--text); font-size: 16px; line-height: 1.55; text-wrap: pretty; }
.psr-text .num { color: var(--accent-text); font-weight: 600; font-variant-numeric: tabular-nums; }

.metric {
  text-align: right;
  align-self: center;
  min-width: 160px;
  padding-left: clamp(20px, 3vw, 40px);
  border-left: 1px solid var(--line);
}
.metric .big {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.metric .big {
  animation: metricGlow 4.5s var(--ease) infinite;
}
.no-metric-anim .metric .big { animation: none; }
@keyframes metricGlow {
  0%, 100% { text-shadow: 0 0 0 transparent; }
  50% { text-shadow: 0 0 26px color-mix(in srgb, var(--accent) 40%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .metric .big { animation: none; } }
.metric .cap {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--faint);
}

/* sub-cards (ConvertMe flagships) */
.subcards {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.subcard {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  padding: 22px;
  display: flex; flex-direction: column;
  transition: border-color .4s var(--ease), transform .4s var(--ease), background .4s var(--ease);
}
.subcard:hover { border-color: var(--accent-line); transform: translateY(-3px); background: var(--surface); }
.subcard-top { display: flex; align-items: center; gap: 13px; margin-bottom: 14px; }
.subcard .slot-chip {
  width: 42px; height: 42px; flex: none;
}
.subcard h4 {
  font-family: var(--font-display);
  font-weight: 700; font-size: 18px; letter-spacing: -0.02em;
  margin: 0; line-height: 1.1;
}
.subcard .sc-kind { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.05em; color: var(--faint); text-transform: uppercase; margin-top: 3px; }
.subcard p { margin: 0; color: var(--dim); font-size: 14px; line-height: 1.55; flex: 1; text-wrap: pretty; }
.subcard .sc-metric {
  margin-top: 16px;
  font-family: var(--font-display);
  font-weight: 700; font-size: 21px; letter-spacing: -0.02em;
  color: var(--accent-text);
}
.subcard .sc-link {
  margin-top: 12px;
  font-family: var(--font-mono); font-size: 12px; color: var(--dim);
  display: inline-flex; align-items: center; gap: 7px;
  transition: color .25s;
}
.subcard .sc-link:hover { color: var(--accent-text); }
.subcard .sc-link::after { content: "↗"; }

.portfolio-note {
  margin-top: 22px;
  display: flex; flex-wrap: wrap; gap: 10px 24px;
  font-size: 14.5px; color: var(--dim);
}
.portfolio-note b { color: var(--text); font-weight: 600; }

/* ============================================================
   PET PROJECTS
   ============================================================ */
.pets { background: var(--bg-2); border-top: 1px solid var(--line); }
.pet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pet {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: clamp(24px, 3vw, 38px);
  display: flex; flex-direction: column;
  transition: border-color .4s var(--ease), transform .4s var(--ease), box-shadow .4s var(--ease);
}
.pet:hover { border-color: var(--accent-line); transform: translateY(-4px); box-shadow: 0 30px 60px -40px rgba(0,0,0,0.9); }
.pet-top { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.pet .slot-chip { width: 52px; height: 52px; flex: none; }
.pet h3 { font-family: var(--font-display); font-weight: 700; font-size: clamp(20px, 2.5vw, 26px); letter-spacing: -0.025em; margin: 0; line-height: 1.08; }
.pet .pet-kind { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.05em; color: var(--faint); text-transform: uppercase; margin-top: 4px; }
.pet p { margin: 0; color: var(--dim); font-size: 15.5px; line-height: 1.6; flex: 1; text-wrap: pretty; }
.pet-metrics { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.stat {
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg-2);
  padding: 12px 16px; min-width: 96px;
}
.stat .v { font-family: var(--font-display); font-weight: 800; font-size: 23px; letter-spacing: -0.03em; color: var(--accent-text); }
.stat .k { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.04em; color: var(--faint); text-transform: uppercase; margin-top: 4px; }
.pet-link { margin-top: 22px; }
.pet-foot {
  margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line);
  color: var(--dim); font-size: 15px; text-wrap: pretty;
}
.pet-foot b { color: var(--text); font-weight: 600; }

/* ============================================================
   SKILLS
   ============================================================ */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(20px, 3vw, 36px) clamp(28px, 5vw, 64px); }
.skill-group { border-top: 1px solid var(--line-2); padding-top: 22px; }
.skill-group h3 {
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-text); margin: 0 0 18px;
}
.tags { display: flex; flex-wrap: wrap; gap: 9px; }
.tag {
  font-size: 14px; color: var(--text);
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface);
  transition: border-color .3s var(--ease), color .3s var(--ease), background .3s var(--ease), transform .3s var(--ease);
}
.tag:hover { border-color: var(--accent-line); color: var(--accent-text); transform: translateY(-2px); background: var(--surface-2); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact { background: var(--bg-2); border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: clamp(32px, 5vw, 72px); align-items: start; }

.contact-side .mini-photo {
  width: 96px; height: 96px; border-radius: 18px;
  overflow: hidden; border: 1px solid var(--line-2);
  margin-bottom: 26px;
  box-shadow: 0 16px 40px -20px rgba(0,0,0,0.8);
}
.contact-side .mini-photo img { width: 100%; height: 100%; object-fit: cover; }
.contact-channels { display: flex; flex-direction: column; gap: 11px; margin-top: 8px; }
.channel {
  display: flex; align-items: center; gap: 15px;
  padding: 15px 18px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface);
  transition: border-color .35s var(--ease), transform .35s var(--ease), background .35s var(--ease);
}
.channel:hover { border-color: var(--accent-line); transform: translateX(4px); background: var(--surface-2); }
.channel .ico {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-text);
}
.channel .ico svg { width: 18px; height: 18px; }
.channel .c-k { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.channel .c-v { font-size: 15px; color: var(--text); margin-top: 2px; word-break: break-all; }
.channel .go { margin-left: auto; color: var(--faint); transition: transform .3s var(--ease), color .3s; }
.channel:hover .go { color: var(--accent-text); transform: translate(2px,-2px); }

/* form */
.form-card {
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--surface);
  padding: clamp(24px, 3.4vw, 40px);
  position: relative;
}
.form-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; margin: 0 0 6px; }
.form-card .sub { color: var(--dim); font-size: 14.5px; margin: 0 0 26px; }
.field { margin-bottom: 18px; }
.field label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--dim); margin-bottom: 9px;
}
.field label .err-msg { color: #FF6B6B; text-transform: none; letter-spacing: 0; font-size: 11px; opacity: 0; transition: opacity .25s; }
.field.invalid label .err-msg { opacity: 1; }
.field input, .field textarea {
  width: 100%;
  font-family: var(--font-body); font-size: 15.5px; color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 14px 16px;
  outline: none;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), background .25s;
  resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field textarea:focus {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-faint);
  background: var(--surface);
}
.field.invalid input, .field.invalid textarea { border-color: #FF6B6B; box-shadow: 0 0 0 3px rgba(255,107,107,0.12); }
.field textarea { min-height: 120px; }

.submit-row { display: flex; align-items: center; gap: 16px; margin-top: 6px; }
.btn.submit { position: relative; min-width: 180px; justify-content: center; }
.btn.submit[data-state="sending"] { pointer-events: none; opacity: 0.85; }
.btn.submit .spin {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--accent-ink) 35%, transparent);
  border-top-color: var(--accent-ink);
  animation: spin .7s linear infinite;
  display: none;
}
.btn.submit[data-state="sending"] .spin { display: block; }
.btn.submit[data-state="sending"] .label,
.btn.submit[data-state="sending"] .arrow { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* success / error overlay states */
.form-result {
  position: absolute; inset: 0;
  border-radius: inherit;
  background: var(--surface);
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding: clamp(24px, 3.4vw, 44px);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .4s var(--ease), transform .4s var(--ease), visibility .4s;
}
.form-result.show { opacity: 1; visibility: visible; transform: none; }
.form-result .rc-ico {
  width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center; margin-bottom: 22px;
}
.form-result.ok .rc-ico { background: var(--accent-soft); color: var(--accent-text); }
.form-result.bad .rc-ico { background: rgba(255,107,107,0.14); color: #FF8585; }
.form-result .rc-ico svg { width: 26px; height: 26px; }
.form-result h4 { font-family: var(--font-display); font-weight: 700; font-size: 25px; letter-spacing: -0.02em; margin: 0 0 10px; }
.form-result p { color: var(--dim); font-size: 15px; margin: 0 0 24px; max-width: 38ch; }

/* ============================================================
   FOOTER
   ============================================================ */
.foot {
  border-top: 1px solid var(--line);
  padding: 38px var(--pad);
  display: flex; flex-wrap: wrap; gap: 14px 24px; justify-content: space-between; align-items: center;
}
.foot .c { font-size: 14px; color: var(--faint); }
.foot .top-link {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--dim); display: inline-flex; align-items: center; gap: 9px;
  transition: color .25s;
}
.foot .top-link:hover { color: var(--accent-text); }

/* ============================================================
   image-slot placeholder skin
   ============================================================ */
image-slot {
  --is-bg: var(--surface-2);
  background: var(--surface-2);
  border: 1px dashed var(--line-2);
  color: var(--faint);
  font-family: var(--font-mono) !important;
  font-size: 9.5px !important;
  letter-spacing: 0.04em;
}
image-slot[data-filled] { border: none; background: transparent; }

/* ============================================================
   reveal on scroll
   ============================================================ */
.reveal { transition: opacity .8s var(--ease), transform .8s var(--ease); }
html.anim-ready .reveal { opacity: 0; transform: translateY(26px); }
html.anim-ready .reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .07s; }
.reveal.d2 { transition-delay: .14s; }
.reveal.d3 { transition-delay: .21s; }
@media (prefers-reduced-motion: reduce) {
  html.anim-ready .reveal { opacity: 1 !important; transform: none !important; }
  .scroll-hint .line { animation: none; }
}

/* ============================================================
   responsive
   ============================================================ */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { order: 2; }
  .hero-photo { order: 1; max-width: 360px; }
  .hero h1 { margin-top: 22px; }
  .about-grid { grid-template-columns: 1fr; }
  .case-body { grid-template-columns: 1fr; }
  .metric { text-align: left; border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 22px; min-width: 0; }
  .metric .big { font-size: clamp(46px, 13vw, 64px); }
  .subcards { grid-template-columns: 1fr; }
  .pet-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .case { padding: 22px; }
  .case-head { grid-template-columns: auto 1fr; }
  .case-id { grid-column: 1 / -1; justify-self: start; order: -1; }
  .psr-item { grid-template-columns: 1fr; gap: 6px; }
  .psr-label { padding-top: 0; }
  .hero .meta span:not(:last-child)::after { content: ""; }
  .hero .meta { flex-direction: column; gap: 6px; }
  .brand .role-mono { display: none; }
  .topbar .nav-contact { padding: 9px 15px; }
}

/* ===== FIX: вернуть скролл на фото (отключаем редактор-жесты image-slot) ===== */
image-slot,
image-slot * {
  touch-action: pan-y !important;
  cursor: default !important;
}
image-slot {
  pointer-events: none !important;
}
