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

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Backgrounds */
  --bg-base:    #07070f;
  --bg-surface: #0e0e1c;
  --bg-card:    rgba(255, 255, 255, 0.042);
  --bg-card-hover: rgba(255, 255, 255, 0.075);
  --bg-overlay: rgba(4, 4, 12, 0.82);
  --bg-glass:   rgba(14, 14, 28, 0.90);
  /* Text */
  --text-primary:   #f8fafc;
  --text-secondary: #a9b5d2;
  --text-muted:     #7380a0;
  --text-accent:    #a5b4fc;

  /* Borders */
  --border-subtle:  rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.11);
  --border-strong:  rgba(255, 255, 255, 0.20);

  /* ── Skill Area Colors ── */
  --grammar-color: #818cf8;
  --grammar-light: #c7d2fe;
  --grammar-glow:  rgba(129, 140, 248, 0.28);
  --grammar-bg:    rgba(129, 140, 248, 0.08);

  --listening-color: #2dd4bf;
  --listening-light: #99f6e4;
  --listening-glow:  rgba(45, 212, 191, 0.28);
  --listening-bg:    rgba(45, 212, 191, 0.08);

  --speaking-color: #fbbf24;
  --speaking-light: #fde68a;
  --speaking-glow:  rgba(251, 191, 36, 0.28);
  --speaking-bg:    rgba(251, 191, 36, 0.08);

  --writing-color: #fb7185;
  --writing-light: #fecdd3;
  --writing-glow:  rgba(251, 113, 133, 0.28);
  --writing-bg:    rgba(251, 113, 133, 0.08);

  --reading-color: #38bdf8;
  --reading-light: #bae6fd;
  --reading-glow:  rgba(56, 189, 248, 0.28);
  --reading-bg:    rgba(56, 189, 248, 0.08);

  --pronunciation-color: #c084fc;
  --pronunciation-light: #e9d5ff;
  --pronunciation-glow:  rgba(192, 132, 252, 0.28);
  --pronunciation-bg:    rgba(192, 132, 252, 0.08);

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

  /* Border Radius */
  --r-sm:   0.375rem;
  --r-md:   0.625rem;
  --r-lg:   1rem;
  --r-xl:   1.25rem;
  --r-2xl:  1.75rem;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.4);
  --shadow-md: 0 8px 30px rgba(0,0,0,0.5);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.65);
  --shadow-xl: 0 40px 100px rgba(0,0,0,0.75);

  /* Transitions */
  --t-fast:   120ms ease;
  --t-base:   220ms ease;
  --t-slow:   380ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout */
  --navbar-h:    72px;
  --sidebar-w:   270px;
  --content-max: 1300px;

  /* Primary Accent (Sapphire Blue) */
  --accent:       #3b82f6;
  --accent-light: #60a5fa;
}

/* ============================================================
   LIGHT THEME TOKENS
   ============================================================ */
[data-theme="light"] {
  /* Backgrounds */
  --bg-base:    #f4f4f5; /* zinc-100 */
  --bg-surface: #ffffff; /* white */
  --bg-card:    rgba(0, 0, 0, 0.035);
  --bg-card-hover: rgba(0, 0, 0, 0.06);
  --bg-overlay: rgba(244, 244, 245, 0.85);
  --bg-glass:   rgba(255, 255, 255, 0.90);

  /* Text */
  --text-primary:   #18181b; /* zinc-900 */
  --text-secondary: #52525b; /* zinc-600 */
  --text-muted:     #71717a; /* zinc-500 */
  --text-accent:    #2563eb; /* blue-600 */

  /* Borders */
  --border-subtle:  rgba(0, 0, 0, 0.06);
  --border-default: rgba(0, 0, 0, 0.11);
  --border-strong:  rgba(0, 0, 0, 0.20);

  /* Accent overrides */
  --accent:       #2563eb;
  --accent-light: #3b82f6;

  /* Skill color overrides for readable contrast in light mode */
  --grammar-light: #4338ca;
  --grammar-glow:  rgba(129, 140, 248, 0.15);
  --grammar-bg:    rgba(129, 140, 248, 0.10);

  --listening-light: #0f766e;
  --listening-glow:  rgba(45, 212, 191, 0.15);
  --listening-bg:    rgba(45, 212, 191, 0.10);

  --speaking-light: #b45309;
  --speaking-glow:  rgba(251, 191, 36, 0.15);
  --speaking-bg:    rgba(251, 191, 36, 0.10);

  --writing-light: #be123c;
  --writing-glow:  rgba(251, 113, 133, 0.15);
  --writing-bg:    rgba(251, 113, 133, 0.10);

  --reading-light: #0369a1;
  --reading-glow:  rgba(56, 189, 248, 0.15);
  --reading-bg:    rgba(56, 189, 248, 0.10);

  --pronunciation-light: #7e22ce;
  --pronunciation-glow:  rgba(192, 132, 252, 0.15);
  --pronunciation-bg:    rgba(192, 132, 252, 0.10);

  /* Shadows – lighter for daytime mode */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.10);
  --shadow-xl: 0 24px 80px rgba(0,0,0,0.12);
}

