/* ===== THEME TOKENS ===== */
:root{
  --bg:#0f1117; --card:#151923; --text:#e6e7eb; --muted:#98a2b3;
  --accent:#7c5cff; --ring:0 10px 30px rgba(124,92,255,.25); --radius:16px;
}
/* Светлая тема */
[data-theme="light"]{
  --bg:#f6f7fb; --card:#ffffff; --text:#0f172a; --muted:#475569;
  --accent:#6d5cff; --ring:0 10px 30px rgba(109,92,255,.18);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,"Noto Sans",sans-serif;
  background: radial-gradient(1200px 800px at 50% -10%, rgba(124,92,255,.15), transparent 50%), var(--bg);
  color:var(--text); line-height:1.6;
}

/* ===== Hero ===== */
.hero{display:grid; place-items:center; min-height:45vh; padding:48px 16px 24px; text-align:center}
.hero h1{margin:0 0 8px; font-size:clamp(28px,6vw,56px); font-weight:800; letter-spacing:.5px}
.hero p{margin:0; color:var(--muted)}

/* ===== Nav ===== */
.nav{position:sticky; top:0; z-index:20; background:rgba(15,17,23,.7); backdrop-filter:blur(8px); border-bottom:1px solid rgba(255,255,255,.06)}
[data-theme="light"] .nav{background:rgba(255,255,255,.7); border-bottom:1px solid rgba(0,0,0,.06)}
.nav-inner{max-width:980px; margin:0 auto; display:flex; align-items:center; justify-content:space-between; padding:10px 16px}
.brand{font-weight:800; text-decoration:none; color:var(--text); letter-spacing:.4px}
.nav-right{display:flex; align-items:center; gap:8px}
.nav-links{display:flex; gap:12px}
.nav a{display:inline-block; padding:10px 14px; border-radius:999px; text-decoration:none; color:var(--text); font-weight:600; font-size:14px; opacity:.9; transition:.2s}
.nav a:hover{opacity:1; background:rgba(124,92,255,.12); box-shadow:var(--ring)}

/* ===== Theme Toggle ===== */
.theme-toggle{
  width:40px; height:40px; border-radius:999px; border:none; cursor:pointer;
  display:grid; place-items:center; background:transparent; color:var(--text);
  font-size:18px; transition:.2s;
}
.theme-toggle:hover{background:rgba(124,92,255,.12); box-shadow:var(--ring)}
.theme-toggle:focus-visible{outline:2px solid var(--accent); outline-offset:2px}

/* ===== Burger ===== */
.burger{display:none; position:relative; width:36px; height:36px; border:none; background:transparent; cursor:pointer}
.burger span{position:absolute; left:8px; right:8px; height:2px; background:var(--text); transition:.3s}
.burger span:nth-child(1){top:11px}
.burger span:nth-child(2){top:17px}
.burger span:nth-child(3){top:23px}
.nav.open .burger span:nth-child(1){transform:translateY(6px) rotate(45deg)}
.nav.open .burger span:nth-child(2){opacity:0}
.nav.open .burger span:nth-child(3){transform:translateY(-6px) rotate(-45deg)}

/* ===== Sections ===== */
main{max-width:980px; margin:0 auto; padding:32px 16px 80px}
section{padding:56px 20px; background:var(--card); border-radius:var(--radius); box-shadow:var(--ring); text-align:center}
section + section{margin-top:24px}
section h2{margin:0 0 12px; font-size:clamp(22px,3vw,32px)}
section p{margin:0; color:var(--muted)}

/* Projects list */
.projects-list{list-style:none; padding:0; margin:16px 0 0; display:grid; gap:10px; justify-content:center}
.projects-list a{color:var(--text); text-decoration:none; padding:8px 12px; border-radius:10px; background:rgba(124,92,255,.12)}
.projects-list a:hover{box-shadow:var(--ring)}

/* Tech grid */
.tech-grid{margin-top:12px; display:grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap:14px; align-items:stretch}
.tech-item{display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; padding:16px; border-radius:14px; background:rgba(0,0,0,.06); box-shadow:var(--ring)}
[data-theme="light"] .tech-item{background:rgba(0,0,0,.04)}
.tech-emoji{font-size:28px; line-height:1}
.tech-name{font-weight:600}

/* ===== Mobile menu ===== */
@media (max-width:768px){
  .nav-links{display:none; position:absolute; right:16px; top:60px; padding:12px; background:var(--card); border-radius:14px; box-shadow:var(--ring); width:min(92vw, 320px); flex-direction:column}
  .nav.open .nav-links{display:flex}
  .burger{display:block}
}

/* ===== Footer ===== */
footer{color:var(--muted); text-align:center; padding:32px 16px 56px}
