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

/* ── Tokens ───────────────────────────── */
:root {
  --bg:           #0a0a0c;
  --surface:      #111114;
  --surface-2:    #18181b;
  --text:         #e4e4e7;
  --text-2:       #8a8a96;
  --text-3:       #52525a;
  --border:       #27272a;
  --border-2:     #3a3a3e;
  --accent:       #0099ff;
  --accent-low:   rgba(0, 153, 255, 0.08);
  --accent-ring:  rgba(0, 153, 255, 0.25);
  --mono: 'IBM Plex Mono', monospace;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --r:   6px;
  --max: 1100px;
}

/* ── Base ─────────────────────────────── */
html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Layout ───────────────────────────── */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Badge ────────────────────────────── */
.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-ring);
  border-radius: 3px;
  padding: 0.28rem 0.7rem;
  background: var(--accent-low);
}

/* ── Nav ──────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(10, 10, 12, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  height: 3.5rem;
  gap: 1.5rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.nav-brand img { height: 22px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.1rem;
}

.nav-links a {
  font-size: 0.82rem;
  color: var(--text-3);
  padding: 0.38rem 0.65rem;
  border-radius: var(--r);
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover  { color: var(--text); background: var(--surface-2); }
.nav-links a.active {
  color: var(--text);
  background: var(--surface-2);
  border-bottom: 2px solid var(--accent);
}

.nav-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

/* ── Buttons ──────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--r);
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #33aaff; }

.btn-outline {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--border-2); color: var(--text); }

.btn-ghost {
  background: transparent;
  color: var(--text-3);
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.74rem;
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-2); }

.btn-discord {
  background: var(--accent);
  color: #fff;
}
.btn-discord:hover { background: #33aaff; }

#lang-toggle {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-3);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 0.33rem 0.58rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
#lang-toggle:hover { color: var(--accent); border-color: var(--accent-ring); }

/* ── Hero ─────────────────────────────── */
.hero {
  padding: 9.5rem 0 7rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  background-image: url('/img/background-hub.jpg');
  background-size: cover;
  background-position: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 88% 60% at 50% -5%, rgba(0, 153, 255, 0.18) 0%, rgba(0, 153, 255, 0.05) 55%, transparent 100%),
    linear-gradient(to bottom, rgba(10,10,12,0.78) 0%, rgba(10,10,12,0.68) 45%, rgba(10,10,12,0.96) 100%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-eyebrow { margin-bottom: 1.75rem; }

.hero h1 {
  font-family: var(--mono);
  font-size: clamp(3.5rem, 9vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 1.1rem;
}

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 300;
  color: var(--text-2);
  max-width: 500px;
  margin: 0 auto 0.9rem;
  line-height: 1.55;
}

.hero-desc {
  font-size: 0.87rem;
  color: var(--text-3);
  max-width: 420px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Section ──────────────────────────── */
.section {
  padding: 5rem 0;
}

.section + .section {
  border-top: 1px solid var(--border);
}

.section-header {
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 0.3rem;
}

.section-header p {
  font-size: 0.85rem;
  color: var(--text-3);
}

/* ── Project cards ────────────────────── */
.grid-projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 860px) { .grid-projects { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .grid-projects { grid-template-columns: 1fr; } }

.card-project {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: border-color 0.15s, transform 0.15s;
  cursor: pointer;
}

.card-project:hover {
  border-color: var(--accent-ring);
  transform: translateY(-1px);
}

.card-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-low);
  border-radius: 7px;
  margin-bottom: 1rem;
  color: var(--accent);
  flex-shrink: 0;
}

.card-icon svg { width: 17px; height: 17px; }

.card-project h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
}

.card-project p {
  font-size: 0.84rem;
  color: var(--text-2);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1.25rem;
}

.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
  gap: 0.5rem;
}

.tags { display: flex; gap: 0.3rem; flex-wrap: wrap; }

.tag {
  font-family: var(--mono);
  font-size: 0.63rem;
  font-weight: 500;
  padding: 0.17rem 0.46rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-3);
}

.card-arrow {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--text-3);
  flex-shrink: 0;
  transition: color 0.15s;
}

.card-project:hover .card-arrow { color: var(--accent); }

/* ── Community ────────────────────────── */
.community {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3.5rem 2rem;
  text-align: center;
}

