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

@font-face {
  font-family: neuropol;
  src: url('../fonts/neuropol.woff') format('woff'),
    url('../fonts/neuropol.ttf') format('truetype');

}

.navbar-brand,
.navbar-nav li a {
  font-family: 'neuropol' !important;
  color: #1CA8DD !important;
  text-transform: lowercase !important;
}

/* Hide the navbar brand (title) by default when at the top of the homepage */
.navbar-custom.is-homepage .navbar-brand {
  opacity: 0;
  visibility: hidden;
  transition: visibility 0.5s, opacity 0.5s ease-in-out;
}

/* Show the navbar brand (title) when scrolled down on the homepage */
.navbar-custom.is-homepage.top-nav-short .navbar-brand {
  opacity: 1;
  visibility: visible;
}

/* Reduce space below title underscore (Fixed missing 'px' unit) */
.intro-header {
  margin-bottom: 5px !important;
}

/* 1. Make the subtitle font smaller */
.intro-header .page-heading .page-subheading,
.intro-header .post-heading .post-subheading {
  font-size: 20px !important;
  /* Adjust this value to your preferred size */
  font-weight: 400 !important;
  display: block;
  margin-top: 0 !important;
}

/* 2. Pull the subtitle closer to the title by reducing the margins around the separating line */
.intro-header .page-heading hr.small,
.intro-header .post-heading hr.small {
  margin-top: 10px !important;
  margin-bottom: 10px !important;
  /* Reduces the gap above the subtitle */
}

/* Optional: Affect the subtitle on the homepage post preview list */
.post-preview .post-subtitle {
  font-size: 20px !important;
  margin-top: 5px !important;
  font-weight: 400 !important;

}

.posts-list .post-preview:first-child {
  padding-top: 0 !important;
}

/* --- New: Cut spacing between posts in half --- */
.posts-list .post-preview {
  padding-top: 10px !important;
  /* Halves the default space after the line */
  padding-bottom: 10px !important;
  /* Halves the default space before the line */
}

.posts-list hr {
  margin-top: 10px !important;
  margin-bottom: 10px !important;
}

/* ---------------------------------------------- */

.intro-header .page-heading h1 {
  font-family: 'neuropol' !important;
}

/* Constrain table imagery to prevent blowing out table widths */
table img {
  max-width: 100px;
  max-height: 100px;
  width: auto;
  height: auto;
}

/* Add breathing room above headers to separate from previous sections */
h2,
h3 {
  margin-top: 1em !important;
}

/* Ensure markdown tables don't break mobile layouts horizontally */
table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 14px !important;
  /* Noticeably smaller text for desktop tables */
}

/* Tighten up general table padding for desktop */
table th,
table td {
  padding: 6px 10px !important;
  /* Reduces whitespace inside desktop cells */
}

/* --- Global Body Text Override --- */

/* Force Inter on all body text, paragraphs, and list summaries */
body,
p,
.post-entry,
.post-content,
.article-style {
  font-family: 'Inter', sans-serif !important;
  /* Standardizing line height helps Inter look its best */
  line-height: 1.6;
}

/* Ensure that any specific 'serif' classes from the theme are overridden */
.font-serif,
.serif {
  font-family: 'Inter', sans-serif !important;
}

/* --- Note / Blockquote Styling --- */

blockquote,
.markdown-alert {
  border-left: 5px solid #1CA8DD !important;
  /* Your brand blue */
  background-color: rgba(28, 168, 221, 0.08) !important;
  /* Subtle blue tint */
  padding: 10px 20px !important;
  margin: 20px 0 !important;
  border-radius: 0 10px 10px 0 !important;
  /* Soften the right corners slightly */
}

/* Shrink the font size of the text inside the note */
blockquote p,
.markdown-alert p {
  font-size: 14px !important;
}

/* If Hugo renders a specific title for the [!NOTE] */
.markdown-alert .markdown-alert-title {
  color: #1CA8DD !important;
  font-weight: 600 !important;
  margin-bottom: 8px !important;
  font-size: 15px !important;
  /* Keep the title slightly larger than the body text */
}

/* Ensure paragraphs inside the note don't have weird bottom margins */
blockquote p:last-child,
.markdown-alert p:last-child {
  margin-bottom: 0 !important;
}

/* ==========================================================================
   MOBILE OVERRIDES (MUST STAY AT THE VERY BOTTOM OF THE FILE)
   ========================================================================== */

/* Reduce font sizes on mobile devices */
@media only screen and (max-width: 767px) {
  body {
    font-size: 15px !important;
  }

  .intro-header .page-heading h1 {
    font-size: 32px !important;
  }

  .post-preview .post-title {
    font-size: 24px !important;
  }

  .post-preview .post-meta,
  .post-heading .post-meta,
  .page-meta {
    font-size: 14px !important;
  }

  /* Shrink table text and padding further for mobile */
  table {
    font-size: 12px !important;
    /* Slightly smaller again for mobile */
  }

  table th,
  table td {
    padding: 4px 6px !important;
  }

  /* Shrink the Note text slightly more for mobile */
  blockquote p,
  .markdown-alert p {
    font-size: 13px !important;
  }

  .markdown-alert .markdown-alert-title {
    font-size: 14px !important;
  }
}