/* Reset and Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

body {
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 400;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

/* CSS Variables */
:root {
  --bg: #ffffff;
  --bg-secondary: #fafafa;
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --border: #e5e7eb;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --radius: 8px;
  --max-width: 720px;
  --spacing: 1.5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --text: #f9fafb;
    --text-muted: #9ca3af;
    --text-light: #6b7280;
    --accent: #60a5fa;
    --accent-hover: #3b82f6;
    --border: #374151;
  }
}

/* Layout */
body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing);
}

nav h1 a {
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  transition: color 0.2s ease;
}

nav h1 a:hover {
  color: var(--accent);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
}

nav a:hover {
  color: var(--accent);
}

main {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--spacing);
  width: 100%;
}

footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--text-light);
  background: var(--bg-secondary);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  font-weight: 600;
  color: var(--text);
}

h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem 0;
}

h4 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

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

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Components */
.hero {
  text-align: center;
  padding: 3rem 0;
  margin-bottom: 3rem;
}

.hero h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.recent h3 {
  margin-bottom: 2rem;
  font-size: 1.75rem;
}

.posts {
  display: grid;
  gap: 1.5rem;
}

.post-card {
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  transition: all 0.2s ease;
}

.post-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.post-card time {
  font-size: 0.875rem;
  color: var(--text-light);
  font-weight: 500;
  display: block;
  margin-bottom: 0.75rem;
}

.post-card h4 {
  margin: 0 0 0.75rem 0;
  font-size: 1.25rem;
}

.post-card h4 a {
  color: var(--text);
  font-weight: 600;
}

.post-card h4 a:hover {
  color: var(--accent);
  text-decoration: none;
}

.post-card p {
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* Article Content */
article {
  margin-bottom: 3rem;
}

article h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
}

article p {
  font-size: 1.125rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  :root {
    --spacing: 1rem;
  }
  
  body {
    font-size: 15px;
  }
  
  nav {
    flex-direction: column;
    gap: 1rem;
  }
  
  nav ul {
    gap: 1.5rem;
  }
  
  .hero {
    padding: 2rem 0;
    margin-bottom: 2rem;
  }
  
  .hero h2 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.375rem;
  }
  
  .post-card {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  nav ul {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .hero h2 {
    font-size: 1.75rem;
  }
  
  .post-card {
    padding: 1.25rem;
  }
}
