/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  --bg-primary:    #0d1117;
  --bg-secondary:  #161b22;
  --bg-card:       #1c2333;
  --bg-card-hover: #212d3f;
  --bg-terminal:   #090d14;

  --text-primary:   #c9d1d9;
  --text-secondary: #8b949e;
  --text-muted:     #484f58;

  --accent:        #58a6ff;
  --accent-green:  #3fb950;
  --accent-red:    #f85149;
  --accent-yellow: #d29922;
  --accent-purple: #bc8cff;
  --accent-cyan:   #39d0d8;

  --border:        #30363d;
  --border-accent: rgba(88, 166, 255, 0.35);

  --header-bg:     rgba(13, 17, 23, 0.88);
  --shadow:        0 8px 40px rgba(0,0,0,0.55);
  --shadow-card:   0 4px 20px rgba(0,0,0,0.35);

  --particle-node: rgba(88, 166, 255, 0.5);
  --particle-line: rgba(88, 166, 255, 0.12);
}

[data-theme="light"] {
  --bg-primary:    #f6f8fa;
  --bg-secondary:  #ffffff;
  --bg-card:       #ffffff;
  --bg-card-hover: #f3f4f6;
  --bg-terminal:   #1c2333;

  --text-primary:   #1f2328;
  --text-secondary: #57606a;
  --text-muted:     #848d97;

  --accent:        #0969da;
  --accent-green:  #1a7f37;
  --accent-red:    #cf222e;
  --accent-yellow: #9a6700;
  --accent-purple: #8250df;
  --accent-cyan:   #0598bc;

  --border:        #d0d7de;
  --border-accent: rgba(9, 105, 218, 0.4);

  --header-bg:     rgba(246, 248, 250, 0.95);
  --shadow:        0 8px 40px rgba(31, 35, 40, 0.12);
  --shadow-card:   0 4px 20px rgba(31, 35, 40, 0.08);

  --particle-node: rgba(9, 105, 218, 0.3);
  --particle-line: rgba(9, 105, 218, 0.08);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;
}

/* ===== CANVAS ===== */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ===== HEADER ===== */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s;
  color: var(--text-primary);
}
.logo:hover { color: var(--accent); }
.logo-bracket { color: var(--accent); }

.main-nav { display: flex; gap: 0.2rem; }

.nav-tab {
  background: none;
  border: none;
  padding: 0.4rem 0.9rem;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
}
.nav-tab:hover { color: var(--text-primary); background: var(--bg-card); }
.nav-tab.active {
  color: var(--accent);
  background: rgba(88, 166, 255, 0.1);
}
[data-theme="light"] .nav-tab.active { background: rgba(9, 105, 218, 0.1); }

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ===== SEARCH BAR ===== */
.search-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 0.6rem;
  width: 15px; height: 15px;
  color: var(--text-muted);
  pointer-events: none;
}

#search-input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 3.2rem 0.4rem 2.1rem;
  color: var(--text-primary);
  font-size: 0.83rem;
  font-family: inherit;
  width: 230px;
  transition: all 0.2s;
}
#search-input::placeholder { color: var(--text-muted); }
#search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
  width: 290px;
}
[data-theme="light"] #search-input:focus { box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.12); }

.search-kbd {
  position: absolute;
  right: 0.6rem;
  font-size: 0.68rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1rem 0.3rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  pointer-events: none;
  transition: opacity 0.15s;
}
#search-input:focus ~ .search-kbd { opacity: 0; }

/* ===== THEME TOGGLE ===== */
#theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
}
#theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
#theme-toggle svg { width: 16px; height: 16px; }

[data-theme="dark"] .icon-sun  { display: none; }
[data-theme="dark"] .icon-moon { display: block; }
[data-theme="light"] .icon-sun  { display: block; }
[data-theme="light"] .icon-moon { display: none; }

/* ===== SEARCH OVERLAY ===== */
#search-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
  backdrop-filter: blur(4px);
}
#search-overlay.hidden { display: none; }

.search-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 600px;
  max-width: 90vw;
  max-height: 68vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.search-panel-header {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
}

