/* --- BASE STYLES (From your original file) --- */
:root {
  --brand: #3a6ea5;
  --ink: #1f2a44;
  --muted: #5a6b8a;
  --bg: #f6f8fb;
  --sticky-top: 112px;
  --toc-offset: calc(var(--sticky-top) + 12px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  scroll-padding-top: var(--toc-offset);
}

header, nav, main, footer {
  max-width: 1100px; /* Slightly wider for the split layout */
  margin: 0 auto;
  padding: 1rem;
}

/* --- HEADER & NAV --- */
header {
  background: #fff;
  border-bottom: 4px solid var(--brand);
  padding-bottom: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

header h1 {
  margin: .2rem 0;
  font-size: 1.8rem;
  color: var(--brand);
}

header p.tagline {
  color: var(--muted);
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-style: italic;
}

nav ul {
  list-style: none;
  margin: 1rem 0 0 0;
  padding: 0;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  color: var(--ink);
  padding: .6rem 1rem;
  border-radius: .5rem .5rem 0 0; /* Tab look */
  font-weight: 600;
}

nav a:hover { background: #e6eef8; }
nav a.active { background: var(--brand); color: #fff; }

/* --- SAFETY BANNER --- */
.safety-banner {
  background: #000;
  color: #fff;
  text-align: center;
  padding: 6px;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: bold;
}

/* --- HERO SECTION (The Top Area) --- */
.hero {
  display: flex;
  align-items: center;
  gap: 3rem;
  padding: 3rem 1rem;
  background: #fff;
  border-bottom: 1px solid #dde3ee;
  margin-bottom: 2rem;
  border-radius: 0 0 12px 12px;
}

.hero-content { flex: 1; }

.hero-content h2 {
  font-size: 2.5rem;
  color: var(--brand);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.1;
}

.hero-intro {
  font-size: 1.25rem;
  color: var(--ink);
  margin-bottom: 2rem;
}

/* Hero Image styling */
.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
}

.hero-image img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.caption-box {
  position: absolute;
  bottom: 20px;
  right: -10px;
  background: rgba(255, 255, 255, 0.95);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  gap: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border: 1px solid #dde3ee;
}

/* --- LAYOUT GRID (Bio Left, Sidebar Right) --- */
.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr; /* 2/3 Main, 1/3 Sidebar */
  gap: 3rem;
  padding-bottom: 3rem;
}

/* --- MAIN COLUMN STYLES --- */
.bio-section h3 {
  color: var(--ink);
  font-size: 1.4rem;
  border-left: 5px solid var(--brand);
  padding-left: 1rem;
  margin-top: 2.5rem;
}

.bio-section p {
  font-size: 1.05rem;
  color: #333;
  margin-bottom: 1.5rem;
}

.divider {
  border: 0;
  border-top: 1px solid #dde3ee;
  margin: 3rem 0;
}

/* FORCE 2 EQUAL COLUMNS */
    .philosophy-grid { 
      display: grid; 
      grid-template-columns: 1fr 1fr; 
      gap: 1.5rem; 
    }
    
    /* Ensure mobile stacks correctly */
    @media (max-width: 768px) {
      .philosophy-grid { grid-template-columns: 1fr; } 
    }

.card {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid #dde3ee;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.card h4 {
  margin-top: 0;
  color: var(--brand);
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Post/Card image thumbnails: keep images presentable and consistent */
.card-image {
  width: 100%;
  display: block;
  max-height: 300px; /* limit large images while keeping layout tidy */
  object-fit: contain; /* show the whole image without cropping */
  background: #f6f8fb; /* neutral backdrop when aspect ratios differ */
  border-radius: 8px 8px 0 0;
}

/* Featured image variant: wider and taller, fills the card area with a strong crop */
.card-image.featured-image {
  max-height: 480px; /* larger visual impact */
  object-fit: cover; /* keep subject framed and fill the area */
  border-radius: 12px; /* slightly larger radius for featured look */
}

/* Ensure featured post-card stands out within the grid */
.post-card--featured {
  grid-column: 1 / -1; /* span full width of the available grid when grid is used */
}

/* Featured layout: wide image on the left, two stacked placeholders on the right */
.featured-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.featured-left img.featured-image {
  width: 100%;
  height: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 12px;
}

.featured-right {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.featured-right .placeholder {
  background: #eee;
  height: 220px; /* match visually with featured image height */
  display: flex;
  align-items: center;
  justify-content: center;
  color: #777;
  border-radius: 8px;
  border: 1px solid #e6eaf0;
}

@media (max-width: 768px) {
  .featured-grid { grid-template-columns: 1fr; }
  .featured-right { flex-direction: row; gap: 0.75rem; }
  .featured-right .placeholder { flex: 1; height: 140px; }
}

/* Mini-featured: image left, two thumbnails to the right (side-by-side on desktop) */
.mini-featured-grid {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 1rem;
  align-items: start;
}

.mini-left .card-image {
  width: 100%;
  height: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 10px;
}

.mini-right {
  display: flex;
  flex-direction: row; /* thumbnails side-by-side */
  gap: 0.75rem;
}

.mini-right .card-image {
  flex: 1 1 0;
  width: 100%;
  height: 160px; /* fixed thumbnail height so both images match */
  object-fit: cover;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .mini-featured-grid { grid-template-columns: 1fr; }
  .mini-right { flex-direction: column; }
  .mini-right .card-image { height: 100px; }
}

/* --- SIDEBAR STYLES --- */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-widget {
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid #dde3ee;
}

.sidebar-widget h4 {
  margin-top: 0;
  border-bottom: 2px solid #f0f4f8;
  padding-bottom: 0.5rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 1px;
}

/* Quote Widget */
.quote-widget blockquote {
  font-style: italic;
  font-size: 1.1rem;
  margin: 0;
  color: var(--ink);
  font-family: "Georgia", serif;
}

.quote-widget cite {
  display: block;
  margin-top: 0.8rem;
  font-size: 0.85rem;
  color: var(--brand);
  font-weight: bold;
  font-style: normal;
}

/* Sidebar Images */
.sidebar-img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.tiny-caption {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  font-style: italic;
  margin: 0;
}

/* Links */
.social-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.social-links a {
  text-decoration: none;
  color: var(--brand);
  font-weight: 600;
  padding: 0.3rem 0;
  border-bottom: 1px solid transparent;
}

.social-links a:hover {
  border-bottom-color: var(--brand);
}

/* --- BUTTONS --- */
.hero-actions {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  padding: 0.8rem 1.5rem;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  transition: background 0.2s;
}

.btn-primary:hover { background: #2c5480; }

.btn-secondary {
  background: transparent;
  color: var(--brand);
  border: 2px solid var(--brand);
  padding: 0.8rem 1.5rem;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
}

.btn-secondary:hover { background: #e6eef8; }

/* --- FOOTER --- */
footer {
  text-align: center;
  color: var(--muted);
  padding: 3rem 1rem;
  margin-top: 2rem;
  border-top: 1px solid #dde3ee;
}

.disclaimer {
  font-size: 0.75rem;
  opacity: 0.8;
  max-width: 600px;
  margin: 0.5rem auto 0 auto;
}

@media (max-width: 768px) {
  :root {
    --sticky-top: 88px;
    --toc-offset: calc(var(--sticky-top) + 10px);
  }
}

/* --- THE CODE PAGE STYLES --- */
.code-hero {
  background: #fff;
  padding: 3rem 2rem;
  text-align: center;
  border-bottom: 1px solid #dde3ee;
  margin-bottom: 3rem;
  border-radius: 0 0 12px 12px;
}

.code-hero h2 {
  font-size: 3rem;
  color: var(--brand);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 900;
}

.code-intro {
  font-size: 1.15rem;
  color: var(--ink);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
}

.code-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 0 1rem 3rem 1rem;
  max-width: 1100px;
  margin: 0 auto;
}

.code-principle {
  background: #fff;
  padding: 2rem 2.5rem;
  border-radius: 10px;
  border: 1px solid #dde3ee;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.2s ease;
  border-left: 4px solid var(--brand);
}

.code-principle:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(58, 110, 165, 0.12);
  border-left-width: 6px;
}

.code-principle h3 {
  font-size: 1.3rem;
  color: var(--ink);
  margin: 0 0 0.75rem 0;
  font-weight: 700;
  line-height: 1.3;
}

.code-principle p {
  font-size: 1rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

.code-footer-note {
  background: #fff;
  padding: 2rem;
  margin: 0 1rem 3rem 1rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 10px;
  border-left: 4px solid var(--brand);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.code-footer-note p {
  font-size: 1rem;
  color: var(--ink);
  margin: 0;
  line-height: 1.7;
  font-style: italic;
}

/* --- BLOG/RESEARCH GRID STYLES --- */
.blog-header {
  text-align: center;
  padding: 3rem 1rem;
  background: #fff;
  border-bottom: 1px solid #dde3ee;
  margin-bottom: 2rem;
  border-radius: 0 0 12px 12px;
}

.blog-header h2 {
  font-size: 2rem;
  color: var(--brand);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  padding-bottom: 3rem;
}

.post-card {
  background: #fff;
  border: 1px solid #dde3ee;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.card-content {
  padding: 1.5rem;
}

.card-tag {
  font-size: 0.75rem;
  font-weight: bold;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 0.5rem;
}

.card-title {
  font-size: 1.25rem;
  margin: 0 0 1rem;
  line-height: 1.3;
  color: var(--ink);
}

.card-excerpt {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 1.5rem;
}

.read-btn {
  text-decoration: none;
  color: var(--brand);
  font-weight: bold;
  font-size: 0.9rem;
}

/* --- EMPTY STATE & DISABLED CTA --- */
.empty-state-card {
  background: #fff;
  padding: 2.5rem;
  margin: 2rem 0 3rem 0;
  border-radius: 12px;
  border: 1px solid #dde3ee;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  text-align: center;
}

.empty-state-card h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1.4rem;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.empty-state-card p {
  margin: 0.25rem 0;
  color: var(--muted);
}

.empty-state-actions {
  margin-top: 1.25rem;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.disabled-cta {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  opacity: 0.8;
  cursor: not-allowed;
  user-select: none;
}

/* --- FEATURED ENTRY (Premium, readable) --- */
.featured-entry {
  background: #fff;
  border: 1px solid #dde3ee;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  margin-bottom: 2rem;
}

.featured-entry h3 {
  margin: 0 0 1rem 0;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 1.4rem;
}

.entry-body p {
  margin: 0 0 1.1rem 0;
  color: var(--ink);
  line-height: 1.8;
}

.entry-body p strong {
  color: var(--brand);
}

/* --- IRON STANDARD PAGE STYLES --- */
.iron-hero {
  background: #fff;
  padding: 3rem 2rem;
  margin-bottom: 2rem;
  border-radius: 0 0 12px 12px;
  border-bottom: 1px solid #dde3ee;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.iron-hero h2 {
  font-size: 2.5rem;
  color: var(--brand);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.iron-doctrine {
  font-size: 1.15rem;
  color: var(--ink);
  line-height: 1.8;
  margin: 0;
}

.iron-hero-image {
  width: 100%;
  max-width: 600px;
  margin: 2rem auto 0 auto;
  display: block;
  border-radius: 8px;
}

.iron-section {
  background: #fff;
  padding: 2.5rem;
  margin-bottom: 2rem;
  border-radius: 10px;
  border: 1px solid #dde3ee;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.iron-section h3 {
  font-size: 1.75rem;
  color: var(--brand);
  margin: 0 0 1rem 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 3px solid var(--brand);
  padding-bottom: 0.5rem;
}

.section-intro {
  font-size: 1.05rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 1.5rem;
}

.iron-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.iron-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #f0f4f8;
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.6;
}

.iron-list li:last-child {
  border-bottom: none;
}

.iron-principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.iron-principle-card {
  background: #f6f8fb;
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid var(--brand);
}

.iron-principle-card h4 {
  font-size: 1.1rem;
  color: var(--ink);
  margin: 0 0 0.75rem 0;
  font-weight: 700;
}

.iron-principle-card p {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

.iron-log {
  list-style: none;
  padding: 0;
  margin: 0;
}

.iron-log li {
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: #f6f8fb;
  border-radius: 6px;
  border-left: 3px solid var(--muted);
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.6;
}

.iron-log li strong {
  color: var(--brand);
  font-weight: 700;
}

/* --- FIELD NOTES PAGE STYLES --- */
.field-notes-intro {
  background: #fff;
  padding: 3rem 2rem;
  margin-bottom: 2rem;
  border-radius: 0 0 12px 12px;
  border-bottom: 1px solid #dde3ee;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.field-notes-intro h2 {
  font-size: 2.5rem;
  color: var(--brand);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.field-notes-description {
  font-size: 1.1rem;
  color: var(--ink);
  line-height: 1.8;
  margin: 0;
}

.template-card,
.categories-card {
  background: #fff;
  padding: 2.5rem;
  margin-bottom: 2rem;
  border-radius: 10px;
  border: 1px solid #dde3ee;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.template-card h3,
.categories-card h3 {
  font-size: 1.5rem;
  color: var(--brand);
  margin: 0 0 1rem 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.template-intro {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.template-structure {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.template-step {
  background: #f6f8fb;
  padding: 1.25rem;
  border-radius: 8px;
  border-left: 4px solid var(--brand);
}

.template-step strong {
  display: block;
  color: var(--brand);
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.template-step p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
}

.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-list li {
  padding: 1rem 0;
  border-bottom: 1px solid #f0f4f8;
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.6;
}

.category-list li:last-child {
  border-bottom: none;
}

.category-list strong {
  color: var(--brand);
  font-weight: 700;
}

.placeholder-image {
  height: 200px;
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-weight: bold;
  border-radius: 8px 8px 0 0;
}

/* --- RESEARCH PAGE STYLES --- */
.research-intro {
  background: #fff;
  padding: 3rem 2rem;
  margin-bottom: 2rem;
  border-radius: 0 0 12px 12px;
  border-bottom: 1px solid #dde3ee;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.research-intro h2 {
  font-size: 2.5rem;
  color: var(--brand);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.research-description {
  font-size: 1.1rem;
  color: var(--ink);
  line-height: 1.8;
  margin: 0;
}

.research-section {
  background: #fff;
  padding: 2.5rem;
  margin-bottom: 2rem;
  border-radius: 10px;
  border: 1px solid #dde3ee;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.research-section h3 {
  font-size: 1.75rem;
  color: var(--brand);
  margin: 0 0 1rem 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 3px solid var(--brand);
  padding-bottom: 0.5rem;
}

.research-questions {
  list-style: none;
  padding: 0;
  margin: 0;
}

.research-questions li {
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: #f6f8fb;
  border-radius: 6px;
  border-left: 3px solid var(--brand);
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.6;
}

.reading-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.reading-list li {
  padding: 1.25rem 0;
  border-bottom: 1px solid #f0f4f8;
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.7;
}

.reading-list li:last-child {
  border-bottom: none;
}

.reading-list strong {
  color: var(--brand);
  font-weight: 700;
}

.talks-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.talk-entry {
  background: #f6f8fb;
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid var(--brand);
}

.talk-entry h4 {
  font-size: 1.15rem;
  color: var(--ink);
  margin: 0 0 1rem 0;
  font-weight: 700;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  margin-bottom: 1rem;
  border-radius: 6px;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 6px;
}

.talk-annotation {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.talk-annotation strong {
  color: var(--brand);
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
  header {
    padding: 1rem;
  }
  
  header h1 {
    font-size: 1.5rem;
    margin-right: 50px;
  }
  
  header p.tagline {
    font-size: 0.9rem;
    margin-right: 50px;
  }
  
  .hero {
    flex-direction: column-reverse;
    text-align: center;
    padding: 2rem 1rem;
  }
  
  .hero-content h2 {
    font-size: 1.75rem;
  }
  
  .hero-intro {
    font-size: 1rem;
  }
  
  .content-grid {
    grid-template-columns: 1fr; /* Stack sidebar below content */
    gap: 2rem;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .caption-box {
    position: static; /* Simple caption on mobile */
    margin-top: 10px;
    justify-content: center;
    box-shadow: none;
    background: none;
    border: none;
  }

  .code-list {
    gap: 1rem;
    padding: 0 0.5rem 2rem 0.5rem;
  }

  .research-grid {
    grid-template-columns: 1fr;
  }

  .iron-principles {
    grid-template-columns: 1fr;
  }

  .iron-hero h2 {
    font-size: 2rem;
  }

  .iron-section {
    padding: 1.5rem;
  }

  .field-notes-intro h2,
  .research-intro h2 {
    font-size: 2rem;
  }

  .template-card,
  .categories-card,
  .research-section {
    padding: 1.5rem;
  }
}

/* === Page Photography (Archival / Authority Style) === */
.page-photo {
  margin: 3rem 0;
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #fafbfc 0%, #ffffff 100%);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.page-photo img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border: 3px solid #fff;
}

.page-photo figcaption {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 500;
}

/* === Resources Grid === */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.resource-card {
  display: block;
  text-decoration: none;
  border: 2px solid rgba(58, 110, 165, 0.15);
  border-radius: 12px;
  padding: 1.5rem;
  background: #fff;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.resource-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--brand);
  transform: scaleY(0);
  transition: transform 0.25s ease;
}

.resource-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
  box-shadow: 0 8px 20px rgba(58, 110, 165, 0.15);
}

.resource-card:hover::before {
  transform: scaleY(1);
}

.resource-card h4 {
  margin: 0 0 0.75rem 0;
  color: var(--brand);
  font-size: 1.15rem;
  font-weight: 600;
}

.resource-card p {
  margin: 0 0 1rem 0;
  color: #555;
  line-height: 1.6;
  font-size: 0.95rem;
}

.resource-meta {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* === Smooth Scrolling === */
html {
  scroll-behavior: smooth;
}

/* === Page TOC Styling === */
.page-toc {
  position: sticky;
  top: var(--toc-offset);
  z-index: 900;
  background: rgba(255,255,255,0.96);
  border: 1px solid #e6eaf0;
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  margin: 0 0 1rem 0;
  max-width: 100%;
}

.page-toc h3 { display: none; }

.page-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.page-toc li { margin: 0; }

.page-toc a {
  display: inline-block;
  padding: 0.45rem 0.75rem;
  background: #f7f9fc;
  border: 1px solid #e1e8f5;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.page-toc a:hover {
  background: #e9f1fb;
  border-color: #cfe0fa;
  color: var(--brand);
}

/* === Improved Section Styling === */
.iron-section {
  background: #ffffff;
  border-radius: 10px;
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  border-left: 4px solid var(--brand);
}

.iron-section h3 {
  color: var(--brand);
  font-size: 1.8rem;
  margin: 0 0 1.5rem 0;
  font-weight: 700;
  border-bottom: 2px solid #e8e8e8;
  padding-bottom: 0.75rem;
}

.iron-section h4 {
  color: var(--ink);
  font-size: 1.3rem;
  margin: 1.5rem 0 1rem 0;
  font-weight: 600;
}

.iron-section h5 {
  color: var(--muted);
  font-size: 1.1rem;
  margin: 1.25rem 0 0.75rem 0;
  font-weight: 600;
}

.iron-section p {
  line-height: 1.8;
  margin-bottom: 1rem;
}

.iron-section ul {
  line-height: 1.8;
  margin: 1rem 0;
}

.iron-section li {
  margin-bottom: 0.75rem;
}

/* === Research Section Polish === */
.research-section {
  background: linear-gradient(135deg, #f8f9fb 0%, #ffffff 100%);
  border-radius: 12px;
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border: 1px solid rgba(58, 110, 165, 0.15);
}

.research-section h3 {
  color: var(--brand);
  font-size: 1.9rem;
  margin: 0 0 1rem 0;
  font-weight: 700;
}

.research-section h4 {
  color: var(--ink);
  font-size: 1.4rem;
  margin: 2rem 0 1rem 0;
  font-weight: 600;
}

.section-intro {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* === Mobile Hamburger Menu === */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.75rem;
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 1001;
  -webkit-tap-highlight-color: transparent;
}

.hamburger-icon {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--brand);
  position: relative;
  transition: background 0.3s ease;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  display: block;
  width: 28px;
  height: 3px;
  background: var(--brand);
  position: absolute;
  transition: transform 0.3s ease;
}

.hamburger-icon::before {
  top: -8px;
}

.hamburger-icon::after {
  top: 8px;
}

.mobile-menu-toggle.is-active .hamburger-icon {
  background: transparent;
}

.mobile-menu-toggle.is-active .hamburger-icon::before {
  transform: rotate(45deg);
  top: 0;
}

.mobile-menu-toggle.is-active .hamburger-icon::after {
  transform: rotate(-45deg);
  top: 0;
}

/* === Sidebar Styling === */
.sidebar {
  position: sticky;
  top: var(--toc-offset);
  /* removed forced max-height/scroll to avoid sidebar scrollbar */
}

.sidebar-widget {
  background: #fff;
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.sidebar-widget h4 {
  color: var(--brand);
  font-size: 1.1rem;
  margin: 0 0 1rem 0;
  font-weight: 600;
  border-bottom: 2px solid var(--brand);
  padding-bottom: 0.5rem;
}

.sidebar-widget p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--muted);
}

.sidebar-widget ul {
  list-style: none;
  padding: 0;
}

.sidebar-widget ul li {
  margin: 0.5rem 0;
}

.sidebar-widget ul li a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s ease;
}

.sidebar-widget ul li a:hover {
  color: var(--brand);
}

/* === Main Column Spacing === */
.main-column {
  max-width: 100%;
}

/* === Content Grid Improvements === */
.content-grid {
  gap: 2rem;
  margin-top: 2rem;
}

/* === Mobile Responsive Styles === */
@media (max-width: 768px) {
  
  /* Show hamburger menu */
  .mobile-menu-toggle {
    display: block;
  }
  
  /* Hide nav by default on mobile */
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 2px solid var(--brand);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    z-index: 999;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
  }
  
  /* Show nav when toggled */
  .main-nav.is-open {
    max-height: 400px;
  }
  
  /* Stack nav items vertically */
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    margin: 0;
  }
  
  .main-nav ul li {
    border-bottom: 1px solid #eee;
  }
  
  .main-nav ul li:last-child {
    border-bottom: none;
  }
  
  .main-nav ul li a {
    display: block;
    padding: 1rem 1.5rem;
    border-radius: 0;
    font-size: 1rem;
  }
  
  .main-nav ul li a:hover,
  .main-nav ul li a:active {
    background: #f0f4f8;
  }
  
  .main-nav ul li a.active {
    background: var(--brand);
    color: #fff;
  }
  
  /* Hide sidebar on mobile */
  .sidebar {
    display: none;
  }
  
  /* Make content full-width */
  .content-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  /* Make TOC more compact on mobile */
  .page-toc { padding: 0.5rem; margin: 0 0 0.75rem 0; }
  .page-toc ul { gap: 0.4rem; }
  .page-toc a { padding: 0.5rem 0.75rem; font-size: 0.9rem; }
  
  /* Better spacing for sections */
  .iron-section {
    padding: 1.75rem 1.25rem;
  }
  
  .iron-section h3 {
    font-size: 1.5rem;
  }
  
  .research-section {
    padding: 1.75rem 1.25rem;
  }
  
  /* Resource grid single column on mobile */
  .resource-grid {
    grid-template-columns: 1fr;
  }
  
  /* Images scale better on mobile */
  .page-photo {
    padding: 1rem;
    margin: 2rem 0;
  }
  
  .page-photo img {
    max-width: 100% !important;
  }
  
  /* Hero text more compact */
  .iron-hero h2 {
    font-size: 1.8rem;
  }
  
  .iron-doctrine {
    font-size: 1rem;
  }
}