/* ===================================
   NLPKB - THE VAKNIN ARCHIVE (Library Theme)
   =================================== */

@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Nunito:wght@400;500;600&display=swap");

:root {
  /* THE ONLY CHANGE: Color Palette Swap (Library Blue & Paper) */
  --primary: #1A3A5A;       /* Deep Royal Blue */
  --primary-light: #2C4F75; /* Lighter Blue */
  --primary-lighter: #779ac5; /* Even Lighter Blue */
  --secondary: #C1A25E;     /* Antique Gold (Identical to main site) */
  --secondary-light: #D4B872;
  
  --background: #FDFBF7;    /* Warm Cream / Old Paper */
  --surface: #F5F2EB;       /* Slightly darker cream */
  
  --text: #2A2A2A;          /* Soft Black */
  --text-muted: #555555;    /* Pencil Grey */
  --border: #E5E0D5;        /* Beige border */
}

/* Update body */
body {
  background: var(--background) !important;
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
}
html {
  scroll-behavior: smooth;
}

.back-to-top {
  display: inline-block;
  margin-top: 2rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.back-to-top:hover {
  border-bottom: 0px solid var(--secondary);
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6,
.hero-content h1,
.about-content h2,
.services-content h2,
.personal-text h2,
.cta-content h2,
.newsletter-box h3,
.post-title,
.archive-title {
  font-family: "Playfair Display", Georgia, serif;
}

/* ===================================
   LOGO & NAV
   =================================== */
/* Restrict logo size */
.nav img {
    max-width: 250px;
    height: auto;
}

/* Style the consultation link as a button */
.nav a[href*="contact"] {
    background: var(--primary);
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
}

/* Override PaperMod defaults */
.main {
  max-width: 100% !important;
  padding: 0 !important;
}
.white-text {
  color: white !important;
}

/* ===================================
   GLOBAL TEXT LINK STYLES (EXACT MATCH)
   =================================== */

/* Targets links in paragraphs, lists, and your specific text sections */
p a:not(.btn),
li a:not(.btn),
.stanza-line a,
.handshake-text a,
blockquote a,
.post-content a {
  color: var(--primary); /* Deep Blue */
  font-weight: 500; /* Bold */
  text-decoration: none;
  border-bottom: 2px solid var(--secondary); /* Gold Underline */
  transition: all 0.2s ease;
}

/* Hover Effect */
p a:not(.btn):hover,
li a:not(.btn):hover,
.stanza-line a:hover,
.handshake-text a:hover,
blockquote a:hover,
.post-content a:hover {
  background: var(--secondary); /* Gold Background */
  color: white; /* White Text */
  border-bottom-color: var(--secondary);
  border-radius: 2px; /* Slight rounding looks premium */
  padding: 0 4px;     /* Breathing room when filled */
  margin: 0 -4px;     /* Prevent text jump */
}

/* Target blank icon for external links 
a[target="_blank"]:after {
  content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAQElEQVR42qXKwQkAIAxDUUdxtO6/RBQkQZvSi8I/pL4BoGw/XPkh4XigPmsUgh0626AjRsgxHTkUThsG2T/sIlzdTsp52kSS1wAAAABJRU5ErkJggg==);
  margin: 0 3px 0 5px;
}
*/
/* ===================================
   STANZA LAYOUT
   =================================== */

.about-content p {
  max-width: 750px;
  margin: 0 auto;
}

.stanza-line {
  display: block;
  font-family: "Nunito", "Source Sans 3", sans-serif;
  font-size: 1.2rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 0.25rem;
}

.stanza-conclusion {
  display: block;
  font-family: "Nunito", "Source Sans 3", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.4;
}

.stanza-conclusion.first {
  margin-top: 2rem;
}

.stanza-line i,
.stanza-conclusion i {
  font-style: italic;
  font-weight: 600;
}

@media (max-width: 600px) {
  .stanza-line {
    font-size: 1.1rem;
  }
  .stanza-conclusion {
    font-size: 1.15rem;
  }
  .stanza-conclusion.first {
    margin-top: 1.5rem;
  }
}

/* ===================================
   HEADER & STICKY NAVIGATION
   =================================== */

/* Hide PaperMod default nav/footer */
.nav,
header.nav {
  display: none !important;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid transparent;
  padding: 1rem 2rem;
  transition: all 0.3s ease;
  position: absolute;
  width: 100%;
  top: 0;
  z-index: 1000;
}

.header-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-image {
  height: 50px;
  width: auto;
}

.main-menu {
  display: flex;
  gap: 2rem;
}

.main-menu a {
  color: var(--text-muted);
  font-weight: 600;
  text-decoration: none;
  font-family: "Nunito", sans-serif;
  transition: color 0.2s ease;
}

.main-menu a:hover {
  color: var(--primary);
}

.header-btn {
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  white-space: nowrap;
}

/* STICKY STATE */
.site-header.sticky {
  position: fixed;
  padding: 0.75rem 2rem;
  background: rgba(253, 251, 247, 0.95); /* Adjusted for Cream BG */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

@media (max-width: 900px) {
  .main-menu {
    display: none;
  }
  .header-actions {
    gap: 0;
  }
  .site-header {
    padding: 0.75rem 1rem;
  }
}

/* ===================================
   HERO SECTION
   =================================== */
.hero-section {
  display: flex;
  align-items: center;
  gap: 4rem;
  padding: 8rem 2rem 5rem 2rem; /* Added top padding for header */
  max-width: 1000px;
  margin: 0 auto;
}

.hero-content {
  flex: 1;
}

.hero-content h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: white !important;
}

.btn-primary:hover {
  background: var(--primary-light);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--primary) !important;
}

.btn-secondary:hover {
  background: var(--secondary-light);
}

.hero-intro {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  max-width: 600px;
}

@media (max-width: 768px) {
  .hero-section {
    flex-direction: column;
    text-align: center;
    padding-top: 6rem;
    gap: 2rem;
  }
  .hero-content h1 {
    font-size: 2rem;
  }
  .hero-buttons {
    justify-content: center;
  }
}

/* FORCE HERO IMAGE SIZE */
.hero-image {
  width: 100%;            /* Responsive width */
  max-width: 280px;       /* MATCHES MAIN SITE: Stops it from being enormous */
  height: auto;
  aspect-ratio: 3/4;      /* Keeps the portrait book ratio */
  object-fit: cover;
  border-radius: 0.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* On mobile, center it and make it smaller */
@media (max-width: 768px) {
  .hero-image {
    max-width: 200px; 
    margin: 0 auto;
  }
}
/* ===================================
   HERO IMAGE FIX (Erickson Style)
   =================================== */
.hero-image-wrapper {
  position: relative;
  flex-shrink: 0; /* Prevents squishing */
  width: 280px;   /* Fixed width like main site */
}

/* The colored square behind the photo */
.hero-image-wrapper::before {
  content: "";
  position: absolute;
  bottom: -8px;
  left: -8px;
  width: 100%;
  height: 100%;
  background: var(--secondary); /* Gold background */
  border-radius: 0.5rem;
  z-index: -1;
}

.hero-image {
  width: 100%;
  height: auto; /* Maintains aspect ratio */
  display: block;
  border-radius: 0.5rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.highlight {
  position: relative;
  display: inline-block;
  z-index: 1;
}

.highlight::before,
.highlight::after {
  content: "";
  position: absolute;
  left: -0.15em;
  right: -0.15em;
  height: 0.4em;
  background: var(--primary-lighter);
  z-index: -1;
  border-radius: 50% 40% 55% 45% / 40% 50% 50% 60%;
}

.highlight::before {
  bottom: 0.08em;
  transform: rotate(-1.5deg) scaleX(1.02);
  opacity: 0.4;
}

.highlight::after {
  bottom: 0.05em;
  transform: rotate(-0.8deg) scaleX(0.98);
  opacity: 0.6;
  border-radius: 45% 55% 50% 50% / 50% 45% 55% 50%;
}
/* Mobile Fix: Center and shrink */
@media (max-width: 768px) {
  .hero-image-wrapper {
    width: 200px;
    margin: 0 auto 2rem auto;
  }
}
/* ===================================
   SERVICES / GRID SECTION (Used for Books/Terms)
   =================================== */
.services-section {
  padding: 5rem 2rem;
  background: var(--background);
}

.services-content {
  max-width: 1000px;
  margin: 0 auto;
}

.services-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 3rem;
  text-align: center;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.service-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 2rem 1.5rem;
  transition: box-shadow 0.2s ease;
  text-decoration: none; /* For linking cards */
  display: block;
}

.service-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.service-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.service-card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* ===================================
   NEWSLETTER SECTION
   =================================== */
.newsletter-section {
  padding: 4rem 2rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.newsletter-box {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 2.5rem;
  text-align: center;
}

.newsletter-box h3 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.newsletter-form {
  display: flex;
  gap: 0.75rem;
}

.newsletter-form input[type="email"] {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  background: #fff;
  min-height: 44px;
}

.newsletter-form button {
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
}

/* ===================================
   NEWSLETTER & LIBRARY SECTION
   =================================== */
.library-section {
  padding: 5rem 2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.library-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  max-width: 1000px;
  margin: 0 auto;
  align-items: center;
}

.library-content h2 {
  font-family: "Playfair Display", serif;
  font-size: 2.25rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.library-content p {
  font-family: "Nunito", sans-serif;
  font-size: 1.1rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.library-links-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-weight: 700;
}

.library-links {
  list-style: none;
  padding: 0;
}

.library-links li {
  margin-bottom: 0.75rem;
}

.library-form-box {
  background: white;
  padding: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.library-form-label {
  display: block;
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

/* ConvertKit Form Overrides */
.formkit-form {
  width: 100%;
  box-sizing: border-box;
}

.formkit-input,
.library-input {
  width: 100%;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-family: "Nunito", sans-serif;
  font-size: 1rem;
  color: var(--text);
  background: #fff;
  transition: border 0.3s ease;
  box-sizing: border-box;
  min-height: 44px;
}

.formkit-input:focus {
  outline: none;
  border-color: var(--secondary);
}

/* Fix corrupted formkit-submit section and add rest of file */
.formkit-submit,
.library-btn {
  width: 100%;
  padding: 1rem;
  background: var(--primary) !important;
  color: white !important;
  border: none;
  border-radius: 4px;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
}

.formkit-submit:hover,
.library-btn:hover {
  background: var(--secondary) !important;
  color: var(--primary) !important;
}

.formkit-spinner {
  margin-right: 10px;
}

.formkit-spinner > div {
  background-color: white !important;
}

.formkit-alert-error {
  background: #fde8e2;
  border: 1px solid #f2643b;
  color: #ea4110;
  padding: 0.5rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  list-style: none;
  font-family: "Nunito", sans-serif;
}

/* Mobile Stack */
@media (max-width: 768px) {
  .library-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .library-form-box {
    padding: 2rem;
  }
}

/* FIX: Hide the error box when it is empty */
.formkit-alert:empty {
  display: none;
  padding: 0;
  border: none;
  margin: 0;
}
/* ===================================
   FOOTER (Custom Override)
   =================================== */
.footer {
  display: none !important;
}

.site-footer {
  background: var(--primary); /* Dark Footer */
  padding: 4rem 2rem;
  color: rgba(255,255,255,0.8);
  text-align: center;
}

.site-footer h2 {
  color: var(--secondary);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.site-footer p {
  font-size: 0.9rem;
}

.footer-bottom a {
  color: white;
  text-decoration: none;
  border-bottom: 1px solid var(--secondary);
}

/* ===================================
   POST / CONTENT STYLES
   =================================== */
.post-single {
  max-width: 700px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.post-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.3;
  margin-top: 2em;
  margin-bottom: 0.75rem;
}

.post-content {
  font-size: 1.0825rem;
  color: var(--text);
  line-height: 1.8;
}

.post-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.post-content blockquote {
  border-left: 3px solid var(--secondary);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text-muted);
}
/* ===================================
   KNOWLEDGE BASE INDEX STYLES
   =================================== */

/* 1. The Alpha Navigation (A - B - C) */
.alpha-nav {
  background: var(--surface);
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0; /* Sticks below the header */
  z-index: 900;
  text-align: center;
  backdrop-filter: blur(5px); /* Nice glass effect */
  opacity: 0.95;
}

.alpha-nav a {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  font-family: "Nunito", sans-serif;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  border-radius: 4px;
}

.alpha-nav a:hover {
  background: var(--secondary);
  color: white;
}

/* 2. The Container for Sections */
.kb-container {
  width: 100%;
}

/* 3. The Letter Section (A, B, C...) */
.kb-section {
  position: relative;
  padding: 5rem 2rem;
  overflow: hidden; /* Keeps the big letter inside */
}

/* AUTOMATIC ALTERNATING BACKGROUNDS */
/* Odd sections (A, C, E...) get the "Paper" background */
.kb-section:nth-child(odd) {
  background-color: var(--background);
}

/* Even sections (B, D, F...) get the "Surface" background (slightly darker) */
.kb-section:nth-child(even) {
  background-color: var(--surface);
}

/* 4. The Big Faded Letter */
.kb-section::before {
  content: attr(data-letter); /* Pulls the letter from HTML */
  position: absolute;
  top: -2rem;
  left: -1rem;
  font-family: "Playfair Display", serif;
  font-size: 15rem;
  font-weight: 700;
  color: var(--primary);
  opacity: 0.04; /* Very subtle fade */
  line-height: 1;
  pointer-events: none; /* Let clicks pass through */
  z-index: 0;
}

.kb-content {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  z-index: 1; /* Sits above the faded letter */
}

/* 5. The 3-Column Grid */
.kb-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 3rem; /* Row Gap, Column Gap */
}

/* Mobile: Stack to 1 column */
@media (max-width: 768px) {
  .kb-links-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: center;
  }
  
  .kb-section::before {
    font-size: 10rem;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
  }
}
/* ===================================
   SINGLE ENTRY SPLIT LAYOUT
   =================================== */
.split-entry-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 6rem 2rem;
  display: grid;
  grid-template-columns: 1fr 2fr; /* 1/3 Left, 2/3 Right */
  gap: 4rem;
  align-items: start;
}

.entry-sidebar {
  position: sticky;
  top: 8rem; /* Sticks as you scroll */
  text-align: right; /* Aligns title to the "center" of the page */
  padding-right: 2rem;
  border-right: 3px solid var(--secondary); /* The Gold Divider Line */
}

.entry-title {
  font-family: "Playfair Display", serif;
  font-size: 2.5rem; /* Large and bold */
  color: var(--primary);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.back-link {
  font-family: "Nunito", sans-serif;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
}

.back-link:hover {
  color: var(--secondary);
}

.entry-content {
  font-family: "Nunito", sans-serif;
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text);
  padding-top: 0.5rem; /* Aligns visually with the title */
}

/* Styling your markdown content */
.entry-content h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.8rem;
  color: var(--primary);
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.entry-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.entry-source-box {
  margin-top: 4rem;
  padding: 1.5rem;
  background: var(--surface);
  border-radius: 4px;
  font-size: 0.95rem;
  border-left: 3px solid var(--secondary);
}

/* Mobile: Stack them */
@media (max-width: 900px) {
  .split-entry-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .entry-sidebar {
    position: static;
    text-align: left;
    border-right: none;
    border-left: 3px solid var(--secondary);
    padding-right: 0;
    padding-left: 1.5rem;
  }
}

/* ===================================
   FOOTER - INTRO & BIO
   =================================== */
.site-footer p.footer-intro-text {
  font-family: "Nunito", sans-serif;
  font-size: 1.2rem !important;
  font-weight: 400 !important;
  color: var(--primary) !important;
  line-height: 1.4 !important;
  font-style: normal !important;
  margin-top: 1rem !important;
  margin-bottom: 1rem !important;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.7 !important;
}

.footer-cta-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  .footer-cta-buttons {
    width: 100%;
    padding: 0 1rem;
  }
  .footer-cta-buttons .btn {
    width: 100%;
    text-align: center;
  }
}
/* ===================================
   FOOTER OVERRIDE
   =================================== */
.footer {
  display: none !important;
}

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
}

.site-footer p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0;
}
/* ===================================
   BIO CARD
   =================================== */
