/*-------------------- Common. Start --------------------*/
body {
    background-color: white;
    margin: auto;
    font-family: "Calibri Light";
    font-size: 18px;
}

@media (max-width: 992px) {
    body {
        font-size: 1.3rem;
    }

    .pubtitle {
        font-size: 1.5rem;
    }

    .groupmember-btn {
        font-size: 1.3rem !important;
    }
}

.pi-cv-btn {
    border-radius: 12px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pi-cv-btn:hover {
    background-color: #212529;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-image: none;
    width: 2.75rem;
    height: 2.75rem;
    background-color: rgba(0,0,0,.65);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0.25rem 0.75rem rgba(0,0,0,.35);
    transition: background-color .2s ease, transform .2s ease;
}

.carousel-control-prev-icon::after,
.carousel-control-next-icon::after {
    content: '';
    display: block;
    width: 0.9rem;
    height: 0.9rem;
    border-top: 3px solid #fff;
    border-right: 3px solid #fff;
}

.carousel-control-prev-icon::after {
    transform: rotate(-135deg);
}

.carousel-control-next-icon::after {
    transform: rotate(45deg);
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
    background-color: rgba(0,0,0,.85);
    transform: scale(1.05);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    margin-top: 0.25rem;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    position: relative;
    z-index: 5;
}

.contact-item .value .ct-line{
    display: block;
}

a {
    color: #F6002B;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.text-justify {
    text-align: justify;
}

.simple-divider {
    height: 1px;
    background: linear-gradient(
            to right,
            transparent,
            rgba(0, 0, 0, 0.15),
            transparent
    );
}
/*-------------------- Common. End --------------------*/

/*-------------------- Header. Start --------------------*/
.nav-menu-link {
    font-size: 20px;
    color: black;
    font-weight: bold;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    line-height: 42px;
}

.nav-menu-current {
    color: #F6002B !important;
}

.nav-menu-link:hover {
    color: #F6002B;
    background: transparent;
    box-shadow: none;
}

.nav-menu-link:before, .nav-menu-link:after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    height: 2px;
    width: 0;
    background: #F6002B;
    transition: 400ms ease all;
}

.nav-menu-link:after {
    right: inherit;
    top: inherit;
    left: 0;
    bottom: 0;
}

.nav-menu-link:hover:before, .nav-menu-link:hover:after {
    width: 100%;
    transition: 800ms ease all;
}

.header-divider {
    height: 2px;
    background: linear-gradient(
            to right,
            transparent,
            rgba(0, 0, 0, 0.15),
            transparent
    );
}

