@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

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

    /* ── PAPER MODE (default) ── */
    :root {
      --outer-bg: #e6ded0;
      --bg: #f7f3ea;
      --bg-elev: #efe9dc;
      --text: #2a2722;
      --text-strong: #1c1a16;
      --text-mid: #3a362e;
      --muted: #8c8475;
      --muted-dim: #b8b09d;
      --rule: #e3dccd;
      --accent: #1f7a4d;
      --accent-soft: rgba(31, 122, 77, 0.08);
      --selection-bg: rgba(31, 122, 77, 0.22);
      --selection-text: #1c1a16;
      --font: 'IBM Plex Mono', 'JetBrains Mono', monospace;
      --code-color: #1f7a4d;
      --sheet-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 18px 60px rgba(40, 32, 20, 0.14);
    }

    /* ── AMBER CRT MODE ── */
    html.amber {
      --outer-bg: #0e0d0b;
      --bg: #0e0d0b;
      --bg-elev: #15140f;
      --text: #b0a080;
      --text-strong: #d4c4a0;
      --text-mid: #b0a080;
      --muted: #5a5040;
      --muted-dim: #3a3a3a;
      --rule: #2a2520;
      --accent: #ffb000;
      --accent-soft: rgba(255, 176, 0, 0.08);
      --selection-bg: #ffb000;
      --selection-text: #0e0d0b;
      --font: 'JetBrains Mono', 'IBM Plex Mono', monospace;
      --code-color: #ffb000;
      --sheet-shadow: none;
    }

    body {
      background: var(--outer-bg);
      color: var(--text);
      font-family: var(--font);
      font-size: 14.5px;
      line-height: 1.72;
      -webkit-font-smoothing: antialiased;
      transition: background 0.25s ease, color 0.25s ease;
      min-height: 100vh;
    }

    ::selection {
      background: var(--selection-bg);
      color: var(--selection-text);
    }

    /* ── AMBER CRT EFFECTS (only when html.amber) ── */
    html.amber body {
      background: var(--bg) url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.015'/%3E%3C/svg%3E");
    }
    html.amber body::before {
      content: '';
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      pointer-events: none;
      z-index: 9998;
      background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.4) 100%);
    }
    html.amber body::after {
      content: '';
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      pointer-events: none;
      z-index: 9999;
      background: repeating-linear-gradient(
        0deg,
        rgba(0,0,0,0.08) 0px,
        rgba(0,0,0,0.08) 1px,
        transparent 1px,
        transparent 3px
      );
    }

    a {
      color: var(--accent);
      text-decoration: none;
      transition: color 0.18s, border-color 0.18s;
    }
    a:hover { color: var(--text-strong); }
    html.amber a:hover { color: #fff; }

    .wrap {
      max-width: 760px;
      margin: 0 auto;
      padding: 72px 56px 88px;
      background: var(--bg);
      box-shadow: var(--sheet-shadow);
      min-height: 100vh;
      transition: background 0.25s ease, box-shadow 0.25s ease;
    }
    html.amber .wrap {
      background: transparent;
    }

    /* ── HEADER ── */
    header {
      margin-bottom: 64px;
      position: relative;
    }

    .kicker {
      font-size: 11.5px;
      letter-spacing: 0.22em;
      text-transform: uppercase;
      color: var(--muted);
      margin-bottom: 18px;
      display: flex;
      align-items: center;
      gap: 4px;
    }
    .kicker .cursor {
      width: 7px;
      height: 12px;
      margin-left: 6px;
    }

    .name {
      font-size: 26px;
      font-weight: 700;
      color: var(--text-strong);
      letter-spacing: -0.012em;
      margin-bottom: 10px;
    }

    .name span:first-child {
      color: var(--accent);
      font-weight: 700;
    }

    html.amber .name span:first-child {
      text-shadow: 0 0 8px rgba(255,176,0,0.4);
    }

    .tagline {
      color: var(--muted);
      font-size: 13px;
    }

    .tagline a {
      color: var(--muted);
      border-bottom: 1px dashed var(--rule);
    }
    .tagline a:hover {
      color: var(--accent);
      border-bottom-color: var(--accent);
    }

    /* ── NAV ── */
    nav {
      display: flex;
      gap: 22px;
      align-items: center;
      font-size: 13.5px;
      margin-bottom: 16px;
    }

    nav a {
      color: var(--muted);
      transition: color 0.18s;
    }
    nav a.active {
      color: var(--accent);
      font-weight: 600;
    }
    nav a:hover { color: var(--accent); }
    html.amber nav a.active {
      text-shadow: 0 0 8px rgba(255,176,0,0.3);
    }

    .nav-sep {
      color: var(--muted-dim);
      user-select: none;
    }

    .sep {
      height: 1px;
      background: var(--rule);
      margin: 0 0 36px;
      font-size: 0;
      color: transparent;
      overflow: hidden;
    }
    html.amber .sep {
      background: none;
      color: var(--muted-dim);
      font-size: 11px;
      letter-spacing: 2px;
      height: auto;
      user-select: none;
      margin-bottom: 36px;
    }

    /* ── PAGES ── */
    .page { display: none; }
    .page.visible { display: block; }

    /* ── SECTION LABEL ── */
    .section-label {
      font-size: 11px;
      letter-spacing: 0.22em;
      text-transform: uppercase;
      color: var(--muted);
      margin-bottom: 4px;
    }

    /* ── POSTS LIST ── */
    .post {
      display: flex;
      align-items: baseline;
      gap: 22px;
      padding: 18px 0;
      border-bottom: 1px solid var(--rule);
      transition: border-color 0.25s, transform 0.18s;
    }
    .post:hover { transform: translateX(4px); }

    .post-date {
      color: var(--muted);
      font-size: 12.5px;
      flex-shrink: 0;
      min-width: 64px;
    }

    .post-title a {
      color: var(--text-strong);
      font-size: 15.5px;
      font-weight: 400;
      letter-spacing: -0.005em;
      transition: color 0.18s;
    }
    .post-title a:hover { color: var(--accent); }
    html.amber .post-title a:hover {
      text-shadow: 0 0 6px rgba(255,176,0,0.2);
    }

    /* ── ABOUT ── */
    .about p {
      margin-bottom: 18px;
      color: var(--text-mid);
      max-width: 64ch;
      font-size: 14.5px;
    }
    .about p strong {
      color: var(--text-strong);
      font-weight: 600;
    }
    .about .tools {
      color: var(--muted);
      font-size: 13px;
      margin-top: 24px;
      padding-top: 18px;
      border-top: 1px solid var(--rule);
    }
    .about .tools a, .social { color: var(--muted); }
    .about .tools a:hover, .social:hover { color: var(--accent); }

    /* ── CVE TABLE ── */
    .cve-table {
      margin-top: 28px;
      padding-top: 22px;
      border-top: 1px solid var(--rule);
      font-size: 13px;
    }
    .cve-table-title {
      color: var(--muted);
      font-size: 11px;
      letter-spacing: 2px;
      text-transform: uppercase;
      margin-bottom: 14px;
    }
    .cve-row {
      display: flex;
      flex-wrap: wrap;
      gap: 4px 12px;
      padding: 13px 0;
      border-bottom: 1px solid var(--rule);
      align-items: baseline;
    }
    .cve-id { flex-shrink: 0; order: 1; }
    .cve-id a {
      color: var(--muted);
      font-size: 12.5px;
      letter-spacing: 0.02em;
    }
    .cve-id a:hover { color: var(--accent); }
    .cve-app { flex-shrink: 0; order: 2; }
    .cve-app a {
      color: var(--text-strong);
      font-weight: 600;
    }
    .cve-app a:hover { color: var(--accent); }
    .cve-sev {
      font-size: 9.5px;
      padding: 1px 7px;
      flex-shrink: 0;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      border-radius: 2px;
      font-weight: 500;
      order: 3;
    }
    .cve-desc {
      color: var(--text-mid);
      flex-basis: 100%;
      font-size: 14px;
      line-height: 1.55;
      order: 4;
    }
    .sev-high     { color: #b6451c; background: rgba(182, 69, 28, 0.10); }
    .sev-medium   { color: #8a6914; background: rgba(138, 105, 20, 0.10); }
    .sev-critical { color: #a3211a; background: rgba(163, 33, 26, 0.10); }
    html.amber .sev-high     { color: #ff8a4c; background: rgba(255, 138, 76, 0.10); }
    html.amber .sev-medium   { color: #febc2e; background: rgba(254, 188, 46, 0.10); }
    html.amber .sev-critical { color: #ff5f57; background: rgba(255, 95, 87, 0.12); }

    /* ── POST PAGE ── */
    .back {
      color: var(--muted);
      font-size: 12.5px;
      display: inline-block;
      margin-bottom: 36px;
    }
    .back:hover { color: var(--accent); }

    .post-page h1 {
      font-size: 24px;
      font-weight: 700;
      color: var(--text-strong);
      letter-spacing: -0.012em;
      line-height: 1.25;
      margin-bottom: 10px;
      max-width: 28ch;
    }
    .post-page .meta {
      color: var(--muted);
      font-size: 12.5px;
      margin-bottom: 36px;
    }
    .post-page .content {
      color: var(--text-mid);
      font-size: 15px;
      line-height: 1.78;
    }
    .post-page .content p {
      margin-bottom: 18px;
      max-width: 64ch;
    }
    .post-page .content strong { color: var(--text-strong); font-weight: 600; }
    .post-page .content em { color: var(--text); }

    /* subtitle pattern: <p><strong>...</strong></p> gets a § marker */
    .post-page .content p:has(> strong:only-child) {
      font-size: 18px;
      margin-top: 32px;
      margin-bottom: 12px;
    }
    .post-page .content p:has(> strong:only-child)::before {
      content: "§ ";
      color: var(--accent);
      font-weight: 700;
    }

    .post-page .content code {
      color: var(--code-color);
      background: var(--bg-elev);
      padding: 1px 6px;
      font-size: 13px;
      border-radius: 2px;
    }

    .post-page .content pre {
      background: var(--bg-elev);
      border: 1px solid var(--rule);
      border-radius: 3px;
      padding: 18px 20px;
      margin: 22px 0;
      overflow-x: auto;
      font-size: 12.5px;
      line-height: 1.65;
      color: var(--text);
    }
    html.amber .post-page .content pre {
      border: 0;
      border-left: 2px solid var(--rule);
      border-radius: 0;
    }
    .post-page .content pre .g { color: var(--accent); }
    .post-page .content pre .y { color: #b6451c; }
    .post-page .content pre .c { color: var(--muted); }
    html.amber .post-page .content pre .y { color: #febc2e; }

    /* tables in posts */
    .post-page .content table {
      width: 100%;
      border-collapse: collapse;
      margin: 22px 0;
      font-size: 12px;
      overflow-x: auto;
      display: block;
    }
    .post-page .content th {
      color: var(--text-strong);
      text-align: left;
      padding: 9px 11px;
      border-bottom: 1px solid var(--rule);
      font-weight: 600;
      white-space: nowrap;
    }
    .post-page .content td {
      color: var(--text-mid);
      padding: 7px 11px;
      border-bottom: 1px solid var(--rule);
    }
    .post-page .content td strong { color: var(--text-strong); }

    .post-page .content .bypass  { color: #a3211a; }
    .post-page .content .blocked { color: #1f7a4d; }
    .post-page .content .depends { color: #8a6914; }
    .post-page .content .yes     { color: #1f7a4d; }
    .post-page .content .no      { color: #a3211a; }
    html.amber .post-page .content .bypass  { color: #ff5f57; }
    html.amber .post-page .content .blocked { color: #28c840; }
    html.amber .post-page .content .depends { color: #febc2e; }
    html.amber .post-page .content .yes     { color: #28c840; }
    html.amber .post-page .content .no      { color: #ff5f57; }

    /* ── TALK DESC ── */
    .talk-desc {
      color: var(--muted);
      font-size: 13px;
      margin-top: 24px;
      max-width: 60ch;
      line-height: 1.65;
    }
    .talk-meta {
      color: var(--muted-dim);
      font-size: 12px;
    }

    /* ── COPY BUTTON ── */
    .pre-wrap { position: relative; }
    .copy-btn {
      position: absolute;
      top: 8px;
      right: 8px;
      background: var(--bg);
      border: 1px solid var(--rule);
      color: var(--muted);
      font-family: var(--font);
      font-size: 10.5px;
      padding: 3px 9px;
      cursor: pointer;
      border-radius: 2px;
      transition: all 0.18s;
    }
    .copy-btn:hover {
      color: var(--accent);
      border-color: var(--accent);
    }

    /* ── BACK TO TOP ── */
    .top-btn {
      position: fixed;
      bottom: 32px;
      right: 32px;
      color: var(--muted-dim);
      font-size: 16px;
      cursor: pointer;
      opacity: 0;
      transition: opacity 0.3s, color 0.18s;
      pointer-events: none;
      z-index: 100;
      background: var(--bg);
      border: 1px solid var(--rule);
      border-radius: 50%;
      width: 36px;
      height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
      user-select: none;
    }
    .top-btn.show {
      opacity: 1;
      pointer-events: auto;
    }
    .top-btn:hover { color: var(--accent); border-color: var(--accent); }

    /* ── THEME TOGGLE ── */
    .theme-toggle {
      position: fixed;
      top: 28px;
      right: 28px;
      width: 34px;
      height: 34px;
      border-radius: 50%;
      background: var(--bg);
      border: 1px solid var(--rule);
      color: var(--muted);
      font-size: 14px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.18s;
      z-index: 100;
      user-select: none;
    }
    .theme-toggle:hover {
      color: var(--accent);
      border-color: var(--accent);
    }
    .theme-toggle .moon { display: inline; }
    .theme-toggle .sun { display: none; }
    html.amber .theme-toggle .moon { display: none; }
    html.amber .theme-toggle .sun { display: inline; }

    /* ── CURSOR ── */
    .cursor {
      display: inline-block;
      width: 9px;
      height: 17px;
      background: var(--accent);
      animation: blink 1.1s step-end infinite;
      vertical-align: middle;
      margin-left: 2px;
      opacity: 0.85;
    }
    html.amber .cursor {
      box-shadow: 0 0 6px rgba(255,176,0,0.5);
    }
    @keyframes blink { 50% { opacity: 0; } }

    /* ── FOOTER ── */
    footer {
      margin-top: 96px;
      padding-top: 24px;
      border-top: 1px solid var(--rule);
      color: var(--muted-dim);
      font-size: 11.5px;
    }

    /* ── FADE IN ── */
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(6px); }
      to { opacity: 1; transform: translateY(0); }
    }
    header, nav, .page, footer { animation: fadeIn 0.6s ease both; }
    nav { animation-delay: 0.15s; }
    .page { animation-delay: 0.3s; }
    footer { animation-delay: 0.45s; }

    /* ── MOBILE ── */
    @media (max-width: 600px) {
      .wrap { padding: 44px 22px 72px; }
      header { margin-bottom: 44px; }
      .name { font-size: 18px; }
      nav { gap: 16px; font-size: 12.5px; }
      .sep { margin-bottom: 28px; }

      .post { flex-direction: column; gap: 4px; padding: 14px 0; }
      .post-date { min-width: auto; }
      .post:hover { transform: none; }
      .post-title a { font-size: 14.5px; }

      .cve-row { flex-wrap: wrap; gap: 4px 12px; }
      .cve-id, .cve-app { min-width: auto; }

      .post-page h1 { font-size: 19px; }
      .post-page .content { font-size: 14px; }
      .post-page .content pre { padding: 14px; font-size: 11.5px; }
      .back { margin-bottom: 24px; }

      .top-btn { bottom: 20px; right: 20px; }
      .theme-toggle { top: 16px; right: 16px; }
    }