/* TimeWalk Wiki Custom Styles */

/* Force dark mode default */
:root {
  color-scheme: dark;
}

/* Hide page title, date, and dark mode toggle on landing page */
body[data-slug="index"] .article-title,
body[data-slug="index"] .content-meta,
body[data-slug="index"] .left .page-title {
  display: none !important;
}

/* Hide dark mode toggle globally (default to dark) */
.darkmode {
  display: none !important;
}

/* Hero section — left aligned, compact */
.timewalk-hero {
  text-align: left;
  padding: 0 0 0.5rem;
}

.timewalk-logo {
  max-width: 180px;
  height: auto;
  display: block;
}

[saved-theme="dark"] .timewalk-logo,
.timewalk-logo {
  filter: brightness(1);
}

[saved-theme="light"] .timewalk-logo {
  filter: invert(1) brightness(0.3);
}

.timewalk-tagline {
  color: var(--gray);
  font-size: 0.9rem;
  margin-top: 0.2rem;
  font-style: italic;
}

/* Era Cards — 2x2 grid, compact */
.era-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
}

.era-card {
  display: block;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none !important;
  transition: transform 0.2s, box-shadow 0.2s;
  aspect-ratio: 16 / 10;
}

.era-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.era-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.era-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem 0.7rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  color: white;
}

.era-year {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  color: #ff8c00;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.era-title {
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.9;
  margin-top: 0.1rem;
}

/* Stats table compact */
.wiki-stats table {
  font-size: 0.85rem;
}

.wiki-stats th:first-child,
.wiki-stats td:first-child {
  width: 2rem;
  text-align: center;
}

/* Footer links centered */
article > p:last-child {
  text-align: center;
  color: var(--gray);
  font-size: 0.85rem;
}

/* Mobile: keep 2x2 grid but smaller */
@media (max-width: 600px) {
  .era-cards {
    gap: 0.4rem;
  }
  .era-year {
    font-size: 1rem;
  }
  .era-title {
    font-size: 0.7rem;
  }
  .era-overlay {
    padding: 0.4rem 0.5rem;
  }
  .timewalk-logo {
    max-width: 150px;
  }
}

/* Hide file dates on all pages — show description/period instead */
.content-meta time {
  display: none !important;
}

/* Also hide the "X min read" if present */
.content-meta {
  display: none !important;
}

/* Hide date and read time on all pages */
.content-meta {
  display: none !important;
}

/* Prevent duplicate heading: hide the first h1 in article body 
   since Quartz already shows article-title from frontmatter */
article > h1:first-of-type {
  display: none !important;
}
