/* === Avaee - ICF Coaching Blog === */

:root {
  --bg: #f9f8f6;
  --sidebar-bg: #1e1e24;
  --sidebar-text: #c5c3d0;
  --sidebar-active: #ffffff;
  --sidebar-hover-bg: #2a2a32;
  --text: #1d1d1f;
  --text-secondary: #5e5e64;
  --text-muted: #94949b;
  --border: #e8e6e0;
  --accent: #5b6e5d;
  --accent-soft: #ecf0e9;
  --card-bg: #ffffff;
  --card-hover: #f4f3ef;
  --radius: 10px;
  --sidebar-width: 260px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  display: flex;
  min-height: 100vh;
}

/* === SIDEBAR === */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  padding: 28px 0 24px;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-brand {
  padding: 0 28px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 8px;
}

.sidebar-logo {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.sidebar-tagline {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  line-height: 1.5;
}

.sidebar-nav {
  list-style: none;
  padding: 4px 12px;
  flex: 1;
}

.sidebar-nav li { margin-bottom: 1px; }

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--sidebar-text);
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}

.sidebar-nav a:hover {
  background: var(--sidebar-hover-bg);
  color: #e0dee8;
}

.sidebar-nav a.active {
  background: rgba(91, 110, 93, 0.25);
  color: #a5c8a8;
}

.sidebar-nav .nav-icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-nav .nav-count {
  margin-left: auto;
  font-size: 11px;
  color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
  padding: 1px 7px;
  border-radius: 10px;
}

.sidebar-footer {
  padding: 16px 28px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 12px;
  font-size: 11px;
  color: rgba(255,255,255,0.2);
}

.sidebar-footer a {
  color: rgba(255,255,255,0.3);
  text-decoration: none;
}

/* === MAIN CONTENT === */
.main {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
}

.page-wrapper {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 40px 60px;
}

/* === HERO === */
.hero {
  padding: 28px 0 8px;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.hero p {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* === SECTION HEADING === */
.section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 36px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.section-heading h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.3px;
}

.section-heading .heading-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* === ARTICLE LIST === */
.article-list { }

.article-item {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.article-item:hover { opacity: 0.75; }

.article-item:last-child { border-bottom: none; }

.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}

.article-date {
  font-size: 12px;
  color: var(--text-muted);
}

.article-category {
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 1px 8px;
  border-radius: 3px;
}

.article-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
  line-height: 1.45;
}

.article-excerpt {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-tags {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.article-tag {
  font-size: 11px;
  color: var(--text-muted);
}

.article-tag::before { content: "#"; opacity: 0.5; margin-right: 1px; }

/* === FEATURED === */
.featured-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 28px;
  transition: box-shadow 0.2s;
}

.featured-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.04); }

.featured-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}

.featured-card .article-title { font-size: 17px; }

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.empty-state p { font-size: 14px; margin-bottom: 4px; }

/* === ARTICLE PAGE === */
.article-page .page-wrapper {
  max-width: 740px;
  padding: 28px 40px 60px;
}

.article-meta-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.article-page h1 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 24px;
}

.article-body {
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.9;
  color: var(--text);
}

.article-body h1 { font-size: 22px; margin: 36px 0 14px; font-family: var(--font-sans); }
.article-body h2 { font-size: 19px; margin: 30px 0 12px; font-family: var(--font-sans); }
.article-body h3 { font-size: 16px; margin: 24px 0 10px; font-family: var(--font-sans); }
.article-body p { margin-bottom: 18px; }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { opacity: 0.8; }
.article-body ul, .article-body ol { margin-bottom: 18px; padding-left: 24px; }
.article-body li { margin-bottom: 6px; }
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 6px 0 6px 18px;
  margin: 22px 0;
  color: var(--text-secondary);
  font-style: italic;
  background: var(--accent-soft);
  padding: 14px 18px;
  border-radius: 0 6px 6px 0;
}
.article-body code {
  font-family: "Fira Code", "Cascadia Code", "Consolas", monospace;
  font-size: 13px;
  background: #f3f2ee;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.article-body pre {
  background: #f3f2ee;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  overflow-x: auto;
  margin: 20px 0;
  font-size: 13.5px;
  line-height: 1.65;
}
.article-body pre code { background: none; border: none; padding: 0; }
.article-body img { max-width: 100%; border-radius: var(--radius); margin: 20px 0; }
.article-body hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
.article-body strong { font-weight: 600; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 20px;
  transition: color 0.15s;
}
.back-link:hover { color: var(--accent); }

/* === ABOUT SECTION === */
.about-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-top: 24px;
}

.about-card h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

.about-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 10px;
}

/* === FOOTER === */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 48px;
  padding-top: 20px;
  font-size: 12px;
  color: var(--text-muted);
}

/* === LOADING === */
.loading {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  body { flex-direction: column; }

  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 14px 16px;
    align-items: center;
  }

  .sidebar-brand {
    border-bottom: none;
    margin-bottom: 0;
    padding: 0;
  }

  .sidebar-logo { font-size: 17px; margin-bottom: 0; }
  .sidebar-tagline { display: none; }
  .sidebar-nav { display: none; }
  .sidebar-footer { display: none; }

  .main { margin-left: 0; }

  .page-wrapper { padding: 20px 18px 40px; }
  .hero h1 { font-size: 22px; }
  .article-page h1 { font-size: 23px; }
}
