
  :root {
    --ink: #ede4cf;
    --ink-soft: #b3a78f;
    --ink-faded: #7a715f;
    --gold: #c9a86a;
    --gold-deep: #8a7142;
    --paper: #1a1612;
    --paper-deep: #050402;
    --ember: #d97742;
    --link: #c9a86a;
    --link-hover: #ede4cf;
    --rule: rgba(201,168,106,0.18);
    --rule-soft: rgba(201,168,106,0.08);
    --shade: rgba(0,0,0,0.3);
    --title: #f5ecd2;
    --title-shadow: 0 1px 0 rgba(0,0,0,0.5), 0 2px 3px rgba(0,0,0,0.35);
    --serif: 'Fraunces', 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
    --sans: 'Inter', -apple-system, sans-serif;
    --mono: 'JetBrains Mono', 'IBM Plex Mono', monospace;
    --frak: 'UnifrakturCook', serif;
  }
  /* ============ LIGHT THEME ============ */
  html[data-theme="light"] {
    --ink: #1d1916;
    --ink-soft: #4a4337;
    --ink-faded: #837a68;
    --gold: #8a6d2c;
    --gold-deep: #5e4a1c;
    --paper: #f5efe2;
    --paper-deep: #faf6ec;
    --ember: #b85a1f;
    --link: #8a6d2c;
    --link-hover: #1d1916;
    --rule: rgba(60,45,15,0.22);
    --rule-soft: rgba(60,45,15,0.08);
    --shade: rgba(255,251,240,0.6);
    --title: #1d1916;
    --title-shadow: none;
  }
  html[data-theme="light"] body::before { opacity: 0.04; }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; }
  body {
    background: var(--paper-deep);
    color: var(--ink);
    font-family: var(--serif);
    font-weight: 400;
    font-size: 19px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "kern" 1, "liga" 1, "onum" 1, "ss01" 1;
    font-optical-sizing: auto;
    text-rendering: optimizeLegibility;
    letter-spacing: -0.005em;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
  }

  /* ============ CUSTOM CURSOR ============ */
  @media (hover: hover) and (pointer: fine) {
    body { cursor: none; }
    a, button, .cta, .essay, .pillar, .book, input, textarea { cursor: none; }
  }
  .cursor {
    position: fixed; top: 0; left: 0;
    width: 0; height: 0;
    pointer-events: none;
    z-index: 99999;
  }
  .cursor-dot,
  .cursor-ring,
  .cursor-label {
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    will-change: transform;
  }
  .cursor-dot {
    width: 6px; height: 6px;
    margin: -3px 0 0 -3px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 8px rgba(201,168,106,0.6);
    transition: opacity 0.2s;
  }
  .cursor-ring {
    width: 32px; height: 32px;
    margin: -16px 0 0 -16px;
    border: 1.5px solid var(--gold);
    border-radius: 50%;
    background: rgba(201,168,106,0.04);
    transition: width 0.25s ease, height 0.25s ease, margin 0.25s ease, border-radius 0.25s ease, background 0.25s ease;
  }
  .cursor.is-hover .cursor-ring {
    width: 56px; height: 56px;
    margin: -28px 0 0 -28px;
    background: rgba(201,168,106,0.10);
  }
  .cursor.is-text .cursor-ring {
    width: 3px; height: 28px;
    margin: -14px 0 0 -1.5px;
    border-radius: 1px;
    background: var(--gold);
  }
  .cursor.is-text .cursor-dot { opacity: 0; }
  .cursor-label {
    margin: 14px 0 0 22px;
    font-family: var(--mono);
    font-size: 10px;
    color: var(--ink);
    background: rgba(14,11,8,0.9);
    padding: 4px 10px;
    border-radius: 2px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
    border: 1px solid rgba(201,168,106,0.3);
  }
  .cursor.is-hover .cursor-label { opacity: 1; }
  @media (hover: none), (pointer: coarse) {
    .cursor { display: none; }
  }

  /* ============ FILM GRAIN ============ */
  body::before {
    content: '';
    position: fixed; inset: 0;
    pointer-events: none;
    z-index: 100;
    opacity: 0.08;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  }

  /* ============ NAV ============ */
  #nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    padding: 18px 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(12px);
    background: linear-gradient(to bottom, rgba(5,4,2,0.88) 0%, rgba(5,4,2,0) 100%);
    transition: background 0.4s ease;
  }
  #nav.scrolled {
    background: rgba(5,4,2,0.94);
    border-bottom: 1px solid rgba(201,168,106,0.12);
  }

  /* Brand: logo + site title together */
  #nav .brand,
  #nav a.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
    flex: 0 0 auto;
    line-height: 1;
    min-width: 0;
    max-width: calc(100% - 80px);
  }
  #nav .brand:hover { opacity: 0.78; }
  #nav .brand-logo,
  #nav .brand img,
  #nav img.brand-logo,
  #nav img.custom-logo {
    height: 40px !important;
    width: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    min-width: 0 !important;
    display: block !important;
    object-fit: contain !important;
    flex: 0 0 40px !important;
  }
  #nav .brand-name {
    font-family: var(--serif) !important;
    font-size: 17px !important;
    font-weight: 500 !important;
    color: var(--ink) !important;
    font-style: italic !important;
    letter-spacing: 0.005em !important;
    text-transform: none !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
  @media (max-width: 720px) {
    #nav .brand-name { font-size: 14px !important; }
    #nav .brand-logo,
    #nav .brand img,
    #nav img.brand-logo,
    #nav img.custom-logo {
      height: 30px !important;
      width: 30px !important;
      max-width: 30px !important;
      max-height: 30px !important;
      flex: 0 0 30px !important;
    }
  }
  @media (max-width: 480px) {
    #nav .brand-name { font-size: 13px !important; }
  }

  /* Global safety: any image inside nav is capped */
  #nav img { max-height: 40px; max-width: 40px; }
  @media (max-width: 720px) {
    #nav img { max-height: 30px !important; max-width: 30px !important; }
  }

  /* ============ MOBILE NAV TOGGLE ============ */
  .nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(201,168,106,0.25);
    border-radius: 2px;
    padding: 10px 11px;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    z-index: 60;
  }
  .nav-toggle span {
    display: block;
    width: 18px;
    height: 1.5px;
    background: var(--gold);
    transition: transform 0.3s, opacity 0.3s;
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

  @media (max-width: 900px) {
    #nav { padding: 14px 24px; }
    .nav-toggle { display: inline-flex; }
    #nav .nav-menu {
      position: fixed;
      top: 0; right: 0;
      width: min(320px, 80vw);
      height: 100vh;
      flex-direction: column !important;
      align-items: flex-start !important;
      justify-content: center !important;
      gap: 28px !important;
      padding: 80px 40px !important;
      background: rgba(5,4,2,0.98);
      backdrop-filter: blur(20px);
      border-left: 1px solid rgba(201,168,106,0.15);
      transform: translateX(100%);
      transition: transform 0.4s cubic-bezier(0.7,0,0.3,1);
      z-index: 55;
    }
    #nav .nav-menu.is-open { transform: translateX(0); }
    #nav .nav-menu li { width: 100%; }
    #nav .nav-menu a {
      font-size: 15px !important;
      letter-spacing: 0.16em !important;
      padding: 8px 0;
      display: block;
    }
    body.nav-open { overflow: hidden; }
  }
  #nav ul {
    list-style: none;
    display: flex;
    gap: 38px;
    align-items: center;
  }
  #nav a {
    color: var(--ink-soft);
    text-decoration: none;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    transition: color 0.3s;
    position: relative;
  }
  #nav a:hover { color: var(--gold); }
  #nav a.active::before {
    content: '§';
    position: absolute;
    left: -16px;
    color: var(--gold);
  }

  /* ============ HERO ============ */
  .hero {
    position: relative;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    align-items: stretch;
    overflow: hidden;
  }
  .hero-portrait {
    position: relative;
    overflow: hidden;
    background: var(--paper-deep);
  }
  .hero-portrait img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 28% center;
    filter: contrast(1.05) brightness(0.92) saturate(0.85);
  }
  .hero-portrait::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
      radial-gradient(ellipse at 30% 40%, transparent 0%, rgba(14,11,8,0.45) 75%, var(--paper-deep) 100%),
      linear-gradient(90deg, transparent 60%, var(--paper-deep) 100%);
    pointer-events: none;
  }
  .hero-portrait::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
      radial-gradient(circle at 80% 20%, rgba(201,168,106,0.06) 0%, transparent 40%);
    pointer-events: none;
    z-index: 1;
  }

  .portrait-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
  }
  .latin-mark {
    position: absolute;
    bottom: 48px;
    left: 56px;
    font-family: var(--serif);
    font-style: italic;
    font-size: 13px;
    color: var(--ink-soft);
    opacity: 0.7;
    max-width: 280px;
    line-height: 1.5;
  }
  .latin-mark::before {
    content: '';
    display: block;
    width: 36px;
    height: 1px;
    background: var(--gold);
    margin-bottom: 12px;
  }
  .corner-mark {
    position: absolute;
    top: 110px;
    left: 56px;
    font-family: var(--mono);
    font-size: 10px;
    color: var(--gold);
    letter-spacing: 0.3em;
    opacity: 0.7;
  }

  .hero-content {
    padding: 140px 80px 80px 72px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    background: var(--paper-deep);
  }
  .hero-content::before {
    content: '';
    position: absolute;
    left: 0; top: 25%; bottom: 25%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(201,168,106,0.3) 50%, transparent);
  }
  .eyebrow {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.32em;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 14px;
  }
  .eyebrow::before {
    content: '';
    width: 28px;
    height: 1px;
    background: var(--gold);
  }
  h1.title {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(52px, 6.4vw, 96px);
    line-height: 0.96;
    letter-spacing: -0.025em;
    color: var(--title);
    margin-bottom: 52px;
    text-shadow: var(--title-shadow);
  }
  h1.title .em {
    font-style: italic;
    color: var(--gold);
    font-weight: 300;
  }
  h1.title .frak {
    font-family: var(--frak);
    font-weight: 700;
    font-size: 0.72em;
    letter-spacing: 0;
    color: var(--ink);
    display: inline-block;
    transform: translateY(-0.05em);
  }

  .subtitle {
    font-family: var(--serif);
    font-size: 19px;
    line-height: 1.65;
    color: var(--ink-soft);
    max-width: 540px;
    margin-bottom: 44px;
    font-weight: 300;
  }
  .subtitle .drop {
    float: left;
    font-family: var(--frak);
    font-size: 64px;
    line-height: 0.85;
    margin: 6px 12px 0 0;
    color: var(--gold);
  }
  .hero-meta {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 48px;
    margin-bottom: 52px;
  }
  .meta-item {
    border-left: 1px solid rgba(201,168,106,0.25);
    padding-left: 14px;
  }
  .meta-label {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.24em;
    color: var(--ink-faded);
    text-transform: uppercase;
    margin-bottom: 6px;
  }
  .meta-value {
    font-family: var(--serif);
    font-size: 15px;
    color: var(--ink);
    font-style: italic;
  }
  .cta-row {
    display: flex;
    gap: 18px;
    align-items: center;
  }
  .cta {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    padding: 14px 26px;
    border: 1px solid var(--gold);
    color: var(--gold);
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    background: transparent;
  }
  .cta:hover {
    background: var(--gold);
    color: var(--paper-deep);
  }
  .cta.ghost {
    border-color: rgba(232,226,211,0.2);
    color: var(--ink-soft);
  }
  .cta.ghost:hover {
    border-color: var(--ink);
    color: var(--ink);
    background: transparent;
  }

  /* Concentric circles ornament */
  .ouroboros {
    position: absolute;
    bottom: -120px;
    right: -120px;
    width: 380px;
    height: 380px;
    opacity: 0.15;
    pointer-events: none;
  }

  /* Compass mark */
  .compass {
    position: absolute;
    top: 130px;
    right: 72px;
    width: 88px;
    height: 88px;
    opacity: 0.4;
    pointer-events: none;
  }

  /* ============ SECTION SHARED ============ */
  section {
    position: relative;
    padding: 130px 80px;
    border-top: 1px solid rgba(201,168,106,0.1);
  }
  .section-header {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 80px;
    margin-bottom: 80px;
    align-items: end;
  }
  .section-num {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--gold);
    letter-spacing: 0.32em;
    margin-bottom: 14px;
  }
  .section-title {
    font-family: var(--serif);
    font-size: 56px;
    font-weight: 400;
    line-height: 1;
    color: var(--ink);
    letter-spacing: -0.015em;
  }
  .section-title .it { font-style: italic; color: var(--gold); }
  .section-lead {
    font-family: var(--serif);
    font-size: 21px;
    line-height: 1.55;
    color: var(--ink-soft);
    font-weight: 300;
    max-width: 640px;
  }

  /* ============ THINKING SECTION ============ */
  .thinking {
    background:
      radial-gradient(ellipse at 80% 0%, rgba(201,168,106,0.04) 0%, transparent 50%),
      var(--paper);
  }
  .pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid rgba(201,168,106,0.18);
  }
  .pillar {
    padding: 48px 40px 56px;
    border-right: 1px solid rgba(201,168,106,0.12);
    position: relative;
    transition: background 0.4s;
  }
  .pillar:last-child { border-right: none; }
  .pillar:hover {
    background: rgba(201,168,106,0.03);
  }
  .pillar-glyph {
    font-family: var(--frak);
    font-size: 64px;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 28px;
    opacity: 0.85;
  }
  .pillar-num {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--ink-faded);
    letter-spacing: 0.3em;
    position: absolute;
    top: 48px;
    right: 40px;
  }
  .pillar h3 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 30px;
    color: var(--ink);
    margin-bottom: 8px;
    line-height: 1.1;
  }
  .pillar h3 .it { font-style: italic; color: var(--gold); }
  .pillar-quote {
    font-family: var(--serif);
    font-style: italic;
    font-size: 13px;
    color: var(--gold-deep);
    margin-bottom: 22px;
    border-bottom: 1px solid rgba(201,168,106,0.15);
    padding-bottom: 18px;
  }
  .pillar p {
    font-family: var(--serif);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink-soft);
  }

  /* ============ ESSAYS ============ */
  .essays {
    background: var(--paper-deep);
  }
  .essays-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 32px 40px;
  }
  .essay {
    grid-column: span 6;
    cursor: pointer;
    border-top: 1px solid rgba(201,168,106,0.18);
    padding: 32px 0 40px;
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 32px;
    transition: padding 0.4s;
    position: relative;
  }
  .essay:hover { padding-left: 16px; }
  .essay:hover .essay-arrow { opacity: 1; transform: translateX(4px); }
  .essay-arrow {
    position: absolute;
    right: 0;
    top: 36px;
    color: var(--gold);
    opacity: 0;
    transition: all 0.3s;
    font-family: var(--mono);
  }
  .essay-meta {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--ink-faded);
    letter-spacing: 0.22em;
    line-height: 1.7;
  }
  .essay-meta .num {
    color: var(--gold);
    font-size: 22px;
    font-family: var(--serif);
    font-style: italic;
    display: block;
    margin-bottom: 8px;
    letter-spacing: 0;
  }
  .essay h3 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 30px;
    line-height: 1.15;
    color: var(--ink);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
  }
  .essay h3 .it { font-style: italic; }
  .essay-excerpt {
    font-family: var(--serif);
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink-soft);
    font-weight: 300;
    margin-bottom: 16px;
  }
  .essay-tags {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
  }
  .tag {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--gold-deep);
    padding: 4px 0;
  }
  .tag::before { content: '— '; opacity: 0.5; }

  .essay.featured {
    grid-column: span 12;
    grid-template-columns: 1.4fr 1fr;
    gap: 64px;
    border-top: 1px solid var(--gold);
    padding: 48px 0 60px;
    margin-bottom: 16px;
  }
  .essay.featured:hover { padding-left: 24px; }
  .essay.featured .essay-body { padding-right: 40px; }
  .essay.featured h3 {
    font-size: 52px;
    line-height: 1.05;
    margin-bottom: 24px;
  }
  .essay.featured .essay-excerpt {
    font-size: 19px;
    line-height: 1.55;
    margin-bottom: 28px;
  }
  .essay.featured .latin {
    font-family: var(--serif);
    font-style: italic;
    font-size: 13px;
    color: var(--gold);
    letter-spacing: 0.04em;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .essay.featured .latin::before {
    content: '';
    width: 18px; height: 1px;
    background: var(--gold);
  }
  .essay-aside {
    border-left: 1px solid rgba(201,168,106,0.2);
    padding: 12px 0 12px 32px;
    font-family: var(--serif);
    font-style: italic;
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink-soft);
  }
  .essay-aside .quote-mark {
    font-family: var(--frak);
    color: var(--gold);
    font-size: 38px;
    line-height: 0;
    vertical-align: -16px;
    margin-right: 4px;
  }
  .essay-aside footer {
    margin-top: 18px;
    font-style: normal;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--ink-faded);
    text-transform: uppercase;
  }

  /* ============ SYSTEMS DIAGRAM ============ */
  .systems {
    background: var(--paper);
    overflow: hidden;
  }
  .systems-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
  }
  .systems-text h3 {
    font-family: var(--serif);
    font-size: 38px;
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--ink);
  }
  .systems-text h3 .it { font-style: italic; color: var(--gold); }
  .systems-text p {
    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.65;
    color: var(--ink-soft);
    margin-bottom: 20px;
  }
  .systems-text p .marg {
    font-family: var(--frak);
    color: var(--gold);
    font-size: 1.1em;
  }
  .principles {
    margin-top: 36px;
    border-top: 1px solid rgba(201,168,106,0.2);
  }
  .principle {
    display: grid;
    grid-template-columns: 50px 1fr;
    gap: 20px;
    padding: 18px 0;
    border-bottom: 1px solid rgba(201,168,106,0.1);
  }
  .principle-num {
    font-family: var(--serif);
    font-style: italic;
    font-size: 22px;
    color: var(--gold);
  }
  .principle-text {
    font-family: var(--serif);
    font-size: 16px;
    color: var(--ink);
    line-height: 1.5;
  }
  .principle-text small {
    display: block;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--ink-faded);
    text-transform: uppercase;
    margin-top: 4px;
  }

  .diagram {
    aspect-ratio: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .diagram svg { width: 100%; height: 100%; overflow: visible; }
  .diagram-caption {
    position: absolute;
    bottom: -32px;
    left: 0;
    right: 0;
    text-align: center;
    font-family: var(--serif);
    font-style: italic;
    color: var(--ink-faded);
    font-size: 13px;
    letter-spacing: 0.04em;
  }

  /* ============ DIALECTIC ============ */
  .dialectic {
    background: var(--paper-deep);
  }
  .dialectic-grid {
    display: grid;
    grid-template-columns: 1fr 80px 1fr 80px 1fr;
    gap: 0;
    align-items: stretch;
    border: 1px solid rgba(201,168,106,0.18);
  }
  .dia-card {
    padding: 44px 32px;
    text-align: center;
    position: relative;
  }
  .dia-card.thesis { background: rgba(201,168,106,0.02); }
  .dia-card.synth { background: rgba(217,119,66,0.04); }
  .dia-glyph {
    font-family: var(--frak);
    font-size: 54px;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 18px;
  }
  .dia-card.synth .dia-glyph { color: var(--ember); }
  .dia-label {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.32em;
    color: var(--ink-faded);
    text-transform: uppercase;
    margin-bottom: 14px;
  }
  .dia-title {
    font-family: var(--serif);
    font-size: 24px;
    font-style: italic;
    color: var(--ink);
    margin-bottom: 14px;
  }
  .dia-text {
    font-family: var(--serif);
    font-size: 14px;
    color: var(--ink-soft);
    line-height: 1.55;
  }
  .dia-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-family: var(--serif);
    font-size: 28px;
    border-left: 1px solid rgba(201,168,106,0.18);
    border-right: 1px solid rgba(201,168,106,0.18);
    background: rgba(0,0,0,0.2);
  }

  /* ============ READING ============ */
  .reading {
    background: var(--paper);
  }
  .shelf {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-top: 1px solid rgba(201,168,106,0.18);
    border-bottom: 1px solid rgba(201,168,106,0.18);
  }
  .book {
    padding: 36px 28px 40px;
    border-right: 1px solid rgba(201,168,106,0.1);
    position: relative;
    transition: background 0.3s;
  }
  .book:last-child { border-right: none; }
  .book:hover { background: rgba(201,168,106,0.03); }
  .book-status {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.28em;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .book-status .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--gold);
  }
  .book-status.current .dot {
    background: var(--ember);
    box-shadow: 0 0 8px rgba(217,119,66,0.6);
  }
  .book-status.current { color: var(--ember); }
  .book-spine {
    height: 88px;
    margin-bottom: 22px;
    display: flex;
    align-items: flex-end;
  }
  .spine {
    width: 28px;
    height: 100%;
    margin-right: 4px;
    border-radius: 1px 1px 0 0;
    position: relative;
  }
  .spine::before {
    content: '';
    position: absolute;
    top: 12px; bottom: 12px;
    left: 4px; right: 4px;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .book h4 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 18px;
    line-height: 1.25;
    color: var(--ink);
    margin-bottom: 6px;
  }
  .book h4 .it { font-style: italic; }
  .book-author {
    font-family: var(--serif);
    font-style: italic;
    font-size: 14px;
    color: var(--ink-soft);
    margin-bottom: 16px;
  }
  .book-note {
    font-family: var(--serif);
    font-size: 13px;
    line-height: 1.5;
    color: var(--ink-faded);
    border-top: 1px dashed rgba(201,168,106,0.2);
    padding-top: 14px;
  }

  /* ============ CONTACT ============ */
  .contact {
    background: var(--paper-deep);
    padding: 140px 80px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
  }
  .contact-glyph {
    font-family: var(--frak);
    font-size: 120px;
    color: var(--gold);
    opacity: 0.18;
    line-height: 1;
    margin-bottom: 24px;
  }
  .contact h2 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(40px, 5vw, 68px);
    line-height: 1.05;
    color: var(--ink);
    margin-bottom: 24px;
    max-width: 18ch;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: -0.01em;
  }
  .contact h2 .it { font-style: italic; color: var(--gold); }
  .contact-sub {
    font-family: var(--serif);
    font-size: 19px;
    color: var(--ink-soft);
    max-width: 540px;
    margin: 0 auto 44px;
    line-height: 1.6;
  }
  .channels {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 80px;
  }

  /* ============ FOOTER ============ */
  footer.colophon {
    padding: 56px 80px 48px;
    border-top: 1px solid rgba(201,168,106,0.15);
    background: var(--paper-deep);
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 40px;
    align-items: start;
  }
  .colophon-block {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--ink-faded);
    line-height: 1.9;
    text-transform: uppercase;
  }
  .colophon-center {
    text-align: center;
    font-family: var(--serif);
    font-style: italic;
    font-size: 14px;
    color: var(--ink-soft);
    text-transform: none;
    letter-spacing: 0.02em;
  }
  .colophon-right { text-align: right; }
  .colophon a { color: var(--gold-deep); text-decoration: none; }
  .colophon a:hover { color: var(--gold); }

  /* ============ MARGINALIA ============ */
  .marginalia {
    position: absolute;
    font-family: var(--serif);
    font-style: italic;
    font-size: 13px;
    color: var(--gold-deep);
    opacity: 0.6;
    transform: rotate(-2deg);
    pointer-events: none;
    max-width: 200px;
    line-height: 1.4;
  }
  .marginalia::before {
    content: '↳';
    margin-right: 6px;
    color: var(--gold);
  }

  @media (max-width: 1100px) {
    .hero { grid-template-columns: 1fr; }
    .hero-portrait { height: 60vh; max-height: 70vh; }
    .hero-portrait img { object-position: center 25%; }
    .hero-content { padding: 80px 40px; }
    nav { padding: 18px 24px; }
    nav ul { gap: 20px; }
    section { padding: 80px 32px; }
    .section-header { grid-template-columns: 1fr; gap: 24px; }
    .pillars, .essays-grid, .shelf, .systems-layout, .dialectic-grid {
      grid-template-columns: 1fr;
    }
    .essay, .essay.featured { grid-column: span 1; grid-template-columns: 1fr; gap: 16px; }
    .dia-arrow { display: none; }
    footer.colophon { grid-template-columns: 1fr; text-align: left; }
    .colophon-center, .colophon-right { text-align: left; }
  }

