  /* ---------- THEME TOKENS ----------
     To change the entire aesthetic, edit ONLY these variables.
     Try swapping --accent to:
       #FF4D00 (electric orange)  |  #00C853 (terminal green)
       #FFD400 (loud yellow)      |  #FF2D55 (hot pink)
  */
  :root {
    --bg:        #F5F1E8;   /* warm cream */
    --bg-alt:   #ECE6D6;
    --ink:      #0A0A0A;   /* near-black */
    --ink-soft: #2A2A2A;
    --muted:    #6B6B6B;
    --line:     #0A0A0A;
    --accent:   #6B3FD4;   /* deep purple */
    --accent-ink: #FFFFFF;
    --shadow:   6px 6px 0 0 var(--line);
    --shadow-sm: 3px 3px 0 0 var(--line);
    --shadow-lg: 10px 10px 0 0 var(--line);
    --radius: 0px;         /* brutalism = no rounding */
    --border: 2.5px solid var(--line);
    --border-thick: 4px solid var(--line);
  }

  [data-theme="dark"] {
    --bg:        #0E0E0E;
    --bg-alt:   #161616;
    --ink:      #F5F1E8;
    --ink-soft: #DDD8C8;
    --muted:    #8C8C8C;
    --line:     #F5F1E8;
    --accent:   #9B7BFF;
    --accent-ink: #0E0E0E;
  }

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

  html { scroll-behavior: smooth; }

  body {
    font-family: 'Inter Tight', system-ui, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.5;
    font-size: 16px;
    overflow-x: hidden;
    transition: background 200ms ease, color 200ms ease;
  }

  body::before {
    /* grain overlay */
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.06'/></svg>");
    z-index: 1;
    mix-blend-mode: multiply;
  }

  [data-theme="dark"] body::before { mix-blend-mode: screen; opacity: 0.5; }

  /* ---------- TOP BAR ---------- */
  .topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: var(--border);
    padding: 14px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 500;
  }

  .topbar-left { display: flex; align-items: center; gap: 16px; }
  .topbar-right { display: flex; align-items: center; gap: 10px; }

  .logo-mark {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    text-decoration: none;
    transition: transform 200ms ease;
  }

  .logo-mark:hover { transform: rotate(-3deg) scale(1.05); }

  .logo-mark svg {
    width: 100%;
    height: 100%;
  }

  .logo-mark svg rect:not(.cursor) {
    fill: var(--ink);
  }

  .logo-mark svg .cursor {
    fill: var(--accent);
  }

  .ctrl {
    border: var(--border);
    background: var(--bg);
    color: var(--ink);
    padding: 6px 12px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 120ms ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .ctrl:hover {
    background: var(--accent);
    color: var(--accent-ink);
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-sm);
  }

  .ctrl.active {
    background: var(--ink);
    color: var(--bg);
  }

  /* ---------- LAYOUT ---------- */
  main { position: relative; z-index: 2; }

  section {
    padding: 80px 32px;
    border-bottom: var(--border-thick);
    width: 80vw;
    max-width: 1800px;
    margin: 0 auto;
  }

  .section-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--muted);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .section-tag::before {
    content: '';
    width: 24px;
    height: 2px;
    background: var(--ink);
  }

  .section-title {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(40px, 5vw, 72px);
    font-weight: 400;
    line-height: 1;
    margin-bottom: 48px;
    letter-spacing: -0.02em;
  }

  .section-title em {
    font-style: italic;
    color: var(--accent);
  }

  /* ---------- HERO ---------- */
  .hero {
    padding-top: 60px;
    padding-bottom: 100px;
    position: relative;
  }

  .hero-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 48px;
    align-items: stretch;
  }

  .hero-right {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-logo {
    display: block;
    width: 120px;
    height: 120px;
    margin-top: 12px;
    margin-bottom: 32px;
    margin-left: 24px;
  }

  .hero-logo rect:not(.cursor) {
    fill: var(--ink);
  }

  .hero-logo .cursor {
    fill: var(--accent);
  }

  .hero h1 {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    font-size: clamp(56px, 9vw, 140px);
    line-height: 0.92;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
  }

  .hero h1 .italic {
    font-style: italic;
    color: var(--accent);
  }

  .hero-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.8;
    border-left: var(--border-thick);
    padding-left: 24px;
    margin-top: auto;
  }

  .hero-meta b { font-weight: 700; }
  .hero-meta .label {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 11px;
  }

  .hero-tagline {
    font-size: clamp(18px, 2vw, 22px);
    line-height: 1.4;
    max-width: 620px;
    margin-top: 12px;
    color: var(--ink-soft);
  }

  .hero-credential {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink);
    margin-bottom: 8px;
    padding: 8px 12px;
    border: var(--border);
    background: var(--bg-alt);
    display: inline-block;
    position: relative;
    margin-right: 8px;
  }

  .hero-credential:last-of-type {
    margin-bottom: 24px;
  }

  .hero-credential::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--accent);
    margin-right: 10px;
    vertical-align: 1px;
  }

  .hero-cta {
    margin-top: 36px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
  }

  .btn {
    border: var(--border-thick);
    background: var(--ink);
    color: var(--bg);
    padding: 14px 22px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 150ms ease, box-shadow 150ms ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
  }

  .btn:hover {
    transform: translate(-3px, -3px);
    box-shadow: 9px 9px 0 0 var(--line);
  }

  .btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 0 var(--line);
  }

  .btn.accent { background: var(--accent); color: var(--accent-ink); }
  .btn.outline {
    background: var(--bg);
    color: var(--ink);
  }

  /* ---------- STATUS BADGE ---------- */
  .status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
  }

  .badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 6px 12px;
    border: var(--border);
    background: var(--bg-alt);
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  .dot {
    width: 8px; height: 8px;
    background: var(--accent);
    display: inline-block;
  }

  .dot.pulse {
    animation: pulse 1.6s ease-in-out infinite;
  }

  @keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
  }

  /* ---------- NOW / ROLES GRID ---------- */
  .roles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .role-card {
    border: var(--border-thick);
    background: var(--bg);
    position: relative;
    box-shadow: var(--shadow);
    transition: transform 200ms ease, box-shadow 200ms ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .role-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: var(--shadow-lg);
  }

  /* Linked variant — entire card is an anchor */
  .role-card--link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
  }

  .role-card--link:hover {
    border-color: var(--accent);
  }

  .role-card--link:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
  }

  .role-body {
    position: relative;
  }

  .role-arrow {
    position: absolute;
    bottom: 14px;
    right: 18px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    color: var(--muted);
    transition: transform 200ms ease, color 200ms ease;
    line-height: 1;
  }

  .role-card--link:hover .role-arrow {
    color: var(--accent);
    transform: translate(2px, -2px);
  }

  /* HEADER ZONE — logo + title + company */
  .role-header {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 20px 24px;
    background: var(--bg-alt);
    border-bottom: var(--border);
  }

  .role-logo {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border: var(--border);
    background: var(--bg);
    display: grid;
    place-items: center;
    padding: 8px;
    transition: background 200ms ease;
  }

  .role-heading {
    flex: 1;
    min-width: 0;
  }

  .role-heading .role-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-bottom: 4px;
  }

  /* BODY ZONE — description */
  .role-body {
    padding: 20px 24px 22px;
    flex: 1;
  }

  .role-card--link .role-body {
    padding-right: 44px;
    padding-bottom: 36px;
  }

  .role-logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    /* Desaturate → darken → tint purple. Result: monochrome purple-scale logos
       that read consistently regardless of original brand colors. */
    filter:
      grayscale(1)
      contrast(1.1)
      brightness(0.35)
      sepia(1)
      hue-rotate(220deg)
      saturate(3);
    transition: filter 250ms ease;
  }

  /* Dark mode: invert lightness so the purple shows on dark backgrounds */
  [data-theme="dark"] .role-logo img {
    filter:
      grayscale(1)
      contrast(1.1)
      brightness(1.5)
      sepia(1)
      hue-rotate(220deg)
      saturate(2);
  }

  /* On hover, drop the tint and go full ink — small reward for engagement */
  .role-card:hover .role-logo img {
    filter:
      grayscale(1)
      contrast(1.2)
      brightness(0);
  }

  [data-theme="dark"] .role-card:hover .role-logo img {
    filter:
      grayscale(1)
      contrast(1.2)
      brightness(0)
      invert(1);
  }

  .role-card h3 {
    font-family: 'Instrument Serif', serif;
    font-size: 28px;
    font-weight: 400;
    line-height: 1.05;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
  }

  .role-card .role-company {
    font-weight: 600;
    font-size: 13px;
    display: inline-block;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 2px;
    color: var(--ink);
    text-decoration: none;
  }

  .role-card .role-body p {
    font-size: 14px;
    color: var(--ink-soft);
    line-height: 1.55;
  }

  .role-card .role-number {
    position: absolute;
    top: 10px;
    right: 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--muted);
    z-index: 1;
  }

  /* ---------- TIMELINE / EXPERIENCE ---------- */
  .timeline {
    border-top: var(--border);
  }

  .tl-item {
    display: grid;
    grid-template-columns: 180px 1fr auto;
    gap: 32px;
    padding: 28px 0;
    border-bottom: var(--border);
    align-items: start;
    transition: background 200ms ease, padding 200ms ease;
  }

  .tl-item:hover {
    background: var(--bg-alt);
    padding-left: 16px;
    padding-right: 16px;
  }

  .tl-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--muted);
    padding-top: 4px;
  }

  .tl-body h4 {
    font-family: 'Instrument Serif', serif;
    font-size: 26px;
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
  }

  .tl-body .tl-company {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 10px;
    display: inline-block;
  }

  .tl-body ul {
    list-style: none;
    margin-top: 6px;
  }

  .tl-body li {
    font-size: 14px;
    color: var(--ink-soft);
    line-height: 1.55;
    padding-left: 18px;
    position: relative;
    margin-bottom: 4px;
  }

  .tl-body li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
  }

  .tl-loc {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding-top: 6px;
    text-align: right;
  }

  /* ---------- EDUCATION ---------- */
  .edu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border-top: var(--border);
  }

  .edu-item {
    padding: 24px 28px 24px 0;
    border-bottom: var(--border);
    border-right: var(--border);
  }

  .edu-item:nth-child(2n) {
    border-right: none;
    padding-left: 28px;
    padding-right: 0;
  }

  .edu-item:nth-last-child(-n+2) {
    border-bottom: none;
  }

  .edu-item h4 {
    font-family: 'Instrument Serif', serif;
    font-size: 26px;
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 6px;
  }

  .edu-item .edu-school {
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 6px;
  }

  .edu-item .edu-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--muted);
  }

  /* ---------- CONTACT ---------- */
  .contact-section {
    background: var(--ink);
    color: var(--bg);
    max-width: none;
    padding-left: 0;
    padding-right: 0;
  }

  .contact-inner {
    width: 80vw;
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 32px;
  }

  .contact-section .section-tag { color: var(--bg-alt); }
  .contact-section .section-tag::before { background: var(--bg); }
  .contact-section .section-title em { color: var(--accent); }

  .contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border: 3px solid var(--bg);
  }

  .contact-cell {
    padding: 28px;
    border-right: 3px solid var(--bg);
    transition: background 150ms ease;
  }

  .contact-cell:hover { background: var(--accent); }
  .contact-cell:last-child { border-right: none; }

  .contact-cell a {
    color: inherit;
    text-decoration: none;
    display: block;
  }

  .contact-cell .label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.6;
    margin-bottom: 8px;
  }

  .contact-cell .value {
    font-family: 'Instrument Serif', serif;
    font-size: 28px;
    line-height: 1.1;
    word-break: break-word;
  }

  /* ---------- FOOTER ---------- */
  footer {
    background: var(--bg);
    border-top: var(--border-thick);
    padding: 24px 32px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    display: flex;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 2;
  }

  /* ---------- REVEAL ANIMATION ---------- */
  .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms ease, transform 600ms ease;
  }

  .reveal.in {
    opacity: 1;
    transform: translateY(0);
  }

  /* ---------- RESPONSIVE ---------- */
  @media (max-width: 900px) {
    section { padding: 56px 20px; width: 100%; max-width: 100%; }
    .contact-inner { width: 100%; max-width: 100%; padding: 0 20px; }
    .topbar { padding: 12px 20px; }
    .hero-grid { grid-template-columns: 1fr; gap: 32px; }
    .hero-right { border-left: none; padding-left: 0; }
    .hero-logo { width: 96px; height: 96px; }
    .roles-grid { grid-template-columns: 1fr; }
    .tl-item { grid-template-columns: 1fr; gap: 8px; }
    .tl-loc { text-align: left; }
    .edu-grid { grid-template-columns: 1fr; }
    .edu-item, .edu-item:nth-child(2n) {
      border-right: none;
      padding: 20px 0;
    }
    .edu-item:last-child { border-bottom: none; }
    .contact-grid { grid-template-columns: 1fr; }
    .contact-cell {
      border-right: none;
      border-bottom: 3px solid var(--bg);
    }
    .contact-cell:last-child { border-bottom: none; }
  }

  @media (max-width: 500px) {
    .topbar { font-size: 11px; flex-wrap: wrap; gap: 10px; }
    .ctrl { padding: 5px 9px; font-size: 11px; }
    .hero { padding-top: 32px; padding-bottom: 60px; }
    .contact-cell .value { font-size: 22px; }
  }

  /* ---------- I18N CONTROL ---------- */
  [data-lang="en"] .pt-only,
  [data-lang="pt"] .en-only { display: none; }


  /* ============================================================
     PROJECTS / BLOG STYLES
     ============================================================ */

  .topbar-name {
    display: inline-block;
  }

  .topbar-nav {
    display: flex;
    gap: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 500;
  }

  .topbar-nav .nav-link {
    color: var(--ink);
    text-decoration: none;
    padding: 4px 8px;
    border: 2px solid transparent;
    transition: border-color 150ms ease, background 150ms ease;
  }

  .topbar-nav .nav-link:hover {
    border-color: var(--line);
    background: var(--bg-alt);
  }

  .topbar-nav .nav-link.active {
    background: var(--ink);
    color: var(--bg);
  }

  /* Blog hero — list page */
  .blog-hero {
    padding: 80px 32px 40px;
    width: 80vw;
    max-width: 1800px;
    margin: 0 auto;
  }

  .blog-hero-title {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(48px, 7vw, 96px);
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: -0.02em;
    margin: 24px 0 32px;
  }

  .blog-hero-title em {
    font-style: italic;
    color: var(--accent);
  }

  .blog-hero-sub {
    font-size: clamp(17px, 1.6vw, 20px);
    line-height: 1.5;
    color: var(--ink-soft);
    max-width: 720px;
  }

  /* Post list */
  .post-list-section {
    padding: 40px 32px 100px;
    width: 80vw;
    max-width: 1800px;
    margin: 0 auto;
    border-bottom: var(--border-thick);
  }

  .post-list {
    border-top: var(--border);
  }

  .post-item {
    display: block;
    padding: 32px 0;
    border-bottom: var(--border);
    text-decoration: none;
    color: inherit;
    position: relative;
    transition: padding 200ms ease, background 200ms ease;
  }

  .post-item:hover {
    background: var(--bg-alt);
    padding-left: 24px;
    padding-right: 24px;
  }

  .post-item-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
  }

  .post-item-tags {
    display: flex;
    gap: 6px;
  }

  .tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    padding: 3px 8px;
    border: var(--border);
    background: var(--bg);
    text-transform: lowercase;
    letter-spacing: 0;
    color: var(--ink);
  }

  .post-item-title {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(28px, 3.5vw, 42px);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin-bottom: 10px;
    color: var(--ink);
  }

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

  .post-item-desc {
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink-soft);
    max-width: 720px;
  }

  .post-item-arrow {
    position: absolute;
    top: 32px;
    right: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 22px;
    color: var(--muted);
    transition: transform 200ms ease, color 200ms ease;
  }

  .post-item:hover .post-item-arrow {
    color: var(--accent);
    transform: translate(4px, -4px);
  }

  .empty-state {
    padding: 80px 0;
    text-align: center;
  }

  .empty-state-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--muted);
    margin-bottom: 16px;
  }

  .empty-state p {
    font-size: 17px;
    color: var(--ink-soft);
  }

  .empty-state code {
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg-alt);
    padding: 2px 8px;
    border: var(--border);
    font-size: 14px;
  }

  /* ============================================================
     INDIVIDUAL POST PAGE
     ============================================================ */

  .post {
    padding: 60px 32px 100px;
    width: min(80vw, 800px);
    margin: 0 auto;
  }

  .post-header {
    margin-bottom: 56px;
    padding-bottom: 32px;
    border-bottom: var(--border-thick);
  }

  .post-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 32px;
  }

  .post-back {
    color: var(--ink);
    text-decoration: none;
    border: var(--border);
    background: var(--bg);
    padding: 6px 12px;
    transition: all 150ms ease;
  }

  .post-back:hover {
    background: var(--accent);
    color: var(--accent-ink);
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-sm);
  }

  .post-title {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(40px, 5.5vw, 72px);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
  }

  .post-lede {
    font-size: clamp(18px, 1.8vw, 22px);
    line-height: 1.45;
    color: var(--ink-soft);
    max-width: 720px;
    margin-bottom: 24px;
  }

  .post-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
  }

  /* Long-form prose styling */
  .post-body {
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink);
  }

  .post-body > * + * { margin-top: 1.2em; }

  .post-body h2 {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(28px, 3vw, 36px);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin-top: 2.4em;
    margin-bottom: 0.6em;
    padding-bottom: 0.4em;
    border-bottom: var(--border);
  }

  .post-body h3 {
    font-family: 'Instrument Serif', serif;
    font-size: 24px;
    font-weight: 400;
    margin-top: 2em;
    margin-bottom: 0.4em;
  }

  .post-body p {
    margin-bottom: 1.2em;
  }

  .post-body a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 2px solid var(--accent);
    transition: background 150ms ease;
  }

  .post-body a:hover {
    background: var(--accent);
    color: var(--accent-ink);
  }

  .post-body code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88em;
    background: var(--bg-alt);
    padding: 2px 6px;
    border: 1px solid var(--line);
    border-radius: 0;
  }

  .post-body pre {
    background: var(--ink);
    color: var(--bg);
    padding: 20px 24px;
    overflow-x: auto;
    border: var(--border-thick);
    box-shadow: var(--shadow);
    margin: 1.5em 0;
    font-size: 13px;
    line-height: 1.55;
  }

  .post-body pre code {
    background: transparent;
    border: none;
    padding: 0;
    font-size: inherit;
    color: inherit;
  }

  .post-body blockquote {
    border-left: 4px solid var(--accent);
    padding: 6px 0 6px 20px;
    margin: 1.5em 0;
    color: var(--ink-soft);
    font-style: italic;
  }

  .post-body ul, .post-body ol {
    margin: 1.2em 0;
    padding-left: 28px;
  }

  .post-body li {
    margin-bottom: 0.5em;
    line-height: 1.6;
  }

  .post-body ul li::marker {
    color: var(--accent);
  }

  .post-body hr {
    border: none;
    border-top: var(--border);
    margin: 2.4em 0;
  }

  .post-body img {
    max-width: 100%;
    border: var(--border);
    margin: 1.5em 0;
  }

  .post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 15px;
  }

  .post-body th, .post-body td {
    text-align: left;
    padding: 10px 14px;
    border: var(--border);
  }

  .post-body th {
    background: var(--bg-alt);
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .post-footer {
    margin-top: 80px;
    padding-top: 32px;
    border-top: var(--border);
  }

  @media (max-width: 900px) {
    .topbar-name { display: none; }
    .topbar-nav { font-size: 12px; }
    .blog-hero, .post-list-section { width: 100%; max-width: 100%; padding-left: 20px; padding-right: 20px; }
    .post { width: 100%; padding-left: 20px; padding-right: 20px; }
    .post-item:hover { padding-left: 12px; padding-right: 12px; }
  }
