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

:root {
  --bg: #0a0e14;
  --bg-2: #121821;
  --bg-3: #18202c;
  --ink: #e8edf3;
  --muted: #8a94a3;
  --dim: #5c6675;
  --accent: #ff7a1a;
  --accent-2: #ffb86b;
  --border: #1f2733;
  --ok: #4dd599;
  --warn: #ffcc4d;
  --bad: #ff6b6b;
  --purple: #a78bfa;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(700px 400px at 15% -5%, rgba(255,122,26,0.10), transparent 60%),
    radial-gradient(600px 500px at 95% 15%, rgba(167,139,250,0.07), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

main, header, footer { position: relative; z-index: 1; }

a { color: var(--accent-2); text-decoration: none; }
a:hover { color: var(--accent); }

/* ── NAV ─────────────────────────────────────────── */
.nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 48px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
  backdrop-filter: blur(14px);
  background: rgba(10,14,20,0.72);
  z-index: 20;
}
.brand { color: var(--ink); font-weight: 700; letter-spacing: 0.03em; font-size: 17px; }
.brand-sub { color: var(--dim); font-weight: 400; font-size: 13px; margin-left: 4px; }
.nav nav { display: flex; gap: 26px; align-items: center; }
.nav nav a { color: var(--muted); font-size: 14px; transition: color .15s; }
.nav nav a:hover { color: var(--ink); }
.nav nav a.cta {
  background: var(--accent); color: #000; padding: 8px 16px;
  border-radius: 6px; font-weight: 600;
}
.nav nav a.cta:hover { background: var(--accent-2); color: #000; }

/* ── LANG SWITCH ─────────────────────────────────── */
.lang {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.lang button {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--dim);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 6px 11px;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.lang button:hover { color: var(--ink); }
.lang button.on {
  background: var(--accent);
  color: #000;
}

/* ── HERO ────────────────────────────────────────── */
.hero { padding: 130px 48px 90px; max-width: 1180px; margin: 0 auto; }
.hero-tag {
  display: inline-block;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); border: 1px solid rgba(255,122,26,0.35);
  padding: 6px 14px; border-radius: 100px; margin-bottom: 28px;
}
.hero h1 {
  font-size: clamp(38px, 6vw, 68px);
  font-weight: 800; letter-spacing: -0.025em; line-height: 1.04;
  margin-bottom: 24px;
}
.hero h1 em { color: var(--accent); font-style: normal; }
.lede {
  font-size: 19px; color: var(--muted);
  max-width: 640px; margin-bottom: 34px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.hero-meta {
  font-size: 13px; color: var(--dim);
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.hero-meta .dot { opacity: 0.4; }

/* ── BUTTONS ─────────────────────────────────────── */
.btn {
  display: inline-block; padding: 12px 24px; border-radius: 8px;
  font-weight: 600; font-size: 15px; border: 1px solid transparent;
  cursor: pointer; transition: all .15s ease;
}
.btn.primary { background: var(--accent); color: #000; }
.btn.primary:hover { background: var(--accent-2); color: #000; }
.btn.ghost { border-color: var(--border); color: var(--ink); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn.wide { display: block; text-align: center; margin-top: 24px; }

/* ── SECTIONS ────────────────────────────────────── */
.section { max-width: 1180px; margin: 0 auto; padding: 70px 48px; }
.section h2 { font-size: 34px; letter-spacing: -0.015em; margin-bottom: 14px; }
.section-lede { color: var(--muted); max-width: 700px; margin-bottom: 40px; font-size: 16px; }

/* ── FOCUS GRID ──────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 18px;
}
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 26px;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: rgba(255,122,26,0.45); transform: translateY(-3px); }
.card-num {
  font-size: 12px; color: var(--dim); font-family: ui-monospace, monospace;
  letter-spacing: 0.1em; margin-bottom: 14px;
}
.card h3 { font-size: 17px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tags span {
  font-size: 11px; font-family: ui-monospace, monospace;
  color: var(--purple); background: rgba(167,139,250,0.10);
  border: 1px solid rgba(167,139,250,0.22);
  padding: 3px 8px; border-radius: 4px;
}

/* ── COVERAGE MATRIX ─────────────────────────────── */
.matrix {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-2);
}
.matrix-head, .row {
  display: grid;
  grid-template-columns: 180px 210px 1fr;
  gap: 16px;
  padding: 13px 20px;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.matrix-head {
  background: var(--bg-3);
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--dim);
}
.matrix-head span:last-child { padding-right: 4px; }
.row { font-size: 14px; }
.row:last-child { border-bottom: 0; }
.row.highlight { background: rgba(255,204,77,0.05); }
.r-range { font-family: ui-monospace, monospace; color: var(--ink); font-size: 13px; }
.r-status { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.r-status i { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.r-status.full    { color: var(--ok); }
.r-status.full i  { background: var(--ok); box-shadow: 0 0 8px rgba(77,213,153,0.6); }
.r-status.partial { color: var(--warn); }
.r-status.partial i { background: var(--warn); box-shadow: 0 0 8px rgba(255,204,77,0.6); }
.r-status.patched { color: var(--bad); }
.r-status.patched i { background: var(--bad); box-shadow: 0 0 8px rgba(255,107,107,0.5); }
.r-status.gap     { color: var(--purple); }
.r-status.gap i   { background: var(--purple); box-shadow: 0 0 8px rgba(167,139,250,0.6); }
.r-note { color: var(--muted); font-size: 13px; }

.legend {
  display: flex; gap: 22px; flex-wrap: wrap;
  margin-top: 16px; font-size: 12px; color: var(--dim);
}
.legend span { display: flex; align-items: center; gap: 7px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; }
.lg.full { background: var(--ok); }
.lg.partial { background: var(--warn); }
.lg.patched { background: var(--bad); }
.lg.gap { background: var(--purple); }

/* ── RULE CARDS ──────────────────────────────────── */
.rule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.rule-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: 8px;
  padding: 18px;
}
.rule-card h4 {
  font-family: ui-monospace, monospace;
  font-size: 13px; color: var(--ink); margin-bottom: 8px;
  word-break: break-word;
}
.rule-card p { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.rule-card .tlp {
  font-size: 11px; font-family: ui-monospace, monospace;
  color: var(--dim);
}

/* ── WRITING ─────────────────────────────────────── */
.post-list { display: flex; flex-direction: column; gap: 12px; }
.post {
  display: grid;
  grid-template-columns: 84px 1fr 24px;
  gap: 20px; align-items: center;
  padding: 20px 22px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--ink);
  transition: border-color .2s, background .2s;
}
.post:hover { border-color: rgba(255,122,26,0.45); background: var(--bg-3); }
.post-date {
  font-family: ui-monospace, monospace;
  font-size: 12px; color: var(--dim);
}
.post h4 { font-size: 16px; margin-bottom: 5px; }
.post p { color: var(--muted); font-size: 13px; }
.arrow { color: var(--dim); font-size: 18px; text-align: right; transition: color .2s, transform .2s; }
.post:hover .arrow { color: var(--accent); transform: translateX(3px); }

/* ── CONTACT ─────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.contact-grid > div {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 6px;
}
.ck {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--dim);
}
.cv { font-size: 14px; word-break: break-all; }
.cv.mono { font-family: ui-monospace, monospace; color: var(--accent-2); }

/* ── FOOTER ──────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 44px 48px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  display: flex; flex-direction: column; gap: 8px;
  align-items: center;
}
.tiny { font-size: 11px; color: var(--dim); }

/* ── REVEAL ANIMATION ────────────────────────────── */
.card, .row, .rule-card, .post, .hero-tag, h1, .lede {
  opacity: 0; transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease,
              border-color .2s ease, background .2s ease;
}
.card.in, .row.in, .rule-card.in, .post.in,
.hero-tag.in, h1.in, .lede.in {
  opacity: 1; transform: translateY(0);
}

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 760px) {
  .nav { padding: 14px 20px; }
  .nav nav { gap: 14px; }
  .brand-sub { display: none; }
  .hero, .section { padding-left: 20px; padding-right: 20px; }
  .hero { padding-top: 70px; }
  .matrix-head { display: none; }
  .row { grid-template-columns: 1fr; gap: 4px; padding: 14px 16px; }
  .r-status { font-size: 12px; }
  .post { grid-template-columns: 1fr; gap: 8px; }
  .arrow { display: none; }
}