/* ============ LIVING LAYER STYLES ============ */
.read-progress {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--ember));
  z-index: 200;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(217,119,66,0.6);
}

@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  a, button, .cta, .essay, .pillar, .book, .side-index li { cursor: none; }
}

@media (hover: hover) and (pointer: fine) {
  
}

@keyframes blink { 50% { opacity: 0; } }

/* Side index — bottom-right dock; no overlap with body text */
.side-index {
  position: fixed;
  right: 18px;
  bottom: 64px;
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s;
  background: rgba(14,11,8,0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(201,168,106,0.18);
  padding: 10px 14px;
}
@media (max-width: 1100px) { .side-index { display: none; } }
.side-index.show { opacity: 0.92; pointer-events: auto; }
.side-index.show:hover { opacity: 1; }
.side-index ul { list-style: none; margin: 0; padding: 0; }
.side-index li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px 0;
  cursor: pointer;
  justify-content: flex-end;
  transition: gap 0.3s;
}
.side-index li:hover { gap: 18px; }
.side-index .si-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-faded);
  min-width: 18px;
  text-align: right;
  transition: color 0.3s;
  order: 2;
}
.side-index .si-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faded);
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.3s, transform 0.3s, color 0.3s;
  order: 1;
}
.side-index li:hover .si-label,
.side-index li.active .si-label {
  opacity: 1;
  transform: translateX(0);
}
.side-index li.active .si-num,
.side-index li.active .si-label {
  color: var(--gold);
}
.side-index li::after {
  content: '';
  display: block;
  width: 18px;
  height: 1px;
  background: var(--ink-faded);
  transition: width 0.3s, background 0.3s;
  order: 3;
}
.side-index li:hover::after { width: 28px; background: var(--gold); }
.side-index li.active::after { width: 36px; background: var(--gold); }

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(.2,.7,.2,1), transform 0.9s cubic-bezier(.2,.7,.2,1);
}
.reveal.in { opacity: 1; transform: translateY(0); }

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1);
}
.reveal-stagger.in > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 0.18s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 0.31s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 0.44s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 0.57s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 0.70s; }