.community h2 {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.community > p {
  font-size: 0.87rem;
  color: var(--text-2);
  max-width: 460px;
  margin: 0 auto 2rem;
  line-height: 1.65;
}

.community-btns {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Footer ───────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 1px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding: 3.5rem 0;
}

@media (max-width: 760px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

.footer-brand {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--accent);
  font-size: 0.9rem;
}

.footer-desc {
  font-size: 0.78rem;
  color: var(--text-3);
  margin-top: 0.5rem;
  line-height: 1.6;
  max-width: 220px;
}

.footer-assoc {
  margin-top: 0.75rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--text-3);
  opacity: 0.7;
}

.footer-col h4 {
  font-size: 0.77rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
  color: var(--text-2);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.footer-col a {
  font-size: 0.78rem;
  color: var(--text-3);
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1.1rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  color: var(--text-3);
}

.footer-bottom a { color: var(--text-3); }
.footer-bottom a:hover { color: var(--text-2); }

/* ── Page hero (inner pages) ──────────── */
.page-hero {
  padding: 8rem 0 4rem;
  border-bottom: 1px solid var(--border);
}

.page-hero .badge { margin-bottom: 1.5rem; }

.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.page-hero > .wrap > p {
  font-size: 0.95rem;
  color: var(--text-2);
  max-width: 520px;
  line-height: 1.65;
}

/* ── Panel ────────────────────────────── */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.75rem;
}

.panel h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.panel p {
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.65;
}

/* ── Grid helpers ─────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr; } }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 860px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .grid-3 { grid-template-columns: 1fr; } }

/* ── Timeline ─────────────────────────── */
.timeline { display: flex; flex-direction: column; gap: 1.75rem; }

.tl-item {
  padding-left: 1.5rem;
  border-left: 2px solid var(--border);
  position: relative;
}

