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

:root {
  --bg:     #0b0f14;
  --bg2:    #111820;
  --bg3:    #16202c;
  --blue:   #7eb8f7;
  --teal:   #5ecfcf;
  --text:   #e8edf4;
  --dim:    #556070;
  --border: #1e2d3d;
  --sans:   'Outfit', sans-serif;
  --mono:   'IBM Plex Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 64px;
  padding: 0 60px;
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(11,15,20,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--blue);
  text-decoration: none;
}
.nav-logo::before { content: '<> '; color: var(--teal); }
nav ul { list-style: none; display: flex; gap: 32px; align-items: center; }
nav a {
  font-size: 14px; font-weight: 500;
  color: var(--dim); text-decoration: none;
  transition: color 0.15s;
}
nav a:hover, nav a.active { color: var(--text); }
.nav-back {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
  border: 1px solid var(--border);
  padding: 6px 12px;
  transition: border-color 0.15s, color 0.15s;
}
.nav-back:hover { border-color: var(--blue); color: var(--blue); }

/* ── MAIN ── */
main { padding-top: 64px; }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 20px 60px;
  display: flex; justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  margin-top: 80px;
}

/* ── HOME ── */
.home-wrap { max-width: 860px; margin: 0 auto; padding: 72px 60px 80px; }

.home-hero { margin-bottom: 64px; }
.home-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--blue);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.home-hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 900;
  letter-spacing: -2px;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.05;
}
.home-hero h1 span { color: var(--blue); }
.home-sub {
  font-size: 16px;
  color: var(--dim);
  font-weight: 400;
  max-width: 460px;
  line-height: 1.8;
}

/* ── POST LIST ── */
.post-list { display: flex; flex-direction: column; }
.post-card {
  display: block;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  text-decoration: none;
  transition: border-color 0.15s;
}
.post-card:last-child { border-bottom: 1px solid var(--border); }
.post-card:hover { border-color: var(--blue); }
.post-card:hover .post-title { color: var(--blue); }

.post-meta {
  display: flex; gap: 16px; align-items: center;
  margin-bottom: 10px;
}
.post-date {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.05em;
}
.post-tag {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--teal);
  border: 1px solid rgba(94,207,207,0.25);
  background: rgba(94,207,207,0.07);
  padding: 2px 8px;
  letter-spacing: 0.05em;
}

/* ── TAG FLAIRS ── */
.post-tag[data-tag="i-did-a-thing"] {
  color: #f7a97e;
  border-color: rgba(247,169,126,0.3);
  background: rgba(247,169,126,0.08);
}
.post-tag[data-tag="personal"] {
  color: #b87ef7;
  border-color: rgba(184,126,247,0.3);
  background: rgba(184,126,247,0.08);
}
.post-tag[data-tag="news"] {
  color: #f7e27e;
  border-color: rgba(247,226,126,0.3);
  background: rgba(247,226,126,0.08);
}
.post-tag[data-tag="cybersecurity"] {
  color: #7eb8f7;
  border-color: rgba(126,184,247,0.3);
  background: rgba(126,184,247,0.08);
}
.post-tag[data-tag="ctf"] {
  color: #7ef7a9;
  border-color: rgba(126,247,169,0.3);
  background: rgba(126,247,169,0.08);
}
.post-tag[data-tag="misc"] {
  color: #556070;
  border-color: rgba(85,96,112,0.3);
  background: rgba(85,96,112,0.08);
}
.post-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
  margin-bottom: 8px;
  transition: color 0.15s;
  line-height: 1.3;
}
.post-excerpt {
  font-size: 14px;
  color: var(--dim);
  line-height: 1.75;
  margin-bottom: 14px;
  font-weight: 400;
  max-width: 620px;
}
.post-read {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--blue);
  letter-spacing: 0.03em;
}

