/* ═══════════════════════════════════════════════
   style.css  —  Mobile-first
   Andrey Eremin personal site
   Design: evri.co inspired — dark #141414 + lime
════════════════════════════════════════════════ */

/* ── Variables ───────────────────────────────── */
:root {
  --bg:     #141414;
  --text:   #ffffff;
  --accent: #C8FF00;
  --dim:    rgba(255, 255, 255, 0.55);
  --border: rgba(255, 255, 255, 0.1);
  --sans:   'Onest', system-ui, sans-serif;
  --serif:  'Playfair Display', Georgia, serif;
}

/* ── Reset ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Keyframes ───────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes artShift {
  from { opacity: 1;    transform: scale(1)    translateY(0); }
  to   { opacity: 0.85; transform: scale(1.04) translateY(-12px); }
}
@keyframes pulseDot {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%       { transform: scale(1.6); opacity: 0.4; }
}

/* ════════════════════════════════════════════════
   BASE — MOBILE  (320px+)
════════════════════════════════════════════════ */

/* ── Navigation ──────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 90;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: rgba(20, 20, 20, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.nav-logo {
  font-family: var(--sans);
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--accent);
  text-decoration: none;
}

/* Hidden on mobile, shown on tablet+ */
.nav-links { display: none; }

.nav-links a {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--dim);
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--accent); }

/* ── Circle buttons ──────────────────────────── */
.btn-circle {
  position: fixed;
  z-index: 90;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.3s ease;
  font-family: var(--sans);
  font-size: 1rem;
}
.btn-circle:hover { background: var(--accent); color: var(--bg); }

.btn-top {
  bottom: 1.5rem; left: 1.5rem;
  opacity: 0;
  pointer-events: none;
  font-size: 1.1rem;
  line-height: 1;
}
.btn-top.visible { opacity: 1; pointer-events: auto; }

.btn-menu {
  bottom: 1.5rem; right: 1.5rem;
  flex-direction: column;
  gap: 4px;
}
.btn-menu span {
  display: block;
  width: 16px; height: 1px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.btn-menu.open span:nth-child(1) { transform: translateY(5px)  rotate(45deg); }
.btn-menu.open span:nth-child(2) { opacity: 0; }
.btn-menu.open span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ── Menu overlay ────────────────────────────── */
.menu-overlay {
  position: fixed; inset: 0;
  z-index: 80;
  background: rgba(20, 20, 20, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.menu-overlay.open { opacity: 1; pointer-events: auto; }

.menu-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
.menu-link {
  font-family: var(--serif);
  font-size: clamp(2rem, 8vw, 4rem);
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
  letter-spacing: 0.05em;
}
.menu-link:hover { color: var(--accent); }

/* ── Hero — mobile ───────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 0 1.25rem 3.5rem;
  overflow: hidden;
}

/* Abstract colour blobs */
.hero-art {
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 45% at 72% 18%, rgba(200, 255, 0, 0.18) 0%, transparent 65%),
    radial-gradient(ellipse 38% 30% at 88% 8%,  rgba(0, 210, 180, 0.14) 0%, transparent 60%),
    radial-gradient(ellipse 28% 22% at 62% 5%,  rgba(255, 180, 0, 0.11) 0%, transparent 55%),
    radial-gradient(ellipse 22% 18% at 80% 32%, rgba(200, 70, 70, 0.09)  0%, transparent 50%),
    radial-gradient(ellipse 18% 14% at 55% 25%, rgba(120, 0, 200, 0.07)  0%, transparent 50%);
  animation: artShift 12s ease-in-out infinite alternate;
}

/* Gradient — makes text readable over photo */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 65%;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
  z-index: 1;
}

/* Photo — mobile: full-width, top of hero */
.hero-photo-wrap {
  position: absolute;
  top: 0; left: 0; right: 0;
  width: 100%;
  height: 52vh;
  z-index: 0;
}
.hero-photo-wrap::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 35%, var(--bg) 100%);
}
.hero-photo {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
  filter: grayscale(100%);
  transition: filter 0.6s ease;
}
.hero-photo-wrap:hover .hero-photo { filter: grayscale(0%); }

/* Text content */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 100%;
}

.hero-meta {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
  animation: fadeUp 0.7s ease 0.2s both;
}

.hero-name {
  font-size: clamp(2.8rem, 13vw, 7.5rem);
  font-weight: 900;
  line-height: 0.88;
  color: var(--text);
  margin-bottom: 1rem;
  animation: fadeUp 0.8s ease 0.4s both;
}

.hero-role {
  font-size: 0.98rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.03em;
  line-height: 1.65;
  animation: fadeUp 0.7s ease 0.65s both;
}

