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

:root {
  --bg:         #f5f5f0;
  --white:      #ffffff;
  --navy:       #1a2463;
  --navy-hover: #111a4d;
  --text:       #111827;
  --text-muted: #6b7280;
  --border:     #e5e7eb;
  --card-bg:    #ffffff;
  --tag-bg:     #ebebeb;
  --tag-text:   #4b5563;
  --yellow:     #f5c000;
  --radius:     8px;
  --font:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-w:      1200px;
}

html { font-size: 16px; height: 100%; }
body {
  background: var(--bg);
  font-family: var(--font);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body > nav   { flex-shrink: 0; }
body > .footer { flex-shrink: 0; margin-top: auto; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ── Nav ─────────────────────────────────────────────────── */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand { display: flex; align-items: center; gap: 8px; }
.nav-brand img { height: 22px; }
.nav-brand-sub { font-size: 13px; color: var(--text-muted); }
.nav-links { list-style: none; display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}
.nav-links a:hover { background: #f0f0f0; color: var(--text); }
.nav-links a.active { background: var(--navy); color: #fff; }

/* ── Layout ──────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.page-wrap  { padding: 64px 0 100px; flex: 1; }

/* ── Page Header ─────────────────────────────────────────── */
.page-header { margin-bottom: 48px; }
.page-header h1 { font-size: 36px; font-weight: 700; margin-bottom: 8px; }
.page-header p  { font-size: 16px; color: var(--text-muted); }

/* ── Hero ────────────────────────────────────────────────── */
.hero { padding: 80px 0 72px; }
.hero h1 {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  max-width: 560px;
}
.hero p {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 480px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  font-family: var(--font);
}
.btn-primary  { background: var(--navy); color: white; border-color: var(--navy); }
.btn-primary:hover  { background: var(--navy-hover); }
.btn-secondary { background: white; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: #f9f9f9; }

/* ── Section ─────────────────────────────────────────────── */
.section { margin-bottom: 64px; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 600;
}
.section-link { font-size: 13px; color: var(--text-muted); }
.section-link:hover { color: var(--text); }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: box-shadow 0.15s;
  display: block;
}
.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.07); }

.card-grid   { display: grid; gap: 16px; }
.card-grid-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 960px) { .card-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .card-grid-2, .card-grid-3 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .page-header h1 { font-size: 28px; }
}

/* ── Tags ────────────────────────────────────────────────── */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.tag {
  padding: 3px 10px;
  background: var(--tag-bg);
  border-radius: 4px;
  font-size: 12px;
  color: var(--tag-text);
  font-weight: 500;
}

/* ── Status Badge ────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 12px;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.badge-active            { background: #dcfce7; color: #166534; }
.badge-active::before    { background: #16a34a; }
.badge-progress          { background: #fef9c3; color: #854d0e; }
.badge-progress::before  { background: #ca8a04; }
.badge-archived          { background: #f3f4f6; color: #374151; }
.badge-archived::before  { background: #9ca3af; }

/* ── Project Card ────────────────────────────────────────── */
.project-card-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.project-card-desc  { font-size: 14px; color: var(--text-muted); line-height: 1.55; }

/* ── Blog Card ───────────────────────────────────────────── */
.blog-card-meta  { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.blog-card-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; line-height: 1.4; color: var(--text); }
.blog-card-desc  {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Filter Bar ──────────────────────────────────────────── */
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; align-items: center; }
.filter-search {
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: white;
  font-size: 13px;
  font-family: var(--font);
  color: var(--text);
  outline: none;
  width: 220px;
}
.filter-search:focus { border-color: var(--navy); }
.filter-search::placeholder { color: var(--text-muted); }
.filter-btn {
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: white;
  font-size: 13px;
  font-family: var(--font);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 500;
}
.filter-btn:hover  { border-color: var(--navy); color: var(--navy); }
.filter-btn.active { background: var(--navy); color: white; border-color: var(--navy); }

/* ── Article ─────────────────────────────────────────────── */
.article-wrap, .container { flex: 1; }

.article-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 100px;
}
.article-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.article-back:hover { color: var(--text); }
.article-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.article-title {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}
.article-desc {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.6;
}
.article-divider { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
.article-tags { margin-bottom: 24px; }
.article-body { font-size: 16px; line-height: 1.75; }
.article-body h2 { font-size: 24px; font-weight: 700; margin: 40px 0 16px; }
.article-body h3 { font-size: 20px; font-weight: 600; margin: 32px 0 12px; }
.article-body p  { margin-bottom: 20px; }
.article-body ul, .article-body ol { padding-left: 24px; margin-bottom: 20px; }
.article-body li { margin-bottom: 6px; }
.article-body code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-size: 14px; }
.article-body pre { background: #1e1e2e; color: #cdd6f4; padding: 20px; border-radius: 8px; overflow-x: auto; margin-bottom: 20px; }
.article-body pre code { background: none; color: inherit; padding: 0; }

/* ── Footer ──────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); background: var(--white); }
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }
