/* ═══════════════════════════════════════════════
   FOSS Course App — Pro Max Design System
   Apple-inspired, Glassmorphism, Deep Spacing
   ═══════════════════════════════════════════════ */

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

:root {
  /* Colors - Premium Pro Max */
  --primary:        #0D9488;
  --primary-dark:   #0F766E;
  --primary-light:  #5EEAD4;
  --primary-faint:  #CCFBF1;
  
  --secondary:      #2DD4BF;
  --cta:            #EA580C;
  --cta-hover:      #C2410B;

  /* Surfaces & Glassmorphism - Bright & Aerial */
  --bg-gradient:    linear-gradient(135deg, #F8FAFC 0%, #F0FDF4 50%, #E0F2FE 100%);
  --bg-solid:       #F8FAFC;
  --surface:        rgba(255, 255, 255, 0.75);
  --surface-hover:  rgba(255, 255, 255, 0.95);
  --glass-border:   rgba(255, 255, 255, 0.8);
  --glass-shadow:   0 8px 32px rgba(13, 148, 136, 0.08);
  --overlay:        rgba(15, 23, 42, 0.4);

  /* Text - High Contrast for Readability */
  --text:           #0F172A;
  --text-muted:     #475569;
  --text-light:     #94A3B8;
  --text-inverted:  #FFFFFF;

  /* Status */
  --success:        #10B981;
  --warning:        #F59E0B;
  --danger:         #EF4444;
  --info:           #3B82F6;

  /* Callout backgrounds (soft) */
  --callout-note:   rgba(59,130,246,0.08);
  --callout-tip:    rgba(16,185,129,0.08);
  --callout-warning:rgba(245,158,11,0.10);
  --callout-danger: rgba(239,68,68,0.08);

  /* Typography - Scaled Up for Premium Feel */
  --font-heading:   system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body:      "Inter", system-ui, -apple-system, sans-serif;

  /* Sizing / Spacing - Massive Padding */
  --nav-height:     80px;
  --sidebar-width:  280px;
  --max-width:      1200px;
  --radius-sm:      12px;
  --radius:         20px;
  --radius-lg:      28px;
  --radius-xl:      40px;
  --radius-pill:    999px;

  /* Shadows - Deep Apple Lift */
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.04);
  --shadow:     0 8px 24px rgba(13,148,136,0.06);
  --shadow-lg:  0 20px 48px rgba(13,148,136,0.12), 0 4px 16px rgba(0,0,0,0.04);
  --shadow-xl:  0 32px 64px rgba(13,148,136,0.16), 0 8px 32px rgba(0,0,0,0.06);

  /* Transitions - Fluid Curves */
  --ease:       cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-spring:cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast:     0.2s var(--ease);
  --t:          0.3s var(--ease);
  --t-slow:     0.5s var(--ease-spring);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100vw;
}

img, video { max-width: 100%; display: block; border-radius: var(--radius-sm); }
a { color: var(--primary); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--primary-dark); }

/* ─── Typography (Huge Apple Metrics) ──────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
}
h1 { font-size: clamp(2.5rem, 6vw, 4rem); margin-bottom: 24px; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 20px; }
h3 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin-bottom: 16px; }
h4 { font-size: 1.2rem; margin-bottom: 12px; }
p  { margin-bottom: 0; font-size: 1.125rem; letter-spacing: -0.01em; } /* Default large body */

/* ─── Layout Utilities ──────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 32px;
}

@media (max-width: 768px) {
  .container { padding-inline: 20px; }
}

.flex  { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.gap-4 { gap: 32px; }
.gap-6 { gap: 48px; }
.gap-8 { gap: 64px; }

.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 32px; }
.w-full  { width: 100%; }
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-sm     { font-size: 0.95rem; }
.text-xs     { font-size: 0.85rem; }
.font-medium { font-weight: 500; }
.font-semi   { font-weight: 600; }
.font-bold   { font-weight: 700; }

/* ─── Glassmorphism Premium Surface ─────────── */
.glass {
  background: var(--surface);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes slideUpCard {
  from { opacity: 0; transform: translateY(100px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bounceIn {
  0%   { transform: scale(0.6); opacity: 0; }
  50%  { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

.animate-fade-up  { animation: fadeInUp var(--t-slow) var(--ease-spring) both; }
.animate-fade     { animation: fadeIn var(--t-slow) var(--ease) both; }
.animate-slide-left { animation: slideInLeft var(--t-slow) var(--ease-spring) both; }

/* Orchestrated entrance */
.stagger > * { animation: fadeInUp 0.6s var(--ease-spring) both; }
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.15s; }
.stagger > *:nth-child(3) { animation-delay: 0.25s; }
.stagger > *:nth-child(4) { animation-delay: 0.35s; }
.stagger > *:nth-child(5) { animation-delay: 0.45s; }
.stagger > *:nth-child(6) { animation-delay: 0.55s; }

/* ─── Skeleton Loader ───────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #E2E8F0 25%, #F1F5F9 50%, #E2E8F0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.8s infinite linear;
  border-radius: var(--radius-sm);
}
.skeleton-text  { height: 1.2em; width: 80%; border-radius: 8px; }
.skeleton-title { height: 1.8em; width: 60%; border-radius: 12px; }
.skeleton-card  { height: 220px; border-radius: var(--radius); }

/* ─── Scrollbar ─────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(13,148,136,0.3); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--primary); }
::selection { background: var(--primary-light); color: var(--primary-dark); }
:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 4px; border-radius: 6px; }

/* ─── Responsive breakpoints ────────────────── */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
}
@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}
