/* ================================================================
   AI MINUTE — STYLESHEET
   ================================================================ */

/* ----------------------------------------------------------------
   RESET + BASE
   ---------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Ensure [hidden] always wins over display: grid / flex */
[hidden] {
  display: none !important;
}

html {
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #1a1a1a;
  background: #fff;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}


/* ================================================================
   HEADER
   ================================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 2px solid #1a1a1a;
  height: 52px;
  flex-shrink: 0;
}

.header-inner {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 20px;
}

.site-logo {
  font-size: 31.5px;
  color: #1a1a1a;
  flex-shrink: 0;
  line-height: 1;
}

.site-logo:hover {
  text-decoration: none;
}

.logo-os {
  font-family: 'Open Sans', sans-serif;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.logo-jb {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.logo-jb-500 {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.last-updated {
  margin-left: auto;
  font-size: 12px;
  color: #999;
  white-space: nowrap;
}

/* Hamburger button — hidden on desktop */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 4px;
  margin-left: auto;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #1a1a1a;
  border-radius: 1px;
}


/* ================================================================
   MOBILE PILLS (hidden on desktop)
   ================================================================ */
.mobile-pills {
  display: none;
}


/* ================================================================
   PAGE BODY
   ================================================================ */
.page-body {
  display: flex;
  align-items: flex-start;
  width: 100%;
  min-height: calc(100vh - 52px - 44px);
}


/* ================================================================
   SIDEBAR
   ================================================================ */
.sidebar {
  width: 150px;
  min-width: 150px;
  flex-shrink: 0;
  position: sticky;
  top: 52px;
  height: calc(100vh - 52px);
  overflow-y: auto;
  border-right: 1px solid #e0e0e0;
  background: #fff;
  padding: 16px 0 24px;
  scrollbar-width: none;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

.nav-group {
  margin-bottom: 18px;
}

.nav-group-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #aaa;
  padding: 0 14px 5px;
}

.sidebar-nav ul {
  margin: 0;
}

.nav-link {
  display: block;
  padding: 5px 14px;
  font-size: 13px;
  color: #444;
  line-height: 1.35;
  border-left: 2px solid transparent;
  transition: background 0.1s;
}

.nav-link:hover {
  background: #f5f5f5;
  color: #1a1a1a;
  text-decoration: none;
}

.nav-about-link {
  display: block;
  margin-top: 18px;
  padding: 0 14px 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #aaa;
}

.nav-about-link:hover {
  color: #1a1a1a;
  text-decoration: none;
}

.nav-link.active {
  font-weight: 600;
  color: #1a1a1a;
  border-left-color: #1a1a1a;
}


/* ================================================================
   CONTENT AREA
   ================================================================ */
.content-area {
  flex: 1;
  min-width: 0; /* prevents grid blowout */
  overflow-x: hidden;
}


/* ================================================================
   3-COLUMN HOMEPAGE GRID
   ================================================================ */
.content-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
}

.col {
  padding: 20px 18px 32px;
  border-right: 1px solid #e0e0e0;
  min-width: 0;
}

.col:last-child {
  border-right: none;
}


/* ================================================================
   CONTENT SECTIONS
   ================================================================ */
.content-section {
  margin-bottom: 36px;
}

.content-section:last-child {
  margin-bottom: 0;
}

/* Section header — thick top rule, all-caps label */
.section-header {
  border-top: 3px solid #1a1a1a;
  padding-top: 7px;
  margin-bottom: 14px;
}

.section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #1a1a1a;
}

.section-title a {
  color: inherit;
  cursor: pointer;
}

/* Subtle chevron after the label signals it's clickable */
.section-title a::after {
  content: ' ›';
  letter-spacing: 0;
  opacity: 0.35;
  font-size: 0.9em;
  transition: opacity 0.15s;
}

.section-title a:hover {
  text-decoration: underline;
}

.section-title a:hover::after {
  opacity: 0.75;
}


