/* VARIABLES */
:root {
    --accent: #ffc107;
    --dark: #1f1f1f;
    --text-muted: #777;
    --text-soft: #999;
    --white: #fff;

    --transition-fast: .3s ease;
    --transition-mid: .6s ease;

    --obj-fit: cover;
}

/* BASE */
html,
body {
    height: 100%;
    scroll-behavior: smooth;
    margin: 0 0 5rem;
    overflow-x: clip;
    position: relative;
}

main {
    overflow-x: hidden;
    position: relative;
}

h1 {
    font-size: 1.5rem;
}

.container,
.row,
.col {
    margin: 0px !important;
    padding: 0px !important;
}

/* SIDEBAR */
.sidebar {
    width: 20vw;
    min-width: 220px;
    background: var(--dark);
    color: var(--white);
    padding: 2.6rem 1.5rem;
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 1100;
    transition: transform 0.4s ease;
}

.lang-switch {
    font-size: .75rem;
    letter-spacing: .1em;
    margin-bottom: .5rem;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    transition: color 0.3s;
    text-transform: uppercase;
    font-weight: 700;
}

.lang-btn.active {
    color: var(--accent);
}

.sidebar nav a.nav-link {
    display: inline-block;
    position: relative;
    text-align: center;
    margin: .3rem auto;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    color: var(--text-muted) !important;
    text-decoration: none;
    padding-bottom: 0;
    transition: color 0.3s ease;
    width: fit-content;
}

.sidebar nav a.nav-link::after {
    content: "";
    position: absolute;
    height: 1.2px;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--accent);
    visibility: hidden;
    transform: scaleX(0);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sidebar nav a.nav-link.active {
    color: var(--white) !important;
}

.sidebar nav a.active::after,
.sidebar nav a:hover::after {
    visibility: visible;
    transform: scaleX(.7);
}

.sidebar-footer {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.social-links a {
    color: var(--text-muted);
    margin: 0 0.4rem;
    font-size: 1rem;
}

.social-links a:hover {
    color: var(--accent);
}

/* BOTÓN MENÚ LADEADO */
.menu-trigger {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    transform: translateY(-50%) rotate(90deg);
    transform-origin: left bottom;
    background: var(--accent);
    color: var(--dark);
    border: none;
    padding: 0.6rem 1.5rem;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    z-index: 1200;
    cursor: pointer;
}

/* INDICADORES ESCRITORIO */
.carousel-indicators {
    position: absolute;
    bottom: 5%;
    left: 1.2rem;
    flex-direction: column;
    width: 10px;
    margin: 0;
    gap: 10px;
}

.carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 5px 0;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
}

.carousel-indicators .active {
    background-color: var(--accent);
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .menu-trigger {
        display: block;
    }

    main {
        margin-left: 0 !important;
    }

    /* Ajustes de Indicadores Móvil */
    .carousel-indicators {
        top: 16%;
        bottom: auto;
        left: 0;
        margin: 0;
        width: 38px;
        flex-direction: column;
        align-items: center;
        z-index: 1000;
    }

    .carousel-indicators [data-bs-target] {
        width: 10px;
        height: 10px;
        background-color: rgba(255, 255, 255, 0.4);
        border: 2px solid rgba(0, 0, 0, 0.2);
    }

    .carousel-indicators .active {
        background-color: var(--accent);
        transform: scale(1.2);
    }

    .info-box {
        width: 60% !important;
        right: 0 !important;
        padding: 1.5rem !important;
        height: auto !important;
        min-height: 200px;
    }
}

@media (min-width: 992px) {
    main {
        margin-left: 20vw;
    }
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
}

.sidebar-overlay.active {
    display: block;
}

/* CONTENIDO */
section {
    height: 100vh;
    position: relative;
}

.carousel-item {
    height: 100vh;
}

.carousel-item img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    object-position: center;
    display: block;
    max-width: 100%;
}

.info-box {
    position: absolute;
    bottom: 5%;
    right: 4%;
    background: color-mix(in srgb, var(--dark), transparent 30%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 4px solid var(--accent);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    color: var(--white);
    padding: 2.5rem;
    width: 420px;
    height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0s, transform 0s;
    z-index: 10;
    border-radius: 4px;
}

.info-box.show {
    opacity: 1;
    transform: translateY(0);
    transition: opacity .6s ease 0.5s, transform 1.2s ease 0.5s;
}

.info-box h2 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--accent);
}

.info-box a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
}

