/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-optical-sizing: auto;
    font-variation-settings: 'wght' 400;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-primary);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* Variables CSS */
:root {
    --primary-color: #4C1D95;
    --primary-light: #8B5CF6;
    --primary-dark: #5B21B6;
    --secondary-color: #F8F9FA;
    --accent-color: #10B981;
    --accent-secondary: #F59E0B;
    --accent-tertiary: #EF4444;
    --text-color: #374151;
    --text-light: #6B7280;
    --white: #FFFFFF;
    --black: #111827;
    
    /* Modern Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-warm: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --gradient-cool: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    --gradient-royal: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-sunset: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-blur: blur(20px);
    
    /* Enhanced Shadows */
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.08);
    --shadow-heavy: 0 20px 60px rgba(0, 0, 0, 0.15);
    --shadow-colored: 0 10px 30px rgba(139, 92, 246, 0.3);
    --shadow-inset: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    
    /* Modern Border Radius */
    --border-radius: 16px;
    --border-radius-small: 8px;
    --border-radius-large: 24px;
    --border-radius-xl: 32px;
    
    /* Enhanced Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Background colors */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --bg-tertiary: #E5E7EB;
    --header-bg: rgba(255, 255, 255, 0.8);
    --header-bg-scroll: rgba(255, 255, 255, 0.95);
}

/* Dark theme variables */
[data-theme="dark"] {
    --primary-color: #8B5CF6;
    --primary-light: #A78BFA;
    --primary-dark: #7C3AED;
    --secondary-color: #1F2937;
    --accent-color: #10B981;
    --accent-secondary: #F59E0B;
    --accent-tertiary: #EF4444;
    --text-color: #E5E7EB;
    --text-light: #9CA3AF;
    --white: #111827;
    --black: #F9FAFB;
    
    /* Dark Mode Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #232526 0%, #414345 100%);
    --gradient-accent: linear-gradient(135deg, #134e5e 0%, #71b280 100%);
    --gradient-warm: linear-gradient(135deg, #bc4e9c 0%, #f80759 100%);
    --gradient-cool: linear-gradient(135deg, #0f3460 0%, #0d7377 100%);
    --gradient-royal: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    --gradient-sunset: linear-gradient(135deg, #2c1810 0%, #8b4513 100%);
    
    /* Dark Glassmorphism */
    --glass-bg: rgba(17, 24, 39, 0.4);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(20px);
    
    /* Dark Enhanced Shadows */
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.3);
    --shadow-heavy: 0 20px 60px rgba(0, 0, 0, 0.7);
    --shadow-colored: 0 10px 30px rgba(139, 92, 246, 0.3);
    --shadow-inset: inset 0 2px 4px rgba(255, 255, 255, 0.1);
    
    /* Background colors */
    --bg-primary: #111827;
    --bg-secondary: #1F2937;
    --bg-tertiary: #374151;
    --header-bg: rgba(17, 24, 39, 0.8);
    --header-bg-scroll: rgba(17, 24, 39, 0.95);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem;
}

.header__controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Theme Toggle Button */
.theme-toggle {
    display: flex;
    align-items: center;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 2px solid var(--glass-border);
    border-radius: 30px;
    padding: 6px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    width: 65px;
    height: 38px;
    box-shadow: var(--shadow-light);
}

.theme-toggle:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-colored);
    transform: scale(1.05);
}

.theme-toggle__icon {
    position: absolute;
    font-size: 1rem;
    transition: var(--transition);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle__sun {
    left: 8px;
    color: var(--accent-color);
    opacity: 1;
}

.theme-toggle__moon {
    right: 8px;
    color: var(--primary-light);
    opacity: 0.5;
}

.theme-toggle__slider {
    position: absolute;
    background: var(--gradient-primary);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    transition: var(--transition-slow);
    left: 4px;
    box-shadow: var(--shadow-colored);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .theme-toggle__slider {
    left: 32px;
    background: var(--gradient-cool);
}

[data-theme="dark"] .theme-toggle__sun {
    opacity: 0.5;
}

[data-theme="dark"] .theme-toggle__moon {
    opacity: 1;
}

/* Language Selector */
.language-toggle {
    display: flex;
    align-items: center;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 2px solid var(--glass-border);
    border-radius: 25px;
    padding: 8px 12px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    min-width: 80px;
    height: 38px;
    box-shadow: var(--shadow-light);
}

.language-toggle:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-colored);
    transform: scale(1.05);
}

.language-current {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.9rem;
}

.language-current i {
    font-size: 1rem;
    color: var(--primary-color);
}

.language-code {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1000;
    overflow: hidden;
}

.language-toggle.active .language-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: left;
}

