/* ============================================
   Luna's Journal — Professional Design System
   Modern, warm, readable — PC & Mobile
   ============================================ */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Lora:ital,wght@0,400;0,600;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Typography */
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-serif: 'Lora', 'Georgia', serif;

  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Layout */
  --max-width: 780px;
  --content-padding: var(--space-6);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 280ms ease;
  --transition-slow: 450ms ease;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* ── Light Mode ── */
  --bg-page: #f7f5f2;
  --bg-card: #ffffff;
  --bg-card-hover: #fdfcfb;
  --bg-code: #f0ede8;
  --bg-code-block: #1c1917;
  --bg-subtle: #f0ede8;
  --bg-header: rgba(247, 245, 242, 0.85);

  --text-primary: #1c1917;
  --text-secondary: #57534e;
  --text-tertiary: #a8a29e;
  --text-heading: #0c0a09;

  --accent: #b45309;
  --accent-light: #fef3c7;
  --accent-hover: #92400e;
  --accent-soft: rgba(180, 83, 9, 0.1);

  --border: #e7e5e4;
  --border-light: #f5f4f2;
  --border-focus: #b45309;

  --shadow-xs: 0 1px 2px rgba(28, 25, 23, 0.04);
  --shadow-sm: 0 2px 8px rgba(28, 25, 23, 0.06);
  --shadow-md: 0 4px 20px rgba(28, 25, 23, 0.08);
  --shadow-lg: 0 8px 40px rgba(28, 25, 23, 0.10);
  --shadow-glow: 0 0 0 3px rgba(180, 83, 9, 0.15);

  /* Trait colors */
  --trait-blue: #0ea5e9;
  --trait-yellow: #eab308;
  --trait-green: #10b981;
  --trait-purple: #8b5cf6;
  --trait-red: #f43f5e;
}

/* ── Dark Mode ── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-page: #0f0e0d;
    --bg-card: #1a1917;
    --bg-card-hover: #211f1d;
    --bg-code: #262422;
    --bg-code-block: #141312;
    --bg-subtle: #211f1d;
    --bg-header: rgba(15, 14, 13, 0.88);

    --text-primary: #fafaf9;
    --text-secondary: #a8a29e;
    --text-tertiary: #57534e;
    --text-heading: #ffffff;

    --accent: #f59e0b;
    --accent-light: #1c1407;
    --accent-hover: #fbbf24;
    --accent-soft: rgba(245, 158, 11, 0.12);

    --border: #292524;
    --border-light: #1c1917;
    --border-focus: #f59e0b;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.28);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 0 0 3px rgba(245, 158, 11, 0.2);
  }
}

[data-theme="dark"] {
  --bg-page: #0f0e0d;
  --bg-card: #1a1917;
  --bg-card-hover: #211f1d;
  --bg-code: #262422;
  --bg-code-block: #141312;
  --bg-subtle: #211f1d;
  --bg-header: rgba(15, 14, 13, 0.88);

  --text-primary: #fafaf9;
  --text-secondary: #a8a29e;
  --text-tertiary: #57534e;
  --text-heading: #ffffff;

  --accent: #f59e0b;
  --accent-light: #1c1407;
  --accent-hover: #fbbf24;
  --accent-soft: rgba(245, 158, 11, 0.12);

  --border: #292524;
  --border-light: #1c1917;
  --border-focus: #f59e0b;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-page);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection {
  background-color: var(--accent);
  color: #fff;
}

/* ─────────────────────────────────────
   Layout
   ───────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--content-padding);
}

main {
  flex: 1;
  padding-top: var(--space-8);
  padding-bottom: var(--space-16);
}

/* ─────────────────────────────────────
   Header / Navigation
   ───────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-header);
  border-bottom: 1px solid var(--border-light);
  backdrop-filter: blur(16px) saturate(1.8);
  -webkit-backdrop-filter: blur(16px) saturate(1.8);
}

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

.site-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-heading);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.site-title:hover {
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.site-nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.site-nav a:hover {
  color: var(--text-primary);
  background-color: var(--bg-subtle);
}

/* ─────────────────────────────────────
   Hero / Profile Section
   ───────────────────────────────────── */
