/* ==========================================================================
   HYPERGAMOUS | THE WHITE-FIELD SYSTEM
   ========================================================================== */
:root {
  color-scheme: light;

  /* Surfaces & Whites */
  --bg-base: #FBFBFB;
  --bg-pure: #FFFFFF;
  --bg-subtle: #F6F6F8;
  --bg-wash: #EEEEF2;

  /* Glass Translucencies */
  --glass-surface: rgba(255, 255, 255, 0.82);
  --glass-surface-dense: rgba(255, 255, 255, 0.94);
  --glass-surface-subtle: rgba(255, 255, 255, 0.58);
  --glass-blur: blur(20px) saturate(180%);
  --glass-blur-sm: blur(12px) saturate(160%);

  /* High-Contrast Obsidian & Typography */
  --text-obsidian: #0A0A0C;
  --text-carbon: #1A1A1E;
  --text-secondary: #484852;
  --text-tertiary: #71717A;
  --text-muted: #A1A1AA;

  /* Subtle Borders & Rims */
  --border-delicate: rgba(10, 10, 12, 0.06);
  --border-subtle: rgba(10, 10, 12, 0.10);
  --border-glass-specular: rgba(255, 255, 255, 0.85);

  /* Liberal Soft Shadows */
  --shadow-ambient-xs: 
    0 1px 3px rgba(10, 10, 12, 0.02),
    0 2px 6px rgba(10, 10, 12, 0.02);

  --shadow-ambient-sm: 
    0 2px 8px -2px rgba(10, 10, 12, 0.03),
    0 8px 20px -4px rgba(10, 10, 12, 0.04);

  --shadow-ambient-md: 
    0 4px 16px -3px rgba(10, 10, 12, 0.03),
    0 14px 36px -4px rgba(10, 10, 12, 0.05),
    0 30px 60px -8px rgba(10, 10, 12, 0.03);

  --shadow-ambient-lg: 
    0 8px 24px -6px rgba(10, 10, 12, 0.03),
    0 24px 56px -6px rgba(10, 10, 12, 0.06),
    0 48px 96px -12px rgba(10, 10, 12, 0.04);

  /* Fonts */
  --font-serif: 'Source Serif 4', Georgia, "Times New Roman", serif;
  --font-futuristic: 'Anta', -apple-system, sans-serif;
  --font-barcode: 'Libre Barcode 39', cursive;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, monospace;
}

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

input, textarea, select {
  color-scheme: light !important;
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  caret-color: #000000 !important;
}

input::placeholder, textarea::placeholder {
  color: #8E8E93 !important;
  opacity: 1 !important;
}

input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
  color: #8E8E93 !important;
  opacity: 1 !important;
}

input::-moz-placeholder, textarea::-moz-placeholder {
  color: #8E8E93 !important;
  opacity: 1 !important;
}

body {
  background-color: var(--bg-base);
  color: var(--text-carbon);
  font-family: var(--font-sans);
  line-height: 1.7;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Subtle architectural grid pattern */
.field-pattern {
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.95) 0%, transparent 80%),
    linear-gradient(to right, rgba(10, 10, 12, 0.015) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(10, 10, 12, 0.015) 1px, transparent 1px);
  background-size: 100% 100%, 48px 48px, 48px 48px;
  pointer-events: none;
  z-index: -1;
}

/* Floating Glass Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-surface-dense);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-delicate);
  box-shadow: var(--shadow-ambient-xs);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-extended-banner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2.25rem 1.5rem 1.5rem;
  border-bottom: 1px solid var(--border-delicate);
  background: rgba(255, 255, 255, 0.88);
  overflow: hidden;
  max-height: 220px;
  opacity: 1;
  transform: translateY(0);
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.25s ease,
              padding 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease,
              transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-barcode-wrap {
  margin: 0 auto;
}

.site-header.scrolled .header-extended-banner {
  max-height: 0;
  min-height: 0;
  height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-bottom-width: 0;
  border-bottom-color: transparent;
  transform: translateY(-8px);
  pointer-events: none;
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.85rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  text-decoration: none;
  color: var(--text-obsidian);
}

.brand-icon-box {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-icon-box svg {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-title {
  font-family: var(--font-futuristic);
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  text-transform: lowercase;
  color: var(--text-obsidian);
  font-weight: 400;
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  align-items: center;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-obsidian);
}

.author-link-pill {
  font-family: var(--font-futuristic);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  padding: 0.3rem 0.75rem;
  background: var(--bg-pure);
  border: 1px solid var(--border-delicate);
  border-radius: 999px;
  box-shadow: var(--shadow-ambient-xs);
}

/* Main Container */
.main-wrapper,
.studio-wrapper {
  position: relative;
  z-index: 1;
}

.main-wrapper {
  max-width: 1080px;
  margin: 0 auto;
  padding: 3.5rem 2rem 5rem;
}

/* ==========================================================================
   MASTHEAD & EXPANDED LOGO
   ========================================================================== */
.masthead {
  text-align: center;
  margin-bottom: 4.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border-delicate);
}

.expanded-logo-container {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  max-width: 100%;
  margin-bottom: 2.25rem;
  cursor: pointer;
}

.barcode-display {
  font-family: var(--font-barcode);
  font-size: 74px;
  line-height: 0.88;
  color: var(--text-obsidian);
  user-select: none;
  letter-spacing: 0;
  white-space: nowrap;
  text-align: center;
}

