*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f1117;
  --bg2: #1a1d27;
  --bg3: #22253a;
  --border: #2e3250;
  --accent: #6c63ff;
  --accent2: #ff6b6b;
  --text: #e2e8f0;
  --text-muted: #8892a4;
  --green: #4ade80;
  --yellow: #facc15;
  --red: #f87171;
  --radius: 10px;
  --max-w: 860px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ─── Header ─── */
header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 2rem;
}
.logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo span { color: var(--accent); }
nav { display: flex; gap: 1.5rem; }
nav a { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; transition: color .2s; }
nav a:hover { color: var(--text); text-decoration: none; }

/* ─── Hero ─── */
.hero {
  background: linear-gradient(135deg, var(--bg2) 0%, var(--bg3) 100%);
  border-bottom: 1px solid var(--border);
  padding: 4rem 1.5rem;
  text-align: center;
}
.hero h1 { font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 900; margin-bottom: 1rem; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p { color: var(--text-muted); font-size: 1.1rem; max-width: 600px; margin: 0 auto 2rem; }
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: .7rem 1.8rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: .95rem;
  transition: opacity .2s;
}
.btn:hover { opacity: .85; text-decoration: none; }

/* ─── Layout ─── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.page-container { max-width: var(--max-w); margin: 0 auto; padding: 2.5rem 1.5rem; }

/* ─── Cards grille ─── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card-cat {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--accent);
  margin-bottom: .5rem;
}
.card h3 { font-size: 1rem; margin-bottom: .5rem; color: var(--text); }
.card p { font-size: .875rem; color: var(--text-muted); line-height: 1.5; }
.card-link { display: block; color: inherit; }
.card-link:hover { text-decoration: none; }

/* ─── Categories pills ─── */
.cats { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.5rem 0; }
.cat-pill {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .35rem .9rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all .2s;
}
.cat-pill:hover { background: var(--accent); border-color: var(--accent); color: #fff; text-decoration: none; }
.cat-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ─── Article ─── */
.article-header { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.article-header .cat { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); margin-bottom: .75rem; }
.article-header h1 { font-size: clamp(1.5rem, 4vw, 2.25rem); font-weight: 900; line-height: 1.25; margin-bottom: 1rem; }
.article-meta { display: flex; align-items: center; gap: 1rem; color: var(--text-muted); font-size: .85rem; }

.article-body h2 { font-size: 1.4rem; font-weight: 800; margin: 2rem 0 .75rem; color: var(--text); }
.article-body h3 { font-size: 1.1rem; font-weight: 700; margin: 1.5rem 0 .5rem; color: var(--text); }
.article-body p { margin-bottom: 1.1rem; color: var(--text); }
.article-body ul, .article-body ol { margin: 1rem 0 1rem 1.5rem; }
.article-body li { margin-bottom: .5rem; color: var(--text); }
.article-body strong { font-weight: 700; }
.article-body em { color: var(--accent); font-style: normal; }

.info-box, .tip-box, .warning-box {
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: .95rem;
  border-left: 4px solid;
}
.info-box { background: rgba(108,99,255,.1); border-color: var(--accent); }
.tip-box { background: rgba(74,222,128,.1); border-color: var(--green); }
.warning-box { background: rgba(248,113,113,.1); border-color: var(--red); }

/* ─── Section headers ─── */
.section-title { font-size: 1.4rem; font-weight: 800; margin-bottom: .25rem; }
.section-sub { color: var(--text-muted); font-size: .9rem; margin-bottom: 1.5rem; }

/* ─── Footer ─── */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: .85rem;
  margin-top: 4rem;
}
footer a { color: var(--text-muted); }
footer a:hover { color: var(--text); }

/* ─── Responsive ─── */
@media (max-width: 640px) {
  nav { display: none; }
  .cards-grid { grid-template-columns: 1fr; }
}