/* Words split for hero title */
.split-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}
.split-word > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1.1s cubic-bezier(.2,.8,.15,1);
}
.split-word.in > span { transform: translateY(0); }

/* Hero parallax targets get GPU promotion */
.hero-portrait img,
.ouroboros,
.compass {
  will-change: transform;
}

/* Diagram pulse */
.diagram svg circle.pulse-ring {
  animation: pulseRing 6s ease-in-out infinite;
  transform-origin: center;
}
.diagram svg .traveler {
  fill: var(--ember);
  filter: drop-shadow(0 0 3px rgba(217,119,66,0.8));
}
@keyframes pulseRing {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.95; }
}

/* Marginalia float-in */

/* Magnetic essay arrows polish */
.essay { transition: padding 0.5s cubic-bezier(.2,.8,.2,1), background 0.4s; }
.essay:hover { background: rgba(201,168,106,0.025); }
/* H-03: .essay agora é <a> — reset de cor/sublinhado para preservar visual */
a.essay { color: inherit; text-decoration: none; }
a.essay:hover, a.essay:focus { color: inherit; text-decoration: none; }
a.essay:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }

/* Diagram caption blinking ":" */
.live-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ember);
  margin-right: 6px;
  vertical-align: middle;
  animation: livePulse 2s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(217,119,66,0.7);
}
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

