/* ============================================
   alumi.space — Main Stylesheet
   Lightweight, responsive, SEO-optimized
   ============================================ */

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

:root {
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-text-secondary: #555;
  --color-text-muted: #888;
  --color-primary: #6C3CE1;
  --color-primary-dark: #5429b5;
  --color-primary-light: #ede5fb;
  --color-accent: #10b981;
  --color-accent-light: #d1fae5;
  --color-border: #e5e5e5;
  --color-border-light: #f0f0f0;
  --color-warning: #f59e0b;
  --color-warning-light: #fef3c7;
  --color-danger: #ef4444;
  --color-code-bg: #f5f5f5;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-width: 1200px;
  --max-width-content: 800px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --transition: 0.2s ease;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 { line-height: 1.3; font-weight: 700; color: var(--color-text); }
h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; margin-top: 2.5rem; }
h3 { font-size: 1.35rem; margin-top: 2rem; }
h4 { font-size: 1.1rem; margin-top: 1.5rem; }
p { margin-top: 1rem; }
ul, ol { margin-top: 1rem; padding-left: 1.5rem; }
li { margin-top: 0.4rem; }
hr { border: none; border-top: 1px solid var(--color-border); margin: 3rem 0; }

code {
  font-family: var(--font-mono);
  background: var(--color-code-bg);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

blockquote {
  border-left: 3px solid var(--color-primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--color-primary-light);
  border-radius: 0 var(--radius) var(--radius) 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
th {
  background: var(--color-code-bg);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
tr:hover td { background: var(--color-bg); }

/* --- Layout --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.container--narrow { max-width: var(--max-width-content); margin: 0 auto; padding: 0 1.5rem; }

/* --- Header / Nav --- */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.site-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.02em;
}
.site-logo span { color: var(--color-primary); }

.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav a {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition);
}
.site-nav a:hover, .site-nav a.active { color: var(--color-primary); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  margin: 5px 0;
  transition: var(--transition);
}

/* --- Hero --- */
.hero {
  padding: 5rem 0 4rem;
  text-align: center;
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-bg) 100%);
}
.hero h1 {
  font-size: 2.75rem;
  max-width: 700px;
  margin: 0 auto;
  letter-spacing: -0.03em;
}
.hero p {
  font-size: 1.2rem;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 1rem auto 0;
}
.hero-cta {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
}
.btn--primary {
  background: var(--color-primary);
  color: #fff;
}
.btn--primary:hover { background: var(--color-primary-dark); color: #fff; }
.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.btn--outline:hover { background: var(--color-primary); color: #fff; }
.btn--small { padding: 0.5rem 1rem; font-size: 0.85rem; }

/* --- Section --- */
.section { padding: 4rem 0; }
.section--alt { background: var(--color-surface); }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: 2rem; }
.section-header p { color: var(--color-text-secondary); margin-top: 0.5rem; font-size: 1.1rem; }

/* --- Category Grid --- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.category-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all var(--transition);
  text-decoration: none;
  color: inherit;
  display: block;
}
.category-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: inherit;
}
.category-card__icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}
.category-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.category-card__count {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.category-card__desc {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-top: 0.5rem;
  line-height: 1.5;
}

/* --- Tool Card --- */
.tool-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: border-color var(--transition);
}
.tool-card:hover { border-color: var(--color-primary); }
.tool-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}
.tool-card__name {
  font-size: 1.35rem;
  font-weight: 700;
}
.tool-card__name a { color: var(--color-text); }
.tool-card__name a:hover { color: var(--color-primary); }
.tool-card__url {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.tool-card__oneliner {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  margin-top: 0.5rem;
  font-style: italic;
}
.tool-card__meta {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.tool-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  padding: 0.3rem 0.7rem;
  border-radius: 100px;
  font-weight: 500;
}
.tool-card__badge--best-for {
  background: var(--color-accent-light);
  color: #065f46;
}
.tool-card__badge--pricing {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}

.tool-card__section { margin-top: 1.25rem; }
.tool-card__section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}
.tool-card__section ul { padding-left: 1.25rem; margin-top: 0; }
.tool-card__section li {
  font-size: 0.92rem;
  margin-top: 0.3rem;
  line-height: 1.5;
}
.tool-card__limitations { border-left: 3px solid var(--color-warning); padding-left: 1rem; }
.tool-card__verified {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-top: 1rem;
  font-style: italic;
}

/* --- Learn Path --- */
.learn-path {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}
.learn-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
}
.learn-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  color: inherit;
}
.learn-card__step {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.learn-card__title { font-size: 1.15rem; font-weight: 700; margin-top: 0.5rem; }
.learn-card__desc { font-size: 0.9rem; color: var(--color-text-secondary); margin-top: 0.5rem; flex: 1; }

/* --- Blog List --- */
.blog-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.blog-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  color: inherit;
}
.blog-card__type {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
}
.blog-card__title { font-size: 1.15rem; font-weight: 700; margin-top: 0.4rem; color: var(--color-text); }
.blog-card__excerpt { font-size: 0.9rem; color: var(--color-text-secondary); margin-top: 0.5rem; flex: 1; }
.blog-card__meta { font-size: 0.8rem; color: var(--color-text-muted); margin-top: 1rem; }