.barcode-subtext-justified {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-family: var(--font-futuristic);
  font-size: 14px;
  font-weight: 400;
  text-transform: lowercase;
  color: var(--text-obsidian);
  margin-top: 8px;
  padding: 0 4px;
  box-sizing: border-box;
  user-select: none;
}

.masthead-mission {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 400;
  color: var(--text-obsidian);
  max-width: 760px;
  margin: 0 auto 1.25rem;
  line-height: 1.45;
  letter-spacing: -0.015em;
}

.masthead-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.65;
}

/* Section Header */
.section-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title-wrap h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-obsidian);
  letter-spacing: -0.02em;
}

.category-filter-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--bg-pure);
  border: 1px solid var(--border-delicate);
  border-radius: 20px;
  padding: 0.35rem 0.9rem;
  font-family: var(--font-futuristic);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-ambient-xs);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--text-obsidian);
  color: #FFFFFF;
  border-color: var(--text-obsidian);
}

/* ==========================================================================
   POSTS FEED
   ========================================================================== */
.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  margin-bottom: 5rem;
}

.post-card {
  background: var(--bg-pure);
  border: 1px solid var(--border-delicate);
  border-radius: 14px;
  padding: 2.25rem;
  box-shadow: var(--shadow-ambient-sm);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-ambient-md);
}

.post-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.post-tag {
  font-family: var(--font-futuristic);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--text-tertiary);
  background: var(--bg-subtle);
  padding: 0.2rem 0.65rem;
  border-radius: 4px;
}

.post-card-title {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--text-obsidian);
  line-height: 1.3;
  margin-bottom: 0.65rem;
  letter-spacing: -0.015em;
}

.post-card-subtitle {
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.post-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-tertiary);
  padding-top: 1rem;
  border-top: 1px solid var(--border-delicate);
}

.read-link {
  color: var(--text-obsidian);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ==========================================================================
   FULL ESSAY READING VIEW (ARTICLE MODE)
   ========================================================================== */
.reader-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(251, 251, 251, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow-y: auto;
  padding: 3rem 1.5rem;
}

.reader-modal-overlay.active {
  display: block;
}

.reader-article-card {
  background: var(--bg-pure);
  border: 1px solid var(--border-delicate);
  border-radius: 16px;
  box-shadow: var(--shadow-ambient-lg);
  max-width: 820px;
  margin: 0 auto;
  padding: 4rem 3.5rem;
  position: relative;
}

.close-reader-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.75rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-delicate);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.close-reader-btn:hover {
  background: var(--text-obsidian);
  color: #FFFFFF;
}

.epistemic-status-card {
  background: var(--glass-surface);
  backdrop-filter: var(--glass-blur-sm);
  -webkit-backdrop-filter: var(--glass-blur-sm);
  border: 1px solid var(--border-delicate);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.75rem;
  box-shadow: var(--shadow-ambient-sm);
}

.epistemic-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.epistemic-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.epistemic-body {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.prose-reading-container {
  max-width: 680px;
  margin: 0 auto;
}

.article-headline {
  font-family: var(--font-serif);
  font-size: 2.45rem;
  font-weight: 600;
  color: var(--text-obsidian);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 1.15rem;
}

.article-subhead {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2.5rem;
  font-weight: 400;
}

.axiom-callout {
  margin: 2.5rem 0;
  padding: 1.6rem 2rem;
  background: var(--bg-subtle);
  border-left: 3px solid var(--text-obsidian);
  border-radius: 0 8px 8px 0;
  box-shadow: var(--shadow-ambient-xs);
}

.axiom-callout p {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--text-obsidian);
  line-height: 1.65;
  margin-bottom: 0.5rem;
}

.axiom-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-style: normal;
}

.article-body-copy p {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  color: var(--text-carbon);
  line-height: 1.8;
  margin-bottom: 1.85rem;
}

.article-body-copy h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-obsidian);
  letter-spacing: -0.015em;
  margin: 3rem 0 1.25rem;
}

.article-body-copy ul {
  margin: 1.5rem 0 2rem 1.5rem;
}

.article-body-copy li {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  line-height: 1.75;
  margin-bottom: 0.75rem;
  color: var(--text-carbon);
}

.rubric-impact-box {
  margin-top: 3.5rem;
  padding: 2rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-delicate);
  border-radius: 12px;
  box-shadow: var(--shadow-ambient-sm);
}

.rubric-impact-header {
  font-family: var(--font-futuristic);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--text-obsidian);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.rubric-impact-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ==========================================================================
   THE RUBRIC & SHARED NOTICE BOXES
   ========================================================================== */
.rubric-section {
  margin-top: 5rem;
  padding-top: 3.5rem;
  border-top: 1px solid var(--border-delicate);
}

.notice-box {
  background: var(--bg-pure);
  border: 1px solid var(--border-delicate);
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: var(--shadow-ambient-xs);
  max-width: 760px;
}

.notice-box p {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin: 0;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-delicate);
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-family: var(--font-futuristic);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--text-tertiary);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  text-decoration: none;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--text-obsidian);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 768px) {
  .header-inner { padding: 0.85rem 1.25rem; }
  .main-wrapper { padding: 2rem 1.25rem 4rem; }
  .barcode-display { font-size: 48px; }
  .barcode-subtext-justified { font-size: 11px; }
  .masthead-mission { font-size: 1.3rem; }
  .reader-article-card { padding: 2.5rem 1.5rem; }
  .article-headline { font-size: 1.85rem; }
}
