/* =========================
   CSS Variables
   ========================= */
:root {
  --primary: #4076ac;
  --primary-deep: #1e4f81;
  --primary-soft: #eef5ff;
  --accent: #f3b15d;
  --text: #2e2e2e;
  --muted: #555;
  --card: #f8f8f8;
  --shadow: 0 4px 10px rgba(0,0,0,.1);
  --radius: 12px;
  --gap: 20px;
  --nav-offset: 96px;
}

/* =========================
   Base & Typography
   ========================= */
html, body { margin: 0; padding: 0; }
body {
  font-family: "Merriweather", "PT Serif", Georgia, "Times New Roman", "STSong", serif;
  font-weight: 300;
  color: var(--text);
  line-height: 1.6;
  background: #fff;
}

h1, h2, h3, h4, h5, h6 {
  color: #2E2E2E;
  line-height: 1.15;
  font-family: 'Open Sans', 'Hiragino Sans GB', 'Microsoft YaHei', 'WenQuanYi Micro Hei', sans-serif;
  text-rendering: geometricPrecision;
  margin: 0 0 .5em 0;
}
h1 { font-size: 3rem; letter-spacing: -.5px; }
h2 { margin-top: 2em; }

a { color: #463F5C; text-decoration: underline; }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.inner-page { width: 87%; max-width: 1025px; margin: auto; }
h2[id] { scroll-margin-top: calc(var(--nav-offset) + 16px); }

/* =========================
   Top Nav
   ========================= */
#table-of-contents {
  position: sticky; top: 0; left: 0; right: 0; z-index: 1000;
  min-height: 60px;
  padding: 10px 16px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  box-shadow: 0 2px 5px rgba(0,0,0,.1);
  font-size: 1.1rem;
}
#table-of-contents a {
  text-decoration: none;
  font-weight: 700;
  color: #1e4f81;
  padding: 10px 15px;
  border-radius: 8px;
  transition: .3s;
}
#table-of-contents a:hover {
  background: #1e4f81;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(30,79,129,.3);
}

/* =========================
   Buttons (shared base)
   ========================= */
.social-btn,
.resource-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease, border-color .25s ease;
}

/* =========================
   Header
   ========================= */
header { padding: 40px 0 20px 0; }
.header-flex {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
}
.header-left {
  flex: 0 0 180px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-left: 100px;
}
.avatar {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #fff;
  display: block;
}
.header-center { flex: 1 1 auto; text-align: center; padding: 0 32px; }
.header-center h1 { font-size: 3em; margin: 0 0 10px 0; font-weight: 700; }

.social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  margin-top: 18px;
}
.social-btn {
  min-width: 122px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--primary-deep);
  background: linear-gradient(135deg, #ffffff 0%, var(--primary-soft) 100%);
  border: 1px solid rgba(64,118,172,.22);
  box-shadow: 0 12px 24px rgba(64,118,172,.12);
}
.social-btn i {
  font-size: 16px;
  width: 16px;
  text-align: center;
  transition: transform .25s ease;
}
.social-btn:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(30,79,129,.28);
}
.social-btn:hover i { transform: scale(1.12); }

.resource-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.resource-btn {
  padding: 8px 14px;
  font-size: 14px;
  color: var(--primary-deep);
  background: #fff;
  border: 1px solid rgba(64,118,172,.22);
  box-shadow: 0 6px 16px rgba(20,44,77,.08);
}
.resource-btn:hover {
  color: #1c3550;
  background: linear-gradient(135deg, #fff8ed 0%, #ffe1b3 100%);
  border-color: rgba(243,177,93,.5);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(163,101,20,.18);
}

/* =========================
   Pretty HR
   ========================= */
.custom-hr {
  border: none;
  height: 1.5px;
  background: linear-gradient(to right, var(--primary), #ccc, var(--primary));
  margin: 40px auto;
  width: 95%;
  position: relative;
}
.custom-hr::before, .custom-hr::after {
  content: "◆";
  position: absolute;
  top: -10px;
  font-size: 18px;
  color: var(--primary);
}
.custom-hr::before { left: -20px; }
.custom-hr::after { right: -20px; }

/* =========================
   Section Helpers
   ========================= */
.title { color: var(--primary); }
.section-intro { margin: 8px 0 18px; color: var(--muted); }
.plain-list { margin: .5em 0 0; padding-left: 20px; }
.plain-list li { margin: .3em 0; }

/* =========================
   Footer
   ========================= */
footer {
  background: linear-gradient(135deg, var(--primary-deep) 0%, var(--primary) 100%);
  padding: 34px 0 24px;
  text-align: center;
  font-size: 13px;
  color: #fff;
  margin-top: 40px;
}
.footer-inner { width: 87%; max-width: 1025px; margin: 0 auto; }
.footer-title { margin: 0; font-size: 1.25rem; color: #fff; }
.footer-copy { margin: 8px auto 0; max-width: 680px; color: rgba(255,255,255,.86); }
.footer-social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}
.footer-social-links .social-btn {
  color: #fff;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  box-shadow: 0 10px 24px rgba(8,27,48,.18);
}
.footer-social-links .social-btn:hover {
  color: var(--primary-deep);
  background: linear-gradient(135deg, #fff8ed 0%, #ffffff 100%);
  border-color: transparent;
  box-shadow: 0 16px 30px rgba(8,27,48,.26);
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 900px) {
  :root { --nav-offset: 148px; }
  .header-flex { flex-direction: column; align-items: center; padding: 12px 0; }
  .header-left { padding-left: 0; }
  #table-of-contents { flex-wrap: wrap; gap: 12px; }
  .social-links { flex-wrap: wrap; }
  .social-btn { min-width: 0; width: calc(50% - 7px); }
}

@media (max-width: 560px) {
  .social-btn { width: 100%; }
  .footer-social-links .social-btn { width: 100%; }
}