/* --- Article --- */
.article-header { padding: 3rem 0 2rem; text-align: center; }
.article-header__type {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
}
.article-header h1 { font-size: 2.25rem; margin-top: 0.5rem; max-width: 700px; margin-left: auto; margin-right: auto; }
.article-header__meta { color: var(--color-text-muted); font-size: 0.9rem; margin-top: 0.75rem; }
.article-body { padding-bottom: 3rem; }
.article-body h2 { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border-light); }
.article-body h2:first-child { border-top: none; padding-top: 0; }
.article-body p { font-size: 1.05rem; }
.article-body ul, .article-body ol { font-size: 1.05rem; }

/* --- Page Header --- */
.page-header {
  padding: 3rem 0 2rem;
  text-align: center;
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-bg) 100%);
}
.page-header h1 { font-size: 2.25rem; }
.page-header p { color: var(--color-text-secondary); font-size: 1.1rem; max-width: 600px; margin: 0.75rem auto 0; }

/* --- Breadcrumb --- */
.breadcrumb {
  padding: 1rem 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb span { margin: 0 0.4rem; }

/* --- CTA Banner --- */
.cta-banner {
  background: var(--color-primary);
  color: #fff;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  text-align: center;
  margin: 3rem 0;
}
.cta-banner h3 { font-size: 1.5rem; color: #fff; }
.cta-banner p { color: rgba(255,255,255,0.85); margin-top: 0.5rem; }
.cta-banner .btn {
  margin-top: 1.25rem;
  background: #fff;
  color: var(--color-primary);
}
.cta-banner .btn:hover { background: var(--color-primary-light); }

/* --- Related Section --- */
.related-section { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--color-border); }
.related-section h3 { font-size: 1.25rem; margin-bottom: 1rem; }

/* --- Glossary --- */
.glossary-toc {
  column-count: 3;
  column-gap: 2rem;
  margin: 1.5rem 0 2rem;
}
.glossary-toc a {
  display: block;
  padding: 0.25rem 0;
  font-size: 0.92rem;
  color: var(--color-text-secondary);
}
.glossary-toc a:hover { color: var(--color-primary); }
.glossary-entry { margin-bottom: 2.5rem; scroll-margin-top: 80px; }
.glossary-entry h3 { font-size: 1.2rem; color: var(--color-primary-dark); margin-top: 0; }
.glossary-entry p { font-size: 0.95rem; margin-top: 0.5rem; }
.glossary-entry__related { font-size: 0.85rem; color: var(--color-text-muted); margin-top: 0.5rem; }

/* --- Footer --- */
.site-footer {
  background: var(--color-text);
  color: #ccc;
  padding: 3rem 0 2rem;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 0.75rem; }
.footer-col a { color: #aaa; display: block; padding: 0.2rem 0; font-size: 0.88rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 1.5rem;
  text-align: center;
  color: #777;
  font-size: 0.82rem;
}

/* --- Comparison Table --- */
.comparison-table { overflow-x: auto; margin: 1.5rem 0; }
.comparison-table table { min-width: 600px; }
.comparison-table th:first-child { min-width: 140px; }

/* --- Tag / Label --- */
.tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--color-code-bg);
  color: var(--color-text-secondary);
}
.tag--primary { background: var(--color-primary-light); color: var(--color-primary-dark); }

/* --- Responsive --- */
@media (max-width: 768px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.4rem; }
  .hero { padding: 3rem 0 2.5rem; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  .category-grid { grid-template-columns: 1fr; }
  .blog-list { grid-template-columns: 1fr; }
  .learn-path { grid-template-columns: 1fr; }
  .glossary-toc { column-count: 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .tool-card__header { flex-direction: column; }

  .site-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--color-surface); flex-direction: column; padding: 1rem 1.5rem; gap: 0; border-bottom: 1px solid var(--color-border); box-shadow: var(--shadow-md); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.75rem 0; border-bottom: 1px solid var(--color-border-light); width: 100%; }
  .nav-toggle { display: block; }

  .page-header { padding: 2rem 0 1.5rem; }
  .article-header h1 { font-size: 1.75rem; }
  .section { padding: 2.5rem 0; }
}

@media (max-width: 480px) {
  .glossary-toc { column-count: 1; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: center; }
  table { font-size: 0.85rem; }
  th, td { padding: 0.5rem 0.6rem; }
}

/* --- Print --- */
@media print {
  .site-header, .site-footer, .cta-banner, .nav-toggle { display: none; }
  body { font-size: 12pt; }
  a { color: #000; text-decoration: underline; }
}

/* --- Ads placeholder --- */
.ad-slot {
  background: var(--color-code-bg);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin: 2rem 0;
}
