@import "./styles.css";


:root{
    --h-title-color:#3948d2;
}

.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;
    height: 25rem;
    background: linear-gradient(120deg, #001a33, #004080) !important; /* 深蓝 → 亮蓝 渐变 */
    background-position: center;
    background-size: cover;
    color: #fff;  /* 保证标题白色清晰 */
}

.top-section h2 {
    font-weight: 400;
    color: #fff;  /* 白色标题文字 */
}

.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.25); /* 想更暗改成 0.35～0.5 */
}


section header h2{
    font-family: "Kanit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;
    color: var(--h-title-color);
    font-size: 2.3rem;
    line-height: 4rem;
}

section .main-body{
    font-size: 1.3rem;
    font-weight: 200;
    line-height: 2.4rem;
}


.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: -230px;              /* 原来 top 是动态的，这里直接固定稍微上移一点 */
    right: 120px;            /* 往右移 40px，可按需要微调：20–60 都行 */
    max-width: 55em;
    margin: 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;
    }
}

/* global font scaling */
html {
    font-size: 14px;
}

/* widen the main content blocks on desktop */
@media (min-width: 992px) {
    /* 让每个 section 里的内容块更宽 */
    .container.px-5 {
        max-width: 1400px;   /* 默认大概 1140/1320，我们放大一点 */
        padding-left: 2rem;  /* 原来 px-5 是左右3rem，这里收一点 */
        padding-right: 2rem;
    }

    /* 正文文字容器也放宽，不要小列 */
    .main-body {
        max-width: 1400px;
    }
}
/* force publications text to justify on both sides */
#publications-md {
    color: #000;
    text-align: justify;
    text-justify: inter-word;
}

#publications-md p {
    margin-bottom: 1rem;
    text-align: justify;
    text-justify: inter-word;
    line-height: 1.4;
}



/* Publications section — larger and clearer */
#publications-md {
    font-size: 1.25rem;       /* 原来 1rem → 稍微放大一点 */
    line-height: 1.65;        /* 行距略放宽，文字更通透 */
    color: #000;
    text-align: justify;
    text-justify: inter-word;
    max-width: 1300px;        /* 避免文字行太长 */
    margin: 0 auto;           /* 保持居中对齐 */
}

#publications-md p {
    font-size: 1.1rem;
    line-height: 1.65;
    margin-bottom: 1rem;
    text-align: justify;
    text-justify: inter-word;
}

#publications-md h2 {
    font-size: 1.7rem;        /* 小标题一起放大一点 */
    line-height: 1.45;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

/* ===== 减小 section 间距，使各模块衔接更紧凑 ===== */
section {
    margin-top: 1.5rem !important;    /* 原来可能是 5rem 左右，现在缩小 */
    margin-bottom: 1.5rem !important;
}

/* 如果使用了自定义类 mt5 / md5，可以同时覆盖它们 */
.mt5,
.md5 {
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}
/* ===== 紧凑化模块间距（强力版） ===== */
#home, #news, #publications {
  margin-top: .75rem !important;
  margin-bottom: .75rem !important;
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}

/* 渐变背景这些块若自带大 padding，一并压小 */
.bg-gradient-primary-to-secondary-light,
.bg-gradient-primary-to-secondary-gray {
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}

/* 头部标题本身的行高/外边距往下调，避免占太多竖向空间 */
section header { margin: 0 !important; padding: 0 !important; }
section header h2 {
  margin: 0 0 .75rem 0 !important;
  line-height: 1.25 !important;   /* 之前 4rem 太高了 */
}

/* 正文容器别额外加外边距 */
section .main-body { margin: 0 !important; }

/* === NEWS section text smaller === */
#news-md {
    font-size: 1.2rem !important;   /* 你想多小改这里 */
    line-height: 1.55 !important;
}

#news-md li {
    font-size: 1.2rem !important;
    line-height: 1.55 !important;
}
