:root {
    --black-color: #000000;
    --white-color: #ffffff;
    --violet-color:  #55569E;
    --violet-light-color: #c2c3f3;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;

    --main-font: 'Open Sans', sans-serif;
    --secondary-font: 'Neue Machina', sans-serif;
    
    --border-radius: 12px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    font-family: var(--main-font);
}

html {
    scroll-behavior: smooth;
}

body.dark-mode {
    background: linear-gradient(135deg, #1e1e2e 0%, #2d1b69 50%, #1e1e2e 100%);
    color: var(--white-color);
    min-height: 100vh;
}

body.light-mode {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #f8f9fa 100%);
    color: var(--black-color);
    min-height: 100vh;
}

a {
    text-decoration: none;
}

body.dark-mode a {
    color: var(--white-color);
}
body.light-mode a {
    color: var(--black-color);
} 

a:hover {
    text-decoration: underline;
}

body {
    margin: 1rem;
    padding: 1rem;
    border-radius: 1rem;
}

body.dark-mode {
    border: 1px solid var(--white-color);
}

body.light-mode {
    border: 1px solid var(--black-color);
}


body.dark-mode::before {
    content: '';
    background-repeat: no-repeat;
    background-size: contain;
    width: 140vw;
    height: 100vh;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: -1;

    animation: gradient 10s ease infinite alternate;
    background: linear-gradient(-45deg, rgba(8,6,37,1) 0%, rgba(43,43,92,1) 35%, rgba(3,10,11,1) 100%);
    background-size: 400% 400%;

}


body.light-mode::before {
    content: '';
    background-repeat: no-repeat;
    background-size: contain;
    width: 140vw;
    height: 100vh;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: -1;

    animation: gradient 10s ease infinite alternate;
    background:linear-gradient(-45deg, rgb(209, 207, 228) 0%, rgb(78, 78, 109) 35%, rgb(146, 174, 179) 100%);
    background-size: 400% 400%;

}

.body::after {
    content: '';
    top: auto;
    left: auto;
    bottom: 0;
    right: 0;
    transform: rotate(180deg);
}


@media only screen and (min-width: 768px) {
    body {
        max-width: 1024px;
        margin: 1rem auto;
    }
}

/* Loading animations */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--violet-color);
    animation: spin 1s ease-in-out infinite;
}

.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Focus states for accessibility */
button:focus,
a:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--violet-color);
    outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--violet-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 6px;
}

/* Utility classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Error notification styles */
.error-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--error-color);
    color: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    z-index: 1000;
    max-width: 400px;
    animation: slideIn 0.3s ease-out;
}

.error-notification button {
    background: white;
    color: var(--error-color);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    margin-top: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.error-notification button:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* Scroll animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation for child elements */
.animate-on-scroll.animate-in .skill-item {
    animation: slideInUp 0.6s ease forwards;
}

.animate-on-scroll.animate-in .skill-item:nth-child(1) { animation-delay: 0.1s; }
.animate-on-scroll.animate-in .skill-item:nth-child(2) { animation-delay: 0.2s; }
.animate-on-scroll.animate-in .skill-item:nth-child(3) { animation-delay: 0.3s; }
.animate-on-scroll.animate-in .skill-item:nth-child(4) { animation-delay: 0.4s; }
.animate-on-scroll.animate-in .skill-item:nth-child(5) { animation-delay: 0.5s; }
.animate-on-scroll.animate-in .skill-item:nth-child(6) { animation-delay: 0.6s; }

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

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--violet-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-hover);
    transition: var(--transition);
}

.back-to-top:hover {
    background: var(--violet-light-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(85, 86, 158, 0.4);
}

.back-to-top:focus {
    outline: 2px solid var(--violet-color);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}

/* Print styles */
@media print {
    .change-theme,
    .back-to-top,
    .skip-link,
    .social-icons,
    .error-notification {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .acordeon .content {
        max-height: none !important;
        opacity: 1 !important;
        display: block !important;
    }
    
    .acordeon .trigger::after {
        display: none !important;
    }
    
    .skill-progress-bar {
        background: #333 !important;
    }
    
    a {
        color: black !important;
        text-decoration: underline !important;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .animate-on-scroll {
        opacity: 1 !important;
        transform: none !important;
    }
}

@keyframes gradient {
    0% {
      background-position: 0% 50%;
    }
    50% {
      background-position: 100% 50%;
    }
    100% { 
      background-position: 0% 50%;
    }
}