/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Variables */
:root {
  --color-primary: #3a7afe;
  --color-text: #000;
  --color-text-muted: #737373;
  --color-bg: #fff;
  --color-border: #f0f1f2;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', 'Inter Display', sans-serif;
}

/* Base */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.site-header {
  background: var(--color-primary);
  padding: 0;
}

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

.site-header .logo {
  display: flex;
  align-items: center;
}

.site-header .logo img {
  height: 38px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-links a {
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.5px;
}

.nav-links a:hover {
  opacity: 0.8;
}

.btn-primary {
  background: #fff !important;
  color: var(--color-primary) !important;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 600 !important;
}

/* Main */
main {
  flex: 1;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Hero */
.hero {
  padding: 80px 0 60px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 52px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

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

.hero p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
}

/* Posts List */
.posts-list {
  padding-bottom: 80px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-preview {
  border-radius: 12px;
  background: linear-gradient(135deg, #f8f9fa 0%, #f0f2f5 100%);
  border: 1px solid transparent;
  transition: all 0.25s ease;
}

.post-preview:hover {
  background: #fff;
  border-color: #e0e4e8;
  box-shadow: 0 8px 32px rgba(58, 122, 254, 0.12);
  transform: translateY(-3px);
}

.post-preview-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}

/* Post Thumbnail */
.post-thumbnail {
  width: 100%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(135deg, #e8ecf1 0%, #d8dfe8 100%);
}

.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-preview:hover .post-thumbnail img {
  transform: scale(1.03);
}

.post-preview-content {
  padding: 28px 32px 32px;
}

.post-date {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.post-preview h2 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 12px 0;
  letter-spacing: -0.02em;
  color: var(--color-text);
  transition: color 0.2s ease;
}

.post-preview:hover h2 {
  color: var(--color-primary);
}

.post-preview p {
  color: var(--color-text-muted);
  line-height: 1.65;
  font-size: 15px;
  margin: 0 0 20px 0;
}

.post-read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
  opacity: 0.7;
  transition: all 0.25s ease;
}

.post-read-more svg {
  transition: transform 0.2s ease;
}

.post-preview:hover .post-read-more {
  opacity: 1;
}

.post-preview:hover .post-read-more svg {
  transform: translateX(3px);
}

/* Single Post */
.post {
  padding: 60px 24px 80px;
}

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

.post-header h1 {
  font-family: var(--font-heading);
  font-size: 52px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.post-header .meta {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: -0.02em;
  color: var(--color-text);
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.tag {
  font-size: 12px;
  color: var(--color-primary);
  background: rgba(58, 122, 254, 0.1);
  padding: 4px 12px;
  border-radius: 4px;
}

/* Post Content */
.post-content {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text);
}

.post-content p {
  margin-bottom: 10px;
}

.post-content h2 {
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.3;
  margin: 40px 0 16px;
}

.post-content h3 {
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.3;
  margin: 40px 0 16px;
}

.post-content h4 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  margin: 40px 0 12px;
}

.post-content h5 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  margin: 40px 0 12px;
}

.post-content ul, .post-content ol {
  margin: 10px 0 10px 24px;
}

.post-content li {
  margin-bottom: 10px;
  line-height: 1.6;
}

.post-content strong {
  font-weight: 700;
}

.post-content a {
  color: var(--color-primary);
  text-decoration: none;
}

.post-content a:hover {
  text-decoration: underline;
}

.post-content code {
  font-family: 'Roboto Mono', monospace;
  font-size: 14px;
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 4px;
}

.post-content pre {
  background: #1a1a1a;
  color: #f5f5f5;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 24px 0;
}

.post-content pre code {
  background: none;
  padding: 0;
  font-size: 14px;
}

.post-content blockquote {
  border-left: 4px solid var(--color-primary);
  padding-left: 20px;
  margin: 24px 0;
  color: var(--color-text-muted);
  font-style: italic;
}

/* Article Images */
.post-content img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 32px 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.post-content figure {
  margin: 40px 0;
}

.post-content figure img {
  margin: 0;
}

.post-content figcaption {
  font-size: 14px;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: 12px;
  font-style: italic;
}

/* Featured Image (at top of article) */
.post-featured-image {
  width: 100%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 40px;
  background: linear-gradient(135deg, #e8ecf1 0%, #d8dfe8 100%);
}

.post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* CTA Button */
.post-content .cta-button {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  margin-top: 24px;
}

.post-content .cta-button:hover {
  background: #2563eb;
  text-decoration: none;
}

/* Post Footer */
.post-footer {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.back-link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

.back-link:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  background: #f5f5f5;
  padding: 48px 24px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
}

.footer-brand a {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  color: var(--color-text);
  text-decoration: none;
}

.footer-brand p {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 12px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: 0.5px;
}

.footer-links a:hover {
  color: var(--color-primary);
}

/* Responsive */
@media (max-width: 768px) {
  .site-header nav {
    padding: 12px 16px;
  }

  .nav-links {
    display: none;
  }

  .hero {
    padding: 48px 0 40px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .post-header h1 {
    font-size: 36px;
  }

  .post-content h2,
  .post-content h3 {
    font-size: 28px;
  }

  .post-content h4,
  .post-content h5 {
    font-size: 18px;
  }

  .footer-content {
    flex-direction: column;
    gap: 24px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 16px;
  }

  .post-preview h2 {
    font-size: 22px;
  }

  .post-preview-arrow {
    display: none;
  }

  .post-preview-content {
    padding: 20px 24px 24px;
  }

  .post-thumbnail {
    border-radius: 12px 12px 0 0;
  }

  .post-content img {
    margin: 24px 0;
    border-radius: 8px;
  }

  .post-featured-image {
    border-radius: 8px;
    margin-bottom: 32px;
  }
}