.footer-bio-card {
  display: flex;
  background: white;
  max-width: 680px;
  margin: 0 auto 4rem auto;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  overflow: hidden;
}

.bio-image-col {
  width: 220px;
  flex-shrink: 0;
  position: relative;
}

.bio-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bio-content-col {
  padding: 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

.bio-content-col h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  color: var(--primary);
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.bio-content-col p {
  font-family: "Nunito", sans-serif;
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.bio-buttons {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.btn-sm {
  padding: 0.6rem 1.2rem !important;
  font-size: 0.9rem !important;
  border-radius: 4px !important;
}

@media (max-width: 700px) {
  .footer-bio-card {
    flex-direction: column;
    max-width: 400px;
    text-align: center;
  }
  .bio-image-col {
    width: 100%;
    height: 250px;
  }
  .bio-content-col {
    padding: 2rem 1.5rem;
    text-align: center;
  }
  .bio-buttons {
    justify-content: center;
  }
}
/* ===================================
   ARCHIVE / INDEX PAGE FIX
   =================================== */

.archive-list {
  display: flex;
  flex-direction: column;
  gap: 0; /* No gap, we use padding/borders */
}

.archive-item {
  display: flex;
  align-items: baseline; /* Aligns date with title text */
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  gap: 2rem;
}

/* 1. The Date Column */
.archive-date {
  font-family: "Nunito", monospace; /* Tech/Library feel */
  font-size: 0.85rem;
  color: var(--text-muted);
  width: 100px; /* Fixed width prevents alignment issues */
  flex-shrink: 0;
  text-align: right;
  opacity: 0.7;
}

/* 2. The Content Column */
.archive-details {
  flex: 1;
}

/* 3. The Title Link */
.archive-main-link {
  display: block;
  font-family: "Playfair Display", serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  transition: color 0.2s ease;
}

.archive-main-link:hover {
  color: var(--secondary);
}

/* 4. The Snippet */
.archive-snippet {
  font-family: "Nunito", sans-serif;
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* Mobile Fix */
@media (max-width: 600px) {
  .archive-item {
    flex-direction: column;
    gap: 0.25rem;
  }
  .archive-date {
    text-align: left;
    width: auto;
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
  }
  .archive-main-link {
    font-size: 1.25rem;
  }
}
/* ===================================
   PAGINATION CONTROLS
   =================================== */
.pagination-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 800px;
  margin: 4rem auto 0 auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-family: "Nunito", sans-serif;
}

.page-number {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.page-btn {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  color: var(--primary);
  border: 1px solid var(--border);
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  background: white;
}

.page-btn:hover {
  background: var(--secondary);
  color: white;
  border-color: var(--secondary);
}

/* Mobile Adjustment */
@media (max-width: 600px) {
  .pagination-controls {
    flex-direction: column;
    gap: 1rem;
  }
}
/* ===================================
   COMPASS SECTION
   =================================== */
.compass-section {
  padding: 5rem 2rem 6rem 2rem;
  background: var(--primary);
  text-align: center;
  color: white;
}

.compass-content h2 {
  font-family: "Nunito", sans-serif;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--secondary);
  margin-bottom: 2.5rem;
  font-weight: 700;
  opacity: 0.9;
}

.compass-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
}

.compass-link {
  font-family: "Playfair Display", serif;
  font-size: 1.75rem;
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.compass-link .arrow {
  color: var(--secondary);
  transition: transform 0.3s ease;
  display: inline-block;
}

.compass-link:hover {
  color: var(--secondary);
  opacity: 1;
}

.right-link:hover .arrow {
  transform: translateX(5px);
}

.left-link:hover .arrow {
  transform: translateX(-5px);
}

.compass-separator {
  width: 1px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 900px) {
  .compass-links {
    flex-direction: column;
    gap: 2rem;
  }
  .compass-separator {
    display: none;
  }
  .compass-link {
    font-size: 1.5rem;
  }
}
/* ===================================
   TABLE OF CONTENTS (SIDEBAR)
   =================================== */
.entry-toc {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-family: "Nunito", sans-serif;
  font-size: 0.9rem;
}

.toc-label {
  display: block;
  font-family: "Playfair Display", serif;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

/* Hugo generates a generic <nav><ul> structure */
.entry-toc nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.entry-toc nav li {
  margin-bottom: 0.5rem;
}

/* THE FIX: Override global "Gold Underline" styles */
.entry-toc nav a {
  text-decoration: none;
  color: var(--text-muted) !important; /* Force Grey */
  border-bottom: none !important;      /* KILL THE STRETCHED LINE */
  background: none !important;         /* Kill the gold box hover */
  transition: color 0.2s ease;
  display: inline-block;               /* Sit nicely as text */
  line-height: 1.4;
  font-weight: 500;
}

/* Simple text color change on hover */
.entry-toc nav a:hover {
  color: var(--secondary) !important; /* Gold Text Only */
}

/* Indent sub-headers (H3) */
.entry-toc nav ul ul {
  padding-left: 1rem;
  margin-top: 0.5rem;
  border-left: 1px solid var(--border);
}
/* DEEP LINKING ANCHORS */
.heading-anchor {
  font-size: 0.8em;
  color: var(--secondary);
  margin-left: 0.5rem;
  text-decoration: none;
  opacity: 0; /* Hidden by default */
  transition: opacity 0.2s ease;
}

h2:hover .heading-anchor,
h3:hover .heading-anchor {
  opacity: 1; /* Visible on hover */
}

/* ===================================
   SCROLL OFFSET FIX
   (Prevents sticky header from hiding titles)
   =================================== */
html {
  scroll-padding-top: 140px; /* Global fix for all scroll targets */
}

h1, h2, h3, h4, h5, h6 {
  scroll-margin-top: 140px; /* Specific fix for headers */
}