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

:root {
  --navy:      #1A5276;
  --blue:      #2E86C1;
  --blue-lt:   #EBF5FB;
  --blue-mid:  #AED6F1;
  --green:     #145A32;
  --green-lt:  #EAFAF1;
  --orange:    #D35400;
  --orange-lt: #FDEBD0;
  --grey:      #5D6D7E;
  --grey-lt:   #F4F6F7;
  --black:     #1A252F;
  --white:     #FFFFFF;
  --border:    #D5D8DC;
  --gold:      #9A7D0A;
  --radius:    8px;
  --shadow:    0 2px 12px rgba(0,0,0,0.08);
  --max-w:     900px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--black);
  background: #F8F9FA;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ── Navigation ───────────────────────────────────────────────────────── */
nav {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.nav-logo {
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.3px;
}
.nav-logo span { color: var(--blue-mid); }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: var(--blue-mid);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: #fff; text-decoration: none; }
.nav-links a.active { color: #fff; border-bottom: 2px solid var(--blue-mid); padding-bottom: 2px; }

/* ── Page wrapper ─────────────────────────────────────────────────────── */
.page { max-width: var(--max-w); margin: 0 auto; padding: 0 24px 60px; }

/* ── HERO (homepage) ──────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #0E3D5C 100%);
  color: #fff;
  padding: 0;
  margin-bottom: 48px;
}
.hero-img-wrap { position: relative; overflow: hidden; max-height: 420px; }
.hero-img-wrap img { width: 100%; object-fit: cover; opacity: 0.75; }
.hero-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 32px 40px;
  background: linear-gradient(transparent, rgba(10,25,40,0.92));
}
.hero-overlay h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.25;
}
.hero-overlay p {
  font-size: 1rem;
  color: var(--blue-mid);
  margin: 0;
}

/* ── Section headings ─────────────────────────────────────────────────── */
.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-left: 4px solid var(--blue);
  padding-left: 12px;
  margin: 40px 0 20px;
}

/* ── About card ───────────────────────────────────────────────────────── */
.about-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  display: flex;
  gap: 28px;
  align-items: flex-start;
  margin-bottom: 40px;
  border-top: 4px solid var(--navy);
}
.about-avatar {
  width: 90px; height: 90px;
  border-radius: 50%;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 2rem; color: #fff; font-weight: 700;
}
.about-text h2 { font-size: 1.3rem; color: var(--navy); margin-bottom: 4px; }
.about-text .title { color: var(--blue); font-weight: 600; margin-bottom: 10px; font-size: 0.95rem; }
.about-text p { color: var(--grey); font-size: 0.95rem; line-height: 1.6; }
.about-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.badge {
  background: var(--blue-lt);
  color: var(--navy);
  border: 1px solid var(--blue-mid);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ── Article card (homepage listing) ─────────────────────────────────── */
.article-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 28px;
  border: 1px solid var(--border);
  transition: box-shadow 0.2s, transform 0.2s;
}
.article-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.13); transform: translateY(-2px); }
.article-card-img img { width: 100%; max-height: 220px; object-fit: cover; }
.article-card-body { padding: 24px 28px; }
.article-tag {
  display: inline-block;
  background: var(--blue-lt);
  color: var(--blue);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.article-card-body h3 { font-size: 1.2rem; color: var(--navy); margin-bottom: 8px; line-height: 1.35; }
.article-card-body p { color: var(--grey); font-size: 0.93rem; margin-bottom: 16px; }
.article-meta { font-size: 0.82rem; color: var(--grey); margin-bottom: 14px; }
.article-meta span { margin-right: 16px; }
.btn {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  padding: 9px 22px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s;
}
.btn:hover { background: var(--blue); text-decoration: none; }
.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}
.btn-outline:hover { background: var(--navy); color: #fff; }

/* ── Footer ───────────────────────────────────────────────────────────── */
footer {
  background: var(--navy);
  color: var(--blue-mid);
  text-align: center;
  padding: 28px 24px;
  font-size: 0.88rem;
  margin-top: 60px;
}
footer a { color: var(--blue-mid); }
footer a:hover { color: #fff; }

/* ══════════════════════════════════════════════════════════════════════ */
/*  ARTICLE PAGE STYLES                                                   */
/* ══════════════════════════════════════════════════════════════════════ */

/* Article hero */
.article-hero {
  position: relative;
  margin-bottom: 0;
}
.article-hero img { width: 100%; max-height: 380px; object-fit: cover; }
.article-hero-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(10,25,40,0.88));
  padding: 28px 40px;
  color: #fff;
}
.article-hero-overlay .tag {
  background: var(--blue);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  margin-bottom: 10px;
}
.article-hero-overlay h1 { font-size: 1.8rem; line-height: 1.25; margin-bottom: 8px; }
.article-hero-overlay .subtitle { color: var(--blue-mid); font-size: 0.98rem; font-style: italic; }

