:root {
    --primary-color: #007bff;
    --secondary-color: #28a745;
    --accent-color: #6c63ff;
    --dark-bg: #1a1a2e;
    --light-bg: #f8f9fa;
    --text-dark: #333;
    --text-light: #666;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-bg);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    color: var(--white);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.navbar {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.navbar.scrolled {
    padding: 10px 0;
    background: rgba(26, 26, 46, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-logo {
    height: 60px;
    width: auto;
    transition: var(--transition);
    border-radius: 5px;
}

.navbar.scrolled .navbar-logo {
    height: 45px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger-menu .bar {
    width: 30px;
    height: 3px;
    background: var(--white);
    border-radius: 3px;
    transition: var(--transition);
}

.hamburger-menu.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--gradient-primary);
    overflow: hidden;
    padding-top: 80px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
    animation: moveBackground 20s linear infinite;
}

@keyframes moveBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(100px, 100px); }
}

.hero-content {
    text-align: center;
    color: var(--white);
    z-index: 1;
    animation: fadeInUp 1s ease;
}

.profile-image-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
}

.profile-pic {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--white);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.profile-border {
    position: absolute;
    top: -10px;
    left: -10px;
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease 0.2s both;
}

.tagline {
    font-size: 1.2rem;
    margin-bottom: 40px;
    font-style: italic;
    opacity: 0.95;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.6s both;
}

.btn-primary, .btn-secondary {
    padding: 15px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-primary::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;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(40, 167, 69, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-3px);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--white);
    border-radius: 20px;
    position: relative;
}

.mouse::before {
    content: '';
    width: 4px;
    height: 10px;
    background: var(--white);
    border-radius: 2px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

@keyframes scroll {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(20px); }
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    color: var(--text-dark);
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   ABOUT SECTION
   ============================================ */
#about {
    background: var(--white);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: justify;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
}

.about-content p {
    margin-bottom: 20px;
}

/* ============================================
   GITHUB CHART SECTION
   ============================================ */
#github-chart {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
}

#github-chart .section-title {
    color: var(--white);
}

#github-chart .section-title::after {
    background: var(--white);
}

.github-link {
    color: var(--white);
    text-decoration: none;
    border-bottom: 2px solid var(--white);
    transition: var(--transition);
}

.github-link:hover {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}

.github-chart-wrapper {
    margin: 40px 0;
    text-align: center;
}

.github-chart {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.github-chart:hover {
    transform: scale(1.02);
}

.stacks-container {
    margin-top: 60px;
}

.stacks-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--white);
}

.stacks-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.stacks-grid img {
    transition: var(--transition);
    border-radius: 5px;
}

.stacks-grid img:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   EXPERIENCE SECTION
   ============================================ */
#experience {
    background: var(--white);
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-primary);
}

.job-entry {
    position: relative;
    margin-bottom: 50px;
    padding-left: 80px;
}

.timeline-marker {
    position: absolute;
    left: 18px;
    top: 0;
    width: 25px;
    height: 25px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 4px solid var(--white);
    box-shadow: var(--shadow);
    z-index: 1;
}

.job-content {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-left: 4px solid var(--primary-color);
}

.job-content:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-lg);
}

.job-content h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.period {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.negrito {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1em;
}

.job-content ul {
    list-style: none;
    padding-left: 0;
}

.job-content li {
    margin-bottom: 15px;
    padding-left: 25px;
    position: relative;
    line-height: 1.7;
}

.job-content li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* ============================================
   EDUCATION SECTION
   ============================================ */
#education {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: var(--white);
}

#education .section-title {
    color: var(--white);
}

#education .section-title::after {
    background: var(--white);
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.education-entry {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.education-entry:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-lg);
}

.education-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.education-entry h3 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.education-entry .period {
    color: rgba(255, 255, 255, 0.9);
}

/* ============================================
   PORTFOLIO SECTION
   ============================================ */
#portfolio {
    background: var(--white);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.project-entry {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 4px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.project-entry::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 123, 255, 0.1), transparent);
    transition: left 0.5s;
}

.project-entry:hover::before {
    left: 100%;
}

.project-entry:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.project-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.project-entry h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.project-entry p {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 20px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.project-tech span {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.project-link:hover {
    gap: 10px;
    color: var(--accent-color);
}

/* ============================================
   COURSES SECTION
   ============================================ */
#courses {
    background: var(--light-bg);
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.course-entry {
    background: var(--white);
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-left: 4px solid var(--secondary-color);
}

.course-entry:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.course-entry h3 {
    color: var(--text-dark);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.course-entry .period {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.course-entry p {
    color: var(--text-light);
    line-height: 1.6;
}

/* ============================================
   SKILLS SECTION
   ============================================ */
#skills {
    background: var(--white);
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 40px;
}

.skill-tag {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    cursor: default;
    box-shadow: var(--shadow);
}

.skill-tag:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   ADDITIONAL INFO SECTION
   ============================================ */
#additional-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
}

#additional-info .section-title {
    color: var(--white);
}

#additional-info .section-title::after {
    background: var(--white);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.info-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.info-item:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-lg);
}

.info-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.info-item p {
    color: var(--white);
    line-height: 1.7;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
#contact {
    background: var(--white);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.contact-item {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 2px solid transparent;
}

.contact-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.contact-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.contact-info h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.contact-info p {
    color: var(--text-light);
    line-height: 1.6;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: var(--dark-bg);
    color: var(--white);
    text-align: center;
    padding: 30px 0;
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 123, 255, 0.4);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: rgba(26, 26, 46, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transition: right 0.3s ease;
        backdrop-filter: blur(10px);
    }

    .nav-links.active {
        right: 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .timeline::before {
        left: 15px;
    }

    .job-entry {
        padding-left: 50px;
    }

    .timeline-marker {
        left: 3px;
        width: 20px;
        height: 20px;
    }

    .portfolio-grid,
    .education-grid,
    .courses-grid,
    .contact-grid,
    .info-grid {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .profile-pic {
        width: 150px;
        height: 150px;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 1.8rem;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

