/* =======================================
   TYPOGRAPHY SYSTEM
======================================= */

/* Base Font Size Settings */
html {
    font-size: 16px;
}

/* Base Font Settings */
body {
    font-family: "Roboto", sans-serif;
    font-weight: 400;
    font-style: normal;
    line-height: 1.5;
    font-size: 0.9rem;
    margin: 0;
    padding: 0;
}

:root {
    --page-max-width: 2400px;
}

main {
    max-width: var(--page-max-width);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

/* Headings */
h1 {
    font-family: "Cinzel Decorative", serif;
    font-weight: 900;
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #8D181B;
}

h2 {
    font-family: "Cinzel", serif;
    font-weight: 700;
    font-size: 1.75rem;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #8D181B;
}

h3 {
    font-family: "Cinzel", serif;
    font-weight: 600;
    font-size: 1.5rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    color: #444;
}

h3.white {
    color: #EAE6E3 !important;
}

h3.red {
    color: #8D181B !important;
}

h4 {
    font-size: 1.5rem;
    line-height: 1.4;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #8D181B;
}

h5 {
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    color: #8D181B;
}

/* Main layout (quitamos padding que generaba espacio) */
main {
    padding-top: 0;
}

/* =======================================
   RESPONSIVE TYPOGRAPHY
======================================= */

/* Mobile devices */
    @media screen and (max-width: 576px) {
        html {
            font-size: 14px;
        }

        p {
            font-size: 1.16rem !important;
        }

    h1 {
        font-size: 2.3rem;
    }

    h2 {
        font-size: 2.01rem;
    }

    h3 {
        font-size: 1.73rem;
    }

    h4 {
        font-size: 1.44rem;
    }

    h5 {
        font-size: 1.44rem;
    }

    /* Ya no se necesita padding-top para el main */
    main {
        padding-top: 0;
    }

    .carousel-item img {
        height: 50vh;
    }

    .mt-6, .mt-7, .mt-8 {
        margin-top: 2rem !important;
    }

    .mb-6, .mb-7, .mb-8 {
        margin-bottom: 2rem !important;
    }

    .my-6, .my-7, .my-8 {
        margin-top: 2rem !important;
        margin-bottom: 2rem !important;
    }

    .portfolio-nav .nav-item:not(:last-child) {
        margin-right: 0.5rem;
    }

    .portfolio-nav .nav-link {
        padding: 0.25rem 0.5rem;
        font-size: 0.9rem;
    }

    .btn-primary {
        padding: 2px 8px !important;
        font-size: 0.9rem;
    }

    .text-center-mobile {
        text-align: center !important;
    }

    .w-100-mobile {
        width: 100% !important;
    }

    .mt-3-mobile {
        margin-top: 1rem !important;
    }
}

/* Tablets */
@media screen and (min-width: 577px) and (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .carousel-item img {
        height: 60vh;
    }
}

/* Large screens */
@media screen and (min-width: 1200px) {
    html {
        font-size: 18px;
    }
}


/* =======================================
   NAV BAR
======================================= */

/* Navbar flotante sobre el hero - desaparece al hacer scroll */
.main-nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    border: none;
    box-shadow: none;
}

/* Marca / logo */
.main-nav .navbar-brand {
    font-family: "Cinzel", serif;
    font-weight: 600;
    color: #ffffff;
}

/* Links del nav */
.main-nav .nav-link {
    color: #ffffff;
    font-weight: 400;
    position: relative;
}

.main-nav .nav-link:hover,
.main-nav .nav-link:focus {
    color: #ffffff !important;
}

.main-nav .nav-link::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -0.35rem;
    width: 0;
    height: 2px;
    background-color: #ffffff;
    opacity: 0.8;
    transform: translateX(-50%);
    transition: width 0.25s ease, opacity 0.25s ease;
}

.main-nav .nav-link:hover::after,
.main-nav .nav-link:focus::after {
    width: 85%;
    opacity: 1;
}

