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

:root {
  --primary: #1a5276;
  --primary-light: #2e86c1;
  --accent: #16a085;
  --accent-light: #1abc9c;
  --bg: #f8f9fa;
  --white: #ffffff;
  --text: #2c3e50;
  --text-light: #6c7a89;
  --border: #e2e8f0;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.1);
  --radius: 8px;
  --max-width: 1140px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--primary-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary); text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ===== Layout ===== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* ===== Header ===== */
.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--primary);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.site-brand a {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.site-brand .amp { color: var(--accent); font-weight: 400; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; font-size: 1.5rem; color: var(--primary); }

.main-nav ul { list-style: none; display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a {
  display: block;
  padding: 8px 14px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.2s;
}
.main-nav a:hover, .main-nav a.active {
  background: var(--primary);
  color: var(--white);
  text-decoration: none;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--white);
  padding: 60px 0;
  text-align: center;
}
.hero h1 { font-size: 2.2rem; font-weight: 700; margin-bottom: 16px; line-height: 1.3; }
.hero p { font-size: 1.1rem; max-width: 700px; margin: 0 auto 24px; opacity: 0.92; }
.hero .cta-btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--accent);
  color: var(--white);
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}
.hero .cta-btn:hover { background: var(--accent-light); text-decoration: none; }

/* ===== Article Cards Grid ===== */
.section-title { font-size: 1.6rem; font-weight: 700; color: var(--primary); margin-bottom: 24px; padding-bottom: 12px; border-bottom: 2px solid var(--border); }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin: 40px 0;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
  display: flex;
  flex-direction: column;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.card-category { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); margin-bottom: 8px; }
.card-title { font-size: 1.15rem; font-weight: 600; color: var(--primary); margin-bottom: 10px; }
.card-title a { color: inherit; text-decoration: none; }
.card-title a:hover { color: var(--primary-light); }
.card-excerpt { font-size: 0.9rem; color: var(--text-light); flex: 1; margin-bottom: 12px; }
.card-meta { font-size: 0.8rem; color: var(--text-light); border-top: 1px solid var(--border); padding-top: 10px; }

/* ===== Article Page ===== */
.article-wrap { padding: 40px 0; }
.article-main { max-width: 820px; margin: 0 auto; }

.breadcrumb { font-size: 0.85rem; color: var(--text-light); margin-bottom: 20px; }
.breadcrumb a { color: var(--primary-light); }
.breadcrumb .sep { margin: 0 6px; }

.article-header { margin-bottom: 30px; }
.article-category { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); margin-bottom: 8px; }
.article-header h1 { font-size: 2rem; font-weight: 700; color: var(--text); line-height: 1.3; margin-bottom: 16px; }

.article-meta-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-light);
}
.article-meta-bar .author-info { display: flex; align-items: center; gap: 8px; }
.author-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}
.article-meta-bar .rating { color: #f39c12; }
.article-meta-bar .rating span { color: var(--text-light); margin-left: 4px; }

/* Article body */
.article-body { font-size: 1.02rem; line-height: 1.85; }
.article-body h2 { font-size: 1.4rem; font-weight: 600; color: var(--primary); margin: 32px 0 16px; }
.article-body h3 { font-size: 1.15rem; font-weight: 600; color: var(--text); margin: 24px 0 12px; }
.article-body p { margin-bottom: 18px; }
.article-body ul, .article-body ol { margin: 0 0 18px 22px; }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--text); font-weight: 600; }
.article-body blockquote {
  border-left: 4px solid var(--accent);
  padding: 12px 20px;
  margin: 20px 0;
  background: var(--white);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-light);
  font-style: italic;
}

/* Info box */
.info-box {
  background: #eafaf7;
  border: 1px solid #a3e4d7;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px 0;
}
.info-box-title { font-weight: 700; color: var(--accent); margin-bottom: 8px; }

