/* ===== ROOT VARIABLES ===== */
:root {
  --bg-primary: #0a0f1e;
  --bg-secondary: #111827;
  --bg-card: #1a2235;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --border: #1e2d45;
  --font: 'Space Grotesk', sans-serif;
}

/* ===== LIGHT MODE ===== */
body.light-mode {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --border: #e2e8f0;
}

/* ===== RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background 0.3s ease, color 0.3s ease;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  background: transparent;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(10, 15, 30, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

body.light-mode .navbar.scrolled {
  background: rgba(248, 250, 252, 0.85);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.6rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  padding-bottom: 6px;
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a::after{
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--accent);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-links a:hover::after{
    width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ===== MOBILE NAV ===== */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: var(--bg-secondary);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    transition: right 0.3s ease;
    border-left: 1px solid var(--border);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links a {
    font-size: 1.1rem;
  }
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-container {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.8rem;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -1px;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.hero-title span {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 0.8rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  padding: 0.8rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ===== MOBILE HERO ===== */
@media (max-width: 768px) {
  .hero-glow {
    width: 300px;
    height: 300px;
  }

  .hero-subtitle {
    font-size: 1rem;
  }
}

/* ===== FEATURED ARTICLE ===== */
.featured {
  padding: 5rem 2rem;
  background: var(--bg-secondary);
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 2rem;
}

.featured-card {
  display: flex;
  align-items: center;
  gap: 4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 3rem;
  transition: border-color 0.3s ease;
}

.featured-card:hover {
  border-color: var(--accent);
}

.featured-text {
  flex: 1;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}

.category-badge {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent);
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

.meta-info {
  color: var(--text-secondary);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.featured-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1.2rem;
  color: var(--text-primary);
}

.featured-excerpt {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 2rem;
  font-size: 1rem;
}

.featured-image {
  flex-shrink: 0;
  width: 280px;
  height: 280px;
}

.image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(99, 102, 241, 0.05));
  border-radius: 12px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: var(--accent);
}

/* ===== MOBILE FEATURED ===== */
@media (max-width: 768px) {
  .featured-card {
    flex-direction: column;
    gap: 2rem;
    padding: 2rem;
  }

  .featured-image {
    width: 100%;
    height: 200px;
  }
}

/* ===== ARTICLES GRID ===== */
.articles {
  padding: 5rem 2rem;
  background: var(--bg-primary);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: var(--text-primary);
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.7;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.card-image {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(99, 102, 241, 0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
}

.card-content {
  padding: 1.5rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 0.8rem;
  color: var(--text-primary);
}

.card-excerpt {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

.card-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap 0.3s ease;
}

.card-link:hover {
  gap: 0.7rem;
}

/* ===== MOBILE ARTICLES ===== */
@media (max-width: 1024px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== ABOUT STRIP ===== */
.about {
  padding: 5rem 2rem;
  background: var(--bg-secondary);
}

.about-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.about-inner {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 3rem;
  transition: border-color 0.3s ease;
}

.about-inner:hover {
  border-color: var(--accent);
}

.about-icon {
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  background: rgba(99, 102, 241, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--accent);
}

.about-text {
  flex: 1;
}

.about-text h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

.about-role {
  display: block;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.8rem;
}

.about-text p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.95rem;
}

/* ===== MOBILE ABOUT ===== */
@media (max-width: 768px) {
  .about-inner {
    flex-direction: column;
    text-align: center;
    padding: 2rem;
    gap: 1.5rem;
  }
}

/* ===== NEWSLETTER ===== */
.newsletter {
  padding: 5rem 2rem;
  background: var(--bg-primary);
}

.newsletter-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.05));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 16px;
  padding: 3.5rem;
}

.newsletter-text {
  flex: 1;
}

.newsletter-text h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin: 0.8rem 0;
  color: var(--text-primary);
  line-height: 1.3;
}

.newsletter-text h2 span {
  color: var(--accent);
}

.newsletter-text p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.95rem;
  max-width: 400px;
}

.newsletter-form {
  flex-shrink: 0;
  width: 420px;
}

.form-row {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.email-input {
  flex: 1;
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.3s ease;
}

.email-input:focus {
  border-color: var(--accent);
}

.email-input::placeholder {
  color: var(--text-secondary);
}

.form-note {
  color: var(--text-secondary);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ===== MOBILE NEWSLETTER ===== */
@media (max-width: 768px) {
  .newsletter-inner {
    flex-direction: column;
    padding: 2rem;
    gap: 2rem;
  }

  .newsletter-form {
    width: 100%;
  }

  .form-row {
    flex-direction: column;
  }
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 4rem 2rem 2rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
  margin: 1rem 0 1.5rem;
  max-width: 300px;
}

.footer-socials {
  display: flex;
  gap: 1rem;
}

.footer-socials a {
  width: 38px;
  height: 38px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.footer-socials a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.footer-links h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.2rem;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-links ul a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.3s ease;
}

.footer-links ul a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.footer-bottom .fa-heart {
  color: #ef4444;
}

/* ===== MOBILE FOOTER ===== */
@media (max-width: 768px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--accent);
  z-index: 9999;
  transition: width 0.1s ease;
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--accent-hover);
  transform: translateY(-3px);
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--accent);
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  transition: all 0.4s ease;
  z-index: 9999;
  white-space: nowrap;
}

.toast .fa-check-circle {
  color: var(--accent);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== SCROLL REVEAL ===== */
.hidden {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ===== HAMBURGER ANIMATION ===== */
.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== READ ALL BUTTON ===== */
.read-all-container {
  text-align: center;
  margin-top: 3rem;
}

.btn-read-all {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--text-primary);
  padding: 0.9rem 2.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.btn-read-all:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}



/* ===== ARTICLES PAGE ===== */
.articles-hero {
  padding: 8rem 2rem 3rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.articles-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  margin: 0.8rem 0;
  color: var(--text-primary);
}

.articles-hero p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 1.2rem;
  margin-bottom: 1.5rem;
  max-width: 500px;
  transition: border-color 0.3s ease;
}

.search-bar:focus-within {
  border-color: var(--accent);
}

.search-bar i {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.search-bar input {
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.95rem;
  outline: none;
  width: 100%;
}

.search-bar input::placeholder {
  color: var(--text-secondary);
}

.filter-pills {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.pill {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.3s ease;
}

.pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.articles-list {
  padding: 4rem 2rem;
  background: var(--bg-primary);
}

.all-articles-container {
  max-width: 1200px;
  margin: 0 auto;
}

.all-articles-grid {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.all-article-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.all-article-card:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}

.all-card-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(99, 102, 241, 0.05));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--accent);
}

.all-card-content {
  flex: 1;
}

.all-card-content h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0.4rem 0 0.5rem;
  line-height: 1.4;
}

.all-card-content p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 0.6rem;
}

.all-card-author {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.no-results {
  text-align: center;
  padding: 4rem 2rem;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: var(--text-secondary);
}

.no-results i {
  font-size: 2.5rem;
  color: var(--border);
}

.no-results p {
  font-size: 1rem;
}

/* ===== MOBILE ARTICLES PAGE ===== */
@media (max-width: 768px) {
  .all-article-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .filter-pills {
    gap: 0.5rem;
  }
}