
/* ===== CSS VARIABLES ===== */
:root { --malina: #e11d6a; --malina-hover: #f43f8e; }
[data-theme="dark"] {
  --bg: #0f172a; --bg-card: #1e293b; --bg-card-hover: #263548;
  --border: rgba(148,163,184,0.08); --border-hover: rgba(225,29,106,0.2);
  --text: #f8fafc; --text-secondary: #cbd5e1; --text-muted: #64748b;
  --shadow: rgba(0,0,0,0.3);
}
[data-theme="light"] {
  --bg: #f8fafc; --bg-card: #ffffff; --bg-card-hover: #f1f5f9;
  --border: rgba(0,0,0,0.08); --border-hover: rgba(225,29,106,0.2);
  --text: #0f172a; --text-secondary: #475569; --text-muted: #94a3b8;
  --shadow: rgba(0,0,0,0.08);
}

html, body { overflow-x: hidden; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); transition: background 0.3s, color 0.3s; }

/* ===== SCROLLBAR ===== */
.sidebar-scroll::-webkit-scrollbar { width: 4px; }
.sidebar-scroll::-webkit-scrollbar-track { background: transparent; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: transparent; border-radius: 4px; transition: background 0.3s; }
.sidebar-scroll:hover::-webkit-scrollbar-thumb { background: rgba(225,29,106,0.35); }
.sidebar-scroll::-webkit-scrollbar-thumb:hover { background: rgba(225,29,106,0.65) !important; }
.sidebar-scroll { scrollbar-width: thin; scrollbar-color: transparent transparent; transition: scrollbar-color 0.3s; }
.sidebar-scroll:hover { scrollbar-color: rgba(225,29,106,0.35) transparent; }

/* ===== HEX PATTERN ===== */
.hex-pattern {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cpath d='M14 0 L28 8V24L14 32L0 24V8Z' fill='none' stroke='%23334155' stroke-width='0.6'/%3E%3Cpath d='M14 32L28 40V49' fill='none' stroke='%23334155' stroke-width='0.6'/%3E%3Cpath d='M14 32L0 40V49' fill='none' stroke='%23334155' stroke-width='0.6'/%3E%3C/svg%3E");
  background-size: 28px 49px;
}
[data-theme="light"] .hex-pattern {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cpath d='M14 0 L28 8V24L14 32L0 24V8Z' fill='none' stroke='%23cbd5e1' stroke-width='0.6'/%3E%3Cpath d='M14 32L28 40V49' fill='none' stroke='%23cbd5e1' stroke-width='0.6'/%3E%3Cpath d='M14 32L0 40V49' fill='none' stroke='%23cbd5e1' stroke-width='0.6'/%3E%3C/svg%3E");
}

