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

:root {
  --primary: hsl(163, 75%, 33%);
  --primary-dark: hsl(163, 75%, 25%);
  --primary-light: hsl(163, 75%, 55%);
  --primary-glow: hsla(163, 75%, 33%, 0.2);
  --secondary: hsl(163, 40%, 50%);
  --accent: hsl(48, 98%, 60%);
  --bg: hsl(0, 0%, 98%);
  --bg-alt: hsl(0, 0%, 100%);
  --surface: hsl(0, 0%, 100%);
  --surface-2: hsl(240, 10%, 94%);
  --border: hsl(240, 10%, 88%);
  --text: hsl(240, 20%, 10%);
  --text-muted: hsl(240, 8%, 46%);
  --nav-bg: rgba(255,255,255,0.85);
  --hero-gradient: linear-gradient(135deg, #00c896, #00a878);
  --card-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px -4px rgba(0,0,0,0.07);
  --card-shadow-hover: 0 4px 12px rgba(0,0,0,0.08), 0 12px 32px -4px rgba(0,0,0,0.1);
  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --radius-lg: 1rem;
  --nav-h: 72px;
  --ease: cubic-bezier(.22,.68,0,1.2);
}

.dark {
  --primary: hsl(163, 100%, 39%);
  --primary-dark: hsl(163, 80%, 30%);
  --primary-light: hsl(163, 80%, 60%);
  --primary-glow: hsla(163, 100%, 39%, 0.22);
  --secondary: hsl(163, 60%, 45%);
  --bg: hsl(240, 43%, 4%);
  --bg-alt: hsl(240, 43%, 3%);
  --surface: hsl(240, 22%, 12%);
  --surface-2: hsl(240, 16%, 18%);
  --border: hsl(240, 14%, 24%);
  --text: hsl(240, 15%, 98%);
  --text-muted: hsl(240, 10%, 68%);
  --nav-bg: rgba(10,10,15,0.88);
  --card-shadow: 0 1px 3px rgba(0,0,0,0.4), 0 4px 24px -4px rgba(0,200,150,0.06);
  --card-shadow-hover: 0 4px 16px rgba(0,0,0,0.5), 0 12px 40px -4px rgba(0,200,150,0.14);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.35s ease, color 0.35s ease;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }
::selection { background: var(--primary); color: #fff; }

/* NAV */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: var(--nav-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5vw;
  transition: all 0.3s ease;
}
nav.scrolled { box-shadow: 0 8px 32px rgba(0,0,0,0.08); }
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo img { height: 38px; width: auto; }
.nav-logo-text { font-weight: 700; font-size: 1.1rem; }
.nav-links { display: flex; align-items: center; gap: 8px; list-style: none; }
.nav-links a {
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 500; color: var(--text-muted);
  transition: all 0.2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--primary); background: var(--primary-glow); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 26px; border-radius: 100px;
  font-family: 'Inter', sans-serif; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; border: none; transition: all 0.25s var(--ease);
  position: relative; overflow: hidden; text-wrap: nowrap;
}
.btn::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,0.15); opacity: 0; transition: opacity 0.2s; }
.btn:hover::after { opacity: 1; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--hero-gradient); color: #fff; box-shadow: 0 4px 20px rgba(0,200,150,0.35); }
.btn-primary:hover { box-shadow: 0 8px 32px rgba(0,200,150,0.5); transform: translateY(-2px); }
.btn-ghost { background: var(--surface-2); color: var(--text); }
.btn-ghost:hover { background: var(--border); transform: translateY(-1px); }
.btn-sm { padding: 8px 18px; font-size: 0.82rem; }

.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; transition: all 0.25s var(--ease); color: var(--text);
}
.theme-toggle:hover { background: var(--primary); color: #fff; transform: rotate(20deg) scale(1.05); }

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 8px; border-radius: var(--radius-sm);
  background: none; border: none;
}
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.3s ease; }

.mobile-menu {
  display: none; position: fixed; top: var(--nav-h); left: 0; right: 0;
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 20px 5vw 28px; z-index: 99;
  flex-direction: column; gap: 8px;
  box-shadow: 0 20px 40px hsl(0 0% 0% / 0.1);
}
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 500; }
.mobile-menu a:hover { background: var(--surface-2); }

/* LAYOUT */
.container { max-width: 1120px; margin: 0 auto; padding: 0 5vw; }

.text-gradient {
  background: var(--hero-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* ARTICLE HERO */
.article-hero {
  padding-top: calc(var(--nav-h) + 52px);
  padding-bottom: 52px;
  padding-left: 5vw; padding-right: 5vw;
  background: var(--bg-alt);
  position: relative; overflow: hidden;
}

.article-hero::before {
  content: "";
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.28;
  mask-image: radial-gradient(ellipse 80% 100% at 50% 0%, black, transparent);
}

.article-hero-blob {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.1;
  width: 500px; height: 500px; background: var(--primary);
  top: -100px; right: -100px; z-index: 0;
}

.article-hero-inner {
  position: relative; z-index: 1; max-width: 800px;
}

.breadcrumb {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-muted); font-size: 0.88rem; font-weight: 500;
  margin-bottom: 24px; transition: color 0.2s;
}
.breadcrumb:hover { color: var(--primary); }

.article-tag-big {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-glow); color: var(--primary);
  border: 1px solid hsla(163,75%,33%,0.3);
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 6px 16px; border-radius: 100px; margin-bottom: 20px;
}

