/* Variables with strong light/dark separation */
:root{
  --bg:#eef2ff;              /* light canvas */
  --bg2:#f7f7fb;
  --surface:#ffffff;
  --text:#1c1f2e;
  --muted:#5b607e;
  --accent:#6c63ff;
  --accent-2:#4da3ff;
  --card:#ffffff;
  --shadow:0 12px 36px rgba(39,67,170,0.15);
}
body.dark-theme{
  --bg:#070914;              /* dark canvas */
  --bg2:#0b0f23;
  --surface:#0f142b;
  --text:#e8eaf7;
  --muted:#9aa0c9;
  --accent:#8a7bff;
  --accent-2:#5db3ff;
  --card:#0b0f23;
  --shadow:0 16px 48px rgba(0,0,0,0.6);
}

/* Reset and base */
*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  font-family:'Inter',system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--text);
  line-height:1.7;
  overflow-x:hidden;
  background:
    radial-gradient(1200px 600px at 10% -10%, var(--bg) 0%, var(--bg2) 60%, transparent 100%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  transition:background .35s ease, color .25s ease;
}
body.dark-theme{
  background:
    radial-gradient(1400px 700px at 80% -20%, #0c1230 0%, var(--bg2) 55%, transparent 100%),
    linear-gradient(180deg, #080b18, var(--bg2));
  background-size: 120% 120%;
  animation: bg-pan 18s linear infinite alternate;
}
@keyframes bg-pan { from{background-position:0% 0%} to{background-position:100% 20%} }

.container{max-width:1200px;margin:0 auto;padding:0 24px}
.section{opacity:0;transform:translateY(24px);padding:72px 0}
.section.reveal{opacity:1;transform:translateY(0);transition:opacity .6s ease, transform .6s ease}

/* Header */
.header{position:sticky;top:0;z-index:1000;background:rgba(255,255,255,.6);backdrop-filter:blur(8px);border-bottom:1px solid rgba(0,0,0,.06)}
body.dark-theme .header{background:rgba(15,20,40,.5);border-bottom:1px solid rgba(255,255,255,.08)}
.header-inner{display:flex;align-items:center;justify-content:space-between;padding:14px 0}
.logo a{color:var(--text);font-weight:800;letter-spacing:-.3px;text-decoration:none}
.main-menu ul{list-style:none;display:flex;gap:24px}
.main-menu a{color:var(--muted);text-decoration:none;font-weight:600}
.main-menu a.active,.main-menu a:hover{color:var(--text)}
.header-actions{display:flex;align-items:center;gap:12px}

/* Buttons */
.btn{display:inline-flex;align-items:center;gap:8px;padding:12px 18px;border-radius:10px;border:1px solid rgba(0,0,0,.12);color:var(--text);text-decoration:none;font-weight:700;transition:transform .25s,box-shadow .25s,opacity .25s}
body.dark-theme .btn{border-color:rgba(255,255,255,.12)}
.btn:hover{transform:translateY(-3px);box-shadow:0 12px 24px rgba(123,97,255,.25)}
.btn-icon{padding:10px 12px}
.btn-primary{background:linear-gradient(135deg,var(--accent),var(--accent-2));border:none;color:#fff}
.btn-secondary{background:transparent}

/* Burger */
.burger{display:none;flex-direction:column;justify-content:space-between;width:26px;height:20px;cursor:pointer}
.burger span{display:block;height:3px;background:var(--text);border-radius:2px;transition:.3s}
.burger.active span:nth-child(1){transform:rotate(45deg) translateY(8px)}
.burger.active span:nth-child(2){opacity:0}
.burger.active span:nth-child(3){transform:rotate(-45deg) translateY(-8px)}

/* Mobile menu */
@media(max-width:860px){
  .burger{display:flex}
  .main-menu{position:absolute;top:64px;right:24px;background:var(--surface);border:1px solid rgba(0,0,0,.08);border-radius:12px;box-shadow:var(--shadow);display:none}
  body.dark-theme .main-menu{border-color:rgba(255,255,255,.08)}
  .main-menu.active{display:block}
  .main-menu ul{flex-direction:column;padding:14px;gap:10px}
}

/* Hero */
.hero-inner{display:grid;grid-template-columns:1.2fr .8fr;gap:36px;align-items:center}
.gradient-text{
  font-size:clamp(2rem,5vw,3.6rem);
  font-weight:800;
  line-height:1.1;
  background:linear-gradient(135deg,var(--accent),var(--accent-2));
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
}
.hero-text p{color:var(--muted);max-width:640px;margin-top:16px}
.hero-actions{display:flex;gap:12px;margin-top:24px}
.hero-media{display:flex;justify-content:center}
.profile-img{width:320px;height:320px;border-radius:5%;object-fit:cover;box-shadow:var(--shadow);border:2px solid rgba(0,0,0,.1);transition:transform .35s}
body.dark-theme .profile-img{border-color:rgba(255,255,255,.15)}
.profile-img:hover{transform:scale(1.03)}

/* Cards */
.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.card{background:var(--surface);border:1px solid rgba(0,0,0,.08);border-radius:16px;padding:24px;box-shadow:var(--shadow);transition:transform .25s,box-shadow .25s}
body.dark-theme .card{border-color:rgba(255,255,255,.08)}
.card:hover{transform:translateY(-4px);box-shadow:0 18px 40px rgba(77,163,255,.2)}
.card h3{font-weight:700;margin-bottom:10px}
.card p{color:var(--muted)}

/* About */
.about-grid{display:grid;grid-template-columns:.8fr 1.1fr;gap:28px;align-items:start}
.about-photo{width:100%;max-width:800px;border-radius:16px;box-shadow:var(--shadow);border:2px solid rgba(0,0,0,.1)}
body.dark-theme .about-photo{border-color:rgba(255,255,255,.12)}
.about-content{}
.list{margin-top:8px;display:grid;gap:6px}
.list li{color:var(--muted)}
.mt-2{margin-top:16px}

/* Contact */
.contact-section h2{margin-bottom:8px}
.contact-form{margin-top:16px;display:grid;gap:12px}
.form-group{display:grid;gap:6px}
label{font-weight:600}
input,textarea{
  width:100%;padding:12px 14px;border-radius:12px;border:1px solid rgba(0,0,0,.12);
  background:var(--card);color:var(--text);outline:none;transition:border .2s
}
body.dark-theme input, body.dark-theme textarea{border-color:rgba(255,255,255,.12)}
input:focus,textarea:focus{border-color:var(--accent)}
.social{display:flex;gap:10px}

.alert-error{
  background:#ffe8e8;color:#7a1f1f;border:1px solid #f4baba;padding:12px 14px;border-radius:10px;margin:10px 0 16px;
}
.form-error{color:#ff6b6b;font-size:.9rem;margin-top:4px}

/* Success */
.success-section{display:flex;justify-content:center}
.success-content{text-align:center}

/* Footer */
.footer{border-top:1px solid rgba(0,0,0,.08);background:rgba(255,255,255,.5);backdrop-filter:blur(6px)}
body.dark-theme .footer{border-top:1px solid rgba(255,255,255,.08);background:rgba(15,20,40,.4)}
.footer-inner{padding:20px 0}
.footer p{color:var(--muted)}

/* Responsive refinements */
@media(max-width:1100px){
  .cards{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:860px){
  .hero-inner{grid-template-columns:1fr}
  .about-grid{grid-template-columns:1fr}
  .hero-media{order:-1;margin-bottom:16px}
  .cards{grid-template-columns:1fr}
}
@media(max-width:520px){
  .hero-actions{flex-direction:column}
  .btn{width:100%;justify-content:center}
}

/* Toast notifications */
#toast-container{
  position:fixed;
  top:20px;
  right:20px;
  display:grid;
  gap:10px;
  z-index:2000;
}
.toast{
  padding:12px 16px;
  border-radius:10px;
  color:#fff;
  box-shadow:0 8px 20px rgba(0,0,0,0.25);
  animation:toast-in .3s ease;
}
.toast.success{ background: #2e7d32; }
.toast.error{ background: #c62828; }
.toast.info{ background: #1565c0; }
.toast.warning{ background: #ef6c00; }
@keyframes toast-in{ from{opacity:0; transform:translateY(-8px)} to{opacity:1; transform:translateY(0)} }

/* отступ и центровка кнопки */
.form-actions {
  margin-top: 24px; /* сдвигает кнопку вниз; подберите значение по вкусу */
  display: flex;
  justify-content: flex-start; /* или center / flex-end по желанию */
  gap: 12px;
}

/* для мобильных: кнопка растягивается ниже */
@media (max-width: 520px) {
  .form-actions { justify-content: center; }
  .form-actions .btn { width: 100%; max-width: 420px; }
}




/* ---------- Sticky footer fixes (add at the end of style.css) ---------- */

/* 1) Корневой контейнер страницы: оберните весь контент в <body class="site"> или в элемент .site */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

/* Если у вас в шаблоне body имеет класс site — используем его.
   Если нет, замените .site на реальный wrapper (например .page-wrapper или #page). */
.site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Основной контент, который должен тянуться */
.site-main {
  flex: 1 1 auto; /* занимает доступное пространство между header и footer */
}

/* Footer остаётся в потоке и не сжимается */
.footer {
  flex-shrink: 0;
  /* дополнительно - гарантируем видимость/контейнерность */
  width: 100%;
  /* на всякий случай переопределяем позиционирование, если где-то применялось */
  position: relative;
}

/* Если footer визуально "прыгает" из-за backdrop-filter/transforms у родителя,
   можно явно задать z-index и фон, чтобы избежать наложений */
.footer {
  z-index: 10;
  /* ваш существующий фон/бордер оставляем; при необходимости - скорректируйте */
}

/* Опционально: если внутри footer .footer-inner не растягивает по высоте,
   обеспечим минимальные паддинги */
.footer-inner {
  padding-top: 20px;
  padding-bottom: 20px;
}



/* Contact social — в одном стиле с основной темой */
.contact-social { margin-top: 28px; }

.section-title { font-size: 1.15rem; margin-bottom: 8px; font-weight:800; color:var(--text); }

.social--boxed {
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:12px;
}

/* единый стиль кнопок под дизайн сайта */
.social-link{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  border-radius:12px;
  text-decoration:none;
  font-weight:700;
  color:var(--text);
  background:linear-gradient(180deg, rgba(255,255,255,0.85), rgba(250,250,255,0.6));
  border:1px solid rgba(0,0,0,0.06);
  box-shadow: 0 8px 24px rgba(39,67,170,0.06);
  transition:transform .18s ease, box-shadow .18s ease, opacity .18s;
}

/* адаптация под dark-theme */
body.dark-theme .social-link{
  background: linear-gradient(180deg, rgba(15,20,40,0.6), rgba(10,12,30,0.4));
  border:1px solid rgba(255,255,255,0.06);
  box-shadow: 0 14px 36px rgba(0,0,0,0.45);
  color:var(--text);
}

/* hover/focus */
.social-link:hover{ transform:translateY(-6px); box-shadow:0 20px 40px rgba(77,163,255,0.12); opacity:1 }
.social-link:focus{ outline:2px solid rgba(108,99,255,0.18); outline-offset:2px }

/* icon */
.social-icon{ width:18px; height:18px; display:block; color:currentColor; opacity:0.95 }

/* label text */
.social-label{ font-size:0.95rem; color:var(--text) }

/* brand color accents (subtle) */
.social-link--tg{ color:#fff; background:linear-gradient(135deg,#2AABEE,#1E9EDC); border:none; box-shadow:0 10px 30px rgba(42,171,238,0.18) }
.social-link--gh{ color:#fff; background:linear-gradient(135deg,#222,#444); border:none; box-shadow:0 10px 30px rgba(0,0,0,0.28) }
.social-link--li{ color:#fff; background:linear-gradient(135deg,#0A66C2,#1E86D6); border:none; box-shadow:0 10px 30px rgba(10,102,194,0.16) }
.social-link--ig{ color:#fff; background:linear-gradient(135deg,#f58529,#dd2a7b); border:none; box-shadow:0 10px 30px rgba(221,42,123,0.18) }


/* responsive */
@media (max-width:520px){
  .social--boxed{ gap:8px }
  .social-link{ flex:1 1 100%; justify-content:center; padding:12px 14px }
  .social-icon{ width:20px; height:20px }
}