@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  color-scheme: dark;
  --bg: #0a0a0b;
  --bg-card: #111113;
  --bg-code: #0d0d10;
  --fg: #e4e4e7;
  --fg-dim: #8b8b94;
  --fg-muted: #56565e;
  --accent: #7c8aff;
  --accent-dim: #4a5299;
  --border: #1e1e22;
  --border-hover: #2a2a30;
  --code-inline: #c9d1d9;
}

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

html {
  font-size: 17px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

::selection {
  background: var(--accent-dim);
  color: var(--fg);
}

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

a:hover {
  color: var(--fg);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.container {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

header {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
  position: sticky;
  top: 0;
  background: rgba(10, 10, 11, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.02em;
  transition: opacity 0.2s ease;
}

.site-title:hover {
  color: var(--fg);
  opacity: 0.7;
}

nav {
  display: flex;
  align-items: center;
}

nav a {
  font-size: 0.85rem;
  color: var(--fg-dim);
  margin-left: 1.5rem;
  transition: color 0.2s ease;
}

nav a:hover {
  color: var(--fg);
}

main {
  flex: 1;
  padding: 3rem 0;
  animation: fadeIn 0.3s ease-out;
}

h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

h1 {
  font-size: 2rem;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.35rem;
  margin-top: 2.5rem;
  margin-bottom: 0.9rem;
  color: var(--fg);
}

h2::before {
  content: '> ';
  color: var(--fg-muted);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
}

p {
  margin-bottom: 1.15rem;
  color: var(--fg);
}

.post-meta {
  font-size: 0.82rem;
  color: var(--fg-muted);
  margin-bottom: 2.5rem;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.01em;
}

code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.84rem;
  background: var(--bg-code);
  color: var(--code-inline);
  padding: 0.15em 0.4em;
  border: 1px solid var(--border);
}

pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent-dim);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  line-height: 1.6;
  transition: border-color 0.3s ease;
}

pre:hover {
  border-color: var(--accent-dim);
  border-left-color: var(--accent);
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.8rem;
  color: var(--code-inline);
}

.post-list {
  list-style: none;
  padding: 0;
}

.post-list li {
  padding: 1.5rem 1rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: all 0.25s ease;
  border-left: 2px solid transparent;
  margin-left: -1rem;
}

.post-list li:hover {
  border-color: var(--border-hover);
  border-left-color: var(--accent-dim);
  padding-left: 1.25rem;
}

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

.post-list a {
  color: var(--fg);
  font-weight: 500;
  display: block;
  transition: color 0.2s ease;
}

.post-list a:hover {
  color: var(--accent);
}

.post-list .post-date {
  font-size: 0.78rem;
  color: var(--fg-muted);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 0.3rem;
  letter-spacing: -0.01em;
}

.post-list .post-excerpt {
  font-size: 0.88rem;
  color: var(--fg-dim);
  margin-top: 0.4rem;
  line-height: 1.55;
}

.reading-time {
  margin-left: 0.75rem;
  color: var(--fg-muted);
  font-size: 0.75rem;
}

.reading-time::before {
  content: '·';
  margin-right: 0.75rem;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.tag {
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  background: rgba(124, 138, 255, 0.08);
  border: 1px solid rgba(124, 138, 255, 0.15);
  padding: 0.15em 0.5em;
  border-radius: 3px;
  letter-spacing: 0.02em;
}

.hero {
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 1.1rem;
  color: var(--fg-dim);
  font-weight: 400;
  margin-bottom: 0.35rem;
}

.hero p {
  font-size: 0.9rem;
  color: var(--fg-muted);
  margin-bottom: 0;
  font-style: italic;
}

footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  background: var(--bg);
}

footer p {
  font-size: 0.78rem;
  color: var(--fg-muted);
  text-align: center;
  margin-bottom: 0;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.05em;
}

ul, ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.4rem;
}

article ul li {
  list-style-type: none;
  position: relative;
  padding-left: 0.5rem;
}

article ul li::before {
  content: '—';
  position: absolute;
  left: -1.25rem;
  color: var(--fg-muted);
}

strong {
  font-weight: 600;
  color: var(--fg);
}

article {
  max-width: 100%;
}

.back-link {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--fg-muted);
  margin-bottom: 2rem;
  font-family: 'JetBrains Mono', monospace;
  transition: color 0.2s ease, transform 0.2s ease;
}

.back-link:hover {
  color: var(--accent);
  transform: translateX(-2px);
}

blockquote {
  border-left: 2px solid var(--accent-dim);
  padding-left: 1.25rem;
  margin-bottom: 1.25rem;
  color: var(--fg-dim);
  font-style: italic;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

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

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border-hover);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--fg-muted);
}

