* { box-sizing: border-box; }
/* Fonts loaded via <link> in base.njk */

:root {
  --accent-color: #c0392b;
  --accent-color-border: rgba(192, 57, 43, 0.15);
  --accent-color-hover: #e74c3c;
  --accent-glow: rgba(192, 57, 43, 0.08);
  --ro-id-color: #c0392b;
  --surface-color: #f5f0e8;
  --extra-light-grey: #f0ebe2;
  --light-gray: rgba(26, 21, 16, 0.08);
  --mid-gray: #8a8177;
  --gray: #8a8177;
  --dark-gray: #3d3730;
  --body-bg-color: #fdfbf4;
  --body-text-color: #1a1510;
  --code-color: #3d3730;
  --code-bg-color: #f0ebe2;
  --callout-code-color: #FFF;

  --warm-black: #100c0a;
  --warm-cream: #fdfbf4;
  --emerald: #10b981;

  --wrapper-width: 1100px;
  --content-width: 760px;
  --space-1x: 0.5rem;
  --space-2x: 1rem;
  --space-3x: 1.5rem;
  --space-4x: 2rem;

  --font-size: 0.9375rem;
  --lh: 1.6;
  --header-spacing: 0.4rem;
  --paragraph-spacing: 1.25rem;
  --post-subtitle-size: 1.25rem;
  --post-body-font-size: 1rem;
  --post-body-lh: 1.75;
  --footnotes-font-size: 0.875rem;
  --blockquote-font-size: 0.9375rem;
  --callout-font-size: 0.875rem;
  --dateline-font-size: 0.8125rem;
  --post-tag-font-size: 0.6875rem;
  --article-right-margin: 0;

  --mono: "JetBrains Mono", Menlo, Monaco, "Courier New", monospace;
  --sans-serif: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --heading-font: "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  --display-font: "Michroma", "Space Grotesk", sans-serif;

  --tracking-tight: -0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
}

/* ============================================
   Dark Mode
   ============================================ */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent-color: #ef5350;
    --accent-color-border: rgba(239, 83, 80, 0.2);
    --accent-color-hover: #f87171;
    --accent-glow: rgba(239, 83, 80, 0.06);
    --ro-id-color: #ef5350;
    --surface-color: #1a1510;
    --body-bg-color: #100c0a;
    --body-text-color: #fdfbf4;
    --code-color: #fdfbf4;
    --code-bg-color: #1a1510;
    --light-gray: rgba(253, 251, 244, 0.07);
    --extra-light-grey: rgba(253, 251, 244, 0.04);
    --mid-gray: #a09789;
    --gray: #a09789;
    --dark-gray: #d9d0c5;
    --callout-code-color: #1a1510;
  }

  :root:not([data-theme="light"]) img {
    background-color: transparent;
  }

  :root:not([data-theme="light"]) code[class*="language-"],
  :root:not([data-theme="light"]) pre[class*="language-"] {
    background-color: #1a1510;
  }
}

[data-theme="dark"] {
  --accent-color: #ef5350;
  --accent-color-border: rgba(239, 83, 80, 0.2);
  --accent-color-hover: #f87171;
  --accent-glow: rgba(239, 83, 80, 0.06);
  --ro-id-color: #ef5350;
  --surface-color: #1a1510;
  --body-bg-color: #100c0a;
  --body-text-color: #fdfbf4;
  --code-color: #fdfbf4;
  --code-bg-color: #1a1510;
  --light-gray: rgba(253, 251, 244, 0.07);
  --extra-light-grey: rgba(253, 251, 244, 0.04);
  --mid-gray: #a09789;
  --gray: #a09789;
  --dark-gray: #d9d0c5;
  --callout-code-color: #1a1510;
}

[data-theme="dark"] img {
  background-color: transparent;
}

[data-theme="dark"] code[class*="language-"],
[data-theme="dark"] pre[class*="language-"] {
  background-color: #1a1510;
}

/* ============================================
   Base Reset & Layout
   ============================================ */

* {
  box-sizing: border-box;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent-color);
  color: #fff;
}

/* ============================================
   Search Dialog
   ============================================ */

.search-dialog {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}

.search-dialog.open { display: flex; }

.search-dialog-inner {
  background: var(--body-bg-color);
  border: 1px solid var(--light-gray);
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  padding: 1.5rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
}

.search-input {
  width: 100%;
  font-family: var(--sans-serif);
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid var(--light-gray);
  background: var(--surface-color);
  color: var(--body-text-color);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.search-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-glow);
  outline: none;
}

.search-results {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 50vh;
  overflow-y: auto;
}