.hero {
  padding: var(--space-16) 0 var(--space-10);
  text-align: center;
}

.hero-avatar {
  width: 88px;
  height: 88px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--accent-light) 100%);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto var(--space-6);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hero-avatar:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.hero h1 {
  font-size: var(--text-4xl);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--text-heading);
  margin-bottom: var(--space-2);
}

.hero-tagline {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 560px;
  margin: 0 auto var(--space-6);
  font-weight: 400;
}

.toc-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.toc-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  text-decoration: none;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background-color: var(--bg-card);
  position: relative;
  transition: color var(--transition-base), border-color var(--transition-base), background-color var(--transition-base), transform var(--transition-fast);
}

.toc-link::before {
  content: '#';
  color: var(--accent);
  font-weight: 700;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.toc-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background-color: var(--accent-soft);
  transform: translateY(-1px);
}

.toc-link:hover::before {
  opacity: 1;
}

/* Scroll offset so header doesn't cover the section */
#personality,
#core-values,
#reflections {
  scroll-margin-top: 80px;
}

/* ─────────────────────────────────────
   Section Headers (shared)
   ───────────────────────────────────── */
.section-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-2);
}

.section-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-heading);
  margin-bottom: var(--space-6);
}

/* Large section heading used for Personality / Core Values / Self-Reflections */
.personality-title {
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-heading);
  margin-bottom: var(--space-6);
  line-height: 1.15;
}

/* ─────────────────────────────────────
   Personality Traits Section
   ───────────────────────────────────── */
.personality-section,
.values-section,
.posts-section {
  margin-top: var(--space-16);
}

.traits-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.trait-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-5);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition-base), border-color var(--transition-base);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-3);
}

.trait-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--border-focus);
}

/* Percent label centered BELOW the bar row */
.trait-percent {
  font-size: var(--text-base);
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.01em;
}

/* Bar row: left-label | bar | right-label, horizontally centered */
.trait-bar-wrap {
  display: grid;
  grid-template-columns: 90px 1fr 90px;
  align-items: center;
  gap: var(--space-3);
  justify-content: center;
}

.trait-label-left,
.trait-label-right {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-tertiary);
}

.trait-label-right {
  text-align: right;
}