/* Estado activo */
.main-nav .nav-link.active {
    color: #ffffff;
}

.main-nav .nav-link.active::after {
    width: 85%;
    opacity: 1;
}

/* removed offcanvas active */

/* Botón Get in Touch */
.get-in-touch-btn {
    padding: 0.4rem 1rem;
    border-radius: 0.25rem;
    font-weight: 500;
    text-decoration: none;
    background: #8D181B;
    color: #fff;
}

.get-in-touch-btn:hover,
.get-in-touch-btn:focus {   
    color: #fff;
}

/* Offcanvas (mobile) */
.offcanvas {
    background-color: #111;
}

.offcanvas .nav-link {
    color: #ffffff;
}

.offcanvas .nav-link:hover {
    color: #8D181B;
}

/* Toggler icon visible en fondo oscuro */
.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.4);
}

.navbar-toggler-icon {
    filter: invert(1);
}

/* =======================================
   TEXT UTILITIES
======================================= */

.text-red {
    color: #8D181B !important;
}

.text-blue {
    color: #0C588A !important;
}

.text-highlight {
    font-weight: bold;
    font-size: 1.1rem;
}

.text-white {
    color: #EAE6E3 !important;
}

/* Skills Section Overrides */
/* Background colors */
.bg-white {
    background-color: #EAE6E3 !important;
}

/* Special Headings */
.heading-decorative {
    font-family: "Cinzel Decorative", serif;
}

/* Font Weight Utilities */
.font-thin { font-weight: 100; }
.font-light { font-weight: 300; }
.font-regular { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }

/* Text Size Utilities */
.text-small {
    font-size: 0.875rem;
}

.text-large {
    font-size: 1.125rem;
}

.text-xlarge {
    font-size: 1.25rem;
}

/* Italic */
.font-italic {
    font-style: italic;
}

/* Font Family Utilities */
.cinzel {
    font-family: "Cinzel", serif;
}

.cinzel-decorative {
    font-family: "Cinzel Decorative", serif;
}

/* Line Height Utilities */
.leading-tight {
    line-height: 1.25;
}

.leading-normal {
    line-height: 1.5;
}

.leading-loose {
    line-height: 1.75;
}

/* Margin Utilities */
.mt-6 { margin-top: 4rem !important; }
.mt-7 { margin-top: 5rem !important; }
.mt-8 { margin-top: 6rem !important; }
.mb-6 { margin-bottom: 4rem !important; }
.mb-7 { margin-bottom: 5rem !important; }
.mb-8 { margin-bottom: 6rem !important; }
.my-6 {
    margin-top: 4rem !important;
    margin-bottom: 4rem !important;
}
.my-7 {
    margin-top: 5rem !important;
    margin-bottom: 5rem !important;
}
.my-8 {
    margin-top: 6rem !important;
    margin-bottom: 6rem !important;
}

/* =======================================
   PORTFOLIO / CAROUSEL
======================================= */

.carousel-item img {
    height: 75vh;
    object-fit: cover;
}

.carousel-item {
    transition: transform 0.7s ease-in-out;
}

/* Carousel navigation arrows */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: transparent;
    padding: 1rem;
}

.carousel-control-prev-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%238D181B'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
    filter: brightness(0) saturate(100%) invert(12%) sepia(34%) saturate(4322%) hue-rotate(343deg) brightness(95%) contrast(84%);
}

.carousel-control-next-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%238D181B'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    filter: brightness(0) saturate(100%) invert(12%) sepia(34%) saturate(4322%) hue-rotate(343deg) brightness(95%) contrast(84%);
}

/* =======================================
   BUTTONS
======================================= */

.btn-primary {
    padding: 4px 12px !important;
    line-height: 1.5;
    font-size: 1rem;
    width: auto !important;
    display: inline-block !important;
    min-width: unset !important;
    background-color: #8D181B;
    border-color: #8D181B;
}

