@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;0,900;1,400&family=Fira+Code&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Lato", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.5;
  color: #231f20;
  background: #fff;
}

a { color: #0265dc; text-decoration: underline; }
a:hover { color: #014ba0; }

img { max-width: 100%; }

/* ── Header ──────────────────────────────────────────── */
.site-header {
  background: #fff;
  border-bottom: 2px solid #d5d5d5;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  padding: 0 24px;
}
.brand { text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; }
.brand-name {
  font-size: 22px;
  font-weight: 900;
  color: #231f20;
  letter-spacing: -0.01em;
}
.site-nav { display: flex; gap: 24px; }
.site-nav a {
  color: #231f20;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 0;
  border-bottom: 3px solid transparent;
  transition: border-color 0.15s;
}
.site-nav a:hover,
.site-nav a.active { border-bottom-color: #0265dc; color: #0265dc; }

/* ── Hero Banner (index) ─────────────────────────────── */
.hero-banner {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
  color: #fff;
  padding: 56px 24px 48px;
  text-align: left;
}
.hero-banner-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.hero-banner h1 {
  font-size: 42px;
  font-weight: 900;
  line-height: 1.15;
  margin: 0 0 12px;
}
.hero-banner .hero-sub {
  font-size: 20px;
  font-weight: 400;
  color: rgba(255,255,255,0.8);
  margin: 0;
  max-width: 640px;
}

/* ── Post Cards (index listing) ──────────────────────── */
.listing { max-width: 1100px; margin: 0 auto; padding: 40px 24px 64px; }
.listing-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.listing-header h2 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #666;
}
.post-cards { display: flex; flex-direction: column; gap: 0; }
.post-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #e0e0e0;
  padding: 28px 0;
  transition: background 0.1s;
}
.post-card:first-child { border-top: 1px solid #e0e0e0; }
.post-card:hover { background: #f7f8fa; }
.post-card-category {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0265dc;
  margin-bottom: 6px;
}
.post-card h3 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 8px;
  color: #231f20;
}
.post-card:hover h3 { color: #0265dc; }
.post-card-excerpt {
  font-size: 16px;
  color: #555;
  line-height: 1.5;
  margin: 0 0 10px;
}
.post-card-meta {
  font-size: 14px;
  color: #888;
}

/* ── Post Detail (article pages) ─────────────────────── */
/* Theme banner */
.theme-bar {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
  color: #fff;
  padding: 48px 24px 40px;
}
.theme-bar-inner { max-width: 760px; margin: 0 auto; }
.theme-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.7);
  margin-bottom: 12px;
}
.post-date-line {
  font-size: 15px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 16px;
}
.theme-bar h1 {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 16px;
}
.theme-bar .subtitle {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  color: rgba(255,255,255,0.85);
  margin: 0;
}

/* Author + meta */
.post-meta-bar {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 24px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 15px;
  color: #555;
}
.post-meta-bar .author { font-weight: 700; color: #231f20; }

/* Diamond divider */
.diamond-divider {
  max-width: 760px;
  margin: 28px auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 0;
}
.diamond-divider::before,
.diamond-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #d5d5d5;
}
.diamond-divider span {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #0265dc;
  transform: rotate(45deg);
  margin: 0 12px;
  flex-shrink: 0;
}

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag {
  font-size: 12px;
  color: #555;
  background: #f0f1f3;
  padding: 3px 10px;
  border-radius: 3px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Article body */
.article-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px 48px;
}
.article-body { font-size: 18px; line-height: 1.5; }
.article-body h2 {
  font-size: 24px;
  font-weight: 900;
  margin: 40px 0 16px;
  line-height: 1.25;
}
.article-body h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 32px 0 12px;
}
.article-body p { margin: 0 0 18px; }
.article-body ul, .article-body ol { margin: 0 0 18px; padding-left: 28px; }
.article-body li { margin-bottom: 6px; }
.article-body strong { font-weight: 700; }
.article-body a { color: #0265dc; text-decoration: underline; }
.article-body a:hover { color: #014ba0; }
.article-body blockquote {
  margin: 24px 0;
  padding: 16px 24px;
  border-left: 4px solid #0265dc;
  background: #f7f8fa;
  color: #444;
  font-style: italic;
}
.article-body code {
  font-family: 'Fira Code', 'Courier New', Consolas, monospace;
  padding: 2px 6px;
  font-size: 0.88em;
  background: #f0f1f3;
  border-radius: 3px;
}
.article-body pre {
  background: #1e1e2e;
  color: #e0e0e0;
  padding: 20px;
  overflow-x: auto;
  border-radius: 4px;
  margin: 0 0 18px;
}
.article-body pre code { background: none; padding: 0; font-size: 0.9em; color: #e0e0e0; }
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 16px;
}
.article-body th {
  text-align: left;
  font-weight: 900;
  border-bottom: 2px solid #231f20;
  padding: 10px 12px;
}
.article-body td {
  border-bottom: 1px solid #e0e0e0;
  padding: 10px 12px;
  vertical-align: top;
}
.article-body hr {
  border: none;
  height: 1px;
  background: #d5d5d5;
  margin: 40px 0;
}

/* Related / More Research */
.related {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  border-top: 2px solid #d5d5d5;
}
.related h3 {
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #666;
  margin: 0 0 16px;
}
.related ul { list-style: none; padding: 0; margin: 0; }
.related li {
  padding: 10px 0;
  border-bottom: 1px solid #e0e0e0;
}
.related li:last-child { border-bottom: none; }
.related a {
  color: #231f20;
  text-decoration: none;
  font-size: 17px;
  font-weight: 700;
}
.related a:hover { color: #0265dc; text-decoration: underline; }

/* Back link */
.back-link {
  display: inline-block;
  font-size: 14px;
  color: #0265dc;
  text-decoration: none;
  font-weight: 700;
  margin-bottom: 0;
}
.back-link:hover { text-decoration: underline; }

/* ── Footer ──────────────────────────────────────────── */
.site-footer {
  background: #1a1a2e;
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  padding: 32px 24px;
  text-align: center;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-banner h1 { font-size: 30px; }
  .hero-banner { padding: 36px 16px 32px; }
  .theme-bar h1 { font-size: 28px; }
  .theme-bar .subtitle { font-size: 18px; }
  .theme-bar { padding: 32px 16px 28px; }
  .header-inner { padding: 0 16px; height: 56px; }
  .brand-name { font-size: 18px; }
  .site-nav a { font-size: 13px; }
  .post-card h3 { font-size: 19px; }
  .listing { padding: 24px 16px 48px; }
  .article-container { padding: 0 16px 36px; }
  .related { padding: 24px 16px 36px; }
  .post-meta-bar { padding: 16px 16px 0; }
  .diamond-divider { padding: 0 16px; }
}
