﻿/* ============================================
   BASE STYLES & LAYOUT
   ============================================ */

/* Reset browser defaults */
* {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Open Sans', serif;
    padding-top: 54px;
    color: #6b7178;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

@media (min-width: 992px) {
    body {
        padding-top: 0;
        padding-left: 17rem;
    }
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Saira Extra Condensed', serif;
    font-weight: 700;
    text-transform: uppercase;
    color: #343a40;
}

h1 {
    font-size: 6rem;
    line-height: 5.5rem;
}

h2 {
    font-size: 3.5rem;
}

/* Images */
img {
    object-fit: contain;
    width: 100%;
    height: auto;
    display: block;
}
/* Constrain oversized charts but keep them responsive */
.chart-img {
    width: 100%;
    height: auto;
    max-width: 900px; /* adjust as needed */
}


/* Bootstrap 5 removed text-justify, add it back if needed */
.text-justify {
    text-align: justify !important;
}

/* Sticky footer support */
.container-fluid {
    flex: 1;
}

/* ============================================
   NAVIGATION
   ============================================ */

.nav-main {
    font-weight: 600;
    text-transform: uppercase;
}

.nav-mid {
    font-weight: 500;
    margin-left: 15px;
    text-transform: uppercase;
}

.nav-sub {
    margin-left: 30px;
}

/* Nav Bar scroll utility */
.vertScrol {
    overflow-y: auto;
}

@media (min-width: 992px) {
    #sideNav {
        text-align: -webkit-left;
        position: fixed;
        top: 0;
        left: 0;
        display: flex;
        flex-direction: column;
        width: 17rem;
        height: 100vh;
    }

        #sideNav .navbar-brand {
            display: flex;
            margin: auto auto 0;
            padding: 0.5rem;
        }

            #sideNav .navbar-brand .img-profile {
                max-width: 10rem;
                max-height: 10rem;
                border: 0.5rem solid rgba(255, 255, 255, 0.2);
            }

        #sideNav .navbar-collapse {
            display: flex;
            align-items: flex-start;
            flex-grow: 0;
            width: 100%;
            margin-bottom: auto;
        }

            #sideNav .navbar-collapse .navbar-nav {
                flex-direction: column;
                width: 100%;
            }

                #sideNav .navbar-collapse .navbar-nav .nav-item {
                    display: block;
                }

                    #sideNav .navbar-collapse .navbar-nav .nav-item .nav-link {
                        display: block;
                    }
}

/* Support link in navbar */
.support {
    text-transform: uppercase;
    padding-left: .5rem;
    padding-bottom: .5rem;
}

    .support a {
        color: gold;
        text-decoration: none;
        font-weight: bold;
    }

        .support a:hover {
            color: yellow;
        }

@media (min-width: 992px) {
    .support {
        width: 100%;
    }
}

/* Language dropdown menu */
.dropdown-menu {
    background: #C0C0C0 !important;
}


/* ============================================
   SECTIONS & LAYOUT
   ============================================ */

section.resume-section {
    border-bottom: 1px solid #dee2e6;
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
}

    section.resume-section .resume-item .resume-date {
        min-width: none;
    }

@media (min-width: 768px) {
    section.resume-section .resume-item .resume-date {
        min-width: 18rem;
    }
}

@media (min-width: 992px) {
    section.resume-section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
}


/* ============================================
   CONTENT PANELS
   ============================================ */

/* Equation panel */
.equation {
    background-color: #eeeeee;
    color: black;
    overflow-x: auto;
}

/* Calculation panel */
.calc {
    overflow-x: auto;
}

/* Note panel */
.note {
    background-color: #3898bd;
    color: white;
    border-left: 10px solid #276982;
}

    .note a {
        color: gold;
        text-decoration: none;
        font-weight: bold;
    }

        .note a:hover {
            color: yellow;
        }

/* Citation panel */
.citation {
    background-color: #fafafa;
    color: black;
    border-left: 10px solid #b3b3b3;
}


/* ============================================
   TEXT STYLING
   ============================================ */

/* Definitions */
.def {
    color: #bd5938;
    font-weight: bold;
}

/* Sub-bullets */
.subbullet {
    margin-left: 2em;
}


/* ============================================
   TABLES
   ============================================ */

.varTbl {
    vertical-align: top;
}

.varDef {
    padding-left: 10px;
}


/* ============================================
   BUTTONS
   ============================================ */

/* Previous/Next buttons */
.nxtPrevBtn {
    text-decoration: none;
    display: inline-block;
    width: 150px;
    padding: 8px 16px;
    background-color: #bd5d38;
    color: white;
}

    .nxtPrevBtn:hover {
        background-color: #42a2c7;
        color: black;
        text-decoration: none;
    }

/* Get the book buttons */
.getTheBook {
    text-decoration: none;
    display: inline-block;
    width: 180px;
    padding: 8px 16px;
    background-color: #bd5d38;
    color: white;
}

    .getTheBook:hover {
        background-color: #42a2c7;
        color: black;
        text-decoration: none;
    }


/* ============================================
   BOOK SECTION
   ============================================ */

/* Book image animation */
.book-image {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

    .book-image.animate {
        opacity: 1;
        transform: scale(1);
    }

.book-link a {
    font-size: 1.1rem;
    color: #fff;
    background-color: #007bff;
    padding: 0.6em 1.2em;
    border-radius: 0.3em;
    display: inline-block;
    text-decoration: none;
    margin: 0 !important;
}

    .book-link a:hover {
        background-color: #0056b3;
        text-decoration: none;
    }

.book-subtext {
    font-size: 0.95rem;
    color: #666;
    margin: 1em 0 0.8em 0;
    font-style: italic;
}



/* ============================================
   EFFECTS & ANIMATIONS
   ============================================ */

/* Fading text container */
.fade-container {
    height: 200px;
    background-color: #fff;
    mask-image: linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
    -webkit-mask-image: linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
}

.fade-text {
    margin-top: 50px;
}


/* ============================================
   THEME COLORS
   ============================================ */

.bg-primary {
    background-color: #BD5D38 !important;
}

.text-primary {
    color: #BD5D38 !important;
}


/* Override Bootstrap 5 colors to match Bootstrap 4 */
.text-info {
    color: #17a2b8 !important;
}

.btn-info {
    background-color: #138496 !important;
    border-color: #138496 !important;
    color: #fff !important;
}

    .btn-info:hover,
    .btn-info:focus {
        background-color: #17a2b8 !important;
        border-color: #17a2b8 !important;
    }

    .btn-info:active,
    .btn-info.active {
        background-color: #0f6674 !important;
        border-color: #0f6674 !important;
    }