@use 'themes/index' as t;
@use 'variables';
@use 'mixins';
@use 'globals';

// Layout components (topbar, footer, etc.)
@use 'layout';

// All sections imported through index
@use 'sections';

// Component styles
@use 'components/back-to-top';

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

// CSS Reset - Add this
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

// Standard Theme (Light) + design system tokens
:root {
  @include t.theme-vars(t.$light-theme);

  // Spacing scale (multiples of 4px)
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  // Typography scale
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;

  // Line heights
  --leading-tight: 1.2;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 1.75;

  // Letter spacing
  --tracking-tight: -0.025em;
  --tracking-normal: 0em;
  --tracking-wide: 0.05em;
  --tracking-wider: 0.1em;

  // Border radius
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  // Shadows (light) – brand-tinted
  --shadow-xs: 0 1px 2px rgba(4, 44, 83, 0.05);
  --shadow-sm: 0 2px 8px rgba(4, 44, 83, 0.08);
  --shadow-md: 0 4px 16px rgba(4, 44, 83, 0.08);
  --shadow-hover: 0 8px 24px rgba(4, 44, 83, 0.12);

  // Transitions
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

  // Brand accent & text-on-dark
  --color-accent-text: #412402;
  --color-accent-deco: #ef9f27;
  --color-text-on-dark: #e6f1fb;
  --font-headline: 'Comfortaa', sans-serif;
  --font-body: 'Quicksand', sans-serif;
  --contact-button-bg: #042c53;
  --contact-button-text: #e6f1fb;
  --contact-button-hover-bg: #0c447c;

  // Landing section backgrounds (light) – flat brand
  --bg-reasons: #ffffff;
  --bg-winnings: #f1efe8;
  --bg-experience: #ffffff;
  --bg-processes: #f1efe8;
  --bg-references: #ffffff;

  // Reused section backgrounds (light)
  --about-background: #ffffff;
  --projects-background: #ffffff;
  --contact-background: #f1efe8;

  // Tech section backgrounds (light)
  --hero-background: #f1efe8;
  --services-background: #f1efe8;
  --skills-background: #ffffff;
  --certifications-background: #f1efe8;

  // Card tokens (light)
  --card-glass-bg: #ffffff;
  --card-glass-border: rgba(4, 44, 83, 0.12);

  // Functional shadows
  --shadow-glow:
    0 0 0 1px rgba(4, 44, 83, 0.1), 0 8px 24px rgba(4, 44, 83, 0.08);
  --shadow-glow-hover:
    0 0 0 1px rgba(4, 44, 83, 0.2), 0 16px 48px rgba(4, 44, 83, 0.15);
}

