/*
Theme Name: MyGuard Deb
Theme URI: https://deb.myguard.nl/
Author: MyGuard
Author URI: https://myguard.nl/
Description: Dark, performance-focused theme for deb.myguard.nl APT repository.
Version: 1.0.0
License: GPL-2.0-or-later
Text Domain: myguard-deb
*/

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

:root {
  --bg: #0b0e13;
  --bg2: #111620;
  --bg3: #181e2c;
  --amber: #f0a030;
  --amber-dim: #c07818;
  --green: #3dd68c;
  --text: #e2e8f0;
  --muted: #7a8a9e;
  --border: #1e2a3a;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Syne', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
}

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

/* NAV */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11,14,19,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px;
}
.nav-logo {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--amber);
  font-weight: 500;
  letter-spacing: -0.02em;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo:hover { text-decoration: none; }
.nav-logo span { color: var(--muted); }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin: -8px -8px -8px 0;
}
.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--muted);
  transition: all 0.3s;
  display: block;
}
nav > ul { list-style: none; display: flex; gap: 2rem; position: relative; }
nav > ul > li { position: relative; }
nav > ul > li > ul { display: none; position: absolute; top: 100%; left: 0; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; flex-direction: column; gap: 0; min-width: 200px; box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
nav > ul > li:hover > ul { display: flex; }
nav > ul > li > ul > li { border-bottom: 1px solid var(--border); }
nav > ul > li > ul > li:last-child { border-bottom: none; }
nav > ul > li > ul a { display: block; padding: 12px 16px; color: var(--muted); font-size: 13px; }
nav > ul > li > ul a:hover { color: var(--text); text-decoration: none; }
nav ul a { color: var(--muted); font-size: 14px; transition: color 0.2s; }
nav ul a:hover { color: var(--text); text-decoration: none; }

/* HERO */
.hero {
  padding: 6rem 2rem 5rem;
  max-width: 900px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(240,160,48,0.1);
  border: 1px solid rgba(240,160,48,0.25);
  border-radius: 999px;
  padding: 4px 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--amber);
  margin-bottom: 2rem;
}
.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--amber);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}
.hero h1 em {
  font-style: normal;
  color: var(--amber);
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 620px;
  margin-bottom: 2.5rem;
  line-height: 1.65;
}
.hero-sub strong { color: var(--text); font-weight: 600; }

/* INSTALL BLOCK */
.install-block {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  max-width: 600px;
  margin-bottom: 2rem;
}
.install-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
}
.tab-btn {
  padding: 10px 18px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}
.tab-btn.active { color: var(--amber); border-bottom: 2px solid var(--amber); margin-bottom: -1px; }
.install-code {
  padding: 1.25rem 1.5rem;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.8;
}
.install-code .prompt { color: var(--muted); user-select: none; }
.install-code .cmd { color: var(--green); }
.install-code .comment { color: #3d5269; }
.copy-hint {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  padding: 0.6rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg3);
}
.cta-row { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; margin-top: 1rem; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
}
.btn-primary { background: var(--amber); color: #0b0e13; border: none; }
.btn-primary:hover { background: #e09020; text-decoration: none; color: #0b0e13; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--muted); text-decoration: none; }

/* STATS */
.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 2rem;
  display: flex; justify-content: center;
  gap: 0;
}
.stat {
  flex: 1; max-width: 220px;
  text-align: center;
  padding: 0 2rem;
  border-right: 1px solid var(--border);
}
.stat:last-child { border-right: none; }
.stat-num {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 500;
  color: var(--amber);
}
.stat-label { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* SECTION */
section { padding: 5rem 2rem; max-width: 1000px; margin: 0 auto; }
section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.section-sub { color: var(--muted); margin-bottom: 3rem; max-width: 560px; }

/* WHY GRID */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.why-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: border-color 0.2s;
}
.why-card:hover { border-color: rgba(240,160,48,0.3); }
.why-icon {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--amber);
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}
.why-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; }
.why-card p { font-size: 14px; color: var(--muted); line-height: 1.6; }

