@import "./styles.css";


:root {
    --h-title-color: #3948d2;
    --site-font-stack: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --bs-body-font-family: var(--site-font-stack);
}

.header {
    border-bottom: solid 2px var(--bs-blue);
    z-index: 10000;
}

.bg-bottom {
    background-color: var(--h-title-color);
}

.top-section {
    position: relative;
    padding: 10rem 0;
    background-position: center;
    background-size: cover;
    height: 25rem;
}

.top-section h2 {
    font-weight: 400;
}

.top-section .top-section-content {
    position: relative;
    z-index: 1;
}

.top-section:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

body,
.navbar,
.navbar-brand {
    font-family: var(--site-font-stack) !important;
}

section header h2 {
    font-family: var(--site-font-stack) !important;
    font-weight: 600;
    color: var(--h-title-color);
    font-size: 2.3rem;
    line-height: 4rem;
}

section .main-body {
    font-size: 1.3rem;
    font-weight: 400;
    line-height: 2.4rem;
    font-family: var(--site-font-stack);
}


.bg-gradient-primary-to-secondary-light {
    background: linear-gradient(45deg, #fcfcfc, #ffffff) !important;
}

.bg-gradient-primary-to-secondary-gray {
    background: linear-gradient(45deg, #f0f0f0, #f1f1f1) !important;
}



.on-top {
    position: relative;
    z-index: 10000;
}

.top-bg {
    background-position: center;
    background-size: fill;
    width: 100%;
    height: 100%;
}

.top-bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}


#avatar {
    position: relative;
    height: 0;
    top:min(-65px,max(-100px,calc(-1*100vw/12)));
    max-width: 55em;
    margin: 0 1.5rem 0 0;
    float: right;
    z-index: 9000;
}

#avatar img {
    height: max(130px,min(200px,calc(100vw/6)));
    box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.2);
}

@media screen and (max-width: 991px) {
    #avatar {
        margin: 0;
    }
}
/* ???????????????????????????? .essay-title ?? */
.essay-title {
    color: #000; /* ???????????????????? */
    text-decoration: none; /* ?????????? */
}

/* ?????????????????????? .essay-btn ?? */
.essay-btn {
    display: inline-block;
    padding: 0.5rem 1rem; /* ?????????????? */
    background-color: var(--h-title-color); /* ??????????????????????? */
    color: #fff; /* ????????? */
    border: none;
    border-radius: 4px; /* ????????? */
    text-decoration: none; /* ???????????? */
    cursor: pointer;
    margin-left: 1rem; /* ????????????? */
    font-size: 1rem; /* ???????????????????? */
}

    /* ??? hover ???????? */
    .essay-btn:hover {
        background-color: #2a38b0; /* ??????????????????? */
        color: #fff; /* ??? hover ??????????? */
    }

/* ???????????????????????????? */
.essay-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem; /* ?????????????????? line-height */
}

.project-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.project-title {
    flex: 1 1 12rem;
    color: #212529;
    font-size: 1rem;
}

.project-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--h-title-color);
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
}

.project-btn:hover {
    background-color: #2a38b0;
    color: #fff;
}

.project-link-placeholder {
    opacity: 0.75;
}

.essay-title {
    font-family: "Microsoft YaHei", sans-serif; /* ??????????????? */
    font-size: 16px; /* ?????????????? */
}

.view-btn {
    font-family: "Microsoft YaHei", sans-serif; /* ??????????????? */
    font-size: 16px; /* ?????????????? */
}

/* ??? Essays ???????? */
.bg-gradient-primary-to-secondary { /* ?????????? Essays ??????????? */
    /* ???? Essays ??????????? */
}

#videos .container {
    padding: 20px 15px; /* ?????????????? */
}

#videos header {
    margin-bottom: 20px; /* ?????????????? */
}

.videos-subtitle {
    font-size: 1.8rem;
    color: var(--h-title-color);
    font-weight: 600;
    margin-bottom: 15px;
}

    .videos-subtitle i {
        margin-right: 10px;
        color: var(--h-title-color);
    }

#videos-md {
    display: flex;
    flex-direction: column;
    gap: 15px; /* ??????????? */
}

.video-item {
    display: flex;
    justify-content: space-between; /* ??????????? */
    align-items: center;
    padding: 15px; /* ????????? */
    background-color: #fff; /* ??????????????? Essays ???? */
    border-radius: 8px; /* ??? */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* ?????????? Essays ???? */
}

.video-title {
    font-size: 1.1rem;
    color: #555; /* ??????? */
    flex-grow: 1; /* ???????????????? */
    margin-right: 15px; /* ????????????? */
}