// Dark theme + shadow overrides
[data-theme='dark'] {
  @include t.theme-vars(t.$dark-theme);

  // Core colors
  --color-primary: #e6f1fb;
  --color-secondary: #b5d4f4;
  --color-accent-text: #fac775;
  --color-accent-deco: #ef9f27;
  --color-background: #021829;
  --color-surface: #042c53;
  --color-text: #e6f1fb;
  --color-text-muted: #b5d4f4;
  --color-text-on-dark: #e6f1fb;
  --color-border: rgba(230, 241, 251, 0.12);
  --color-focus-ring: #ef9f27;

  // Section backgrounds
  --hero-background: #021829;
  --about-background: #042c53;
  --services-background: #021829;
  --skills-background: #042c53;
  --certifications-background: #021829;
  --projects-background: #042c53;
  --contact-background: #021829;
  --bg-reasons: #042c53;
  --bg-winnings: #021829;
  --bg-experience: #042c53;
  --bg-processes: #021829;
  --bg-references: #042c53;

  // Cards + shadows
  --card-glass-bg: rgba(12, 68, 124, 0.5);
  --card-glass-border: rgba(230, 241, 251, 0.1);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-glow:
    0 0 0 1px rgba(239, 159, 39, 0.15), 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-glow-hover:
    0 0 0 1px rgba(239, 159, 39, 0.3), 0 16px 48px rgba(0, 0, 0, 0.4);

  // Buttons
  --contact-button-bg: #ef9f27;
  --contact-button-text: #042c53;
  --contact-button-hover-bg: #fac775;

  // Form inputs
  --contact-input-bg: #042c53;
  --contact-input-border: rgba(230, 241, 251, 0.2);
  --contact-input-focus-ring: rgba(239, 159, 39, 0.3);

  // Stat cards
  --stat-primary-bg: rgba(12, 68, 124, 0.4);
  --stat-primary-value: #e6f1fb;
  --stat-primary-label: #b5d4f4;
  --stat-secondary-bg: rgba(12, 68, 124, 0.4);
  --stat-secondary-value: #e6f1fb;
  --stat-secondary-label: #b5d4f4;
  --stat-tertiary-bg: rgba(12, 68, 124, 0.4);
  --stat-tertiary-value: #e6f1fb;
  --stat-tertiary-label: #b5d4f4;
  --stat-quaternary-bg: rgba(12, 68, 124, 0.4);
  --stat-quaternary-value: #e6f1fb;
  --stat-quaternary-label: #b5d4f4;

  // Service cards
  --service-card-primary-bg: rgba(12, 68, 124, 0.5);
  --service-card-secondary-bg: rgba(4, 44, 83, 0.8);
  --service-card-tertiary-bg: rgba(12, 68, 124, 0.5);
  --service-card-quaternary-bg: rgba(4, 44, 83, 0.8);
  --service-card-quinary-bg: rgba(12, 68, 124, 0.5);
  --service-card-senary-bg: rgba(4, 44, 83, 0.8);
  --service-icon-primary: #ef9f27;
  --service-icon-secondary: #ef9f27;
  --service-icon-tertiary: #ef9f27;
  --service-icon-quaternary: #ef9f27;
  --service-icon-quinary: #ef9f27;
  --service-icon-senary: #ef9f27;
  --service-title-primary: #e6f1fb;
  --service-title-secondary: #e6f1fb;
  --service-title-tertiary: #e6f1fb;
  --service-title-quaternary: #e6f1fb;
  --service-title-quinary: #e6f1fb;
  --service-title-senary: #e6f1fb;
  --service-description-primary: #b5d4f4;
  --service-description-secondary: #b5d4f4;
  --service-description-tertiary: #b5d4f4;
  --service-description-quaternary: #b5d4f4;
  --service-description-quinary: #b5d4f4;
  --service-description-senary: #b5d4f4;

  // Skills
  --skills-category-bg: rgba(12, 68, 124, 0.4);
  --skills-category-border: rgba(230, 241, 251, 0.1);
  --skills-skill-name-color: #e6f1fb;
  --skills-skill-level-color: #b5d4f4;
  --skills-skill-percentage-color: #b5d4f4;
  --skills-progress-bg: rgba(230, 241, 251, 0.1);
  --skills-category-bg-primary: rgba(12, 68, 124, 0.5);
  --skills-category-bg-secondary: rgba(12, 68, 124, 0.5);
  --skills-category-bg-tertiary: rgba(12, 68, 124, 0.5);
  --skills-category-bg-quaternary: rgba(12, 68, 124, 0.5);
  --skills-category-bg-quinary: rgba(12, 68, 124, 0.5);
  --skills-category-bg-senary: rgba(12, 68, 124, 0.5);
  --skills-progress-primary: #ef9f27;
  --skills-progress-secondary: #ef9f27;
  --skills-progress-tertiary: #ef9f27;
  --skills-progress-quaternary: #ef9f27;
  --skills-progress-quinary: #ef9f27;
  --skills-progress-senary: #ef9f27;

  // Certifications
  --certifications-card-background: #042c53;
  --certifications-badge-background: rgba(239, 159, 39, 0.15);
  --certifications-badge-border: rgba(239, 159, 39, 0.3);
  --color-certifications-badge-text: #fac775;

  // Projects
  --projects-card-background: #042c53;
  --projects-card-border: rgba(239, 159, 39, 0.15);
  --projects-button-primary-bg: #ef9f27;
  --projects-button-primary-text: #042c53;
  --projects-button-primary-border: rgba(239, 159, 39, 0.3);
  --projects-button-primary-hover-bg: #fac775;
  --projects-button-secondary-bg: #0c447c;
  --projects-button-secondary-text: #e6f1fb;
  --projects-button-secondary-border: rgba(230, 241, 251, 0.15);
  --projects-button-secondary-hover-bg: #185fa5;
  --projects-tech-badge-bg: rgba(12, 68, 124, 0.6);
  --projects-tech-badge-text: #e6f1fb;
  --projects-tech-badge-border: rgba(239, 159, 39, 0.2);

  // Contact
  --contact-social-bg: #042c53;
  --contact-social-text: #e6f1fb;
  --contact-social-border: rgba(239, 159, 39, 0.3);
  --contact-social-hover-bg: #0c447c;
  --contact-social-hover-border: #ef9f27;
  --contact-status-success-bg: rgba(4, 44, 83, 0.5);
  --contact-status-success-border: #ef9f27;
  --contact-status-success-text: #fac775;

  // Page backgrounds
  --bg-primary: #021829;
  --bg-secondary: #042c53;
  --border-color: rgba(230, 241, 251, 0.12);

  // Skill badges
  --skill-badge-primary-bg: rgba(12, 68, 124, 0.5);
  --skill-badge-primary-text: #e6f1fb;
  --skill-badge-secondary-bg: rgba(12, 68, 124, 0.5);
  --skill-badge-secondary-text: #e6f1fb;
  --skill-badge-tertiary-bg: rgba(12, 68, 124, 0.5);
  --skill-badge-tertiary-text: #e6f1fb;
  --skill-badge-quaternary-bg: rgba(65, 36, 2, 0.4);
  --skill-badge-quaternary-text: #fac775;

  // Feature cards
  --feature-card-primary-bg: rgba(12, 68, 124, 0.4);
  --feature-card-secondary-bg: rgba(4, 44, 83, 0.6);
  --feature-card-tertiary-bg: rgba(12, 68, 124, 0.4);
  --feature-icon-primary: #ef9f27;
  --feature-icon-secondary: #ef9f27;
  --feature-icon-tertiary: #ef9f27;
  --feature-title-primary: #e6f1fb;
  --feature-title-secondary: #e6f1fb;
  --feature-title-tertiary: #e6f1fb;
  --feature-description-primary: #b5d4f4;
  --feature-description-secondary: #b5d4f4;
  --feature-description-tertiary: #b5d4f4;

  // Remove gradients
  --gradient-primary: #ef9f27;
}