@media (max-width: 992px) {
    .nav-menu {
        align-items: center;
        text-align: center;
    }

    .nav-menu-link {
        width: 100%;
        line-height: 1.2;
        padding: 12px 0;
        border-bottom: 1px solid #eee;
    }

    .nav-menu-link:last-child {
        border-bottom: 0;
    }

    .nav-menu-link::before,
    .nav-menu-link::after {
        content: none !important;
        display: none !important;
    }

    .nav-menu-link:active {
        transform: scale(0.98);
    }

    .nav-menu.open .nav-menu-link {
        animation: fadeUp 0.7s ease both;
    }

    .nav-menu.open .nav-menu-link:nth-child(n) {
        animation-delay: calc(var(--i, 0) * 40ms);
    }

    @keyframes fadeUp {
        from {
            opacity: 0;
            transform: translateY(5px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

.site-header {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 900;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
}

.header-inner a:hover {
    text-decoration: none;
}

#logoimg {
    width: 230px;
}

.nav-menu {
    display: flex;
    gap: 1rem;
}

.nav-menu-link {
    text-decoration: none;
    white-space: nowrap;
}

.burger {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.burger .bar {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    transition: all 0.2s ease;
    background: currentColor;
}

.burger:not(.collapsed) .bar:nth-of-type(1) {
    transform: rotate(45deg);
    transform-origin: 5% 10%;
}

.burger:not(.collapsed) .bar:nth-of-type(2) {
    opacity: 0;
}

.burger:not(.collapsed) .bar:nth-of-type(3) {
    transform: rotate(-45deg);
    transform-origin: 5% 90%;
}

@media (max-width: 992px) {
    .burger { display: block; }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background:
                linear-gradient(
                        to right,
                        transparent,
                        rgba(0, 0, 0, 0.15),
                        transparent
                ) top / 100% 2px no-repeat,

                linear-gradient(
                        to right,
                        transparent,
                        rgba(0, 0, 0, 0.15),
                        transparent
                ) bottom / 100% 2px no-repeat,
                #f8f8f8;

        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;

        display: none;
        z-index: 1000;
    }

    .nav-menu.open {
        display: flex;
    }
}
/*-------------------- Header. End --------------------*/

/*-------------------- Contact. Start --------------------*/
.contact-section {
    margin: 3rem 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.contact-card {
    background: #f8f8f8;
    padding: 2rem;
    border-radius: 12px;
}

.contact-card h2 {
    margin: 0 0 1.5rem;
    font-size: 1.6rem;
}

.contact-item {
    margin: 0 0 1.2rem;
}

.contact-item:last-of-type {
    margin-bottom: 0;
}

.contact-item .label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.contact-item .value {
    color: #444;
    line-height: 1.5;
}

.contact-divider {
    height: 1px;
    margin: 1.8rem 0 1.4rem;
    background: linear-gradient(
            to right,
            transparent,
            rgba(0, 0, 0, 0.15),
            transparent
    );
}

.contact-links-inner h3 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.contact-links-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.contact-links-grid a:hover {
    text-decoration: none;
}

.contact-link-card {
    display: block;
    padding: 1rem 1.2rem;
    border-radius: 10px;
    background: #fff;
    text-decoration: none;
    color: #000;
    border: 1px solid #e8e8e8;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.contact-link-card:hover {
    transform: translateY(-2px);
    border-color: rgba(246, 0, 43, 0.35);
}

.cl-title {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.cl-sub {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.3;
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    min-height: 350px;
    border: 0;
    border-radius: 12px;
}

@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-map iframe {
        min-height: 280px;
    }

    .contact-links-grid {
        grid-template-columns: 1fr;
    }
}
/*-------------------- Contact. End --------------------*/

/*-------------------- Group. Start --------------------*/
.groupmember-btn {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    padding: 0.35rem 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #000;
    cursor: pointer;
}

.groupmember-btn:hover {
    color: #F6002B;
}

.groupmember-btn:focus {
    outline: none;
}

.groupmember-btn:focus-visible {
    outline: 2px solid rgba(246,0,43,0.35);
    border-radius: 8px;
}

#memberModal .modal-content {
    border-radius: 14px;
}

#memberModal .modal-header {
    align-items: flex-start;
}

.member-photo {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    display: none;
}

.member-text {
    line-height: 1.55;
    color: #333;
    white-space: pre-line;
}

@media (max-width: 576px) {
    #memberModal .modal-body > .d-flex {
        flex-direction: column;
        gap: 1rem;
    }

    .member-photo {
        width: 100px;
        height: 100px;
    }
}

section.mt-5 h3 {
    margin-bottom: 1.2rem;
}

section.mt-5 h4 {
    margin-top: 1.8rem;
    margin-bottom: 0.6rem;
    font-weight: 800;
    color: #222;
}

.groupmember-btn {
    position: relative;
    padding: 0.35rem 0 0.35rem 1.1rem;
    margin: 0.05rem 0;
    font-size: 1.03rem;
    font-weight: 600;
    line-height: 1.35;
}

.groupmember-btn::before {
    content: "";
    position: absolute;
    left: 0.4rem;
    top: 0.9rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(0,0,0,0.22);
    transition: background 0.2s ease, transform 0.2s ease;
}

.groupmember-btn:hover::before {
    background: rgba(246,0,43,0.75);
    transform: scale(1.1);
}

.groupmember-btn:hover {
    color: #F6002B;
    background: linear-gradient(to right, rgba(246,0,43,0.06), transparent);
    border-radius: 10px;
}

.groupmember-btn:focus-visible {
    outline: 2px solid rgba(246,0,43,0.28);
    outline-offset: 2px;
    border-radius: 10px;
}

.tog {
    margin: 0.6rem 0;
    border-radius: 12px;
    background: #f8f8f8;
    border: 1px solid rgba(0,0,0,0.06);
}

.tog-outer {
    margin-top: 2rem;
    background: #f5f5f5;
}

.tog-sum {
    list-style: none;
    cursor: pointer;
    padding: 0.9rem 1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.tog-sum::-webkit-details-marker { display: none; }

.tog-sum::after {
    content: "›";
    font-size: 1.4rem;
    line-height: 1;
    transform: rotate(0deg);
    transition: transform 0.2s ease;
    opacity: 0.7;
}

details[open] > .tog-sum::after {
    transform: rotate(90deg);
}

.tog-body {
    padding: 0.2rem 1rem 1rem;
}

details[open] > .tog-body {
    animation: togFade 0.18s ease;
}

.tog-body .groupmember {
    padding: 0.25rem 0;
    color: #222;
}

@keyframes togFade {
    from { opacity: 0; transform: translateY(-2px); }
    to   { opacity: 1; transform: translateY(0); }
}

.mm-photo-wrap{
    width: 170px;              /* под desktop */
    aspect-ratio: 3 / 4;       /* портрет */
    border-radius: 14px;
    overflow: hidden;
    flex: 0 0 auto;
    background: rgba(0,0,0,.04);
}

.mm-photo{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mm-layout{
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    align-items: start;
}

@media (max-width: 768px){
    .mm-layout{
        grid-template-columns: 1fr;
    }
    .mm-photo-wrap{
        width: 170px;
        margin: 0 auto;
    }
}
.mm-main{ min-width: 0; }
.mm-email{ margin-bottom: 10px; }

.mm-bio{
    line-height: 1.55;
    font-size: 1rem;
}

.mm-bio p{ margin: 0 0 .75rem 0; }
.mm-bio p:last-child{ margin-bottom: 0; }

.mm-bio ul, .mm-bio ol{
    margin: 0 0 .9rem 1.2rem;
    padding: 0;
}

.mm-bio li{ margin: .25rem 0; }

.mm-bio h3, .mm-bio h4, .mm-bio h5{
    margin: 1.1rem 0 .5rem;
    font-weight: 700;
}

.mm-bio blockquote{
    margin: .9rem 0;
    padding: .6rem .9rem;
    border-left: 4px solid rgba(0,0,0,.15);
    background: rgba(0,0,0,.03);
    border-radius: 10px;
}

.mm-bio a{ text-decoration: underline; }
.mm-bio a:hover{ text-decoration: none; }

.mm-bio img, .mm-bio video{ max-width: 100%; height: auto; }

@media (min-width: 992px){
    #memberModal .modal-dialog{ max-width: 900px; }
}
/*-------------------- Group. End --------------------*/

/*-------------------- Collaborations. Start --------------------*/
.collab-block {
    padding-left: 1rem;
    border-left: 3px solid rgba(246, 0, 43, 0.35);
}

.collab-list li {
    line-height: 1.4;
}

.collab-list a {
    color: #000;
    font-weight: 600;
    text-decoration: none;
}

.collab-list a:hover {
    color: #F6002B;
}

.collab-mini {
    padding: 0.6rem 0;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.collab-mini:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.collab-note {
    margin-top: 0.15rem;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.35;
}

.collab-line a {
    font-weight: 600;
    text-decoration: none;
    color: #000;
}

.collab-line a:hover {
    color: #F6002B;
}

.collab-mini > a {
    font-weight: 600;
    text-decoration: none;
    color: #000;
}

.collab-mini > a:hover {
    color: #F6002B;
}
/*-------------------- Collaborations. End --------------------*/

/*-------------------- Publications + research. Start --------------------*/
.pubtitle:hover {
    text-decoration: none;
}

.grabs-img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
}

.research-pubs .pub-authors {
    font-weight: 600;
}

.research-pubs .pub-meta {
    color: #666;
    font-size: 0.95rem;
}

.research-block h3 {
    letter-spacing: 0.2px;
}

.research-section {
    scroll-margin-top: 110px;
    border-top: 1px solid rgba(0,0,0,0.10);
}

.research-pubs .pub-authors {
    font-weight: 600;
}

.research-pubs .pub-meta {
    color:#666;
    font-size:0.95rem;
}

.research-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    font-size: 0.95rem;
}

.research-nav a {
    color: #000;
    text-decoration: none;
    font-weight: 600;
    position: relative;
}

.research-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: #F6002B;
    transition: width 0.5s ease;
}

.research-nav a:hover::after {
    width: 100%;
}

.research-nav .sep {
    color: #999;
    user-select: none;
}

.research-fab {
    position: fixed;
    right: 16px;
    bottom: 16px;
    display: grid;
    gap: 10px;
    z-index: 1100;
}

.fab-btn {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(0,0,0,0.12);
    color: #000;
    text-decoration: none;
    display: grid;
    place-items: center;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

.fab-btn:hover {
    color: #F6002B;
    border-color: rgba(246,0,43,0.35);
}

.fab-menu summary {
    list-style: none;
}

.fab-menu summary::-webkit-details-marker {
    display: none;
}

.fab-panel {
    position: absolute;
    right: 0;
    bottom: 54px;
    width: min(320px, calc(100vw - 32px));
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 14px 30px rgba(0,0,0,0.18);
}

.fab-title {
    font-weight: 800;
    margin-bottom: 8px;
}

.fab-panel a {
    display: block;
    padding: 8px 10px;
    border-radius: 10px;
    text-decoration: none;
    color: #000;
    font-weight: 600;
}

.fab-panel a:hover {
    background: rgba(246,0,43,0.08);
    color: #F6002B;
}

.research-fab {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.research-fab.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
}
/*-------------------- Publications + research. End --------------------*/