/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;900&family=Poppins:wght@400;500;600;700&family=Roboto+Mono:wght@300;500&display=swap');

/* Variables CSS */
:root {
    --primary-color: #5924ed;
    --secondary-black: #0d081a;
    --secondary-gray: #48464b;
    --body-bg: #efebfa;
    --link-hover: rgb(0, 200, 255);
    --scroll-thumb: #b9b9b9;
    --scroll-thumb-hover: rgb(122, 122, 122);
    --timeline-line: #007bff;
    --footer-bg: #1d1d1d;
    --footer-text: #ffffff;
    --footer-link-hover: rgb(0, 157, 255);
    --copyright-text: rgb(107, 107, 107);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    scroll-behavior: smooth;
}

html {
    font-family: 'Poppins', sans-serif;
    font-size: 10px;
    scroll-behavior: smooth;
}

body {
    background-color: var(--body-bg);
}

img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

a {
    color: var(--secondary-black);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--link-hover);
}

section {
    padding-top: 6rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 90%;
    margin: 0 auto;
    max-width: 1200px;
}

p {
    font-size: 1.6rem;
    color: var(--secondary-black);
    line-height: 1.6;
}

.section-heading {
    font-size: clamp(2rem, 10vw, 8rem);
    text-transform: uppercase;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.2rem;
    text-align: center;
    position: relative;
    margin-bottom: 6rem;
}

.section-heading::before {
    content: attr(data-outline);
    position: absolute;
    left: 50%;
    top: -15%;
    transform: translateX(-50%);
    width: 100%;
    text-align: center;
    text-transform: uppercase;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.2rem;
    color: transparent;
    -webkit-text-stroke: 1.5px #5a24ed2f;
    z-index: -1;
}

.buttons {
    margin-top: 3rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 2rem;
}

.primary-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    font-size: 1.8rem;
    padding: 0.8em 1.8em;
    border-radius: 50px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.primary-btn:hover {
    background-color: #4070f4;
    color: white;
}

.buttons .primary-btn.outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.buttons .primary-btn.outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.buttons svg {
    width: 2.5rem;
    /* Ajusté el tamaño del SVG */
    color: var(--primary-color);
}

/* Custom Scroll Bar CSS */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--scroll-thumb);
    border-radius: 12px;
    transition: background-color 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--scroll-thumb-hover);
}

/* Navbar Styling */
nav {
    background-color: white;
    width: 100%;
    padding: 1rem 2rem;
    height: auto;
    min-height: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 99;
    transition: all 0.3s ease;
    font-family: "Poppins", sans-serif;
    position: fixed;
    top: 0;
    left: 0;
}

nav.sticky {
    padding: 0.8rem 2rem;
    min-height: 50px;
    box-shadow: 0 2px 5px rgba(255, 140, 0, 0.721);
}

nav .navbar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .navbar .logo a {
    font-weight: 900;
    font-size: 2.2rem;
    color: var(--secondary-black);
    transition: color 0.3s ease-in-out;
}

nav .navbar .logo a:hover {
    color: orange;
}

