/* Base styles */
:root {
  --primary-color: #0066cc;
  --secondary-color: #f1f5f9;
  --text-color: #333;
  --light-text: #666;
  --header-bg: #f8f9fa;
  --card-shadow: rgba(0, 0, 0, 0.1);
  --tech-color: #3498db;
  --philosophy-color: #9b59b6;
  --languages-color: #e67e22;
  --lifestyle-color: #2ecc71;
  --misc-color: #95a5a6;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #fff;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

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

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
  margin-top: 2rem;
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header */
header {
  background-color: var(--header-bg);
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
}

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

.site-branding {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-icon {
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
}

.site-title-group {
  display: flex;
  flex-direction: column;
}

header h1 {
  font-size: 1.5rem;
  margin: 0;
  line-height: 1.2;
}

.tagline {
  font-size: 0.9rem;
  color: var(--light-text);
  margin: 0;
}

/* Navigation */
nav {
  background-color: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

nav ul {
  display: flex;
  list-style: none;
  justify-content: center;
  padding: 0;
}

nav li {
  margin: 0;
}

nav a {
  display: block;
  padding: 1rem 1.5rem;
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.2s ease;
}

nav a:hover, nav a.active {
  color: var(--primary-color);
  background-color: var(--secondary-color);
}

/* Main content */
main {
  padding: 2rem 0 4rem;
}

section {
  margin-bottom: 3rem;
}

/* Intro section */
.intro {
  text-align: center;
  margin-bottom: 3rem;
}

.intro p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 2rem;
}

.stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  background-color: var(--secondary-color);
  border-radius: 8px;
  min-width: 150px;
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary-color);
}

.stat-label {
  font-size: 1rem;
  color: var(--light-text);
}

/* Category grid */
.category-grid h2 {
  text-align: center;
  margin-bottom: 2rem;
}

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

.category-card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 8px var(--card-shadow);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text-color);
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px var(--card-shadow);
  text-decoration: none;
}

.tech::before {
  background-color: var(--tech-color);
}

.philosophy::before {
  background-color: var(--philosophy-color);
}

.languages::before {
  background-color: var(--languages-color);
}

.lifestyle::before {
  background-color: var(--lifestyle-color);
}

.misc::before {
  background-color: var(--misc-color);
}

.card-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-content h3 {
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

.card-content p {
  color: var(--light-text);
  flex-grow: 1;
}

.card-count {
  margin-top: 1rem;
  align-self: flex-end;
  font-size: 0.9rem;
  color: var(--primary-color);
}

/* Featured section */
.featured-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.featured-item {
  background-color: var(--secondary-color);
  padding: 1.5rem;
  border-radius: 8px;
  display: block;
  text-decoration: none;
  color: var(--text-color);
  transition: background-color 0.2s ease;
}

.featured-item:hover {
  background-color: #e9ecef;
  text-decoration: none;
}

.featured-item h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.featured-item p {
  color: var(--light-text);
}

/* About section */
.about {
  max-width: 800px;
  margin: 0 auto;
}

.usage {
  margin-top: 2rem;
  background-color: var(--secondary-color);
  padding: 1.5rem;
  border-radius: 8px;
}

.usage h3 {
  margin-top: 0;
}

.usage ol {
  margin-left: 1.5rem;
}

.usage li {
  margin-bottom: 0.5rem;
}

/* Footer */
footer {
  background-color: var(--header-bg);
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid #eee;
}

/* Responsive */
@media (max-width: 768px) {
  .stats {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .stat-box {
    width: 100%;
    max-width: 300px;
  }
  
  nav ul {
    flex-wrap: wrap;
  }
  
  nav a {
    padding: 0.75rem 1rem;
  }
}
