/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
p,
h1,
h2,
h3,
h4,
h5,
h6,
li,
span,
a,
.prose,
.article-card,
.article-header-full,
.footer,
.container {
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -moz-user-select: none;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #1f2937;
  background-color: #ffffff;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.25rem;
  color: #6b7280;
  margin-bottom: 2rem;
}

/* Icons */
.icon {
  width: 1rem;
  height: 1rem;
  display: inline-block;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background-color: #1f2937;
  color: white;
}

.btn-primary:hover {
  background-color: #374151;
}

.btn-outline {
  background-color: transparent;
  color: #1f2937;
  border: 1px solid #d1d5db;
}

.btn-outline:hover {
  background-color: #f9fafb;
}

.btn-outline:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-ghost {
  background-color: transparent;
  color: #6b7280;
  padding: 0.5rem 1rem;
}

.btn-ghost:hover {
  color: #1f2937;
  background-color: #f9fafb;
}

/* Header */
.header {
  border-bottom: 1px solid #e5e7eb;
  background-color: white;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
}

.logo a {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  text-decoration: none;
}

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

.nav-link {
  color: #6b7280;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: #1f2937;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 3px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-btn span {
  width: 20px;
  height: 2px;
  background-color: #1f2937;
  transition: all 0.3s;
}

/* Hero Section */
.hero {
  background-color: #f9fafb;
  padding: 4rem 0;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.25rem;
  color: #6b7280;
  margin-bottom: 2rem;
}

/* Sections */
.featured-articles,
.articles-section {
  padding: 4rem 0;
}

.categories {
  padding: 4rem 0;
  background-color: #f9fafb;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

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

.section-header p {
  color: #6b7280;
  font-size: 1.125rem;
}

/* Page Header */
.page-header {
  padding: 3rem 0;
  background-color: #f9fafb;
}

.back-link {
  margin-bottom: 1.5rem;
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.page-header p {
  font-size: 1.25rem;
  color: #6b7280;
}

/* Page Content */
.page-content {
  padding: 3rem 0;
}

/* Article Images */
.article-image {
  margin: 2rem 0;
  text-align: center;
}

.article-hero-img {
  width: 100%;
  max-width: 800px;
  height: 400px;
  object-fit: cover;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Grids */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

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

/* Cards */
.article-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1.5rem;
  transition: box-shadow 0.2s;
}

.article-card:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.article-header {
  margin-bottom: 1rem;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.badge {
  background-color: #f3f4f6;
  color: #374151;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
}

.read-time {
  color: #6b7280;
  font-size: 0.875rem;
}

.article-card h3 {
  margin-bottom: 0.75rem;
}

.article-card h3 a {
  color: #1f2937;
  text-decoration: none;
  transition: color 0.2s;
}

.article-card h3 a:hover {
  color: #6b7280;
}

.article-card p {
  color: #6b7280;
  margin-bottom: 0;
}

.article-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f3f4f6;
}

.date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #6b7280;
  font-size: 0.875rem;
}

.category-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 2rem;
  text-align: center;
  transition: box-shadow 0.2s;
}

.category-card:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.category-icon {
  width: 3rem;
  height: 3rem;
  background-color: #f3f4f6;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.category-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  color: #6b7280;
}

.category-card h3 {
  margin-bottom: 0.5rem;
}

.category-card p {
  color: #6b7280;
  margin-bottom: 1.5rem;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
}

.pagination-info {
  color: #6b7280;
}

/* Article Page Styles */
.article-page {
  padding: 3rem 0;
}

.article-header-full {
  margin-bottom: 2rem;
}

.article-header-full .badge {
  margin-bottom: 1rem;
}

.article-header-full h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.article-header-full .excerpt {
  font-size: 1.25rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.article-meta-full {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 2rem;
}

.article-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.article-info > div {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Prose Styles */
.prose {
  max-width: 800px;
  margin: 0 auto;
}

.prose h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: #1f2937;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.prose h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.prose p {
  margin-bottom: 1rem;
  line-height: 1.75;
}

.prose ul {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
  list-style-type: disc;
}

.prose ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.prose ol li {
  margin-bottom: 0.5rem;
  list-style-type: decimal;
}

.prose strong {
  font-weight: 600;
  color: #1f2937;
}

.prose a {
  color: #2563eb;
  text-decoration: underline;
}

.prose a:hover {
  color: #1d4ed8;
}

/* Bio Examples Styling */
.bio-example {
  background: #f8f9fa;
  border-left: 4px solid #007bff;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
}

.bio-example.bad-example {
  background: #fff5f5;
  border-left-color: #dc3545;
}

.bio-text {
  background: white;
  padding: 1rem;
  border-radius: 6px;
  margin: 1rem 0;
  font-style: italic;
  border: 1px solid #e9ecef;
}

.template-box {
  background: #e8f5e8;
  border: 1px solid #28a745;
  padding: 1.5rem;
  margin: 1rem 0;
  border-radius: 8px;
}

.mistake-fix {
  background: #fff;
  border: 1px solid #dee2e6;
  padding: 1.5rem;
  margin: 1rem 0;
  border-radius: 8px;
}

.dont {
  color: #dc3545;
  font-weight: bold;
}

.do {
  color: #28a745;
  font-weight: bold;
}

.checklist {
  background: #f8f9fa;
  border: 2px solid #007bff;
  padding: 1.5rem;
  border-radius: 8px;
  margin: 2rem 0;
}

.checklist ul {
  margin: 1rem 0 0 0;
}

.checklist li {
  margin: 0.5rem 0;
}

/* Related Articles */
.related-articles {
  border-top: 1px solid #e5e7eb;
  padding-top: 3rem;
  margin-top: 3rem;
}

.related-articles h2 {
  font-size: 1.5rem;
  margin-bottom: 2rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* Footer */
.footer {
  background-color: #1f2937;
  color: white;
  padding: 3rem 0;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.footer-section h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer-section p {
  color: #9ca3af;
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-section ul li a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 2rem;
  text-align: center;
}

.footer-bottom p {
  color: #9ca3af;
  margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  .nav {
    display: none;
  }

  .nav.mobile-open {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    width: 100%;
    height: 100vh;
    z-index: 200;
    border-radius: 0 0 0.5rem 0.5rem;
    padding: 1rem 0;
    gap: 0.5rem;
    align-items: stretch;
  }

  .nav.mobile-open .nav-link {
    padding: 0.75rem 1rem;
    text-align: center;
    border-bottom: 1px solid #f3f4f6;
  }

  .nav.mobile-open .nav-link:last-child {
    border-bottom: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

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

  .hero p {
    font-size: 1rem;
  }

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

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

  .article-header-full h1 {
    font-size: 2rem;
  }

  .article-meta-full {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .pagination {
    flex-direction: column;
    gap: 0.5rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .article-hero-img {
    height: 250px;
  }
}

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

  .featured-articles,
  .articles-section,
  .categories {
    padding: 2rem 0;
  }

  .page-header,
  .page-content {
    padding: 2rem 0;
  }

  .article-card,
  .category-card {
    padding: 1rem;
  }

  .article-hero-img {
    height: 200px;
  }
}

.filter-btn.active {
  background-color: #1f2937;
  color: #fff;
  border: 1px solid #1f2937;
  pointer-events: none;
}

.filter-btn {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #1f2937;
  transition: background 0.2s, color 0.2s;
}

.filter-btn:hover:not(.active) {
  background: #f3f4f6;
  color: #111827;
}