nav .navbar .menu {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

nav .navbar .menu li {
    list-style: none;
    margin: 0 1.5rem;
}

.navbar .menu a {
    font-size: 1.8rem;
    font-weight: 500;
    color: #ffa2a2;
    transition: color 0.3s ease;
}

.navbar .menu a:hover {
    color: var(--link-hover);
}

nav .navbar .media-icons a {
    color: var(--secondary-gray);
    font-size: 2.5rem;
    margin: 0 0.8rem;
}

nav .navbar .media-icons a:hover {
    color: var(--link-hover);
}

/* Side Navigation Menu Button CSS */
nav .menu-btn,
.navbar .menu .cancel-btn {
    position: absolute;
    color: var(--secondary-black);
    right: 3rem;
    top: 2rem;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease;
    display: none;
}

nav .menu-btn:hover,
.navbar .menu .cancel-btn:hover {
    color: var(--link-hover);
}

/* Home Section Styling */
.home {
    height: 100vh;
    width: 100%;
    background: linear-gradient(135deg, #FF6B6B, #FFAA00, #ADD8E6);
    /* Inspirado en GTA VI */
    background-size: 200% 200%;
    /* animation: animate-gradient 10s linear infinite;  Puedes mantener o quitar la animación */
    font-family: "Poppins", sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes animate-gradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.home .home-content {
    text-align: center;
    color: var(--secondary-black);
}

.home .text-one {
    font-size: 2.3rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.home .text-two {
    font-size: clamp(4rem, 15vw, 7rem);
    font-weight: 900;
    color: white;
    line-height: 1;
    margin-bottom: 1rem;
}

.home .text-four {
    font-size: 2.3rem;
    font-weight: 500;
    color: rgb(0, 0, 0);

    margin-bottom: 1rem;
}

@keyframes animate-text {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.home .text-three {
    font-size: 2.2rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: white;
}

.home .button {
    margin-top: 2rem;
}

.home .button a.primary-btn.outline {
    background-color: transparent;
    border: 2px solid white;
    color: white;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.home .button a.primary-btn.outline:hover {
    background-color: var(--primary-color);
    color: white;
}

@media (max-width: 768px) {
    html {
        font-size: 9px;
    }

    .home {
        height: 100vh;
        padding: 10rem 0;
    }

    .home .text-two {
        font-size: clamp(4rem, 12vw, 6rem);
    }
}

/* About Section */
#about {
    padding: 8rem 0;
    /* Ajusté el padding */
}

#about .wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
}

#about .left {
    padding: 2rem;
    text-align: center;
    flex: 1;
}

#about .left .card {
    box-shadow: 0px 0px 20px #4705fc33;
    padding: 3rem;
    border-radius: 1.2rem;
    min-height: 40rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#about .left .card .img {
    width: 12.2rem;
    height: 12.2rem;
    margin-bottom: 2rem;
    border-radius: 50%;
    overflow: hidden;
    outline: 4px solid white;
}

#about .left .card .card-desc {
    margin-bottom: 8px;
}

#about .left .card .card-name {
    font-weight: bold;
    font-size: 2rem;
    text-align: center;
    margin-top: 0;
}

#about .left .card .card-sub-title {
    font-size: 1.4rem;
    color: var(--secondary-gray);
}

#about .right {
    flex: 1;
}

#about .right .subheading {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 2rem;
}

#about .right .slogan {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    font-weight: bold;
}

#about .right .right-text {
    color: var(--secondary-gray);
    text-align: justify;
    font-size: 1.6rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

#about .icon-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

#about .icon-container a {
    display: inline-block;
}

#about .icon-container img {
    width: 4rem;
    height: 4rem;
}

/* Education Section - Diseño Horizontal y Naranja Playa (Escritorio) con Botones */
#education {
    padding: 6rem 0;
    background-color: #f9f0e1;
}

#education .section-heading {
    color: #ff8c00;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 4rem;
    text-align: center;
}

#education .timeline-wrapper {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 40px;
}

#education .timeline {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 2rem 0;
}

#education .timeline::after {
    content: '';
    position: absolute;
    height: 2px;
    background-color: #ffb347;
    top: 50%;
    left: 50px;
    right: 50px;
    z-index: 1;
}

#education .timeline-item {
    flex: 0 0 auto;
    width: 280px;
    margin-right: 3rem;
    text-align: center;
    position: relative;
}

#education .timeline-content {
    position: relative;
    background-color: #fff3e0;
    padding: 1.5rem;
    border-radius: 0.6rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
    z-index: 2;
    margin-top: 2rem;
}

/* #education .timeline-content::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 1rem;
    border-style: solid;
    border-color: transparent transparent #fff3e0 transparent;
} */

