/* --- Centered Yellow Hero + Light Cream Body Theme --- */
:root {
  --yellow-bg: #ffe01b;           /* Official Mailchimp Yellow */
  --light-cream: #f4f1ea;         /* Soft light cream background */
  --text-dark: #241c15;           /* Rich charcoal black text */
  --card-dark: #241c15;           /* Code block dark charcoal */
  --border-color: #dcd7cd;        /* Soft subtle border */
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--light-cream) !important;
  color: var(--text-dark) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* --- Top Hero Banner Section (Centered) --- */
.hero-header {
  background-color: var(--yellow-bg);
  padding: 35px 20px 25px 20px;
  text-align: center;
}

.header-inner {
  max-width: 700px;
  margin: 0 auto;
}

.main-title {
  margin: 0 0 8px 0;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-dark) !important;
  letter-spacing: -0.01em;
}

.site-subtitle {
  color: var(--text-dark) !important;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.01em;
  opacity: 0.9;
}

/* --- Full-Width Navigation Tabs (Left Aligned) --- */
.site-tabs {
  background-color: var(--yellow-bg);
  border-bottom: 3px solid var(--text-dark);
  padding: 0;
}

.tabs-inner {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  justify-content: flex-start;
  gap: 6px;
  padding: 0 20px;
}

.tab-item {
  padding: 9px 18px;
  font-size: 0.92rem;
  color: var(--text-dark) !important;
  text-decoration: none;
  border-radius: 6px 6px 0 0;
  font-weight: 700;
  transition: all 0.2s ease;
}

.tab-item:hover {
  background-color: rgba(36, 28, 21, 0.1);
}

.tab-item.active {
  background-color: var(--text-dark);
  color: var(--yellow-bg) !important;
}

/* --- Light Cream Main Content Area --- */
.site-container {
  background-color: var(--light-cream) !important;
  max-width: 700px;
  margin: 0 auto;
  padding: 30px 20px 20px 20px;
  flex: 1 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.intro-section {
  margin-top: 10px;
}

h2 {
  font-size: 1.3rem;
  margin-top: 0;
  margin-bottom: 16px;
  color: var(--text-dark) !important;
  font-weight: 800;
  text-align: left;
}

p, li, .bio-text {
  color: var(--text-dark) !important;
  font-size: 1.05rem;
  font-weight: 500;
  margin-top: 14px;
  margin-bottom: 12px;
}

a { 
  color: var(--text-dark) !important; 
  font-weight: 700;
  text-decoration: underline; 
}

/* --- Python Code Block --- */
pre {
  background-color: var(--card-dark) !important;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 16px 0;
  overflow-x: auto;
  font-size: 0.9rem;
}

pre code, pre span {
  color: var(--yellow-bg) !important;
  font-family: SFMono-Regular, Consolas, monospace;
}

/* --- Footer (Pinned to bottom) --- */
.site-footer {
  flex-shrink: 0;
  background-color: var(--text-dark);
  color: var(--yellow-bg) !important;
  text-align: center;
  padding: 16px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  width: 100%;
  box-sizing: border-box;
  border-top: 4px solid var(--yellow-bg);
}

.site-footer p {
  color: var(--yellow-bg) !important;
  font-size: 0.85rem !important;
  margin: 0;
  line-height: 1.4;
}

/* --- External Links Section (On the light cream background below footer) --- */
.external-footer-links {
  flex-shrink: 0;
  background-color: var(--light-cream);
  text-align: center;
  padding: 12px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  border-top: 1px solid var(--border-color);
}

.external-footer-links a {
  color: var(--text-dark) !important;
  text-decoration: underline;
  font-weight: 700;
}

.external-footer-links a:hover {
  opacity: 0.7;
}

.external-footer-links .separator {
  color: var(--text-dark);
  opacity: 0.5;
}

/* Hide Jekyll theme's default top-left title if present */
.markdown-body > h1:first-child {
  display: none !important;
}

/* --- Item List Styles for Tab Pages --- */
.section-block {
  margin-bottom: 32px;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-dark) !important;
  border-bottom: 2px solid var(--text-dark);
  padding-bottom: 6px;
  margin-bottom: 16px;
}

.item-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.content-item {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border-color);
}

.content-item:last-child {
  border-bottom: none;
}

.item-link {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark) !important;
  text-decoration: underline;
  margin-right: 8px;
}

.item-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  background-color: var(--yellow-bg);
  color: var(--text-dark);
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  vertical-align: middle;
}

.item-desc {
  font-size: 0.98rem;
  color: var(--text-dark) !important;
  margin: 6px 0 0 0;
  line-height: 1.45;
}

/* --- Two-Column Page Layout & Folder Tree Sidebar --- */
.page-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* On desktop screens (768px and up), arrange side-by-side */
@media (min-width: 768px) {
  .site-container {
    max-width: 960px !important; /* Slightly wider to fit sidebar cleanly */
  }

  .page-layout {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 32px;
    align-items: start;
  }

  .sidebar-tree {
    position: sticky;
    top: 20px;
  }
}

/* Folder Tree Styling */
.tree-card {
  background-color: var(--yellow-bg);
  border: 2px solid var(--text-dark);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 3px 3px 0px var(--text-dark);
}

.tree-title {
  margin: 0 0 12px 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 2px solid var(--text-dark);
  padding-bottom: 6px;
}

.tree-list, .tree-sublist {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.tree-node {
  margin-bottom: 8px;
}

.tree-folder {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-dark);
  cursor: pointer;
  user-select: none;
  padding: 2px 0;
}

.tree-folder:hover {
  opacity: 0.8;
}

.tree-sublist {
  padding-left: 18px;
  margin-top: 4px;
}

.tree-sublist li {
  margin-bottom: 4px;
}

.tree-sublist a {
  font-size: 0.85rem;
  color: var(--text-dark) !important;
  text-decoration: none;
  font-weight: 600;
}

.tree-sublist a:hover {
  text-decoration: underline;
}

/* --- Article Content Formatting --- */
.article-content {
  line-height: 1.6;
}

.article-content h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--text-dark) !important;
}

.article-content h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-top: 28px;
  margin-bottom: 12px;
  color: var(--text-dark) !important;
}

.article-content p {
  font-size: 1.05rem;
  color: var(--text-dark) !important;
  margin-bottom: 16px;
  font-weight: 400;
}