/* === RESET & BASE === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0d1117;
  --bg-card: #161b22;
  --bg-hover: #1c2333;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent-glow: rgba(88,166,255,0.15);
  --green: #3fb950;
  --orange: #d29922;
  --red: #f85149;
  --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'Cascadia Code', 'Fira Code', monospace;
  --max-w: 720px;
  --radius: 8px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .8; }

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

/* === LAYOUT === */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* === NAV === */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,17,23,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo .logo-icon {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-links a {
  padding: 6px 14px;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: .9rem;
  transition: all .2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--bg-hover);
}

/* === HERO === */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  background: url('assets/hero-bg.jpg') center/cover no-repeat;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(13,17,23,0.6) 0%, var(--bg) 100%);
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-glow);
  border: 1px solid rgba(88,166,255,0.3);
  color: var(--accent);
  padding: 4px 14px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -.02em;
}

.hero h1 .gradient {
  background: linear-gradient(135deg, var(--accent), #a371f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  transition: all .2s;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover { opacity: .85; }

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover { background: var(--bg-hover); }

/* === SECTIONS === */
section { padding: 60px 0; }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  margin-bottom: 12px;
}

section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 16px;
}

section > p {
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 32px;
}

/* === CARDS === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all .25s;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.card-icon {
  font-size: 1.6rem;
  margin-bottom: 12px;
}

/* === ICON SET (inline SVG, currentColor-based, no external deps) === */
.icon {
  display: inline-block;
  width: 1.6rem;
  height: 1.6rem;
  vertical-align: middle;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.icon-sm { width: 1.2rem; height: 1.2rem; }
.icon-lg { width: 2.2rem; height: 2.2rem; }

.card-icon.icon,
.skill-icon,
.included-icon {
  color: var(--accent);
  margin-bottom: 12px;
}

.skill-icon { width: 1.5rem; height: 1.5rem; }
.included-icon { width: 2rem; height: 2rem; }

.card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  font-weight: 600;
}

.card p {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* === SKILLS GRID (built-in skills section) === */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto 48px;
}

.skill-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 24px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all .25s;
}

.skill-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.skill-card .skill-icon {
  flex-shrink: 0;
  width: 2.1rem;
  height: 2.1rem;
  padding: 8px;
  box-sizing: content-box;
  background: var(--accent-glow);
  border-radius: var(--radius);
  color: var(--accent);
}

.skill-card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
  font-weight: 600;
}

.skill-card p {
  color: var(--text-muted);
  font-size: .88rem;
  line-height: 1.55;
}

/* === STATS === */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
}

.stat-label {
  font-size: .82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* === CODE BLOCKS === */
.code-block {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  overflow-x: auto;
  margin: 20px 0;
}

.code-block code {
  font-family: var(--font-mono);
  font-size: .85rem;
  color: #c9d1d9;
  line-height: 1.6;
}

.code-block .comment { color: #8b949e; }
.code-block .flag { color: #d2a8ff; }
.code-block .value { color: #79c0ff; }
.code-block .command { color: var(--green); }

/* === CHECKLIST === */
.checklist {
  list-style: none;
}

.checklist li {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.checklist li:last-child { border-bottom: none; }

.check-icon {
  color: var(--green);
  font-size: 1.1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.check-list-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.check-list-desc {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* === COMPARISON TABLE === */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.compare-table th,
.compare-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
}

.compare-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.compare-table td:first-child {
  font-weight: 600;
  color: var(--text);
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
}

.badge-green { background: rgba(63,185,80,0.15); color: var(--green); }
.badge-orange { background: rgba(210,153,34,0.15); color: var(--orange); }
.badge-red { background: rgba(248,81,73,0.15); color: var(--red); }

/* === PRO TIP === */
.tip {
  background: rgba(88,166,255,0.06);
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 24px 0;
}

.tip-title {
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
  font-size: .9rem;
}

/* === SPECS TABLE (hardware) === */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.spec-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.spec-label {
  font-size: .78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 6px;
}

.spec-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

/* === DETAILS / FAQ === */
details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

summary {
  padding: 4px 20px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

summary::-webkit-details-marker { display: none; }

summary::before { content: '▸ '; transition: transform .2s; display: inline-block; }
details[open] summary::before { transform: rotate(90deg); }

details > p {
  padding: 4px 20px 16px;
  color: var(--text-muted);
}

/* === AFFILIATE DISCLOSURE === */
.affiliate-disclosure {
  background: rgba(88,166,255,0.04);
  border: 1px solid rgba(88,166,255,0.15);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-top: 24px;
  font-size: .85rem;
  color: var(--text-muted);
}

/* === FOOTER LINKS === */
footer a {
  color: var(--accent);
  opacity: .7;
}
footer a:hover { opacity: 1; }

/* === FOOTER === */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 60px;
}

footer p {
  color: var(--text-muted);
  font-size: .85rem;
}

/* === ARTICLE CARD LINKS (full-clickable boxes) === */
.article-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.article-card-link:hover .card {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

/* === MOBILE === */
@media (max-width: 640px) {
  .hero { padding: 60px 0 40px; }
  .stats { grid-template-columns: repeat(2, 1fr); padding: 28px; }
  section h2 { font-size: 1.5rem; }
  .nav-links a { padding: 6px 10px; font-size: .82rem; }
  .skills-grid { grid-template-columns: 1fr; gap: 14px; }
  .skill-card { padding: 18px 16px; gap: 12px; }
}