.article-hero h1 {
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  font-weight: 800; line-height: 1.2; margin-bottom: 20px;
}

.article-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 16px;
  font-size: 0.84rem; color: var(--text-muted);
}

/* ARTICLE BODY */
.article-page { display: block; }

.article-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 52px;
  padding-top: 60px;
  padding-bottom: 80px;
  align-items: start;
}

.article-content {
  min-width: 0;
}

.article-content p {
  font-size: 1rem; line-height: 1.8; color: var(--text); margin-bottom: 20px;
}

.article-content p.lead {
  font-size: 1.12rem; font-weight: 400; color: var(--text-muted);
  line-height: 1.85; margin-bottom: 36px;
  padding-bottom: 32px; border-bottom: 1px solid var(--border);
}

.article-content h2 {
  font-size: 1.5rem; font-weight: 800; line-height: 1.3;
  margin-top: 44px; margin-bottom: 16px; color: var(--text);
}

.article-content h3 {
  font-size: 1.15rem; font-weight: 700; margin-top: 28px; margin-bottom: 12px;
}

.article-content ul, .article-content ol {
  padding-left: 24px; margin-bottom: 20px;
}

.article-content li {
  font-size: 1rem; line-height: 1.75; margin-bottom: 8px; color: var(--text);
}

.article-content ul li::marker { color: var(--primary); }
.article-content ol li::marker { color: var(--primary); font-weight: 700; }

/* CALLOUTS */
.callout {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 20px 22px; border-radius: var(--radius);
  margin: 28px 0; font-size: 0.95rem; line-height: 1.7;
}

.callout-info {
  background: hsla(163,75%,33%,0.07);
  border: 1px solid hsla(163,75%,33%,0.25);
}

.callout-warning {
  background: hsla(38,90%,48%,0.08);
  border: 1px solid hsla(38,90%,48%,0.3);
}

.callout-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 2px; }

/* FEATURE GRID */
.feature-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0;
}

.feature-item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
}

.feature-icon { font-size: 1.5rem; flex-shrink: 0; }
.feature-item p { font-size: 0.88rem; color: var(--text-muted); margin: 6px 0 0; line-height: 1.6; }

/* TIP BOX */
.tip-box {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius); padding: 24px 28px; margin: 28px 0;
  box-shadow: var(--card-shadow);
}

.tip-box h3 { font-size: 1rem; font-weight: 700; margin-bottom: 12px; }
.tip-box ul { padding-left: 20px; }
.tip-box li { font-size: 0.92rem; line-height: 1.7; margin-bottom: 6px; }

/* NUMBERED LIST */
.numbered-list { counter-reset: step; list-style: none; padding: 0; margin: 24px 0; }
.numbered-list li {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 16px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  margin-bottom: 12px; font-size: 0.95rem; line-height: 1.7;
  box-shadow: var(--card-shadow);
}
.numbered-list li::before {
  counter-increment: step;
  content: counter(step);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--hero-gradient); color: #fff;
  font-weight: 700; font-size: 0.82rem;
}

/* COMPARISON TABLE */
.comparison-table {
  width: 100%; border-collapse: collapse; margin: 24px 0;
  font-size: 0.9rem; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border);
}

.comparison-table th {
  background: var(--primary-glow); color: var(--primary);
  padding: 12px 16px; font-weight: 700; text-align: left;
  border-bottom: 1px solid var(--border);
}

.comparison-table td {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  vertical-align: top; line-height: 1.6;
}

.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:nth-child(even) td { background: var(--surface-2); }

/* SIDEBAR */
.article-sidebar { position: sticky; top: calc(var(--nav-h) + 24px); display: flex; flex-direction: column; gap: 24px; }

.sidebar-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--card-shadow);
}

.sidebar-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 10px; }
.sidebar-card p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.65; }

.related-list { list-style: none; padding: 0; margin-top: 12px; }
.related-list li { border-bottom: 1px solid var(--border); }
.related-list li:last-child { border-bottom: none; }
.related-list a {
  display: block; padding: 10px 0;
  font-size: 0.87rem; font-weight: 500; color: var(--text-muted);
  transition: color 0.2s;
}
.related-list a:hover { color: var(--primary); }

/* CTA SECTION */
.article-cta {
  background: var(--primary-glow);
  border-top: 1px solid hsla(163,75%,33%,0.2);
  border-bottom: 1px solid hsla(163,75%,33%,0.2);
  padding: 72px 5vw;
}

.article-cta h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 12px; }
.article-cta p { font-size: 1rem; color: var(--text-muted); }

/* FOOTER */
footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 60px 5vw 32px;
}

.footer-inner { max-width: 1120px; margin: 0 auto; }

.footer-top {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 48px;
}

.footer-brand img { height: 34px; margin-bottom: 16px; }
.footer-brand p { font-size: 0.87rem; color: var(--text-muted); line-height: 1.7; max-width: 280px; }
.footer-col h4 { font-weight: 700; margin-bottom: 16px; font-size: 0.9rem; }
.footer-col a { display: block; font-size: 0.87rem; color: var(--text-muted); margin-bottom: 10px; transition: color 0.2s; }
.footer-col a:hover { color: var(--primary); }

.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.82rem; color: var(--text-muted); flex-wrap: wrap; gap: 12px;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .article-body { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .feature-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .article-hero h1 { font-size: 1.7rem; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .article-body { padding-top: 40px; padding-bottom: 60px; }
}
