/* 
 * Lightweight Modern CSS 
 * Optimized for performance and dark/light mode
 */

:root {
  /* Color Palette - HSL for easy adjustments */
  --hue: 220;
  /* Blue-ish base */
  --sat: 80%;

  --c-bg: hsl(var(--hue), 10%, 98%);
  --c-surface: hsl(var(--hue), 10%, 100%);
  --c-text: hsl(var(--hue), 60%, 15%);
  --c-text-muted: hsl(var(--hue), 20%, 40%);
  --c-primary: hsl(var(--hue), var(--sat), 50%);
  --c-primary-hover: hsl(var(--hue), var(--sat), 45%);
  --c-accent: hsl(340, 80%, 60%);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --radius: 0.5rem;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --max-w: 64rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --c-bg: hsl(var(--hue), 10%, 10%);
    --c-surface: hsl(var(--hue), 10%, 15%);
    --c-text: hsl(var(--hue), 10%, 90%);
    --c-text-muted: hsl(var(--hue), 10%, 60%);
    --c-primary: hsl(var(--hue), var(--sat), 60%);
    --c-primary-hover: hsl(var(--hue), var(--sat), 65%);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
}

/* Typography */
h1,
h2,
h3 {
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1.5rem;
  color: var(--c-text-muted);
}

a {
  color: var(--c-primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--c-primary-hover);
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

header {
  padding: 2rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--c-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
}

/* Hero Section */
.hero {
  padding: 2rem 0;
  text-align: center;
  animation: fadeIn 0.8s ease-out;
}

.hero h1 {
  font-size: 3.5rem;
  background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.25rem;
  max-width: 40rem;
  margin: 0 auto 2.5rem;
}

.hero-quote {
  border: none;
  margin: 0 auto 2.5rem;
  padding: 0;
  max-width: 40rem;
}

.hero-quote p {
  font-size: 1.5rem;
  font-style: italic;
  margin-bottom: 0.25rem;
  color: var(--c-text);
  font-weight: 300;
}

.hero-quote cite {
  font-size: 1rem;
  color: var(--c-text-muted);
  font-style: normal;
  display: block;
}

.btn {
  display: inline-block;
  background-color: var(--c-primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: white;
}

/* Features/Centered Section */
.section-centered {
  text-align: center;
  padding: 3rem 0;
  max-width: 40rem;
  margin: 0 auto;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 4rem 0;
}

.card {
  background-color: var(--c-surface);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
  border: 1px solid transparent;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--c-primary);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}

/* About Section */
.section-about {
  padding: 2rem 0 4rem;
}

.section-about h3,
.section-about .about-intro {
  text-align: center;
  max-width: 45rem;
  margin-left: auto;
  margin-right: auto;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.about-card {
  background-color: var(--c-surface);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(128, 128, 128, 0.1);
}

.about-card h4 {
  margin-bottom: 1rem;
  color: var(--c-primary);
  font-size: 1.2rem;
}

.about-card ul {
  padding-left: 1.2rem;
  list-style-type: disc;
}

.about-card li {
  margin-bottom: 0.5rem;
  color: var(--c-text-muted);
}

.about-card.highlight {
  border: 1px solid var(--c-primary);
  background-color: rgba(var(--c-primary), 0.05);
  /* Very subtle tint if supported, else just border */
  position: relative;
  overflow: hidden;
}

/* Fallback for bg transparency calc - actually simple var usage works best without calc for now */

footer {
  padding: 3rem 0;
  text-align: center;
  border-top: 1px solid rgba(128, 128, 128, 0.1);
  margin-top: 4rem;
  font-size: 0.875rem;
  color: var(--c-text-muted);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  nav {
    display: none;
  }

  /* Simplified mobile handling for "max light" */
}

/* Blog Styles */
.blog-content {
  max-width: 45rem;
  /* Optimal reading width */
  margin: 0 auto;
  padding: 2rem 0;
}

.blog-content h1 {
  font-size: 2.5rem;
  margin-top: 2rem;
}

.blog-content h2 {
  font-size: 1.8rem;
  margin-top: 2rem;
}

.blog-content h3 {
  font-size: 1.4rem;
  margin-top: 1.5rem;
}

.blog-content p {
  margin-bottom: 1.2rem;
  line-height: 1.7;
  color: var(--c-text);
}

.blog-content ul,
.blog-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  color: var(--c-text);
}

.blog-content li {
  margin-bottom: 0.5rem;
}

.blog-content blockquote {
  border-left: 4px solid var(--c-primary);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: var(--c-text-muted);
  font-style: italic;
}

.blog-content code {
  background: var(--c-surface);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: monospace;
}

.blog-content pre code {
  display: block;
  padding: 1rem;
  overflow-x: auto;
}

/* Tables */
.blog-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
  margin-top: 1rem;
}

.blog-content th,
.blog-content td {
  border: 1px solid var(--c-text-muted);
  padding: 0.75rem;
  text-align: left;
}

.blog-content th {
  background-color: var(--c-surface);
  font-weight: 600;
}

.post-meta {
  color: var(--c-text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.post-list {
  list-style: none;
  padding: 0;
}

.post-list li {
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(128, 128, 128, 0.1);
  padding-bottom: 2rem;
}

.post-list h2 {
  margin-bottom: 0.5rem;
}

/* Consent Banner */
.consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--c-surface);
  border-top: 1px solid var(--c-primary);
  padding: 1rem;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  animation: slideUp 0.5s ease-out;
}

.consent-banner p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--c-text);
}

.consent-banner a {
  color: var(--c-primary);
  text-decoration: underline;
}

.consent-banner button {
  background-color: var(--c-primary);
  color: white;
  border: none;
  padding: 0.5rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  transition: opacity 0.2s;
}

.consent-banner button:hover {
  opacity: 0.9;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}