/* "More →" link at the bottom of a capped section */
.section-more {
  margin-top: 11px;
  text-align: right;
}

.section-more-link {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: #888;
}

.section-more-link:hover {
  color: #1a1a1a;
  text-decoration: underline;
}


/* ================================================================
   FEATURED STORY (top of Col 1)
   ================================================================ */
.featured-story {
  margin-bottom: 4px;
}

.featured-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #e8e8e8;
  margin-bottom: 11px;
}

/* CSS placeholder shown when there is no real image */
.featured-img-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(145deg, #efefef 0%, #e0e0e0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 11px;
  color: #bbb;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.featured-headline {
  display: block;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 19px;
  line-height: 1.35;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 6px;
}

.featured-headline:hover {
  text-decoration: underline;
}

.featured-meta {
  font-size: 11px;
  color: #999;
}


/* ================================================================
   STORY LIST ITEMS
   ================================================================ */
.story-list {
  margin-top: 2px;
}

.story-item {
  padding: 9px 0;
  border-bottom: 1px solid #ebebeb;
}

.story-item:first-child {
  padding-top: 0;
}

.story-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.story-title {
  display: block;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 14px;
  line-height: 1.45;
  color: #1a1a1a;
  margin-bottom: 3px;
}

.story-title:hover {
  text-decoration: underline;
}

.story-meta {
  font-size: 11px;
  color: #999;
}

.story-source {
  font-weight: 500;
  color: #777;
}

.story-sep {
  margin: 0 4px;
  color: #ccc;
}


/* ================================================================
   FILTERED / SINGLE-CATEGORY VIEW
   ================================================================ */
.filter-view {
  padding: 20px 24px 32px;
}

.filter-header {
  border-top: 3px solid #1a1a1a;
  padding-top: 7px;
  margin-bottom: 20px;
}

.filter-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #1a1a1a;
}

.filter-subtitle {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #aaa;
  margin-top: 2px;
}

.filter-count {
  font-size: 11px;
  color: #999;
  margin-left: 10px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
}

/* 2-column story grid */
.filter-story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 40px;
}

.filter-col .story-item {
  padding: 11px 0;
  border-bottom: 1px solid #f0f0f0;
}
.filter-col .story-item:last-child {
  border-bottom: none;
}
.filter-col .story-title {
  font-size: 14px;
}

/* Footer row: [left spacer] [pagination center] [archive link right] */
.filter-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 28px;
  min-height: 36px;
}

.filter-footer-side {
  flex: 1;
}

.filter-footer-right {
  text-align: right;
}

/* Pagination */
.cp-pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
  flex: 0 0 auto;
}

.cp-pagination .pg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: #fff;
  color: #333;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  user-select: none;
}

.cp-pagination .pg-btn:hover:not(:disabled) {
  background: #f5f5f5;
  border-color: #bbb;
}

.cp-pagination .pg-btn.active {
  background: #1a1a1a;
  border-color: #1a1a1a;
  color: #fff;
  cursor: default;
}

.cp-pagination .pg-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.cp-pagination .pg-ellipsis {
  font-size: 12px;
  color: #aaa;
  padding: 0 2px;
  line-height: 30px;
}

/* Archive / back links */
.archive-link,
.back-to-cat {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #888;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.12s;
}

.archive-link:hover,
.back-to-cat:hover {
  color: #1a1a1a;
}

@media (max-width: 700px) {
  .filter-story-grid {
    grid-template-columns: 1fr;
  }
  .filter-footer {
    flex-direction: column;
    gap: 16px;
    align-items: center;
  }
  .filter-footer-side { text-align: center; }
}


/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
  border-top: 1px solid #e0e0e0;
  background: #fff;
  height: 44px;
  flex-shrink: 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding: 0 20px;
}

.footer-logo {
  font-size: 13px;
}

.footer-nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
}

.footer-nav a {
  font-size: 12px;
  color: #666;
}

