/* ==========================================================================
   LEONIE'S ADVENTURE BLOG - CORE DESIGN SYSTEM & STYLES
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800;900&family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  /* Color Palette - Vibrant, Inspiring & Modern */
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: rgba(30, 41, 59, 0.7);
  --bg-card-hover: rgba(39, 53, 77, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(132, 94, 194, 0.4);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-purple: #845ec2;
  --accent-coral: #ff6b6b;
  --accent-orange: #ff9671;
  --accent-teal: #00c9a7;
  --accent-gold: #facc15;
  --accent-blue: #38bdf8;

  /* Gradients */
  --gradient-brand: linear-gradient(135deg, #ff6b6b 0%, #845ec2 50%, #00c9a7 100%);
  --gradient-hero: linear-gradient(135deg, rgba(255,107,107,0.15), rgba(132,94,194,0.15), rgba(0,201,167,0.15));
  --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0) 100%);
  --gradient-gold: linear-gradient(135deg, #f59e0b, #fbbf24);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(132, 94, 194, 0.25);

  /* Typography */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --container-max: 1200px;
}

/* Light Theme Variables */
body.light-theme {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --border-color: rgba(0, 0, 0, 0.08);
  --border-glow: rgba(132, 94, 194, 0.3);
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 30px rgba(132, 94, 194, 0.15);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Background Ambient Glow */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.25;
}

.glow-1 {
  width: 500px;
  height: 500px;
  background: var(--accent-purple);
  top: -100px;
  right: -100px;
}

.glow-2 {
  width: 600px;
  height: 600px;
  background: var(--accent-coral);
  top: 40%;
  left: -200px;
}

.glow-3 {
  width: 450px;
  height: 450px;
  background: var(--accent-teal);
  bottom: -100px;
  right: 15%;
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-main);
}

.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(11, 15, 25, 0.75);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

body.light-theme .site-header {
  background: rgba(248, 250, 252, 0.85);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.35rem;
}

.logo-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo-link:hover .logo-badge {
  transform: scale(1.1) rotate(6deg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-brand);
  border-radius: var(--radius-full);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

.btn-studio {
  background: var(--gradient-brand);
  color: #ffffff;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 4px 15px rgba(132, 94, 194, 0.35);
  transition: all 0.25s ease;
  border: none;
  cursor: pointer;
}

.btn-studio:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 20px rgba(132, 94, 194, 0.5);
}

/* Hero Section */
.hero-section {
  padding: 4rem 0 3rem;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 3rem;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(132, 94, 194, 0.15);
  border: 1px solid rgba(132, 94, 194, 0.3);
  border-radius: var(--radius-full);
  color: var(--accent-purple);
  font-weight: 700;
  font-size: 0.85rem;
  width: fit-content;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  letter-spacing: -0.02em;
}

.hero-bio {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 580px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* Hero Avatar Card */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.avatar-card {
  position: relative;
  width: 100%;
  max-width: 360px;
  border-radius: var(--radius-lg);
  padding: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(15px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transform: rotate(-1.5deg);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.avatar-card:hover {
  transform: rotate(0deg) scale(1.02);
}

.avatar-img-wrap {
  position: relative;
  width: 100%;
  padding-top: 100%;
  border-radius: calc(var(--radius-lg) - 6px);
  overflow: hidden;
}

.avatar-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-badge-tag {
  position: absolute;
  bottom: 1.25rem;
  right: 1.25rem;
  padding: 0.5rem 1rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: var(--shadow-md);
}

/* Belt Progression Widget */
.belt-timeline-section {
  margin: 1rem 0 3rem;
  padding: 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(15px);
}

.belt-timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.belt-timeline-title {
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.belt-step-card {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}

body.light-theme .belt-step-card {
  background: rgba(255, 255, 255, 0.6);
}

.belt-step-card.current {
  border-color: var(--accent-blue);
  background: rgba(56, 189, 248, 0.1);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}

.belt-ribbon {
  width: 12px;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
}

.belt-info {
  margin-left: 0.5rem;
}

.belt-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}

.belt-date {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
}

.belt-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  line-height: 1.4;
}

/* Category Filter Bar */
.filter-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  position: sticky;
  top: 86px;
  z-index: 50;
  padding: 0.75rem 1.25rem;
  background: rgba(11, 15, 25, 0.8);
  backdrop-filter: blur(15px);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

body.light-theme .filter-section {
  background: rgba(248, 250, 252, 0.85);
}

.category-pills {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.filter-pill:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.filter-pill.active {
  color: #ffffff;
  background: var(--gradient-brand);
  box-shadow: 0 4px 12px rgba(132, 94, 194, 0.35);
  transform: scale(1.04);
}

.search-box {
  position: relative;
  min-width: 220px;
}

.search-input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.25rem;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s ease;
}

body.light-theme .search-input {
  background: #ffffff;
}

.search-input:focus {
  border-color: var(--accent-purple);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* Adventure Feed Cards Grid */
.adventure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(15px);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.post-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.post-media-wrap {
  position: relative;
  width: 100%;
  padding-top: 65%;
  overflow: hidden;
  cursor: pointer;
  background: #0f172a;
}

.post-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.post-card:hover .post-img {
  transform: scale(1.06);
}

.photo-count-badge {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  padding: 0.3rem 0.65rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.category-tag {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.category-tag.martial-arts { background: linear-gradient(135deg, #ef4444, #f97316); }
.category-tag.holidays { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.category-tag.hobbies-crafts { background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.category-tag.days-out { background: linear-gradient(135deg, #f59e0b, #10b981); }
.category-tag.exploring { background: linear-gradient(135deg, #10b981, #06b6d4); }
.category-tag.creativity { background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.category-tag.childhood { background: linear-gradient(135deg, #f59e0b, #eab308); }

.post-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.75rem;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.post-meta-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.post-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.35;
}

.post-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.post-tag-item {
  font-size: 0.75rem;
  color: var(--accent-purple);
  background: rgba(132, 94, 194, 0.1);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  font-weight: 600;
}

/* Kudos Reaction Bar */
.kudos-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--border-color);
}

.kudos-buttons {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.kudos-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.3rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.kudos-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.15) rotate(-3deg);
}

.kudos-btn:active {
  transform: scale(0.92);
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(5, 8, 15, 0.95);
  backdrop-filter: blur(25px);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lightbox-main-view {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 4rem;
}

.lightbox-image-wrap {
  max-width: 90vw;
  max-height: 75vh;
  position: relative;
}

.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  object-fit: contain;
}

.lightbox-caption {
  position: absolute;
  bottom: -2.5rem;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lightbox-nav-btn:hover {
  background: var(--gradient-brand);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

/* Site Footer */
.site-footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-hearts {
  font-size: 1.1rem;
}

.footer-sub {
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* Toast Alerts */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  padding: 0.85rem 1.25rem;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  color: #f8fafc;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: slideInRight 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  .hero-content {
    align-items: center;
  }
  .hero-stats {
    justify-content: center;
  }
  .filter-section {
    border-radius: var(--radius-lg);
    flex-direction: column;
    align-items: stretch;
  }
  .category-pills {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .navbar {
    height: 64px;
  }
  .nav-links {
    display: none;
  }
  .adventure-grid {
    grid-template-columns: 1fr;
  }
}
