html {
  background: #eff1e8;
  height: 100%;
}

body {
  background: #eff1e8;
  color: #232323;
  font-family: Arial, sans-serif;
  font-size: 18px;
  line-height: 1.5;
  margin: 0;
  padding: 24px 35px;

  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =========================================
   Header / Footer
   ========================================= */
header {
  background: #eff1e8;
  border-bottom: 1px solid #232323;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
}

footer {
  background: #eff1e8;
  border-top: 1px solid #232323;
  margin-top: 5rem;
  padding-top: 1rem;
}

main {
  margin: 30px 0;
  flex: 1;
}

/* =========================================
   Links
   ========================================= */
a {
  color: #4c6679;
  text-decoration: none;
}

/* =========================================
   Site title
   ========================================= */
.site-title {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 2.5em;
}

.site-title a {
  color: #232323;
}

header nav a[aria-current="page"],
header nav a[aria-current="true"],
header nav a.active,
header nav a.ancestor {
  text-decoration: underline;
}

/* NEW: Desktop-only hover underline for header menu */
@media (min-width: 1024px) {
  header nav a:hover {
    text-decoration: underline;
    text-decoration-color: #232323;
  }
}

/* =========================================
   Post title links
   ========================================= */
.post-title a {
  color: #232323;
}

.post-title a:hover {
  color: #232323;
  text-decoration: underline;
  text-decoration-color: #232323;
}

/* =========================================
   Post Meta (Two Rows)
   ========================================= */
.post-meta {
  margin: 0.25rem 0 1rem 0;
  font-size: 0.95em;
  line-height: 1.4;
  word-break: break-word;
}

.post-item .post-meta {
  font-size: 0.8em;
}

.post-meta__row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.post-meta__row--tags {
  margin-top: 10px;
}

.post-meta .meta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.post-meta .meta-date {
  opacity: 0.9;
}

.post-meta .meta-tags a:hover {
  text-decoration: underline;
}

/* =========================================
   Post navigation (single post)
   ========================================= */
.post-nav {
  margin-top: 56px;
  display: block;
}

.post-nav__item {
  text-align: left;
  font-size: 1.15em;
  line-height: 1.35;
  margin: 0 0 10px 0;
}

.post-nav__item a:hover {
  text-decoration: underline;
}

/* =========================================
   Pagination (List pages) - clearer & standard
   ========================================= */
.pagination {
  margin-top: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* Prev/Next buttons */
.pagination__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(35, 35, 35, 0.35);
  /* border-radius: 10px; */ /* Keep commented but valid CSS */
  font-size: 0.95em;
  line-height: 1;
  color: #4c6679;
}

.pagination__btn:hover {
  border-color: rgba(35, 35, 35, 0.65);
  text-decoration: none;
}

.pagination__btn.is-disabled {
  opacity: 0.35;
  color: #232323;
  border-color: rgba(35, 35, 35, 0.2);
}

/* Page number pills */
.pagination__pages {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 auto;
}

.pagination__page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(35, 35, 35, 0.35);
  /* border-radius: 10px; */ /* Keep commented but valid CSS */
  font-size: 0.95em;
  line-height: 1;
  color: #4c6679;
}

.pagination__page:hover {
  border-color: rgba(35, 35, 35, 0.65);
  text-decoration: none;
}

.pagination__page.is-current {
  font-size: 1.4rem;
  font-weight: 700;
  color: #232323;
  border-color: rgba(35, 35, 35, 0.85);
}

/* Mobile: keep it readable */
@media (max-width: 640px) {
  .pagination {
    justify-content: center;
  }
}

/* =========================================
   Titles & headings
   ========================================= */
h1.post-title {
  margin: 56px 0 50px 0;
}

h1, h2, h3, h4, h5, h6 {
  color: #161616;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-weight: 400;
  margin: 0 0 0.75rem 0;
  line-height: 1.2;
}

h1 { font-size: 2.1em; }
h2 { font-size: 1.9em; }
h3 { font-size: 1.4em; }

/* =========================================
   Images
   ========================================= */
img {
  display: block;
  height: 150px;
  width: auto;
  margin: 0;
}

.post-item {
  margin-bottom: 4rem;
}

/* =========================================
   Figure (shortcode) - align left like normal images
   ========================================= */
.cp-figure {
  margin: 0;                 /* remove browser default figure margin */
  padding: 0;
}

.cp-figure__caption {
  margin-top: 10px;
  text-align: left;          /* caption aligns left */
  
}

/* Also neutralize default <figure> if any slipped in */
.post-content figure {
  margin: 0;
}

figure img {
  display: block;
}

figcaption {
  margin-top: 0.4rem;
  font-size: 0.8em;      /* smaller than body text */
  line-height: 1.4;
  color: #232323;
  opacity: 0.75;          /* subtle, photographic feel */
  text-align: left;
}

/* =========================================
   Responsive layout
   ========================================= */
@media (min-width: 640px) {
  html { background: #232a2d; }
  body { width: 75%; margin: 0 auto; }
}

@media (min-width: 1024px) {
  body {
    width: 55%;
    font-size: 22.5px;
    padding: 24px 60px;
  }

  img { height: 240px; width: auto; }

  .post-item { margin-bottom: 6rem; }
}

/* =========================================
   Lightbox (kept intact)
   ========================================= */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
  box-sizing: border-box;
}

.lightbox-overlay.is-open { display: flex; }

.lightbox-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 90vw;
  max-height: 90vh;
}

