/* ─── Design Tokens ─────────────────────────────────────────────── */
:root {
  --bg:     #0A0A0A;
  --bg2:    #111111;
  --bg3:    #1A1A1A;
  --bd:     #222222;
  --bd2:    #2D2D2D;
  --tx:     #E8E0D5;
  --tx2:    #9A9087;
  --tx3:    #5C5650;
  --acc:    #FF6D00;
  --w:      #FFFFFF;
  --f:      'Poppins', system-ui, sans-serif;
  --ease:   cubic-bezier(0.22, 1, 0.36, 1);
  --r:      6px;
  --rl:     12px;
}

/* ─── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body { background: var(--bg); color: var(--tx); font-family: var(--f); font-weight: 300; line-height: 1.7; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ─── Layout ─────────────────────────────────────────────────────── */
.site-wrapper { display: flex; min-height: calc(100vh - 56px); }

/* ─── Header ─────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: 56px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px;
  background: rgba(10,10,10,0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--bd);
}
.header-logo { display: flex; align-items: center; gap: 8px; }
.header-logo-img { width: 24px !important; height: 24px !important; max-width: 24px !important; max-height: 24px !important; border-radius: 50%; object-fit: cover; flex-shrink: 0; display: inline-block !important; }
.header-logo-text { font-family: var(--f); font-size: 0.9rem; font-weight: 600; color: var(--w); letter-spacing: -0.01em; }
.header-nav { display: flex; gap: 28px; }
.header-nav a { font-size: 0.75rem; font-weight: 400; color: var(--tx3); letter-spacing: 0.08em; text-transform: uppercase; transition: color 0.2s; }
.header-nav a:hover { color: var(--tx2); }
.header-nav a.active { color: var(--acc); }

/* ─── Sidebar ────────────────────────────────────────────────────── */
.sidebar {
  width: 268px; flex-shrink: 0;
  position: sticky; top: 56px; height: calc(100vh - 56px);
  overflow-y: auto; scrollbar-width: none;
  border-right: 1px solid var(--bd);
  padding: 36px 28px;
  display: flex; flex-direction: column;
}
.sidebar::-webkit-scrollbar { display: none; }

.profile-avatar-wrap {
  width: 62px; height: 62px; border-radius: 50%;
  overflow: hidden; border: 2px solid var(--bd2);
  margin-bottom: 14px; flex-shrink: 0;
}
.profile-avatar {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 15%;
  display: block;
}
.profile-avatar-placeholder {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--bg3); border: 2px solid var(--bd2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f); font-size: 1.4rem; font-weight: 600; color: var(--acc);
  margin-bottom: 14px;
}
.profile-name { font-family: var(--f); font-size: 1.1rem; font-weight: 600; color: var(--w); margin-bottom: 3px; letter-spacing: -0.01em; }
.profile-role { font-size: 0.72rem; font-weight: 500; color: var(--acc); letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 12px; }
.profile-bio { font-size: 0.82rem; color: var(--tx2); line-height: 1.6; border-left: 2px solid var(--acc); padding-left: 11px; margin-bottom: 28px; }
.sidebar-divider { height: 1px; background: var(--bd); margin-bottom: 20px; }
.sidebar-label { font-size: 0.65rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tx3); margin-bottom: 10px; }
.topics-list { list-style: none; display: flex; flex-direction: column; gap: 1px; margin-bottom: 20px; }
.topics-list a { display: flex; align-items: center; padding: 5px 9px; border-radius: var(--r); font-size: 0.82rem; font-weight: 300; color: var(--tx2); transition: all 0.15s; }
.topics-list a:hover { color: var(--tx); background: var(--bg3); }
.topics-list a.active { color: var(--acc); background: rgba(255,109,0,0.08); }
.topics-list .count { margin-left: auto; font-size: 0.68rem; color: var(--tx3); }
.more-link { font-size: 0.8rem; color: var(--tx2); display: flex; align-items: center; gap: 5px; margin-bottom: 8px; transition: color 0.15s; }
.more-link:hover { color: var(--acc); }
.sidebar-social { margin-top: auto; padding-top: 24px; display: flex; gap: 10px; }
.social-link { width: 32px; height: 32px; border-radius: var(--r); border: 1px solid var(--bd2); display: flex; align-items: center; justify-content: center; color: var(--tx3); transition: all 0.15s; }
.social-link:hover { border-color: var(--acc); color: var(--acc); }

/* ─── Main ───────────────────────────────────────────────────────── */
.main-content { flex: 1; min-width: 0; padding: 40px 52px; max-width: 860px; }

/* Section header */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.section-title { font-size: 0.68rem; font-weight: 500; letter-spacing: 0.13em; text-transform: uppercase; color: var(--tx3); }

/* ─── Post Card ──────────────────────────────────────────────────── */
.posts-list { display: flex; flex-direction: column; }

