:root { --bg: #f1f5f9; --surface: #ffffff; --text: #090d16; --muted: #475569; --border: #cbd5e1; --primary: #4f46e5; --primary-dark: #3730a3; --accent: #e0e7ff; --radius: 16px; --shadow: 0 6px 20px rgba(9, 13, 22, 0.06); --shadow-hover: 0 20px 36px -8px rgba(79, 70, 229, 0.18); }
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); line-height: 1.78; font-size: 16px; }
a { color: var(--primary); text-decoration: none; transition: all 0.2s ease; }
a:hover { color: var(--primary-dark); }
.op-container { max-width: 1220px; margin: 0 auto; padding: 0 22px; }
.op-reading-progress { position: fixed; top: 0; left: 0; width: 0%; height: 4px; background: linear-gradient(90deg, #4f46e5, #06b6d4); z-index: 9999; }
.op-site-header { background: #090d16; color: #fff; position: sticky; top: 0; z-index: 100; border-bottom: 1px solid #1e293b; }
.op-header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 15px 22px; max-width: 1220px; margin: 0 auto; gap: 16px; }
.op-brand { font-size: 1.42rem; font-weight: 700; color: #ffffff; }
.op-nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.op-nav-links a { color: #cbd5e1; font-weight: 600; font-size: 0.9rem; padding: 7px 14px; border-radius: 999px; }
.op-nav-links a:hover, .op-nav-links a.active { color: #ffffff; background: var(--primary); }
.op-hero-section { background: radial-gradient(circle at top right, #312e81, #090d16 70%); color: #fff; padding: 62px 20px; text-align: center; margin-bottom: 42px; }
.op-hero-section h1 { font-size: 2.4rem; font-weight: 700; margin-bottom: 12px; }
.op-hero-section p { color: #c7d2fe; max-width: 640px; margin: 0 auto 26px auto; font-size: 1.06rem; }
.op-search-box { max-width: 530px; margin: 0 auto; }
.op-search-box input { width: 100%; padding: 15px 22px; border-radius: 999px; border: 2px solid #6366f1; font-size: 1rem; color: var(--text); outline: none; }
.op-posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 28px; margin-bottom: 64px; }
.op-post-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.op-post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.op-card-thumb-wrap { overflow: hidden; height: 205px; background: #e0e7ff; }
.op-card-thumb { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.45s ease; }
.op-post-card:hover .op-card-thumb { transform: scale(1.06); }
.op-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.op-card-cat { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: var(--primary); background: var(--accent); padding: 4px 10px; border-radius: 999px; margin-bottom: 12px; align-self: flex-start; }
.op-card-title { font-size: 1.2rem; font-weight: 700; line-height: 1.38; margin-bottom: 10px; color: var(--text); }
.op-card-title a { color: inherit; }
.op-card-excerpt { font-size: 0.93rem; color: var(--muted); margin-bottom: 18px; flex: 1; }
.op-card-meta { font-size: 0.82rem; color: var(--primary); border-top: 1px solid var(--border); padding-top: 13px; display: flex; justify-content: space-between; font-weight: 600; }
.op-article-layout { display: grid; grid-template-columns: 1fr 315px; gap: 34px; margin: 36px auto 68px auto; align-items: start; }
@media (max-width: 940px) { .op-article-layout { grid-template-columns: 1fr; } }
.op-article-main { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px 44px; box-shadow: var(--shadow); }
.op-breadcrumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.op-article-header h1 { font-size: 2.15rem; line-height: 1.25; font-weight: 700; margin-bottom: 16px; }
.op-article-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.88rem; color: var(--muted); padding: 12px 16px; background: var(--bg); border-radius: 10px; margin-bottom: 26px; border: 1px solid var(--border); }
.op-featured-hero-img { width: 100%; max-height: 450px; object-fit: cover; border-radius: 12px; margin-bottom: 28px; }
.op-ad-slot-box { margin: 26px auto; text-align: center; width: 100%; display: flex; justify-content: center; align-items: center; }
.op-entry-content h2 { font-size: 1.52rem; margin: 36px 0 14px 0; font-weight: 700; border-bottom: 2px solid var(--accent); padding-bottom: 8px; }
.op-entry-content h3 { font-size: 1.22rem; margin: 26px 0 10px 0; font-weight: 700; }
.op-entry-content p { margin-bottom: 18px; }
.op-entry-content ul, .op-entry-content ol { margin: 0 0 20px 24px; }
.op-entry-content li { margin-bottom: 8px; }
.op-entry-content blockquote { background: var(--accent); border-left: 4px solid var(--primary); padding: 18px 22px; margin: 24px 0; border-radius: 0 10px 10px 0; font-style: italic; }
.op-entry-content table { width: 100%; border-collapse: collapse; margin: 28px 0; font-size: 0.94rem; }
.op-entry-content th, .op-entry-content td { border: 1px solid var(--border); padding: 12px 15px; text-align: left; }
.op-entry-content th { background: #090d16; font-weight: 700; color: #fff; }
.op-sidebar { position: sticky; top: 84px; align-self: start; }
@media (max-width: 940px) { .op-sidebar { position: static; } }
.op-sidebar-search-wrap { margin-bottom: 18px; position: relative; }
.op-sidebar-search-input { width: 100%; padding: 12px 38px 12px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 0.92rem; outline: none; }
.op-sidebar-search-icon { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--primary); pointer-events: none; }
.op-sidebar-widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; box-shadow: var(--shadow); }
.op-sidebar-widget h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--primary); }
.op-sidebar-list { list-style: none; }
.op-sidebar-list li { margin-bottom: 11px; padding-bottom: 11px; border-bottom: 1px solid var(--border); font-size: 0.9rem; line-height: 1.45; transition: transform 0.18s ease; }
.op-sidebar-list li:hover { transform: translateX(4px); }
.op-sidebar-list li:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.op-sidebar-list li a { color: var(--text); font-weight: 500; }
.op-archive-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem; padding: 8px 0; border-bottom: 1px solid var(--border); }
.op-archive-row:last-child { border-bottom: none; }
.op-archive-badge { background: var(--accent); color: var(--primary-dark); font-size: 0.78rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.op-journal-list li a { color: var(--primary); font-weight: 400; }
.op-back-to-top { position: fixed; bottom: 26px; right: 26px; width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff; border: none; cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.25s ease; z-index: 999; display: flex; align-items: center; justify-content: center; }
.op-back-to-top.visible { opacity: 1; visibility: visible; }
.op-site-footer { background: #090d16; color: #94a3b8; padding: 36px 20px; margin-top: 64px; font-size: 0.9rem; text-align: center; }

/* Theme Typography & SVG Icon System */
body { font-family: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif; }
h1, h2, h3, .op-brand, .op-card-title { font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif; }
.op-brand { display: inline-flex; align-items: center; gap: 10px; }
.op-brand-icon-wrap { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: var(--primary); flex-shrink: 0; }
.op-meta-chip { display: inline-flex; align-items: center; gap: 6px; }
.op-meta-chip svg, .op-card-cat svg, .op-read-more-arrow svg { vertical-align: middle; flex-shrink: 0; }
.op-card-cat { display: inline-flex; align-items: center; gap: 6px; }
.op-read-more-arrow { display: inline-flex; align-items: center; gap: 5px; }

/* Compact 3-Card Related Posts Row with Short Thumbnails */
.op-related-box { margin-top: 34px; padding-top: 22px; border-top: 2px solid var(--border); }
.op-related-box h3 { font-size: 1.18rem; margin-bottom: 14px; color: var(--text); }
.op-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.op-related-item { display: flex; flex-direction: column; overflow: hidden; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; color: var(--text); transition: all 0.2s ease; }
.op-related-item:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.op-related-thumb { width: 100%; height: 86px; object-fit: cover; display: block; border-bottom: 1px solid var(--border); }
.op-related-title { padding: 10px 12px; font-size: 0.85rem; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 680px) {
  .op-related-grid { grid-template-columns: 1fr; }
  .op-related-item { flex-direction: row; align-items: center; }
  .op-related-thumb { width: 96px; height: 68px; border-bottom: none; border-right: 1px solid var(--border); flex-shrink: 0; }
}

/* Footer Crawl Links */
.op-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin-bottom: 12px; font-size: 0.88rem; }
.op-footer-links a { color: inherit; opacity: 0.9; text-decoration: underline; text-underline-offset: 3px; }
.op-footer-links a:hover { opacity: 1; }

/* Homepage 2-Column Layout with Sticky 20-Post Randomized Sidebar */
.op-home-layout {
  display: grid;
  gap: 34px;
  margin: 0 auto 68px auto;
  align-items: start;
}
.op-home-layout .op-posts-grid {
  margin-bottom: 0;
}
.op-home-sidebar {
  position: sticky;
  top: 84px;
  align-self: start;
}
.op-home-recent-list {
  list-style: none;
  counter-reset: recent-counter;
}
.op-home-recent-list li {
  counter-increment: recent-counter;
  margin-bottom: 11px;
  padding-bottom: 11px;
  border-bottom: 1px dashed var(--border);
  font-size: 0.89rem;
  line-height: 1.44;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: transform 0.2s ease;
}
.op-home-recent-list li:hover { transform: translateX(4px); }
.op-home-recent-list li:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.op-home-recent-list li::before {
  content: counter(recent-counter);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 23px;
  height: 23px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 800;
  margin-top: 2px;
  flex-shrink: 0;
}
.op-home-recent-list li a { color: var(--text); font-weight: 500; }
.op-home-recent-list li a:hover { color: var(--primary); }
.op-home-layout { grid-template-columns: 1fr 315px; }
.op-home-layout .op-posts-grid { grid-template-columns: repeat(2, 1fr); }
.op-home-layout .op-posts-grid .op-post-card:first-child { grid-column: 1 / -1; }
.op-home-layout .op-posts-grid .op-post-card:first-child .op-card-thumb-wrap { height: 310px; }
.op-home-layout .op-posts-grid .op-post-card:first-child .op-card-title { font-size: 1.55rem; }
@media (max-width: 768px) {
  .op-home-layout .op-posts-grid { grid-template-columns: 1fr; }
  .op-home-layout .op-posts-grid .op-post-card:first-child .op-card-thumb-wrap { height: 200px; }
  .op-home-layout .op-posts-grid .op-post-card:first-child .op-card-title { font-size: 1.2rem; }
}
@media (max-width: 980px) {
  .op-home-layout { grid-template-columns: 1fr; }
  .op-home-sidebar { position: static; }
}

/* Global Editorial Polish & Responsive System */
img, video, iframe, table { max-width: 100%; }
.op-site-header { transition: box-shadow 0.25s ease, background-color 0.25s ease; }
.op-card-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.op-card-excerpt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.op-entry-content { overflow-wrap: break-word; word-wrap: break-word; font-size: 1.04rem; }
.op-entry-content p { line-height: 1.84; }
.op-entry-content a { text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }
.op-entry-content table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (max-width: 768px) {
  .op-container { padding: 0 15px; }
  .op-header-inner { flex-direction: column; align-items: flex-start; padding: 12px 15px; gap: 10px; }
  .op-brand { font-size: 1.22rem; }
  .op-nav-links { width: 100%; gap: 6px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .op-nav-links a { font-size: 0.83rem; padding: 6px 11px; white-space: nowrap; }
  .op-hero-section { padding: 36px 15px; margin-bottom: 26px; }
  .op-hero-section h1 { font-size: 1.6rem; line-height: 1.25; }
  .op-hero-section p { font-size: 0.95rem; margin-bottom: 20px; }
  .op-search-box input { padding: 12px 18px; font-size: 0.95rem; }
  .op-posts-grid, .op-home-layout .op-posts-grid { grid-template-columns: 1fr; gap: 20px; margin-bottom: 32px; }
  .op-card-thumb-wrap { height: 190px; }
  .op-card-body { padding: 18px; }
  .op-article-layout { gap: 24px; margin: 20px auto 44px auto; }
  .op-article-main { padding: 22px 16px; border-radius: 10px; }
  .op-article-header h1 { font-size: 1.52rem; line-height: 1.28; }
  .op-article-meta { gap: 8px 14px; font-size: 0.81rem; padding: 10px 12px; }
  .op-featured-hero-img { max-height: 280px; margin-bottom: 20px; }
  .op-entry-content { font-size: 0.98rem; }
  .op-entry-content h2 { font-size: 1.3rem; margin: 26px 0 12px 0; }
  .op-entry-content h3 { font-size: 1.12rem; margin: 20px 0 8px 0; }
  .op-sidebar-widget { padding: 18px; }
  .op-back-to-top { bottom: 16px; right: 16px; width: 40px; height: 40px; }
}