/* 
  Base styles - Reset, typography, utilities
*/

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
    overflow-x: hidden;
    width: 100%;
}

@media (min-width: 1024px) {
    html {
        scroll-snap-type: y proximity;
    }
}

body {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color var(--transition-slow), color var(--transition-slow);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
}

body.menu-open {
    overflow: hidden;
}

/* Floating gradient orbs - background decoration */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
}

body::before {
    width: 500px;
    height: 500px;
    background: var(--orb-1);
    top: -10%;
    right: -5%;
    animation: float-orb-1 20s ease-in-out infinite;
}

body::after {
    width: 400px;
    height: 400px;
    background: var(--orb-2);
    bottom: 10%;
    left: -10%;
    animation: float-orb-2 25s ease-in-out infinite;
}

/* Third orb via main element */
main::before {
    content: '';
    position: fixed;
    width: 350px;
    height: 350px;
    background: var(--orb-3);
    border-radius: 50%;
    filter: blur(100px);
    top: 50%;
    right: 20%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.5;
    animation: float-orb-3 30s ease-in-out infinite;
}

@keyframes float-orb-1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(-30px, 50px) scale(1.05);
    }

    66% {
        transform: translate(20px, -30px) scale(0.95);
    }
}

@keyframes float-orb-2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(40px, -40px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 30px) scale(0.9);
    }
}

@keyframes float-orb-3 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-50px, -50px) scale(1.15);
    }
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
}

h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
}

h4 {
    font-size: 1.125rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

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

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

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

ul,
ol {
    list-style: none;
}

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Section spacing */
section {
    padding: var(--space-4xl) 0;
    scroll-margin-top: 5rem;
}

@media (min-width: 1024px) {
    section {
        scroll-snap-align: start;
    }
}

/* Section title */
.section-title {
    text-align: center;
    margin-bottom: var(--space-3xl);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-accent);
    border-radius: var(--radius-full);
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-accent {
    color: var(--accent);
}

.text-muted {
    color: var(--text-muted);
}

.text-gradient {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.gap-lg {
    gap: var(--space-lg);
}

.gap-xl {
    gap: var(--space-xl);
}

/* AOS handles animations now */

/* Selection */
::selection {
    background-color: var(--accent);
    color: white;
}

/* Scrollbar - subtle custom styling */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-sm) var(--space-md);
    background: var(--accent);
    color: white;
    border-radius: var(--radius-md);
    z-index: 1000;
}

.skip-link:focus {
    top: var(--space-md);
}
