/* Modern Portfolio Design System - Enhanced */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette */
    --bg-dark: #0a0e27;
    --bg-card: rgba(20, 30, 60, 0.7);
    --bg-card-hover: rgba(30, 45, 80, 0.85);
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(148, 163, 184, 0.15);

    /* Gradients */
    --gradient-main: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-text: linear-gradient(135deg, #60a5fa, #c084fc, #06b6d4);
    --gradient-bg: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0a0e27 100%);

    /* Effects */
    --glass: blur(16px);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 30px var(--primary-glow), 0 0 60px rgba(59, 130, 246, 0.3);

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
    animation: backgroundShift 20s ease-in-out infinite;
    z-index: -1;
}

@keyframes backgroundShift {

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

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
    background: var(--gradient-text);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

h2 {
    font-size: 2.5rem;
    color: var(--text-main);
    position: relative;
    display: inline-block;
    margin-bottom: 2.5rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 0;
    height: 4px;
    background: var(--gradient-main);
    border-radius: 2px;
    animation: underlineGrow 1s ease-out forwards;
}

@keyframes underlineGrow {
    to {
        width: 70%;
    }
}

p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s var(--ease);
}

ul {
    list-style: none;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 5rem 0;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s var(--ease);
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 14, 39, 0.85);
    backdrop-filter: var(--glass);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    transition: all 0.3s var(--ease);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

nav ul {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
}

nav a {
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    padding: 0.5rem 0;
    color: var(--text-muted);
    transition: color 0.3s var(--ease);
}

nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gradient-main);
    transition: width 0.3s var(--ease);
}

nav a:hover {
    color: var(--text-main);
}

nav a:hover::before {
    width: 100%;
}

/* Header / Hero */
header {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
    position: relative;
}

.profile {
    max-width: 800px;
    z-index: 1;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rounded-image {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 4px solid transparent;
    background: linear-gradient(var(--bg-dark), var(--bg-dark)) padding-box,
        var(--gradient-main) border-box;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-glow);
    transition: all 0.5s var(--ease-bounce);
    position: relative;
}

.rounded-image::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: var(--gradient-main);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s var(--ease);
}

.rounded-image:hover {
    transform: scale(1.08) rotate(3deg);
}

.rounded-image:hover::after {
    opacity: 0.3;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

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

    50% {
        transform: scale(1.1);
        opacity: 0.5;
    }
}

.parrafo {
    font-size: 1.5rem;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
    color: var(--text-muted);
}