@media (max-width: 768px) {
  html {
    font-size: 16px;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  .container {
    padding: 0 1.25rem;
  }

  header {
    padding: 1rem 0;
  }

  header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  nav {
    width: 100%;
    justify-content: flex-start;
  }

  nav a {
    margin-left: 0;
    margin-right: 1.25rem;
  }

  main {
    padding: 2rem 0;
  }

  pre {
    padding: 1rem 1.25rem;
    font-size: 0.85rem;
  }

  .hero {
    margin-bottom: 2rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.15rem;
    margin-top: 2rem;
  }

  .post-list li {
    padding: 1.25rem 0.75rem;
    margin-left: -0.75rem;
  }

  .post-list li:hover {
    padding-left: 1rem;
  }

  pre {
    padding: 0.875rem 1rem;
    font-size: 0.8rem;
  }

  code {
    font-size: 0.82rem;
  }
}

.page-intro {
  font-size: 0.92rem;
  color: var(--fg-dim);
  margin-bottom: 1.75rem;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.stat:hover {
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.stat-num {
  font-size: 1.6rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.02em;
  color: var(--fg);
}

.stat-red {
  color: #ff6b6b;
}

.stat-amber {
  color: #ffb454;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.updated-note {
  font-size: 0.76rem;
  color: var(--fg-muted);
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 2.5rem;
}

.section-note {
  font-size: 0.85rem;
  color: var(--fg-dim);
  margin-bottom: 1.25rem;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 1rem;
  position: sticky;
  top: 4.25rem;
  background: var(--bg);
  padding: 0.5rem 0;
  z-index: 10;
}

#search,
#ms-search,
#category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--fg);
  border-radius: 5px;
  padding: 0.5rem 0.7rem;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s ease;
}

#search,
#ms-search {
  flex: 1;
  min-width: 220px;
}

#search:focus-visible,
#ms-search:focus-visible,
#category:focus-visible {
  outline: none;
  border-color: var(--accent);
}

.tabs {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.2rem;
}

.tab {
  background: none;
  border: none;
  color: var(--fg-dim);
  font-size: 0.8rem;
  padding: 0.35rem 0.7rem;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s ease;
}

.tab:hover {
  color: var(--fg);
}

.tab.active {
  background: rgba(124, 138, 255, 0.12);
  color: var(--accent);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.drv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.drv-table th {
  text-align: left;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-muted);
  font-weight: 500;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  position: sticky;
  top: 0;
}

.drv-table td {
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--border);
  color: var(--fg);
  vertical-align: middle;
}

.drv-table tbody tr:last-child td {
  border-bottom: none;
}

.drv-table tbody tr {
  transition: background 0.15s ease;
}

.drv-table tbody tr:hover {
  background: var(--bg-card);
}

.drv-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--fg);
}

.drv-cve {
  margin-left: 0.5rem;
  font-size: 0.72rem;
  color: var(--fg-muted);
  font-family: 'JetBrains Mono', monospace;
}

.cat {
  font-size: 0.72rem;
  color: var(--fg-dim);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  padding: 0.15em 0.5em;
  border-radius: 3px;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--fg-dim);
}

.badge {
  font-size: 0.7rem;
  font-family: 'JetBrains Mono', monospace;
  padding: 0.2em 0.55em;
  border-radius: 3px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge-red {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.25);
}

.badge-amber {
  color: #ffb454;
  background: rgba(255, 180, 84, 0.1);
  border: 1px solid rgba(255, 180, 84, 0.25);
}

.badge-dim {
  color: var(--fg-muted);
  background: transparent;
  border: 1px solid var(--border);
}

.row-link a {
  font-size: 0.78rem;
  white-space: nowrap;
}

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

@media (max-width: 768px) {
  .stat-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .controls {
    top: 3.9rem;
  }

  .drv-table th:nth-child(3),
  .drv-table td:nth-child(3) {
    display: none;
  }
}

@media (max-width: 480px) {
  .stat-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .controls {
    flex-direction: column;
    align-items: stretch;
    position: static;
    gap: 0.5rem;
  }

  #search,
  #ms-search {
    min-width: 0;
  }

  .tabs {
    width: 100%;
    justify-content: space-between;
  }

  .drv-table {
    font-size: 0.8rem;
  }

  .table-wrap {
    -webkit-overflow-scrolling: touch;
  }
}

.visually-hidden,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  z-index: 200;
  background: var(--bg-card);
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  transition: top 0.2s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 0.5rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-property: none !important;
  }

  main {
    animation: none;
  }
}
