/* Modern Bold Theme */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #f59e0b;
  --text: #1e293b;
  --text-light: #64748b;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --border: #e2e8f0;
  --code-bg: #1e293b;
  --success: #10b981;
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

/* Header */
.site-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-logo {
  flex-shrink: 0;
}

.site-nav a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  margin-left: 2rem;
  font-weight: 500;
  transition: color 0.2s;
}

.site-nav a:hover {
  color: white;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 5rem 2rem;
  text-align: center;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero .subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Main Content */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.content-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* Section Titles */
.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text);
  position: relative;
  padding-bottom: 0.5rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
}

/* Project Cards */
.projects-section {
  padding: 4rem 0;
  background: var(--bg-alt);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

.project-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.project-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.project-card-header {
  padding: 2rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
}

.project-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.project-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  flex-shrink: 0;
}

.project-card-header h3 {
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
}

.project-card-header .badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.project-card-header .badge-games {
  background: #f59e0b;
  color: white;
}

.project-card-header .badge-language {
  background: #10b981;
  color: white;
}

.tech-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.tech-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
}

.tech-badge-dart {
  background: #0175c2;
  color: white;
}

.tech-badge-flutter {
  background: #02569b;
  color: white;
}

.tech-badge-rust {
  background: #dea584;
  color: #1a1a1a;
}

.tech-badge-python {
  background: #306844;
  color: white;
}

.project-card-body {
  padding: 1.5rem 2rem 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-card-body p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  flex: 1;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: gap 0.2s;
}

.project-link:hover {
  gap: 0.75rem;
}

.project-link::after {
  content: '\2192';
}

/* Store Badges */
.store-badges {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.store-badge {
  height: 40px;
  width: auto;
  transition: opacity 0.2s;
}

.store-badge:hover {
  opacity: 0.8;
}

/* Stats Badge */
.stats-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--success);
  color: white;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.stats-badge::before {
  content: '\2713';
}

/* Blog Section */
.blog-section {
  padding: 4rem 0;
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.post-item {
  padding: 1.5rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.post-item:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.post-item a {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.post-item h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.post-item time {
  color: var(--text-light);
  font-size: 0.875rem;
}

.post-thumbnail {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.post-item-content {
  flex: 1;
  min-width: 0;
}

/* Single Post */
.post-header {
  padding: 4rem 2rem 3rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  text-align: center;
}

.post-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  max-width: 800px;
  margin: 0 auto 1rem;
}

.post-header time {
  opacity: 0.9;
}

.post-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  color: var(--text);
}

.post-content h1 { font-size: 2rem; }
.post-content h2 { font-size: 1.5rem; }
.post-content h3 { font-size: 1.25rem; }

.post-content p {
  margin-bottom: 1.5rem;
}

.post-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 2rem 0;
}

.post-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--bg-alt);
  border-radius: 0 8px 8px 0;
  color: var(--text-light);
}

.post-content pre {
  background: var(--code-bg);
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.post-content code {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size: 0.9em;
}

.post-content :not(pre) > code {
  background: var(--bg-alt);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  color: var(--primary-dark);
}

.post-content ul,
.post-content ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.post-content li {
  margin-bottom: 0.5rem;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.post-content th,
.post-content td {
  padding: 0.75rem;
  border: 1px solid var(--border);
  text-align: left;
}

.post-content th {
  background: var(--bg-alt);
  font-weight: 600;
}

/* Footer */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,0.8);
  padding: 3rem 2rem;
  text-align: center;
}

.site-footer a {
  color: white;
}

/* Responsive */
@media (max-width: 768px) {
  html {
    font-size: 16px;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .header-content {
    flex-direction: column;
    gap: 1rem;
  }

  .site-nav a {
    margin: 0 1rem;
  }

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

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