/* PACKAGES */
.pkg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--border);
}
.pkg-item {
  background: var(--bg2);
  padding: 1.25rem 1.5rem;
  transition: background 0.15s;
}
.pkg-item:hover { background: var(--bg3); }
.pkg-name {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--green);
  margin-bottom: 4px;
}
.pkg-desc { font-size: 12px; color: var(--muted); line-height: 1.5; }
.pkg-tag {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(240,160,48,0.1);
  color: var(--amber-dim);
  border: 1px solid rgba(240,160,48,0.15);
}
.pkg-tag.green {
  background: rgba(61,214,140,0.08);
  color: #2aaa6a;
  border-color: rgba(61,214,140,0.15);
}

/* DISTROS */
.distro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.distro-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}
.distro-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: flex; align-items: center; gap: 10px;
}
.distro-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); flex-shrink: 0; }
.distro-dot.blue { background: #4c8ef5; }
.codenames { display: flex; flex-wrap: wrap; gap: 6px; font-family: var(--mono); font-size: 12px; }
.codename {
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 4px;
  color: var(--muted);
}
.codename.current { color: var(--green); border-color: rgba(61,214,140,0.2); }

/* FAQ */
.faq { max-width: 720px; }
.faq-item { border-bottom: 1px solid var(--border); padding: 1.5rem 0; }
.faq-item:last-child { border-bottom: none; }
.faq-q { font-size: 1rem; font-weight: 600; margin-bottom: 0.6rem; color: var(--text); }
.faq-a { font-size: 14px; color: var(--muted); line-height: 1.7; }
.faq-a code {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--bg3);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--green);
}

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
footer a { color: var(--muted); }
footer a:hover { color: var(--amber); }

/* ===== INNER PAGES ===== */

.page-header {
  padding: 4rem 2rem 0;
  max-width: 1000px;
  margin: 0 auto;
}
.page-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}
.page-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
.page-header .desc { color: var(--muted); max-width: 540px; font-size: 1rem; }
.page-divider { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0 0; }

.content-wrap { max-width: 780px; margin: 0 auto; padding: 4rem 2rem; }
.content-wrap-wide { max-width: 1000px; margin: 0 auto; padding: 4rem 2rem; }

.entry-header { margin-bottom: 2.5rem; }
.entry-title {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text);
}
.entry-meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.entry-meta a { color: var(--muted); }
.entry-meta a:hover { color: var(--amber); text-decoration: none; }

.entry-content { color: var(--text); }
.entry-content h2 { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; margin: 2.5rem 0 0.75rem; color: var(--amber); }
.entry-content h3 { font-size: 1.2rem; font-weight: 600; margin: 2rem 0 0.6rem; color: var(--amber); }
.entry-content h4 { font-size: 1.05rem; font-weight: 600; margin: 1.5rem 0 0.5rem; color: var(--amber); }
.entry-content p { margin-bottom: 1.25rem; line-height: 1.75; }
.entry-content ul, .entry-content ol { margin: 0 0 1.25rem 1.5rem; }
.entry-content li { margin-bottom: 0.4rem; font-size: 15px; line-height: 1.7; }
.entry-content a { color: var(--amber); }
.entry-content strong { color: var(--text); font-weight: 600; }
.entry-content code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--bg3);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--green);
}
.entry-content pre {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}
.entry-content pre code { background: none; padding: 0; font-size: 13px; line-height: 1.8; color: var(--green); }
.entry-content blockquote {
  border-left: 3px solid var(--amber);
  margin: 1.5rem 0;
  padding: 0.75rem 1.5rem;
  background: var(--bg2);
  border-radius: 0 8px 8px 0;
}
.entry-content blockquote p { color: var(--muted); margin: 0; font-style: italic; }
.entry-content hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }
.entry-content img { max-width: 100%; height: auto; border-radius: 8px; }
.entry-content figure { margin: 1.5rem 0; }
.entry-content figcaption { font-size: 13px; color: var(--muted); text-align: center; margin-top: 0.5rem; font-family: var(--mono); }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 14px; }
.entry-content th {
  text-align: left;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--amber);
  padding: 0.6rem 1rem;
  border-bottom: 2px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.entry-content td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); color: var(--muted); }
.entry-content tr:hover td { background: var(--bg2); }