.search-results li { padding: 0; margin: 0; }

.search-results a {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.6rem 0.5rem;
  border-radius: 6px;
  text-decoration: none;
  color: var(--body-text-color);
  font-size: 0.9375rem;
  transition: background 0.1s ease;
}

.search-results a:hover {
  background: var(--accent-glow);
  text-decoration: none;
}

.search-results .search-type {
  font-size: 0.5625rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.search-type-post { background: var(--accent-color); color: white; }
.search-type-advisory { background: #fd7e14; color: white; }
.search-type-seclog { background: #6366f1; color: white; }

#search-btn {
  background: none;
  border: 1px solid var(--light-gray);
  padding: 0.35rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  transition: all 0.2s ease;
  border-radius: 8px;
  width: 34px;
  height: 34px;
}

#search-btn:hover {
  color: var(--body-text-color);
  border-color: var(--accent-color-border);
  background: var(--accent-glow);
}

html {
  color-scheme: light dark;
  font-size: 100%;
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  overflow-y: scroll;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--mono);
  font-size: var(--font-size);
  line-height: var(--lh);
  color: var(--body-text-color);
  background-color: var(--body-bg-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.wrapper {
  margin: 0 auto;
  padding: 0 1.5rem;
  max-width: var(--wrapper-width);
}

.inner-layout {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 768px) {
  .inner-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.inner-sidebar {
  position: sticky;
  top: 4rem;
}

.grid-main {
  margin: 0;
  min-width: 0;
}

.grid { display: block; }
.grid-sidebar { display: none; }

main {
  display: block;
  padding-top: var(--space-4x);
  padding-bottom: var(--space-3x);
}

section {
  margin-bottom: var(--space-3x);
}

section.box {
  background-color: var(--extra-light-grey);
  padding: var(--space-3x);
  border-radius: 8px;
  border: 1px solid var(--light-gray);
}

section.header-line {
  border-top: 1px solid var(--light-gray);
  padding-top: var(--space-3x);
}

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4, h5, p, hr, ol, ul {
  margin-top: 0;
}

h1, h2, h3, h4, h5 {
  font-family: var(--heading-font);
  line-height: 1.2;
  margin-bottom: 0.6em;
  letter-spacing: -0.02em;
  font-weight: 700;
}

article {
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--body-text-color);
}

article p {
  margin-bottom: 1.25em;
}

article a {
  text-decoration: underline;
  text-decoration-color: var(--accent-color-border);
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

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

article h1, article h2, article h3, article h4 {
  font-family: var(--heading-font);
}

article h1 {
  font-size: 2rem;
  line-height: 1.15;
  margin-bottom: 0.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

@media only screen and (min-width: 576px) {
  article h1 {
    font-size: 2.25rem;
  }
}

article h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2.5em;
  margin-bottom: 0.75em;
  padding-bottom: 0.4em;
  border-bottom: 1px solid var(--light-gray);
  letter-spacing: -0.01em;
}

article h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2em;
  margin-bottom: 0.5em;
}

article h4, article h5 {
  font-size: inherit;
  margin-bottom: var(--header-spacing);
}

article h5 {
  color: var(--gray);
  font-weight: 400;
}

article p, article hr, article ol, article ul, article dl {
  margin-bottom: var(--paragraph-spacing);
}

article ol li p, article ul li p {
  margin: 0;
}

article img, article iframe {
  max-width: 100%;
  border-radius: 6px;
}

.dateline {
  margin-bottom: 1.5rem;
}

.dateline a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--light-gray);
  text-underline-offset: 2px;
}

.dateline, .subtitle {
  font-family: var(--mono);
  font-size: var(--dateline-font-size);
  color: var(--gray);
}

.subtitle {
  font-size: var(--post-subtitle-size);
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-color-hover);
}

blockquote {
  font-size: var(--blockquote-font-size);
  color: var(--dark-gray);
  border-left: 3px solid var(--accent-color);
  margin: var(--space-3x) 0;
  padding: 0.75rem 0 0.75rem var(--space-3x);
  overflow: hidden;
  background: var(--extra-light-grey);
  border-radius: 0 4px 4px 0;
}

blockquote blockquote {
  border-left: 0;
}

blockquote p:last-child {
  margin-bottom: 0;
}

hr {
  border: 0;
  background: linear-gradient(to right, transparent, var(--light-gray), transparent);
  height: 1px;
  margin: 2rem 0;
}

/* ============================================
   Code Blocks
   ============================================ */