/* Subtle hover-lift on books */
.book { transition: background 0.4s, transform 0.4s; }
.book:hover { transform: translateY(-4px); }

/* Pillar glyph rotates gently on hover */
.pillar-glyph { display: inline-block; transition: transform 0.8s cubic-bezier(.2,.8,.2,1); }
.pillar:hover .pillar-glyph { transform: rotate(8deg); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal, .reveal-stagger > *, .split-word > span {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============ BLOG / SINGLE / PAGES ============ */
.single-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 160px 40px 100px;
}
.single-head {
  margin-bottom: 56px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(201,168,106,0.18);
}
.single-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--ink-faded);
  text-transform: uppercase;
  margin-bottom: 24px;
}
.single-meta .num {
  color: var(--gold);
  font-size: 22px;
  font-family: var(--serif);
  font-style: italic;
  letter-spacing: 0;
  text-transform: none;
  margin-right: 14px;
}
.single-latin {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--gold);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.single-latin::before { content: ''; width: 18px; height: 1px; background: var(--gold); }
.single-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
}
.single-title em { color: var(--gold); }
.single-body {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.single-body p { margin: 0 0 22px; }
.single-body p:first-of-type::first-letter {
  font-family: var(--frak);
  font-size: 64px;
  line-height: 0.85;
  float: left;
  padding: 6px 12px 0 0;
  color: var(--gold);
}
.single-body h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 32px;
  color: var(--ink);
  margin: 56px 0 18px;
  letter-spacing: -0.01em;
}
.single-body h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: 24px;
  color: var(--ink);
  margin: 40px 0 14px;
}
.single-body blockquote {
  border-left: 1px solid var(--gold);
  padding: 8px 0 8px 28px;
  margin: 28px 0;
  font-style: italic;
  font-size: 21px;
  color: var(--ink);
}
.single-body blockquote cite {
  display: block;
  margin-top: 12px;
  font-style: normal;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-faded);
  text-transform: uppercase;
}
.single-body a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(201,168,106,0.3);
  transition: border-color 0.2s;
}
.single-body a:hover { border-color: var(--gold); }
.single-body code {
  font-family: var(--mono);
  font-size: 14px;
  background: rgba(201,168,106,0.08);
  padding: 2px 6px;
  color: var(--gold);
}
.single-body pre {
  background: rgba(0,0,0,0.4);
  padding: 22px;
  overflow-x: auto;
  border-left: 2px solid var(--gold);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  margin: 28px 0;
}
.single-body img,
.single-body .wp-block-image {
  max-width: 100%;
  height: auto;
  margin: 36px 0;
  border: 1px solid rgba(201,168,106,0.15);
}
.single-body ul, .single-body ol {
  margin: 0 0 22px 24px;
  padding-left: 8px;
}
.single-body li { margin-bottom: 8px; }
.single-body hr {
  border: none;
  text-align: center;
  margin: 48px 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.single-foot {
  margin-top: 64px;
  padding-top: 36px;
  border-top: 1px solid rgba(201,168,106,0.18);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(201,168,106,0.18);
  margin: 80px auto 0;
  max-width: 1100px;
}
.post-nav a {
  background: var(--paper-deep);
  padding: 32px 28px;
  display: block;
  color: var(--ink-soft);
  text-decoration: none;
  transition: background 0.3s;
}
.post-nav a:hover { background: rgba(201,168,106,0.04); color: var(--ink); }
.post-nav .nav-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.post-nav .nav-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.3;
}
.post-nav .next { text-align: right; }