/* ===== SIDEBAR NAV ===== */
.nav-group summary { cursor: pointer; list-style: none; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::before { content: '▸'; display: inline-block; margin-right: 6px; font-size: 10px; color: var(--text-muted); transition: transform 0.2s; }
.nav-group[open] summary::before { transform: rotate(90deg); }

/* ===== THEME TOGGLE ===== */
.theme-toggle-wrap { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px; border-radius: 10px; transition: background 0.2s; }
.theme-toggle-wrap:hover { background: var(--bg-card); }
.theme-toggle-icon { transition: color 0.3s, opacity 0.3s; }
[data-theme="dark"] .icon-sun { color: var(--text-muted); opacity: 0.45; }
[data-theme="dark"] .icon-moon { color: #e11d6a; opacity: 1; }
[data-theme="light"] .icon-sun { color: #f59e0b; opacity: 1; }
[data-theme="light"] .icon-moon { color: var(--text-muted); opacity: 0.45; }
.theme-toggle { position: relative; width: 44px; height: 24px; border-radius: 12px; transition: background 0.3s; flex-shrink: 0; }
[data-theme="dark"] .theme-toggle { background: #334155; }
[data-theme="light"] .theme-toggle { background: #e2e8f0; }
.theme-toggle::after { content: ''; position: absolute; top: 3px; width: 18px; height: 18px; border-radius: 50%; transition: transform 0.3s, background 0.3s; }
[data-theme="dark"] .theme-toggle::after { left: 3px; background: #fbbf24; transform: translateX(0); }
[data-theme="light"] .theme-toggle::after { left: 3px; background: #e11d6a; transform: translateX(20px); }

/* ===== READING PROGRESS BAR ===== */
#reading-progress {
  position: fixed; top: 0; left: 0; height: 2px; background: var(--malina);
  z-index: 200; transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(225,29,106,0.6);
}

/* ===== SKIP TO CONTENT ===== */
.skip-to-content {
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
  z-index: 300;
}
.skip-to-content:focus {
  position: fixed; top: 16px; left: 16px; width: auto; height: auto; overflow: visible;
  background: var(--malina); color: #fff; padding: 8px 16px; border-radius: 8px;
  font-size: 14px; font-weight: 600; outline: none;
}

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }
#page-layout { display: flex; gap: 24px; align-items: flex-start; }
#page-layout > main { flex: 1 1 auto; min-width: 0; }
#left-sidebar { width: 260px; flex: 0 0 260px; display: none; }
#right-sidebar { width: 300px; flex: 0 0 300px; display: none; align-self:stretch; }
/* Sidebar visibility: CSS is the no-JS fallback; JS overrides with inline !important */
@media (min-width:1024px) { #left-sidebar { display: block; } }
@media (min-width:1280px) { #right-sidebar { display: block; } }

[x-cloak] { display: none !important; }

/* ===== CARD HOVER GLOW ===== */
.card-hover-glow { transition: all 0.2s ease-out; }
.card-hover-glow:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
  box-shadow: 0 0 32px rgba(225,29,106,0.15), 0 8px 24px var(--shadow);
}

/* ===== MJ PROSE ===== */
.mj-prose { font-size: 17px; line-height: 1.8; color: var(--text); }
.mj-prose h2 { font-size: 24px; font-weight: 700; color: var(--text); margin-top: 2.5rem; margin-bottom: 1rem; letter-spacing: -0.02em; }
.mj-prose h3 { font-size: 20px; font-weight: 600; color: var(--text); margin-top: 2rem; margin-bottom: 0.75rem; }
.mj-prose p { margin-bottom: 1.5rem; }
.mj-prose a { color: var(--malina-hover); text-decoration: underline; text-underline-offset: 3px; }
.mj-prose a:hover { color: var(--malina); }
.mj-prose blockquote { border-left: 3px solid var(--malina); padding-left: 20px; font-style: italic; color: var(--text-secondary); margin: 2rem 0; font-family: 'Playfair Display', Georgia, serif; font-size: 20px; line-height: 1.5; }
.mj-prose code { font-family: 'JetBrains Mono', monospace; font-size: 14px; background: var(--bg-card); color: var(--malina-hover); padding: 2px 8px; border-radius: 4px; }
.mj-prose pre { background: var(--bg-card); border-radius: 12px; padding: 20px; overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--border); }
.mj-prose pre code { background: none; padding: 0; color: var(--text); }
.mj-prose img { border-radius: 12px; margin: 1.5rem 0; }
.mj-prose figure { margin: 2rem 0; }
.mj-prose figcaption { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 8px; }
.mj-prose ul, .mj-prose ol { margin-bottom: 1.5rem; padding-left: 1.5rem; }
.mj-prose li { margin-bottom: 0.5rem; }
.mj-prose hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* ===== PAGINATION ===== */
.mj-pagination nav { display: flex; align-items: center; justify-content: center; gap: 4px; flex-wrap: wrap; }
.mj-pagination a, .mj-pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 10px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--text-muted); text-decoration: none; transition: all 0.2s; }
.mj-pagination a:hover { background: var(--bg-card); color: var(--text); }
.mj-pagination .active span { background: var(--malina); color: #fff; border-radius: 8px; font-weight: 600; }

/* ===== LAYOUT ===== */
.page-wrap { max-width:1400px; margin:0 auto; padding:20px 16px; }
.page-wrap-tight { max-width:1400px; margin:0 auto; padding:0 16px; }
.page-wrap-wide { max-width:1400px; margin:0 auto; padding:48px 16px; }
.article-wrap { max-width:820px; margin:0 auto; }
.flex-col { display:flex; flex-direction:column; }

/* ===== HEADER ===== */
.mj-header { position:sticky; top:0; z-index:50; height:56px; border-bottom:1px solid var(--border); background:rgba(15,23,42,0.80); backdrop-filter:blur(24px); -webkit-backdrop-filter:blur(24px); }
[data-theme="light"] .mj-header { background:rgba(248,250,252,0.85); }
.mj-header-inner { display:flex; align-items:center; justify-content:space-between; height:56px; }
.logo-link { display:flex; align-items:center; gap:10px; text-decoration:none; }
.logo-icon { width:32px; height:32px; border-radius:8px; background:var(--malina); display:flex; align-items:center; justify-content:center; }
.logo-icon-glow { box-shadow:0 0 16px rgba(225,29,106,0.3); }
.logo-letter { color:#fff; font-weight:900; font-size:16px; font-family:'Inter',sans-serif; line-height:1; }
.logo-brand { align-items:baseline; gap:6px; }
.mj-header .logo-brand { display:none; }
.footer-logo .logo-brand { display:flex; }
.logo-name { font-weight:900; color:var(--text); letter-spacing:-0.03em; font-size:20px; font-family:'Inter',sans-serif; line-height:1; }
.logo-name-footer { font-weight:900; color:var(--text); letter-spacing:-0.03em; font-size:18px; font-family:'Inter',sans-serif; }
.logo-suffix { font-weight:300; color:var(--text-muted); letter-spacing:0.15em; font-size:10px; text-transform:uppercase; font-family:'Inter',sans-serif; line-height:1; }
.top-nav { display:none; gap:4px; }
.top-nav-link { padding:6px 12px; border-radius:8px; font-size:13px; font-weight:500; text-decoration:none; transition:all 0.2s; white-space:nowrap; color:var(--text-muted); }
.top-nav-link:hover { background:var(--bg-card); color:var(--text); }
.top-nav-link--active { color:var(--malina); background:rgba(225,29,106,0.1); }
.header-actions { display:flex; align-items:center; gap:12px; }
.icon-btn { width:32px; height:32px; border-radius:8px; display:flex; align-items:center; justify-content:center; color:var(--text-muted); background:none; border:none; cursor:pointer; transition:all 0.2s; }
.icon-btn:hover { background:var(--bg-card); color:var(--text); }
.btn-cta { padding:8px 16px; border-radius:8px; background:var(--malina); color:#fff; font-size:13px; font-weight:600; box-shadow:0 4px 12px rgba(225,29,106,0.25); text-decoration:none; transition:all 0.2s; }
.btn-cta:hover { background:#f43f8e; }
.btn-menu { display:inline-flex; align-items:center; justify-content:center; color:var(--text-muted); background:none; border:none; cursor:pointer; }
.mobile-menu { position:absolute; top:100%; left:0; right:0; background:var(--bg); border-bottom:1px solid var(--border); backdrop-filter:blur(12px); }
.mobile-menu-inner { max-width:1400px; margin:0 auto; padding:16px; }
.mobile-nav { display:grid; grid-template-columns:1fr 1fr; gap:4px; margin-bottom:16px; }
.mobile-nav-link { display:flex; align-items:center; gap:8px; padding:10px 12px; border-radius:12px; font-size:14px; font-weight:500; color:var(--text-secondary); text-decoration:none; transition:all 0.2s; }
.mobile-nav-link:hover { background:var(--bg-card); color:var(--text); }
.mobile-dot { width:6px; height:6px; border-radius:50%; flex-shrink:0; }
.mobile-divider { padding-top:16px; border-top:1px solid var(--border); }
.mobile-cta { display:block; text-align:center; padding:10px; border-radius:8px; background:var(--malina); color:#fff; font-size:14px; font-weight:600; text-decoration:none; }
.search-overlay { position:fixed; inset:0; z-index:100; display:flex; align-items:flex-start; justify-content:center; padding-top:8vh; background:rgba(15,23,42,0.80); backdrop-filter:blur(8px); }
[data-theme="light"] .search-overlay { background:rgba(248,250,252,0.85); }
.search-modal { width:100%; max-width:560px; background:#1e293b; border-radius:16px; border:1px solid rgba(148,163,184,0.12); box-shadow:0 24px 64px rgba(0,0,0,0.7); margin:0 16px; }
[data-theme="light"] .search-modal { background:#ffffff; border-color:rgba(0,0,0,0.1); box-shadow:0 24px 64px rgba(0,0,0,0.15); }
.search-head { display:flex; align-items:center; gap:12px; padding:12px 16px; border-bottom:1px solid var(--border); }
.search-icon { width:20px; height:20px; color:var(--text-muted); flex-shrink:0; }
.search-input { flex:1; background:transparent; border:none; outline:none; color:var(--text); font-size:16px; }
.search-kbd { font-size:10px; font-family:'JetBrains Mono',monospace; color:var(--text-muted); background:var(--bg-card); border:1px solid var(--border); border-radius:4px; padding:2px 6px; }
.search-empty { padding:32px 16px; text-align:center; }
.search-empty p { color:var(--text-muted); font-size:14px; }
.search-foot { display:flex; align-items:center; justify-content:space-between; padding:8px 16px; border-top:1px solid var(--border); font-size:11px; color:var(--text-muted); }
.search-foot-links { display:flex; align-items:center; gap:12px; }
.search-form { flex:1; display:flex; }
.search-form .search-input { width:100%; }

/* ===== SEARCH RESULTS PAGE ===== */
.search-results-page { max-width:800px; margin:0 auto; }
.search-results-header { margin-bottom:32px; }
.search-results-title { font-size:28px; font-weight:700; color:var(--text); margin-bottom:20px; }
.search-results-form { display:flex; gap:8px; }
.search-results-input { flex:1; box-sizing:border-box; min-width:0; padding:12px 16px; border-radius:10px; background:var(--bg-card); border:1px solid var(--border); color:var(--text); font-size:16px; outline:none; transition:border-color 0.2s; }
.search-results-input:focus { border-color:var(--malina); }
[data-theme="light"] .search-results-input { background:#fff; border-color:rgba(0,0,0,0.15); }
.search-results-btn { box-sizing:border-box; padding:12px 24px; border-radius:10px; background:var(--malina); color:#fff; font-size:15px; font-weight:600; border:none; cursor:pointer; transition:all 0.2s; white-space:nowrap; }
.search-results-btn:hover { background:#f43f8e; }
.search-results-info { font-size:14px; color:var(--text-muted); margin-bottom:20px; padding-bottom:16px; border-bottom:1px solid var(--border); }
.search-no-results { text-align:center; padding:48px 16px; color:var(--text); font-size:16px; }
.search-prompt { text-align:center; padding:48px 16px; color:var(--text-muted); font-size:15px; }

/* ===== FOOTER ===== */
.site-footer { background:var(--bg); border-top:1px solid var(--border); margin-top:auto; }
.footer-inner { display:grid; grid-template-columns:1fr; gap:32px; }
.footer-brand-col { grid-column:span 1; }
.footer-logo { display:inline-flex; align-items:center; gap:10px; text-decoration:none; margin-bottom:16px; }
.footer-desc { font-size:14px; color:var(--text-muted); line-height:1.6; max-width:320px; margin-bottom:20px; }
.social-links { display:flex; align-items:center; gap:8px; }
.social-icon { width:36px; height:36px; display:flex; align-items:center; justify-content:center; border-radius:8px; background:var(--bg-card); color:var(--text-muted); text-decoration:none; transition:all 0.2s; }
.social-icon:hover { background:var(--bg-card-hover); color:var(--text); }
.section-heading { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.08em; color:var(--text-muted); margin-bottom:16px; }
.footer-nav { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:10px; }
.footer-nav a { font-size:14px; color:var(--text-muted); text-decoration:none; transition:color 0.2s; }
.footer-nav a:hover { color:var(--text); }
.footer-sub-text { font-size:13px; color:var(--text-muted); line-height:1.6; margin-bottom:16px; }
.footer-form { display:flex; flex-direction:column; gap:8px; }
.input-field { width:100%; box-sizing:border-box; padding:10px 12px; border-radius:8px; background:var(--bg-card); border:1px solid var(--border); color:var(--text); font-size:14px; outline:none; transition:border-color 0.2s; }
.input-field:focus { border-color:var(--malina); }
.btn-submit { width:100%; padding:10px; border-radius:8px; background:var(--malina); color:#fff; font-size:14px; font-weight:600; border:none; cursor:pointer; transition:all 0.2s; }
.btn-submit:hover { background:#f43f8e; }
.footer-bottom { border-top:1px solid var(--border); }
.footer-bottom-inner { max-width:1400px; margin:0 auto; padding:20px 16px; display:flex; flex-direction:column; align-items:center; gap:12px; }
.footer-copy { font-size:12px; color:var(--text-muted); text-align:center; }
.footer-bottom-links { display:flex; align-items:center; gap:16px; flex-wrap:wrap; justify-content:center; }
.footer-bottom-links a { font-size:12px; color:var(--text-muted); text-decoration:none; transition:color 0.2s; }
.footer-bottom-links a:hover { color:var(--text); }

/* ===== SIDEBAR LEFT ===== */
.sidebar-sticky { position:sticky; top:72px; max-height:calc(100vh - 80px); overflow-y:auto; }
#right-sidebar .sidebar-sticky { max-height:none; overflow-y:visible; }

.nav-summary { display:flex; align-items:center; gap:8px; padding:8px 12px; border-radius:8px; font-size:14px; font-weight:600; cursor:pointer; transition:background 0.2s; color:var(--text-secondary); }
.nav-summary:hover { background:var(--bg-card); }
.nav-summary--active { color:var(--text); }
.nav-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.nav-children { padding-left:20px; padding-top:4px; padding-bottom:4px; }
.nav-child-link { display:block; padding:6px 12px; border-radius:6px; font-size:13px; color:var(--text-muted); text-decoration:none; transition:all 0.2s; }
.nav-child-link:hover { color:var(--text); background:var(--bg-card); }
.trends-section { margin-top:24px; padding-top:16px; border-top:1px solid var(--border); }
.trends-tags { display:flex; flex-wrap:wrap; gap:6px; padding:0 12px; }
.tag-pill { padding:4px 10px; border-radius:8px; font-size:11px; font-weight:500; color:var(--text-muted); background:var(--bg-card); border:1px solid var(--border); text-decoration:none; transition:all 0.2s; }
.tag-pill:hover { color:var(--malina); border-color:rgba(225,29,106,0.3); }

/* ===== SIDEBAR RIGHT ===== */
.newsletter-box { padding:20px; border-radius:16px; background:rgba(225,29,106,0.08); border:1px solid rgba(225,29,106,0.2); margin-bottom:20px; }
.newsletter-title { font-size:14px; font-weight:700; color:var(--text); margin-bottom:0; }
.newsletter-desc { font-size:12px; color:var(--text-muted); margin-bottom:12px; line-height:1.5; }
.social-icons { display:grid; grid-template-columns:repeat(5, minmax(0, 1fr)); gap:12px; margin-top:12px; width:100%; }
.social-icon-chip { width:100%; aspect-ratio:1/1; min-height:44px; border-radius:12px; display:inline-flex; align-items:center; justify-content:center; background:#ffffff; border:1px solid rgba(255,255,255,0.72); color:var(--text-secondary); text-decoration:none; transition:all 0.2s; box-shadow:0 6px 18px rgba(15,23,42,0.06), inset 0 1px 0 rgba(255,255,255,0.45); }
.social-icon-chip:hover { transform:translateY(-1px); box-shadow:0 10px 20px rgba(15,23,42,0.1), inset 0 1px 0 rgba(255,255,255,0.55); }
.social-icon-chip svg { width:18px; height:18px; display:block; }
.social-icon-chip--telegram { color:#229ED9; }
.social-icon-chip--vk { color:#0077FF; }
.social-icon-chip--youtube { color:#FF0000; }
.social-icon-chip--threads { color:#111111; }
.social-icon-chip--instagram { color:#E4405F; }
.social-icon-chip--muted { opacity:.42; cursor:default; }
.newsletter-input { width:100%; box-sizing:border-box; padding:10px 12px; border-radius:8px; background:var(--bg-card); border:1px solid var(--border); color:var(--text); font-size:14px; outline:none; margin-bottom:8px; }
.newsletter-btn { width:100%; box-sizing:border-box; padding:10px; border-radius:8px; background:var(--malina); color:#fff; font-size:14px; font-weight:600; border:none; cursor:pointer; transition:all 0.2s; }
.newsletter-btn:hover { background:#f43f8e; }
.ad-box { padding:16px; border-radius:16px; background:var(--bg-card); border:1px solid var(--border); text-align:center; margin-bottom:20px; }
.ad-label { font-size:10px; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.08em; margin-bottom:12px; }
.ad-placeholder { aspect-ratio:4/3; border-radius:12px; background:linear-gradient(135deg,var(--bg-card-hover),var(--bg-card)); display:flex; align-items:center; justify-content:center; }
.ad-placeholder span { color:var(--text-muted); font-size:14px; }
.popular-section { margin-bottom:20px; }
.popular-list { display:flex; flex-direction:column; gap:16px; }
.popular-item { display:flex; gap:12px; text-decoration:none; }
.popular-rank { font-size:24px; font-weight:900; color:var(--bg-card-hover); line-height:1; transition:color 0.2s; }
[data-theme="light"] .popular-rank { color:var(--text-muted); }
.popular-item:hover .popular-rank { color:var(--malina); }
.popular-item-title { font-size:14px; font-weight:600; color:var(--text); line-height:1.35; }
.popular-item:hover .popular-item-title { color:var(--malina); }
.popular-item-meta { font-size:11px; color:var(--text-muted); }
.stats-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.stat-card { padding:12px; border-radius:12px; background:var(--bg-card); border:1px solid var(--border); text-align:center; }
.stat-number { font-size:24px; font-weight:900; color:var(--text); }
.stat-number-accent { font-size:24px; font-weight:900; color:var(--malina); }
.stat-label { font-size:10px; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.08em; margin-top:4px; }

/* ===== HOME: HERO ===== */
.hero-card { position:relative; overflow:hidden; border-radius:16px; aspect-ratio:2/1; margin-bottom:24px; cursor:pointer; transition:all 0.3s; background:linear-gradient(135deg,#10192f 0%,#131d36 42%,#0f172a 100%); }
.hero-card:hover { transform:translateY(-2px); box-shadow:0 8px 32px var(--shadow); }
.hero-media { position:absolute; inset:0 0 0 auto; width:46%; z-index:0; }
.hero-media::after { content:''; position:absolute; inset:0; background:linear-gradient(90deg,rgba(15,23,42,0.92) 0%,rgba(15,23,42,0.55) 24%,rgba(15,23,42,0.12) 58%,rgba(15,23,42,0.18) 100%); }
.hero-media img { width:100%; height:100%; object-fit:cover; object-position:center; display:block; filter:saturate(0.95) brightness(0.95); }
.hero-overlay { position:absolute; inset:0; z-index:1; background:linear-gradient(90deg,rgba(15,23,42,0.96) 0%,rgba(15,23,42,0.84) 44%,rgba(15,23,42,0.45) 72%,rgba(15,23,42,0.18) 100%); opacity:1; }
.hero-fade { position:absolute; inset:0; z-index:2; background:linear-gradient(to top,rgba(15,23,42,0.86),rgba(15,23,42,0.18) 52%,rgba(15,23,42,0.04) 100%); }
[data-theme="light"] .hero-overlay { background:linear-gradient(135deg,rgba(15,23,42,0.85),rgba(30,41,59,0.8),rgba(15,23,42,0.7)); opacity:1; }
[data-theme="light"] .hero-fade { background:linear-gradient(to top,rgba(15,23,42,0.9),transparent 70%); }
[data-theme="light"] .hero-excerpt { color:rgba(248,250,252,0.85); }
[data-theme="light"] .hero-meta .author-text { color:rgba(248,250,252,0.8); }
[data-theme="light"] .hero-meta .meta-date { color:rgba(248,250,252,0.6); }
[data-theme="light"] .hero-meta .dot-sep { color:rgba(248,250,252,0.5); }
.hero-content { position:absolute; inset:0; z-index:3; display:flex; flex-direction:column; justify-content:flex-start; padding:32px; }
.hero-copy { display:flex; flex-direction:column; max-width:620px; padding-top:56px; }
.hero-badge { display:inline-flex; align-items:center; gap:6px; padding:5px 12px; border-radius:999px; font-size:11px; font-weight:700; line-height:1.2; text-transform:uppercase; letter-spacing:0.08em; background:var(--malina); color:#fff; box-shadow:0 4px 12px rgba(225,29,106,0.3); width:fit-content; margin:0 0 16px; }
.hero-badge-dot { width:6px; height:6px; border-radius:50%; background:#fff; animation:pulse 2s infinite; }
.hero-title { font-size:32px; font-weight:700; color:#fff; line-height:1.15; letter-spacing:-0.03em; max-width:600px; font-family:'Playfair Display',serif; }
.hero-excerpt { margin-top:12px; color:var(--text-secondary); font-size:14px; max-width:500px; line-height:1.6; }
.hero-meta { display:flex; align-items:center; gap:12px; margin-top:16px; flex-wrap:wrap; }
.hero-link { text-decoration:none; color:inherit; display:block; }
.hero-static { position:relative; overflow:hidden; border-radius:16px; aspect-ratio:2/1; margin-bottom:24px; }
.avatar-circle { width:28px; height:28px; border-radius:50%; background:linear-gradient(135deg,var(--malina),#6366f1); display:flex; align-items:center; justify-content:center; color:#fff; font-size:10px; font-weight:700; }
.avatar-circle-lg { width:32px; height:32px; font-size:11px; flex-shrink:0; }
.avatar-circle-sm { width:20px; height:20px; font-size:8px; }
.author-text { font-size:14px; font-weight:500; color:var(--text-secondary); }
.dot-sep { color:var(--text-muted); }
.meta-date { font-size:14px; color:var(--text-muted); }

/* ===== HOME: FEED ===== */
.feed-section { margin-bottom:32px; }
.feed-header { display:flex; align-items:center; gap:12px; margin-bottom:20px; }
.feed-heading { font-size:22px; font-weight:800; color:var(--text); letter-spacing:-0.02em; white-space:nowrap; }
.feed-subtitle { font-size:13px; color:var(--text-muted); }
.feed-cards { display:flex; flex-direction:column; gap:12px; }
.feed-card { display:flex; gap:16px; padding:16px; border-radius:12px; background:var(--bg-card); border:1px solid var(--border); cursor:pointer; }
.feed-card-link { display:flex; gap:16px; text-decoration:none; color:inherit; width:100%; }
.feed-thumb { width:200px; height:133px; border-radius:12px; overflow:hidden; flex-shrink:0; display:none; }
.feed-thumb img { width:100%; height:100%; object-fit:cover; transition:transform 0.3s; }
.feed-body { flex:1; min-width:0; display:flex; flex-direction:column; }
.badge-row { display:flex; align-items:center; gap:8px; margin-bottom:8px; flex-wrap:wrap; }
.cat-badge { padding:2px 8px; border-radius:999px; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:0.06em; border:1px solid transparent; }
.new-badge { padding:2px 8px; border-radius:999px; font-size:10px; font-weight:700; background:rgba(225,29,106,0.15); color:#f43f8e; border:1px solid rgba(225,29,106,0.25); animation:pulse 2s infinite; }
.text-meta { font-size:11px; color:var(--text-muted); }
.feed-title { font-size:16px; font-weight:700; color:var(--text); line-height:1.35; letter-spacing:-0.01em; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; transition:color 0.15s; }
.feed-title:hover, .feed-card:hover .feed-title { color:var(--malina); }
.feed-excerpt { margin-top:6px; font-size:14px; color:var(--text-muted); line-height:1.5; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; flex:1; }
.feed-meta { display:flex; align-items:center; gap:12px; margin-top:8px; flex-wrap:wrap; }
.feed-meta-sm { font-size:12px; color:var(--text-muted); }
.feed-comments { margin-left:auto; font-size:12px; color:var(--text-muted); }
.empty-state { padding:20px; border-radius:16px; background:rgba(225,29,106,0.05); border:1px solid rgba(225,29,106,0.15); }
.empty-quote { margin-top:12px; font-size:18px; font-weight:600; color:var(--text); line-height:1.5; font-style:italic; font-family:'Playfair Display',serif; }
.see-all-wrap { text-align:center; margin-top:24px; }
.btn-outline { display:inline-flex; align-items:center; gap:6px; padding:10px 24px; border-radius:10px; font-size:14px; font-weight:600; color:var(--malina); background:rgba(225,29,106,0.08); border:1px solid rgba(225,29,106,0.2); text-decoration:none; transition:all 0.2s; }
.btn-outline:hover { background:rgba(225,29,106,0.15); border-color:rgba(225,29,106,0.4); }

/* ===== CATEGORY PAGE ===== */
.cat-layout { display:flex; gap:24px; align-items:flex-start; }
.cat-main { flex:1; min-width:0; }
.cat-header { position:relative; overflow:hidden; border-radius:20px; margin-bottom:20px; }
.cat-accent { position:absolute; top:0; left:0; right:0; height:3px; }
.cat-header-body { padding:32px 24px; background:var(--bg-card); border:1px solid var(--border); border-radius:20px; }
.cat-label-row { display:flex; flex-direction:column; gap:4px; margin-bottom:16px; }
.cat-label { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.12em; }
.cat-title { font-size:32px; font-weight:700; color:var(--text); line-height:1.15; letter-spacing:-0.03em; font-family:'Playfair Display',serif; display:flex; align-items:center; gap:12px; }
.dot-lg { width:10px; height:10px; border-radius:50%; flex-shrink:0; }
.cat-desc { font-size:15px; color:var(--text-muted); line-height:1.6; max-width:600px; margin-bottom:16px; }
.cat-stats { display:flex; align-items:center; gap:16px; flex-wrap:wrap; }
.cat-stats-text { font-size:13px; color:var(--text-muted); }
.cat-children { display:flex; flex-wrap:wrap; gap:8px; margin-top:20px; padding-top:16px; border-top:1px solid var(--border); }
.cat-child-link { padding:6px 14px; border-radius:999px; font-size:12px; font-weight:600; color:var(--text-muted); background:rgba(30,41,59,0.6); border:1px solid var(--border); text-decoration:none; transition:all 0.2s; }
[data-theme="light"] .cat-child-link { background:rgba(226,232,240,0.6); }
.filter-tabs { display:flex; gap:4px; margin-bottom:20px; padding:4px; background:var(--bg-card); border-radius:12px; border:1px solid var(--border); width:fit-content; }
.filter-tab { padding:8px 16px; border-radius:8px; font-size:13px; font-weight:600; text-decoration:none; transition:all 0.2s; color:var(--text-muted); }
.filter-tab:hover { background:var(--bg-card-hover); color:var(--text); }
.filter-tab--active { background:rgba(225,29,106,0.15); color:#f43f8e; }
.filter-tab--active:hover { background:rgba(225,29,106,0.15); color:#f43f8e; }
.cat-grid { display:grid; grid-template-columns:1fr; gap:16px; }
.cat-card { border-radius:12px; background:var(--bg-card); border:1px solid var(--border); overflow:hidden; }
.cat-card-link { display:flex; flex-direction:column; text-decoration:none; color:inherit; height:100%; }
.cat-card-img-wrap { aspect-ratio:16/9; overflow:hidden; flex-shrink:0; }
.cat-card-img-wrap img { width:100%; height:100%; object-fit:cover; transition:transform 0.5s ease-out; }
.cat-card:hover .cat-card-img-wrap img { transform:scale(1.04); }
.cat-card-body { padding:16px; display:flex; flex-direction:column; flex:1; }
.cat-card-title { font-size:16px; font-weight:700; color:var(--text); line-height:1.35; letter-spacing:-0.01em; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; transition:color 0.2s; }
.cat-card:hover .cat-card-title { color:var(--malina); }
.cat-card-excerpt { margin-top:6px; font-size:14px; color:var(--text-muted); line-height:1.5; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; flex:1; }
.cat-card-meta { display:flex; align-items:center; gap:12px; margin-top:10px; padding-top:10px; border-top:1px solid var(--border); flex-wrap:wrap; }
.cat-card-meta span { font-size:12px; color:var(--text-muted); }
.cat-aside { width:280px; flex-shrink:0; display:none; }
.cat-aside-inner { position:sticky; top:76px; max-height:calc(100vh - 100px); overflow-y:auto; }
.cat-aside-card { padding:20px; border-radius:16px; background:var(--bg-card); border:1px solid var(--border); }
.cat-aside-nav { display:flex; flex-direction:column; gap:4px; }
.cat-aside-link { display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:8px; font-size:14px; font-weight:500; color:var(--text-muted); text-decoration:none; transition:all 0.2s; }
.cat-aside-link:hover { color:var(--text); background:var(--bg-card-hover); }
.cat-aside-count { margin-left:auto; font-size:11px; color:var(--text-muted); }

/* ===== ARTICLE PAGE ===== */
.art-badge { display:inline-flex; align-items:center; gap:6px; padding:4px 12px; border-radius:999px; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:0.06em; text-decoration:none; margin-bottom:16px; transition:opacity 0.2s; border:1px solid transparent; }
.art-badge:hover { opacity:0.8; }
.art-badge-dot { width:6px; height:6px; border-radius:50%; flex-shrink:0; }
.art-title { font-size:36px; font-weight:700; color:var(--text); line-height:1.12; letter-spacing:-0.03em; font-family:'Playfair Display',serif; margin-bottom:16px; }
.art-meta { display:flex; align-items:center; gap:12px; margin-bottom:24px; flex-wrap:wrap; }
.art-author { font-size:14px; font-weight:600; color:var(--text); }
.art-time { font-size:14px; color:var(--text-muted); }
.art-read-time { display:inline-flex; align-items:center; gap:4px; font-size:14px; color:var(--text-muted); }
.art-figure { margin-bottom:32px; border-radius:16px; overflow:hidden; box-shadow:0 8px 32px rgba(0,0,0,0.4); }
.art-figure img { width:100%; aspect-ratio:16/9; object-fit:cover; display:block; }
.art-excerpt { font-size:19px; color:var(--text-secondary); line-height:1.7; margin-bottom:28px; font-family:'Playfair Display',serif; font-style:italic; border-left:3px solid var(--malina); padding-left:20px; }
.art-prose { max-width:none; }
.tags-section { margin-top:32px; padding-top:20px; border-top:1px solid var(--border); }
.tags-row { display:flex; flex-wrap:wrap; gap:8px; }
.tag-link { display:inline-flex; align-items:center; padding:6px 14px; border-radius:999px; font-size:13px; font-weight:500; color:var(--text-muted); background:var(--bg-card); border:1px solid var(--border); text-decoration:none; transition:all 0.2s; }
.tag-link:hover { color:var(--malina); border-color:rgba(225,29,106,0.3); }
.share-row { margin-top:24px; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.share-label { font-size:14px; font-weight:700; color:var(--text); }
.share-btn { display:inline-flex; align-items:center; gap:8px; padding:8px 14px; border-radius:10px; border:1px solid var(--border); color:var(--text-muted); text-decoration:none; font-size:13px; font-weight:600; transition:all 0.2s; }
.share-btn:hover { color:var(--text); background:var(--bg-card-hover); }
.related-section { margin-top:40px; }
.related-heading { font-size:20px; font-weight:900; color:var(--text); margin-bottom:20px; letter-spacing:-0.02em; }
.related-grid { display:grid; grid-template-columns:1fr; gap:16px; }
.related-card { border-radius:12px; background:var(--bg-card); border:1px solid var(--border); overflow:hidden; }
.related-card-link { display:flex; flex-direction:column; text-decoration:none; color:inherit; height:100%; }
.related-card-img-wrap { aspect-ratio:16/9; overflow:hidden; flex-shrink:0; }
.related-card-img-wrap img { width:100%; height:100%; object-fit:cover; transition:transform 0.5s ease-out; }
.related-card:hover .related-card-img-wrap img { transform:scale(1.04); }
.related-card-body { padding:14px; display:flex; flex-direction:column; flex:1; }
.related-card-badge { display:inline-flex; align-items:center; gap:4px; padding:2px 8px; border-radius:999px; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:0.06em; width:fit-content; margin-bottom:8px; border:1px solid transparent; }
.related-card-title { font-size:15px; font-weight:700; color:var(--text); line-height:1.35; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; transition:color 0.2s; }
.related-card:hover .related-card-title { color:var(--malina); }
.related-card-excerpt { margin-top:6px; font-size:13px; color:var(--text-muted); line-height:1.5; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; flex:1; }
.related-card-meta { display:flex; align-items:center; gap:8px; margin-top:8px; font-size:12px; color:var(--text-muted); }

/* ===== FEED CARD COMPONENT ===== */
.fc-compact { display:flex; gap:12px; text-decoration:none; }
.fc-compact-rank { font-size:24px; font-weight:900; color:var(--bg-card-hover); line-height:1; transition:color 0.2s; }
[data-theme="light"] .fc-compact-rank { color:var(--text-muted); }
.fc-compact:hover .fc-compact-rank { color:var(--malina); }
.fc-compact-title { font-size:14px; font-weight:600; color:var(--text); line-height:1.35; }
.fc-compact:hover .fc-compact-title { color:var(--malina); }
.fc-compact-meta { font-size:11px; color:var(--text-muted); }
.fc-card { display:block; padding:16px; border-radius:12px; background:var(--bg-card); border:1px solid var(--border); text-decoration:none; }
.fc-card-img-wrap { border-radius:12px; overflow:hidden; margin-bottom:12px; aspect-ratio:16/9; background:var(--bg-card-hover); }
.fc-card-img-wrap img { width:100%; height:100%; object-fit:cover; }
.fc-card-badge-row { display:flex; align-items:center; gap:6px; margin-bottom:8px; }
.fc-card-dot { width:6px; height:6px; border-radius:50%; flex-shrink:0; }
.fc-card-badge-text { font-size:11px; font-weight:600; }
.fc-card-title { font-size:16px; font-weight:700; color:var(--text); line-height:1.35; margin-bottom:6px; }
.fc-card-excerpt { font-size:13px; color:var(--text-muted); line-height:1.5; margin-bottom:10px; }
.fc-card-meta { font-size:11px; color:var(--text-muted); }

/* ===== HERO CARD COMPONENT ===== */
.hc-link { display:block; border-radius:20px; overflow:hidden; background:var(--bg-card); border:1px solid var(--border); text-decoration:none; transition:all 0.3s; }
.hc-link:hover { border-color:rgba(225,29,106,0.3); box-shadow:0 8px 32px rgba(225,29,106,0.1); }
.hc-img-wrap { aspect-ratio:21/9; overflow:hidden; background:var(--bg-card-hover); }
.hc-img-wrap img { width:100%; height:100%; object-fit:cover; }
.hc-placeholder { aspect-ratio:21/9; display:flex; align-items:center; justify-content:center; }
.hc-placeholder span { font-size:48px; font-weight:900; }
.hc-body { padding:24px; }
.hc-badge-row { display:flex; align-items:center; gap:8px; margin-bottom:12px; }
.hc-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.hc-badge-text { font-size:12px; font-weight:600; }
.hc-date { font-size:11px; color:var(--text-muted); }
.hc-title { font-size:24px; font-weight:800; color:var(--text); line-height:1.25; margin-bottom:10px; letter-spacing:-0.02em; }
.hc-excerpt { font-size:14px; color:var(--text-secondary); line-height:1.6; }
.hc-meta { margin-top:16px; display:flex; align-items:center; gap:12px; }
.hc-author { font-size:12px; font-weight:600; color:var(--text); }
.hc-views { font-size:11px; color:var(--text-muted); }

/* ===== FEED CARD REVEAL ANIMATION ===== */
.feed-card { opacity:1; transform:translateY(0); transition:opacity 0.5s ease-out, transform 0.5s ease-out, background 0.2s, border-color 0.2s, box-shadow 0.2s; }
.feed-card.reveal-animate { opacity:0; transform:translateY(16px); }
.feed-card.reveal-animate.visible { opacity:1; transform:translateY(0); }

/* ===== RESPONSIVE ===== */
@media (min-width:640px) {
  .mj-header .logo-brand { display:flex; }
}
@media (min-width:768px) {
  .thumb { display:block !important; }
  .footer-grid { grid-template-columns:repeat(2,1fr); }
  .footer-bottom-inner { flex-direction:row; justify-content:space-between; }
  .cat-grid { grid-template-columns:repeat(2,1fr) !important; }
  .related-grid { grid-template-columns:repeat(2,1fr) !important; }
}
@media (min-width:1024px) {
  .top-nav { display:flex; }
  .btn-menu { display:none; }
  .footer-grid { grid-template-columns:2fr 1fr 1fr 1fr; }
  .related-grid { grid-template-columns:repeat(3,1fr) !important; }
  /* Issue 3 fix: compact top nav at 1024-1279px to prevent overflow */
  .top-nav { gap:2px; }
  .top-nav-link { padding:4px 8px; font-size:12px; }
  .top-nav-link:nth-child(n+5) { display:none; }
}
@media (min-width:1280px) {
  /* cat-aside hidden: subsections already shown in left sidebar */
  .cat-aside { display:none !important; }
  /* 2-column grid for cards at wide screens */
  .cat-grid { grid-template-columns:repeat(2,1fr) !important; }
  /* Restore full top nav at 1280px+ */
  .top-nav { gap:4px; }
  .top-nav-link { padding:6px 12px; font-size:13px; }
  .top-nav-link:nth-child(n+5) { display:block; }
}
@media (min-width:768px) and (max-width:1023px) {
  .hero-card,
  .hero-static {
    aspect-ratio:auto;
    min-height:380px;
  }

  .hero-content {
    padding:24px;
  }

  .hero-copy {
    max-width:600px;
    padding-top:44px;
  }

  .hero-title {
    font-size:28px;
    max-width:600px;
  }
}
@media (min-width:1024px) and (max-width:1310px) {
  .hero-card,
  .hero-static {
    aspect-ratio:auto;
    min-height:360px;
  }

  .hero-content {
    padding:24px 32px 28px;
  }

  .hero-copy {
    max-width:560px;
    padding-top:32px;
  }

  .hero-title {
    font-size:29px;
    max-width:560px;
  }
}
@media (min-width:1311px) {
  .hero-card,
  .hero-static {
    aspect-ratio:auto;
    min-height:392px;
  }

  .hero-content {
    padding:28px 32px 32px;
  }

  .hero-copy {
    max-width:620px;
    padding-top:28px;
  }
}
@media (max-width:767px) {
  .hero-card,
  .hero-static {
    aspect-ratio:auto;
    min-height:360px;
  }
  .hero-media {
    inset:0;
    width:100%;
  }
  .hero-media::after {
    background:linear-gradient(180deg,rgba(15,23,42,0.18) 0%,rgba(15,23,42,0.34) 30%,rgba(15,23,42,0.92) 100%);
  }
  .hero-overlay {
    background:linear-gradient(180deg,rgba(15,23,42,0.16) 0%,rgba(15,23,42,0.28) 30%,rgba(15,23,42,0.88) 100%);
  }
  .hero-content {
    position:relative;
    z-index:3;
    min-height:360px;
    justify-content:flex-start;
    padding:20px 16px !important;
  }
  .hero-copy {
    max-width:none;
    padding-top:40px;
    margin-top:0;

  }
  .hero-badge {
    margin-bottom:12px;
  }
  .hero-title { font-size:24px !important; line-height:1.18; }
  .hero-excerpt { margin-top:10px; line-height:1.55; }
  .hero-meta { margin-top:12px; row-gap:8px; }
  .search-results-form { flex-direction:column; }
  .search-results-btn { width:100%; }
  .feed-subtitle { display:none; }
  .art-title { font-size:24px !important; }
}