#education .timeline-item h3 {
    margin-top: 0;
    font-size: 1.6rem;
    font-weight: bold;
    color: #d9534f;
    margin-bottom: 0.5rem;
}

#education .timeline-item p {
    font-size: 1.4rem;
    color: #777;
    margin-bottom: 0.3rem;
}

#education .timeline-content .small-text {
    font-size: 1.2rem;
    color: #ff8c00;
}

#education .timeline-item::before {
    content: '';
    position: absolute;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    background-color: #ffb347;
    z-index: 3;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid #f9f0e1;
}

#education .timeline-item:first-child {
    margin-left: 0;
}

#education .timeline-item:last-child {
    margin-right: 0;
}

/* Ocultar botones en móviles */
@media (max-width: 768px) {
    .timeline-wrapper {
        padding: 0;
    }

    .timeline-btn {
        display: none;
    }

    #education .timeline {
        display: block;
        overflow-x: auto;
        padding: 1rem 0;
    }

    #education .timeline::after {
        width: 2px;
        height: 100%;
        top: 0;
        left: 20px;
        right: auto;
    }

    #education .timeline-item {
        width: 100%;
        margin-right: 0;
        margin-left: 0;
        margin-bottom: 2rem;
        text-align: left;
        padding-left: 40px;
    }

    #education .timeline-item::before {
        top: 10px;
        left: 14px;
    }

    #education .timeline-content {
        margin-top: 0;
        padding: 1rem;
        border-left: 3px solid #ffb347;
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
    }

    #education .timeline-content::after {
        display: none;
    }
}

#education .timeline-item::before {
    display: none;
}

.timeline-btn {
    display: none;
}

/* Media query para diseño vertical en pantallas más pequeñas */
@media (max-width: 768px) {

    .timeline-btn {
        display: none !important;
    }
}

/* Projects Section */
#projects {
    padding: 8rem 0;
}

#projects .all-items {
    margin-top: 4rem;
}

#projects .item {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
    margin-bottom: 10rem;
}

#projects .item:nth-of-type(even) {
    flex-direction: row-reverse;
}

#projects .item:nth-child(3) .left .img-container {
    margin-right: auto;
    max-width: 80%;
}

#projects .item .left {
    flex: 1;
}

#projects .item .right {
    flex: 1;
    margin-left: -15rem;
    background-color: var(--body-bg);
    padding: 4rem 3rem;
    border-radius: 1.2rem;
    box-shadow: 0px 0px 20px #00000028;
    z-index: 2;
}

#projects .item:nth-of-type(even) .right {
    margin-left: 0;
}

#projects .item:nth-of-type(even) .left {
    margin-left: -15rem;
}

#projects .item .left .img-container {
    height: 40rem;
    overflow: hidden;
    border-radius: 1.2rem;
    box-shadow: 0px 0px 20px #4705fc33;
    position: relative;
}

#projects .item .left .img-container::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    background-color: #5a24ed38;
}

#projects .item .left .img-container img {
    transition: transform 0.3s ease;
}

#projects .item:hover .left .img-container img {
    transform: scale(1.05);
}

#projects .item .right .project-title {
    font-size: 2.5rem;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 1rem;
    color: var(--secondary-black);
}

#projects .item .right .project-sub-title {
    font-size: 1.6rem;
    margin-bottom: 2rem;
    color: var(--secondary-gray);
}

#projects .item .right .project-desc {
    color: var(--secondary-gray);
    margin-bottom: 3rem;
    font-size: 1.6rem;
    line-height: 1.7;
}

#projects .item .right .buttons {
    margin-top: 2rem;
    justify-content: flex-start;
}

#projects .item .right .buttons a {
    padding: 0.8em 1.8em;
}