/* Page generic */
.page-wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 160px 40px 100px;
}
.page-wrap h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5.5vw, 68px);
  line-height: 1.05;
  margin: 0 0 48px;
  letter-spacing: -0.015em;
}

/* Archive / blog list */
.archive-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 160px 40px 100px;
}
.archive-head {
  margin-bottom: 64px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(201,168,106,0.18);
}
.archive-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.archive-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5.5vw, 68px);
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.archive-title em { color: var(--gold); }
.archive-desc {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-top: 18px;
  max-width: 640px;
}

.post-list {
  display: grid;
  gap: 0;
}
.post-card {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 40px;
  padding: 36px 0;
  border-bottom: 1px solid rgba(201,168,106,0.12);
  align-items: baseline;
  text-decoration: none;
  color: inherit;
  transition: padding 0.4s, background 0.3s;
}
.post-card:hover { padding-left: 16px; background: rgba(201,168,106,0.03); }
.post-card .pc-meta {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-faded);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1.7;
}
.post-card .pc-meta .pc-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--gold);
  letter-spacing: 0;
  text-transform: none;
  display: block;
  margin-bottom: 6px;
}
.post-card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.post-card h3 em { color: var(--gold); font-style: italic; }
.post-card p {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
}
.post-card .pc-arrow {
  color: var(--gold);
  font-family: var(--mono);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
}
.post-card:hover .pc-arrow { opacity: 1; transform: translateX(4px); }
@media (max-width: 800px) {
  .post-card { grid-template-columns: 1fr; gap: 12px; }
  .post-card .pc-arrow { display: none; }
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 64px;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 10px 16px;
  border: 1px solid rgba(201,168,106,0.2);
  color: var(--ink-soft);
  text-decoration: none;
  transition: all 0.3s;
}
.pagination a:hover { border-color: var(--gold); color: var(--gold); }
.pagination .current { background: var(--gold); color: var(--paper-deep); border-color: var(--gold); }