/* Article layout */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 36px;
  align-items: start;
  margin-top: 36px;
}
@media (max-width: 720px) {
  .article-layout { grid-template-columns: 1fr; }
  .sidebar { order: -1; }
}

/* Sidebar */
.sidebar { position: sticky; top: 80px; }
.sidebar-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
  border-top: 3px solid var(--blue);
}
.sidebar-card h4 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--grey);
  margin-bottom: 12px;
}
.toc-list { list-style: none; }
.toc-list li { margin-bottom: 8px; }
.toc-list a {
  color: var(--navy);
  font-size: 0.88rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}
.toc-list a::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
  margin-top: 7px;
}
.toc-list a:hover { color: var(--blue); text-decoration: none; }

.author-mini { display: flex; gap: 12px; align-items: center; }
.author-mini .av {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 1rem; flex-shrink: 0;
}
.author-mini-text .name { font-weight: 700; font-size: 0.9rem; color: var(--navy); }
.author-mini-text .role { font-size: 0.8rem; color: var(--grey); }

/* Article body */
.article-body { background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 36px 40px; }

.article-body h1 {
  font-size: 1.6rem; color: var(--navy);
  margin: 36px 0 12px; padding-bottom: 8px;
  border-bottom: 2px solid var(--blue-lt);
}
.article-body h1:first-child { margin-top: 0; }
.article-body h2 {
  font-size: 1.2rem; color: var(--blue);
  margin: 28px 0 10px;
}
.article-body h3 {
  font-size: 1rem; color: var(--navy);
  margin: 20px 0 8px; font-weight: 700;
}
.article-body p { margin-bottom: 16px; line-height: 1.75; }
.article-body ul, .article-body ol {
  margin: 0 0 16px 24px; line-height: 1.7;
}
.article-body li { margin-bottom: 6px; }
.article-body strong { color: var(--navy); }

/* Callout / note boxes */
.callout {
  border-left: 4px solid var(--blue);
  background: var(--blue-lt);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 0.95rem;
  color: var(--navy);
  line-height: 1.65;
}
.callout.orange { border-color: var(--orange); background: var(--orange-lt); color: #6E2C00; }
.callout.green  { border-color: var(--green);  background: var(--green-lt);  color: var(--green); }
.callout strong { color: inherit; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 20px 0; border-radius: var(--radius);
  box-shadow: 0 1px 6px rgba(0,0,0,0.07); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
thead tr { background: var(--navy); color: #fff; }
thead th { padding: 11px 14px; text-align: left; font-weight: 600; white-space: nowrap; }
tbody tr:nth-child(even) { background: var(--blue-lt); }
tbody tr:hover { background: #D6EAF8; }
tbody td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }

/* Figure / image */
.figure { margin: 28px 0; text-align: center; }
.figure img {
  border-radius: var(--radius);
  box-shadow: 0 3px 16px rgba(0,0,0,0.12);
  width: 100%;
}
.figure figcaption {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--grey);
  font-style: italic;
}

/* Formula */
.formula {
  text-align: center;
  font-family: 'Courier New', monospace;
  font-size: 1.05rem;
  color: var(--navy);
  font-weight: 700;
  background: var(--grey-lt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 24px;
  margin: 20px 0;
}

/* References */
.references { margin-top: 36px; padding-top: 24px; border-top: 2px solid var(--border); }
.references h2 { color: var(--navy); font-size: 1.1rem; margin-bottom: 16px; }
.references ol { margin-left: 20px; }
.references li { font-size: 0.88rem; color: var(--grey); margin-bottom: 8px; line-height: 1.5; }

/* Disclaimer */
.disclaimer {
  background: var(--grey-lt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 0.82rem;
  color: var(--grey);
  margin-top: 28px;
  line-height: 1.6;
}

/* Article meta bar */
.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  padding: 14px 20px;
  background: var(--grey-lt);
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--grey);
}
.article-meta-bar span { display: flex; align-items: center; gap: 5px; }

/* Share bar */
.share-bar {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 32px;
  padding-top: 24px; border-top: 1px solid var(--border);
}
.share-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px; border-radius: 6px;
  font-size: 0.88rem; font-weight: 600; cursor: pointer;
  border: none; transition: opacity 0.2s;
}
.share-btn:hover { opacity: 0.85; text-decoration: none; }
.share-linkedin { background: #0077B5; color: #fff; }
.share-copy { background: var(--grey-lt); color: var(--navy); border: 1px solid var(--border); }

/* Responsive */
@media (max-width: 600px) {
  .about-card { flex-direction: column; }
  .article-body { padding: 24px 18px; }
  .article-hero-overlay { padding: 16px 18px; }
  .article-hero-overlay h1 { font-size: 1.3rem; }
  .hero-overlay h1 { font-size: 1.4rem; }
  .nav-links { gap: 14px; }
}
