* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #eef6ff;
    --bg-soft: #ffffff;
    --fg: #1b2a41;
    --fg-muted: #5c6f8a;
    --accent: #3a8dff;
    --accent-soft: rgba(58, 141, 255, 0.15);
    --border: rgba(0, 0, 0, 0.08);
    --font-sans: system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-serif-zh: "Noto Serif SC", serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(180deg, rgba(232, 242, 255, 0.62) 0%, rgba(245, 249, 255, 0.6) 40%, rgba(255, 255, 255, 0.75) 80%);
    color: var(--fg);
    font-family: var(--font-sans);
    line-height: 1.6;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
}

/* --- Layout: Sidebar + Main Content --- */
.layout {
    display: flex;
    gap: 40px;
    max-width: 1100px;
    width: fit-content;   /* <— THIS is the key */
    margin: 0 auto;       /* center the whole block */
}


/* --- Left Sidebar Avatar --- */
.sidebar {
    width: 160px;
    flex-shrink: 0;
    display: flex;
    justify-content: flex-start;
}

.avatar {
    width: 160px;
    height: 160px;
    border-radius: 12px; /* adjust to taste */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-image: url("../assets/picture.jpg");

    border: none;

    /* glow */
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.35);
}



/* --- Main Content Column --- */
.content {
    flex: 1;
    max-width: 650px;
    min-width: 500px;   /* keeps it visually centered */
}


header {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 32px;
}

.name {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.subnames {
    margin-top: 6px;
    font-size: 0.95rem;
    color: var(--fg-muted);
    display: flex;
    gap: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.zh {
    font-family: var(--font-serif-zh);
    letter-spacing: 0.05em;
    font-size: 1.05rem;
}

.tagline {
    margin-top: 18px;
    font-size: 1.1rem;
    color: var(--fg-muted);
    max-width: 600px;
}

.highlight {
    color: var(--accent);
    font-weight: 600;
}

.role {
    margin-top: 10px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--fg-muted);
}

section {
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
}

.intro {
    font-size: 1rem;
    max-width: 800px;
    color: var(--fg-muted);
}

/* --- Links --- */
.links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.link-btn {
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, var(--bg-soft), #f0f6ff);
    color: var(--fg);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s ease;
    position: relative;
    overflow: hidden;
}

.link-btn:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(58, 141, 255, 0.25);
}

.link-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, var(--accent-soft), transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.link-btn:hover::before {
    opacity: 1;
}

/* --- Meta Info --- */
.meta-row {
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.meta-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--fg);
}

.meta-value {
    color: var(--fg-muted);
    flex: 1;
}

footer {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--fg-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
}

.bg-card {
    padding: 18px 22px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--bg-soft), #f3f7ff);
    border: 1px solid var(--border);
    box-shadow: 0 4px 5px rgba(58, 141, 255, 0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.2s ease;
    margin-top: 12px;
}

.bg-card:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(58, 141, 255, 0.18);
    transform: translateY(-2px);
}

.exp-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.exp-role {
    font-size: 1rem;
    font-weight: 600;
    color: var(--fg);
}

.exp-time {
    font-size: 0.85rem;
    color: var(--fg-muted);
}

.exp-place {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--accent);
    text-align: right;
}


.pad-collapse {
    padding-top: 1px;
    padding-bottom: 30px;
}

.exp-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.triangle {
    transition: transform 0.25s ease;
    display: inline-block;
}

.exp-toggle[aria-expanded="true"] .triangle {
    transform: rotate(90deg);
}

.link-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, var(--bg-soft), #f0f6ff);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s ease;
}

.link-icon img {
    width: 18px;
    height: 18px;
    opacity: 0.85;
}

.link-icon:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(58, 141, 255, 0.25);
}

.link-icon:hover img {
    opacity: 1;
}


@media (max-width: 1000px) {

    .bg-card {
        flex-direction: column;     /* stack vertically */
        align-items: flex-start;    /* align everything to the left */
        gap: 6px;                   /* small spacing between lines */
        text-align: left;           /* ensure no centering */
    }

    /* --- Global adjustments --- */
    body {
        padding: 20px 12px;
        line-height: 1.5;
    }

    /* --- Layout --- */
    .layout {
        flex-direction: column;
        align-items: center;
        width: 100% !important;
        max-width: 100% !important;
        gap: 28px;
    }

    /* --- Sidebar / Avatar --- */
    .sidebar {
        width: 100% !important;
        display: flex;
        justify-content: center;
    }

    .avatar {
        width: 120px;
        height: 120px;
        border-radius: 10px;
    }

    /* --- Content --- */
    .content {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding: 0 10px;
    }

    /* --- Header --- */
    header {
        text-align: center;
        margin-bottom: 24px;
        padding-bottom: 20px;
    }

    .name {
        font-size: 2.2rem;
        letter-spacing: 0.03em;
    }



    .intro {
        font-size: 0.9rem;
        margin-top: 12px;
    }

    /* --- Links --- */
    .links {
        justify-content: center;
        gap: 10px;
    }

    .link-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    /* --- Section spacing --- */
    section {
        padding: 20px 0;
    }



    .exp-role {
        font-size: 0.95rem;
    }

    .exp-time {
        font-size: 0.75rem;
    }

    /* --- BG Cards (Education, Skills, etc.) --- */
    .bg-card {
        font-size: 0.75rem;
        padding: 12px 14px;
        border-radius: 10px;
        margin-top: 10px;
    }

    .bg-card p,
    .bg-card div,
    .bg-card span {
        font-size: 0.75rem;
    }

    /* --- Collapse toggle --- */
    .exp-toggle {
        font-size: 0.75rem;
        letter-spacing: 0.12em;
    }

    .triangle {
        transform: scale(0.9);
    }

    /* --- Footer --- */
    footer {
        font-size: 0.7rem;
        text-align: center;
        justify-content: center;
        gap: 6px 12px;
    }

    .link-icon {
        width: 30px;
        height: 30px;
    }

    .link-icon img {
        width: 16px;
        height: 16px;
    }
}


