@font-face {
  font-family: 'NVIDIA Sans';
  src: url('assets/NVIDIA-Sans-Font-TTF/NVIDIASans_Lt.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'NVIDIA Sans';
  src: url('assets/NVIDIA-Sans-Font-TTF/NVIDIASans_LtIt.ttf') format('truetype');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'NVIDIA Sans';
  src: url('assets/NVIDIA-Sans-Font-TTF/NVIDIASans_Rg.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'NVIDIA Sans';
  src: url('assets/NVIDIA-Sans-Font-TTF/NVIDIASans_It.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'NVIDIA Sans';
  src: url('assets/NVIDIA-Sans-Font-TTF/NVIDIASans_Md.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'NVIDIA Sans';
  src: url('assets/NVIDIA-Sans-Font-TTF/NVIDIASans_MdIt.ttf') format('truetype');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'NVIDIA Sans';
  src: url('assets/NVIDIA-Sans-Font-TTF/NVIDIASans_Bd.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'NVIDIA Sans';
  src: url('assets/NVIDIA-Sans-Font-TTF/NVIDIASans_BdIt.ttf') format('truetype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #0b0f10;
  --panel: #11161a;
  --panel-2: #0f1418;
  --text: #e6edf3;
  --muted: #95a5b1;
  --line: #1c242b;
  --brand: #76b900; /* NVIDIA green */
  --brand-contrast: #0b1600;
  --chip-bg: #0e1418;
  --tag-bg: #10181d;
  --shadow: 0 10px 24px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.2);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background: radial-gradient(1200px 600px at 70% -20%, rgba(118,185,0,0.12), transparent 60%), var(--bg);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: 'NVIDIA Sans', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.6;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--text); text-decoration: none; }
a:hover { text-decoration: underline; }

.visually-hidden { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }

/* Header */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(11,15,16,0.75); backdrop-filter: blur(10px); z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { max-height: 40px; }
.brand-text { display: grid; }
.brand-title { font-weight: 700; letter-spacing: 0.2px; }
.brand-subtitle { font-size: 12px; color: var(--muted); }
.site-nav { display: flex; gap: 16px; }
.nav-link { color: var(--muted); font-weight: 500; }
.nav-link:hover { color: var(--text); }

/* Hero */
.hero { padding: 64px 24px 32px; }
.hero-content { max-width: 1000px; margin: 0 auto; text-align: center; }
.hero h1 {
  margin: 0 0 12px; font-size: clamp(28px, 5vw, 44px); line-height: 1.15;
  background: linear-gradient(180deg, #fff, #cfe6a4 70%, var(--brand) 120%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { margin: 0 auto; max-width: 820px; color: var(--muted); font-size: 18px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; margin-top: 20px; }

/* Buttons */
.button { appearance: none; border: 1px solid var(--line); color: var(--text); background: var(--panel);
  padding: 10px 14px; border-radius: 10px; cursor: pointer; font-weight: 600; }
.button:hover { filter: brightness(1.1); }
.button.primary { background: linear-gradient(180deg, #7cd000, var(--brand)); border-color: #6db300; color: #071000; }
.button.ghost { background: transparent; }

/* Toolbar */
.toolbar { display: grid; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel-2); }
.search-wrap { position: relative; max-width: 840px; margin: 0 auto; }
.search-wrap .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
#search { width: 100%; padding: 12px 14px 12px 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--chip-bg); color: var(--text); }
#search::placeholder { color: #6b7b86; }

.filters, .tags { display: flex; flex-wrap: wrap; gap: 8px; max-width: 1000px; margin: 0 auto; }
.chip { padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--chip-bg); color: var(--text); cursor: pointer; font-weight: 600; }
.chip:hover { border-color: #24313a; }
.chip.is-active { background: rgba(118, 185, 0, 0.15); border-color: #365214; }

.tag { padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--tag-bg); color: var(--muted); cursor: pointer; font-weight: 600; font-size: 12px; }
.tag.is-active { color: #071000; background: linear-gradient(180deg, #86d600, var(--brand)); border-color: #6db300; }

.results-meta { display: flex; align-items: center; justify-content: space-between; max-width: 1000px; width: 100%; margin: 0 auto; gap: 12px; color: var(--muted); }
.sort { display: inline-flex; align-items: center; gap: 8px; }
#sort-select { padding: 6px 10px; border-radius: 8px; background: var(--chip-bg); color: var(--text); border: 1px solid var(--line); }

/* Grid */
.grid { padding: 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; max-width: 1200px; margin: 0 auto; align-items: start; }
.card { background: linear-gradient(180deg, rgba(118,185,0,0.06), transparent 60%), var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 16px; display: grid; gap: 10px; transition: transform .15s ease, border-color .15s ease; }
.card:hover { transform: translateY(-2px); border-color: #223028; }
.card-type { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; }
.card h3 { margin: 0; font-size: 18px; }
.card .meta { display: flex; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.card .desc { color: #c8d6df; font-size: 14px; }
.card .desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .tags { margin-top: 6px; }
.card .actions { display: flex; gap: 10px; align-items: center; }
.card .open { margin-left: auto; }

.empty { text-align: center; padding: 32px; color: var(--muted); }

.site-footer { border-top: 1px solid var(--line); padding: 24px; text-align: center; color: var(--muted); }

/* Focus & a11y */
:focus-visible { outline: 2px solid #a1ff3b; outline-offset: 2px; border-radius: 6px; }

/* Prose (markdown-rendered content) */
.prose { color: var(--text); line-height: 1.75; }
.prose h1, .prose h2, .prose h3, .prose h4 { margin: 1.5em 0 .6em; line-height: 1.25; }
.prose h1 { font-size: 32px; }
.prose h2 { font-size: 24px; }
.prose h3 { font-size: 20px; }
.prose p { margin: 1em 0; color: #cfe0e9; text-align: justify; text-justify: inter-word; hyphens: auto; }
.prose a { color: #b7ff5a; }
.prose ul, .prose ol { padding-left: 1.2em; margin: .6em 0 .6em 1em; }
.prose li { margin: .3em 0; }
.prose blockquote { margin: 1em 0; padding: .6em .8em; border-left: 3px solid var(--brand); background: #0f161a; color: #d5e6ee; }
.prose pre { background: #0e1418; padding: 12px; border-radius: 10px; overflow: auto; border: 1px solid var(--line); }
.prose code { background: #0e1418; padding: .1em .35em; border-radius: 6px; border: 1px solid var(--line); }
/* Images inside prose */
.prose img { max-width: 100%; height: auto; display: block; margin: 1.2em auto; border-radius: 12px; border: 1px solid var(--line); background: #0e1418; }

/* Small screens */
@media (max-width: 600px) {
  .site-header { padding: 12px 16px; }
  .hero { padding: 40px 16px 16px; }
  .grid { padding: 16px; gap: 12px; }
}

/* Wide screens keep CSS grid to preserve left-to-right reading order */
@media (min-width: 900px) {
  .grid { display: grid; grid-template-columns: repeat(3, minmax(280px, 1fr)); }
}
