/* ═══════════════════════════════════════
   PorsiKita — style-blog.css
   Blog index + Article pages
════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --bg:         #f1f1f1;
  --surface:    #ffffff;
  --border:     #e4e4e4;
  --border2:    #eeeeee;
  --text:       #1a1a1a;
  --text2:      #3a3a3a;
  --text3:      #888888;
  --accent:     #007ffa;
  --accent-dim: rgba(0,127,250,0.09);
  --accent-mid: rgba(0,127,250,0.18);
  --green:      #22c55e;
  --orange:     #f59e0b;
  --shadow-sm:  0 1px 4px rgba(0,0,0,0.06);
  --shadow:     0 2px 16px rgba(0,0,0,0.08);
  --radius:     16px;
  --radius-sm:  10px;
  --font:       'Product Sans','Google Sans','Plus Jakarta Sans',sans-serif;
  --font-head:  'Plus Jakarta Sans',sans-serif;
  --font-mono:  'IBM Plex Mono',monospace;
}

*,*::before,*::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; -webkit-text-size-adjust:100%; }
body { font-family:var(--font); background:var(--bg); color:var(--text); min-height:100vh; line-height:1.7; overflow-x:hidden; }

/* ── TOPBAR ── */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-logo img {
  height: 32px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  object-position: left center;
  display: block;
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
}

.topbar-logo  {
  height: 32px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  object-position: left center;
  display: block;
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
}

.topbar-right { display: flex; align-items: center; gap: 4px; }

.topbar-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--text3);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.15s;
}

.topbar-link:hover { color: var(--text); background: var(--bg); }
.topbar-link.active { color: var(--accent); background: var(--accent-dim); }

/* ── BLOG HERO ── */
.blog-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 52px 24px 44px;
}

.blog-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.blog-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-mid);
  border-radius: 100px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.blog-hero-title {
  font-family: var(--font-head);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -1.5px;
  line-height: 1.12;
  margin-bottom: 12px;
}

.blog-hero-sub {
  font-size: 15px;
  color: var(--text3);
  max-width: 520px;
  line-height: 1.65;
}

/* ── BLOG WRAP ── */
.blog-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 24px 80px;
}

/* ── TAG FILTER ── */
.tag-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.tag-btn {
  padding: 6px 16px;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text3);
  cursor: pointer;
  transition: all 0.15s;
}

.tag-btn:hover { border-color: var(--accent); color: var(--accent); }
.tag-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── POSTS GRID ── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ── POST CARD ── */
.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: all 0.18s;
  box-shadow: var(--shadow-sm);
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #d0d0d0;
}

.post-card-cover {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--bg);
  display: block;
}

.post-card-cover-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--border);
}

.post-card-body {
  padding: 18px 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.post-card-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 2px 8px;
  border-radius: 100px;
}

.post-card-title {
  font-family: var(--font-head);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-desc {
  font-size: 13px;
  color: var(--text3);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.post-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border2);
}

.post-card-date {
  font-size: 11px;
  color: var(--text3);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}

.post-card-read {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── EMPTY STATE ── */
.empty-state {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
}

.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-title { font-family: var(--font-head); font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.empty-sub { font-size: 13.5px; color: var(--text3); }

/* ═══════════════════════════════════════
   ARTICLE PAGE
════════════════════════════════════════ */

.article-topbar-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text3);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 100px;
  background: var(--bg);
  border: 1px solid var(--border);
  transition: all 0.15s;
}

.article-topbar-back:hover { color: var(--accent); border-color: var(--accent); }

.article-wrap {
  max-width: 740px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.article-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.article-tag {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-mid);
  padding: 3px 10px;
  border-radius: 100px;
}