pre {
  max-width: 100%;
  font-size: 0.8125rem;
  border-radius: 6px;
  background-color: #1a1510;
  color: #c0caf5;
  padding: 1.25rem;
  line-height: 1.65;
  margin: 1.5rem 0;
  position: relative;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  border: 1px solid rgba(253, 251, 244, 0.06);
}

pre, code {
  font-family: var(--mono);
}

:not(pre):not(h1):not(h2):not(h3):not(h4):not(h5)>code {
  font-size: 0.85em;
  font-weight: 500;
  color: var(--accent-color);
  padding: .15em .4em;
  border-radius: 4px;
  background-color: var(--accent-glow);
}

pre[class*="language-"] {
  border-radius: 6px;
  font-size: 0.8125rem;
  line-height: 1.65;
  direction: ltr;
  text-align: left;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-spacing: normal;
  tab-size: 2;
  margin: 1.5rem 0;
  padding: 2.5rem 1.25rem 1.25rem 1.25rem;
  background-color: #1a1510;
  border: 1px solid rgba(253, 251, 244, 0.06);
}

/* Language label */
pre[class*="language-"]::before {
  content: attr(class);
  position: absolute;
  top: 0;
  left: 0;
  padding: 0.25rem 0.75rem;
  font-size: 0.625rem;
  font-family: var(--heading-font);
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px 0 8px 0;
  letter-spacing: 0.08em;
  font-weight: 600;
}