.language-option:hover {
    background: var(--primary-color);
    color: var(--white);
}

.language-option.active {
    background: var(--primary-light);
    color: var(--white);
}

.language-option .flag {
    font-size: 1.1rem;
    min-width: 20px;
}

/* Container */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 6rem 1rem 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
}

/* Profile Section */
.profile {
    text-align: center;
    animation: fadeInUp 0.8s ease;
}

.profile__avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-colored);
    position: relative;
    overflow: hidden;
}

.profile__avatar::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-royal);
    border-radius: 50%;
    z-index: -1;
    animation: rotate 8s linear infinite;
}

.profile__logo {
    width: 80px;
    height: auto;
    filter: brightness(0) invert(1);
}

.profile__name {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--black);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile__bio {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.5;
}


/* Links Section */
.links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.link {
    display: flex;
    align-items: center;
    padding: 1.2rem 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-large);
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    gap: 1rem;
}

.link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: var(--transition-fast);
}

.link:hover::before {
    left: 100%;
}

.link:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-heavy);
    border-color: rgba(255, 255, 255, 0.3);
}

.link__icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--white);
    flex-shrink: 0;
    transition: var(--transition);
}

.link__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.link__title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--black);
    line-height: 1.3;
}

.link__subtitle {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.2;
}

.link__arrow {
    color: var(--text-light);
    font-size: 1rem;
    transition: var(--transition);
}

.link:hover .link__arrow {
    transform: translateX(5px);
    color: var(--primary-color);
}

.link:hover .link__icon {
    transform: scale(1.1) rotate(5deg);
}

/* Link Specific Colors */
.link--whatsapp .link__icon {
    background: linear-gradient(135deg, #25D366, #128C7E);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
}

.link--website .link__icon {
    background: var(--gradient-primary);
    box-shadow: var(--shadow-colored);
}

.link--email .link__icon {
    background: linear-gradient(135deg, #EA4335, #FBBC04);
    box-shadow: 0 8px 25px rgba(234, 67, 53, 0.3);
}

.link--portfolio .link__icon {
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.link--services .link__icon {
    background: var(--gradient-accent);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.3);
}

.link--quote .link__icon {
    background: linear-gradient(135deg, #F59E0B, #FBBF24);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
}


/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.social-link {
    width: 50px;
    height: 50px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.3rem;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
}

.social-link:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--shadow-colored);
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-light);
    font-size: 0.9rem;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.footer p {
    margin-bottom: 0.5rem;
}

.footer__link a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.footer__link a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* Background Elements */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.bg-element {
    position: absolute;
    border-radius: 50%;
    background: var(--gradient-primary);
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.bg-element-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: -50px;
    animation-delay: 0s;
}

.bg-element-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: -75px;
    animation-delay: -2s;
}

.bg-element-3 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 20%;
    animation-delay: -4s;
}

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

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 5rem 1rem 2rem;
        gap: 1.5rem;
    }

    .header__controls {
        gap: 0.5rem;
    }

    .theme-toggle,
    .language-toggle {
        width: 50px;
        height: 32px;
        padding: 4px;
    }

    .theme-toggle__slider {
        width: 24px;
        height: 24px;
    }

    [data-theme="dark"] .theme-toggle__slider {
        left: 22px;
    }

    .language-current {
        font-size: 0.8rem;
        gap: 4px;
    }

    .profile__name {
        font-size: 2rem;
    }


    .link {
        padding: 1rem 1.2rem;
        gap: 0.8rem;
    }

    .link__icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    .link__title {
        font-size: 0.95rem;
    }

    .link__subtitle {
        font-size: 0.8rem;
    }

    .bg-element-1 {
        width: 150px;
        height: 150px;
    }

    .bg-element-2 {
        width: 100px;
        height: 100px;
    }

    .bg-element-3 {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 4rem 0.75rem 1.5rem;
    }

    .profile__avatar {
        width: 100px;
        height: 100px;
    }

    .profile__logo {
        width: 65px;
    }

    .profile__name {
        font-size: 1.8rem;
    }

    .profile__bio {
        font-size: 1rem;
    }


    .link {
        padding: 0.9rem 1rem;
    }

    .link__icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .social-link {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .bg-element,
    .profile__avatar::before {
        animation: none !important;
    }
}

/* Dark theme adjustments for language selector */
[data-theme="dark"] .language-toggle {
    background: rgba(17, 24, 39, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .language-dropdown {
    background: rgba(17, 24, 39, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .language-option:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Dark theme adjustments for profile logo */
[data-theme="dark"] .profile__logo {
    filter: brightness(0) invert(1);
}