.btn-primary:hover {
    background-color: #7a1518;
    border-color: #7a1518;
}

.btn.btn-inactive {
    background-color: #6C757D !important;
    border-color: #6C757D !important;
    color: #EAE6E3 !important;
    padding: 4px 12px !important;
}

/* Hover zoom */
.hover-zoom:hover {
    transform: scale(1.08) !important;
}

/* Secondary Button Styles */
.btn-secondary {
    padding: 4px 12px !important;
    line-height: 1.5;
    font-size: 1rem;
    width: auto !important;
    display: inline-block !important;
    min-width: unset !important;
    background-color: #ffffff !important;
    border: 2px solid #8D181B !important;
    color: #8D181B !important;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: #8D181B !important;
    border-color: #8D181B !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 0.2rem rgba(141, 24, 27, 0.25);
}

/* Responsive adjustments for secondary buttons */
@media screen and (max-width: 576px) {
    .btn-secondary {
        padding: 2px 8px !important;
        font-size: 0.9rem;
        border-width: 3px !important;
        margin-bottom: 0.5rem;
        display: block !important;
        width: auto !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .btn-secondary:not(:last-child) {
        margin-right: 0 !important;
        margin-bottom: 0.5rem !important;
    }
}

/* =======================================
   PORTFOLIO NAVIGATION
======================================= */

.portfolio-nav .nav-link {
    color: #0C588A;
    padding: 0.5rem 1rem;
    position: relative;
    transition: color 0.3s ease;
}

.portfolio-nav .nav-link:hover,
.portfolio-nav .nav-link.active {
    color: #8D181B !important;
}

.portfolio-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #8D181B;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.portfolio-nav .nav-link:hover::after,
.portfolio-nav .nav-link.active::after {
    width: 100%;
}

.portfolio-nav .nav-item:not(:last-child) {
    margin-right: 1.5rem;
}

.proficiency-link {
    color: inherit;
    text-decoration: none;
    position: relative;
    display: inline-block;
}

.proficiency-link::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -4px;
    width: 0;
    height: 2px;
    background-color: #8D181B;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.proficiency-link:hover::after {
    width: 100%;
}

/* Responsive utilities */
.hide-mobile {
    display: none !important;
}

@media screen and (min-width: 577px) {
    .hide-mobile {
        display: block !important;
    }
}

/* =======================================
   FLIPBOOK
======================================= */

#flipbook {
    width: 800px;
    height: 600px;
    margin: 60px auto;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

#flipbook .page {
    width: 400px;
    height: 100%;
    background-color: #fdfdfd;
    font-family: "Cinzel", serif;
    font-size: 2rem;
    padding: 40px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    display: inline-block;
    vertical-align: top;
    text-align: center;
    line-height: normal;
}

/* =======================================
   RESUME SECTION
======================================= */

.resume-content h1,
.resume-content h4,
.get-resume-title {
    color: #8D181B;
}

/* Intro video overlay */
body.no-scroll {
    overflow: hidden;
}

.intro-video-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.intro-video-overlay--hide {
    opacity: 0;
    visibility: hidden;
}

.intro-video {
    width: 100%;
    max-width: 2400px;
    height: auto;
    object-fit: cover;
}

/* Project tags */
.project-tag-pill {
    display: inline-flex;
    align-items: center;
    background: transparent;
    border: 2px solid #0C588A;
    color: #111111;
    padding: 8px 18px;
    border-radius: 16px;
    line-height: 1;
    user-select: text;
}

.page-presentation-button {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    background: transparent;
    border: 2px solid #FBE7CB;
    color: #FBE7CB;
    padding: 8px 18px;
    border-radius: 16px;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
    user-select: text;
}

@media (max-width: 575px) {
    .page-presentation-button {
        top: 12px;
        left: 12px;
        padding: 7px 14px;
    }
}