/* Footer Section */
#footer {
    padding: 1rem 0;
    background-color: var(--footer-bg);
    color: var(--footer-text);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.footer .social {
    padding-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer .social a {
    font-size: 2rem;
    color: inherit;
    width: 3rem;
    height: 3rem;
    line-height: 3rem;
    display: inline-block;
    text-align: center;
    border-radius: 50%;
    margin: 0 0.5rem;
    opacity: 0.75;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.footer .social a:hover {
    opacity: 1;
    color: var(--footer-link-hover);
}

.footer ul {
    margin-top: 0.5rem;
    padding: 0;
    list-style: none;
    font-size: 1.4rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer ul li {
    display: inline-block;
    padding: 0 0.8rem;
}

.footer ul li a {
    color: inherit;
    text-decoration: none;
    opacity: 0.8;
}

.footer ul li a:hover {
    opacity: 1;
}

.footer .copyright {
    font-size: 1.2rem;
    color: var(--copyright-text);
    margin-top: 0.5rem;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    #projects .item {
        margin-bottom: 8rem;
    }

    #projects .item .right {
        padding: 3rem;
        margin-left: -10rem;
    }

    #projects .item:nth-of-type(even) .left {
        margin-left: -10rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 9px;
    }

    .home {
        height: 100vh;
        padding: 10rem 0;
    }

    .home .text-two {
        font-size: clamp(4rem, 12vw, 6rem);
    }

    nav {
        padding: 1.6rem 2rem;
    }

    nav.sticky {
        padding: 1.3rem 2rem;
    }

    nav .navbar .menu {
        position: fixed;
        left: -100%;
        top: 0;
        background: white;
        height: 100vh;
        max-width: 300px;
        width: 100%;
        padding-top: 8rem;
        flex-direction: column;
        align-items: center;
        transition: left 0.5s ease;
    }

    nav .navbar .menu.active {
        left: 0;
    }

    nav .navbar .menu li {
        margin: 1rem 0;
    }

    .navbar .menu a {
        font-size: 2rem;
        color: var(--secondary-black);
    }

    nav .navbar .media-icons {
        display: none;
    }

    nav .menu-btn,
    .navbar .menu .cancel-btn {
        display: block;
    }

    #about .wrapper {
        flex-direction: column;
        text-align: center;
    }

    #about .right {
        text-align: left;
    }

    #about .left {
        padding: 1rem;
    }

    #about .left .card {
        min-height: auto;
    }

    #about .icon-container {
        justify-content: center;
    }

    #education .timeline::after {
        left: 2rem;
    }

    #education .timeline-item {
        width: 100%;
        padding-left: 5rem;
        padding-right: 0;
        text-align: left;
        margin-bottom: 3rem;
    }

    #education .timeline-item:nth-child(odd),
    #education .timeline-item:nth-child(even) {
        padding-left: 5rem;
    }

    #education .timeline-item:nth-child(odd)::before,
    #education .timeline-item:nth-child(even)::before {
        left: 1.4rem;
        top: 20px;
    }

    #education .timeline-item:nth-child(odd) .timeline-content::after,
    #education .timeline-item:nth-child(even) .timeline-content::after {
        left: -1rem;
        top: 2rem;
        border-width: 1rem 1rem 1rem 0;
        border-color: transparent white transparent transparent;
    }

    #projects .item {
        flex-direction: column;
        margin-bottom: 8rem;
    }

    #projects .item .left,
    #projects .item .right {
        flex: 1;
        width: 90%;
        margin-left: 0;
    }

    #projects .item .right {
        margin-top: -10rem;
        padding: 3rem;
    }

    #projects .item .left .img-container {
        height: 30rem;
    }

    .buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .buttons a {
        width: 100%;
        text-align: center;
        margin-bottom: 1rem;
    }

    .footer ul {
        flex-direction: column;
        align-items: center;
    }

    .footer ul li {
        display: block;
        padding: 0.5rem 0;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 8px;
    }

    .home .text-two {
        font-size: clamp(3rem, 12vw, 5rem);
    }
}
