/* ===========================
   Global Styles
   =========================== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px; /* offset for fixed navbar */
}

body {
  margin: 0;
  font-family: 'Epunda Sans', sans-serif;
  background-color: #121212;
  color: #e0e0e0;
  line-height: 1.6;
  text-align: center;
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: #fff;
}

/* ===========================
   Navigation
   =========================== */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #1e1e1e;
  display: flex;
  justify-content: center;
  padding: 1rem 0;
  z-index: 1000;
  flex-wrap: wrap;
}

nav a {
  margin: 0 1.2rem;
  font-weight: 600;
  font-size: 1.1rem;
  color: #ddd;
}

/* Theme toggle button */
#theme-toggle {
  margin-left: 1rem;
  background-color: #222;
  color: #ddd;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

#theme-toggle:hover {
  background-color: #444;
}

/* ===========================
   Header
   =========================== */
header {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center; /* centers entire content block */
  align-items: center;     /* horizontal centering */
  background-color: #1a1a1a;
  padding: 0 20px;
  gap: 1rem;               /* uniform spacing between elements */
}

header h1 {
  font-size: 4rem;
  margin: 0;
}

header p {
  font-size: 1rem;
  color: #aaa;
  max-width: 700px;
  margin: 10px 0 2rem;
}

/* ===========================
   Sections
   =========================== */
section {
  padding: 3rem 1.5rem;
  max-width: 1000px;
  margin: 2rem auto;
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: #ddd;
}

/* ===========================
   Cards
   =========================== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  justify-items: center;
  margin-top: 1.5rem;
}

.card-wrapper {
  overflow: visible; /* allow the card to grow beyond wrapper */
}

.card {
  background-color: #1e1e1e;
  border-radius: 12px;
  padding: 1.8rem;
  min-height: 160px;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  color: #e0e0e0;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), 
              box-shadow 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.card:hover {
  transform: scale(1.05) translateY(-10px); /* 20% bigger, subtle lift */
  box-shadow: 0 12px 30px rgba(0,0,0,0.7); /* deeper shadow for emphasis */
}

.card p {
  margin: 0;
  font-size: 1rem;
}

/* ===========================
   blurb Listing
   =========================== */
.blurb-list {
  margin-top: 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.post-divider {
  border: 0;
  border-top: 1px solid #333;
  margin: 2rem 0;
}

/* ===========================
   Post Page
   =========================== */
.post-card {
  max-width: 800px;
  margin: 50px auto 4rem auto;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  text-align: left;
  background-color: #1e1e1e;
  color: #e0e0e0;
}

.post-card h1 {
  margin-bottom: 0.8rem;
  font-size: 1.6rem;
  color: #fff;
}

.post-card .post-date {
  font-size: 0.85rem;
  color: #ccc;
  margin-bottom: 1rem;
}

.post-card .post-content {
  line-height: 1.5;
  margin-top: 0.5rem;
}

.post-card a {
  color: #ddd;
}

.post-card a:hover {
  color: #fff;
}

/* ===========================
   Contact
   =========================== */
.contact {
  background-color: #181818;
  border-radius: 12px;
  padding: 2.5rem 2rem;
  margin: 4rem auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.contact a {
  display: inline-block;
  margin: 8px;
  padding: 10px 18px;
  border-radius: 6px;
  background: #222;
  color: #ddd;
  font-size: 0.95rem;
  transition: background 0.3s;
}

.contact a:hover {
  background: #333;
}

/* ===========================
   Fade-in Animations
   =========================== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   Footer
   =========================== */
footer {
  text-align: center;
  padding: 2rem;
  background-color: #1a1a1a;
  color: #aaa;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 600px) {
  header h1 { font-size: 2rem; }
  header p { font-size: 0.95rem; }
  h2 { font-size: 1.3rem; }
  .card, .post-card { padding: 1.5rem; min-height: 140px; max-width: 100%; }
  nav a { margin: 0.5rem 0.8rem; font-size: 0.95rem; }
}

/* ===========================
   Light Mode Styles
   =========================== */
body.light-mode {
  background-color: #f5f5f5;
  color: #121212; /* All text black */
}

body.light-mode header {
  background-color: #e0e0e0 !important; /* forces hero section white */
  color: #121212;                       /* text black for contrast */
}

body.light-mode nav {
  background-color: #ffffff;
}

body.light-mode section,
body.light-mode .fade-in {  /* wrapper rectangles transparent */
  background-color: transparent;
  color: #121212;
}

body.light-mode .card,
body.light-mode .post-card,
body.light-mode .contact {
  background-color: #fff; /* distinguishable from background */
  color: #121212;
}

body.light-mode h2, 
body.light-mode h1, 
body.light-mode p, 
body.light-mode a {
  color: #121212; /* override any gray */
}

body.light-mode a:hover {
  color: #000;
}

/* Toggle button slightly lighter */
body.light-mode #theme-toggle {
  background-color: #ddd;
  color: #121212;
}

body.light-mode #theme-toggle:hover {
  background-color: #bbb;
  color: #000;
}

/* Contact links */
body.light-mode .contact a {
  background-color: #e0e0e0;
  color: #121212;
}

body.light-mode .contact a:hover {
  background-color: #ccc;
}

/* blurb post date darker for readability */
body.light-mode .post-card .post-date {
  color: #444;
}

/* Scroll Progress Bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background-color: #ff9800; /* accent color */
  z-index: 2000;
  transition: width 0.1s ease-out;
}