[data-theme="light"] .bg-orb-1 {
  background: radial-gradient(circle, rgba(129,140,248,0.12) 0%, transparent 65%);
}
[data-theme="light"] .bg-orb-2 {
  background: radial-gradient(circle, rgba(192,132,252,0.1) 0%, transparent 65%);
}
[data-theme="light"] .bg-orb-3 {
  background: radial-gradient(circle, rgba(45,212,191,0.08) 0%, transparent 65%);
}


/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; }
ul, ol { list-style: none; }

/* ============================================================
   ANIMATED MESH BACKGROUND
   ============================================================ */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.7;
}

.bg-orb-1 {
  width: 900px; height: 900px;
  background: radial-gradient(circle, rgba(129,140,248,0.22) 0%, transparent 65%);
  top: -300px; left: -250px;
  animation: floatOrb1 20s ease-in-out infinite alternate;
}

.bg-orb-2 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(192,132,252,0.18) 0%, transparent 65%);
  bottom: -150px; right: -150px;
  animation: floatOrb2 25s ease-in-out infinite alternate;
}

.bg-orb-3 {
  width: 550px; height: 550px;
  background: radial-gradient(circle, rgba(45,212,191,0.13) 0%, transparent 65%);
  top: 40%; left: 35%;
  animation: floatOrb3 18s ease-in-out infinite alternate;
}

@keyframes floatOrb1 {
  0%   { transform: translate(0,0) scale(1); }
  100% { transform: translate(180px, 120px) scale(1.2); }
}
@keyframes floatOrb2 {
  0%   { transform: translate(0,0) scale(1); }
  100% { transform: translate(-140px, -100px) scale(1.15); }
}
@keyframes floatOrb3 {
  0%   { transform: translate(0,0) scale(1); }
  100% { transform: translate(100px, -80px) scale(0.85); }
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--sp-8);
  position: relative;
  z-index: 1;
}

.relative { position: relative; }
.z-1 { z-index: 1; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.items-end    { align-items: flex-end; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }

.gap-1 { gap: var(--sp-1); }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-5 { gap: var(--sp-5); }
.gap-6 { gap: var(--sp-6); }
.gap-8 { gap: var(--sp-8); }

.grid { display: grid; }

.w-full  { width: 100%; }
.h-full  { height: 100%; }
.min-h-screen { min-height: 100vh; }

.hidden { display: none !important; }
.block  { display: block; }
.inline-flex { display: inline-flex; }

.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

/* ============================================================
   TYPOGRAPHY SCALE
   ============================================================ */
.text-xs   { font-size: 0.75rem;  line-height: 1.4; }
.text-sm   { font-size: 0.875rem; line-height: 1.5; }
.text-base { font-size: 1rem;     line-height: 1.6; }
.text-lg   { font-size: 1.125rem; line-height: 1.55; }
.text-xl   { font-size: 1.25rem;  line-height: 1.5; }
.text-2xl  { font-size: 1.5rem;   line-height: 1.4; }
.text-3xl  { font-size: 1.875rem; line-height: 1.3; }
.text-4xl  { font-size: 2.25rem;  line-height: 1.2; }
.text-5xl  { font-size: 3rem;     line-height: 1.15; }
.text-6xl  { font-size: 3.75rem;  line-height: 1.1; }
.text-7xl  { font-size: 4.5rem;   line-height: 1.05; }

.font-light     { font-weight: 300; }
.font-normal    { font-weight: 400; }
.font-medium    { font-weight: 500; }
.font-semibold  { font-weight: 600; }
.font-bold      { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-black     { font-weight: 900; }

.text-primary-c   { color: var(--text-primary); }
.text-secondary-c { color: var(--text-secondary); }
.text-muted-c     { color: var(--text-muted); }
.text-accent-c    { color: var(--text-accent); }

.tracking-tight  { letter-spacing: -0.025em; }
.tracking-normal { letter-spacing: 0; }
.tracking-wide   { letter-spacing: 0.05em; }
.tracking-wider  { letter-spacing: 0.1em; }

/* ============================================================
   MARGIN / PADDING UTILITIES
   ============================================================ */
.mt-1 { margin-top: var(--sp-1); }
.mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }
.mb-1 { margin-bottom: var(--sp-1); }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-3 { margin-bottom: var(--sp-3); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }
.mb-8 { margin-bottom: var(--sp-8); }
.mx-auto { margin-left: auto; margin-right: auto; }
.p-4  { padding: var(--sp-4); }
.p-6  { padding: var(--sp-6); }
.p-8  { padding: var(--sp-8); }
.px-4 { padding-left: var(--sp-4); padding-right: var(--sp-4); }
.px-6 { padding-left: var(--sp-6); padding-right: var(--sp-6); }
.py-2 { padding-top: var(--sp-2); padding-bottom: var(--sp-2); }
.py-3 { padding-top: var(--sp-3); padding-bottom: var(--sp-3); }
.py-4 { padding-top: var(--sp-4); padding-bottom: var(--sp-4); }

/* ============================================================
   CUSTOM SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--r-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================================
   SELECTION
   ============================================================ */
::selection {
  background: rgba(129, 140, 248, 0.35);
  color: var(--text-primary);
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 1024px) {
  .container { padding: 0 var(--sp-6); }
}
@media (max-width: 768px) {
  .container { padding: 0 var(--sp-4); }
  .hide-mobile { display: none !important; }
}
@media (max-width: 480px) {
  .container { padding: 0 var(--sp-3); }
}
