/* Linux PC Robot — Modern Redesign */
:root {
  --bg: #0a0f1e;
  --bg-card: #111827;
  --bg-nav: #070d1a;
  --bg-code: #0d1b2a;
  --accent: #38bdf8;
  --accent-green: #4ade80;
  --accent-dim: rgba(56,189,248,0.15);
  --text: #e2e8f0;
  --text-muted: #8892a4;
  --border: #1e3350;
  --radius: 8px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Courier New', Courier, monospace;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

/* ── Navbar ── */
.navbar {
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
}
.navbar .inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}
.logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}
.logo svg { flex-shrink: 0; }
.logo:hover { color: var(--accent-green); text-decoration: none; }
.nav-links {
  display: flex;
  list-style: none;
  gap: 0.1rem;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--text-muted);
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  display: block;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text);
  background: rgba(255,255,255,0.06);
  text-decoration: none;
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, #070d1a 0%, #0a1628 60%, #06101f 100%);
  border-bottom: 1px solid var(--border);
  padding: 3.5rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -80px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 300px;
  background: radial-gradient(ellipse, rgba(56,189,248,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  line-height: 1.2;
}
.hero p {
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto;
  font-size: 1rem;
}
.hero-badge {
  display: inline-block;
  background: var(--accent-dim);
  border: 1px solid rgba(56,189,248,0.3);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

/* ── Layout ── */
.page-wrap {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  flex: 1;
  align-items: start;
}
.page-wrap.full-width {
  grid-template-columns: 1fr;
  max-width: 860px;
}

/* ── Sidebar ── */
.sidebar {
  position: sticky;
  top: 74px;
}
.widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.widget-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
.widget img {
  width: 100%;
  border-radius: 6px;
  margin-bottom: 0.85rem;
  border: 1px solid var(--border);
}
.widget p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
}
.sidenav {
  list-style: none;
}
.sidenav li + li {
  border-top: 1px solid var(--border);
}
.sidenav a {
  display: block;
  padding: 0.55rem 0;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.4;
}
.sidenav a:hover {
  color: var(--accent);
  text-decoration: none;
}
.donate-wrap {
  text-align: center;
}
.donate-wrap p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* ── Post Cards (Homepage) ── */
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.post-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.post-card h2 {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 0.4rem;
}
.post-card h2 a {
  color: var(--text);
}
.post-card h2 a:hover {
  color: var(--accent);
  text-decoration: none;
}
.post-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.post-dot {
  width: 6px; height: 6px;
  background: var(--accent-green);
  border-radius: 50%;
  flex-shrink: 0;
}
.post-excerpt {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
}
.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.75rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
}
.read-more:hover { text-decoration: none; color: var(--accent-green); }

/* ── Article ── */
.article-head {
  margin-bottom: 2rem;
}
.article-head h1 {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}
.article-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.article-body {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 2.25rem;
}
.article-body h2 {
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 2.25rem 0 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3 {
  color: var(--accent-green);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.5rem 0 0.6rem;
}
.article-body p {
  margin-bottom: 1rem;
  color: var(--text);
  line-height: 1.8;
}
.article-body p:last-child { margin-bottom: 0; }
.article-body ul, .article-body ol {
  margin: 0.5rem 0 1rem 1.5rem;
  color: var(--text);
}
.article-body li { margin-bottom: 0.35rem; line-height: 1.7; }
.article-body a { color: var(--accent); }
.article-body strong { color: var(--text); font-weight: 600; }

pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1rem 0;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.6;
  color: #93c5fd;
  white-space: pre;
}
code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: rgba(56,189,248,0.08);
  border: 1px solid rgba(56,189,248,0.15);
  border-radius: 4px;
  padding: 0.1em 0.4em;
  color: var(--accent);
}
pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}
.formula {
  background: #071020;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-green);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  margin: 1rem 0;
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--accent-green);
  line-height: 1.8;
}
.note-box {
  background: rgba(56,189,248,0.04);
  border: 1px solid rgba(56,189,248,0.2);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.warning-box {
  background: rgba(248,113,113,0.05);
  border: 1px solid rgba(248,113,113,0.3);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}
.warning-box strong { color: #f87171; }
.warning-box p { color: var(--text-muted); margin-bottom: 0.6rem; }
.warning-box p:last-child { margin-bottom: 0; }

/* ── Breadcrumb ── */
.breadcrumb {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); text-decoration: none; }
.breadcrumb span { margin: 0 0.4rem; opacity: 0.4; }

/* ── Gallery ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}
.gallery-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.gallery-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.gallery-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}
.gallery-caption {
  padding: 0.4rem 0.6rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* ── Compare Table ── */
.cmp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 1rem 0;
}
.cmp-table th {
  background: var(--bg-nav);
  color: var(--accent);
  padding: 0.7rem 1rem;
  text-align: left;
  border: 1px solid var(--border);
  font-weight: 600;
}
.cmp-table td {
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}
.cmp-table tr:nth-child(even) td { background: rgba(255,255,255,0.015); }
.cmp-table .win { color: var(--accent-green); font-weight: 600; }

/* ── Component List ── */
.comp-list {
  list-style: none;
  margin: 0.5rem 0;
}
.comp-list li {
  display: flex;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.comp-list li:last-child { border-bottom: none; }
.comp-icon { color: var(--accent-green); font-size: 1.1rem; min-width: 22px; margin-top: 1px; }
.comp-info strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 0.15rem; }
.comp-info span { color: var(--text-muted); font-size: 0.85rem; line-height: 1.5; }

/* ── Pin Table ── */
.pin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin: 1rem 0;
  font-family: var(--mono);
}
.pin-table th {
  background: #071020;
  color: var(--accent);
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  text-align: left;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.pin-table td {
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.pin-table td:first-child { color: var(--accent); font-weight: 700; }
.pin-table tr:nth-child(even) td { background: rgba(255,255,255,0.015); }

/* ── Inline highlight ── */
.highlight { color: var(--accent); font-weight: 600; }
.green { color: var(--accent-green); }

/* ── Footer ── */
footer {
  background: var(--bg-nav);
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  margin-top: auto;
  text-align: center;
}
footer p {
  color: var(--text-muted);
  font-size: 0.82rem;
}
footer a { color: var(--text-muted); }
footer a:hover { color: var(--accent); text-decoration: none; }

/* ── Responsive ── */
@media (max-width: 820px) {
  .page-wrap {
    grid-template-columns: 1fr;
  }
  .sidebar { position: static; }
}
@media (max-width: 600px) {
  .nav-links { display: none; }
  .article-body { padding: 1.25rem; }
  .hero { padding: 2rem 1rem; }
}