/* Sidebar tags / categories cloud */
.tax-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}
.tax-list a {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  text-decoration: none;
  border: 1px solid rgba(201,168,106,0.18);
  padding: 6px 12px;
  transition: all 0.3s;
}
.tax-list a:hover { color: var(--gold); border-color: var(--gold); }

/* ============ COMMENTS (walmir) ============ */
.walmir-comments {
  margin-top: 90px;
  padding-top: 48px;
  border-top: 1px solid var(--rule);
  max-width: 720px;
}
.walmir-comments-title {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: 28px;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 32px;
}
.walmir-comments-title::before {
  content: '§ ';
  color: var(--gold);
  font-style: normal;
}
.walmir-comment-list {
  list-style: none;
  margin: 0 0 56px;
  padding: 0;
}
.walmir-comment-list .children {
  list-style: none;
  margin: 18px 0 0 36px;
  padding: 0 0 0 22px;
  border-left: 1px solid var(--rule-soft);
}
.walmir-comment {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule-soft);
}
.walmir-comment:last-child { border-bottom: 0; padding-bottom: 0; }
.walmir-comment-body { padding: 0; }
.walmir-comment-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.walmir-comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  flex: 0 0 40px;
}
.walmir-comment-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.walmir-comment-author {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 16px;
  color: var(--gold);
  letter-spacing: 0;
}
.walmir-comment-time {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faded);
}
.walmir-comment-content {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  margin: 0 0 14px;
}
.walmir-comment-content p { margin: 0 0 10px; }
.walmir-comment-content a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}
.walmir-comment-content a:hover { color: var(--ink); border-color: var(--ink); }
.walmir-comment-foot {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.walmir-comment-foot a, .walmir-comment-foot .comment-reply-link {
  color: var(--ink-faded);
  text-decoration: none;
  margin-right: 12px;
}
.walmir-comment-foot a:hover { color: var(--gold); }

/* Form */
.walmir-comment-form, #commentform {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 720px;
}
.comment-reply-title, #reply-title {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: 24px;
  color: var(--ink);
  margin: 0 0 24px;
  letter-spacing: -0.01em;
}
.comment-reply-title small { font-size: 12px; margin-left: 12px; font-style: normal; }
.comment-reply-title small a { color: var(--gold); text-decoration: none; }
.walmir-form-loggedin {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-faded);
  margin-bottom: 18px;
  text-transform: uppercase;
}
.walmir-form-loggedin a, .walmir-form-loggedin strong { color: var(--gold); text-decoration: none; }
.walmir-form-loggedin strong { font-weight: 500; font-style: italic; }
.walmir-form-loggedin a:hover { color: var(--ink); }

