/* ===== Hero: two-column ===== */
.home-hero { position: relative; overflow: hidden; padding: var(--space-xl) var(--space-md); }
.hero-grid-bg {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--border-hair) 1px, transparent 1px), linear-gradient(90deg, var(--border-hair) 1px, transparent 1px);
  background-size: 44px 44px;
  animation: gridDrift 18s linear infinite;
  mask-image: radial-gradient(circle at 30% 40%, black, transparent 75%);
}
@keyframes gridDrift { from { background-position: 0 0; } to { background-position: 44px 44px; } }

.hero-columns {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.hero-left h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: var(--space-md); }
.hero-subtitle { color: var(--text-muted); font-size: 1.05rem; margin-bottom: var(--space-lg); max-width: 540px; }
.hero-buttons { display: flex; gap: 1rem; margin-bottom: var(--space-lg); flex-wrap: wrap; }
.btn-secondary { background: transparent; border: 1px solid var(--accent-gold); color: var(--accent-gold); }
.btn-secondary:hover { background: rgba(255,184,77,0.1); }

.hero-stats { display: flex; gap: var(--space-lg); flex-wrap: wrap; }
.stat-item { display: flex; flex-direction: column; }
.stat-value { font-size: 1.4rem; font-weight: 700; color: var(--accent-gold); font-family: var(--font-heading); }
.stat-label { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); }

.hero-right { position: relative; display: flex; align-items: center; justify-content: center; }
.hero-image-glow {
  position: absolute; inset: -10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,184,77,0.15), transparent 70%);
  animation: pulseGlow 4s ease-in-out infinite;
}
@keyframes pulseGlow { 0%,100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.08); opacity: 1; } }
.hero-image {
  position: relative;
  width: 100%; max-width: 380px; aspect-ratio: 1/1; object-fit: contain;
  border-radius: 16px;
  animation: floatImg 5s ease-in-out infinite;
}
@keyframes floatImg { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* ===== Universal search ===== */
.universal-search-section { max-width: 640px; margin: 0 auto; padding: var(--space-lg) var(--space-md); position: relative; }
#universalSearch {
  width: 100%; padding: 0.9rem 1.2rem;
  background: var(--bg-panel); border: 1px solid var(--border-hair); border-radius: 8px;
  color: var(--text-main); font-size: 0.95rem;
}
#universalSearch:focus { outline: none; border-color: var(--accent-gold); }
.search-results {
  position: absolute; top: 100%; left: var(--space-md); right: var(--space-md);
  background: var(--bg-panel); border: 1px solid var(--border-hair); border-radius: 8px;
  margin-top: 0.4rem; max-height: 320px; overflow-y: auto; display: none; z-index: 50;
}
.search-results.active { display: block; }
.search-result-item { display: flex; justify-content: space-between; padding: 0.7rem 1rem; border-bottom: 1px solid var(--border-hair); font-size: 0.9rem; }
.search-result-item:hover { background: rgba(255,184,77,0.06); }
.search-result-type { font-family: var(--font-mono); font-size: 0.7rem; color: var(--accent-gold); text-transform: uppercase; }

/* ===== Shared section spacing ===== */
.home-section { max-width: var(--max-width); margin: 0 auto; padding: var(--space-xl) var(--space-md); }
.home-section h2 { font-size: 1.6rem; margin-bottom: var(--space-lg); text-align: center; }
.view-all-wrap { text-align: center; margin-top: var(--space-lg); }
.view-all-link { font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent-gold); border-bottom: 1px solid var(--accent-gold); padding-bottom: 2px; }

/* ===== Featured Topics ===== */
.topics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
.topic-card {
  background: var(--bg-panel); border: 1px solid var(--border-hair); border-radius: 10px;
  padding: var(--space-md); text-align: center; transition: all 0.25s ease;
}
.topic-card:hover { border-color: var(--accent-gold); transform: translateY(-4px); }
.topic-icon { font-size: 2rem; display: block; margin-bottom: 0.5rem; }
.topic-card h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.topic-count { font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent-gold); display: block; margin-bottom: 0.5rem; }
.topic-card p { font-size: 0.82rem; color: var(--text-muted); }

