/* ===== Design Tokens ===== */
:root {
  --bg: #fafbfc;
  --bg-card: #ffffff;
  --bg-nav: rgba(250, 251, 252, 0.88);
  --text: #1a1a2e;
  --text-secondary: #4a5568;
  --text-muted: #8899aa;
  --border: #e2e6ea;
  --border-light: #eef0f2;
  --accent: #2563eb;
  --accent-light: #eff6ff;
  --accent-hover: #1d4ed8;
  --accent-soft: #dbeafe;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.06);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  /* brand colors for company cards */
  --c-shein: #1a1a2e;
  --c-urbanic: #7c3aed;
  --c-banggood: #dc2626;
  --c-hm: #cc0000;
  --c-celio: #0f766e;
  --c-llbean: #1e6f3f;
}

/* ===== Dark Mode ===== */
/* forced by user */
[data-theme="dark"] {
  --bg: #0f1117;
  --bg-card: #1a1d28;
  --bg-nav: rgba(15, 17, 23, 0.88);
  --text: #e8eaed;
  --text-secondary: #9aa0b0;
  --text-muted: #6b7280;
  --border: #2a2d38;
  --border-light: #22252f;
  --accent: #6699ff;
  --accent-light: #1a2240;
  --accent-hover: #80b0ff;
  --accent-soft: #152040;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.3);
}

/* auto mode: follow system */
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --bg: #0f1117;
    --bg-card: #1a1d28;
    --bg-nav: rgba(15, 17, 23, 0.88);
    --text: #e8eaed;
    --text-secondary: #9aa0b0;
    --text-muted: #6b7280;
    --border: #2a2d38;
    --border-light: #22252f;
    --accent: #6699ff;
    --accent-light: #1a2240;
    --accent-hover: #80b0ff;
    --accent-soft: #152040;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.3);
  }
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ===== Navigation ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--bg-nav); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between; height: 56px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; }
.nav-name { font-size: 18px; font-weight: 700; color: var(--text); }
.nav-tag {
  font-size: 11px; color: var(--accent); background: var(--accent-light);
  padding: 2px 8px; border-radius: 10px; font-weight: 500;
}
.nav-links { display: flex; gap: 24px; }
.nav-link {
  font-size: 14px; color: var(--text-secondary); padding: 4px 0;
  border-bottom: 2px solid transparent; transition: color 0.2s, border-color 0.2s;
}
.nav-link:hover { color: var(--accent); }
.nav-link.active { color: var(--accent); font-weight: 600; border-bottom-color: var(--accent); }

.nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 1px; }

/* ===== Page System ===== */
.page { display: none; padding-top: 56px; min-height: 100vh; }
.page.active { display: block; }

/* ===== Page Container ===== */
.page-container { max-width: 1200px; margin: 0 auto; padding: 64px 32px 80px; }
.page-header { margin-bottom: 48px; }
.page-label {
  font-size: 12px; color: var(--accent); letter-spacing: 2px;
  text-transform: uppercase; margin-bottom: 8px; font-weight: 500;
}
.page-title { font-size: 36px; font-weight: 700; color: var(--text); letter-spacing: normal; }
.page-sub { font-size: 16px; color: var(--text-muted); margin-top: 8px; max-width: 55ch; }

