/* src/assets/css/index.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-color: #f5f5f7;
  --bg-secondary: #ffffff;
  --text-main: #1d1d1f;
  --text-muted: #86868b;
  --accent-primary: #0071e3;
  --accent-secondary: #34c759;
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(0, 0, 0, 0.04);
  --glass-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

h1 { font-size: 3.5rem; font-weight: 700; letter-spacing: -0.04em; }
h2 { font-size: 2.5rem; font-weight: 600; letter-spacing: -0.03em; }
h3 { font-size: 1.75rem; font-weight: 600; }

p {
  margin-bottom: 1.5rem;
}

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

a:hover {
  opacity: 0.8;
}

/* Glassmorphism Classes (Adapted for Light Mode) */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 18px;
}

/* Layout */
.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header */
.site-header {
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--glass-border);
}

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

.site-logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--text-main);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-logo span {
  color: var(--accent-primary);
}

.site-nav {
  display: flex;
  gap: 2rem;
}

.site-nav a {
  color: var(--text-main);
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: -0.01em;
  opacity: 0.8;
}

.site-nav a:hover {
  opacity: 1;
  color: var(--accent-primary);
}

/* Main Content */
.main-content {
  padding: 4rem 0;
  min-height: calc(100vh - 200px);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 980px; /* Pill shape */
  font-weight: 400;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: var(--accent-primary);
  color: #fff;
}

.btn-primary:hover {
  background: #0077ed;
  transform: scale(1.02);
}

/* Post Listings */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.post-card {
  background-color: var(--bg-secondary);
  padding: 2rem;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  border: 1px solid transparent;
}

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

.post-card-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.post-card-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  line-height: 1.25;
}

.post-card-title a {
  color: var(--text-main);
}

.post-card-title a:hover {
  color: var(--accent-primary);
}

.post-card-description {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.read-more {
  font-weight: 500;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.read-more::after {
  content: '›';
  font-size: 1.2rem;
  line-height: 1;
  transform: translateY(-1px);
  transition: transform 0.2s ease;
}

.read-more:hover::after {
  transform: translateX(4px) translateY(-1px);
}

/* Article Styles */
.article-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem;
}

.article-title {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.04em;
  color: var(--text-main);
}

.article-meta {
  color: var(--text-muted);
  font-size: 1rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.article-content {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.125rem;
  color: #333336;
}

.article-content h2 {
  margin-top: 3.5rem;
  font-size: 2rem;
}

.article-content h3 {
  margin-top: 2.5rem;
}

.article-content ul, .article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
  color: #333336;
}

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

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08); /* Apple style soft image shadow */
  margin: 2.5rem 0;
}

.article-content blockquote {
  border-left: 3px solid var(--text-muted);
  padding-left: 1.5rem;
  margin: 2.5rem 0;
  font-style: italic;
  font-size: 1.25rem;
  color: var(--text-muted);
}

/* Tags */
.tag {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-main);
  padding: 0.35rem 0.85rem;
  border-radius: 980px;
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-block;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  transition: background 0.2s ease;
}

.tag:hover {
  background: rgba(0, 0, 0, 0.08);
}

/* Footer */
.site-footer {
  padding: 3rem 0;
  background-color: #f5f5f7;
  border-top: 1px solid #d2d2d7;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Badges */
.badge-green {
  background: rgba(52, 199, 89, 0.1);
  color: var(--accent-secondary);
  padding: 0.2rem 0.6rem;
  border-radius: 980px;
  font-size: 0.8rem;
  font-weight: 500;
}

@media (max-width: 768px) {
  h1, .article-title {
    font-size: 2.5rem;
  }
  h2 {
    font-size: 2rem;
  }
  .site-nav {
    display: none;
  }
  .site-header .container {
    padding: 0 1rem;
  }
}
