body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: clip;
}

h1 {
    font-family: "Stack Sans Notch", sans-serif;
    font-size: clamp(2.8rem, 5.5vw, 6.8rem);
}

h2 {
    font-family: "Stack Sans Notch", sans-serif;
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    font-weight: 500;
}

h3 {
    font-family: "Stack Sans Notch", sans-serif;
    font-size: clamp(1.6rem, 3vw, 3.6rem);
    font-weight: 500;
}

p {
    font-family: "Poppins", sans-serif;
    font-weight: 400;
}

/* --------------------------------------------------- HEADER --------------------------------------------------- */
header {
    position: sticky;
    top: 0;
    padding: 10px;
    z-index: 1000;
}

.header-nav-container {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    backdrop-filter: blur(5px);
    border-radius: 0;
    display: grid;
    position: relative;
    grid-template-columns: auto minmax(0, 1fr) auto auto auto;
    justify-content: space-between;
    align-items: center;
    padding: clamp(12px, 1.5vw, 20px);
    gap: clamp(16px, 2.6vw, 50px);

    transition:
        background-color 2s ease,
        box-shadow 0.3s ease,
        border-radius 2s ease;
}

header.scrolled .header-nav-container {
    background-color: var(--bg-primary-transparent);
    box-shadow: 0 8px 10px #2564eb2f;
    border-radius: 50px;
}

.languages {
    display: flex;
    gap: .5rem;
}

.langbtn {
    background-color: transparent;
    color: var(--white);
    font-size: 1.25rem;
    border: 0;
    cursor: pointer;
}

.header-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-logo img {
    display: block;
    width: clamp(70px, 7vw, 100px);
    max-width: 100px;
    /* o el tamaño que quieras */
    min-width: 70px;
    /* para asegurar que no se haga demasiado pequeño */
    height: auto;
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

.header-nav-links {
    display: flex;
    gap: clamp(12px, 1.4vw, 20px);
    justify-content: flex-start;
    list-style: none;
}

.header-nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
}

.header-nav-links a:hover {
    color: var(--primary);
    text-shadow: 0 0 2px var(--primary-hover);
}

.header-mobile-social-link {
    display: none;
}

.header-social-links {
    display: flex;
    gap: clamp(12px, 1.4vw, 20px);
    justify-content: flex-end;

    list-style: none;
}

.header-social-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
}

.header-social-links a:hover {
    color: var(--primary);
    text-shadow: 0 0 2px var(--primary-hover);
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    background-color: var(--primary);
    color: var(--white);
    font-family: "Stack Sans Notch", sans-serif;
    border: none;
    padding: 10px clamp(18px, 4vw, 80px);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    border-radius: 30px;
    transition:
        background-color 0.3s ease,
        box-shadow 0.3s ease;
}

.dropdown-toggle:hover {
    background-color: var(--primary-hover);
    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.2),
        0 0 0 3px var(--bg-surface-2);
}

.dropdown-toggle img {
    max-width: 24px;
    padding-right: 6px;
}

.dropdown-menu {
    background-color: var(--secondary-transparent);
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
}

.dropdown-item {
    color: var(--white);
    font-weight: 600;
    transition:
        background-color 0.3s ease,
        color 0.3s ease;
}

/* --------------------------------------------------- HERO --------------------------------------------------- */

.hero-container {
    display: grid;
    min-height: 70vh;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    align-items: center;
    gap: clamp(24px, 4vw, 50px);
    padding: 0 25px;
}

.hero-container h1 {
    padding: 1vh 0;
    line-height: 1.2;
}

.hero-container h3 {
    padding: 1vh 0;
}

.hero-container h3 {
    color: var(--primary-hover);
    margin-top: -20px;
}

.hero-container p {
    font-size: clamp(1rem, 1.5vw, 1.5rem);
    line-height: 1.6;
    margin: 20px 0;
}