pre.language-javascript::before, pre.language-js::before { content: "JavaScript"; background: #f7df1e; color: #000; }
pre.language-typescript::before, pre.language-ts::before { content: "TypeScript"; background: #3178c6; }
pre.language-python::before, pre.language-py::before { content: "Python"; background: #3572a5; }
pre.language-bash::before, pre.language-shell::before, pre.language-sh::before { content: "Bash"; background: #4eaa25; }
pre.language-html::before { content: "HTML"; background: #e34c26; }
pre.language-css::before { content: "CSS"; background: #264de4; }
pre.language-json::before { content: "JSON"; background: #f5a623; color: #000; }
pre.language-sql::before { content: "SQL"; background: #e38c00; }
pre.language-php::before { content: "PHP"; background: #777bb4; }
pre.language-go::before { content: "Go"; background: #00add8; }
pre.language-rust::before { content: "Rust"; background: #dea584; color: #000; }
pre.language-java::before { content: "Java"; background: #b07219; }
pre.language-c::before { content: "C"; background: #555555; }
pre.language-cpp::before { content: "C++"; background: #f34b7d; }
pre.language-ruby::before, pre.language-rb::before { content: "Ruby"; background: #cc342d; }
pre.language-yaml::before, pre.language-yml::before { content: "YAML"; background: #cb171e; }
pre.language-markdown::before, pre.language-md::before { content: "Markdown"; background: #083fa1; }
pre.language-http::before { content: "HTTP"; background: #005c9c; }
pre.language-xml::before { content: "XML"; background: #0060ac; }
pre.language-diff::before { content: "Diff"; background: #41b883; }
pre.language-text::before, pre.language-plaintext::before { content: "Text"; background: #555; }

/* ============================================
   Lists
   ============================================ */

article ol, article ul {
  padding: 0;
  list-style: none;
  counter-reset: li;
  position: relative;
}

article ol li, article ul li { margin-bottom: 0.25em; }
article ol li:last-child, article ul li:last-child { margin-bottom: 0; }

article ol li {
  counter-increment: li;
  padding-left: 1.5em;
}

article ul li {
  padding-left: 1.25em;
}

article ol li::before, article ul li::before {
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: 600;
}

article ol li::before { content: counter(li) "."; }
article ul li::before { content: "\2022"; }

/* ============================================
   Tables
   ============================================ */

table {
  font-family: var(--sans-serif);
  font-size: 0.875rem;
  margin-bottom: 1.5em;
  border-collapse: collapse;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
}

.callout table { font-size: inherit; }

td, th {
  border: 1px solid var(--light-gray);
  padding: 0.5rem 0.75rem;
  text-align: left;
}

th {
  background: var(--extra-light-grey);
  font-weight: 600;
  font-family: var(--heading-font);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

tr.row-blue { background: rgb(199, 235, 255); color: rgb(0, 85, 133); }
tr.row-green { background: rgb(217, 251, 208); color: rgb(28, 108, 9); }
tr.row-red { background: rgb(255, 224, 219); color: rgb(184, 24, 0); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) tr.row-blue { background: rgba(96, 198, 255, 0.08); color: rgb(96, 198, 255); }
  :root:not([data-theme="light"]) tr.row-green { color: rgb(144, 214, 127); background: rgba(144, 214, 127, 0.08); }
  :root:not([data-theme="light"]) tr.row-red { background: rgb(75, 47, 54); color: rgb(255, 179, 210); }
}

[data-theme="dark"] tr.row-blue { background: rgba(96, 198, 255, 0.08); color: rgb(96, 198, 255); }
[data-theme="dark"] tr.row-green { color: rgb(144, 214, 127); background: rgba(144, 214, 127, 0.08); }
[data-theme="dark"] tr.row-red { background: rgb(75, 47, 54); color: rgb(255, 179, 210); }

/* ============================================
   Forms
   ============================================ */

button, input {
  font-family: var(--mono);
  font-size: 0.8125rem;
  padding: 0.5rem 0.875rem;
  border-radius: 6px;
  margin: 0;
  border: 1px solid var(--light-gray);
  background: var(--surface-color);
  color: var(--body-text-color);
  transition: all 0.15s ease;
}

input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

input[type="submit"], button {
  cursor: pointer;
  -webkit-appearance: none;
}

/* Direct Links / Markdown Headers */
.direct-link {
  text-decoration: none;
  color: transparent;
}

.direct-link:focus, :hover>.direct-link {
  color: var(--accent-color);
}

/* ============================================
   Header & Navigation
   ============================================ */

header {
  padding: 1.5rem 0 1.25rem;
  border-bottom: none;
  background: var(--body-bg-color);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  transition: background-color 0.3s ease;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) header { background: rgba(16, 12, 10, 0.92); }
}
[data-theme="dark"] header { background: rgba(16, 12, 10, 0.92); }
[data-theme="light"] header { background: rgba(253, 251, 244, 0.92); }

header::after {
  content: "";
  display: block;
  height: 3px;
  background: var(--accent-color);
}

header .wrapper {
  display: flex;
  align-items: center;
  gap: 2rem;
  max-width: var(--wrapper-width);
  margin: 0 auto;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  flex-shrink: 0;
  align-self: center;
}

.embeddable-buttondown-form { display: none; }

.subscribe-mini {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 34px;
  padding: 0 0.25rem 0 0.75rem;
  border: 1px solid var(--light-gray);
  border-radius: 999px;
  background: var(--surface-color);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.subscribe-mini:hover {
  border-color: var(--accent-color-border);
}

.subscribe-mini:focus-within {
  border-color: var(--accent-color);
  background: var(--body-bg-color);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.subscribe-mini-icon {
  display: flex;
  align-items: center;
  color: var(--gray);
  pointer-events: none;
  transition: color 0.2s ease;
}

.subscribe-mini:focus-within .subscribe-mini-icon {
  color: var(--accent-color);
}

.subscribe-mini input {
  border: 0;
  background: transparent;
  padding: 0;
  height: 100%;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--body-text-color);
  width: 170px;
  outline: none;
}

.subscribe-mini input::placeholder {
  color: var(--gray);
  font-weight: 400;
}

.subscribe-mini button {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: var(--accent-glow);
  color: var(--accent-color);
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.subscribe-mini button:hover {
  background: var(--accent-color);
  color: white;
  transform: translateX(1px);
}

#subscribe-mobile-btn {
  display: none;
  background: none;
  border: 1px solid var(--light-gray);
  padding: 0.35rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  transition: all 0.2s ease;
  border-radius: 8px;
  width: 34px;
  height: 34px;
}

#subscribe-mobile-btn:hover {
  color: var(--body-text-color);
  border-color: var(--accent-color-border);
  background: var(--accent-glow);
}

@media (max-width: 768px) {
  .subscribe-mini { display: none; }
  #subscribe-mobile-btn { display: flex; }
}

/* Dedicated /subscribe page */
.subscribe-page {
  max-width: 640px;
  margin: 3rem auto;
  text-align: center;
}
.subscribe-page h1 {
  font-family: var(--heading-font);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 0.75rem;
}
.subscribe-lede {
  color: var(--gray);
  font-size: 0.95rem;
  margin: 0 0 2rem;
}
.subscribe-page-form {
  display: flex;
  gap: 0.5rem;
  max-width: 460px;
  margin: 0 auto 1rem;
}
.subscribe-page-form input[type="email"] {
  flex: 1;
  padding: 0.75rem 0.875rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  background: var(--surface-color);
  color: var(--body-text-color);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.subscribe-page-form input[type="email"]:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.subscribe-page-form button {
  padding: 0.75rem 1.25rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.subscribe-page-form button:hover {
  background: var(--accent-color-hover);
}
.subscribe-meta {
  color: var(--gray);
  font-size: 0.75rem;
  margin: 0.5rem 0;
}
.subscribe-meta a {
  color: var(--accent-color);
}

#theme-toggle {
  background: none;
  border: none;
  padding: 0.35rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  transition: color 0.2s ease;
  border-radius: 4px;
  width: 32px;
  height: 32px;
}

#theme-toggle:hover { color: var(--body-text-color); }

@media (max-width: 768px) {
  header .wrapper { flex-wrap: wrap; gap: 0.5rem; }
  .nav { order: 3; width: 100%; }
}

/* Logo */
.nav-title {
  line-height: 1;
  font-family: var(--heading-font) !important;
  font-size: clamp(2.5rem, 5vw, 3.5rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em;
  margin: 0;
  flex-shrink: 0;
}

.nav-title a {
  text-decoration: none !important;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo {
  height: 2rem;
  width: auto;
}

@media (min-width: 576px) {
  .nav-logo { height: 2.5rem; }
}

.nav-title a:hover span {
  animation: ro-glitch 0.3s ease-in-out 3;
}

.nav-title a span {
  color: var(--accent-color);
  display: inline-block;
  animation: ro-glitch 5s ease-in-out infinite;
}

@keyframes ro-glitch {
  0%, 88%, 100% { transform: none; opacity: 1; text-shadow: none; }
  89% { transform: translate(-2px, 0); opacity: 0.6; text-shadow: 2px 0 #ef4444, -2px 0 #3b82f6; }
  89.5% { transform: translate(3px, 1px); opacity: 1; text-shadow: -1px 0 #ef4444; }
  90% { transform: translate(-1px, -1px); opacity: 0.4; text-shadow: 3px 0 #3b82f6, -2px 0 #ef4444; }
  90.5% { transform: translate(0, 2px); opacity: 0.8; text-shadow: -2px 0 #ef4444, 1px 0 #10b981; }
  91% { transform: translate(2px, 0); opacity: 0.3; text-shadow: 2px 0 #3b82f6; }
  91.5% { transform: translate(-3px, -1px); opacity: 0.9; text-shadow: 1px 0 #ef4444; }
  92% { transform: none; opacity: 1; text-shadow: none; }
}

/* Nav links — baseline-aligned with logo */
.nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 0;
}

.nav-item {
  font-family: var(--heading-font);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-item a {
  text-decoration: none !important;
  color: var(--gray);
  padding: 0.25rem 0.75rem;
  transition: color 0.2s ease;
  display: block;
}

.nav-item a:hover {
  color: var(--body-text-color);
}

.nav-item a[aria-current="page"] {
  color: var(--accent-color);
}

.nav-initial {
  color: var(--accent-color);
  font-weight: 700;
}

header a { text-decoration: none; color: inherit; }
header a:hover, header a.active { text-decoration: none; }

/* ============================================
   Footer
   ============================================ */

footer {
  padding: 0;
  margin-top: 2rem;
}

/* Sidebar — hidden on inner pages by default */
aside.grid-sidebar { display: block; }

/* ============================================
   Callout
   ============================================ */

.callout {
  padding: var(--space-3x);
  margin-bottom: var(--space-2x);
  background: var(--extra-light-grey);
  font-family: var(--sans-serif);
  font-size: var(--callout-font-size);
  line-height: 1.6;
  border-radius: 8px;
  border: 1px solid var(--light-gray);
}

.callout h4 { color: var(--body-text-color); font-family: var(--heading-font); }
.callout p { margin-top: 0; margin-bottom: 1em; }
.callout ul, .callout ol, .callout p:last-child { margin-bottom: 0; }
.callout code, .callout pre { background-color: var(--callout-code-color); }

/* ============================================
   Post List
   ============================================ */

.postlist {
  padding: 0;
  list-style: none;
  margin: 0;
}

.postlist-item {
  padding: 0.875rem 0.75rem;
  border-bottom: 1px solid var(--light-gray);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  transition: all 0.15s ease;
  border-radius: 0;
  margin: 0 -0.75rem;
}

.postlist-item:first-child {
  border-top: 1px solid var(--light-gray);
}

.postlist-item:hover {
  background: var(--accent-glow);
  border-radius: 8px;
  border-color: transparent;
}

.postlist-item:hover + .postlist-item {
  border-top-color: transparent;
}

.postlist-link {
  color: inherit;
  font-family: var(--heading-font);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  transition: color 0.15s ease;
}

.postlist-link:hover {
  color: var(--accent-color);
  text-decoration: none;
}

.postlist-date {
  font-size: 0.75rem;
  color: var(--gray);
  white-space: nowrap;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.postlist-date, .post-tag {
  font-size: var(--post-tag-font-size);
  font-family: var(--mono);
}

.post-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 1.25rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--gray);
  line-height: 1;
}

.post-meta-line .dateline {
  font-size: 0.6875rem;
  margin: 0;
}

.post-meta-sep {
  color: var(--gray);
  font-size: 0.6875rem;
}

:not(aside) .post-tag {
  display: inline-block;
  color: var(--gray);
  border: none;
  background: none;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  transition: color 0.15s ease;
  text-decoration: none;
  padding: 0;
}

a.post-tag:hover {
  background: var(--accent-color);
  color: white;
  text-decoration: none;
  border-color: var(--accent-color);
}

/* ============================================
   Images
   ============================================ */

.img-center { display: block; margin: 0 auto var(--space-2x); }
.img-float { display: block; margin: 0 auto var(--space-2x); }

@media only screen and (min-width: 576px) {
  .img-float { float: left; margin-right: var(--space-2x); margin-bottom: 0; }
}

.img-flex-equal { display: flex; margin-bottom: var(--paragraph-spacing); }
.img-flex-equal>div { margin-right: var(--space-2x); }
.img-flex-equal>div:last-child { margin-right: 0; }

figure, figure.img-center { margin: 0 0 var(--paragraph-spacing) 0; display: table; }
figure.img-center { margin: 0 auto var(--paragraph-spacing); }
figcaption { width: 0; min-width: 100%; font-size: 0.8em; font-family: var(--mono); color: var(--gray); margin-top: 0.5rem; }
figure p { margin: 0; }

/* Definition lists */
dl { padding: 0; margin-top: 0; }
dt { font-weight: bold; font-family: var(--heading-font); }
dt, dd { display: inline; margin: 0; }
dd:not(:last-child)::after { content: ""; display: block; padding: var(--space-1x); }

/* Footnotes */
sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
sub { bottom: -0.25em; }
sup { top: -0.5em; }
sup a { text-decoration: dotted; }
.footnotes { font-size: var(--footnotes-font-size); }

/* ============================================
   Seclog Entry Styles
   ============================================ */

.seclog-entry {
  font-size: 1rem;
  line-height: 1.75;
  font-family: var(--serif);
}

.seclog-entry h1 .accent {
  color: var(--accent-color);
}

/* Seclog Footer CTA */
.seclog-footer-cta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: start;
  padding: 1.5rem;
  background: var(--extra-light-grey);
  border-radius: 6px;
  border: 1px solid var(--light-gray);
}

.seclog-footer-cta p {
  font-size: 0.8125rem;
  color: var(--gray);
  margin: 0 0 0.75rem;
}

.seclog-cta-right {
  text-align: right;
}

.seclog-share {
  display: flex;
  gap: 0.5rem;
}

.seclog-share a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid var(--light-gray);
  color: var(--gray);
  transition: all 0.2s ease;
  text-decoration: none;
}

.seclog-share a:hover {
  color: var(--accent-color);
  border-color: var(--accent-color-border);
}

.seclog-back {
  display: inline-block;
  margin-top: 1.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray);
  text-decoration: none;
}

.seclog-back:hover {
  color: var(--accent-color);
}

@media (max-width: 640px) {
  .seclog-footer-cta {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .seclog-cta-right { text-align: left; }
}

/* Seclog Content */
.seclog-entry h2 {
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--accent-color);
  font-size: 1.125rem;
  font-weight: 700;
  font-family: var(--heading-font);
  letter-spacing: -0.02em;
}

.seclog-entry h2:first-of-type {
  margin-top: 1rem;
}

.seclog-entry>p:first-of-type {
  background: var(--extra-light-grey);
  padding: 1rem 1.25rem;
  border-radius: 6px;
  border-left: 3px solid var(--accent-color);
  font-size: 0.875rem;
  line-height: 1.75;
  margin-bottom: 1rem;
  color: var(--dark-gray);
}

/* Each link entry: title paragraph + blockquote = one card */
.seclog-entry p {
  margin-bottom: 0;
  font-size: 0.9375rem;
  font-family: var(--serif);
}

/* Link title line: bold title + source */
.seclog-entry p:has(+ blockquote) {
  background: var(--extra-light-grey);
  border: 1px solid var(--light-gray);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  padding: 0.75rem 1rem;
  margin-top: 1rem;
}

.seclog-entry p:has(+ blockquote) a {
  font-weight: 700;
  text-decoration: none;
  color: var(--body-text-color);
  transition: color 0.2s ease;
}

.seclog-entry p:has(+ blockquote) a:hover {
  color: var(--accent-color);
}

.seclog-entry p:has(+ blockquote) a strong {
  font-weight: 700;
}

.seclog-entry p:has(+ blockquote) em {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--gray);
  font-style: normal;
}

/* Description blockquote: bottom half of card */
.seclog-entry blockquote {
  margin: 0 0 0.75rem 0;
  padding: 0.625rem 1rem;
  background: var(--body-bg-color);
  border: 1px solid var(--light-gray);
  border-top: none;
  border-left: 3px solid var(--accent-color);
  border-radius: 0 0 6px 6px;
  font-size: 0.8125rem;
  color: var(--dark-gray);
  line-height: 1.7;
}

.seclog-entry blockquote p { margin: 0; }
.seclog-entry blockquote p+p { margin-top: 0.5rem; }

/* Standalone paragraphs (not followed by blockquote) */
.seclog-entry p:not(:has(+ blockquote)) {
  margin-bottom: 1rem;
}

.seclog-entry ul {
  margin-top: 0;
  margin-bottom: 1.5rem;
  padding: 0 0 0 1.5rem;
  list-style: none;
}

.seclog-entry ul li {
  margin-bottom: 0.6rem;
  line-height: 1.65;
  font-size: 0.9375rem;
  position: relative;
  padding-left: 0.75rem;
}

.seclog-entry ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-color);
}

.seclog-entry ul li:last-child { margin-bottom: 0; }

.seclog-entry em {
  color: var(--gray);
  font-size: 0.85em;
  font-family: var(--mono);
}

/* ============================================
   Seclog List Items
   ============================================ */

.seclog-item {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--extra-light-grey);
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
}

.seclog-item:first-child {
  padding-top: 0;
}

.seclog-item:last-child {
  border-bottom: none;
}

.seclog-item:hover .seclog-item-num {
  color: #fff;
  background: var(--accent-color);
  border-color: var(--accent-color);
}

.seclog-item-num {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-color);
  background: var(--extra-light-grey);
  border: 1px solid var(--light-gray);
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s ease;
  min-width: 3.5rem;
  text-align: center;
}

.seclog-item-body {
  flex: 1;
  min-width: 0;
}

.seclog-item-intro {
  margin: 0 0 0.25rem;
  font-family: var(--sans-serif);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--body-text-color);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.seclog-item-date {
  font-family: var(--mono);
  font-size: 0.625rem;
  color: var(--gray);
}

/* ============================================
   Social Share Buttons
   ============================================ */

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
}

.share-x { background: var(--dark-gray); color: #ffffff !important; }
.share-linkedin { background: #0077b5; color: #ffffff !important; }
.share-mastodon { background: #6364ff; color: #ffffff !important; }

.share-btn:hover {
  opacity: 0.85;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ============================================
   Pagination
   ============================================ */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--light-gray);
  font-weight: 500;
  font-size: 0.8125rem;
  font-family: var(--heading-font);
}

.pagination a, .pagination span {
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
  min-width: 2.25rem;
  text-align: center;
}

.pagination a {
  color: var(--gray);
  background: var(--surface-color);
  border: 1px solid var(--light-gray);
}

.pagination a:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
  text-decoration: none;
}

.pagination .pagination-active {
  background: var(--accent-color);
  color: white;
  border: 1px solid var(--accent-color);
}

.pagination .pagination-disabled {
  color: var(--gray);
  opacity: 0.3;
  cursor: not-allowed;
  background: transparent;
  border: 1px solid transparent;
}

.pagination .pagination-dots {
  color: var(--gray);
  background: transparent;
  padding: 0.4rem 0.2rem;
  min-width: auto;
  border: none;
}

.pagination .pagination-prev-next {
  color: var(--accent-color);
  background: transparent;
  font-weight: 600;
  border: 1px solid transparent;
}

.pagination .pagination-prev-next:hover {
  background: var(--accent-glow);
  color: var(--accent-color);
  border-color: var(--accent-color-border);
}

/* ============================================
   Hacktron-Inspired Components
   ============================================ */

/* Gradient divider — hacktron uses these instead of solid borders */
.gradient-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--light-gray), transparent);
  margin: 0;
  border: none;
}

/* Section label — uppercase monospace with wide tracking */
.section-label {
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  color: var(--gray);
  margin-bottom: 0.75rem;
}

/* Recent list — terminal style */
.recent-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: var(--mono);
  font-size: 0.8125rem;
}

.recent-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--extra-light-grey);
}

.recent-list li:last-child {
  border-bottom: none;
}

.recent-list a {
  color: var(--body-text-color);
  text-decoration: none;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-list a:hover {
  color: var(--accent-color);
  text-decoration: none;
}

.recent-list time {
  color: var(--gray);
  font-size: 0.6875rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.recent-list .id-tag {
  font-weight: 700;
  color: var(--accent-color);
  flex-shrink: 0;
}

/* ============================================
   Site Banner (homepage large logo)
   ============================================ */

.site-banner {
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--light-gray);
}

.site-banner a {
  font-family: var(--heading-font);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--body-text-color);
  text-decoration: none;
  line-height: 1;
  display: block;
}

.site-banner a:hover {
  text-decoration: none;
}

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

/* ============================================
   Page Header (shared across listing pages)
   ============================================ */

.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-family: var(--heading-font);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.35rem;
}

.page-header-rss {
  color: var(--gray);
  text-decoration: none;
  vertical-align: middle;
  margin-left: 0.35rem;
}

.page-header-rss:hover {
  color: var(--accent-color);
}

.page-header-sub {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--gray);
  margin: 0;
}

.sidebar-subscribe-form {
  display: flex;
  gap: 0.35rem;
}

.sidebar-subscribe-form input[type="email"] {
  flex: 1;
  padding: 0.4rem 0.5rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  border: 1px solid var(--light-gray);
  border-radius: 4px;
  background: var(--surface-color);
  color: var(--body-text-color);
}

.sidebar-subscribe-form input[type="email"]:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px var(--accent-glow);
  outline: none;
}

.sidebar-subscribe-form input[type="submit"] {
  padding: 0.4rem 0.75rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 600;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.sidebar-subscribe-form input[type="submit"]:hover {
  background: var(--accent-color-hover);
}

/* Bio widget */
.bio-row {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  margin-bottom: 0.75rem;
}

.bio-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  border: 2px solid var(--light-gray);
}

.bio-text {
  font-size: 0.8125rem;
  line-height: 1.6;
}

.bio-text p { margin: 0 0 0.25rem; }

.bio-sub {
  color: var(--gray);
  font-size: 0.75rem !important;
}

/* Sidebar Spot (What's New) */
.sidebar-spot {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  margin-bottom: 1.5rem;
  background: var(--extra-light-grey);
  border: 1px solid var(--light-gray);
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease;
}

.sidebar-spot:hover {
  border-color: var(--accent-color-border);
  text-decoration: none;
}

.sidebar-spot-badge {
  font-family: var(--mono);
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent-color);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.sidebar-spot-title {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--body-text-color);
  flex: 1;
}

.sidebar-spot-arrow {
  color: var(--gray);
  font-size: 0.75rem;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.sidebar-spot:hover .sidebar-spot-arrow {
  transform: translateX(2px);
  color: var(--accent-color);
}

.bio-icons {
  display: flex;
  gap: 0.5rem;
}

.bio-icons a {
  color: var(--gray);
  text-decoration: none;
  transition: color 0.2s ease;
  display: flex;
}

.bio-icons a:hover {
  color: var(--accent-color);
}

/* Post navigation */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}

.post-nav-item {
  flex: 1;
  min-width: 0;
}

.post-nav-next {
  text-align: right;
}

.post-nav-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  color: var(--gray);
  margin-bottom: 0.35rem;
}

.post-nav-item a {
  font-family: var(--heading-font);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--body-text-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-nav-item a:hover {
  color: var(--accent-color);
}

.sidebar-more-link {
  display: block;
  margin-top: 0.75rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--gray);
}

/* ============================================
   Home Layout (two-column like live site)
   ============================================ */

.home-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 768px) {
  .home-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.grid-sidebar {
  position: sticky;
  top: 4rem;
}

.sidebar-widget {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--light-gray);
}

.sidebar-widget:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-widget h3 {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  color: var(--gray);
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--light-gray);
}

/* Advisory items in sidebar */
.sidebar-advisory-item {
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--extra-light-grey);
}

.sidebar-advisory-item:last-child {
  border-bottom: none;
}

.sidebar-advisory-item a {
  display: block;
  transition: color 0.15s ease;
}

.sidebar-advisory-item a:hover .sidebar-adv-title {
  color: var(--accent-color);
}

.sidebar-adv-id {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-color);
}

.sidebar-adv-cve {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--gray);
  font-weight: 500;
}

.sidebar-adv-sep {
  color: var(--gray);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.sidebar-adv-title {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--body-text-color);
  transition: color 0.15s ease;
}