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

:root {
  --bg: #f5f5f7;
  --bg-elevated: #ffffff;
  --text-primary: #1d1d1f;
  --text-secondary: #86868b;
  --accent: #0071e3;
  --accent-secondary: #5e5ce6;
  --accent-hover: #0077ed;
  --border: rgba(0, 0, 0, 0.1);
  --card-bg: #ffffff;

  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2.5rem;
  --spacing-xl: 4rem;
  --spacing-2xl: 5rem;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.47059;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Layout Components */
.container {
  max-width: 1200px;
  padding: 0 1.5rem;
  margin: 0 auto;
}

@media (max-width: 767px) {
  .container {
    padding: 0 1.25rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .card {
    padding: 1.25rem;
  }

  .card-grid {
    gap: 1.25rem;
  }
}

.header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  padding: 1.2rem 0;
}

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

.nav-brand {
  display: flex;
  align-items: center; 
  gap: 12px;           
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
}

.nav-logo {
  height: 32px;      
  width: auto;
  border-radius: 4px;
}

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

.nav-links a {
  color: var(--text-primary);
  text-decoration: none;
  transition: opacity 0.3s ease;
  font-size: 14px;
  opacity: 0.8;
}

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

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
}

.footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
  list-style: none;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: opacity 0.3s ease;
  font-size: 14px;
}

.footer-links a:hover {
  opacity: 0.7;
}

/* Content Components */
.hero {
  padding-top: 5rem;
  padding-bottom: 5rem;
  display: flex;
  align-items: center;
  gap: 3rem;
}

.hero img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
}

.section {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.card {
  background: var(--card-bg);
  border: none;
  border-radius: 18px;
  padding: 2rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.06);
}

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

.card p {
  margin-bottom: 1rem;
}

.card-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  background: var(--accent);
  color: white;
  border-radius: 980px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 400;
}

.btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-secondary:hover {
  background: var(--accent);
  color: white;
}

.tag {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  background: rgba(0, 113, 227, 0.1);
  border-radius: 16px;
  font-size: 13px;
  color: var(--accent);
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  font-weight: 400;
}

/* Typography */
h1, .h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  line-height: 1.0714285714;
  letter-spacing: -0.015em;
}

h2, .h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

h3, .h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
  line-height: 1.2;
}

.text-secondary {
  color: var(--text-secondary);
}

.text-small {
  font-size: 0.875rem;
}

.text-center {
  text-align: center;
}

/* Article content styling */
article p {
  margin-bottom: 1rem;
}

article h2 {
  margin-top: 2rem;
}

article ul, article ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

article pre {
  background: #f5f5f7;
  border: none;
  border-radius: 12px;
  padding: 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

article code {
  font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
  font-size: 0.9rem;
  color: #c7254e;
}

article img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 1.5rem 0;
}

/* Utility Classes */
.mb-xs { margin-bottom: var(--spacing-xs); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }

.mt-xs { margin-top: var(--spacing-xs); }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }

/* Responsive */
@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {
  .section {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .card {
    padding: 1.5rem;
  }

  .card-grid {
    gap: 1.5rem;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 70%;
    max-width: 320px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    flex-direction: column;
    padding: 2.5rem;
    box-shadow: -2px 0 20px rgba(0, 0, 0, 0.15);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 1.5rem;
  }

  .nav-links.active {
    right: 0;
  }

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

  h2, .h2 {
    font-size: 2rem;
  }
}