/* ===========================
   Hero Section blurb Advertise
   =========================== */
.hero-feature {
  margin-top: 1.5rem;
  padding: 1.5rem 2.5rem;
  border-radius: 12px;
  background-color: #222;  /* same style as cards */
  color: #e0e0e0;
  font-weight: bold;
  display: inline-block;
  cursor: pointer;
  transition: transform 0.3s, background 0.3s;
}

.hero-feature:hover {
  transform: scale(1.05);
  background-color: #333;
}

.hero-feature p {
  margin: 0;
}

/* Light Mode Featured blurb */
body.light-mode .hero-feature {
  margin-top: 1.5rem;
  padding: 1.5rem 2.5rem;
  border-radius: 12px;
  background-color: #fff;  /* card-like in light mode */
  color: #121212;          /* dark text */
  font-weight: bold;
  display: inline-block;
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease;
  border: 1px solid #ccc;  /* subtle outline like gray */
}

body.light-mode .hero-feature:hover {
  transform: scale(1.05);
  background-color: #f0f0f0;  /* slightly darker on hover */
}

body.light-mode .hero-feature p {
  margin: 0;
}

/* ===========================
   blurb search (fits dark + light theme)
   =========================== */

/* blurb page title */
.blurb-title {
  margin-top: 8rem;   /* clears navbar, pushes title down */
  margin-bottom: 1rem;
  font-size: 2.2rem;
  color: #fff;
}

/* blurb search bar */
#blurb-search {
  display: block;
  margin: 1rem auto 1.5rem auto; /* spacing from title & posts */
  width: 60%; /* roughly same width as posts */
  padding: 0.5rem 0; /* minimal vertical padding */
  border: none; /* remove default rectangle */
  border-bottom: 2px solid #555; /* subtle underline */
  background: transparent; /* no background */
  color: inherit; /* text matches page color */
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s;
  text-align: left;
}

#blurb-search:focus {
  border-bottom-color: #ff9800; /* accent color */
}

/* Light mode overrides */
body.light-mode .blurb-title {
  color: #121212;
}

body.light-mode #blurb-search {
  background-color: #fff;
  color: #121212;
  border: 1px solid #ccc;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

body.light-mode #blurb-search:focus {
  border: 1px solid #ff9800;
  box-shadow: 0 0 6px rgba(255,152,0,0.3);
}

/* Mobile theme toggle button */
@media (max-width: 600px) {
  /* Hide desktop toggle in navbar */
  #theme-toggle {
    display: none;
  }

  /* Show mobile toggle at bottom-right */
  #mobile-theme-toggle {
    display: block;
    position: fixed;
    bottom: 1rem;   /* distance from bottom */
    right: 1rem;    /* distance from right */
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    border-radius: 50%;
    border: none;
    background-color: #222;
    color: #ddd;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.5);
    transition: background 0.3s, color 0.3s;
  }

  #mobile-theme-toggle:hover {
    background-color: #444;
  }
}

/* Hide mobile button on desktop */
@media (min-width: 601px) {
  #mobile-theme-toggle {
    display: none;
  }
}

/* ===========================
   blurb Search Bar
   =========================== */
.blurb-title {
  margin-top: 8rem;   /* clears navbar, pushes title down */
  margin-bottom: 1rem;
  font-size: 2.2rem;
  color: #fff;
}

#blurb-search {
  width: 65%;               /* slightly wider */
  max-width: 480px;
  padding: 0.6rem 1rem;
  margin: 0 auto 2rem;      /* space below title */
  display: block;
  border-radius: 10px;
  border: 1px solid #444;
  background-color: #1e1e1e;
  color: #e0e0e0;
  font-size: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  transition: all 0.3s ease;
}

#blurb-search:focus {
  outline: none;
  border: 2px solid #888;  /* gray embolden on focus */
  box-shadow: 0 0 8px rgba(136,136,136,0.4);
  transform: scale(1.02);
}

/* Light mode overrides */
body.light-mode .blurb-title {
  color: #121212;
}

body.light-mode #blurb-search {
  background-color: #fff;
  color: #121212;
  border: 1px solid #ccc;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

body.light-mode #blurb-search:focus {
  border: 2px solid #888;
  box-shadow: 0 0 8px rgba(136,136,136,0.3);
  transform: scale(1.02);
}

/* Optional: subtle hover effect */
#blurb-search:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

/* Base flair style */
.post-tags {
  margin-top: 1em;
}

.post-tags .tag {
  display: inline-block;
  padding: 0.25em 0.65em;
  margin: 0.15em 0.15em 0.15em 0;
  font-size: 0.85em;
  font-weight: 600;
  line-height: 1.2;
  color: #ffffff;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

/* Hover effect */
.post-tags .tag:hover {
  transform: scale(1.05);
  filter: brightness(0.9);
}

/* Tag-specific colors */
.tag-personal { background-color: #ff4500; }
.tag-politics { background-color: #0079d3; }
.tag-philosophy { background-color: #46d160; }
.tag-religion { background-color: #ffb000; }
.tag-review { background-color: #d4a017; }
.tag-technology { background-color: #6e6e6e; }
.tag-experimental { background-color: #ff66cc; }

/* Add more tag-* classes as needed */