.scroll-hint { display: none; }

/* ── Sections — mobile ───────────────────────── */
.section {
  padding: 2.5rem 1.25rem;
}

.section-heading {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 2rem;
  letter-spacing: 0.06em;
}

/* ── CTA / Заявка ────────────────────────────── */
.cta {
  position: relative;
  overflow: hidden;
  padding: 3rem 1.25rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
/* Мягкое лаймовое сияние за блоком — проявляется при появлении */
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 80% at 50% 50%,
              rgba(200, 255, 0, 0.10), transparent 70%);
  opacity: 0;
  transition: opacity 1s ease 0.2s;
  pointer-events: none;
}
.cta:has(.cta-inner.is-visible)::before { opacity: 1; }

.cta-inner {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.cta-kicker {
  position: relative;
  display: inline-block;
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
}
/* Растущая светящаяся лаймовая линия под заголовком */
.cta-kicker::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 0;
  width: 0; height: 3px;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
  transform: translateX(-50%);
  transition: width 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.35s;
}
.cta-inner.is-visible .cta-kicker::after { width: 140px; }

/* Вспышка-свечение заголовка при появлении */
@keyframes ctaGlow {
  0%   { text-shadow: 0 0 0   rgba(200, 255, 0, 0); }
  45%  { text-shadow: 0 0 24px rgba(200, 255, 0, 0.75); }
  100% { text-shadow: 0 0 0   rgba(200, 255, 0, 0); }
}
.cta-inner.is-visible .cta-kicker { animation: ctaGlow 1.5s ease 0.3s 1; }

/* Текст появляется ступенчато, после заголовка */
.cta-text {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease 0.45s, transform 0.6s ease 0.45s;
}
.cta-inner.is-visible .cta-text { opacity: 1; transform: translateY(0); }

.cta-hl {
  color: var(--accent);
  font-weight: 700;
  text-shadow: 0 0 14px rgba(200, 255, 0, 0.35);
}

/* CTA-вход выразительнее обычного reveal */
.cta-inner.reveal { transform: translateY(48px); }
.cta-inner.reveal.is-visible { transform: translateY(0); }

/* Кнопки действия в CTA */
.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease 0.6s, transform 0.6s ease 0.6s;
}
.cta-inner.is-visible .cta-buttons { opacity: 1; transform: translateY(0); }

.cta-btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  background: var(--accent);
  color: var(--bg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200, 255, 0, 0.25);
}
.cta-btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

/* ── Timeline — mobile ───────────────────────── */
.timeline {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}

/* Animated line — left side on mobile/tablet, centre on desktop */
.tl-line {
  display: block;
  position: absolute;
  left: 0;
  top: 2rem;
  width: 1px;
  height: 0;
  background: var(--accent);
  z-index: 0;
  transition: height 0.08s linear;
}

/* Rows: block layout, padding leaves room for line + dot */
.tl-row {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 2.5rem;
}
.tl-row:last-child { margin-bottom: 0; }

/* Dot on left border */
.tl-center {
  position: absolute;
  left: -7px; top: 2rem;
}
.tl-dot {
  width: 13px; height: 13px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: var(--bg);
  transform: scale(1);
  transition: background 0.25s ease;
}
.tl-dot.active,
.tl-row:hover .tl-dot { background: var(--accent); }

/* Title */
.tl-left { padding: 0 0 0.6rem 0; }
.tl-title {
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--accent);
}

/* Text */
.tl-right { padding: 0 0 0.25rem 0; }
.tl-right p {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--dim);
  line-height: 1.72;
  margin-bottom: 0.65rem;
}
.tl-right p:last-child { margin-bottom: 0; }

.tl-accent {
  color: var(--accent) !important;
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  letter-spacing: 0.03em;
}

/* Contact rows — more compact */
#contact .tl-row { margin-bottom: 1.25rem; }

.contact-link {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
  padding: 0.2rem 0;
  transition: color 0.2s ease;
}
.contact-link:hover { color: var(--accent); }

/* ── Reveal animations ───────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.reveal-heading {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal-heading.is-visible { opacity: 1; transform: translateY(0); }

/* ── Footer ──────────────────────────────────── */
.footer {
  padding: 2rem 1.25rem;
  text-align: center;
  border-top: 1px solid var(--border);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--dim);
}

