:root {
  --bg: #000000;
  --bg-deep: #04070d;
  --bg-navy: #07131c;
  --fg: #ffffff;
  --muted: #8a929a;
  --soft: rgba(255,255,255,0.68);
  --line: #171717;
  --line-strong: #2b2b2b;
  --red: #ff6b35;
  --green: #7dc9a2;
  --yellow: #ffbe0b;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 12%, rgba(125, 201, 162, 0.14), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(255, 107, 53, 0.13), transparent 33%),
    radial-gradient(circle at 52% 88%, rgba(255, 190, 11, 0.08), transparent 32%),
    linear-gradient(180deg, var(--bg-navy) 0%, var(--bg-deep) 42%, var(--bg) 100%);
  color: var(--fg);
  font-family: 'DM Sans', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), transparent 88%);
}

body::after {
  content: "";
  position: fixed;
  width: 40rem;
  height: 40rem;
  right: -16rem;
  bottom: -16rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.22), transparent 70%);
  filter: blur(24px);
  pointer-events: none;
  opacity: 0.5;
}

nav, main, footer { position: relative; z-index: 1; }
nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 2rem;
  background: rgba(0,0,0,0.76);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
}

.brand {
  color: var(--fg);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
}

.brand::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

a { color: inherit; }
nav a {
  color: var(--muted);
  text-decoration: none;
}
nav a:hover, nav a.active { color: var(--fg); }

main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  padding: 7rem 0 4rem;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.68rem;
  margin-bottom: 1.2rem;
}

h1, h2, h3 {
  font-family: 'Syne', sans-serif;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

h1 {
  font-size: clamp(2.5rem, 7vw, 6rem);
  max-width: 980px;
}

.lede {
  margin-top: 1.5rem;
  max-width: 820px;
  color: rgba(255,255,255,0.72);
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
}

.section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--line);
}

.section h2 {
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  margin-bottom: 1.5rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.card {
  min-height: 260px;
  padding: 1.5rem;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.032), rgba(255,255,255,0.01)),
    radial-gradient(circle at top right, rgba(255, 107, 53, 0.065), transparent 60%),
    #020407;
}

.card h2, .card h3 {
  font-size: 1.45rem;
  margin-bottom: 0.9rem;
}

.card p, .article-body p, .article-body li, .section p {
  color: var(--soft);
}

.meta-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.meta-list strong { color: var(--fg); }
.link-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  padding: 0.95rem 1.25rem;
  border: 1px solid rgba(255,255,255,0.72);
  color: var(--fg);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
}

.button.primary {
  background: var(--red);
  border-color: var(--red);
  color: var(--bg);
}

.article-body {
  max-width: 860px;
  padding: 4rem 0;
}

.article-body h2 {
  margin: 2.75rem 0 1rem;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
}

.article-body p {
  margin: 0 0 1.2rem;
  font-size: 1.03rem;
}

.article-body ul {
  padding-left: 1.2rem;
  margin: 1rem 0 1.5rem;
}

.note-index {
  display: grid;
  grid-template-columns: repeat(5, minmax(220px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.note-index .card {
  min-height: 320px;
}

footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: 2.5rem 2rem;
  margin-top: 4rem;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

footer a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.22);
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  nav { align-items: flex-start; flex-direction: column; }
  nav ul { justify-content: flex-start; }
  .grid, .note-index { grid-template-columns: 1fr; }
  .hero { padding-top: 4rem; }
}