.article-title {
  font-family: var(--font-head);
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -1px;
  line-height: 1.18;
  margin-bottom: 14px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.article-meta-item {
  font-size: 12px;
  color: var(--text3);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}

.article-meta-item i { color: var(--accent); font-size: 11px; }

.article-cover {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 32px;
  display: block;
  max-height: 420px;
  object-fit: cover;
}

/* ── ARTICLE PROSE ── */
.article-prose { color: var(--text2); font-size: 15px; line-height: 1.85; }

.article-prose h1 {
  font-family: var(--font-head);
  font-size: 28px; font-weight: 800;
  color: var(--text); margin: 40px 0 14px;
  letter-spacing: -0.5px; line-height: 1.25;
}

.article-prose h2 {
  font-family: var(--font-head);
  font-size: 22px; font-weight: 700;
  color: var(--text); margin: 36px 0 12px;
  letter-spacing: -0.3px;
}

.article-prose h3 {
  font-family: var(--font-head);
  font-size: 17px; font-weight: 700;
  color: var(--text2); margin: 28px 0 10px;
}

.article-prose p { margin-bottom: 18px; }
.article-prose p:last-child { margin-bottom: 0; }

.article-prose strong { color: var(--text); font-weight: 700; }
.article-prose em { font-style: italic; }

.article-prose a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-mid);
  transition: border-color 0.15s;
}

.article-prose a:hover { border-color: var(--accent); }

.article-prose ul, .article-prose ol {
  padding-left: 22px;
  margin-bottom: 18px;
}

.article-prose li { margin-bottom: 8px; line-height: 1.75; }

.article-prose blockquote {
  border-left: 3px solid var(--accent);
  background: var(--accent-dim);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px;
  margin: 24px 0;
  font-style: italic;
  color: var(--text2);
}

.article-prose code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text);
}

.article-prose pre {
  background: var(--text);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  overflow-x: auto;
  margin: 20px 0;
}

.article-prose pre code {
  background: none;
  border: none;
  color: #e4e4e4;
  font-size: 13px;
  padding: 0;
}

.article-prose img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  margin: 16px 0;
  display: block;
}

.article-prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

.article-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 13.5px;
}

.article-prose th {
  text-align: left;
  padding: 10px 14px;
  background: var(--bg);
  color: var(--text3);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

.article-prose td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border2);
  vertical-align: top;
}

/* ── ARTICLE FOOTER ── */
.article-source {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-top: 40px;
  font-size: 12px;
  color: var(--text3);
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-source i { color: var(--green); }

.article-nav {
  display: flex;
  gap: 12px;
  margin-top: 40px;
}

.article-nav a {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-decoration: none;
  transition: all 0.15s;
}

.article-nav a:hover { border-color: var(--accent); }
.article-nav-label { font-size: 10.5px; color: var(--text3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 5px; }
.article-nav-title { font-size: 13.5px; font-weight: 700; color: var(--text); line-height: 1.4; }

/* ── BLOG FOOTER ── */
.blog-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 28px 24px;
}

.blog-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
  font-size: 11.5px;
  color: var(--text3);
  line-height: 1.8;
}

.blog-footer-inner strong { color: var(--text2); font-weight: 600; }

.footer-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 4px;
  margin-top: 12px;
}

.footer-nav a { font-size: 11px; color: var(--text3); text-decoration: none; font-weight: 500; transition: color 0.15s; }
.footer-nav a:hover { color: var(--accent); }
.footer-dot { font-size: 11px; color: var(--border); }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity:0; transform:translateY(10px); }
  to   { opacity:1; transform:translateY(0); }
}

.post-card { animation: fadeUp 0.3s ease both; }
.post-card:nth-child(1) { animation-delay: 0.04s; }
.post-card:nth-child(2) { animation-delay: 0.08s; }
.post-card:nth-child(3) { animation-delay: 0.12s; }
.post-card:nth-child(4) { animation-delay: 0.16s; }
.post-card:nth-child(5) { animation-delay: 0.20s; }
.post-card:nth-child(6) { animation-delay: 0.24s; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .posts-grid { grid-template-columns: 1fr; gap: 14px; }
  .blog-wrap { padding: 24px 16px 60px; }
  .article-wrap { padding: 28px 16px 60px; }
  .blog-hero { padding: 36px 16px 28px; }
  .article-nav { flex-direction: column; }
  .topbar-inner { padding: 0 16px; }
}