/* ── PAGINATION ── */
.pagination {
  margin-top: 48px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
}
.pagination a {
  color: var(--blue);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 8px 16px;
  transition: border-color 0.15s;
}
.pagination a:hover { border-color: var(--blue); }

/* ── POST ── */
.post-wrap { max-width: 720px; margin: 0 auto; padding: 64px 60px 80px; }

.post-header { margin-bottom: 48px; }
.post-header-meta {
  display: flex; gap: 16px; align-items: center;
  margin-bottom: 20px; flex-wrap: wrap;
}
.post-reading {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
}
.post-heading {
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 900;
  color: var(--text);
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 16px;
}
.post-lede {
  font-size: 18px;
  color: var(--dim);
  line-height: 1.75;
  font-weight: 400;
  border-left: 2px solid var(--blue);
  padding-left: 20px;
  margin-top: 20px;
}

.post-feature-img {
  margin: 0 0 48px;
}
.post-feature-img img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
  border: 1px solid var(--border);
}

/* ── POST CONTENT ── */
.gh-content { font-size: 17px; line-height: 1.85; color: var(--dim); }
.gh-content h1,
.gh-content h2,
.gh-content h3,
.gh-content h4 {
  font-family: var(--sans);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  margin: 48px 0 16px;
  line-height: 1.2;
}
.gh-content h1 { font-size: 32px; }
.gh-content h2 { font-size: 26px; }
.gh-content h3 { font-size: 20px; }
.gh-content p { margin-bottom: 24px; }
.gh-content p strong { color: var(--text); font-weight: 600; }
.gh-content a { color: var(--blue); text-decoration: none; border-bottom: 1px solid rgba(126,184,247,0.3); transition: border-color 0.15s; }
.gh-content a:hover { border-color: var(--blue); }
.gh-content ul, .gh-content ol { padding-left: 24px; margin-bottom: 24px; }
.gh-content li { margin-bottom: 8px; }
.gh-content li::marker { color: var(--blue); }
.gh-content blockquote {
  border-left: 2px solid var(--blue);
  padding-left: 24px;
  margin: 32px 0;
  color: var(--dim);
  font-style: italic;
}
.gh-content code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 2px 6px;
  color: var(--teal);
}
.gh-content pre {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 2px solid var(--blue);
  padding: 24px;
  overflow-x: auto;
  margin-bottom: 24px;
}
.gh-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  color: var(--text);
}
.gh-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 32px 0;
  border: 1px solid var(--border);
}
.gh-content .kg-width-wide {
  margin-left: -80px;
  margin-right: -80px;
  width: calc(100% + 160px);
  max-width: none;
}
.gh-content .kg-width-full {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
  max-width: none;
}
.kg-image-card img { max-width: 100%; }
.gh-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}
.gh-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 14px;
}
.gh-content th {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--blue);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}
.gh-content td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--dim);
}

/* ── POST FOOTER ── */
.post-footer { margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--border); }
.back-link {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--blue);
  text-decoration: none;
  transition: color 0.15s;
}
.back-link:hover { color: var(--teal); }

/* ── ERROR ── */
.error-wrap {
  max-width: 860px; margin: 0 auto;
  padding: 120px 60px;
  text-align: center;
}
.error-code {
  font-family: var(--sans);
  font-size: 120px;
  font-weight: 900;
  color: var(--border);
  line-height: 1;
  margin-bottom: 16px;
}
.error-msg {
  font-size: 24px;
  font-weight: 700;
  color: var(--dim);
  margin-bottom: 40px;
}
.btn-primary {
  display: inline-block;
  background: var(--blue);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 28px;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-primary:hover { background: var(--teal); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { padding: 0 20px; }
  nav ul { gap: 16px; }
  .nav-back { display: none; }
  .home-wrap { padding: 60px 20px 60px; }
  .post-wrap { padding: 48px 20px 60px; }
  footer { padding: 16px 20px; flex-direction: column; gap: 6px; }
}