.post-card {
  display: flex; gap: 18px; padding: 20px 0;
  border-bottom: 1px solid var(--bd);
  animation: fadeUp 0.38s var(--ease) both;
  cursor: pointer;
}
.post-card:first-child { border-top: 1px solid var(--bd); }
.post-card:hover .post-thumb { transform: scale(1.04); }
.post-card:hover .post-title { color: var(--acc); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.post-thumb-wrap { width: 110px; height: 80px; flex-shrink: 0; border-radius: var(--r); overflow: hidden; background: var(--bg3); }
.post-thumb { width: 100%; height: 100%; object-fit: cover; transition: transform 0.38s var(--ease); }
.post-thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--tx3); }
.post-meta-wrap { flex: 1; min-width: 0; }
.post-cats { display: flex; gap: 8px; margin-bottom: 5px; }
.post-cat-tag { font-size: 0.66rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--acc); }
.post-title { font-size: 1.0rem; font-weight: 500; line-height: 1.4; color: var(--w); margin-bottom: 5px; transition: color 0.2s; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-excerpt { font-size: 0.8rem; font-weight: 300; color: var(--tx2); line-height: 1.55; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-date { font-size: 0.7rem; color: var(--tx3); }

/* ─── Single Post ────────────────────────────────────────────────── */
.back-link { display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; font-weight: 400; color: var(--tx2); margin-bottom: 28px; letter-spacing: 0.06em; text-transform: uppercase; transition: color 0.15s; }
.back-link:hover { color: var(--acc); }
.post-hero-image { width: 100%; aspect-ratio: 16/7; object-fit: cover; border-radius: var(--rl); margin-bottom: 36px; }
.post-header { margin-bottom: 36px; padding-bottom: 28px; border-bottom: 1px solid var(--bd); }
.post-header-cats { display: flex; gap: 10px; margin-bottom: 14px; }
.post-header-title { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 700; line-height: 1.2; color: var(--w); letter-spacing: -0.02em; margin-bottom: 18px; }
.post-header-meta { display: flex; align-items: center; gap: 14px; font-size: 0.75rem; color: var(--tx2); }
.dot { color: var(--bd2); }

/* Post content */
.post-content { font-size: 0.98rem; font-weight: 300; line-height: 1.85; color: var(--tx); max-width: 680px; }
.post-content h1, .post-content h2, .post-content h3, .post-content h4 { color: var(--w); margin: 2em 0 0.6em; line-height: 1.25; }
.post-content h2 { font-size: 1.5rem; font-weight: 600; }
.post-content h3 { font-size: 1.2rem; font-weight: 600; }
.post-content h4 { font-size: 1rem; font-weight: 500; }
.post-content p { margin-bottom: 1.4em; }
.post-content a { color: var(--acc); border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.post-content a:hover { border-bottom-color: var(--acc); }
.post-content blockquote { border-left: 3px solid var(--acc); padding: 4px 20px; margin: 2em 0; color: var(--tx2); font-style: italic; font-size: 1.05rem; }
.post-content pre { background: var(--bg3); border: 1px solid var(--bd); border-radius: var(--r); padding: 18px 22px; overflow-x: auto; font-size: 0.85rem; margin: 1.4em 0; }
.post-content code { background: var(--bg3); padding: 2px 6px; border-radius: 4px; font-size: 0.85em; }
.post-content pre code { background: none; padding: 0; }
.post-content img { width: 100%; border-radius: var(--r); margin: 1.4em 0; }
.post-content ul, .post-content ol { padding-left: 1.4em; margin-bottom: 1.4em; }
.post-content li { margin-bottom: 0.35em; }
.post-content strong { font-weight: 600; color: var(--tx); }

/* ─── About / Static Pages ───────────────────────────────────────── */
.page-eyebrow { font-size: 0.68rem; font-weight: 500; letter-spacing: 0.13em; text-transform: uppercase; color: var(--tx3); margin-bottom: 20px; }
.page-title { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; line-height: 1.15; color: var(--w); letter-spacing: -0.02em; margin-bottom: 36px; }

/* ─── Contact Form ───────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.68rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tx3); }
.form-group input, .form-group textarea {
  background: var(--bg3); border: 1px solid var(--bd2); border-radius: var(--r);
  padding: 11px 15px; color: var(--tx); font-family: var(--f); font-size: 0.875rem; font-weight: 300;
  outline: none; transition: border-color 0.15s; width: 100%;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--acc); }
.form-group textarea { resize: vertical; }
.submit-btn {
  background: var(--acc); color: #fff; border: none; border-radius: var(--r);
  padding: 11px 24px; font-family: var(--f); font-size: 0.875rem; font-weight: 500;
  cursor: pointer; align-self: flex-start; transition: opacity 0.15s;
}
.submit-btn:hover { opacity: 0.88; }
.submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── Empty / Skeleton ───────────────────────────────────────────── */
.empty-state { padding: 72px 0; text-align: center; color: var(--tx3); }
.empty-state h3 { font-size: 1.4rem; font-weight: 600; color: var(--tx2); margin-bottom: 6px; }
.skeleton-card { pointer-events: none; }
.skeleton {
  background: linear-gradient(90deg, var(--bg3) 25%, #222 50%, var(--bg3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 4px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ─── Pagination ─────────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--bd); flex-wrap: wrap; }
.page-btn { min-width: 34px; height: 34px; border-radius: var(--r); border: 1px solid var(--bd2); background: transparent; color: var(--tx2); font-family: var(--f); font-size: 0.78rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s; padding: 0 10px; }
.page-btn:hover { border-color: var(--acc); color: var(--acc); }
.page-btn.active { background: var(--acc); border-color: var(--acc); color: #fff; }
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .site-wrapper { flex-direction: column; }
  .sidebar { position: static; width: 100%; height: auto; border-right: none; border-bottom: 1px solid var(--bd); padding: 28px 24px; flex-direction: row; flex-wrap: wrap; gap: 20px; }
  .profile-section { margin-bottom: 0; flex: 1; min-width: 200px; }
  .sidebar-divider { display: none; }
  .topics-section { flex: 1; min-width: 130px; }
  .sidebar-social { margin-top: 0; padding-top: 0; }
  .main-content { padding: 28px 24px; }
}
@media (max-width: 600px) {
  .site-header { padding: 0 16px; }
  .main-content { padding: 20px 16px; }
  .post-thumb-wrap { width: 84px; height: 64px; }
  .post-title { font-size: 0.92rem; }
  .post-excerpt { display: none; }
}
