:root {
  --accent: #F59E0B;
  --accent-dark: #D97706;
  --accent-soft: #FEF3C7;
  --accent-gradient: linear-gradient(135deg, #ff6b5e 0%, #ffb347 100%);
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-alt: #F3F4F6;
  --border: #E5E7EB;
  --text: #111827;
  --muted: #6B7280;
  --muted-2: #9CA3AF;
  --success: #10B981;
  --danger: #EF4444;
  --shadow: 0 14px 45px rgba(15, 23, 42, .08);
  --shadow-sm: 0 3px 12px rgba(15, 23, 42, .06);
  --radius: 18px;
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }

.blog-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid rgba(229,231,235,.85);
  backdrop-filter: blur(16px);
}
.blog-nav-inner {
  width: min(1180px, calc(100% - 40px));
  height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  letter-spacing: -.03em;
  font-size: 1.08rem;
}
.brand-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-gradient);
  box-shadow: 0 6px 18px rgba(255, 107, 94, .24);
}
.nav-link {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 600;
}
.nav-link:hover { color: var(--accent-dark); }

.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.preview-bar {
  margin: 24px auto 0;
  width: min(1180px, calc(100% - 40px));
  border: 1px dashed #F59E0B;
  background: #FFF7E6;
  border-radius: 14px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  color: #92400E;
  font-size: .84rem;
}
.preview-bar strong { font-weight: 700; }
.preview-bar a { font-weight: 700; text-decoration: underline; }

.article-wrap {
  padding: 54px 0 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 38px;
  align-items: start;
}
.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.article-header { padding: 38px 42px 28px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.article-title {
  margin: 16px 0 14px;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -.045em;
}
.article-excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 1.06rem;
  max-width: 800px;
}
.article-meta {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  color: var(--muted-2);
  font-size: .82rem;
  font-weight: 600;
}
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }

.cover {
  width: 100%;
  aspect-ratio: 16 / 8.2;
  object-fit: cover;
  background: linear-gradient(135deg, #FFF7ED, #F3F4F6);
}
.cover-placeholder {
  aspect-ratio: 16 / 8.2;
  background: var(--accent-gradient);
  position: relative;
  overflow: hidden;
}
.cover-placeholder::before,
.cover-placeholder::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
}
.cover-placeholder::before { width: 260px; height: 260px; top: -80px; right: -50px; }
.cover-placeholder::after { width: 180px; height: 180px; bottom: -95px; left: 50px; }

.article-content {
  padding: 38px 42px 46px;
  font-size: 1.03rem;
}
.article-content > :first-child { margin-top: 0; }
.article-content p { margin: 0 0 1.3rem; }
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
  margin: 2rem 0 .8rem;
  line-height: 1.2;
  letter-spacing: -.025em;
}
.article-content h2 { font-size: 1.6rem; }
.article-content h3 { font-size: 1.3rem; }
.article-content h4 { font-size: 1.1rem; }
.article-content a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.article-content blockquote {
  margin: 1.6rem 0;
  padding: 15px 18px;
  border-left: 4px solid var(--accent);
  background: #FFF9ED;
  color: #78350F;
  border-radius: 0 12px 12px 0;
}
.article-content ul,
.article-content ol { margin: 0 0 1.3rem; padding-left: 1.4rem; }
.article-content li { margin: .4rem 0; }
.article-content img { border-radius: 14px; margin: 1.4rem auto; }
.article-content pre,
.article-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.article-content code {
  background: #F3F4F6;
  padding: .14em .35em;
  border-radius: 5px;
  font-size: .9em;
}
.article-content pre {
  overflow-x: auto;
  padding: 16px 18px;
  background: #111827;
  color: #F9FAFB;
  border-radius: 12px;
  margin: 1.5rem 0;
}

.sidebar { display: grid; gap: 18px; }
.side-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.side-title {
  margin: 0 0 14px;
  font-size: .86rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted-2);
}
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  padding: 6px 10px;
  background: var(--surface-alt);
  border-radius: 999px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 600;
}
.read-card p { margin: 0; color: var(--muted); font-size: .9rem; }
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .84rem;
  color: var(--muted);
  font-weight: 700;
}
.back-btn:hover { color: var(--accent-dark); }

.related { padding-bottom: 72px; }
.related-head { display:flex; align-items:end; justify-content:space-between; gap: 15px; margin-bottom: 18px; }
.related-head h2 { margin:0; font-size:1.35rem; letter-spacing:-.03em; }
.related-grid { display:grid; grid-template-columns:repeat(3, 1fr); gap:18px; }
.related-card {
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  overflow:hidden;
  box-shadow:var(--shadow-sm);
  transition:transform .18s ease, box-shadow .18s ease;
}
.related-card:hover { transform:translateY(-3px); box-shadow:var(--shadow); }
.related-image,
.related-placeholder { width:100%; aspect-ratio: 16 / 9; object-fit:cover; background:#F3F4F6; }
.related-placeholder { background:linear-gradient(135deg,#FFF7ED,#FEF3C7); }
.related-body { padding:16px; }
.related-cat { color:var(--accent-dark); font-size:.72rem; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
.related-title { margin:7px 0 8px; font-size:1rem; line-height:1.35; letter-spacing:-.015em; }
.related-excerpt { margin:0; color:var(--muted); font-size:.8rem; line-height:1.5; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }

.empty-state {
  min-height: 55vh;
  display: grid;
  place-items: center;
  padding: 70px 20px;
}
.empty-card {
  max-width: 520px;
  text-align: center;
  padding: 36px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:18px;
  box-shadow:var(--shadow-sm);
}
.empty-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  display:grid;
  place-items:center;
  border-radius:15px;
  background:var(--accent-soft);
  color:var(--accent-dark);
  font-weight:800;
}
.empty-card h1 { margin:0 0 8px; font-size:1.4rem; }
.empty-card p { margin:0 0 18px; color:var(--muted); }
.empty-link { color:var(--accent-dark); font-weight:800; }

.footer { padding: 0 0 38px; color: var(--muted-2); text-align:center; font-size:.78rem; }

@media (max-width: 900px) {
  .article-wrap { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .blog-nav-inner,
  .page-shell,
  .preview-bar { width: min(100% - 24px, 1180px); }
  .blog-nav-inner { height:62px; }
  .article-wrap { padding-top:28px; padding-bottom:45px; }
  .article-header,
  .article-content { padding-left:22px; padding-right:22px; }
  .article-title { font-size:2rem; }
  .sidebar,
  .related-grid { grid-template-columns:1fr; }
  .preview-bar { align-items:flex-start; flex-direction:column; }
}
