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

:root {
  --brand: #0f172a;
  --accent: #2563eb;
  --accent-light: #eff6ff;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg: #f8fafc;
  --white: #ffffff;
  --text: #1e293b;
  --text-light: #475569;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --shadow-hover: 0 4px 12px rgba(37,99,235,.15), 0 8px 32px rgba(0,0,0,.08);
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

a { color: inherit; text-decoration: none; }

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

/* ── NAV ── */
.nav {
  background: var(--brand);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
.nav-inner {
  max-width: 1100px;
  margin: auto;
  padding: 0 24px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: #fff;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 24px; }
.nav-links a {
  color: #cbd5e1;
  font-size: .9rem;
  font-weight: 500;
  transition: color .2s;
}
.nav-links a:hover { color: #fff; }

/* ── HERO (index only) ── */
.hero {
  background: var(--brand);
  padding: 56px 24px 64px;
  text-align: center;
}
.hero h1 {
  color: #fff;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -.03em;
  max-width: 680px;
  margin: 0 auto 12px;
  line-height: 1.2;
}
.hero p {
  color: #94a3b8;
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto;
}

/* ── ABOUT ── */
.about {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 48px 24px;
}
.about-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 32px;
}
.about-icon {
  font-size: 3rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 4px;
}
.about-text h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -.02em;
}
.about-text p {
  color: var(--text-light);
  line-height: 1.8;
  font-size: .975rem;
  max-width: 740px;
  margin-bottom: 20px;
}
.about-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.about-pills span {
  background: var(--accent-light);
  color: var(--accent);
  font-size: .8rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
}
@media (max-width: 600px) {
  .about-inner { flex-direction: column; gap: 16px; }
  .about-icon { font-size: 2.25rem; }
}

/* ── MAIN CONTAINER ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── SECTION HEADER ── */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 40px 0 24px;
}
.section-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}
.section-header a {
  font-size: .875rem;
  color: var(--accent);
  font-weight: 500;
}
.section-header a:hover { text-decoration: underline; }

/* ── POST GRID ── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 24px;
  padding-bottom: 64px;
}

/* ── CARD ── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.card-img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: var(--accent-light);
}
.card-img-placeholder {
  width: 100%;
  height: 190px;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.card-body {
  padding: 20px 22px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-cat {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 10px;
}
.card:hover .card-title { color: var(--accent); }
.card-excerpt {
  font-size: .875rem;
  color: var(--text-light);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.card-date { display: flex; align-items: center; gap: 5px; }
.card-read {
  color: var(--accent);
  font-weight: 600;
  font-size: .8rem;
}
.card-read:hover { text-decoration: underline; }

/* ── FEATURED CARD (first post, full width) ── */
.post-grid .card.featured {
  grid-column: 1 / -1;
  flex-direction: row;
}
.post-grid .card.featured .card-img-placeholder,
.post-grid .card.featured .card-img {
  width: 420px;
  min-width: 280px;
  height: auto;
  flex-shrink: 0;
  border-radius: 0;
}
.post-grid .card.featured .card-body { padding: 32px 36px; }
.post-grid .card.featured .card-title { font-size: 1.4rem; }
.post-grid .card.featured .card-excerpt { -webkit-line-clamp: 4; }

/* ── SINGLE POST ── */
.post-hero {
  background: var(--brand);
  padding: 40px 24px 48px;
}
.post-hero .breadcrumb {
  color: #64748b;
  font-size: .85rem;
  margin-bottom: 16px;
}
.post-hero .breadcrumb a { color: #94a3b8; }
.post-hero .breadcrumb a:hover { color: #fff; }
.post-hero .breadcrumb span { margin: 0 6px; }
.post-hero h1 {
  color: #fff;
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -.03em;
  max-width: 800px;
  line-height: 1.25;
  margin-bottom: 16px;
}
.post-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: .875rem;
  color: #94a3b8;
}
.post-hero-meta .cat-badge {
  background: var(--accent);
  color: #fff;
  padding: 3px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.post-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  padding: 48px 0 72px;
  align-items: start;
}

/* Article content */
.post-content {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 44px;
}
.post-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 36px 0 14px;
  color: var(--text);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-light);
}
.post-content h2:first-child { margin-top: 0; }
.post-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 28px 0 10px;
  color: var(--text);
}
.post-content p {
  margin-bottom: 16px;
  color: var(--text-light);
  line-height: 1.8;
}
.post-content ul, .post-content ol {
  margin: 0 0 20px 20px;
  color: var(--text-light);
  line-height: 1.85;
}
.post-content li { margin-bottom: 6px; }
.post-content strong { color: var(--text); font-weight: 700; }
.post-content a { color: var(--accent); text-decoration: underline; }
.post-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 14px 20px;
  margin: 24px 0;
  background: var(--accent-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text);
}
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: .9rem;
}
.post-content th {
  background: var(--brand);
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
}
.post-content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-light);
}
.post-content tr:nth-child(even) td { background: var(--bg); }

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.sidebar-widget {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.sidebar-widget h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-light);
  color: var(--text);
}
.related-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.related-list li a {
  font-size: .875rem;
  color: var(--text-light);
  font-weight: 500;
  line-height: 1.4;
  display: block;
}
.related-list li a:hover { color: var(--accent); }
.related-list li span {
  display: block;
  font-size: .75rem;
  color: var(--muted);
  margin-top: 2px;
}
.cta-widget {
  background: linear-gradient(135deg, var(--brand) 0%, #1e3a5f 100%);
  color: #fff;
}
.cta-widget h3 { color: #fff; border-color: rgba(255,255,255,.15); }
.cta-widget p { font-size: .875rem; color: #94a3b8; margin-bottom: 16px; }
.btn-cta {
  display: block;
  text-align: center;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 700;
  transition: background .2s, transform .15s;
}
.btn-cta:hover { background: #1d4ed8; transform: translateY(-1px); }

/* ── FOOTER ── */
footer {
  background: var(--brand);
  color: #64748b;
  font-size: .875rem;
  padding: 32px 24px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,.06);
}
footer a { color: #94a3b8; }
footer a:hover { color: #fff; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .post-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .post-grid .card.featured { flex-direction: column; }
  .post-grid .card.featured .card-img-placeholder,
  .post-grid .card.featured .card-img { width: 100%; height: 220px; }
  .post-grid .card.featured .card-body { padding: 22px; }
}
@media (max-width: 600px) {
  .post-grid { grid-template-columns: 1fr; }
  .post-content { padding: 24px 20px; }
  .nav-links { display: none; }
}
