:root{
  --bg: #f9f9f9;
  --muted: #6b7280;
  --text: #0f172a;
  --accent: #6C5CE7;
  --card: #ffffff;
  --glass: rgba(16,24,40,0.04);
  --radius: 12px;
  --measure: 90%;
  --sidebar-width: 240px;
  --header-height: 64px;
}

body.dark{
  --bg: #071028;
  --muted: #9aa4b2;
  --text: #e6eef8;
  --accent: #7c6cff;
  --card: rgba(255,255,255,0.03);
  --glass: rgba(255,255,255,0.03);
}

*{
    box-sizing:border-box
}

html {
    scroll-behavior: smooth;
}

body{
    margin:0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background:var(--bg);
    color:var(--text);
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
    line-height:1.85;
    letter-spacing:0.01em;
    font-weight:400;
    height:100%;
}

/* btn-theme =============================== */
.btn-theme{
    background:transparent;
    border:0;
    cursor:pointer;
    padding:8px;
    border-radius:8px;
    width: 30px;
    margin-top: auto;
    margin-bottom: auto;
}

/* sidebar ================================= */
.sidebar {
    position:fixed;
    left:0;
    top:0;
    width:var(--sidebar-width);
    bottom: 0;
    padding: 20px;
    background: var(--bg);
}

.sidebar .profile {
    text-align: center;
    margin-bottom: 25px;
}

.sidebar .avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sidebar .name {
    font-size: 20px;
    font-weight: 700;
    margin: 20px 10px 0;
    align-items: center;
}

.sidebar .bio {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.3;
    margin: 20px 10px 30px;
    text-align: left;
}

.sidebar .links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar .link-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s;
}

.sidebar .link-item:hover{
    color:var(--text);
    background:var(--glass)
}

.sidebar .link-item i {
    width: 24px;
    font-size: 15px;
    margin-right: 15px;
    text-align: center;
    color: var(--muted);
}

.sidebar .btn-theme {display: none;}

.sidebar .link-item .fa-location-dot { color: #0084fd; }

.sidebar .link-item .fa-envelope { color: #fdd90f; }

.sidebar .link-item .fa-weixin { color: #04d86a; }

.sidebar .link-item .fa-linkedin { color: #0077b5; }

.sidebar .link-item .fa-github { color: #666666; }

.sidebar .link-item .fa-graduation-cap { color: #4285f4; }

.sidebar .link-item .fa-orcid { color: #a6ce39; }

.sidebar .banner {
    position: fixed;
    margin: auto;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: #0008;
    display: none;
}

.sidebar .banner-item {
    top: 50%;
    left: 50%;
    position: relative;
    transform: translate(-50%, -50%);
    display: none;
}

@media (max-width:900px){
    .sidebar{
        top:0;
        width:100%;
        display: flex;
        bottom: unset;
    }
    .sidebar .avatar {
        width: 42px;
        height: 42px;
        margin-top: auto;
        margin-bottom: auto;
    }
    .sidebar .profile {
        margin-bottom: 0px;
    }
    .sidebar .name {
        /* display: none; */
        margin-top: auto;
        margin-bottom: auto;
    }
    .sidebar .bio {
        display: none;
    }
    .sidebar .links-list {
        display: flex;
        margin-left: auto;
    }
    .sidebar .link-item {
        margin: auto;
    }
    .sidebar .link-item span {
        display: none;
    }
    .sidebar .btn-theme {
        float: right;
        display: block;
    }
}

@media (max-width:600px){
    .sidebar .name {
        display: none;
    }
}

@media (max-width:420px){
    .sidebar .link-item.key2 {
        display: none;
    }
}

/* siteheader =========================== */
.siteheader{
    backdrop-filter:blur(6px);
    position:fixed;
    top:0;
    left:var(--sidebar-width);
    right:0;
    height:var(--header-height);
    display:flex;
    align-items:center;
    background:var(--bg);
    box-shadow: 6px 0px 6px var(--glass);
}

.siteheader .brand{
    display:flex;
    align-items:center;
    gap:10px;
    text-decoration:none;
    color:inherit
}

.siteheader .nav{
    padding-top:0;
    padding-bottom:0;
    height:100%;
    display: flex;
    margin-right: auto;
    align-items:center;
    justify-content:space-between;
    padding:28px;
    gap:14px
}

.siteheader .nav a{
    color:var(--muted);
    text-decoration:none;
    padding:8px;
    border-radius:8px
}

.siteheader .nav a:hover{
    color:var(--text);
    background:var(--glass)
}

.siteheader .btn-theme {
    float: right;
    display: block;
}

@media (max-width:900px){
    .siteheader{
        display: none;
    }
}

/* main =========================== */
.main {
    min-height: 600px;
    background: var(--bg);
    margin-left:var(--sidebar-width);
    padding-top:calc(var(--header-height) + 20px);
}

.main .section {
    scroll-margin-top: var(--header-height);
}

.main .container{
    max-width:var(--measure);
    margin:0 auto;
    padding:28px
}

.main .section h2{
    margin-top:0;
    font-family: 'Noto Serif SC', Georgia, "Times New Roman", serif;
    font-weight:700;
    font-size:1.6rem;
    color:var(--text);
    margin-bottom:8px;
}

.main .section p{
    color:var(--muted);
}

.main .section a{
    color: #0084fd;
}

@media (max-width:900px){
    .main{
        margin-left:0;
        padding-top:calc(var(--header-height) + 12px)
    }
}

/* main.profile =========================== */
.main .profile{
    display:flex;
    gap:32px;
    align-items:center;
}

.main .profile .info{
    flex:1
}

.main .profile .info .n1{
    color:var(--accent);
}

.main .profile .info .n2{
    color:var(--text);
}

.main .profile .photo{
    background:var(--card);
    padding:18px;
    border-radius:14px;
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:12px;
    width:260px;
}

@media (max-width:500px){
    .main .profile{
        flex-direction:column;
        align-items:flex-start;
    }
    .main .profile .photo{
        width:100%;
    }
}

/* main.cards =========================== */
.main .cards{
    display:flex;
    gap:18px;
    margin-top:18px;
    flex-wrap:wrap;
}

.main .card{
    background:var(--card);
    padding:18px;
    border-radius:12px;
    box-shadow:0 6px 18px rgba(12,14,20,0.03);
}

.main .card.small{
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
}

.main .card.small .icon-card{
    flex-shrink: 0;
    width: 36%;
    height: 100%;
    padding-right: 0.5em;
}

.main .card.small .icon{
    max-width: 100%;
    max-height: 100%;
}

.main .card.small .title{
    display: block;
    font-weight: 600;
    color: var(--text);
    margin: 2px;
}

.main .card.small .author{
    display: block;
    color: var(--muted);
    margin: 2px;
    font-size: 0.8em;
}

.main .card.small .pub{
    display: block;
    color: var(--muted);
    margin: 2px;
    font-size: 0.8em;
}

.main .card.small .link{
    display: block;
    color: var(--muted);
    margin: 2px;
    font-size: 0.8em;
}

/* main.footer =========================== */
.main .footer {
    font-size: 0.8em;
}