.footer-nav a:hover {
  color: #1a1a1a;
  text-decoration: underline;
}


/* ================================================================
   MOBILE DRAWER
   ================================================================ */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.drawer-overlay.open {
  display: block;
  opacity: 1;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 82vw;
  max-width: 340px;
  height: 100dvh;
  background: #fff;
  z-index: 201;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
}

.mobile-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 52px;
  border-bottom: 1px solid #e0e0e0;
  flex-shrink: 0;
}

.drawer-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.drawer-close {
  background: none;
  border: none;
  font-size: 17px;
  cursor: pointer;
  color: #666;
  padding: 6px;
  line-height: 1;
}

.drawer-close:hover {
  color: #1a1a1a;
}

/* 2-column grid of category buttons */
.drawer-categories {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #e8e8e8;
  flex: 1;
}

.drawer-cat-btn {
  background: #fff;
  border: none;
  padding: 15px 13px;
  text-align: left;
  font-size: 13px;
  cursor: pointer;
  color: #333;
  line-height: 1.3;
  font-family: inherit;
}

.drawer-cat-btn:hover,
.drawer-cat-btn.active {
  background: #f5f5f5;
  color: #1a1a1a;
  font-weight: 600;
}


/* ================================================================
   ABOUT PAGE
   ================================================================ */
.about-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #1a1a1a;
  border-top: 3px solid #1a1a1a;
  padding-top: 7px;
  margin-bottom: 32px;
}

.about-page {
  min-height: calc(100vh - 52px - 44px);
  padding: 48px 20px 64px;
  display: flex;
  justify-content: center;
}

.about-inner {
  width: 100%;
  max-width: 580px;
}

.about-figure {
  margin: 0 0 40px;
}

.about-img {
  display: block;
  width: 100%;
  border: 1px solid #d0d0d0;
}

.about-caption {
  display: block;
  margin-top: 12px;
  font-family: 'Special Elite', serif;
  font-size: 13px;
  line-height: 1.55;
  color: #333;
}

.caption-line1 {
  display: block;
  font-family: 'Courier New', Courier, monospace;
  font-weight: 700;
  font-style: italic;
  margin-bottom: 3px;
}

.caption-line2 {
  display: block;
  font-family: 'Courier New', Courier, monospace;
  font-weight: 700;
  font-style: normal;
}

.about-copy {
  font-family: 'Special Elite', serif;
  font-size: 16px;
  line-height: 1.8;
  color: #1a1a1a;
}

.about-copy p {
  margin-bottom: 20px;
}

.about-copy p:last-child {
  margin-bottom: 0;
}


/* ================================================================
   RESPONSIVE — MOBILE  (≤ 768px)
   ================================================================ */
@media (max-width: 768px) {

  /* Header: show hamburger, hide last-updated */
  .hamburger {
    display: flex;
  }

  .last-updated {
    display: none;
  }

  /* Mobile pill row */
  .mobile-pills {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    overflow-x: auto;
    border-bottom: 1px solid #e0e0e0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    flex-shrink: 0;
  }

  .mobile-pills::-webkit-scrollbar {
    display: none;
  }

  .pill-btn {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #d0d0d0;
    background: #fff;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    color: #444;
    line-height: 1;
  }

  .pill-btn.active {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
  }

  /* Hide desktop sidebar */
  .sidebar {
    display: none;
  }

  /* Single column layout */
  .content-grid {
    grid-template-columns: 1fr;
  }

  .col {
    border-right: none;
    padding: 16px 14px 24px;
  }

  /* On mobile, featured image becomes a small thumbnail beside the headline */
  .featured-img,
  .featured-img-placeholder {
    aspect-ratio: 3 / 2;
    max-height: 200px;
  }

  .featured-headline {
    font-size: 17px;
  }

  /* Footer wraps on small screens */
  .site-footer {
    height: auto;
  }

  .footer-inner {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
  }

  .footer-nav {
    margin-left: 0;
  }

}
