@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,400..700;1,400..700&family=JetBrains+Mono:wght@400;500;700&display=swap');
@import "tailwindcss";

@theme {
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-serif: "Playfair Display", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  --color-nobel-gold: #C5A059;
}

@layer base {
  body {
    @apply font-sans bg-[#F9F8F4] text-stone-800 antialiased;
  }
}

@keyframes pulse-slow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

@keyframes scanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(-2px, -2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(2px, -2px); }
  100% { transform: translate(0); }
}

.glitch-text {
  animation: glitch 1s infinite linear alternate-reverse;
}

.scanline-effect::after {
  content: " ";
  display: block;
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  z-index: 2;
  background-size: 100% 2px, 3px 100%;
  pointer-events: none;
}

/* Print Stylesheet formatting */
@media print {
  /* Hide non-printable widgets and action elements */
  nav,
  footer,
  aside,
  button,
  .no-print,
  .floating-glossary-btn,
  .glossary-drawer,
  .interactive-viz,
  [role="button"] {
    display: none !important;
  }

  /* Reset layout constraints for paper document formatting */
  html, body {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #121210 !important;
    font-family: Georgia, serif !important;
    font-size: 11pt !important;
    line-height: 1.55 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  main {
    padding: 1.25in !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  section {
    page-break-inside: avoid;
    break-inside: avoid;
    border: none !important;
    background: transparent !important;
    padding: 1.5in 0 !important;
  }

  /* Headlines styling for print */
  h1, h2, h3, h4, h5, h6 {
    color: #000000 !important;
    page-break-after: avoid;
    break-after: avoid;
    font-family: serif !important;
    font-weight: bold !important;
  }

  h1 {
    font-size: 26pt !important;
    margin-bottom: 2rem !important;
    text-align: center !important;
  }

  h2 {
    font-size: 18pt !important;
    margin-top: 2rem !important;
    margin-bottom: 1rem !important;
    border-bottom: 1px solid #ddd !important;
    padding-bottom: 0.5rem !important;
  }

  /* Flatten all tailwind grids for print reading flow */
  .grid {
    display: block !important;
    width: 100% !important;
  }

  .col-span-1, .col-span-2, .col-span-3, .col-span-4, .col-span-5, .col-span-6, .col-span-7, .col-span-8, .col-span-9, .col-span-12 {
    width: 100% !important;
    float: none !important;
    margin: 0 0 1.5rem 0 !important;
  }

  blockquote {
    background: #fbfbfa !important;
    border-left: 4px solid #6c5e47 !important;
    padding: 1rem !important;
    margin: 1.5rem 0 !important;
    font-style: italic !important;
    page-break-inside: avoid;
  }

  p {
    margin-bottom: 1rem !important;
  }

  /* Clean print inline citation */
  span.cursor-help {
    background: none !important;
    border: none !important;
    color: #444440 !important;
    font-weight: bold !important;
  }
}
