/* =========================================================
   Home Page Responsive Fixes
   Computational Biophysics and Bioinformatics
   ========================================================= */


/* =========================================================
   Header
   Keeps logo-title-logo layout on smaller screens
   ========================================================= */

.site-header-row {
    flex-wrap: nowrap;
    align-items: center;
}

.site-header-logo-col {
    flex: 0 0 16.666667%;
    max-width: 16.666667%;
}

.site-header-title-col {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
}

.site-header-logo {
    width: 90%;
    max-width: 130px;
    height: auto;
}

.site-header-title {
    text-align: center;
    padding-top: 1.5rem;
    margin-bottom: 0;
    font-size: clamp(0.9rem, 3.2vw, 2rem);
    line-height: 1.15;
    color: rgb(243, 172, 146);
    -webkit-text-stroke: 1px rgb(8, 248, 228);
}

.site-header-subtitle {
    text-align: center;
    padding-top: 1rem;
    margin-bottom: 0;
    font-size: clamp(0.75rem, 2.7vw, 1.7rem);
    line-height: 1.15;
    color: rgb(243, 172, 146);
    -webkit-text-stroke: 1px rgb(255, 248, 228);
}

.site-header-right {
    text-align: right;
}

@media (max-width: 575px) {
    .site-header-logo-col {
        padding-left: 0.35rem !important;
        padding-right: 0.35rem !important;
    }

    .site-header-title-col {
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
    }

    .site-header-logo {
        width: 100%;
        max-width: 70px;
    }

    .site-header-title {
        padding-top: 0.35rem;
        font-size: clamp(0.75rem, 3.6vw, 1rem);
        -webkit-text-stroke: 0.35px rgb(8, 248, 228);
    }

    .site-header-subtitle {
        padding-top: 0.25rem;
        font-size: clamp(0.65rem, 3.2vw, 0.9rem);
        -webkit-text-stroke: 0.35px rgb(255, 248, 228);
    }
}


/* =========================================================
   Navigation
   Prevents odd wrapping/compression on smaller screens
   ========================================================= */

.main-navbar {
    background-color: rgba(224, 123, 57, 0.6);
    font-family: Saira, sans-serif;
}

.main-navbar .navbar-nav {
    flex-wrap: wrap;
}

.main-navbar .nav-link {
    white-space: nowrap;
}

.main-navbar .dropdown-menu {
    background-color: rgba(224, 123, 57, 0.85);
}

.main-navbar .dropdown-item {
    color: purple;
    white-space: normal;
}

@media (max-width: 991px) {
    .main-navbar {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    .main-navbar .navbar-nav {
        flex-wrap: nowrap;
    }

    .main-navbar .nav-link {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}


/* =========================================================
   Software & Servers
   Prevents first row/cards from becoming extremely narrow
   ========================================================= */

.software-row {
    padding-bottom: 0.8rem;
}

.software-server {
    min-width: 0;
    margin-bottom: 1rem;
}

.software-server .card {
    height: 100%;
}

.software-server .card-header {
    font-weight: 600;
    line-height: 1.25;
    word-break: normal;
    overflow-wrap: normal;
    white-space: normal;
}

.software-server .card-header a {
    word-break: normal;
    overflow-wrap: normal;
    white-space: normal;
}

.software-server .card-body {
    min-width: 0;
}

.software-server img {
    display: block;
    max-width: 100%;
    height: auto;
}

.software-server .server-description {
    padding: 0.5rem 0.75rem;
    line-height: 1.35;
    word-break: normal;
    overflow-wrap: normal;
    white-space: normal;
}

/* Bootstrap-compatible responsive software columns */
.software-card-col {
    position: relative;
    width: 100%;
    min-height: 1px;
    padding-right: 15px;
    padding-left: 15px;
    flex: 0 0 100%;
    max-width: 100%;
}

@media (min-width: 768px) {
    .software-card-col {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (min-width: 992px) {
    .software-card-col {
        flex: 0 0 25%;
        max-width: 25%;
    }
}


/* =========================================================
   Section Head with GitHub Link
   Keeps heading and GitHub link from crushing each other
   ========================================================= */

.software-section-head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.software-github-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-family: Roboto, sans-serif;
    height: auto;
    white-space: nowrap;
}

.software-github-link small {
    color: purple;
}

.software-github-link img {
    height: 2rem;
    width: auto;
}

@media (max-width: 575px) {
    .software-section-head {
        display: block;
    }

    .software-github-link {
        display: inline-flex;
        margin-top: 0.25rem;
        white-space: normal;
    }

    .software-github-link img {
        height: 1.5rem;
    }
}


/* =========================================================
   Carousel / Robot Row
   Optional responsive cleanup
   ========================================================= */

.home-carousel-img {
    width: 100%;
    height: 430px;
    object-fit: cover;
}

.robot-panel {
    background-color: rgb(245, 255, 245);
    height: 430px;
}

@media (max-width: 991px) {
    .robot-panel {
        height: auto;
        padding-bottom: 1rem;
    }

    .home-carousel-img {
        height: auto;
        max-height: 430px;
    }
}


/* =========================================================
   People Cards
   Existing people-card styles consolidated here
   ========================================================= */

.person-card {
    height: 100%;
}

.card-body.person {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.person {
    text-align: center;
}

.person-name {
    margin-bottom: 2px;
}

.person-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 4px;
    min-height: 22px;
}

.person-links a,
.person-links-compact a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.person-links img {
    width: 20px;
    height: 20px;
    opacity: 0.9;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.person-links img:hover,
.person-links img:focus {
    opacity: 1;
    transform: scale(1.08);
}

.person-links-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
    min-height: 18px;
}

.person-links-compact img {
    width: 16px;
    height: 16px;
    opacity: 0.9;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.person-links-compact img:hover,
.person-links-compact img:focus {
    opacity: 1;
    transform: scale(1.06);
}

.person-cv-link {
    white-space: nowrap;
}

.person-photo {
    position: relative;
    top: -10px;
    width: 220px;
    height: 220px;
    max-width: 100%;
    object-fit: cover;
}

@media (max-width: 575px) {
    .person-photo {
        width: 180px;
        height: 180px;
    }
}


/* =========================================================
   Utility Fixes
   ========================================================= */

img {
    max-width: 100%;
}

.card {
    min-width: 0;
}

.row {
    min-width: 0;
}
