/* styles/main.css */
@import url('https://fonts.googleapis.com/css2?family=Geologica:wght@100..900&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&display=swap');


/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box; 
}

html {
  scroll-behavior: smooth; 
}

body {
  margin: 0; 
  font: 16px/1.6  inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; 
  color: #1f2937; 
  background: #fafafa; 
}

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

a { 
  color: inherit;
}

:root {
--accent: #e67e22;
--text: #1f2937;
--muted: #6b7280;
--bg: #fafafa;
--card: #ffffff;
--border: #e5e7eb;
}

.container {
  width: 92%; 
  max-width: 1100px; 
  margin: 0 auto; 
}

.section {
  padding: 3rem 0; 
}

.section-head {
  text-align: center; 
  margin-bottom: 1.25rem; 
}

.section-sub {
  color: var(--muted); 
  font-size: .95rem; 
}

.muted {
  color: var(--muted); 
}

.hidden {
  display: none !important;
}

.skip-link {
  position: absolute; 
  left: 0; 
  top: -40px; 
  background: #000; 
  color: #fff; 
  padding: .5rem 1rem; 
  z-index: 100; 
  text-decoration: none; 
}

.skip-link:focus {
  top: 0; 
}


/* ---------- Header ---------- */
.site-header {
  position: sticky; 
  top: 0; 
  background: #fff; 
  border-bottom: 1px solid var(--border); 
  z-index: 10; 
}

.header-bar {
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  padding: 0.75rem 0; 
}

.brand {
  display: inline-flex; 
  align-items: center; 
  gap: .5rem; 
  text-decoration: none; 
  font-weight: 700; color: var(--text); 
}

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

.menu { 
  display: flex; 
  gap: 1rem; 
  list-style: none; 
  padding: 0; 
  margin: 0;
}

.menu a {
  text-decoration: none; 
  color: var(--text); 
  font-weight: 500;
}

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


/* ---------- Hero & Controls ---------- */
.hero {
  background: #fdfdfd; 
  padding: 3.5rem 0 2.5rem; 
  text-align: center;
}

.hero h1 {
  margin: 0; 
  font-size: clamp(1.6rem, 2.2vw + 1rem, 2.6rem);
}

.hero-sub {
  color: var(--muted); 
  max-width: 640px; 
  margin: .5rem auto 0;
}

.controls {
  margin-top: 1.25rem; 
  display: grid; 
  gap: .75rem; 
  justify-items: center;
}

#search {
  width: min(640px, 92%); 
  padding: .6rem .8rem; 
  border: 1px solid var(--border); 
  border-radius: 8px;
}

.chip-row {
  display: flex; 
  flex-wrap: wrap; 
  gap: .5rem; 
  justify-content: center;
}

.chip {
  background: #eee; 
  border: 1px solid #e6e6e6; 
  padding: .35rem .9rem; 
  border-radius: 999px; 
  font-size: .95rem;
}

.chip:hover {
  background: #eaeaea;
}

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


/* ---------- Grid & Cards ---------- */
.grid {
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); 
  gap: 1.5rem;
}

.card {
  background: var(--card); 
  border: 1px solid var(--border); 
  border-radius: 12px; 
  padding: 1rem; 
  text-decoration: none; 
  color: var(--text); 
  box-shadow: 0 2px 10px rgba(0,0,0,.03); 
  transition: transform .18s, box-shadow .18s;
}

.card:hover {
  transform: translateY(-3px); 
  box-shadow: 0 8px 18px rgba(0,0,0,.06);
}

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

.card p {
  margin: 0; 
  color: var(--muted);
}

.card small {
  color: var(--muted); 
  display: block; 
  margin-top: .5rem;
}


/* ---------- Article Page ---------- */
.article-layout .post {
  background: var(--card); 
  border: 1px solid var(--border); 
  border-radius: 12px; 
  padding: 1.25rem; 
  box-shadow: 0 2px 10px rgba(0,0,0,.03);
}

.post-title {
  margin-top: 0; 
  margin-bottom: .35rem; 
  font-size: clamp(1.4rem, 1.6vw + 1rem, 2.2rem);
}

.post-meta {
  color: var(--muted); 
  display: flex; 
  gap: .75rem; 
  flex-wrap: wrap;
}

.post-content img {
  max-width: 100%;
  display: block;
  margin: 20px auto;
  height: auto;
  border-radius: 12px;
}

.post-content p {
  line-height: 1.8; 
  margin: 1rem 0;
  padding: 0 1rem;
  font-size: 1.02rem;
}

.author-box {
  display: grid; 
  grid-template-columns: 40px 1fr; 
  gap: .75rem; 
  align-items: center; 
  margin-top: 1.5rem;
}

.avatar {
  width: 40px; 
  height: 40px; 
  border-radius: 50%; 
  background: #ddd; 
  display: grid; 
  place-items: center; 
  color: #666; 
  font-weight: 700;
}


/* ---------- Footer ---------- */
.site-footer {
  background: #111; 
  color: #ddd; 
  text-align: center; 
  padding: 1rem 0;
}

.footer-grid {
  display: grid; 
  place-items: center; 
  gap: .5rem;
}

.foot-note {
  color: #bbb; 
  font-size: .95rem;
}

.error {
  color: #b00020;
}

.empty {
  color: #6b7280; 
  text-align: center; 
  margin-top: 1rem;
}

/* ---------- Image ---------- */

@media (max-width: 768px){
  .hero h1 {
    font-size: 1.8rem;
    line-height: 1.3;
  }
  .hero-sub {
    font-size: 1rem;
  }  
}


@media (max-width: 600px) {
  .hero { 
    padding: 2.25rem 0 1.5rem; 
  }
  .hero h1 { 
    font-size: clamp(1.35rem, 5vw + .6rem, 2rem); 
    line-height: 1.25; 
  }
  .hero-sub .chip-row .related .card .section-head { 
    font-size: .98rem; 
  }
.post-content p {
  font-size: 1rem;
}
}


@media (max-width: 480px){
.hero h1 {
    font-size: 1.1rem;
  }
  .hero-sub .section-head .card {
    font-size: .9rem;
  }
  .post-content p {
  font-size: .9rem;
}
  
  .brand {
    font-size: .8rem;
  }
  .primary-nav {
    font-size: .8rem;
  }
  .chip-row .related {
    font-size: .8rem;
  }
}

/**----- Related Article -----**/
.related h2 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

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

.related .card {
  padding: 1rem;
  border: 1px solid #eee;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  background: #fafafa;
  transition: transform 0.2s ease;
}

.related .card:hover {
  transform: translateY(-4px);
  background: #fff;
}

