@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Merriweather:wght@400;700&display=swap');

:root {
  --primary: #1a3a5c;
  --primary-light: #2d5f8a;
  --accent: #d4a017;
  --accent-light: #f0c040;
  --bg: #f8f6f1;
  --bg-card: #ffffff;
  --text: #1a1a1a;
  --text-muted: #5a5a5a;
  --text-light: #8a8a8a;
  --border: #e0ddd5;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 6px 24px rgba(0,0,0,0.12);
  --radius: 12px;
  --max-width: 1100px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

a { color: var(--primary-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent); }

img { max-width: 100%; height: auto; display: block; }

/* Header */
.site-header {
  background: var(--primary);
  color: #fff;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo {
  font-family: 'Merriweather', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo .logo-icon {
  font-size: 1.8rem;
}

.site-logo span {
  color: var(--accent);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 24px;
}

nav a {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

nav a:hover, nav a.active {
  color: #fff;
  border-bottom-color: var(--accent);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #0d2137 100%);
  color: #fff;
  padding: 80px 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 400'%3E%3Cpath d='M200 200 L400 180 L600 200 L400 220Z' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='2'/%3E%3Cpath d='M350 190 L400 150 L450 190' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='1.5'/%3E%3Cpath d='M100 250 L700 250' fill='none' stroke='rgba(255,255,255,0.03)' stroke-width='1'/%3E%3C/svg%3E") center/cover no-repeat;
  opacity: 0.6;
}

.hero-content {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

.hero h1 {
  font-family: 'Merriweather', serif;
  font-size: 2.6rem;
  margin-bottom: 16px;
  line-height: 1.3;
}

.hero h1 span {
  color: var(--accent-light);
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 28px;
  line-height: 1.7;
}

.hero-cta {
  display: inline-block;
  background: var(--accent);
  color: var(--primary);
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 1rem;
  transition: all 0.3s;
}

.hero-cta:hover {
  background: var(--accent-light);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(212,160,23,0.4);
}

/* Main layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 16px;
}

.main-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
}

/* Blog cards */
.posts-section h2 {
  font-family: 'Merriweather', serif;
  font-size: 1.6rem;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
}

.post-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 28px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.post-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: var(--primary-light);
}

.post-card-img-placeholder {
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: rgba(255,255,255,0.3);
}

.post-card-body {
  padding: 24px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 0.82rem;
  color: var(--text-light);
}

.post-tag {
  background: var(--accent);
  color: var(--primary);
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-card-body h3 {
  font-family: 'Merriweather', serif;
  font-size: 1.25rem;
  margin-bottom: 10px;
  line-height: 1.4;
}

.post-card-body h3 a {
  color: var(--text);
}

.post-card-body h3 a:hover {
  color: var(--primary-light);
}

.post-card-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.read-more {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary-light);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.read-more:hover {
  gap: 10px;
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.sidebar-widget {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.sidebar-widget h3 {
  font-family: 'Merriweather', serif;
  font-size: 1.1rem;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

.about-widget p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.specs-list {
  list-style: none;
}

.specs-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
}

.specs-list li:last-child { border-bottom: none; }

.specs-list .label {
  color: var(--text-muted);
}

.specs-list .value {
  font-weight: 600;
  color: var(--primary);
}

.steps-list {
  list-style: none;
  counter-reset: step;
}

.steps-list li {
  counter-increment: step;
  padding: 8px 0 8px 36px;
  position: relative;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.steps-list li:last-child { border-bottom: none; }

.steps-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 8px;
  width: 24px;
  height: 24px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags-cloud a {
  background: var(--bg);
  color: var(--text-muted);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.2s;
  border: 1px solid var(--border);
}

.tags-cloud a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Article page */
.article-full {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 48px;
  margin-bottom: 28px;
}

.article-full h1 {
  font-family: 'Merriweather', serif;
  font-size: 2rem;
  line-height: 1.3;
  margin-bottom: 16px;
}

.article-full .post-meta {
  margin-bottom: 24px;
}

.article-full .article-img {
  width: calc(100% + 96px);
  margin-left: -48px;
  margin-bottom: 32px;
  height: 360px;
  object-fit: cover;
}

.article-full .article-img-placeholder {
  width: calc(100% + 96px);
  margin-left: -48px;
  margin-bottom: 32px;
  height: 360px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
  color: rgba(255,255,255,0.2);
}

.article-hero {
  margin: 0 0 32px;
}

.article-hero .article-img {
  max-width: none;
  margin-bottom: 8px;
}

.credit {
  display: block;
  font-size: 0.75rem;
  color: var(--text-light);
  font-style: normal;
}

.credit a {
  color: var(--text-light);
  text-decoration: underline;
}

.article-figure {
  margin: 28px 0;
}

.article-figure img {
  width: 100%;
  border-radius: var(--radius);
  max-height: 420px;
  object-fit: cover;
}

.article-figure figcaption {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.5;
}

.article-figure figcaption .credit {
  margin-top: 4px;
}

.article-content h2 {
  font-family: 'Merriweather', serif;
  font-size: 1.4rem;
  margin: 32px 0 16px;
  color: var(--primary);
}

.article-content h3 {
  font-size: 1.15rem;
  margin: 24px 0 12px;
  color: var(--primary-light);
}

.article-content p {
  margin-bottom: 16px;
  color: var(--text-muted);
}

.article-content ul, .article-content ol {
  margin: 0 0 16px 24px;
  color: var(--text-muted);
}

.article-content li {
  margin-bottom: 6px;
}

.article-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 16px 24px;
  margin: 24px 0;
  background: rgba(212,160,23,0.06);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-muted);
}

.info-box {
  background: rgba(26,58,92,0.06);
  border: 1px solid rgba(26,58,92,0.15);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0;
}

.info-box h4 {
  color: var(--primary);
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.info-box p, .info-box ul {
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,0.7);
  padding: 48px 16px 24px;
  margin-top: 60px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
}

.footer-col h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 16px;
  font-family: 'Merriweather', serif;
}

.footer-col p, .footer-col li {
  font-size: 0.88rem;
  line-height: 1.8;
}

.footer-col ul {
  list-style: none;
}

.footer-col a {
  color: rgba(255,255,255,0.7);
}

.footer-col a:hover {
  color: var(--accent-light);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.82rem;
}

/* Responsive */
@media (max-width: 768px) {
  .menu-toggle { display: block; }

  nav ul {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--primary);
    flex-direction: column;
    padding: 16px;
    gap: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  }

  nav ul.open { display: flex; }

  nav li { padding: 8px 0; }

  .hero { padding: 48px 16px; }
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 1rem; }

  .main-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .article-full { padding: 24px; }
  .article-full .article-img,
  .article-full .article-img-placeholder {
    width: calc(100% + 48px);
    margin-left: -24px;
  }
}
