:root {
  --bg: #ffffff;
  --bg-elevated: #f9fafb;
  --border: #e5e7eb;
  --border-hover: #d1d5db;
  --text: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --accent: #b45309;
  --accent-light: #fef3c7;
  --radius: 16px;
  --radius-lg: 24px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Hiragino Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.logo-mark {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-radius: 8px;
}

.nav-btn {
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--text);
  color: var(--bg);
  transition: all 0.2s;
}

.nav-btn:hover {
  opacity: 0.85;
}

/* ===== HERO ===== */
.blog-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px 48px;
  border-bottom: 1px solid var(--border);
}

.blog-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.blog-hero p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 480px;
}

/* ===== FEATURED POST ===== */
.featured-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px;
}

.featured-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  background: var(--bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.featured-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.featured-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.featured-content {
  padding: 0 32px 32px;
}

.post-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--accent-light);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.featured-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 16px;
}

.featured-content p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}

.post-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: var(--accent);
  transition: gap 0.2s;
}

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

/* ===== POST GRID ===== */
.posts-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.section-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.post-card {
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.post-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.post-card-image {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}

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

.post-card .post-tag {
  margin-bottom: 12px;
}

.post-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}

.post-card .post-meta-row {
  font-size: 0.8125rem;
}

/* ===== SINGLE POST ===== */
.post-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 100px;
}

.post-header {
  margin-bottom: 40px;
}

.post-header .post-tag {
  margin-bottom: 20px;
}

.post-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin-bottom: 20px;
}

.post-header .post-meta-row {
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ===== POST BODY ===== */
.post-body {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.post-body p {
  margin-bottom: 28px;
}

.post-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 56px 0 24px;
  letter-spacing: -0.02em;
}

.post-body h3 {
  font-size: 1.1875rem;
  font-weight: 600;
  color: var(--text);
  margin: 40px 0 16px;
}

.post-body img {
  width: 100%;
  border-radius: var(--radius);
  margin: 32px 0;
}

.post-body strong {
  color: var(--text);
  font-weight: 600;
}

.post-body ul, .post-body ol {
  margin: 24px 0 32px;
  padding-left: 24px;
}

.post-body li {
  margin-bottom: 12px;
}

.post-body li::marker {
  color: var(--accent);
}

.post-body hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 48px 0;
}

.post-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 20px 24px;
  background: var(--bg-elevated);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 32px 0;
  font-style: italic;
}

.post-body table {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 24px 0 32px;
  border-collapse: collapse;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.post-body th,
.post-body td {
  min-width: 132px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.post-body th {
  color: var(--text);
  font-weight: 600;
}

/* ===== CTA ===== */
.post-cta {
  margin-top: 64px;
  padding: 40px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.post-cta h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.post-cta p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 12px;
  transition: all 0.2s;
}

.cta-btn:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

.newsletter-box {
  margin: 16px 0 30px;
  padding: 18px 18px 20px;
  border: 2px solid #f59e0b;
  background: #fffbeb;
  border-radius: 12px;
  text-align: center;
}

.newsletter-box--bottom {
  margin-top: 14px;
}

.newsletter-box p {
  font-size: 0.92rem;
  line-height: 1.7;
  color: #78350f;
  margin: 0 0 10px;
}

.newsletter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #d97706;
  color: #fff !important;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25);
}

.newsletter-btn:hover {
  background: #b45309;
  opacity: 1;
}

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .blog-hero {
    padding: 48px 20px 32px;
  }
  
  .blog-hero h1 {
    font-size: 1.75rem;
  }
  
  .blog-hero p {
    font-size: 1rem;
  }
  
  .featured-section,
  .posts-section {
    padding-left: 20px;
    padding-right: 20px;
  }
  
  .featured-content {
    padding: 24px;
  }
  
  .featured-content h2 {
    font-size: 1.375rem;
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .post-card-content {
    padding: 20px;
  }
  
  .post-page {
    padding: 40px 20px 80px;
  }
  
  .post-body {
    font-size: 1rem;
  }
  
  .post-body h2 {
    font-size: 1.25rem;
    margin: 40px 0 20px;
  }
  
  .post-cta {
    padding: 32px 24px;
  }
}

@media (min-width: 1024px) {
  .featured-card {
    grid-template-columns: 1.2fr 1fr;
  }
  
  .featured-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  .featured-image {
    aspect-ratio: 4/3;
  }
}

/* ===== UTILITIES ===== */
::selection {
  background: var(--accent);
  color: #fff;
}