.video-btn {
    display: inline-block;
    padding: 8px 15px;
    background-color: var(--h-title-color);
    color: #fff !important;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

    .video-btn:hover {
        background-color: #2a38b0;
    }

/* Service (outreach & activities) */
.service-subtitle {
    color: var(--h-title-color);
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: left;
    font-size: 1.75rem;
}

.social-work-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

    .social-work-item:hover {
        background-color: rgba(57, 72, 210, 0.04);
    }

.social-work-title {
    font-size: 1.1rem;
    color: #2c3e50;
    font-weight: 500;
}

.social-work-btn {
    background-color: var(--h-title-color);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s ease;
    border: none;
    cursor: pointer;
}

    .social-work-btn:hover {
        background-color: #2a38b0;
        color: white;
        text-decoration: none;
    }

/* ???????? */
@media (max-width: 768px) {
    .social-work-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .social-work-btn {
        align-self: flex-end;
    }

    .service-subtitle {
        text-align: center;
    }
}

/* Gallery carousel ?? subdued motion */
#gallery .photo-carousel-container {
    overflow: hidden;
    padding: 0 44px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

#gallery .photo-carousel-track {
    display: flex;
    transition: transform 0.45s ease;
    gap: 12px;
}

#gallery .photo-carousel-slide {
    flex: 0 0 calc(100% - 8px);
    min-width: 0;
}

@media (min-width: 577px) {
    #gallery .photo-carousel-slide {
        flex: 0 0 calc(50% - 6px);
    }
}

@media (min-width: 992px) {
    #gallery .photo-carousel-slide {
        flex: 0 0 calc(33.333% - 8px);
    }
}

#gallery .carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.08);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #333;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    z-index: 20;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

#gallery .carousel-btn:hover {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.12);
}

#gallery .carousel-btn-prev {
    left: 0;
}

#gallery .carousel-btn-next {
    right: 0;
}

#gallery .photo-card {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.25s ease;
    background: #fff;
}

#gallery .photo-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

#gallery .photo-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: opacity 0.2s ease;
}

#gallery .photo-card:hover img {
    opacity: 0.96;
}

#gallery .photo-caption {
    padding: 0.65rem 0.75rem;
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

#gallery .photo-caption h5 {
    margin-bottom: 0.25rem;
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.875rem;
}

#gallery .photo-caption p {
    color: #6c757d;
    font-size: 0.78rem;
    margin-bottom: 0;
    line-height: 1.35;
}

#gallery .carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

#gallery .carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(57, 72, 210, 0.25);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

#gallery .carousel-indicator.active {
    background: var(--h-title-color);
    transform: scale(1.15);
}

#gallery .gallery-subtitle {
    color: var(--h-title-color);
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: left;
    font-size: 1.75rem;
}

@media (max-width: 576px) {
    #gallery .photo-carousel-container {
        padding: 0 36px;
    }

    #gallery .carousel-btn {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    #gallery .photo-card img {
        height: 130px;
    }

    #gallery .gallery-subtitle {
        text-align: center;
    }
}

.footer-extras a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
}

.footer-extras a:hover {
    color: #fff;
    text-decoration: underline;
}

/* ===== Person / Institution links ===== */
a.person-link {
    color: #1a5296;
    font-weight: 500;
    text-decoration: none;
}

a.person-link:hover {
    color: #0c3d7a;
    text-decoration: underline;
}

/* All links inside dynamically-loaded markdown sections inherit the blue style */
#home .main-body a,
#awards .main-body a {
    color: #1a5296;
    font-weight: 500;
    text-decoration: none;
}

#home .main-body a:hover,
#awards .main-body a:hover {
    color: #0c3d7a;
    text-decoration: underline;
}

/* ===== Unified section subtitle ===== */
.section-subtitle {
    font-family: var(--site-font-stack) !important;
    font-weight: 600;
    color: var(--h-title-color);
    font-size: 2.3rem;
    line-height: 4rem;
    margin-bottom: 1rem;
}

/* ===== News section ===== */
.news-list {
    display: flex;
    flex-direction: column;
}

.news-item {
    display: flex;
    align-items: flex-start;
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    font-size: 1.15rem;
    line-height: 1.65;
    gap: 0.75rem;
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    flex-shrink: 0;
    min-width: 6.5rem;
    color: #6c757d;
    font-weight: 600;
    font-size: 0.95rem;
    padding-top: 0.15rem;
    font-family: "Courier New", monospace;
}

.news-text {
    flex: 1;
    color: #2c3e50;
}

/* ===== Research section ===== */
.research-note {
    color: #555;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.research-item {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    font-size: 1.1rem;
    line-height: 1.75;
}

.research-item:last-child {
    border-bottom: none;
}

.research-item p {
    margin-bottom: 0;
    color: #2c3e50;
}

.research-item strong {
    font-size: 1.15rem;
    color: #1a1a2e;
}

.research-item em {
    color: #555;
    font-size: 1rem;
}

/* ===== Dark mode overrides ===== */
.dark-mode .news-text,
.dark-mode .research-item p,
.dark-mode .research-item strong {
    color: #dde;
}

.dark-mode .news-date {
    color: #9ab;
}

.dark-mode .news-item,
.dark-mode .research-item {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark-mode a.person-link {
    color: #6ab0f5;
}

.dark-mode a.person-link:hover {
    color: #90c8ff;
}

.dark-mode #home .main-body a,
.dark-mode #awards .main-body a {
    color: #6ab0f5;
}

.dark-mode #home .main-body a:hover,
.dark-mode #awards .main-body a:hover {
    color: #90c8ff;
}

.dark-mode .research-note {
    color: #aab;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}


