:root {
    --primary-color: #2196f3;
    --primary-dark: #1565C0;
    --background-color: #ffffff;
    --text-color: #333333;
    --card-background: #f8f9fa;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --primary-color: #64b5f6;
    --primary-dark: #1976D2;
    --background-color: #121212;
    --text-color: #ffffff;
    --card-background: #1e1e1e;
    --shadow-color: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Theme Switch */
.theme-toggle-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--card-background);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-color);
    box-shadow: 0 2px 10px var(--shadow-color);
    transition: all 0.3s ease;
}

.theme-toggle-btn i {
    transition: transform 0.5s ease;
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
}

[data-theme="dark"] .theme-toggle-btn i {
    transform: rotate(360deg);
}

/* Header and Profile */
.header {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: center;
    position: relative;
    z-index: 2;
    background: transparent;
    overflow: hidden;
    padding: 60px 20px 20px 20px;
}

.profile-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.profile-image-container {
    width: 100%;
    max-width: 300px;
    aspect-ratio: 1;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-image {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.name {
    font-size: 2.5rem;
    margin: 10px 0;
    color: var(--text-color);
}

.title {
    font-size: 1.2rem;
    color: var(--text-color);
    opacity: 0.9;
}

@media (max-width: 768px) {
    .header {
        padding-top: 80px;
    }
    
    .profile-image-container {
        max-width: 150px;
    }

    .name {
        font-size: 2rem;
    }

    .title {
        font-size: 1rem;
        padding: 0 20px;
    }
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .profile-image {
        width: 150px;
        height: 150px;
    }
}

.bubbles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.bubble {
    position: absolute;
    background: linear-gradient(
        135deg,
        rgba(33, 150, 243, 0.1) 0%,
        rgba(33, 150, 243, 0.05) 50%,
        rgba(33, 150, 243, 0.1) 100%
    );
    backdrop-filter: blur(2px);
    border: 1px solid rgba(33, 150, 243, 0.2);
    border-radius: 50%;
    pointer-events: none;
    animation: float-bubble 8s infinite;
    will-change: transform, opacity;
}

[data-theme="dark"] .bubble {
    background: linear-gradient(
        135deg,
        rgba(100, 181, 246, 0.1) 0%,
        rgba(100, 181, 246, 0.05) 50%,
        rgba(100, 181, 246, 0.1) 100%
    );
    border: 1px solid rgba(100, 181, 246, 0.2);
}

@keyframes float-bubble {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0;
    }
    50% {
        opacity: 0.6;
        transform: translate(var(--tx), var(--ty)) scale(1.2);
    }
    100% {
        transform: translate(calc(var(--tx) * 2), calc(var(--ty) * 2)) scale(1);
        opacity: 0;
    }
}

.profile-container {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards;
}

.profile-image-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
}

.profile-image {
    width: 200px;
    height: 200px;
    overflow: hidden;
    border: 4px solid var(--primary-color);
    position: relative;
    transition: all 0.4s ease-out;
    animation: morphing 10s infinite;
}

.profile-image:hover {
    transform: scale(1.05);
    animation-play-state: paused;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease-out;
}

.profile-image:hover img {
    transform: scale(1.1);
}

@keyframes morphing {
    0% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    25% {
        border-radius: 40% 60% 70% 30% / 30% 60% 40% 70%;
    }
    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
    75% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
}

.name {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.title {
    font-size: 1.2em;
    color: var(--text-color);
    opacity: 0.9;
}

/* Wave Animation */
.wave-container {
    position: relative;
    height: 150px;
    overflow: hidden;
    margin-top: -50px;
    z-index: 1;
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%232196f3' fill-opacity='0.3' d='M0,192L48,197.3C96,203,192,213,288,229.3C384,245,480,267,576,250.7C672,235,768,181,864,181.3C960,181,1056,235,1152,234.7C1248,235,1344,181,1392,154.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
    background-size: 1440px 100px;
    animation: wave-animation 15s linear infinite;
}

.wave2 {
    bottom: 10px;
    opacity: 0.5;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%232196f3' fill-opacity='0.3' d='M0,320L48,288C96,256,192,192,288,181.3C384,171,480,213,576,234.7C672,256,768,256,864,234.7C960,213,1056,171,1152,160C1248,149,1344,171,1392,181.3L1440,192L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
    animation: wave-animation 10s linear infinite;
}

.wave3 {
    bottom: 15px;
    opacity: 0.2;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%232196f3' fill-opacity='0.3' d='M0,224L48,213.3C96,203,192,181,288,154.7C384,128,480,96,576,122.7C672,149,768,235,864,256C960,277,1056,235,1152,197.3C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
    animation: wave-animation 20s linear infinite;
}

@keyframes wave-animation {
    0% {
        background-position-x: 0;
    }
    100% {
        background-position-x: 1440px;
    }
}

[data-theme="dark"] .wave {
    filter: brightness(0.4) hue-rotate(45deg);
}

/* Sections */
section {
    padding: 80px 20px;
    opacity: 0;
    transform: translateY(30px);
}

section.visible {
    animation: fadeInUp 1s ease forwards;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    color: var(--primary-color);
    font-size: 2em;
}

/* Skills */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.skill-card {
    background: var(--card-background);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.skill-card:hover {
    transform: translateY(-10px);
}

.skill-card i {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.skill-level {
    height: 10px;
    background: var(--background-color);
    border-radius: 5px;
    margin-top: 15px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--primary-color);
    width: 0;
    transition: width 1.5s ease;
}

/* Kotlin Logo */
.kotlin-logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
}

.kotlin-icon {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 2;
    transition: all 0.3s ease;
}

.skill-card:hover .kotlin-icon {
    stroke-width: 3;
    transform: scale(1.1);
}

.skill-card:hover .kotlin-icon path {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: drawPath 1.5s forwards;
}

@keyframes drawPath {
    to {
        stroke-dashoffset: 0;
    }
}

/* Contact */
.contact-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.contact-card {
    background: var(--card-background);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px var(--shadow-color);
    position: relative;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.contact-card:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.contact-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px var(--shadow-color);
}

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    padding: 2rem;
}

