@import "./styles.css";

:root{
    --h-title-color:#46544C;      /* 墨绿灰标题 */
    --accent-color:#7A5A3A;       /* 棕色强调 */
    --bg-main:#FBF7ED;            /* 主背景宣纸色 */
}

/* 主背景 */
body{
    background-color: var(--bg-main);
    color:#2B2B2B;
}

/* Header */
.header {
    border-bottom: solid 2px var(--h-title-color);
    background-color: var(--bg-main);
    z-index: 10000;
}

/* 底部或色块 */
.bg-bottom {
    background-color: var(--h-title-color);
    color:#F6ECD6;
}

/* 顶部图片区域 */
.top-section {
    position: relative;
    padding: 10rem 0;
    background-position: center;
    background-size: cover;
    height: 25rem;
}

/* 不加暗层 */
.top-section:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    pointer-events: none;
}

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

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

/* 正文 */
section .main-body{
    font-size: 1.3rem;
    font-weight: 300;
    line-height: 2.4rem;
}

/* 链接 */
a{
    color: var(--h-title-color);
    text-decoration: none;
}

a:hover{
    color: var(--accent-color);
}

/* 提高优先级，覆盖 #mainNav 的样式 */
body #mainNav {
    background-color: #EEDDB8 !important;  /* 宣纸色背景 */
}

body #mainNav .navbar-brand {
    color: var(--h-title-color) !important;       /* 品牌文字墨绿灰 */
}

body #mainNav .navbar-brand:hover,
body #mainNav .navbar-brand:active {
    color: var(--accent-color) !important;        /* 悬停/点击时棕色 */
}

body #mainNav .navbar-nav .nav-item .nav-link {
    color: var(--h-title-color) !important;       /* 导航文字墨绿灰 */
    font-weight: 600;                              /* 保留原有字重 */
}

body #mainNav .navbar-nav .nav-item .nav-link:hover {
    color: var(--accent-color) !important;        /* 悬停棕色 */
}

body #mainNav .navbar-nav .nav-item .nav-link.active {
    color: var(--h-title-color) !important;       /* 激活状态墨绿灰（可根据需要调整） */
    border-bottom: 2px solid var(--accent-color) !important; /* 激活下划线棕色 */
}

/* 可选：调整 toggler 按钮颜色（如果需要） */
body #mainNav .navbar-toggler {
    color: var(--h-title-color) !important;
    border-color: rgba(0,0,0,0.1) !important;    /* 可自定义 */
}


/* 柔和渐变块 */
.bg-gradient-primary-to-secondary-light {
    background: linear-gradient(45deg, #F6ECD6, #FAF3E4) !important;
}

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

/* 顶部背景 */
.top-bg {
    background-position: center;
    background-size: cover;
    width: 100%;
    height: 100%;
}

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

/* 头像 */
#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 10px rgba(0, 0, 0, 0.15);
}

@media screen and (max-width: 991px) {
    #avatar {
        margin: 0;
    }
}


/* 自定义logo样式 */
.navbar-logo {
    width: 2rem;           /* 默认宽度 */
    height: auto;           /* 保持比例 */
    max-width: 100%;        /* 防止溢出 */
    transition: width 0.2s ease; /* 可选：平滑过渡 */
}

/* 响应式调整 */
@media (max-width: 991px) {
    .navbar-logo {
        width: 1.5rem;
    }
}
