/* =========================================================
   Дедевич Алексей — современный светлый tech-минимализм
   Чистый CSS, без JavaScript
   ========================================================= */

:root {
  --bg: #ffffff;
  --bg-alt: #f6f8fb;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --accent: #2563eb;
  --accent-2: #0ea5e9;
  --accent-soft: #eff6ff;
  --success: #059669;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 18px 40px rgba(15, 23, 42, 0.12);
  --container: 1120px;
  --font-head: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent-2); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

ul { margin: 0 0 1rem; padding-left: 1.15rem; }
li { margin-bottom: 0.4rem; }

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Ссылка для пропуска навигации ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
}
.btn--primary:hover { color: #fff; box-shadow: 0 12px 26px rgba(37, 99, 235, 0.38); }

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

.btn--sm { padding: 10px 18px; font-size: 0.9rem; }

.btn--light { background: #fff; color: var(--accent); }
.btn--light:hover { color: var(--accent-2); box-shadow: var(--shadow-hover); }

.btn--outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}
.btn--outline-light:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }

/* ---------- Навигация ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
}
.nav__brand {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.nav__brand span { color: var(--accent); }
.nav__brand:hover { color: var(--text); }

.nav__links {
  display: flex;
  gap: 28px;
  font-size: 0.95rem;
  font-weight: 500;
}
.nav__links a { color: var(--muted); position: relative; }
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.2s ease;
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 72px 0 56px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -180px;
  right: -120px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.16), transparent 65%);
  border-radius: 50%;
  z-index: -1;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 56px;
}
.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}
.eyebrow--light { color: rgba(255, 255, 255, 0.8); }

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  font-weight: 800;
  margin-bottom: 20px;
}
.hero__lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--muted);
  max-width: 34ch;
  margin-bottom: 28px;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.hero__meta { font-size: 0.9rem; color: var(--muted); }

.hero__media { display: flex; justify-content: center; }
.photo-card {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 1 / 1;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent-soft), #e0f2fe);
  box-shadow: var(--shadow);
}
.photo-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  pointer-events: none;
}
.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Полоса метрик ---------- */
.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 32px 0;
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 20px;
  border-left: 3px solid var(--accent);
}
.stat__num {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--text);
  letter-spacing: -0.02em;
}
.stat__label { font-size: 0.9rem; color: var(--muted); }

/* ---------- Секции ---------- */
#top { scroll-margin-top: 80px; }
.section { padding: 84px 0; scroll-margin-top: 84px; }
.section--alt { background: var(--bg-alt); }

.section__head { margin-bottom: 40px; max-width: 640px; }
.section__head h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
}

/* ---------- О себе ---------- */
.about__grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 48px;
  align-items: start;
}
.about__text .lead {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text);
}
.about__text p { color: var(--muted); }

.about__cards {
  display: grid;
  gap: 16px;
}
.vector-card {
  position: relative;
  padding: 26px 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.vector-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.vector-card__num {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.06em;
}
.vector-card h3 { font-size: 1.15rem; margin: 8px 0 8px; }
.vector-card p { color: var(--muted); font-size: 0.95rem; }

/* ---------- Таймлайн опыта ---------- */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 188px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2), transparent);
}
.timeline__item {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 40px;
  position: relative;
  padding-bottom: 32px;
}
.timeline__item::before {
  content: "";
  position: absolute;
  left: 181px;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 4px var(--bg-alt);
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__period {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 2px;
  text-align: right;
}
.timeline__dates {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
}
.timeline__dur { font-size: 0.85rem; color: var(--muted); }

.exp-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.exp-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.exp-card__company { font-size: 1.25rem; font-weight: 800; }
.exp-card__role {
  font-weight: 600;
  color: var(--accent);
  margin: 6px 0 4px;
}
.exp-card__meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.exp-card__details {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.exp-card__details summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent);
  padding: 4px 0;
  user-select: none;
}
.exp-card__details summary::-webkit-details-marker { display: none; }
.exp-card__details summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  line-height: 1;
  transition: transform 0.2s ease;
}
.exp-card__details[open] summary::before { content: "−"; }
.exp-card__details summary:hover { color: var(--accent-2); }
.exp-card__details summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}

.exp-card__body { padding-top: 16px; }
.exp-card__body h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 20px 0 10px;
  color: var(--text);
}
.exp-card__body h4:first-child { margin-top: 0; }
.exp-card__body ul { color: var(--muted); font-size: 0.95rem; }
.achievements li::marker { color: var(--success); }
.achievements strong { color: var(--success); }

/* ---------- Цели ---------- */
.goals__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.goal-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.goal-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(37, 99, 235, 0.35);
}
.goal-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.goal-card p { color: var(--muted); font-size: 0.95rem; }

/* ---------- О сайте ---------- */
.site-note {
  max-width: 820px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  color: var(--muted);
}

/* ---------- Контакты ---------- */
.contacts {
  background: linear-gradient(135deg, #1e3a8a 0%, var(--accent) 55%, var(--accent-2) 100%);
  color: #fff;
}
.contacts__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.contacts__title {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}
.contacts__text { color: rgba(255, 255, 255, 0.85); max-width: 46ch; }
.contacts__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Футер ---------- */
.footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
  background: #fff;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--muted);
}
.footer__links { display: flex; gap: 20px; }
.footer__links a { color: var(--muted); }
.footer__links a:hover { color: var(--accent); }

/* ---------- Адаптивность ---------- */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero__media { order: -1; }
  .photo-card { width: min(100%, 300px); }
  .hero__lead { max-width: 60ch; }
  .stats__grid { grid-template-columns: repeat(3, 1fr); }
  .about__grid { grid-template-columns: 1fr; gap: 32px; }
  .goals__grid { grid-template-columns: repeat(2, 1fr); }
  .timeline::before { left: 7px; }
  .timeline__item { grid-template-columns: 1fr; gap: 12px; padding-left: 36px; padding-bottom: 28px; }
  .timeline__item::before { left: 0; top: 4px; }
  .timeline__period { text-align: left; flex-direction: row; gap: 10px; align-items: baseline; }
}

@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .nav__inner { flex-wrap: wrap; min-height: 60px; padding-top: 10px; padding-bottom: 10px; }
  .nav__links { order: 3; width: 100%; justify-content: space-between; gap: 12px; font-size: 0.88rem; }
  .nav__cta { margin-left: auto; }
  .hero { padding: 48px 0 40px; }
  .section { padding: 60px 0; }
  .stats__grid { grid-template-columns: 1fr; gap: 18px; }
  .goals__grid { grid-template-columns: 1fr; }
  .exp-card { padding: 20px; }
  .site-note { padding: 24px; }
  .contacts__actions { width: 100%; }
  .contacts__actions .btn { width: 100%; }
}

/* ---------- Доступность: reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .btn:hover, .vector-card:hover, .goal-card:hover, .exp-card:hover { transform: none; }
}

/* ---------- Фокус ---------- */
a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