.contact-info i {
    font-size: 1.8rem;
    color: #fff;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    background-origin: border-box;
    background-clip: content-box, border-box;
}

.contact-info .fa-envelope {
    background-image: linear-gradient(135deg, #D93025, #EA4335);
    box-shadow: 0 4px 15px rgba(217, 48, 37, 0.2);
}

.contact-info .fa-linkedin {
    background-image: linear-gradient(135deg, #0077b5, #00a0dc);
    box-shadow: 0 4px 15px rgba(0, 119, 181, 0.2);
}

.contact-info .fa-phone {
    background-image: linear-gradient(135deg, #00C853, #69F0AE);
    box-shadow: 0 4px 15px rgba(0, 200, 83, 0.2);
}

.contact-info .fa-instagram {
    background-image: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    box-shadow: 0 4px 15px rgba(225, 48, 108, 0.2);
}

.contact-card:hover .contact-info i {
    transform: scale(1.1) rotate(5deg);
}

.contact-info h3 {
    font-size: 1.3rem;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.contact-info p {
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    max-width: 220px;
    line-height: 1.5;
}

.contact-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--background-color);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 16px;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    width: auto;
    min-width: 160px;
    justify-content: center;
    margin: 0 auto;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px var(--shadow-color);
    position: relative;
    overflow: hidden;
}

.contact-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.contact-button span,
.contact-button i {
    position: relative;
    z-index: 2;
    transition: all 0.4s ease;
}

.contact-button:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.25);
}

.contact-button:hover::before {
    opacity: 1;
}

.contact-button:hover span,
.contact-button:hover i {
    color: white;
}

.contact-button i {
    font-size: 1.1rem;
}

.contact-button:hover i {
    transform: translateX(4px);
}

/* Estilos específicos para cada botón social */
.contact-button.linkedin::before {
    background: linear-gradient(135deg, #0077b5, #00a0dc);
}

.contact-button.instagram::before {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.contact-button.email::before {
    background: linear-gradient(135deg, #D93025, #EA4335);
}

.contact-button.phone::before {
    background: linear-gradient(135deg, #00C853, #69F0AE);
}

.contact-card:hover .contact-info i {
    transform: scale(1.05);
    box-shadow: 0 6px 20px var(--shadow-color);
}

.contact-button.linkedin:hover {
    background: #0077b5;
}

.contact-button.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.footer {
    background: var(--card-bg);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    color: var(--text-secondary);
}

/* Contact Section Styles */
.contact {
    padding: 4rem 2rem;
}

.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.contact-card {
    background: var(--card-background);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 30px var(--shadow-color);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: 0.6s;
}

.contact-card:hover::before {
    left: 100%;
}

.contact-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px var(--shadow-color);
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--card-background);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

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

/* GitHub Projects */
.github-projects {
    text-align: center;
    margin-top: 30px;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: var(--card-background);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.github-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

/* Projects Section */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 40px auto;
}

.project-card {
    background: var(--card-background);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 30px var(--shadow-color);
    background: var(--card-background);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    transition: all 0.4s ease;
}

.project-card:hover::before {
    left: 0;
}

.project-card .project-icon {
    transition: transform 0.4s ease;
}

.project-card:hover .project-icon {
    transform: scale(1.1) rotate(5deg);
}

.project-icon {
    font-size: 2.5em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 10px;
}

.project-card h3 {
    color: var(--primary-color);
    font-size: 1.5em;
    margin-bottom: 10px;
}

/* Project Card Link Styles */
.project-card h3 .fa-external-link-alt {
    font-size: 0.7em;
    opacity: 0;
    margin-left: 8px;
    transform: translateX(-5px);
    transition: all 0.3s ease;
}

.project-card:hover h3 .fa-external-link-alt {
    opacity: 1;
    transform: translateX(0);
}

.project-card p {
    color: var(--text-color);
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 15px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}

.project-tech span {
    background: linear-gradient(135deg, #2193f3 0%, #0d47a1 100%);
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.9em;
    box-shadow: 0 2px 10px rgba(33, 150, 243, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-tech span::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.project-tech span:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
}

.project-tech span:hover::before {
    left: 100%;
}

/* About Section */
.about-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.about-text {
    margin-bottom: 40px;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1em;
    line-height: 1.8;
    color: var(--text-color);
    opacity: 0.9;
}

.about-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: var(--card-background);
    border-radius: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.highlight-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-color);
}

.highlight-item i {
    font-size: 1.5em;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.highlight-item:hover i {
    transform: scale(1.2);
}

.highlight-item span {
    font-weight: 500;
    color: var(--text-color);
}

.about {
    position: relative;
    z-index: 2;
    background: var(--background-color);
    margin-top: -20px;
    padding-top: 60px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        height: auto;
        padding-top: 100px;
    }
    
    .profile-image-container {
        width: 150px;
        height: 150px;
    }
    
    .name {
        font-size: 2em;
    }
    
    .skills-container {
        grid-template-columns: 1fr;
    }

    .contact-container {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .contact-card {
        padding: 1.5rem;
    }
    
    .contact-button {
        width: 100%;
    }
}