.hero-content {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.btn-contacto {
    background-color: var(--secondary);
    font-family: "Stack Sans Notch", sans-serif;
    color: var(--white);
    border: none;
    padding: 15px 60px;
    margin-top: 20px;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    border-radius: 30px;
    transition:
        background-color 0.3s ease,
        box-shadow 0.3s ease;
}

.btn-contacto:hover {
    background-color: var(--secondary-transparent);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.hero-image {
    align-self: flex-end;
}

.hero-image img {
    filter:
        drop-shadow(0 0 30px #0e726a);
}

.carousel-hero {
    --carousel-gap: 20px;
    display: flex;
    width: 100%;
    margin: auto;
    overflow: hidden;
    background: var(--primary);
}

.carousel-hero::-webkit-scrollbar {
    display: none;
}

.group-carousel-hero {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: var(--carousel-gap);
    flex: 0 0 auto;
    width: max-content;
    min-width: 100%;
    padding-right: var(--carousel-gap);
    box-sizing: border-box;
    animation: spin 20s linear infinite;

}

.card-hero {
    width: 80px;
    height: 80px;
    flex: 0 0 auto;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.card-hero img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes spin {
    from {
        translate: 0;
    }

    to {
        translate: -100%;
    }
}

/* --------------------------------------------------- PROYECTOS --------------------------------------------------- */

#projects {
    padding: 50px 25px;
}

#projects h2 {
    text-align: center;
}

.projects-carousel {
    padding-top: 50px;
    width: min(900px, 90vw);
    margin: 0 auto;
    min-height: clamp(320px, 45vw, 540px);
}

.projects-carousel:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.carousel-inner {
    border-radius: 30px;
    box-shadow: 0px 0px 30px var(--primary);
}

.carousel-caption {
    background-color: var(--bg-primary-transparent);
    backdrop-filter: blur(5px);
    padding: 20px;
    border-radius: 10px;
}

.project-slide-link {
    display: inline-block;
    margin: 12px 0 0;
    padding: 10px 24px;
}

.d-block {
    width: 100%;
    height: clamp(280px, 42vw, 500px);
    object-fit: cover;
}

/* --------------------------------------------------- SOBRE MI --------------------------------------------------- */

#about {
    padding: 50px 25px;
    background-color: var(--secondary);
    box-shadow: 0 0 25px var(--bg-primary) inset;
}

#about h2 {
    text-align: center;
}

.about-info {
    display: flex;
    text-align: justify;

    padding: 20px 0;
}

.holograma {
    width: 200px;
}

.about-cards {
    padding: 20px 0;
    display: flex;
    flex-wrap: wrap;

    justify-content: center;
    align-items: flex-start;
    text-align: center;

    color: var(--text-primary);
    gap: 50px;
}

.about-cards>div {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(18rem, 100%);
}

.about-cards h4 {
    width: 100%;
    padding: 20px 0;

    background-color: var(--bg-primary);

    box-shadow: 0 0 15px var(--bg-primary);
    border-width: 0;
    border-radius: 5px;

    transition: transform 0.3s ease;
}

.about-cards h4:hover {
    transform: scale(1.05);
    box-shadow: 0 0 35px var(--primary);
}


.card {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    padding: 20px;
    width: min(18rem, 100%) !important;
    min-height: 330px;

    box-shadow: 0 0 15px var(--bg-primary);
    border-width: 0;

    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: scale(1.05) translateY(10px);

    box-shadow: 0 0 35px var(--primary);
}

.card-img-top {
    border-radius: 15px;
}

/* --------------------------------------------------- HABILIDADES --------------------------------------------------- */

#skills {
    padding: 100px 25px;
}

#skills h2 {
    text-align: center;
}

.skills-orbit {
    background-image: var(--gradient-primary-radial);
    display: grid;

    grid-template-columns: minmax(0, 1fr) repeat(3, minmax(0, 3fr)) minmax(0, 1fr);

    grid-template-rows: 150px auto auto 150px;

    align-items: center;
    justify-items: center;

    padding: 70px 0;
}

.skill-center {
    grid-column: 3;
    grid-row: 2 / span 2;

    width: 250px;
    height: 250px;

    border-radius: 50%;

    background: rgba(17, 24, 39, 0.8);

    box-shadow: 0 0 50px var(--white);

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.Diseno {
    grid-column: 2;
    grid-row: 2;
}

.Contenido {
    grid-column: 4;
    grid-row: 2;
}

.Desarrollo {
    grid-column: 2;
    grid-row: 3;
}

.WEB {
    grid-column: 4;
    grid-row: 3;
}

.BD {
    grid-column: 3;
    grid-row: 1;
}

.Herramientas {
    grid-column: 3;
    grid-row: 4;
}

.skill-node {
    width: min(330px, 100%);
    min-height: 170px;

    padding: 20px;
    margin: 10px;

    border-radius: 25px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.3s;


    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 0 25px var(--bg-primary), 0 0 0px var(--bg-primary) inset;

    transition: box-shadow 1.5 ease;

    font-size: clamp(0.85rem, 0.7vw, 1rem);
}

.skill-node h4 {
    font-family: "Stack Sans Notch", sans-serif;
    font-size: clamp(1rem, 1vw, 1.25rem);
}

.skill-node:hover {

    box-shadow: 0 0 0px var(--bg-primary), 0 0 25px var(--bg-primary) inset;
}

.Diseno:hover {
    transform: translateX(20px) scale(0.95);
}

.Contenido:hover {
    transform: translateX(-20px) scale(0.95);
}

.Desarrollo:hover {
    transform: translateX(20px) scale(0.95);
}

.WEB:hover {
    transform: translateX(-20px) scale(0.95);
}

.BD:hover {
    transform: translateY(20px) scale(0.95);
}

.Herramientas:hover {
    transform: translateY(-20px) scale(0.95);
}

.icons {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px 0;

    gap: 20px;
}

.icon {
    width: 32px;
    height: 32px;
}

/* --------------------------------------------------- CONTACTO --------------------------------------------------- */

#contact {
    padding: 50px 25px;
}