.btn-warning {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--dark) !important;
}

/* PROJECTS */
.content-section {
    height: auto;
    padding: 2.6rem 3rem 1rem;
    background-color: var(--white);
}

.section-title-area {
    margin-bottom: 3rem;
}

.section-eyebrow {
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-soft);
    margin-bottom: 0.5rem;
    display: block;
}

.section-title {
    font-weight: 700;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.section-title::after {
    content: "";
    position: absolute;
    width: 100px;
    height: 4px;
    background: var(--accent);
    bottom: 0;
    left: 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.project-card {
    position: relative;
    aspect-ratio: 16 / 9;
    cursor: pointer;
    background: var(--text-dark);
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity .8s ease, transform .8s ease;
}

.project-card.from-right {
    transform: translateX(60px);
}

.project-card.show {
    opacity: 1;
    transform: translateX(0);
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid var(--text-soft);
    border-radius: 4px;
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 1),
            rgba(0, 0, 0, .8));
    color: var(--white);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity .4s ease;
    pointer-events: none;
    border-radius: 4px;
}

.project-tag {
    font-size: .7rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--accent);
}

.project-overlay h3 {
    margin: .5rem 0 0;
    font-weight: 600;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.copy-link-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    display: grid;
    place-items: center;
    cursor: pointer;
    opacity: 0;
    transform: scale(.8);
    transition: opacity .3s ease, transform .3s ease, background .3s ease;
    pointer-events: auto;
}

.project-card:hover .copy-link-btn {
    opacity: 1;
    transform: scale(1);
}

.copy-link-btn:active {
    transform: scale(.85);
}

.copy-link-btn.copied {
    background: var(--accent);
    color: var(--dark);
    animation: pop .35s ease;
}

@keyframes pop {
    0% {
        transform: scale(.8);
    }

    50% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
    }
}

@media (max-width: 991px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* SECCIÓN SOBRE MÍ (ABOUT) */
.about-img-container {
    position: relative;
    width: 100%;
    padding-bottom: clamp(40%, (800px - 100vw) * 1000, 66%); /* 56.25% = 16:9, 75% = 4:3, 100% = 1:1 */
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.about-img-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.about-content-wrapper {
    padding-right: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.about-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-top: 2rem;
}

@media (max-width: 991px) {
    .about-content-wrapper {
        padding-right: 0;
    }
}

#about .row {
    display: flex;
    margin-left: 0;
    margin-right: 0;
}

@media (min-width: 992px) {
    #about .col-lg {
        flex: 1;
        max-width: calc(50% - 1rem);
    }
}

.about-content-wrapper {
    padding: 0;
}

/* SECCIÓN CONTACTO */

#contact {
    padding-bottom: 8rem !important;
}

#contact .col-lg-7,
#contact .col-lg-5 {
    padding: 0 !important;
}

.contact-content {
    max-width: 600px;
    color: var(--text-muted);
    margin: 0 auto 3rem;
}

.contact-content p {
    text-align: left;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.contact-link-group {
    position: relative;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    padding-bottom: 12px;
}

.contact-icon-wrapper {
    color: var(--accent);
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    transform: rotate(-45deg);
    transition: transform var(--transition-mid);
    margin-right: 1rem;
    flex-shrink: 0;
}

.contact-email {
    font-size: clamp(1.1rem, 3vw, 2.4rem);
    font-weight: 700;
    color: var(--dark);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.contact-link-group::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 4px;
    background: var(--accent);
    bottom: 0;
    left: 0;

    transform: scaleX(0.1);
    transform-origin: left;

    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.contact-link-group:hover .contact-email {
    color: var(--dark);
}

.contact-link-group:hover::after {
    transform: scaleX(1);
}

.contact-link-group:hover .contact-icon-wrapper {
    transform: rotate(-45deg) scale(1.1);
}

.contact-socials {
    display: grid;
    grid-template-columns: repeat(4, auto);
    gap: 1.5rem;
    width: fit-content;
    margin: 0 auto;
}

.contact-socials a {
    font-size: 2.5rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.contact-socials a:hover {
    color: var(--accent);
    transform: translateY(-5px);
}

@media (min-width: 992px) {
    .contact-content {
        margin: 0;
    }

    .contact-socials {
        grid-template-columns: repeat(2, auto);
        gap: 1rem;
        margin: 0;
    }

    .contact-socials a {
        font-size: 3.5rem;
        width: 80px;
        height: 80px;
    }
}