#close-search {
  background: none; border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: all 0.2s;
}
#close-search:hover { background: var(--bg-card); color: var(--text-primary); }

#search-results-list { overflow-y: auto; padding: 0.5rem; }

.sr-item {
  padding: 0.8rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  border: 1px solid transparent;
}
.sr-item:hover { background: var(--bg-card); border-color: var(--border); }

.sr-title { font-weight: 600; font-size: 0.88rem; color: var(--text-primary); margin-bottom: 0.25rem; }
.sr-meta {
  font-size: 0.73rem; color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  display: flex; gap: 0.75rem; margin-bottom: 0.35rem;
}
.sr-tags { display: flex; gap: 0.3rem; flex-wrap: wrap; }

.no-results { padding: 2rem; text-align: center; color: var(--text-muted); font-size: 0.87rem; }

/* ===== MAIN ===== */
#main-content {
  position: relative;
  z-index: 1;
  padding-top: 60px;
}

.section {
  display: none;
  min-height: calc(100vh - 60px);
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  animation: fadeUp 0.3s ease;
}
.section.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== HERO ===== */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  padding: 1.5rem 0;
}

/* ===== TERMINAL ===== */
.terminal-window {
  width: 100%; max-width: 680px;
  background: var(--bg-terminal);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  font-family: 'JetBrains Mono', monospace;
}

.terminal-titlebar {
  background: #21262d;
  padding: 0.55rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] .terminal-titlebar { background: #e2e8f0; }

.window-dots { display: flex; gap: 6px; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }

.terminal-title {
  font-size: 0.72rem;
  color: #8b949e;
  margin: 0 auto;
}

.terminal-body {
  padding: 1.2rem 1.5rem;
  font-size: 0.855rem;
  line-height: 2.1;
  background: var(--bg-terminal);
  color: #c9d1d9;
  min-height: 148px;
}

.t-line   { display: block; }
.t-prompt { color: #3fb950; }
.t-cmd    { color: #58a6ff; }
.t-out    { color: #8b949e; padding-left: 0; }
.t-cursor {
  display: inline-block;
  color: #58a6ff;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* ===== HERO GRID ===== */
.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.1rem;
  width: 100%;
}

.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.hero-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-cyan));
  opacity: 0;
  transition: opacity 0.2s;
}
.hero-card:hover { border-color: var(--border-accent); box-shadow: var(--shadow-card); transform: translateY(-2px); }
.hero-card:hover::after { opacity: 1; }

.hero-card-icon { font-size: 1.9rem; margin-bottom: 0.65rem; }
.hero-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.45rem; }
.hero-card p { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 0.75rem; }

