@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@400;600;700;800&display=swap');

:root {
  --oracle-accent: #0ea5e9;
  --oracle-accent-2: #38bdf8;
  --oracle-ink: #1e293b;
  --oracle-paper: rgba(255, 255, 255, 0.7);
  --oracle-panel: rgba(255, 255, 255, 0.85);
  --oracle-line: rgba(255, 255, 255, 0.4);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #e0f2fe;
  background-image: url('../images/oracle-cover.png');
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  color: var(--oracle-ink);
  min-height: 100vh;
}

main {
  position: relative;
  z-index: 1;
}

main::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.6) 100%);
  z-index: -1;
}

h1,
h2,
h3,
h4,
h5,
h6,
.article-title {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.01em;
  font-weight: 700;
  color: #0f172a;
}

a {
  text-underline-offset: 0.16em;
  transition: all 0.2s ease;
}

.prose a,
.content a {
  text-decoration-thickness: 1px;
  text-decoration-color: var(--oracle-accent);
  color: var(--oracle-accent);
  font-weight: 500;
}

.prose a:hover,
.content a:hover {
  text-decoration-thickness: 2px;
}

/* Glassmorphism Buttons */
.oracle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.8);
  color: var(--oracle-accent);
  padding: 0.55rem 1.25rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.oracle-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(14, 165, 233, 0.25);
  background: #ffffff;
}

/* Grid System */
.oracle-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* Glassmorphism Cards */
.oracle-card {
  grid-column: span 4 / span 4;
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: var(--oracle-panel);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 1.5rem;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
}

.oracle-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.8);
}

.oracle-card h3 {
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
  color: #1e293b;
}

.oracle-card p {
  color: #475569;
  line-height: 1.6;
}

.oracle-badge {
  display: inline-block;
  align-self: flex-start;
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-size: 0.75rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--oracle-accent);
  background: rgba(224, 242, 254, 0.8);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

table {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.5);
  border-radius: 0.5rem;
  overflow: hidden;
}

blockquote {
  border-left: 4px solid var(--oracle-accent);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 0 0.5rem 0.5rem 0;
  padding: 1rem 1.5rem;
  color: #334155;
  font-style: italic;
}

/* Responsiveness */
@media (max-width: 1024px) {
  .oracle-card {
    grid-column: span 6 / span 6;
  }
}

@media (max-width: 680px) {
  .oracle-card {
    grid-column: span 12 / span 12;
  }
}/* Dark Mode Overrides (Blowfish toggles the .dark class on html) */
html.dark {
  --oracle-accent: #38bdf8;
  --oracle-accent-2: #0284c7;
  --oracle-ink: #f8fafc;
  --oracle-paper: rgba(15, 23, 42, 0.75);
  --oracle-panel: rgba(15, 23, 42, 0.85);
  --oracle-line: rgba(56, 189, 248, 0.3);
}

html.dark body {
  background-color: #020617;
  color: var(--oracle-ink);
}

/* Apply a twilight night filter to the background image */
html.dark main::before {
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.6) 0%, rgba(2, 6, 23, 0.9) 100%);
  backdrop-filter: brightness(0.6) contrast(1.1) saturate(0.8);
  -webkit-backdrop-filter: brightness(0.6) contrast(1.1) saturate(0.8);
}

html.dark h1, html.dark h2, html.dark h3, html.dark h4, html.dark h5, html.dark h6, html.dark .article-title {
  color: #f1f5f9;
}

html.dark .oracle-card {
  background: var(--oracle-panel);
  border: 1px solid rgba(56, 189, 248, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

html.dark .oracle-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-color: rgba(56, 189, 248, 0.5);
}

html.dark .oracle-card h3 {
  color: #e2e8f0;
}

html.dark .oracle-card p {
  color: #94a3b8;
}

html.dark .oracle-btn {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.5);
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.1);
  color: var(--oracle-accent);
}

html.dark .oracle-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  box-shadow: 0 8px 25px rgba(56, 189, 248, 0.3), 0 0 15px rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.8);
  color: #fff;
}

html.dark .oracle-badge {
  background: rgba(2, 132, 199, 0.3);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #7dd3fc;
}

html.dark table {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(56, 189, 248, 0.2);
}

html.dark blockquote {
  background: rgba(15, 23, 42, 0.6);
  color: #cbd5e1;
}

/* Text glow inside the hero for dark mode */
html.dark .hero-text-glow {
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}
html.dark .hero-glass {
  background: rgba(15, 23, 42, 0.7) !important;
  border-color: rgba(56, 189, 248, 0.3) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6) !important;
}

/* =========================================
   PHASE 3: GLOBAL UI DEEP POLISH
   ========================================= */

/* 1. Global Header & Navigation Polishing */
header, nav, #site-header {
  background: rgba(255, 255, 255, 0.45) !important;
  backdrop-filter: blur(20px) saturate(1.5) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.5) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05) !important;
}

html.dark header, html.dark nav, html.dark #site-header {
  background: rgba(15, 23, 42, 0.55) !important;
  border-bottom: 1px solid rgba(56, 189, 248, 0.2) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5) !important;
}

/* 2. Global Footer Polishing */
footer, #site-footer {
  background: rgba(255, 255, 255, 0.3) !important;
  backdrop-filter: blur(15px) !important;
  -webkit-backdrop-filter: blur(15px) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.5) !important;
  margin-top: 4rem;
}

html.dark footer, html.dark #site-footer {
  background: rgba(15, 23, 42, 0.4) !important;
  border-top: 1px solid rgba(56, 189, 248, 0.15) !important;
}

/* 3. Deep Prose / Typography Polish for Markdown Content */
.prose {
  font-size: 1.08rem;
  line-height: 1.8;
  color: #334155;
}

html.dark .prose {
  color: #cbd5e1;
}

.prose h1, .prose h2, .prose h3, .prose h4 {
  margin-top: 2.5em;
  margin-bottom: 1em;
  color: var(--oracle-ink);
}

html.dark .prose h1, html.dark .prose h2, html.dark .prose h3, html.dark .prose h4 {
  color: #f1f5f9;
}

/* 4. Article / Post List Cards (Targeting Blowfish internal card classes) */
.article-card, .hover\:border-primary-500:hover, .bg-neutral-50, .dark\:bg-neutral-800 {
  background: var(--oracle-panel) !important;
  border: 1px solid rgba(255, 255, 255, 0.6) !important;
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.05) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-radius: 1rem !important;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

html.dark .article-card, html.dark .bg-neutral-800 {
  background: rgba(15, 23, 42, 0.7) !important;
  border-color: rgba(56, 189, 248, 0.2) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
}

.article-card:hover, .hover\:border-primary-500:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.08) !important;
  border-color: var(--oracle-accent) !important;
}

html.dark .article-card:hover {
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 15px rgba(56, 189, 248, 0.1) !important;
  border-color: rgba(56, 189, 248, 0.6) !important;
}

/* 5. Search Bar / Input Polish */
input[type="search"], input[type="text"] {
  background: rgba(255, 255, 255, 0.5) !important;
  backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02) !important;
}

html.dark input[type="search"], html.dark input[type="text"] {
  background: rgba(15, 23, 42, 0.5) !important;
  border-color: rgba(56, 189, 248, 0.3) !important;
  color: #fff !important;
}

input[type="search"]:focus, input[type="text"]:focus {
  border-color: var(--oracle-accent) !important;
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2) !important;
  background: rgba(255, 255, 255, 0.9) !important;
}

html.dark input[type="search"]:focus, html.dark input[type="text"]:focus {
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.3) !important;
  background: rgba(15, 23, 42, 0.9) !important;
}