.walmir-form-row {
  display: flex;
  flex-direction: column;
  margin: 0 0 18px;
}
.walmir-form-row label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faded);
  margin-bottom: 8px;
}
.walmir-form-row label span { color: var(--gold); }

.walmir-comment-form input[type=text],
.walmir-comment-form input[type=email],
.walmir-comment-form input[type=url],
.walmir-comment-form textarea,
#commentform input[type=text],
#commentform input[type=email],
#commentform input[type=url],
#commentform textarea {
  width: 100%;
  background: var(--shade);
  border: 1px solid var(--rule);
  padding: 12px 14px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.5;
  border-radius: 0;
  transition: border-color 0.2s;
}
.walmir-comment-form textarea, #commentform textarea {
  font-family: var(--serif);
  resize: vertical;
  min-height: 140px;
}
.walmir-comment-form input:focus,
.walmir-comment-form textarea:focus,
#commentform input:focus,
#commentform textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.walmir-comment-form input[type=submit],
.walmir-comment-form button[type=submit],
#commentform input[type=submit],
#commentform button[type=submit],
.walmir-comment-submit {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  padding: 14px 28px;
  border: 1px solid var(--gold);
  color: var(--gold);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s;
  border-radius: 0;
  margin-top: 8px;
}
#commentform input[type=submit]:hover,
.walmir-comment-form input[type=submit]:hover,
.walmir-comment-submit:hover {
  background: var(--gold);
  color: var(--paper-deep);
}

.comment-form-cookies-consent {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 18px;
}
.comment-form-cookies-consent label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faded);
}

/* ============ THEME TOGGLE ============ */
.nav-right {
  display: flex;
  align-items: center;
  gap: 0;
}
.theme-toggle {
  background: transparent;
  border: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  cursor: pointer;
  margin-left: 28px;
  transition: color 0.25s, transform 0.4s ease;
  padding: 0;
  flex: 0 0 32px;
  opacity: 0.7;
}
.theme-toggle:hover {
  color: var(--gold);
  opacity: 1;
  transform: rotate(20deg);
}
.theme-toggle svg { display: block; width: 16px; height: 16px; }
.theme-toggle .t-sun { display: none; }
.theme-toggle .t-moon { display: block; }
html[data-theme="light"] .theme-toggle .t-sun { display: block; }
html[data-theme="light"] .theme-toggle .t-moon { display: none; }
@media (max-width: 720px) {
  .theme-toggle { margin-left: 4px; width: 30px; height: 30px; flex: 0 0 30px; }
  .theme-toggle svg { width: 15px; height: 15px; }
}
@media (max-width: 900px) {
  .nav-right .theme-toggle {
    /* Float the toggle outside the slide-in mobile menu */
    position: fixed;
    top: 18px; right: 70px;
    margin-left: 0;
    z-index: 60;
  }
}

/* Search form */
.search-form {
  display: flex;
  gap: 0;
  max-width: 480px;
}
.search-form input[type=search] {
  flex: 1;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(201,168,106,0.2);
  padding: 12px 16px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
}
.search-form input[type=search]:focus { outline: none; border-color: var(--gold); }
.search-form button, .search-form input[type=submit] {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  padding: 0 22px;
  background: var(--gold);
  border: 1px solid var(--gold);
  color: var(--paper-deep);
  cursor: pointer;
}

/* Featured image on single */
.single-featured {
  margin: 0 -40px 48px;
  height: 380px;
  overflow: hidden;
  position: relative;
}
.single-featured img {
  width: 100%; height: 100%; object-fit: cover;
  filter: contrast(1.05) saturate(0.85);
}
.single-featured::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 60%, var(--paper-deep));
}

/* 404 */
.error-404 {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 40px;
}
.error-404 .glyph {
  font-family: var(--frak);
  font-size: 140px;
  color: var(--gold);
  opacity: 0.3;
  line-height: 1;
}
.error-404 h1 {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 400;
  color: var(--ink);
  margin: 24px 0 14px;
}
.error-404 p {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink-soft);
  margin-bottom: 32px;
  max-width: 520px;
}


/* ============ LIGHT THEME OVERRIDES ============ */
html[data-theme="light"] body {
  background: var(--paper-deep);
  color: var(--ink);
}
html[data-theme="light"] body::before {
  display: none; /* no grain on light */
}
html[data-theme="light"] .cursor { display: none !important; }
html[data-theme="light"] body { cursor: auto !important; }
html[data-theme="light"] a, html[data-theme="light"] button { cursor: pointer !important; }
@media (hover: hover) and (pointer: fine) {
  html[data-theme="light"] body, html[data-theme="light"] a, html[data-theme="light"] button,
  html[data-theme="light"] .cta, html[data-theme="light"] .essay, html[data-theme="light"] .pillar,
  html[data-theme="light"] .book, html[data-theme="light"] input, html[data-theme="light"] textarea {
    cursor: auto !important;
  }
  html[data-theme="light"] a, html[data-theme="light"] button { cursor: pointer !important; }
}

/* Generic anchor color in body content */
html[data-theme="light"] .single-body a,
html[data-theme="light"] .walmir-comment-content a {
  color: var(--gold);
  border-bottom-color: var(--rule);
}
html[data-theme="light"] .single-body a:hover { color: var(--ink); border-color: var(--ink); }

/* Nav background — keep dark+transparent gradient even in light theme */
html[data-theme="light"] #nav {
  background: linear-gradient(to bottom, rgba(5,4,2,0.88) 0%, rgba(5,4,2,0) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 0;
}
html[data-theme="light"] #nav.scrolled {
  background: rgba(5,4,2,0.94);
  border-bottom: 1px solid rgba(201,168,106,0.12);
}
/* Inside the dark nav, force dark-theme tokens for nav children */
html[data-theme="light"] #nav,
html[data-theme="light"] #nav a,
html[data-theme="light"] #nav .brand-name,
html[data-theme="light"] #nav .nav-menu a,
html[data-theme="light"] #nav .theme-toggle {
  color: #ede4cf;
}
html[data-theme="light"] #nav .nav-menu a:hover,
html[data-theme="light"] #nav .theme-toggle:hover {
  color: #c9a86a;
}
html[data-theme="light"] #nav .brand-name { color: #ede4cf !important; }
html[data-theme="light"] #nav .theme-toggle { color: #b3a78f; }

