@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;600;700;800&display=swap');

:root {
  --primary: #2a6df4;
  --primary-dark: #1f56c9;
  --bg: #ffffff;
  --bg-soft: #f3f5f9;
  --text: #1b1f2a;
  --muted: #6b7280;
  --accent: #ffb300;
  --border: #e3e8f0;
  --shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
  --radius: 14px;
  --radius-sm: 10px;
  --container: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Manrope', Arial, sans-serif;
  color: #222;
  background: var(--bg);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1 {
  font-size: 28px;
  margin: 0 0 15px;
  color: #111827;
}

h2 {
  font-size: 22px;
  margin: 25px 0 12px;
  color: #111827;
}

p {
  margin: 0 0 15px;
}

img { max-width: 100%; display: block; }

main { flex: 1; }

a { color: inherit; text-decoration: none; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.5rem 0.75rem;
  background: var(--primary);
  color: white;
  z-index: 1000;
  border-radius: 6px;
}

.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--primary);
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #4ab0ff);
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-weight: 600;
}

.nav a { color: var(--text); }

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

.search-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  background: var(--bg-soft);
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  min-width: 260px;
}

.search-bar input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 0.95rem;
}

.nav-toggle {
  display: none;
  background: var(--primary);
  border: none;
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 1.2rem;
}

.hero {
  padding: 4rem 0 3rem;
  background: radial-gradient(circle at top left, #e8f0ff, transparent 60%),
              radial-gradient(circle at right, #f6f8ff, transparent 60%);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.15;
  margin: 0 0 1rem;
}

.hero p {
  color: var(--muted);
  margin: 0 0 1.5rem;
  font-size: 1.1rem;
}

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

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #007bff;
  color: white;
  padding: 10px 16px;
  border-radius: 5px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn {
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover { background: var(--primary-dark); }

.btn-outline {
  border-color: var(--primary);
  color: var(--primary);
  background: white;
}

.subjects {
  padding: 2.5rem 0;
  background: var(--bg-soft);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.section-title h2 {
  margin: 0;
  font-size: 1.8rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.2rem;
}

.subject-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.2rem;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.subject-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.subject-card span { color: var(--muted); font-size: 0.9rem; }

.popular, .latest { padding: 2.5rem 0; }

.articles-grid,
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.article-card {
  background: white;
  border: 1px solid #eee;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
  transition: 0.2s;
}

.article-card:hover {
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.article-card-content {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.article-card .meta { color: var(--muted); font-size: 0.85rem; }

.article-card h3 { margin: 0; font-size: 1.1rem; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(42, 109, 244, 0.1);
  color: var(--primary);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.latest-list {
  display: grid;
  gap: 1rem;
}

.latest-item {
  padding: 1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  background: white;
}

.latest-item span { color: var(--muted); font-size: 0.85rem; }

.layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
  padding: 2.5rem 0;
}

.breadcrumbs {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.article-header h1 { margin: 0 0 0.5rem; font-size: clamp(2rem, 3vw, 2.6rem); }

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.article-content {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 2rem;
}

.article-content h2, .article-content h3 { margin-top: 2rem; }

.article-content blockquote {
  border-left: 4px solid var(--primary);
  margin: 1.5rem 0;
  padding: 0.5rem 1rem;
  background: #f2f6ff;
  color: #1f3c78;
}

.article-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
}

.tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.share {
  display: flex;
  gap: 0.5rem;
}

.sidebar {
  display: grid;
  gap: 1.5rem;
  position: sticky;
  top: 100px;
  align-self: start;
}

.sidebar-section {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
}

.sidebar-section ul {
  list-style: none;
  padding: 0;
  margin: 0.8rem 0 0;
  display: grid;
  gap: 0.5rem;
}

.pagination {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin: 2rem 0;
}

.pagination a,
.pagination span {
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 600;
}

.pagination .current {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.site-footer {
  background: #0f1b3d;
  color: #dbe5ff;
  padding: 3rem 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
}

.footer-grid a { color: #dbe5ff; }

.footer-grid h3 { margin-top: 0; color: white; }

.footer-bottom {
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1rem;
  font-size: 0.85rem;
  color: rgba(219, 229, 255, 0.7);
}

.category-header {
  background: var(--bg-soft);
  padding: 2.5rem 0 2rem;
}

.search-header {
  padding: 2.5rem 0 1.5rem;
}

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .nav { display: none; }
  .nav.open { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 1rem 0; }
  .header-inner { flex-wrap: wrap; }
  .search-bar { min-width: 100%; }
  .nav-toggle { display: inline-flex; }
}

@media (max-width: 768px) {
  .container {
    padding: 10px;
  }
}

@media (max-width: 640px) {
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .latest-item { flex-direction: column; }
  .article-content { padding: 1.5rem; }
}