// Dark mode: override hardcoded SASS-compiled colors on section headings
[data-theme='dark'] {
  h1,
  h2,
  h3,
  h4 {
    color: #e6f1fb;
  }

  .about-section__greeting {
    color: #e6f1fb;
  }

  .skills-section__category-title {
    color: #e6f1fb;
  }

  // Border-left accent colors
  .reasons-section__item,
  .references-section__item,
  .experience-section__paragraph--outro,
  .reasons-section__outro {
    border-left-color: #ef9f27;
  }

  .winnings-section__item,
  .processes-section__item {
    border-left-color: #b5d4f4;
  }

  // Stat numbers in reasons section
  .reasons-section__stat {
    color: #ef9f27;
  }

  // Navbar deepens in dark mode
  .navbar {
    background: #021829;
    border-bottom: 1px solid rgba(230, 241, 251, 0.08);
  }
}

body {
  font-family: 'Quicksand', sans-serif;
  font-weight: 400;
  font-size: 1rem;
  background-color: var(--color-background);
  color: var(--color-text);
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4 {
  font-family: 'Comfortaa', sans-serif;
  font-weight: 600;
  color: var(--color-primary);
}

section {
  padding: 3rem 1rem;
  margin: 0; // Remove any section margins
}

// App-level styles for routing
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;

  &__main {
    flex: 1;
  }
}
