/* --- Variables & Theme Setup --- */
:root {
 --front-main: #eff0f3;
  --bg-card: #ededf3;
 --bg-card-hover: #3369b9;
  
  --text-main: #050505;
  --text-muted: #1e1e1f;
  --text-accent: #58a6ff; /* Default Blue */
  
  --color-tech: #58a6ff;   /* Blue */
  --color-space: #a371f7;  /* Purple */
  --color-science: #3fb950;/* Green */
  
  --border-color: #9b9894;
  --font-main: 'Inter', sans-serif;
  
  --nav-height: 70px;
  --transition: 0.3s ease;
}

/* --- Reset & Base --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: white;
    color: var(--text-main);
    
}




a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* --- Utilities --- */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--white);
  color: var(--bg-body);
  font-weight: 600;
  border-radius: 4px;
  border: 1x solid var(--text-main);
  cursor: pointer;
  font-size: 0.9rem;
}

.btn:hover {
  background-color: transparent;
  color: var(--text-main);
}

.btn.ghost {
  background-color: transparent;
  color: var(--text-main);
}

.btn.ghost:hover {
  background-color: rgba(207, 67, 67, 0.1);
}

/* --- Header --- */
.site-header {
  height: var(--nav-height);
  background-color: rgb(250, 251, 252);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.branding {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo {
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
}

/* Navigation */
.main-nav ul {
  display: flex;
  gap: 30px;
}

.main-nav a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.main-nav a:hover, .main-nav a.active {
  color: var(--text-main);
}

/* Search Form */
.search-form {
  position: relative;
  display: flex;
  align-items: center;
}

  
.search-form button {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text-main);
  transition: 0.3s;
}

/* --- Hero Section --- */
.hero {
  padding-top: 40px;
  padding-bottom: 40px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  border-bottom: 1px solid var(--border-color);
}

.hero-meta {
  display: flex;
  gap: 15px;
  font-size: 0.85rem;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.kicker {
  color: var(--color-tech);
  font-weight: 700;
}

.hero-title {
  font-size: 3rem;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-lead {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 30px;
  max-width: 90%;
}

.hero-actions {
  display: flex;
  gap: 15px;
}

.top-list h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--text-accent);
  display: inline-block;
  padding-bottom: 5px;
}

.top-list li {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.top-list li:last-child {
  border: none;
}

.top-list a {
  font-weight: 600;
  display: block;
}

.top-list a:hover {
  color: var(--text-accent);
}

/* --- Filters --- */
.filters {
  padding: 30px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.filter-label {
  font-weight: 600;
  color: var(--text-muted);
}

.filter-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: 0.2s;
}

.filter:hover {
  border-color: var(--text-main);
  color: var(--text-main);
}

.filter.active {
  background: var(--text-main);
  color: var(--bg-body);
  border-color: var(--text-main);
}

/* --- Article Grid --- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
}

.card {
  background-color: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(233, 227, 227, 0.3);
  border-color: var(--text-muted);
}

/* Hide card when filtered out */
.card.hidden {
  display: none;
}

.card-media {
  height: 180px;
  background-color: #161515;
}

/* Placeholders Gradients */
.media-img { width: 100%; height: 100%; }
.placeholder-1 { background: linear-gradient(45deg, #2b32b2, #1488cc); }
.placeholder-2 { background: linear-gradient(45deg, #11998e, #38ef7d); }
.placeholder-3 { background: linear-gradient(45deg, #833ab4, #fd1d1d); }
.placeholder-4 { background: linear-gradient(45deg, #fc4a1a, #f7b733); }
.placeholder-5 { background: linear-gradient(45deg, #000428, #004e92); }
.placeholder-6 { background: linear-gradient(45deg, #e65c00, #f9d423); }

.card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-content .meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.meta .category {
  font-weight: 700;
  text-transform: uppercase;
}

/* Category Specific Colors */
.card[data-category="tech"] .category { color: var(--color-tech); }
.card[data-category="space"] .category { color: var(--color-space); }
.card[data-category="science"] .category { color: var(--color-science); }

.card-title {
  font-size: 1.25rem;
  margin-bottom: 10px;
  line-height: 1.3;
}

.card .excerpt {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex-grow: 1;
}

.read-more {
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  color: var(--text-main);
  margin-top: auto;
}

.read-more:hover {
  text-decoration: underline;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 80px;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-nav a {
  margin-left: 20px;
}

.footer-nav a:hover {
  color: var(--text-main);
}

/* --- Responsive Media Queries --- */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
    z-index: 1002;
  }

  /* Mobile Nav Overlay */
  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background-color: var(--bg-card);
    padding: 80px 40px;
    transition: 0.4s ease;
    z-index: 1001;
    box-shadow: -10px 0 30px rgba(219, 237, 240, 0.5);
  }

  .main-nav.open {
    right: 0;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 30px;
  }

  .main-nav a {
    font-size: 1.2rem;
  }

  /* Animate Hamburger to X */
  .hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
  .hamburger.active span:nth-child(2) { opacity: 0; }
  .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

  /* Hero Stack */
  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .hero-title {
    font-size: 2.2rem;
  }

  /* Filters */
  .filters {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-form input {
    width: 140px;
  }
  
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-nav a {
    margin: 0 10px;
  }
}