#contact h2 {
    text-align: center;
}

.contact-container {
    border-width: 0.25vw;
    border-style: solid;
    border-color: var(--secondary);
    border-radius: 15px;

    box-shadow:
        10px 10px 100px var(--secondary) inset,
        -10px -10px 100px var(--secondary) inset;
    padding: clamp(24px, 4vw, 50px);
    color: var(--white);

    width: min(1200px, calc(100vw - 50px));
    max-width: 100%;
    margin: 0 auto;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.btn-writeme {
    display: inline-block;

    border-style: solid;
    border-width: 5px;
    border-color: var(--orange);
    border-radius: 25px;

    box-shadow:
        8px 8px 15px var(--orange) inset,
        -8px -8px 15px var(--orange) inset;

    max-width: 100%;
    margin: clamp(28px, 4vw, 50px) 0;
    padding: clamp(18px, 3vw, 30px) clamp(36px, 15vw, 250px);

    text-decoration: none;
    font-family: "Stack Sans Notch", sans-serif;
    font-size: clamp(1rem, 1.5vw, 1.5rem);
    font-weight: 500;

    color: var(--text-primary);

    transition: box-shadow 0.3s ease;
}

.btn-writeme:hover {
    box-shadow:
        1px 1px 5px var(--orange) inset,
        -1px -1px 5px var(--orange) inset,
        2px 2px 10px var(--orange),
        -2px -2px 10px var(--orange);
}

.contact-cards-panel {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.contact-cards-panel>div {
    flex: 1 1 calc((100% - 40px) / 3);
    max-width: 400px;
    min-width: 0;
}

.contact-card {
    display: flex;
    margin: 0;
    padding: 20px;
    min-height: 100px;
    width: 100%;
    text-align: center;
    backdrop-filter: blur(25px);

    border-radius: 15px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--secondary);
    border-radius: 15px;

    align-items: center;

    text-decoration: none;
    color: var(--text-primary);

    transition: transform 0.3s ease;
    /*box-shadow: 10px 10px 50px var(--secondary) inset, -10px -10px 50px var(--orange) inset, 3px 5px 15px var(--bg-surface);*/
}

.contact-card:hover {
    transform: scale(1.08);
}

.contact-card img {
    max-width: 50px;
    padding: 10px;
}

.info-contact-card {
    text-align: start;
}

.info-contact-card p {
    overflow-wrap: anywhere;
}

.resalt-text {
    color: var(--orange);
}

/* ---------------------- FOOTER ---------------------- */
footer {
    background-color: var(--bg-surface-2);
    color: var(--text-secondary);
    text-align: center;
    padding: 20px;
}




/* -------------------------------------------- RESPONSIVE --------------------------------------------  */

@media (max-width: 1200px) {
    .header-nav-container {
        grid-template-columns: auto minmax(0, 1fr) auto auto auto;
    }

    .header-social-links {
        display: none;
    }

    .skills-orbit {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }

    .Diseno,
    .Desarrollo {
        grid-column: 1;
    }

    .skill-center,
    .BD,
    .Herramientas {
        grid-column: 2;
    }

    .Contenido,
    .WEB {
        grid-column: 3;
    }

    .skill-node {
        width: min(300px, 100%);
    }
}

@media (max-width: 992px) {
    .menu-btn {
        display: block;
    }

    .header-nav-container {
        grid-template-columns: auto auto auto auto;
        justify-content: space-between;
    }

    .header-nav-links {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        width: 100%;
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
        clip-path: circle(0px at 90% -10%);
        pointer-events: none;
        background-color: var(--bg-surface-2);
        border-radius: 20px;
        z-index: 1001;
    }

    .header-nav-links.active {
        clip-path: circle(1000px at 90% -10%);
        pointer-events: all;
    }

    .header-nav-links li {
        opacity: 0;
        transform: translateY(20px);
        transition: transform 0.3s ease;
    }

    .header-nav-links.active li {
        opacity: 1;
        transform: translateY(0px);
    }

    .header-nav-links li:nth-child(1) {
        transition-delay: 0.1s;
    }

    .header-nav-links li:nth-child(2) {
        transition-delay: 0.2s;
    }

    .header-nav-links li:nth-child(3) {
        transition-delay: 0.3s;
    }

    .header-nav-links li:nth-child(4) {
        transition-delay: 0.4s;
    }

    .header-nav-links li:nth-child(5) {
        transition-delay: 0.5s;
    }

    .header-nav-links li:nth-child(6) {
        transition-delay: 0.6s;
    }

    .header-nav-links li:nth-child(7) {
        transition-delay: 0.7s;
    }

    .header-mobile-social-link {
        display: block;
        width: min(240px, calc(100% - 32px));
    }

    .header-mobile-social-link a {
        display: block;
        width: 100%;
        padding: 12px 20px;
        background-color: var(--secondary);
        border-radius: 30px;
        color: var(--white);
        text-align: center;
    }

    .header-mobile-social-link a:hover {
        color: var(--white);
        background-color: var(--secondary-transparent);
    }

    .hero-container {
        grid-template-columns: 1fr;
        min-height: auto;
        padding-top: 40px;
        text-align: center;
    }

    .hero-content {
        align-items: center;
    }

    .hero-image {
        justify-self: center;
        align-self: center;
        max-width: 520px;
    }

    .projects-carousel {
        width: min(760px, 92vw);
    }

    .skills-orbit {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
        padding: 50px 20px;
    }

    .Diseno,
    .Contenido,
    .Desarrollo,
    .WEB,
    .BD,
    .Herramientas,
    .skill-center {
        grid-column: auto;
        grid-row: auto;
    }

    .skill-center {
        grid-column: 1 / -1;
        order: -1;
        width: 220px;
        height: 220px;
    }

    .skill-node {
        width: 100%;
    }

    .contact-cards-panel>div {
        flex-basis: min(400px, 100%);
    }
}

@media (max-width: 768px) {
    header {
        padding: 8px;
    }

    .dropdown-toggle {
        padding-inline: 16px;
    }

    .hero-container h3 {
        margin-top: -10px;
    }

    .card-hero {
        width: 68px;
        height: 68px;
        padding: 16px;
    }

    .projects-carousel:hover,
    .card:hover,
    .about-cards h4:hover,
    .contact-card:hover {
        transform: none;
    }

    .about-info {
        text-align: left;
    }

    .skills-orbit {
        grid-template-columns: 1fr;
    }

    .skill-center {
        grid-column: auto;
    }

    .Diseno:hover,
    .Contenido:hover,
    .Desarrollo:hover,
    .WEB:hover,
    .BD:hover,
    .Herramientas:hover {
        transform: none;
    }

    .contact-card {
        margin-inline: 0;
    }

    .carousel-caption p{
        display: none;
    }

    .carousel-caption{
        padding: 10px;
        border-radius: 10px;
    }

    .project-slide-link{
        margin: 6px 0 0;
        padding: 2.4px 6px;
    }
}

@media (max-width: 576px) {

    #projects,
    #about,
    #contact {
        padding-inline: 16px;
    }

    #skills {
        padding: 70px 16px;
    }

    .header-logo img {
        min-width: 58px;
        width: 58px;
    }

    .dropdown-toggle img {
        display: none;
    }

    .hero-container {
        padding-inline: 16px;
    }

    .btn-contacto {
        width: 100%;
        max-width: 260px;
    }

    .projects-carousel {
        width: 100%;
        min-height: 280px;
    }

    .d-block {
        height: 260px;
    }

    .about-cards {
        gap: 28px;
    }

    .skill-center {
        width: 190px;
        height: 190px;
    }

    .icons {
        flex-wrap: wrap;
    }

    .contact-container {
        width: 100%;
    }

    .btn-writeme {
        width: 100%;
        padding-inline: 24px;
    }

    .contact-card {
        flex-direction: column;
    }

    .info-contact-card {
        text-align: center;
    }
}