.hero-card-tags { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.htag {
  font-size: 0.68rem;
  font-family: 'JetBrains Mono', monospace;
  padding: 0.18rem 0.45rem;
  border-radius: 4px;
  background: rgba(88, 166, 255, 0.1);
  border: 1px solid rgba(88, 166, 255, 0.25);
  color: var(--accent);
}
[data-theme="light"] .htag { background: rgba(9,105,218,0.08); border-color: rgba(9,105,218,0.2); }

/* ===== SECTION HEADER ===== */
.section-header { margin-bottom: 1.75rem; }
.section-header h1 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.65rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.section-header h1 .accent { color: var(--accent); }
.section-desc { color: var(--text-secondary); font-size: 0.87rem; line-height: 1.6; }

/* ===== TAG BAR ===== */
.tag-bar { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1.75rem; min-height: 1px; }

.tag-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.28rem 0.8rem;
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s;
}
.tag-btn:hover, .tag-btn.active {
  background: rgba(88, 166, 255, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}
[data-theme="light"] .tag-btn:hover,
[data-theme="light"] .tag-btn.active { background: rgba(9,105,218,0.08); }

/* ===== ARTICLES GRID ===== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.1rem;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.article-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.card-title { font-size: 0.97rem; font-weight: 600; color: var(--text-primary); line-height: 1.45; flex: 1; }
.card-excerpt { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.65; flex: 1; }

.card-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.ctag {
  font-size: 0.68rem;
  font-family: 'JetBrains Mono', monospace;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all 0.15s;
  cursor: pointer;
}
.ctag:hover { border-color: var(--accent); color: var(--accent); }

/* tag color variants */
.ctag-blue   { background: rgba(88,166,255,0.08);  border-color: rgba(88,166,255,0.25);  color: #58a6ff; }
.ctag-green  { background: rgba(63,185,80,0.08);   border-color: rgba(63,185,80,0.25);   color: #3fb950; }
.ctag-red    { background: rgba(248,81,73,0.08);   border-color: rgba(248,81,73,0.25);   color: #f85149; }
.ctag-yellow { background: rgba(210,153,34,0.08);  border-color: rgba(210,153,34,0.25);  color: #d29922; }
.ctag-purple { background: rgba(188,140,255,0.08); border-color: rgba(188,140,255,0.25); color: #bc8cff; }
.ctag-cyan   { background: rgba(57,208,216,0.08);  border-color: rgba(57,208,216,0.25);  color: #39d0d8; }

[data-theme="light"] .ctag-blue   { color: #0969da; }
[data-theme="light"] .ctag-green  { color: #1a7f37; }
[data-theme="light"] .ctag-red    { color: #cf222e; }
[data-theme="light"] .ctag-yellow { color: #9a6700; }
[data-theme="light"] .ctag-purple { color: #8250df; }
[data-theme="light"] .ctag-cyan   { color: #0598bc; }

/* difficulty badges */
.badge {
  font-size: 0.68rem;
  font-family: 'JetBrains Mono', monospace;
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge-easy   { background: rgba(63,185,80,0.1);   color: #3fb950; border: 1px solid rgba(63,185,80,0.3); }
.badge-medium { background: rgba(210,153,34,0.1);  color: #d29922; border: 1px solid rgba(210,153,34,0.3); }
.badge-hard   { background: rgba(248,81,73,0.1);   color: #f85149; border: 1px solid rgba(248,81,73,0.3); }
.badge-insane { background: rgba(188,140,255,0.1); color: #bc8cff; border: 1px solid rgba(188,140,255,0.3); }

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.73rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
}
.card-read { color: var(--accent); }

/* ===== EMPTY STATE ===== */
.empty-state {
  grid-column: 1/-1;
  text-align: center;
  padding: 4rem 2rem;
}
.empty-icon { font-size: 2.8rem; margin-bottom: 1rem; opacity: 0.45; }
.empty-state h3 { font-size: 1.05rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.45rem; }
.empty-state p { font-size: 0.84rem; color: var(--text-muted); line-height: 1.65; max-width: 380px; margin: 0 auto; }
.empty-code {
  display: inline-block;
  margin-top: 1.4rem;
  padding: 0.6rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--accent);
}

/* ===== MODAL ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 2rem 1rem 3rem;
}
.modal.hidden { display: none; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  z-index: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 820px;
  box-shadow: var(--shadow);
}

.modal-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.modal-tags { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.modal-close {
  background: var(--bg-card);
  border: 1px solid var(--border);
  width: 32px; height: 32px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.88rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.modal-close:hover { background: var(--accent-red); border-color: var(--accent-red); color: #fff; }

#modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.65rem;
}
.modal-meta {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  font-size: 0.78rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.meta-sep { opacity: 0.4; }

/* modal body prose */
.modal-loading { color: var(--text-muted); font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; padding: 2rem 0; }
.modal-error   { color: var(--accent-red); font-size: 0.85rem; padding: 1rem 0; }
.modal-body { font-size: 0.88rem; line-height: 1.85; color: var(--text-secondary); }
.modal-body h2 { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); margin: 1.75rem 0 0.65rem; }
.modal-body h3 { font-size: 0.98rem; font-weight: 600; color: var(--text-primary); margin: 1.25rem 0 0.5rem; }
.modal-body p  { margin-bottom: 0.9rem; }
.modal-body ul, .modal-body ol { margin: 0 0 0.9rem 1.5rem; }
.modal-body li { margin-bottom: 0.35rem; }

.modal-body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  color: var(--accent);
}

.modal-body pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.1rem 1.3rem;
  overflow-x: auto;
  margin: 0.9rem 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--text-primary);
}

/* ===== FOOTER ===== */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
}

.status-dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--accent-green);
  border-radius: 50%;
  margin-right: 0.4rem;
  animation: pulse 2s ease infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ===== SELECTION ===== */
::selection { background: rgba(88,166,255,0.28); color: var(--text-primary); }

/* ===== HIGHLIGHT (search) ===== */
mark {
  background: rgba(88,166,255,0.28);
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

/* ===== HAMBURGER BUTTON ===== */
#mobile-menu-btn {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 36px; height: 36px;
  cursor: pointer;
  color: var(--text-secondary);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  transition: all 0.2s;
  flex-shrink: 0;
}
#mobile-menu-btn:hover { border-color: var(--accent); color: var(--accent); }
#mobile-menu-btn span {
  display: block;
  width: 16px; height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: all 0.25s;
}
#mobile-menu-btn.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
#mobile-menu-btn.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
#mobile-menu-btn.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ===== MOBILE NAV DRAWER ===== */
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 1.25rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.mobile-nav.open { display: flex; }

.mobile-nav-tab {
  background: none;
  border: 1px solid transparent;
  padding: 0.65rem 1rem;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: 8px;
  text-align: left;
  transition: all 0.18s;
}
.mobile-nav-tab:hover { color: var(--text-primary); background: var(--bg-card); }
.mobile-nav-tab.active {
  color: var(--accent);
  background: rgba(88, 166, 255, 0.1);
  border-color: rgba(88, 166, 255, 0.2);
}
[data-theme="light"] .mobile-nav-tab.active {
  background: rgba(9, 105, 218, 0.08);
  border-color: rgba(9, 105, 218, 0.2);
}

/* ===== CERTIFICATIONS ===== */
.cert-group { margin-bottom: 2.5rem; }

.cert-group-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  letter-spacing: 0.04em;
}

.cert-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cert-card {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.4rem 1.8rem;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 260px;
}

.cert-card-logo {
  width: 96px;
  height: 96px;
  border-radius: 0;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cert-card-logo img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  transition: filter 0.2s;
}

.cert-card-placeholder {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
}

.cert-card-info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.cert-card-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: color 0.2s;
}

.cert-card-issuer {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.cert-card.offensive:hover {
  border-color: rgba(248, 81, 73, 0.45);
  background: rgba(248, 81, 73, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(248, 81, 73, 0.1);
}
.cert-card.offensive:hover .cert-card-name { color: var(--accent-red); }
.cert-card.offensive:hover .cert-card-logo img {
  filter: drop-shadow(0 0 8px rgba(248, 81, 73, 1)) drop-shadow(0 0 20px rgba(248, 81, 73, 0.8));
}

.cert-card.blue-team:hover {
  border-color: var(--border-accent);
  background: rgba(88, 166, 255, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(88, 166, 255, 0.1);
}
.cert-card.blue-team:hover .cert-card-name { color: var(--accent); }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .cert-columns { grid-template-columns: 1fr; gap: 2.5rem; }
  .cert-name { font-size: 1.6rem; }
}

@media (max-width: 780px) {
  .main-nav { display: none; }
  .search-container { display: none; }
  #mobile-menu-btn { display: flex; }
  .hero-grid { grid-template-columns: repeat(2, 1fr); }
  .articles-grid { grid-template-columns: 1fr; }
  .section { padding: 2rem 1rem 3rem; }
  .terminal-body { font-size: 0.78rem; overflow-x: auto; }
  .footer-inner { flex-wrap: wrap; gap: 0.4rem; }
}

@media (max-width: 480px) {
  .hero-grid { grid-template-columns: 1fr; }
  .logo { font-size: 0.85rem; }
  .modal-content { padding: 1.25rem; }
  #modal-title { font-size: 1.2rem; }
  .terminal-body { font-size: 0.72rem; }
}
