:root {
  --bg: #0d1117;
  --bg-alt: #12171f;
  --text: #e6edf3;
  --muted: #8c96a2;
  --copy: #aab4c0;
  --ring: #d99a44;
  --accent: #7c5cff;
  --border: #232a35;
  --max: 1080px;
  --mono: ui-monospace, "DejaVu Sans Mono", "SFMono-Regular", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

a { color: inherit; }

.accent { color: var(--accent); }

/* header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--ring);
  object-fit: cover;
}

.brand-name {
  font-weight: 700;
  font-size: 18px;
}

nav { display: flex; align-items: center; gap: 24px; font-size: 14px; }
nav a { text-decoration: none; color: var(--muted); }
nav a:hover { color: var(--text); }
nav a[aria-current="page"] { color: var(--text); }

.cta-small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 6px;
  color: var(--text) !important;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.cta-small:hover { border-color: #3a4353; background: var(--bg-alt); }
.cta-small:hover .btn-arrow { transform: translateX(3px); }

/* hero */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  min-height: 620px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 40px 56px max(20px, calc((100vw - var(--max)) / 2 + 20px));
}

.kicker {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 16px;
}

h1 {
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  font-weight: 800;
}

.lede {
  color: var(--copy);
  font-size: 17px;
  max-width: 46ch;
  margin: 0 0 28px;
}

.hero-ctas { display: flex; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.btn-primary { background: var(--ring); color: #14100a; }

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: #3a4353; background: var(--bg-alt); }

.btn-arrow { transition: transform 0.15s ease; }
.btn-ghost:hover .btn-arrow { transform: translateX(3px); }

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.stat { display: flex; flex-direction: column; gap: 4px; flex: 1 1 0; min-width: 0; }

.stat-num {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

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

.hero-photo {
  position: relative;
  overflow: hidden;
  max-width: 760px;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(to right, var(--bg) 0%, transparent 14%),
    linear-gradient(to bottom, transparent 85%, var(--bg) 100%),
    radial-gradient(110% 110% at 78% 18%, rgba(124, 92, 255, 0.85), transparent 58%),
    radial-gradient(110% 110% at 34% 90%, rgba(217, 154, 68, 0.85), transparent 58%),
    var(--bg-alt);
}

.hero-photo img {
  display: block;
  width: min(85%, 520px);
  aspect-ratio: 1;
  object-fit: contain;
}

/* thesis */
.thesis {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px 20px;
  border-top: 1px solid var(--border);
}

.thesis p {
  max-width: 760px;
  margin: 0;
  color: var(--copy);
  font-size: 16px;
}

/* pillars */
.pillars {
  max-width: var(--max);
  margin: 0 auto;
  padding: 60px 20px;
}

.pillars h2, .latest h2, .about h2, .subscribe h2 {
  font-size: 22px;
  margin-bottom: 24px;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.pillar {
  border: 1px solid #2a3444;
  border-radius: 10px;
  padding: 20px;
  background: #141b24;
}

.pillar-num {
  color: var(--ring);
  font-weight: 700;
  font-size: 13px;
}

.pillar h3 { margin: 8px 0; font-size: 17px; }
.pillar p { color: var(--copy); font-size: 14px; margin: 0; }

/* latest / subscribe */
.latest, .subscribe {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px 20px;
  border-top: 1px solid var(--border);
}

.muted { color: var(--copy); }
.muted a { color: var(--accent); }

/* about */
.about {
  max-width: var(--max);
  margin: 0 auto;
  padding: 60px 20px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 32px;
  align-items: start;
}

.about-photo {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--ring);
}

.about p { color: var(--copy); }

/* footer */
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 20px 60px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
}

/* certs page */
.certs-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px 20px 40px;
}

.certs-hero .lede { margin: 0; }

.cert-group {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px 20px;
  border-top: 1px solid var(--border);
}

.cert-group h2 { font-size: 20px; margin: 0 0 20px; }

.cert-table-wrap { overflow-x: auto; }

.cert-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.cert-table th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 600;
  padding: 0 16px 10px 0;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.cert-table td {
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.cert-table td:first-child, .cert-table th:first-child {
  white-space: normal;
  min-width: 240px;
}

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

.cert-mono { font-family: var(--mono); color: var(--copy); font-size: 13px; }

.cert-name { display: flex; align-items: center; gap: 10px; }
.cert-badge { width: 26px; height: 26px; object-fit: contain; flex-shrink: 0; }

.cert-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid currentColor;
}

.status-active { color: var(--ring); }
.status-progress { color: var(--accent); }
.status-expired { color: var(--muted); }

.cert-row--expired td { color: var(--muted); }

.cert-verify {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}
.cert-verify:hover { text-decoration: underline; }

/* 404 */
.notfound {
  max-width: var(--max);
  margin: 0 auto;
  padding: 100px 20px 120px;
  text-align: center;
}

.notfound .kicker { justify-content: center; display: flex; }

.notfound h1 {
  font-size: clamp(56px, 10vw, 120px);
  margin: 0 0 20px;
}

.notfound .lede {
  max-width: 52ch;
  margin: 0 auto 36px;
}

.traceroute {
  max-width: 560px;
  margin: 0 auto 36px;
  padding: 20px 22px;
  border: 1px solid #2a3444;
  border-radius: 10px;
  background: #141b24;
  color: var(--copy);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  text-align: left;
  overflow-x: auto;
}

.notfound .hero-ctas { justify-content: center; }

.notfound-footnote {
  margin: 36px auto 0;
  max-width: 46ch;
  font-size: 14px;
}

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { padding: 32px 20px; }
  .hero-photo { order: -1; max-width: none; height: 320px; }
  .hero-stats { gap: 16px; }
  .about { grid-template-columns: 1fr; }
  .certs-hero { padding: 40px 20px 24px; }
}