/* ════════════════════════════════════════════════
   TABLET  min-width: 768px
════════════════════════════════════════════════ */
@media (min-width: 768px) {

  /* Nav: show links */
  .nav {
    padding: 1.2rem 2rem;
  }
  .nav-links {
    display: flex;
    gap: 2rem;
  }

  /* Hero: photo moves to right side */
  .hero {
    padding: 0 2rem 4rem;
  }
  .hero-photo-wrap {
    top: 0; left: auto; right: 0;
    width: 58%;
    height: 88%;
  }
  .hero-photo-wrap::after {
    background:
      linear-gradient(to right,  var(--bg) 0%, transparent 22%),
      linear-gradient(to bottom, transparent 55%, var(--bg) 100%);
  }
  .hero-photo { object-position: 30% top; }
  .hero-content { max-width: 52%; }

  .hero-meta  { font-size: 0.86rem; }
  .hero-name  { font-size: clamp(3rem, 9vw, 7.5rem); margin-bottom: 1.2rem; }
  .hero-role  { font-size: 1.05rem; }

  /* Sections */
  .section { padding: 3rem 2rem; }
  .section-heading { font-size: 1.75rem; margin-bottom: 2.5rem; }

  /* CTA */
  .cta { padding: 4rem 2rem; }
  .cta-kicker { font-size: 1.75rem; }
  .cta-text { font-size: 1.18rem; }

  /* Timeline: wider, more breathing room */
  .tl-row { margin-bottom: 3rem; }
  .tl-title { font-size: 1.6rem; }
  .tl-right p { font-size: 0.93rem; }
}

/* ════════════════════════════════════════════════
   DESKTOP  min-width: 1100px
════════════════════════════════════════════════ */
@media (min-width: 1100px) {

  /* Nav */
  .nav { padding: 1.4rem 3rem; }
  .nav-links { gap: 2.5rem; }

  /* Hero */
  .hero {
    padding: 5rem 3rem;
    align-items: flex-end;
    overflow: hidden;
  }
  .hero::after { height: 45%; }

  .hero-photo-wrap {
    width: 46%;
    height: 88%;
  }
  .hero-photo-wrap::after {
    background:
      linear-gradient(to right,  var(--bg) 0%, transparent 25%),
      linear-gradient(to bottom, transparent 55%, var(--bg) 100%);
  }

  .hero-content { max-width: 56%; }
  .hero-meta    { font-size: 0.9rem; letter-spacing: 0.45em; margin-bottom: 1.2rem; }
  .hero-name    { font-size: clamp(3.5rem, 8vw, 7.5rem); margin-bottom: 1.5rem; }
  .hero-role    { font-size: clamp(1.05rem, 1.8vw, 1.25rem); }

  .scroll-hint  { bottom: 2.2rem; }
  .scroll-dot   { width: 10px; height: 10px; }

  /* Sections */
  .section { padding: clamp(2rem, 4vw, 3.5rem) 3rem; }
  .section-heading {
    font-size: clamp(1.6rem, 3vw, 2.6rem);
    margin-bottom: clamp(2.5rem, 4vw, 4rem);
  }

  /* Timeline: 3-column grid */
  .tl-line {
    display: block;
    position: absolute;
    left: 50%;
    top: 0;
    width: 1px;
    height: 0;
    background: var(--accent);
    transform: translateX(-50%);
    z-index: 0;
    transition: height 0.08s linear;
  }

  .tl-row {
    display: grid;
    grid-template-columns: 1fr 60px 1fr;
    align-items: center;
    min-height: 140px;
    padding-left: 0;
    border-left: none;
    margin-bottom: 0;
    position: relative;
  }
  .tl-row:last-child { margin-bottom: 0; }

  .tl-center {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    height: 100%;
    left: auto; top: auto;
  }
  .tl-dot {
    width: 14px; height: 14px;
    transform: scale(0);
    transition:
      transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
      background 0.25s ease;
  }
  .tl-dot.active    { transform: scale(1); }
  .tl-row:hover .tl-dot { background: var(--accent); }

  .tl-left {
    padding: 1.5rem 3rem 1.5rem 0;
    text-align: right;
  }
  .tl-title {
    font-size: clamp(1.6rem, 3vw, 2.6rem);
    color: var(--text);
    line-height: 1;
  }
  .tl-row:hover .tl-title { color: var(--accent); }

  .tl-right { padding: 1.5rem 0 1.5rem 3rem; }
  .tl-right p { font-size: clamp(0.88rem, 1.4vw, 1rem); }

  .tl-accent { font-size: clamp(0.9rem, 1.4vw, 1.05rem) !important; }

  /* Contact: compact rows */
  #contact .tl-row     { min-height: 80px; margin-bottom: 0; }
  #contact .tl-left,
  #contact .tl-right   { padding-top: 1rem; padding-bottom: 1rem; }

  .contact-link { font-size: clamp(1rem, 2vw, 1.3rem); }

  /* Footer */
  .footer { padding: 3rem; }

}