/* Data table */
.data-table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 0.92rem; }
.data-table th { background: var(--primary); color: var(--white); padding: 10px 14px; text-align: left; font-weight: 600; }
.data-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.data-table tr:nth-child(even) td { background: #f4f6f7; }

/* Author box (EEAT) */
.author-box {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 32px 0;
}
.author-box .author-avatar-lg { width: 56px; height: 56px; font-size: 1.2rem; flex-shrink: 0; }
.author-box .author-details h4 { font-size: 1rem; color: var(--primary); margin-bottom: 4px; }
.author-box .author-details p { font-size: 0.88rem; color: var(--text-light); margin: 0; }

/* References */
.references { margin: 32px 0; }
.references h3 { font-size: 1.2rem; color: var(--primary); margin-bottom: 14px; }
.references ol { padding-left: 20px; }
.references li { font-size: 0.85rem; color: var(--text-light); margin-bottom: 8px; line-height: 1.6; }

/* Disclaimer block */
.disclaimer-block {
  background: #fef9e7;
  border: 1px solid #f9e79f;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 0.88rem;
  color: #7d6608;
}
.disclaimer-block strong { color: #7d6608; }

/* Related articles */
.related-section { margin: 40px 0; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.related-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: box-shadow 0.2s;
}
.related-card:hover { box-shadow: var(--shadow); }
.related-card .cat { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; color: var(--accent); letter-spacing: 1px; }
.related-card h4 { font-size: 0.95rem; margin: 6px 0; }
.related-card h4 a { color: var(--primary); text-decoration: none; }
.related-card h4 a:hover { color: var(--primary-light); }
.related-card p { font-size: 0.82rem; color: var(--text-light); }

/* ===== Footer ===== */
.site-footer {
  background: var(--primary);
  color: #cdd5dc;
  padding: 40px 0 20px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}
.footer-col h5 { color: var(--white); font-size: 1rem; margin-bottom: 14px; font-weight: 600; }
.footer-col p { font-size: 0.88rem; line-height: 1.6; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a { color: #cdd5dc; font-size: 0.88rem; text-decoration: none; }
.footer-col ul a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 20px;
  text-align: center;
  font-size: 0.82rem;
  color: #95a5a6;
}
.footer-disclaimer {
  font-size: 0.8rem;
  color: #95a5a6;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
  line-height: 1.5;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; gap: 12px; }
  .nav-toggle { display: block; align-self: flex-end; }
  .main-nav { display: none; width: 100%; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; }
  .hero h1 { font-size: 1.6rem; }
  .hero p { font-size: 0.95rem; }
  .article-header h1 { font-size: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
  .article-meta-bar { gap: 10px; }
}

/* ===== Author Profile Page ===== */
.author-profile-header {
    display: flex;
    gap: 24px;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow);
}
.author-profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 700;
    flex-shrink: 0;
}
.author-profile-info h1 { font-size: 1.8rem; color: var(--primary); margin-bottom: 4px; }
.author-profile-title { font-size: 1.05rem; color: var(--accent); font-weight: 600; margin-bottom: 12px; }
.author-profile-credentials { display: flex; flex-wrap: wrap; gap: 8px; }
.cred-badge {
    display: inline-block;
    background: #eafaf7;
    color: var(--accent);
    border: 1px solid #a3e4d7;
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Author name link styling */
.author-info a, .author-box a.author-link, .card-meta a.author-link {
    color: var(--primary-light);
    text-decoration: none;
    border-bottom: 1px dotted var(--primary-light);
    transition: color 0.2s, border-bottom 0.2s;
}
.author-info a:hover, .author-box a.author-link:hover, .card-meta a.author-link:hover {
    color: var(--primary);
    border-bottom-style: solid;
    text-decoration: none;
}
.author-details a.author-link {
    color: var(--primary);
    text-decoration: none;
}
.author-details a.author-link:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .author-profile-header { flex-direction: column; text-align: center; }
    .author-profile-avatar { margin: 0 auto; }
}