@layer base {
  /* ── Scroll Reveal ── */
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition:
      opacity 0.8s ease,
      transform 0.8s ease;
  }
  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* ── Footer ── */
  .post-footer {
    padding: 5rem 2rem;
    text-align: center;
  }
  .footer-byline {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    color: var(--gold-dim);
    letter-spacing: 0.12em;
  }
  .footer-meta {
    margin-block-start: 0.5rem;
    font-size: 0.82rem;
    color: var(--dim);
  }

  @media (max-width: 600px) {
    html {
      font-size: 16px;
    }
    .section {
      padding: 3rem 1.2rem;
    }
    .hero {
      padding: 3rem 1.2rem;
    }
    .container {
      padding: 0 1.2rem;
    }
    .crossbar-block {
      padding: 2rem 1.2rem;
    }
    .crossbar-endpoints {
      flex-direction: column;
      gap: 1rem;
    }
    .mech-grid {
      padding: 0 1.2rem;
    }
    .canvas-wrap canvas {
      block-size: 280px;
    }
    .callout,
    .case-study {
      margin-inline-start: 1.2rem;
      margin-inline-end: 1.2rem;
    }
    .jargon-tooltip::after {
      inset-block-start: calc(100% + 8px);
      inset-block-end: auto;
      inset-inline-start: 0;
      max-inline-size: calc(100vw - 4rem);
      transform: none;
    }
    .explore-btn {
      padding: 0.45rem 1rem;
      font-size: 0.62rem;
    }
  }

  /* ── Semantic Emphasis ── */
  .section .thesis {
    color: var(--gold);
  }
  .section .evidence {
    color: var(--cyan);
  }
  .section .void {
    color: var(--violet);
  }
  .section .method {
    color: var(--green);
  }
  .section em.term {
    font-style: italic;
    color: var(--cyan);
  }

  /* ── Jargon Tooltip ── */
  .jargon-tooltip {
    position: relative;
    cursor: help;
    border-block-end: 1px dotted rgba(78, 205, 196, 0.4);
  }
  .jargon-tooltip::after {
    position: absolute;
    inset-block-end: calc(100% + 8px);
    inset-inline-start: 50%;
    z-index: 50;
    inline-size: max-content;
    max-inline-size: 320px;
    padding: 0.6rem 1rem;
    font-family: "Source Serif 4", serif;
    font-size: 0.82rem;
    font-style: normal;
    line-height: 1.5;
    color: var(--text);
    white-space: normal;
    pointer-events: none;
    content: attr(data-tooltip);
    background: var(--bg-elevated);
    border: 1px solid rgba(78, 205, 196, 0.2);
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateX(-50%);
    transition: opacity 0.2s;
  }
  .jargon-tooltip:hover::after,
  .jargon-tooltip:focus::after {
    opacity: 1;
  }

  /* ── Explore with Eli ── */
  .explore-btn {
    position: relative;
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0.55rem 1.3rem;
    margin-block-start: 1.2rem;
    overflow: hidden;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.68rem;
    color: rgb(255 255 255);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    cursor: pointer;
    background: linear-gradient(135deg, rgb(240 160 80), rgb(232 112 104), rgb(176 128 208), rgb(104 152 224));
    background-size: 300% 300%;
    border: none;
    border-radius: 100px;
    box-shadow:
      0 0 16px rgba(232, 112, 104, 0.2),
      0 0 40px rgba(176, 128, 208, 0.1);
    transition:
      box-shadow 0.3s,
      filter 0.3s;
    animation:
      explore-gradient 6s ease infinite,
      explore-float 3s ease-in-out infinite;
  }
  .explore-btn::before {
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: -100%;
    inline-size: 100%;
    block-size: 100%;
    pointer-events: none;
    content: "";
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    border-radius: inherit;
    animation: explore-shimmer 4s ease-in-out infinite;
  }
  .explore-btn:hover {
    box-shadow:
      0 0 24px rgba(232, 112, 104, 0.35),
      0 0 60px rgba(176, 128, 208, 0.2);
    filter: brightness(1.15);
  }
  .explore-btn svg {
    inline-size: 14px;
    block-size: 14px;
  }
  @keyframes explore-gradient {
    0% {
      background-position: 0% 50%;
    }
    50% {
      background-position: 100% 50%;
    }
    100% {
      background-position: 0% 50%;
    }
  }
  @keyframes explore-float {
    0%,
    100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(-3px);
    }
  }
  @keyframes explore-shimmer {
    0%,
    70%,
    100% {
      inset-inline-start: -100%;
    }
    85% {
      inset-inline-start: 100%;
    }
  }
  .explore-toast {
    position: fixed;
    inset-block-end: 2rem;
    inset-inline-start: 50%;
    z-index: 200;
    max-inline-size: 400px;
    padding: 1rem 1.8rem;
    text-align: center;
    pointer-events: none;
    background: var(--bg-raised);
    border: 1px solid rgba(232, 112, 104, 0.25);
    border-radius: 10px;
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    transition:
      opacity 0.4s ease,
      transform 0.4s ease;
  }
  .explore-toast.visible {
    pointer-events: all;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  .explore-toast-title {
    margin-block-end: 0.4rem;
    font-family: "Fraunces", serif;
    font-size: 1rem;
    font-weight: 600;
    color: rgb(232 112 104);
  }
  .explore-toast-text {
    font-family: "Source Serif 4", serif;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text);
  }
}