@media (min-width: 1024px) {
  img.is-lightbox { cursor: zoom-in; }

  img.is-lightbox:hover {
    cursor: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 64 64'>\
<g fill='none' stroke-linecap='round' stroke-linejoin='round'>\
<circle cx='28' cy='28' r='16' stroke='%23000000' stroke-width='7'/>\
<line x1='40' y1='40' x2='58' y2='58' stroke='%23000000' stroke-width='7'/>\
<line x1='28' y1='20' x2='28' y2='36' stroke='%23000000' stroke-width='7'/>\
<line x1='20' y1='28' x2='36' y2='28' stroke='%23000000' stroke-width='7'/>\
<circle cx='28' cy='28' r='16' stroke='%23ffffff' stroke-width='4'/>\
<line x1='40' y1='40' x2='58' y2='58' stroke='%23ffffff' stroke-width='4'/>\
<line x1='28' y1='20' x2='28' y2='36' stroke='%23ffffff' stroke-width='4'/>\
<line x1='20' y1='28' x2='36' y2='28' stroke='%23ffffff' stroke-width='4'/>\
</g>\
</svg>") 24 24, zoom-in;
  }
}

/* =========================================
   CSS-only attempt: disable lightbox on <1024px
   - This prevents click events from firing on images with .is-lightbox
   - No JS changes required
   ========================================= */
@media (max-width: 1023px) {
  img.is-lightbox {
    pointer-events: none;   /* disable click/tap -> no lightbox */
  }
}

/* =========================================
   Base SVG Icon Style
   ========================================= */
.icon {
  width: 26px;
  height: 26px;
  display: inline-block;
  vertical-align: middle;

  stroke: #232323;
  fill: none;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-youtube {
  width: 28px;
  height: 28px;
  stroke: none;
  fill: none;
}

/* ================================
   Archive (Year → show posts on click)
   ================================= */

/* Hide all year sections by default */
.archive-year {
  display: none;
  margin-top: 2.5rem;
}

/* Show only the targeted year section when URL has #YYYY */
.archive-year:target {
  display: block;
}

/* Optional: small spacing tweaks (keep minimal) */
.archive-years {
  margin-bottom: 1.5rem;
}
.archive-posts {
  margin-top: 0.75rem;
}

/* =========================================
   Archive post list
   - Smaller text for year-expanded posts
   ========================================= */

.archive-posts {
  font-size: 0.75em;
}

/* --- YouTube card (shortcode) --- */
.yt-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  max-width: 100%;
}

.yt-card__thumbwrap {
  position: relative;
  flex: 0 0 auto;
  width: 220px;
  max-width: 40%;
  aspect-ratio: 16 / 9; /* Force 16:9 */
  overflow: hidden;     /* Clip overflow for rounded corners */
}

.yt-card__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;    /* Fill 16:9 without distortion */
  border-radius: 12px;
  display: block;
}

.yt-card__duration {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 6px;
  font-size: 0.85rem;
  line-height: 1.2;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  border-radius: 6px;
}

.yt-card__meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.yt-card__title {
  font-family: Verdana, Arial, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #232323;
  line-height: 1.25;
  word-break: break-word;
}

.yt-card__channel {
  font-size: 0.95rem;
  color: #232323;
  opacity: 0.75;
}

.yt-card__desc {
  font-size: 0.95rem;
  color: #232323;
  opacity: 0.9;
  line-height: 1.4;
  word-break: break-word;
}

.yt-card:hover  {
  background: #ccc;
}

/* Mobile: stack vertically */
@media (max-width: 640px) {
  .yt-card {
    flex-direction: column;
    gap: 0.75rem;
  }

  .yt-card__thumbwrap {
    width: 100%;
    max-width: 100%;
  }
}

/* ==================================================
   YouTube Card (Shortcode)
   - Whole card clickable
   - Light gray background
   - 16:9 thumbnail with rounded corners
   ================================================== */

.yt-card {
  display: flex;
  gap: 18px;
  align-items: center;
  text-decoration: none;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: 18px;
}

.yt-card:hover {
  text-decoration: none;
}

.yt-card__thumb {
  flex: 0 0 auto;
  width: 320px;
  max-width: 45%;
}

.yt-card__thumb-ratio {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  display: block;
}

.yt-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Duration badge */
.yt-card__duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  font-size: 0.9rem;
  line-height: 1;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
}

/* Text column */
.yt-card__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.yt-card__title {
  font-weight: 700;
  color: inherit;
}

.yt-card__channel {
  opacity: 0.75;
}

.yt-card__desc {
  opacity: 0.85;
  line-height: 1.5;
}

/* Responsive: stack on small screens */
@media (max-width: 640px) {
  .yt-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .yt-card__thumb {
    width: 100%;
    max-width: 100%;
  }
}

/* ==================================================
   Post Meta YouTube Icon
   ================================================== */

.meta-youtube {
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
  transform: translateY(1px);
}

.icon-youtube {
  width: 22px;
  height: 22px;
}

/* =========================
   Post meta: YouTube icon (monochrome, subtle hover)
   - Controlled by front matter: youtube_url
   ========================= */

.meta-icon--youtube {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;          /* space after date */
  text-decoration: none;      /* no underline */
  color: #232323;             /* base monochrome */
  opacity: 0.85;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.meta-icon--youtube:hover {
  color: #4c6679;             /* subtle accent on hover */
  opacity: 1;
}

.icon-youtube {
  width: 1.8rem;              /* visually balanced with other icons */
  height: 1.8rem;
  display: block;
}

