/* ===== GLOBAL DESIGN SYSTEM ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ── CSS Custom Properties ── */
:root {
  /* Background */
  --bg-primary: #f7efe3;
  --bg-secondary: #fff9f0;
  --bg-card: rgba(47, 34, 26, 0.04);
  --bg-card-hover: rgba(47, 34, 26, 0.08);
  --bg-glass: rgba(255, 249, 240, 0.82);
  --bg-glass-border: rgba(47, 34, 26, 0.18);

  /* Text */
  --text-primary: #2f221a;
  --text-secondary: #6f5846;
  --text-muted: #8c725e;
  --text-link: #8f3f2a;

  /* Accents */
  --accent-cyan: #d49473;
  --accent-purple: #b65a3c;
  --accent-pink: #8f3f2a;
  --accent-green: #22c55e;
  --accent-orange: #c56a2d;
  --accent-blue: #b65a3c;
  --accent-red: #ef4444;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #d49473, #b65a3c, #8f3f2a);
  --gradient-hero: linear-gradient(135deg, #fdf6ec 0%, #f7efe3 50%, #f0e1cf 100%);
  --gradient-card-1: linear-gradient(135deg, #fff7eb, #f3e6d6);
  --gradient-card-2: linear-gradient(135deg, #f9efdf, #ecd8c4);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(89, 52, 34, 0.16);
  --shadow-md: 0 4px 20px rgba(89, 52, 34, 0.2);
  --shadow-lg: 0 10px 40px rgba(89, 52, 34, 0.24);
  --shadow-glow-cyan: 0 0 20px rgba(212, 148, 115, 0.2);
  --shadow-glow-purple: 0 0 20px rgba(182, 90, 60, 0.2);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-medium: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
}

/* ── Light Mode Overrides ── */
[data-theme="light"] {
  --bg-primary: #fdf6ec;
  --bg-secondary: #fffaf2;
  --bg-card: rgba(47, 34, 26, 0.035);
  --bg-card-hover: rgba(47, 34, 26, 0.07);
  --bg-glass: rgba(255, 250, 242, 0.88);
  --bg-glass-border: rgba(47, 34, 26, 0.16);

  --text-primary: #2f221a;
  --text-secondary: #6b5443;
  --text-muted: #866e5b;
  --text-link: #8f3f2a;

  --shadow-sm: 0 2px 8px rgba(89, 52, 34, 0.12);
  --shadow-md: 0 4px 20px rgba(89, 52, 34, 0.16);
  --shadow-lg: 0 8px 40px rgba(89, 52, 34, 0.2);

  --gradient-hero: linear-gradient(135deg, #fff9f0 0%, #f7efe3 50%, #efdfcc 100%);
  --gradient-card-1: linear-gradient(135deg, #fff8ee, #f6eadb);
  --gradient-card-2: linear-gradient(135deg, #fef4e6, #ecdac7);
}

[data-theme="dark"] {
  --bg-primary: #2a1d16;
  --bg-secondary: #34241c;
  --bg-card: rgba(248, 237, 225, 0.06);
  --bg-card-hover: rgba(248, 237, 225, 0.1);
  --bg-glass: rgba(58, 41, 32, 0.86);
  --bg-glass-border: rgba(248, 237, 225, 0.16);

  --text-primary: #f8ede1;
  --text-secondary: #d9c5b3;
  --text-muted: #b89f8d;
  --text-link: #e0a27f;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.55);

  --gradient-hero: linear-gradient(135deg, #2a1d16 0%, #3a2920 50%, #4a3529 100%);
  --gradient-card-1: linear-gradient(135deg, #3c2a21, #4b362a);
  --gradient-card-2: linear-gradient(135deg, #4a3428, #583e2f);
}

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

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

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

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

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  outline: none;
}

input,
select,
textarea {
  font-family: var(--font-body);
  outline: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

/* ── Utility Classes ── */

/* Glass Card */
.glass {
  background: var(--bg-glass);
  border: 1px solid var(--bg-glass-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
}

/* Gradient Text */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: rgba(182, 90, 60, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(182, 90, 60, 0.5);
}

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

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }

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

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

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

.animate-fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

/* Selection */
::selection {
  background: rgba(182, 90, 60, 0.3);
  color: var(--text-primary);
}

/* ──── Theme Toggle Button ──── */
.theme-toggle-btn {
  background: rgba(47, 34, 26, 0.06);
  border: 1px solid rgba(47, 34, 26, 0.18);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  cursor: pointer;
}

.theme-toggle-btn:hover {
  background: rgba(47, 34, 26, 0.12);
  transform: translateY(-1px);
}

[data-theme="dark"] .theme-toggle-btn {
  background: rgba(248, 237, 225, 0.08);
  border-color: rgba(248, 237, 225, 0.18);
  color: var(--text-secondary);
}

[data-theme="dark"] .theme-toggle-btn:hover {
  background: rgba(248, 237, 225, 0.14);
}