/**
 * Ember — Academic Burnout Recovery Engine
 * Core Stylesheet & Design Tokens
 * Built for GDC RIT Dubai x +TWE DesignAthon 2026
 * Created by Yassin Ragab · Freshman, Computer Engineering @ University of Sharjah (UoS)
 */

@import url('https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,400;0,500;1,400&family=Outfit:wght@400;500;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 {
  --bg-base: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-surface-raised: #F1F5F9;
  --bg-surface-subtle: #F8FAFC;
  --bg-input: #FFFFFF;
  --border-subtle: #E2E8F0;
  --border-strong: #CBD5E1;
  --border-focus: #F59E0B;
  
  --text-main: #0F172A;
  --text-body: #334155;
  --text-muted: #64748B;
  --text-subtle: #94A3B8;

  --primary: #D97706;
  --primary-hover: #B45309;
  --primary-light: #FEF3C7;
  --primary-glow: rgba(217, 119, 6, 0.2);

  --accent-ember: #EA580C;
  --accent-ember-light: #FFEDD5;
  --accent-ember-glow: rgba(234, 88, 12, 0.25);

  --accent-indigo: #4F46E5;
  --accent-indigo-light: #EEF2FF;

  --accent-emerald: #10B981;
  --accent-emerald-bg: #ECFDF5;
  --accent-emerald-border: #A7F3D0;

  --accent-amber: #F59E0B;
  --accent-amber-bg: #FFFBEB;
  --accent-amber-border: #FDE68A;

  --accent-rose: #EF4444;
  --accent-rose-bg: #FEF2F2;
  --accent-rose-border: #FECACA;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 0 25px rgba(234, 88, 12, 0.22);

  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'DM Mono', monospace;

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 350ms cubic-bezier(0.16, 1, 0.3, 1);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --card-hairline: 1px solid var(--border-subtle);
  --card-inner-highlight: inset 0 1px 0 0 rgba(255, 255, 255, 0.9);
  --card-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 10px 25px -5px rgba(15, 23, 42, 0.04);
}

[data-theme="dark"] {
  --bg-base: #090D16;
  --bg-surface: #0F172A;
  --bg-surface-raised: #1E293B;
  --bg-surface-subtle: #141E33;
  --bg-input: #1E293B;
  --border-subtle: #1E293B;
  --border-strong: #334155;
  --border-focus: #F59E0B;

  --text-main: #F8FAFC;
  --text-body: #CBD5E1;
  --text-muted: #94A3B8;
  --text-subtle: #64748B;

  --primary: #F59E0B;
  --primary-hover: #D97706;
  --primary-light: rgba(245, 158, 11, 0.15);
  --primary-glow: rgba(245, 158, 11, 0.3);

  --accent-ember: #FB923C;
  --accent-ember-light: rgba(251, 146, 60, 0.15);
  --accent-ember-glow: rgba(251, 146, 60, 0.3);

  --accent-indigo: #818CF8;
  --accent-indigo-light: rgba(129, 140, 248, 0.15);

  --accent-emerald: #34D399;
  --accent-emerald-bg: rgba(52, 211, 153, 0.12);
  --accent-emerald-border: rgba(52, 211, 153, 0.25);

  --accent-amber: #FBBF24;
  --accent-amber-bg: rgba(251, 191, 36, 0.12);
  --accent-amber-border: rgba(251, 191, 36, 0.25);

  --accent-rose: #F87171;
  --accent-rose-bg: rgba(248, 113, 113, 0.12);
  --accent-rose-border: rgba(248, 113, 113, 0.25);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 20px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 20px 30px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 35px rgba(245, 158, 11, 0.3);

  --card-hairline: 1px solid rgba(255, 255, 255, 0.08);
  --card-inner-highlight: inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 12px 30px -4px rgba(0, 0, 0, 0.5);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-main);
  line-height: 1.6;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  font-variant-numeric: tabular-nums lining-nums;
}

body {
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-base);
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

h1, h2, h3, h4, h5, h6,
.page-title,
.hero-title,
.brand-logo,
.section-title,
.stat-value,
.card-title,
.metric-number {
  font-family: var(--font-display);
}

:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 3px;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  box-sizing: border-box;
}

.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.swiss-panel {
  background-color: var(--bg-surface);
  border: var(--card-hairline);
  box-shadow: var(--card-shadow), var(--card-inner-highlight);
  border-radius: var(--radius-md);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

[data-theme="dark"] .site-header {
  background-color: rgba(15, 23, 42, 0.88);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.logo-symbol {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #EA580C 0%, #D97706 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 4px 12px var(--accent-ember-glow);
}

.brand-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  background-color: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(217, 119, 6, 0.25);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-body);
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.nav-link:hover {
  color: var(--primary);
  background-color: var(--bg-surface-raised);
}

.nav-link.active {
  color: var(--primary);
  background-color: var(--primary-light);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-body);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  background-color: var(--bg-surface-raised);
  color: var(--text-main);
  border-color: var(--border-strong);
}

.hamburger-btn {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 82%;
  max-width: 340px;
  height: 100vh;
  background-color: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -10px 0 30px rgba(0,0,0,0.15);
}

.mobile-nav-drawer.active {
  right: 0;
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.mobile-nav-links a {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--text-main);
  transition: background var(--transition-fast);
}

.mobile-nav-links a.active {
  background-color: var(--primary-light);
  color: var(--primary);
}

.mobile-nav-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.25rem;
}

.page-hero {
  padding: 4.5rem 0 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background-color: var(--primary-light);
  border: 1px solid rgba(217, 119, 6, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.hero-pill-badge a {
  text-decoration: underline;
  font-weight: 700;
}

.page-title {
  font-size: clamp(2.25rem, 5vw, 3.65rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.page-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 400;
  color: var(--text-body);
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.65;
  margin-bottom: 2rem;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background-color: var(--bg-surface-raised);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.8125rem;
}

.site-footer {
  margin-top: 5rem;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 2.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
  max-width: 380px;
}

.footer-col h4 {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-links a {
  color: var(--text-body);
  font-size: 0.9375rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary);
}

.creator-card {
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.creator-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.creator-avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent-ember) 0%, var(--primary) 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
}

.creator-info h5 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.creator-info p {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.creator-portfolio-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--primary);
}

.creator-portfolio-link:hover {
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8125rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.15rem;
  font-size: 0.875rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 3px solid var(--primary);
}

@keyframes slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

#ember-preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background-color: var(--bg-base);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.preloader-flame-wrapper {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preloader-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--accent-ember);
  animation: flame-pulse 1.8s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

.preloader-emblem {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #EA580C 0%, #D97706 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 0 20px var(--accent-ember-glow);
}

.preloader-status {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@keyframes flame-pulse {
  0% { transform: scale(0.85); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}