/* POST GRID */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.post-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: border-color 0.2s;
  display: flex;
  flex-direction: column;
}
.post-card:hover { border-color: rgba(240,160,48,0.3); }
.post-card-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 0.75rem;
  display: flex;
  gap: 1rem;
}
.post-card-cat { color: var(--amber); }
.post-card-cat:hover { text-decoration: underline; }
.post-card-title { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; line-height: 1.35; }
.post-card-title a { color: var(--text); text-decoration: none; }
.post-card-title a:hover { color: var(--amber); }
.post-card-excerpt { font-size: 13px; color: var(--muted); line-height: 1.65; flex: 1; margin-bottom: 1rem; }
.post-card-more { font-family: var(--mono); font-size: 12px; color: var(--amber); align-self: flex-start; }
.post-card-more:hover { text-decoration: underline; }

/* PAGINATION */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 3rem; flex-wrap: wrap; }
.page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.2s;
}
.page-numbers.current, .page-numbers:hover { background: var(--amber); color: var(--bg); border-color: var(--amber); text-decoration: none; }
.page-numbers.dots { background: none; border: none; }

/* SEARCH */
.search-form { display: flex; gap: 8px; max-width: 520px; margin-bottom: 2.5rem; }
.search-field {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}
.search-field:focus { border-color: var(--amber); }
.search-submit {
  background: var(--amber);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.search-submit:hover { background: #e09020; }

/* 404 */
.error-page { max-width: 600px; margin: 0 auto; padding: 6rem 2rem; text-align: center; }
.error-code {
  font-family: var(--mono);
  font-size: 6rem;
  font-weight: 500;
  color: var(--border);
  line-height: 1;
  margin-bottom: 1.5rem;
}
.error-page h1 { font-size: 1.75rem; margin-bottom: 0.75rem; }
.error-page p { color: var(--muted); margin-bottom: 2rem; }

/* COMMENTS */
.comments-section { margin-top: 3rem; padding-top: 3rem; border-top: 1px solid var(--border); }
.comments-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 2rem; }
.comment-list { list-style: none; padding: 0; }
.comment { padding: 1.25rem; background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 1rem; }
.comment-author-name { font-weight: 600; font-size: 14px; color: var(--text); }
.comment-time { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-left: 10px; }
.comment-body p { font-size: 14px; color: var(--muted); margin-top: 0.75rem; line-height: 1.65; }
.comment-reply-link { font-family: var(--mono); font-size: 12px; color: var(--amber); text-decoration: none; margin-top: 0.75rem; display: inline-block; }
.comment-form { margin-top: 2.5rem; }
.comment-form p { margin-bottom: 1rem; }
.comment-form label { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--amber); }
.comment-form textarea { min-height: 140px; resize: vertical; }
.comment-form input[type="submit"] {
  background: var(--amber);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.comment-form input[type="submit"]:hover { background: #e09020; }

/* UTILS */
.text-muted { color: var(--muted); }
.divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* RESPONSIVE */
@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(8px, 8px); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }
  nav { flex-wrap: wrap; height: auto; }
  nav > ul { display: none; flex-direction: column; gap: 0; width: 100%; }
  nav > ul.active { display: flex; }
  nav > ul.active > li { border-bottom: 1px solid var(--border); }
  nav > ul.active > li > a { display: block; padding: 12px 0; }
  nav > ul > li > ul { position: static; display: none; border: none; box-shadow: none; background: transparent; }
  nav > ul.active > li > ul { display: flex; background: var(--bg3); }
  nav > ul > li > ul > li { padding-left: 1rem; }
  .stats { flex-direction: column; align-items: center; }
  .stat { border-right: none; border-bottom: 1px solid var(--border); padding: 1.5rem 0; max-width: 100%; width: 100%; }
  .stat:last-child { border-bottom: none; }
  .hero { padding: 4rem 1.5rem 3rem; }
  section { padding: 3rem 1.5rem; }
  .content-wrap, .content-wrap-wide { padding: 3rem 1.5rem; }
  .page-header { padding: 3rem 1.5rem 0; }
  .post-grid { grid-template-columns: 1fr; }
  .install-block { max-width: 100%; }
}

/* WP COMPAT */
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: var(--muted); text-align: center; margin-top: 0.5rem; font-family: var(--mono); }
img.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
img.alignright { float: right; margin: 0 0 1rem 1.5rem; }
img.aligncenter { display: block; margin: 1rem auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
