:root {
  --primary: #2C3E50;
  --accent: #E67E22;
  --text: #34495E;
  --background: #F9FAFB;
  --card-bg: #ffffff;
  --shadow: rgba(0,0,0,0.08);
}

/* DARK MODE */
body.dark {
  --background: #1E293B;
  --text: #e2e8f0;
  --card-bg: #334155;
  --shadow: rgba(0,0,0,0.4);
}

/* GENERAL */
body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: var(--background);
  color: var(--text);
  transition: 0.3s ease;
}

/* NAVBAR */
.navbar {
  width: 100%;
  background: var(--card-bg);
  padding: 15px 30px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  box-shadow: 0 4px 10px var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
}

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

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-links li a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  transition: 0.3s;
}

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

.menu-btn {
  font-size: 1.5rem;
  display: none;
  cursor: pointer;
  margin-left: 10px;
}

/* BLOG SECTION */
.section-title {
  text-align: center;
  margin-top: 40px;
  font-size: 2rem;
  color: var(--primary);
  font-weight: 700;
}

.blog-section {
  padding: 40px 60px;
}

/* GRID */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

/* CARD */
.blog-card {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px var(--shadow);
  position: relative;
  transition: 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px var(--shadow);
}

/* TAGS */
.tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  color: white;
  font-size: 0.8rem;
  border-radius: 6px;
  font-weight: 600;
}

.uiux {
  background: #6C5CE7;
}

.javascript {
  background: #F1C40F;
  color: #222;
}

.python {
  background: #2ECC71;
}

/* IMAGES */
.blog-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

/* CONTENT */
.content {
  padding: 20px;
}

.content h3 {
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 10px;
}

.content p {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 12px;
}

.meta {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 15px;
}

/* BUTTON */
.read-btn {
  background: var(--accent);
  padding: 9px 16px;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: 0.3s ease;
}

.read-btn:hover {
  background: #cf640d;
}

/* PAGINATION */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 40px;
  gap: 10px;
}

.page-btn {
  padding: 8px 14px;
  border: none;
  background: var(--card-bg);
  color: var(--text);
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 2px 6px var(--shadow);
  transition: 0.3s;
}

.page-btn:hover {
  background: var(--accent);
  color: white;
}

.page-btn.active {
  background: var(--accent);
  color: white;
}

/* ANIMATIONS */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* RESPONSIVE */
@media (max-width:900px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width:650px) {
  .menu-btn {
    display: block;
  }
  
  .nav-links {
    display: none;
    flex-direction: column;
    background: var(--card-bg);
    padding: 20px;
    margin-top: 10px;
    border-radius: 12px;
  }
  
  .nav-links.open {
    display: flex;
  }
  
  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  .blog-section {
    padding: 20px;
  }
}
