/* Base reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Light mode */
:root {
  --bg-color: #f0f0f0;
  --text-color: #333;
  --card-bg: #fff;
  --card-shadow: rgba(0, 0, 0, 0.05);
  --card-shadow-hover: rgba(0, 0, 0, 0.12);
  --link-color: #5f38ff;
  --badge-bg: #eee;
  --badge-text: #333;
}

/* Dark mode overrides */
body.dark {
  --bg-color: #121212;
  --text-color: #e0e0e0;
  --card-bg: #1e1e1e;
  --card-shadow: rgba(255, 255, 255, 0.04);
  --card-shadow-hover: rgba(255, 255, 255, 0.1);
  --link-color: #8ab4f8;
  --badge-bg: #333;
  --badge-text: #ccc;
}

/* Global styles */
html {
  font-size: 16px;
  line-height: 1.6;
  font-family: system-ui, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  background-color: var(--bg-color);
  padding: 2rem;
  max-width: 1440px;
  margin: 0 auto;
}

/* Grid layout */
.grid-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  align-items: stretch;
}

/* Unified Card Styling */
.card,
.entry,
.post {
  max-width: 100%;
  width: 100%;
  padding: 2rem;
  margin: 2rem auto;
  box-sizing: border-box;
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.05),
    0 12px 24px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(0, 0, 0, 0.04);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

.card:hover,
.entry:hover,
.post:hover {
  transform: scale(1.02) translateY(-6px);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.08),
    0 24px 48px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.98);
}

/* Card Text */
.card h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.card p {
  font-size: 0.95rem;
  color: var(--text-color);
  margin: 0.5rem 0;
}

.card .meta {
  font-size: 0.8rem;
  color: #999;
  margin-bottom: 0.5rem;
}

.card .read-more {
  color: var(--link-color);
  font-weight: 500;
  margin-top: auto;
  text-decoration: none;
}

.card .read-more:hover {
  text-decoration: underline;
}

/* Animation */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.site-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Navigation */
nav {
  margin-top: 1rem;
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.nav-links a {
  margin-left: 1rem;
  text-decoration: none;
  font-weight: 500;
  color: var(--link-color);
  position: relative;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: -3px;
  left: 0;
  background-color: #5f38ff;
  transform-origin: bottom right;
  transition: transform 0.25s ease-out;
}

.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* Floating Action Button */
.fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #5f38ff;
  color: white;
  font-size: 1.5rem;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
  animation: bounce 0.3s ease;
}

@keyframes bounce {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.08);
  }

  100% {
    transform: scale(1);
  }
}

/* Tag Badges */
.badge {
  background-color: var(--badge-bg);
  color: var(--badge-text);
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  margin-right: 0.25rem;
  display: inline-block;
  font-weight: 500;
}

[class^="badge-"] {
  padding: 0.3em 0.6em;
  font-size: 0.7rem;
  border-radius: 6px;
  margin-right: 0.4rem;
  display: inline-block;
  font-weight: 500;
  vertical-align: middle;
  transition: background 0.2s ease;
  filter: brightness(1.08) saturate(1.05);
  transform: scale(1.03);
  transition: all 0.2s ease;
}

[class^="badge-"]:hover {
  filter: brightness(1.05);
}

.badge-sleep {
  background: #e0e7ff;
  color: #4338ca;
}

.badge-focus {
  background: #dcfce7;
  color: #166534;
}

.badge-brain-boosting {
  background: #fef9c3;
  color: #92400e;
}

.badge-nootropics {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-energy {
  background: #fee2e2;
  color: #b91c1c;
}

.badge-creativity {
  background: #fef2f2;
  color: #9f1239;
}

.badge-memory {
  background: #e0f2fe;
  color: #0369a1;
}

.badge-sleep-support {
  background: #ede9fe;
  color: #5b21b6;
}

/* Misc Components */
.banner {
  width: 100%;
  overflow: hidden;
  max-height: 60vh;
}

.banner img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.article-tags {
  margin-top: 1em;
  font-size: 0.9em;
  color: #666;
}

.article-tags a {
  background-color: #ff7a1f22;
  padding: 2px 6px;
  margin-right: 4px;
  border-radius: 4px;
  text-decoration: none;
}

.site-header {
  display: flex;
  justify-content: center;
  margin-top: 0.5rem;
}

.site-title-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  max-width: 1000px;
  width: 100%;
  padding: 0 1rem;
  justify-content: space-between;
}

.drip-text {
  color: #5f38ff;
  font-weight: 800;
}

.pill-text {
  background: #5f38ff;
  color: white;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  margin-left: 0.5rem;
}

/* Footer */
footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid #ddd;
  font-size: 0.875rem;
  color: #777;
  text-align: center;
}
/* Full-width article layout */
.article-page-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}

.article-full {
  width: 100%;
  max-width: 960px;
  padding: 2rem 2.5rem;
  background: var(--card-bg);
  box-shadow:
    0 2px 6px var(--card-shadow),
    0 12px 32px var(--card-shadow-hover);
  border-radius: 16px;
  animation: fadeInUp 0.6s ease forwards;
}

/* Override narrow .card/.entry styles */
.card.entry,
.entry.card,
.entry,
.card,
.post {
  max-width: none !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  background: none !important;
  border: none !important;
}