/* Skills - Orbital Animation */
.skills-orbit-container {
    position: relative;
    width: 600px;
    height: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skills-center {
    position: absolute;
    width: 120px;
    height: 120px;
    background: var(--gradient-main);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
    z-index: 10;
    animation: centerPulse 3s ease-in-out infinite;
}

.center-icon {
    font-size: 3rem;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

@keyframes centerPulse {

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

    50% {
        transform: scale(1.1);
    }
}

.skill {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    transition: all 0.4s var(--ease);
    cursor: default;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.skill::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: left 0.5s;
}

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

.skill:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: scale(1.15);
    box-shadow: var(--shadow-glow);
    z-index: 20;
}

.skill-name {
    font-weight: 500;
    color: var(--text-main);
    position: relative;
    z-index: 1;
    white-space: nowrap;
}

/* Orbital paths for each skill */
.skill-orbit-1 {
    animation: orbit1 20s linear infinite;
}

.skill-orbit-2 {
    animation: orbit2 20s linear infinite;
}

.skill-orbit-3 {
    animation: orbit3 20s linear infinite;
}

.skill-orbit-4 {
    animation: orbit4 20s linear infinite;
}

.skill-orbit-5 {
    animation: orbit5 20s linear infinite;
}

.skill-orbit-6 {
    animation: orbit6 20s linear infinite;
}

.skill-orbit-7 {
    animation: orbit7 20s linear infinite;
}

/* Orbital animations - each skill follows a circular path */
@keyframes orbit1 {
    from {
        transform: rotate(0deg) translateX(250px) rotate(0deg);
    }

    to {
        transform: rotate(360deg) translateX(250px) rotate(-360deg);
    }
}

@keyframes orbit2 {
    from {
        transform: rotate(51.43deg) translateX(250px) rotate(-51.43deg);
    }

    to {
        transform: rotate(411.43deg) translateX(250px) rotate(-411.43deg);
    }
}

@keyframes orbit3 {
    from {
        transform: rotate(102.86deg) translateX(250px) rotate(-102.86deg);
    }

    to {
        transform: rotate(462.86deg) translateX(250px) rotate(-462.86deg);
    }
}

@keyframes orbit4 {
    from {
        transform: rotate(154.29deg) translateX(250px) rotate(-154.29deg);
    }

    to {
        transform: rotate(514.29deg) translateX(250px) rotate(-514.29deg);
    }
}

@keyframes orbit5 {
    from {
        transform: rotate(205.71deg) translateX(250px) rotate(-205.71deg);
    }

    to {
        transform: rotate(565.71deg) translateX(250px) rotate(-565.71deg);
    }
}

@keyframes orbit6 {
    from {
        transform: rotate(257.14deg) translateX(250px) rotate(-257.14deg);
    }

    to {
        transform: rotate(617.14deg) translateX(250px) rotate(-617.14deg);
    }
}

@keyframes orbit7 {
    from {
        transform: rotate(308.57deg) translateX(250px) rotate(-308.57deg);
    }

    to {
        transform: rotate(668.57deg) translateX(250px) rotate(-668.57deg);
    }
}

/* Projects Section */
.projects {
    padding: 4rem 0;
}

.project-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.project-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s var(--transition-smooth);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    position: relative;
    max-width: 400px;
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.project-card:hover::before {
    opacity: 0.1;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-info {
    padding: 1.5rem;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-info h3 {
    color: var(--text-main);
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
}

.project-info p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.6;
    flex-grow: 1;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.tech-tags span {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.tech-tags span:hover {
    background: rgba(59, 130, 246, 0.25);
    transform: translateY(-2px);
}

/* Contact Form */
.contact-form {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    max-width: 700px;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(10, 14, 39, 0.6);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-main);
    font-family: inherit;
    transition: all 0.3s var(--ease);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    background: rgba(10, 14, 39, 0.8);
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--gradient-main);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.submit-btn:hover::before {
    width: 300px;
    height: 300px;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

/* Footer */
footer {
    background: rgba(10, 14, 39, 0.95);
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--border);
    margin-top: 4rem;
}

.footer-logos {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

.social-logo {
    width: 40px;
    height: 40px;
    filter: grayscale(100%) brightness(150%);
    transition: all 0.4s var(--ease);
    opacity: 0.7;
}

.footer-link {
    position: relative;
    display: inline-block;
}

.footer-link::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: var(--gradient-main);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s var(--ease);
}

.footer-link:hover::after {
    opacity: 0.3;
}

.footer-link:hover .social-logo {
    filter: none;
    opacity: 1;
    transform: scale(1.2) rotate(5deg);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-main);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.4s var(--ease);
    opacity: 0;
    visibility: hidden;
    z-index: 900;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-8px) scale(1.1);
    box-shadow: var(--shadow-glow);
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    nav {
        padding: 0.5rem 0;
    }

    nav ul {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .rounded-image {
        width: 180px;
        height: 180px;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .project-container {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    /* Mobile orbital skills */
    .skills-orbit-container {
        width: 100%;
        height: 500px;
        max-width: 400px;
    }

    .skills-center {
        width: 80px;
        height: 80px;
    }

    .center-icon {
        font-size: 2rem;
    }

    .skill {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    /* Reduce orbit radius on mobile */
    @keyframes orbit1 {
        from {
            transform: rotate(0deg) translateX(150px) rotate(0deg);
        }

        to {
            transform: rotate(360deg) translateX(150px) rotate(-360deg);
        }
    }

    @keyframes orbit2 {
        from {
            transform: rotate(51.43deg) translateX(150px) rotate(-51.43deg);
        }

        to {
            transform: rotate(411.43deg) translateX(150px) rotate(-411.43deg);
        }
    }

    @keyframes orbit3 {
        from {
            transform: rotate(102.86deg) translateX(150px) rotate(-102.86deg);
        }

        to {
            transform: rotate(462.86deg) translateX(150px) rotate(-462.86deg);
        }
    }

    @keyframes orbit4 {
        from {
            transform: rotate(154.29deg) translateX(150px) rotate(-154.29deg);
        }

        to {
            transform: rotate(514.29deg) translateX(150px) rotate(-514.29deg);
        }
    }

    @keyframes orbit5 {
        from {
            transform: rotate(205.71deg) translateX(150px) rotate(-205.71deg);
        }

        to {
            transform: rotate(565.71deg) translateX(150px) rotate(-565.71deg);
        }
    }

    @keyframes orbit6 {
        from {
            transform: rotate(257.14deg) translateX(150px) rotate(-257.14deg);
        }

        to {
            transform: rotate(617.14deg) translateX(150px) rotate(-617.14deg);
        }
    }

    @keyframes orbit7 {
        from {
            transform: rotate(308.57deg) translateX(150px) rotate(-308.57deg);
        }

        to {
            transform: rotate(668.57deg) translateX(150px) rotate(-668.57deg);
        }
    }
}