/* Hero gradient flip — keep portrait readable on light */
html[data-theme="light"] .hero {
  background: linear-gradient(180deg, var(--paper-deep) 0%, var(--paper) 100%);
}
html[data-theme="light"] .hero-portrait {
  background: var(--paper);
}
html[data-theme="light"] .hero-portrait::after {
  background: linear-gradient(90deg, transparent 0%, transparent 70%, var(--paper-deep) 100%);
}

/* Featured image border */
html[data-theme="light"] .single-featured img {
  filter: none;
}

/* Form input bg slightly different on light */
html[data-theme="light"] .walmir-comment-form input,
html[data-theme="light"] .walmir-comment-form textarea,
html[data-theme="light"] #commentform input,
html[data-theme="light"] #commentform textarea {
  background: rgba(60, 45, 15, 0.04);
}

/* Footer / colophon adjustments */
html[data-theme="light"] footer.colophon {
  background: var(--paper);
  color: var(--ink-soft);
}

/* Hero portrait & latin-mark always use dark-theme inks (image is always dark) */
html[data-theme="light"] .latin-mark { color: #b3a78f; }
html[data-theme="light"] .hero-meta-line { color: #c9a86a; }

/* Read progress bar */
html[data-theme="light"] .read-progress { background: linear-gradient(90deg, var(--gold) 0%, var(--ember) 100%); }

/* Theme-toggle smooth transition for body */
html { transition: background-color 0.4s ease; }
body, #nav, .hero { transition: background-color 0.4s ease, color 0.4s ease; }


/* ============ BIBLIOTECA (archive-livro) ============ */
.shelf-cta {
  display: flex;
  justify-content: center;
  margin-top: 64px;
}

.biblio-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 160px 56px 120px;
}
.biblio-head {
  margin-bottom: 56px;
  max-width: 760px;
}
.biblio-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
}
.biblio-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(48px, 6vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.022em;
  color: var(--ink);
  margin: 0 0 28px;
}
.biblio-title .it { font-style: italic; color: var(--gold); }
.biblio-lead {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-soft);
  font-style: italic;
  margin: 0;
}

.biblio-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 56px;
  padding: 0;
}
.bf-item {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faded);
  text-decoration: none;
  padding: 18px 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-right: 1px solid var(--rule-soft);
  transition: color 0.2s, background 0.2s;
}
.bf-item:last-child { border-right: 0; }
.bf-item span {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-faded);
  opacity: 0.7;
}
.bf-item:hover { color: var(--ink); }
.bf-item.is-active {
  color: var(--gold);
  background: rgba(201,168,106,0.06);
}
.bf-item.is-active span { color: var(--gold); }

.biblio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
}
.biblio-book {
  border-right: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
  padding: 28px 24px 32px;
  margin: 0;
}
.biblio-book:nth-child(4n) { border-right: 0; }
.biblio-book-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.biblio-book h4 { transition: color 0.2s; }
.biblio-book-link:hover h4 { color: var(--gold); }

.biblio-pag {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}
.bp-item a, .bp-item span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faded);
  text-decoration: none;
  padding: 12px 18px;
  display: inline-block;
  border: 1px solid transparent;
  transition: all 0.2s;
}
.bp-item a:hover { color: var(--gold); border-color: var(--rule); }
.bp-item .current {
  color: var(--gold);
  border-color: var(--gold);
}
.biblio-empty {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
  text-align: center;
  padding: 80px 0;
}

/* Single livro */
.biblio-single-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 64px;
  margin: 48px 0;
  align-items: flex-start;
}
.biblio-side .book-spine { margin: 24px 0; }
.biblio-resumo {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
  border-left: 2px solid var(--gold);
  padding: 0 0 0 18px;
  margin: 24px 0 0;
}
.biblio-back { margin-top: 48px; }

@media (max-width: 1100px) {
  .biblio-grid { grid-template-columns: repeat(3, 1fr); }
  .biblio-book:nth-child(4n) { border-right: 1px solid var(--rule-soft); }
  .biblio-book:nth-child(3n) { border-right: 0; }
}
@media (max-width: 800px) {
  .biblio-wrap { padding: 130px 28px 80px; }
  .biblio-grid { grid-template-columns: repeat(2, 1fr); }
  .biblio-book:nth-child(3n) { border-right: 1px solid var(--rule-soft); }
  .biblio-book:nth-child(2n) { border-right: 0; }
  .biblio-single-grid { grid-template-columns: 1fr; gap: 32px; }
  .biblio-side { display: flex; gap: 20px; align-items: flex-start; }
  .biblio-side .book-spine { margin: 0; flex: 0 0 96px; }
}
@media (max-width: 480px) {
  .biblio-grid { grid-template-columns: 1fr; }
  .biblio-book { border-right: 0 !important; }
  .bf-item { padding: 14px 14px; }
}


/* ============ BOOK COVER (real photo) ============ */
.book-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: var(--paper);
  margin-bottom: 24px;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    -8px 0 16px -8px rgba(0,0,0,0.5),
    8px 12px 24px -10px rgba(0,0,0,0.6);
}
.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(1.04) saturate(0.92);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.book.has-cover:hover .book-cover img,
.biblio-book.has-cover:hover .book-cover img { transform: scale(1.03); }

.book-cover::after {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 6px;
  background: linear-gradient(90deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0) 100%);
  pointer-events: none;
}

/* Single livro larger cover */
.biblio-cover {
  max-width: 220px;
  margin: 24px 0;
}

@media (max-width: 800px) {
  .biblio-side .biblio-cover { margin: 0; flex: 0 0 120px; max-width: 120px; }
}
