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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1a1a2e;
  background: #f5f5f7;
  line-height: 1.7;
  font-size: 17px;
}

a {
  color: #4a6cf7;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* Header */
header {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2b55 50%, #4a6cf7 100%);
  padding: 48px 0;
  margin-bottom: 48px;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.site-title a {
  color: inherit;
}

.site-title a:hover {
  text-decoration: none;
}

.site-tagline {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
  margin-top: 4px;
  font-weight: 400;
}

.site-nav a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.2s;
}

.site-nav a:hover {
  color: #fff;
  text-decoration: none;
}

/* Main layout — grid with sidebar */
.main-grid {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 48px;
  align-items: start;
}

/* Post list */
.post-list {
  list-style: none;
}

.post-item {
  background: #fff;
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.06);
}

.post-date {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #4a6cf7;
  background: rgba(74, 108, 247, 0.08);
  padding: 3px 10px;
  border-radius: 20px;
  font-variant-numeric: tabular-nums;
}

.post-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 10px 0 8px;
  line-height: 1.4;
}

.post-title a {
  color: #1a1a2e;
  transition: color 0.2s;
}

.post-title a:hover {
  color: #4a6cf7;
  text-decoration: none;
}

.post-excerpt {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 24px;
}

.sidebar-section {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
}

.sidebar-section h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  margin-bottom: 16px;
}

.archive-year {
  margin-bottom: 16px;
}

.archive-year:last-child {
  margin-bottom: 0;
}

.archive-year-label {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 6px;
}

.archive-months {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.archive-months a {
  display: block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #555;
  transition: background 0.15s, color 0.15s;
}

.archive-months a:hover {
  background: rgba(74, 108, 247, 0.08);
  color: #4a6cf7;
  text-decoration: none;
}

.archive-months a.active {
  background: linear-gradient(135deg, #4a6cf7, #6366f1);
  color: #fff;
}

/* Single post */
.post-header {
  margin-bottom: 32px;
}

.post-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.post-header .post-date {
  font-size: 0.85rem;
}

.post-content {
  background: #fff;
  border-radius: 12px;
  padding: 36px 40px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
}

.post-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 32px 0 12px;
  color: #1a1a2e;
}

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

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

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

.post-content code {
  background: #f0f0f5;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.88em;
  font-family: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, monospace;
  color: #4a6cf7;
}

.post-content blockquote {
  border-left: 3px solid #4a6cf7;
  padding: 12px 20px;
  margin: 16px 0;
  background: rgba(74, 108, 247, 0.04);
  border-radius: 0 8px 8px 0;
  color: #444;
}

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

.back-link {
  display: inline-block;
  margin-top: 32px;
  font-size: 0.9rem;
  color: #888;
  transition: color 0.2s;
}

.back-link:hover {
  color: #4a6cf7;
  text-decoration: none;
}

/* Footer */
footer {
  margin-top: 64px;
  padding: 24px 0;
  text-align: center;
  color: #999;
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
  .main-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .sidebar {
    position: static;
  }

  header {
    padding: 32px 0;
  }

  header .container {
    flex-direction: column;
    gap: 8px;
  }

  .site-title {
    font-size: 1.5rem;
  }

  .post-header h1 {
    font-size: 1.7rem;
  }

  .post-item {
    padding: 20px 24px;
  }

  .post-content {
    padding: 24px;
  }

  .container {
    padding: 0 16px;
  }
}