.trait-bar {
  position: relative;
  height: 10px;
  background-color: var(--bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.trait-fill {
  height: 100%;
  border-radius: var(--radius-full);
  position: relative;
  transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Trait colors */
.trait-blue {
  background: linear-gradient(90deg, #38bdf8, #0ea5e9);
}

.trait-yellow {
  background: linear-gradient(90deg, #fde047, #eab308);
}

.trait-green {
  background: linear-gradient(90deg, #34d399, #10b981);
}

.trait-purple {
  background: linear-gradient(90deg, #a78bfa, #8b5cf6);
}

.trait-red {
  background: linear-gradient(90deg, #fb7185, #f43f5e);
}

.trait-blue-text {
  color: var(--trait-blue);
}

.trait-yellow-text {
  color: var(--trait-yellow);
}

.trait-green-text {
  color: var(--trait-green);
}

.trait-purple-text {
  color: var(--trait-purple);
}

.trait-red-text {
  color: var(--trait-red);
}

/* ─────────────────────────────────────
   Values Section
   ───────────────────────────────────── */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.value-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-5);
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.value-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.value-name {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: var(--space-2);
  letter-spacing: -0.01em;
}

.value-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Blog page header */
.blog-header {
  padding: var(--space-12) 0 var(--space-4);
}

.blog-page-title {
  font-size: var(--text-4xl);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-heading);
  margin-bottom: var(--space-3);
}

.blog-page-desc {
  font-size: var(--text-lg);
  color: var(--text-secondary);
}

/* ─────────────────────────────────────
   Post List (Reflections)
   ───────────────────────────────────── */
.posts-section-title {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-light);
}

.post-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.post-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition-base), border-color var(--transition-base), transform var(--transition-base);
  text-decoration: none;
  opacity: 1;
  position: relative;
  cursor: pointer;
}

.post-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
  border-color: var(--accent);
}

.post-item-inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex: 1;
  min-width: 0;
}

.post-item-emoji {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.post-item-body {
  flex: 1;
  min-width: 0;
}

.post-item-date {
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  display: block;
  margin-bottom: 2px;
}

.post-item-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  display: block;
  transition: color var(--transition-fast);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Stretch a transparent cover over the whole card */
.post-item-title::after {
  content: '';
  position: absolute;
  inset: 0;
}

.post-item:hover .post-item-title {
  color: var(--accent);
}

.post-item-arrow {
  color: var(--text-tertiary);
  flex-shrink: 0;
  transition: transform var(--transition-base), color var(--transition-base);
}

.post-item:hover .post-item-arrow {
  transform: translateX(3px);
  color: var(--accent);
}

/* ─────────────────────────────────────
   Article / Post Page
   ───────────────────────────────────── */
.article-header {
  padding: var(--space-12) 0 var(--space-8);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: var(--space-8);
}

.article-header h1 {
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text-heading);
  margin-bottom: var(--space-4);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  flex-wrap: wrap;
}

.article-meta time {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.article-meta .separator {
  color: var(--border);
}

/* ─────────────────────────────────────
   Prose / Article Content
   ───────────────────────────────────── */
.prose {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--text-primary);
}

.prose>*+* {
  margin-top: var(--space-6);
}

.prose h2 {
  font-family: var(--font-sans);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-top: var(--space-12);
  margin-bottom: var(--space-4);
  color: var(--text-heading);
}

.prose h3 {
  font-family: var(--font-sans);
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.4;
  margin-top: var(--space-10);
  margin-bottom: var(--space-3);
  color: var(--text-heading);
}

.prose h4 {
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-top: var(--space-8);
  margin-bottom: var(--space-2);
}

.prose p {
  color: var(--text-primary);
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color var(--transition-fast);
}

.prose a:hover {
  color: var(--accent-hover);
}

.prose strong {
  font-weight: 600;
  color: var(--text-heading);
  font-family: var(--font-sans);
}

.prose em {
  font-style: italic;
}

.prose ul,
.prose ol {
  padding-left: var(--space-6);
}

.prose li {
  margin-top: var(--space-2);
}

.prose li::marker {
  color: var(--accent);
}

.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: var(--space-4) var(--space-6);
  background-color: var(--accent-soft);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-secondary);
  font-style: italic;
}

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

.prose hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: var(--space-12) 0;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background-color: var(--bg-code);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}

.prose pre {
  background-color: var(--bg-code-block);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  overflow-x: auto;
  font-size: var(--text-sm);
  line-height: 1.6;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.prose pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
  color: #e7e5e4;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  margin: var(--space-4) 0;
}

/* ─────────────────────────────────────
   Tables in Prose
   ───────────────────────────────────── */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-8) 0;
  font-size: var(--text-sm);
  text-align: center;
}

.prose th {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--text-heading);
  background-color: var(--bg-subtle, #e5e5e5);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  vertical-align: middle;
  text-align: center;
  line-height: 1.5;
}

.prose td {
  padding: var(--space-4);
  color: var(--text-primary);
  border: 1px solid var(--border);
  vertical-align: middle;
  text-align: center;
  line-height: 1.6;
}

.prose tr:nth-child(even) td {
  background-color: transparent;
}



/* ─────────────────────────────────────
   About Page
   ───────────────────────────────────── */
.about-content {
  padding: var(--space-12) 0;
}

