/* 变量定义 */
:root {
    --h-title-color: #1b3431;
}

/* 全局样式 */
html {
    height: 100%;
    display: flex;
    flex-direction: column;
    scroll-padding-top: 4.5rem;
}

body {
    opacity: 0.2;
    transition: opacity 0.8s ease-in-out;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 布局样式 */
.container {
    width: 100%;
    max-width: 1020px;
}

.content {
    flex: 1;
}

section {
    padding-top: 6rem;
}

/* 导航栏样式 */
#mainNav {
    padding-top: 1rem;
    padding-bottom: 1rem;
    background-color: #fff;
}

#mainNav .navbar-brand {
    color: rgb(62, 65, 70);
    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";
}

#mainNav .navbar-brand:hover,
#mainNav .navbar-brand:active {
    color: #031110;
}

#mainNav .navbar-toggler {
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    color: rgb(62, 65, 70);
}

#mainNav .navbar-nav .nav-item .nav-link {
    font-weight: 600;
    color: rgb(62, 65, 70);
    border: none;
    font-size: 16px;
    outline: none;
    transition: color 0.3s;
}

#mainNav .navbar-nav .nav-item .nav-link:hover {
    color: #031110;
}

#mainNav .navbar-nav .nav-item .nav-link.active {
    color: #031110;
}

/* 头部样式 */
.header {
    border-bottom: solid 2px var(--h-title-color);
    z-index: 10000;
}

/* 内容区域样式 */
section .main-body {
    font-size: 1.3rem;
    font-weight: 300;
    line-height: 2.4rem;
}

/* 组件 */
#home-subtitle {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

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

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

.user-photo {
    display: flex;
    align-items: right;
    justify-content: right;
    position: relative;
}

/* 页脚样式 */
footer a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
}

footer a:hover,
footer a:active,
footer a:focus {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: underline;
}

/* 工具类样式 */
.loaded {
    opacity: 1;
}

.app-badge {
    height: 3rem;
}

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

.bg-black {
    background-color: #000 !important;
}

.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;
}

.font-alt {
    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;
}

.text-gradient {
    background: -webkit-linear-gradient(#2937f0, #9f1ae2);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

pre {
    background-color: #f2f3f3;
    padding: 10px;
    border-radius: 4px;
}

/* 响应式样式 */
@media screen and (max-width: 991px) {
    #avatar {
        margin: 0;
    }
}