/* ===== Article / video / podcast grids (reuse card styles from articles-page.css if loaded; standalone fallback here) ===== */
.home-article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
.home-article-grid .article-card:nth-child(4), .home-article-grid .article-card:nth-child(5) { grid-column: span 1; }
.article-card { display: block; border: 1px solid var(--border-hair); border-radius: 8px; overflow: hidden; transition: transform 0.2s ease, border-color 0.2s ease; }
.article-card:hover { transform: translateY(-4px); border-color: var(--accent-gold); }
.card-image { position: relative; height: 160px; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-category { position: absolute; top: 10px; left: 10px; background: rgba(10,14,23,0.85); font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; color: var(--accent-gold); padding: 0.3rem 0.6rem; border-radius: 4px; }
.card-body { padding: var(--space-sm) var(--space-md) var(--space-md); }
.card-body h3 { font-size: 1rem; margin-bottom: 0.4rem; line-height: 1.35; }
.card-excerpt { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.6rem; }
.card-meta { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); margin-bottom: 0.6rem; }
.card-meta .dot { margin: 0 0.35rem; }
.read-more { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent-gold); }

.home-video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
.video-card { border: 1px solid var(--border-hair); border-radius: 10px; overflow: hidden; transition: transform 0.25s ease; }
.video-card:hover { transform: translateY(-4px); }
.video-embed-wrap { position: relative; aspect-ratio: 16/9; background: #000; cursor: pointer; }
.video-thumb { width: 100%; height: 100%; object-fit: cover; }
.play-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 56px; height: 56px; border-radius: 50%; background: rgba(255,0,0,0.9); color: #fff; border: none; font-size: 1.2rem; cursor: pointer; }
.video-card-body { padding: var(--space-md); }
.channel-name { font-family: var(--font-mono); font-size: 0.7rem; color: var(--accent-gold); text-transform: uppercase; }
.video-card-body h3 { font-size: 0.95rem; margin: 0.4rem 0; }
.yt-link { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted); }
.yt-link:hover { color: #FF0000; }

.home-podcast-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
.podcast-card { border: 1px solid var(--border-hair); border-radius: 10px; overflow: hidden; }
.podcast-cover { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.podcast-card-body { padding: var(--space-md); }
.podcast-platform { font-family: var(--font-mono); font-size: 0.7rem; color: var(--accent-gold); text-transform: uppercase; }
.podcast-card-body h3 { font-size: 1rem; margin: 0.4rem 0; }
.podcast-card-body p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.8rem; }
.listen-btn { display: block; text-align: center; padding: 0.6rem; font-size: 0.85rem; }

/* ===== Gallery (home preview) ===== */
.home-gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
.gallery-card { position: relative; aspect-ratio: 4/3; border-radius: 8px; overflow: hidden; cursor: pointer; }
.gallery-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery-card:hover img { transform: scale(1.08); }
.gallery-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,14,23,0.9), transparent 60%); display: flex; align-items: flex-end; padding: var(--space-md); opacity: 0; transition: opacity 0.3s ease; }
.gallery-card:hover .gallery-overlay { opacity: 1; }
.gallery-overlay h3 { color: #fff; font-size: 0.9rem; }

.lightbox { position: fixed; inset: 0; background: rgba(10,14,23,0.95); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 999; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; padding: var(--space-md); }
.lightbox.active { opacity: 1; pointer-events: all; }
.lightbox img { max-width: 90vw; max-height: 75vh; border-radius: 8px; }
.lightbox-caption { text-align: center; margin-top: var(--space-md); }
.lightbox-caption h3 { color: #fff; }
.lightbox-close { position: absolute; top: 24px; right: 24px; background: none; border: 1px solid var(--border-hair); color: #fff; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; }

/* ===== Quote ===== */
.quote-section { max-width: 800px; text-align: center; }
.quote-mark { font-family: var(--font-heading); font-size: 3rem; color: var(--accent-gold); display: block; margin-bottom: 1rem; line-height: 0.5; }
.quote-text { font-size: 1.3rem; min-height: 3.5rem; margin-bottom: 0.8rem; }
.quote-author { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-muted); }
.typing-cursor { display: inline-block; color: var(--accent-gold); animation: blink 0.9s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ===== Explore by format ===== */
.format-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md); }
.format-card { background: var(--bg-panel); border: 1px solid var(--border-hair); border-radius: 10px; padding: var(--space-lg) var(--space-md); text-align: center; transition: all 0.25s ease; display: flex; flex-direction: column; gap: 0.6rem; }
.format-card:hover { border-color: var(--accent-gold); transform: translateY(-4px); }
.format-icon { font-size: 2rem; }
.format-card span:last-child { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-muted); }
.format-card:hover span:last-child { color: var(--accent-gold); }