/* ===== Home / Hero ===== */
.hero { max-width: 960px; margin: 0 auto; padding: 72px 32px 64px; }
.hero-content { display: flex; align-items: flex-start; gap: 56px; }
.hero-photo {
  flex-shrink: 0; width: 240px; height: 240px; border-radius: 50%;
  overflow: hidden; border: 3px solid var(--border-light);
  box-shadow: var(--shadow-md);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.hero-info { flex: 1; }
.hero-label { font-size: 13px; color: var(--accent); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px; font-weight: 500; }
.hero-name {
  font-size: 44px; font-weight: 600; color: var(--text);
  letter-spacing: 1px; line-height: 1.15;
}
.hero-title { font-size: 18px; color: var(--text-secondary); margin-top: 10px; font-weight: 400; }
.hero-divider { height: 1px; background: var(--border); margin: 24px 0; }
.hero-stats { display: flex; gap: 28px; }
.stat { text-align: center; }
.stat-num { font-size: 34px; font-weight: 700; color: var(--text); }
.stat-num.accent { color: var(--accent); }
.stat-unit { font-size: 15px; color: var(--text-muted); font-weight: 400; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.stat-divider { width: 1px; background: var(--border); }
.hero-cta { display: flex; gap: 12px; margin-top: 20px; }

.hero-radar {
  max-width: 440px; margin-top: 24px;
}
.hero-radar .radar-chart {
  width: 100%; height: auto;
}

.hero-methods {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px;
}
.hero-methods .method-tag {
  font-size: 11px; padding: 3px 10px;
}

.btn-primary {
  display: inline-block; background: var(--accent); color: #fff; padding: 10px 24px;
  border-radius: var(--radius-sm); font-size: 15px; font-weight: 500;
  transition: background 0.2s, transform 0.15s; cursor: pointer; border: none;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  display: inline-block; background: var(--bg-card); color: var(--accent); padding: 10px 24px;
  border-radius: var(--radius-sm); font-size: 15px; font-weight: 500;
  border: 1px solid var(--border); transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.btn-secondary:hover { background: var(--accent-light); border-color: var(--accent); transform: translateY(-1px); }
.btn-secondary:active { transform: translateY(0); }

/* ===== Timeline (Career) ===== */
.timeline { position: relative; padding-left: 200px; }
.timeline::before {
  content: ''; position: absolute; left: 178px; top: 0; bottom: 0;
  width: 2px; background: var(--border);
}
.timeline-item { position: relative; margin-bottom: 0; }
.timeline-item:last-child .timeline-card { margin-bottom: 0; }

.timeline-dot {
  position: absolute; left: -28px; top: 7px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--border);
  border: 3px solid var(--bg); box-shadow: 0 0 0 2px var(--border); z-index: 2;
}
.timeline-item.current .timeline-dot {
  background: var(--accent); box-shadow: 0 0 0 2px var(--accent);
}

.timeline-date {
  position: absolute; top: 4px; left: -200px; width: 170px;
  text-align: right; font-size: 15px; color: var(--text-muted); white-space: nowrap;
  padding-right: 26px; line-height: 1.4;
}

.timeline-card {
  background: var(--bg-card); border-radius: var(--radius-md); padding: 20px 24px;
  margin-bottom: 28px; border: 1px solid var(--border-light);
  border-left: 3px solid var(--border); transition: border-color 0.2s, box-shadow 0.2s;
}
.timeline-card:hover { box-shadow: var(--shadow-sm); }
.timeline-item.current .timeline-card { border-left-color: var(--accent); }

.timeline-card-header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.timeline-position { font-size: 18px; font-weight: 700; color: var(--text); }
.timeline-company { font-size: 15px; color: var(--accent); font-weight: 500; }

.timeline-card-body { display: none; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-light); }
.timeline-card.expanded .timeline-card-body { display: block; }

.timeline-summary { font-size: 15px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 12px; }
.timeline-detail-row { display: flex; gap: 16px; margin-top: 12px; }
.timeline-detail-col { flex: 1; }
.timeline-detail-label {
  font-size: 12px; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 1.5px; margin-bottom: 6px; font-weight: 600;
}
.timeline-detail-text { font-size: 15px; color: var(--text-secondary); line-height: 1.7; }
.timeline-metrics { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.timeline-metric {
  font-size: 12px; background: var(--accent-light); padding: 3px 10px;
  border-radius: 4px; color: var(--accent); font-weight: 500;
  border: 1px solid var(--accent-soft);
}

.timeline-toggle {
  font-size: 13px; color: var(--accent); cursor: pointer;
  background: var(--accent-light); border: 1px solid var(--accent-soft);
  border-radius: 6px; padding: 6px 14px; font-weight: 500;
  margin-top: 10px; transition: all 0.2s; display: inline-flex; align-items: center; gap: 4px;
}
.timeline-toggle:hover {
  background: var(--accent); color: #fff; border-color: var(--accent);
}

/* ===== Projects ===== */
.projects-grid { display: flex; flex-direction: column; gap: 20px; }
.project-card {
  background: var(--bg-card); border-radius: var(--radius-md); padding: 24px;
  border: 1px solid var(--border-light); border-left: 3px solid var(--accent);
  transition: box-shadow 0.2s;
}
.project-card:hover { box-shadow: var(--shadow-md); }
.project-meta { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.project-date { font-size: 14px; color: var(--text-muted); }
.project-role {
  font-size: 13px; color: var(--accent); background: var(--accent-light);
  padding: 2px 10px; border-radius: 10px; font-weight: 500;
}
.project-card h3 { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.project-context, .project-action, .project-result { font-size: 15px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 8px; }
.project-context strong, .project-action strong, .project-result strong { color: var(--text); font-weight: 600; }
.project-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.project-tags span {
  font-size: 12px; background: var(--accent-light); color: var(--accent);
  padding: 3px 10px; border-radius: 4px; font-weight: 500;
}

/* ===== Skills ===== */
.skills-layout { display: flex; flex-direction: column; gap: 40px; margin-bottom: 40px; }
.skills-radar {
  position: relative; width: 100%; max-width: 520px; margin: 0 auto;
}
.radar-chart { width: 100%; height: auto; display: block; }
/* radar background polygons */
.radar-bg-ring { fill: none; stroke: var(--border); stroke-width: 1; }
.radar-fill { fill: var(--accent); fill-opacity: 0.1; stroke: var(--accent); stroke-width: 2; }
.radar-dot { fill: var(--accent); }
.radar-label { font-size: 13px; fill: var(--text); font-weight: 600; }
.radar-center-circle {
  fill: var(--bg-card); stroke: var(--border); stroke-width: 1;
}
.radar-center-text { font-size: 13px; fill: var(--text-muted); text-anchor: middle; }

.skills-bars { display: flex; flex-direction: column; gap: 18px; max-width: 500px; margin: 0 auto; width: 100%; }
.skill-bar-header { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 4px; }
.skill-bar-header span:first-child { font-weight: 600; color: var(--text); }
.skill-bar-header span:last-child { color: var(--accent); font-weight: 600; }
.skill-bar-track {
  height: 6px; background: var(--border-light); border-radius: 3px; overflow: hidden;
}
.skill-bar-fill {
  height: 100%; background: var(--accent); border-radius: 3px;
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1); width: 0;
}

.methodology { margin-top: 32px; }
.section-subtitle { font-size: 16px; color: var(--text); font-weight: 600; margin-bottom: 12px; }
.method-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.method-tag {
  font-size: 14px; background: var(--bg-card); color: var(--text-secondary);
  padding: 6px 14px; border-radius: 6px; border: 1px solid var(--border);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.method-tag:hover { background: var(--accent-light); color: var(--accent); border-color: var(--accent); }

/* ===== Companies ===== */
.companies-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.company-card {
  background: var(--bg-card); border-radius: var(--radius-md); padding: 24px 16px 20px;
  text-align: center; cursor: pointer; transition: all 0.25s;
  border: 1px solid var(--border-light); position: relative; overflow: hidden;
}
.company-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; border-radius: 0; opacity: 0.85;
}
.company-card[data-company-id="shein"]::before  { background: var(--c-shein); }
.company-card[data-company-id="urbanic"]::before  { background: var(--c-urbanic); }
.company-card[data-company-id="banggood"]::before { background: var(--c-banggood); }
.company-card[data-company-id="hm"]::before       { background: var(--c-hm); }
.company-card[data-company-id="celio"]::before    { background: var(--c-celio); }
.company-card[data-company-id="llbean"]::before   { background: var(--c-llbean); }

.company-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--border); }
.company-card.expanded { grid-column: 1 / -1; text-align: left; cursor: default; padding: 24px; }
.company-card.expanded:hover { transform: none; }
.company-card-logo { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.company-card-period { font-size: 13px; color: var(--text-muted); }
.company-detail { display: none; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-light); }
.company-card.expanded .company-detail { display: flex; gap: 20px; }
.company-detail-col { flex: 1; }
.company-detail-label {
  font-size: 12px; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 1.5px; margin-bottom: 6px; font-weight: 600;
}
.company-detail-text { font-size: 15px; color: var(--text-secondary); line-height: 1.7; }

/* ===== Education ===== */
.edu-card {
  background: var(--bg-card); border-radius: var(--radius-md); padding: 48px 32px;
  text-align: center; max-width: 480px; margin: 0 auto;
  border: 1px solid var(--border-light);
}
.edu-icon {
  width: 56px; height: 56px; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
}
.edu-icon svg { width: 36px; height: 36px; color: var(--accent); }
.edu-school { font-size: 24px; font-weight: 700; color: var(--text); }
.edu-major { font-size: 16px; color: var(--text-secondary); margin-top: 6px; }
.edu-year { font-size: 14px; color: var(--text-muted); margin-top: 6px; }
.edu-divider { width: 40px; height: 1px; background: var(--border); margin: 20px auto; }
.edu-desc { font-size: 15px; color: var(--text-secondary); line-height: 1.8; text-align: left; max-width: 520px; margin: 0 auto; }

/* ===== Contact ===== */
.contact-card {
  background: var(--bg-card); border-radius: var(--radius-md); padding: 36px;
  max-width: 520px; margin: 0 auto; border: 1px solid var(--border-light);
}
.contact-item { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.contact-icon {
  width: 42px; height: 42px; background: var(--accent-light); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.contact-icon svg { width: 20px; height: 20px; color: var(--accent); }
.contact-label { font-size: 12px; color: var(--text-muted); }
.contact-value { font-size: 16px; color: var(--text); }
.contact-dl { display: block; text-align: center; margin-top: 28px; }

/* ===== Animations ===== */
.fade-in { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* page transition (lightweight, no framework needed) */
.page {
  animation: pageIn 0.35s ease;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== Theme Toggle ===== */
.nav-theme-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: none; border: 1px solid var(--border);
  cursor: pointer; transition: border-color 0.2s, background 0.2s;
  margin-left: 8px; flex-shrink: 0;
}
.nav-theme-btn:hover { border-color: var(--accent); background: var(--accent-light); }
.nav-theme-btn svg { width: 18px; height: 18px; color: var(--text-secondary); transition: color 0.2s; }
.nav-theme-btn:hover svg { color: var(--accent); }

/* show/hide based on theme */
.theme-icon-sun  { display: none; }
.theme-icon-moon { display: block; }
[data-theme="dark"] .theme-icon-sun  { display: block; }
[data-theme="dark"] .theme-icon-moon { display: none; }

/* auto mode: show based on system */
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] .theme-icon-sun  { display: block; }
  [data-theme="auto"] .theme-icon-moon { display: none; }
}

/* ===== Language Switcher ===== */
.nav-lang-btn {
  margin-left: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 6px; padding: 5px 10px; font-size: 13px;
  color: var(--text-secondary); cursor: pointer; transition: border-color 0.2s, color 0.2s;
}
.nav-lang-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Footer (optional, preserved in case of future use) ===== */
.site-footer {
  text-align: center; padding: 32px; font-size: 13px;
  color: var(--text-muted); border-top: 1px solid var(--border-light);
}

/* ===== Responsive: Tablet ===== */
@media (max-width: 1024px) {
  .hero-content { flex-direction: column; align-items: center; text-align: center; gap: 32px; }
  .hero-stats { justify-content: center; }
  .hero-cta { justify-content: center; }
  .skills-layout { gap: 32px; }
  .companies-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Responsive: Mobile ===== */
@media (max-width: 768px) {
  .nav-inner { padding: 0 16px; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; position: absolute; top: 56px; left: 0; right: 0;
    background: var(--bg-card); flex-direction: column; padding: 16px 0; gap: 0;
    border-bottom: 1px solid var(--border-light); box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-link { padding: 12px 24px; border-bottom: none; font-size: 16px; }
  .nav-link.active { background: var(--accent-light); border-bottom: none; }

  .page-container { padding: 40px 16px 64px; }
  .page-header { margin-bottom: 36px; }
  .page-title { font-size: 28px; }

  .hero { padding: 40px 16px 40px; }
  .hero-content { gap: 24px; }
  .hero-photo { width: 180px; height: 180px; }
  .hero-name { font-size: 32px; }
  .hero-title { font-size: 16px; }
  .hero-stats { gap: 14px; flex-wrap: wrap; }
  .stat-num { font-size: 26px; }
  .stat-divider { display: none; }
  .hero-cta { flex-direction: column; align-items: center; }
  .hero-methods { justify-content: center; }

  .timeline { padding-left: 20px; }
  .timeline::before { left: 9px; }
  .timeline-dot { left: -17px; top: 5px; width: 10px; height: 10px; }
  .timeline-date {
    position: static; width: auto; text-align: left; padding-right: 0;
    display: block; margin-bottom: 4px; font-size: 14px;
  }
  .timeline-detail-row { flex-direction: column; }

  .skills-layout { gap: 24px; }

  .companies-grid { grid-template-columns: 1fr; }
  .company-card.expanded .company-detail { flex-direction: column; }

  .contact-card { padding: 24px; }
  .edu-card { padding: 32px 20px; }

  .project-meta { flex-direction: column; align-items: flex-start; gap: 6px; }

  .page {
    animation: pageInMobile 0.3s ease;
  }
  @keyframes pageInMobile {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
}

/* ===== Blog ===== */
.blog-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.blog-filter-btn {
  padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-secondary); font-size: 13px;
  cursor: pointer; transition: all 0.15s;
}
.blog-filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.blog-filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.blog-card {
  background: var(--bg-card); border-radius: var(--radius-md); padding: 28px;
  border: 1px solid var(--border-light); transition: transform 0.15s, box-shadow 0.15s;
  display: flex; flex-direction: column;
}
.blog-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.blog-card-title { font-size: 20px; font-weight: 700; margin: 6px 0 8px; line-height: 1.35; }
.blog-card-title a { color: var(--text); }
.blog-card-title a:hover { color: var(--accent); }
.blog-card-date { font-size: 12px; color: var(--text-muted); }
.blog-card-summary { font-size: 14px; color: var(--text-secondary); line-height: 1.7; margin: 8px 0 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card-category {
  font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  color: var(--accent); background: var(--accent-light); display: inline-block;
  padding: 2px 8px; border-radius: 10px;
}
.blog-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.blog-tag {
  font-size: 11px; padding: 3px 10px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text-muted); cursor: pointer; transition: all 0.15s;
}
.blog-tag:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.blog-card-readmore { font-size: 13px; font-weight: 600; color: var(--accent); margin-top: auto; }
.blog-empty { text-align: center; padding: 40px 0; color: var(--text-muted); }

.blog-back-link { display: inline-block; margin-bottom: 32px; font-size: 14px; color: var(--accent); }
.blog-post-title { font-size: 32px; font-weight: 700; line-height: 1.25; margin-bottom: 8px; }
.blog-post-meta { display: flex; gap: 12px; font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.blog-post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
.blog-post-tag {
  font-size: 11px; padding: 3px 10px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text-muted); cursor: pointer; transition: all 0.15s;
}
.blog-post-tag:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.blog-post-body { font-size: 16px; line-height: 1.85; }
.blog-post-body h1 { font-size: 28px; margin: 32px 0 12px; }
.blog-post-body h2 { font-size: 24px; margin: 32px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border-light); }
.blog-post-body h3 { font-size: 20px; margin: 24px 0 8px; }
.blog-post-body h4 { font-size: 18px; margin: 20px 0 8px; }
.blog-post-body p { margin: 0 0 16px; }
.blog-post-body ul, .blog-post-body ol { margin: 0 0 16px; padding-left: 20px; }
.blog-post-body li { margin-bottom: 6px; }
.blog-post-body table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.blog-post-body th, .blog-post-body td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; font-size: var(--font-sm, 14px); }
.blog-post-body th { background: var(--accent-light); font-weight: 600; }
[data-theme="dark"] .blog-post-body th { background: var(--accent-soft); }
@media (prefers-color-scheme: dark) { [data-theme="auto"] .blog-post-body th { background: var(--accent-soft); } }

[data-theme="dark"] .blog-post-body th,
[data-theme="dark"] .blog-post-body td { border-color: #4a5060; }
@media (prefers-color-scheme: dark) { [data-theme="auto"] .blog-post-body th, [data-theme="auto"] .blog-post-body td { border-color: #4a5060; } }
.blog-post-body blockquote {
  border-left: 3px solid var(--accent); padding: 12px 16px; margin: 16px 0;
  color: var(--text-secondary); background: var(--accent-light); border-radius: 0 4px 4px 0;
}
[data-theme="dark"] .blog-post-body blockquote,
@media (prefers-color-scheme: dark) { [data-theme="auto"] .blog-post-body blockquote { background: var(--accent-soft); } }
.blog-post-body code {
  background: var(--bg); padding: 2px 6px; border-radius: 4px; font-size: 0.9em;
}
.blog-post-body pre { background: var(--bg); padding: 16px; border-radius: var(--radius-sm); overflow-x: auto; margin: 16px 0; }
.blog-post-body pre code { background: none; padding: 0; }
.blog-post-body hr { border: 0; border-top: 1px solid var(--border-light); margin: 28px 0; }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--border-light); background: var(--bg-card); }
.footer-inner {
  max-width: 1100px; margin: 0 auto; padding: 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.footer-brand { display: flex; align-items: center; gap: 8px; }
.footer-name { font-weight: 600; color: var(--text); font-size: 14px; }
.footer-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.footer-role { font-size: 12px; color: var(--text-muted); }
.footer-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 6px; }
.footer-sep { color: var(--border); }
.footer-copy { font-size: 12px; color: var(--text-muted); }

@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-card { padding: 20px; }
  .blog-post-title { font-size: 24px; }
  .blog-post-body { font-size: 15px; }
  .blog-post-body h2 { font-size: 20px; }
  .blog-filters { gap: 6px; }
  .blog-filter-btn { font-size: 12px; padding: 4px 10px; }
  .blog-card { padding: 20px; }
  .footer-inner { flex-direction: column; text-align: center; padding: 24px 16px; }
  .footer-brand { flex-direction: column; gap: 4px; }
  .footer-dot { display: none; }
}