.tl-item::before {
  content: '';
  position: absolute;
  left: -5px; top: 6px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.tl-date {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tl-item h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 0.2rem;
}

.tl-item p {
  font-size: 0.84rem;
  color: var(--text-2);
  margin-top: 0.25rem;
  line-height: 1.6;
}

.tl-item a { color: var(--accent); }

/* ── About: stats bar ─────────────────── */
.stats-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats-inner {
  display: flex;
  align-items: stretch;
}

.stat-item {
  flex: 1;
  padding: 1.75rem 1.5rem;
  border-right: 1px solid var(--border);
  text-align: center;
}
.stat-item:last-child { border-right: none; }

.stat-value {
  display: block;
  font-family: var(--mono);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.stat-label {
  display: block;
  font-size: 0.76rem;
  color: var(--text-3);
}

@media (max-width: 580px) {
  .stats-inner { flex-wrap: wrap; }
  .stat-item { flex: 1 1 50%; border-bottom: 1px solid var(--border); }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:last-child { border-bottom: none; }
  .stat-item:nth-last-child(2) { border-bottom: none; }
}

/* ── About: mission bar ───────────────── */
.mission-bar {
  display: flex;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.mission-bar-item {
  flex: 1;
  padding: 1.5rem 1.5rem;
  border-right: 1px solid var(--border);
}
.mission-bar-item:last-child { border-right: none; }

.mission-tag {
  font-family: var(--mono);
  font-size: 0.63rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.5rem;
}

.mission-bar-item h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

@media (max-width: 640px) {
  .mission-bar { flex-wrap: wrap; }
  .mission-bar-item { flex: 1 1 50%; border-bottom: 1px solid var(--border); }
  .mission-bar-item:nth-child(2) { border-right: none; }
  .mission-bar-item:last-child { border-bottom: none; }
  .mission-bar-item:nth-last-child(2) { border-bottom: none; }
}

/* ── About: history list ──────────────── */
.history-list { display: flex; flex-direction: column; }

.history-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.history-item:first-child { border-top: 1px solid var(--border); }

.history-date {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-top: 0.2rem;
  line-height: 1.5;
}

.history-content h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.history-content p {
  font-size: 0.84rem;
  color: var(--text-2);
  line-height: 1.6;
}

.history-content a { color: var(--accent); }

@media (max-width: 580px) {
  .history-item { grid-template-columns: 1fr; gap: 0.35rem; }
}

/* ── About: sponsor cards ─────────────── */
.sponsor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 640px) { .sponsor-grid { grid-template-columns: 1fr; } }

.sponsor-card {
  padding: 2rem;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.sponsor-card-primary {
  background: rgba(0, 153, 255, 0.06);
  border: 1px solid rgba(0, 153, 255, 0.25);
}

.sponsor-card-outline {
  background: var(--surface);
  border: 1px solid var(--border);
}

.sponsor-card-label {
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.sponsor-card h3 {
  font-size: 1rem;
  font-weight: 600;
}

.sponsor-card p {
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.65;
  flex: 1;
}

.sponsor-card .btn { align-self: flex-start; margin-top: 0.5rem; }

/* ── About: legal note ────────────────── */
.legal-note {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-3);
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

/* ── Research: numbered areas ─────────── */
.area-list { display: flex; flex-direction: column; }

.area-row {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 2rem;
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.area-row:first-child { border-top: 1px solid var(--border); }

.area-num {
  font-family: var(--mono);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.1;
  padding-top: 0.05rem;
  user-select: none;
}

.area-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.area-body p {
  font-size: 0.86rem;
  color: var(--text-2);
  line-height: 1.75;
  max-width: 680px;
}

@media (max-width: 480px) {
  .area-row { grid-template-columns: 2.25rem 1fr; gap: 1rem; }
  .area-num { font-size: 1.25rem; }
}

/* ── Severity badges ──────────────────── */
.sev {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  border-radius: 3px;
  padding: 0.18rem 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.sev-critical { color: #fff; background: #ff1744; border: 1px solid #ff1744; }
.sev-high     { color: #ff4d6a; background: rgba(255,77,106,0.1); border: 1px solid rgba(255,77,106,0.25); }
.sev-medium   { color: #ff9f43; background: rgba(255,159,67,0.1); border: 1px solid rgba(255,159,67,0.25); }

/* ── CVE table ────────────────────────── */
.cve-table-wrap { overflow-x: auto; }

.cve-table {
  width: 100%;
  border-collapse: collapse;
}

.cve-table thead th {
  font-family: var(--mono);
  font-size: 0.63rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-3);
  text-align: left;
  padding: 0 1.5rem 0.8rem 0;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.cve-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}
.cve-table tbody tr:hover { background: var(--surface); }

.cve-table tbody td {
  padding: 0.8rem 1.25rem 0.8rem 0;
  vertical-align: middle;
}

.td-cve {
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  vertical-align: middle;
}

.td-cvss {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--text-3);
  white-space: nowrap;
}

.td-title a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  color: var(--text);
  font-size: 0.88rem;
  transition: color 0.15s;
}
.td-title a:hover { color: var(--accent); }

.td-arrow {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--text-3);
  flex-shrink: 0;
  transition: color 0.15s;
}
.td-title a:hover .td-arrow { color: var(--accent); }

.cve-reporter {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--accent);
}

.td-vendor-col {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
  vertical-align: middle;
}

.cve-product-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  padding: 0.35rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
}

.cve-product-name {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text);
}

.cve-product-dot { font-size: 0.74rem; color: var(--border-2); }

.cve-product-vendor {
  font-size: 0.74rem;
  color: var(--text-3);
}

.cve-fix {
  margin-top: 1.25rem;
  font-size: 0.78rem;
  color: var(--text-3);
}

.mono-val {
  font-family: var(--mono);
  color: var(--text-2);
}

@media (max-width: 640px) { .hide-mobile { display: none; } }

/* ── Publication strips ───────────────── */
.pub-strip { display: flex; flex-direction: column; }

.pub-strip-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
}
.pub-strip-item:first-child { border-top: 1px solid var(--border); }

.pub-strip-body { flex: 1; }

.pub-strip-label {
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.35rem;
}

.pub-strip-body h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.pub-strip-body p {
  font-size: 0.84rem;
  color: var(--text-2);
  line-height: 1.6;
}

@media (max-width: 580px) {
  .pub-strip-item { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

/* ── Contact box ──────────────────────── */
.contact-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.contact-box p {
  font-size: 0.87rem;
  color: var(--text-2);
  line-height: 1.6;
}

/* ── Divider ──────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ── Mobile nav ───────────────────────── */
@media (max-width: 680px) {
  .nav-inner { flex-wrap: wrap; height: auto; padding: 0.5rem 1rem; row-gap: 0.15rem; }
  .nav-links { order: 3; width: 100%; padding-bottom: 0.4rem; }
  .nav-links a { font-size: 0.78rem; padding: 0.3rem 0.5rem; }
  .nav-end { margin-left: auto; }
  .hero { padding: 8.5rem 0 5rem; }
}