/* ===== Scientific fields ===== */
.fields-cloud { display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center; }
.field-chip { font-family: var(--font-mono); font-size: 0.8rem; padding: 0.5rem 1rem; border: 1px solid var(--border-hair); border-radius: 20px; color: var(--text-muted); transition: all 0.2s ease; }
.field-chip:hover { border-color: var(--accent-gold); color: var(--accent-gold); }

/* ===== Mission statement ===== */
.mission-section { max-width: 800px; margin: var(--space-xl) auto; padding: var(--space-xl) var(--space-md); text-align: center; border-top: 1px solid var(--border-hair); border-bottom: 1px solid var(--border-hair); }
.mission-section p { font-family: var(--font-heading); font-size: 1.4rem; line-height: 1.5; transition: opacity 0.4s ease; }

/* ===== Recent activity ===== */
.activity-list { max-width: 700px; margin: 0 auto; }
.activity-item { display: flex; align-items: center; gap: 0.8rem; padding: 0.8rem 0; border-bottom: 1px solid var(--border-hair); }
.activity-icon { font-size: 1.1rem; }
.activity-text { flex: 1; font-size: 0.9rem; }
.activity-date { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); }

/* ===== Newsletter (reuse shared classes) ===== */
.home-newsletter { max-width: 600px; margin: 0 auto; text-align: center; }
.page-newsletter-form { display: flex; gap: 0.6rem; }
.page-newsletter-form input { flex: 1; padding: 0.8rem 1.1rem; background: var(--bg-panel); border: 1px solid var(--border-hair); border-radius: 4px; color: var(--text-main); }
.page-newsletter-form button { padding: 0.8rem 1.4rem; background: var(--accent-gold); border: none; border-radius: 4px; font-family: var(--font-mono); font-size: 0.85rem; cursor: pointer; }
.hp-field { position: absolute; left: -9999px; }
.newsletter-msg { font-size: 0.85rem; margin-top: 0.6rem; color: var(--accent-teal); }

/* ===== Community ===== */
.community-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
.community-card { background: var(--bg-panel); border: 1px solid var(--border-hair); border-radius: 10px; padding: var(--space-md); transition: all 0.25s ease; }
.community-card:hover { border-color: var(--accent-gold); transform: translateY(-3px); }
.community-icon { font-size: 1.4rem; color: var(--accent-gold); display: block; margin-bottom: 0.5rem; }
.community-card h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.community-card p { font-size: 0.85rem; color: var(--text-muted); }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero-columns { grid-template-columns: 1fr; text-align: center; }
  .hero-buttons, .hero-stats { justify-content: center; }
  .hero-right { order: -1; }
  .topics-grid, .home-article-grid, .home-video-grid, .home-podcast-grid, .home-gallery-grid, .format-grid, .community-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .topics-grid, .home-article-grid, .home-video-grid, .home-podcast-grid, .home-gallery-grid, .format-grid, .community-grid { grid-template-columns: 1fr; }
  .page-newsletter-form { flex-direction: column; }
}