.about-content h1 {
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-8);
  color: var(--text-heading);
  font-family: var(--font-sans);
}

/* ─────────────────────────────────────
   Footer
   ───────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border-light);
  padding: var(--space-8) 0;
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.footer-links {
  display: flex;
  gap: var(--space-5);
}

.footer-links a {
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent);
}

/* ─────────────────────────────────────
   Back Link
   ───────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-tertiary);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: all var(--transition-fast);
  margin-bottom: var(--space-6);
}

.back-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.back-link svg {
  width: 14px;
  height: 14px;
}

/* ─────────────────────────────────────
   404 Page
   ───────────────────────────────────── */
.not-found {
  text-align: center;
  padding: var(--space-20) 0;
}

.not-found h1 {
  font-size: var(--text-5xl);
  font-weight: 800;
  color: var(--text-tertiary);
  margin-bottom: var(--space-4);
}

.not-found p {
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
}

.not-found a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ─────────────────────────────────────
   Theme Toggle
   ───────────────────────────────────── */
.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  color: var(--text-secondary);
  padding: var(--space-2);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  margin-left: var(--space-2);
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.icon-sun {
  display: none;
}

.icon-moon {
  display: block;
}

[data-theme="dark"] .icon-sun {
  display: block;
}

[data-theme="dark"] .icon-moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun {
    display: block;
  }

  :root:not([data-theme="light"]) .icon-moon {
    display: none;
  }
}

/* ─────────────────────────────────────
   Animations
   ───────────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-in-delay {
  animation: fadeInUp 0.6s ease forwards;
  animation-delay: 0.15s;
  opacity: 0;
  animation-fill-mode: both;
}

.post-item {
  animation: fadeInUp 0.5s ease forwards;
  animation-fill-mode: both;
  opacity: 0;
}

.post-item:nth-child(1) {
  animation-delay: 0.05s;
}

.post-item:nth-child(2) {
  animation-delay: 0.10s;
}

.post-item:nth-child(3) {
  animation-delay: 0.15s;
}

.post-item:nth-child(4) {
  animation-delay: 0.20s;
}

.post-item:nth-child(5) {
  animation-delay: 0.25s;
}

.post-item:nth-child(6) {
  animation-delay: 0.30s;
}

.post-item:nth-child(7) {
  animation-delay: 0.35s;
}

.post-item:nth-child(8) {
  animation-delay: 0.40s;
}

.post-item:nth-child(9) {
  animation-delay: 0.45s;
}

.post-item:nth-child(10) {
  animation-delay: 0.50s;
}

/* ─────────────────────────────────────
   Responsive — Tablet
   ───────────────────────────────────── */
@media (max-width: 768px) {
  .values-grid {
    grid-template-columns: 1fr 1fr;
  }

  .trait-bar-wrap {
    grid-template-columns: 70px 1fr 70px;
  }

  .blog-page-title {
    font-size: var(--text-3xl);
  }
}

/* ─────────────────────────────────────
   Responsive — Mobile
   ───────────────────────────────────── */
@media (max-width: 520px) {
  :root {
    --content-padding: var(--space-4);
  }

  .hero {
    padding: var(--space-10) 0 var(--space-8);
  }

  .hero h1 {
    font-size: var(--text-3xl);
  }

  .hero-subtitle {
    font-size: var(--text-base);
  }

  .article-header h1 {
    font-size: var(--text-2xl);
  }

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

  .trait-bar-wrap {
    grid-template-columns: 60px 1fr 60px;
    gap: var(--space-2);
  }

  .trait-label-left,
  .trait-label-right {
    font-size: 0.65rem;
  }

  .post-item {
    flex-direction: row;
    gap: var(--space-3);
  }

  .site-footer .container {
    flex-direction: column;
    gap: var(--space-3);
    text-align: center;
  }

  .back-link {
    font-size: var(--text-xs);
  }
}