* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: #222222;
    background: white;
    font-family:
        "Helvetica Neue",
        "Segoe UI",
        Arial,
        "Microsoft YaHei",
        sans-serif;
    line-height: 1.7;
}

a {
    color: #23689b;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}


/* COMPLETE PAGE LAYOUT */

.layout {
    display: flex;
    max-width: 1200px;
    min-height: 100vh;
    margin: 0 auto;
}


/* LEFT PROFILE PANEL */

.sidebar {
    width: 360px;
    flex-shrink: 0;
    min-height: 100vh;
    padding: 55px 35px;
    background: #fbfcfd;
    border-right: 1px solid #e8ecef;
}

.profile-photo {
    display: block;
    width: 170px;
    height: 170px;
    margin: 0 auto 25px;
    border-radius: 50%;
    object-fit: cover;
    background: #e4e9ed;
    object-position: center 10%
}

.sidebar h1 {
    margin: 0;
    font-size: 28px;
    text-align: center;
}

.position {
    margin: 7px 0 20px;
    color: #68737d;
    font-size: 15px;
    text-align: center;
}

.university {
    width: 100%;
    margin-bottom: 28px;
    white-space: nowrap;
    text-align: center;
}

.contact-details {
    padding-top: 10px;
    font-size: 14px;
    border-top: 1px solid #dde2e6;
}

.contact-details p {
    margin: 16px 0;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 15px;
    margin-top: 25px;
    font-size: 14px;
}


/* RIGHT CONTENT */

.content {
    width: 780px;
    padding: 40px 60px;
}

.navigation {
    display: flex;
    gap: 7px;
    margin-bottom: 50px;
    padding-bottom: 13px;
    border-bottom: 1px solid #dfe3e6;
}

.nav-button {
    padding: 8px 13px;
    color: #59636c;
    background: transparent;
    border: none;
    border-radius: 5px;

    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

.nav-button:hover {
    color: #642278;
    background: #f4eef6;
}

.nav-button.active {
    color: white;
    background: #642278;
}

.page-section {
    display: none;
    animation: appear 0.25s ease;
}

.page-section.active-section {
    display: block;
}

.page-section h2 {
    margin: 0 0 25px;
    padding-bottom: 10px;
    font-size: 31px;
    border-bottom: 2px solid #315f7d;
}

.page-section h3 {
    margin-top: 35px;
    font-size: 21px;
}

.page-section p {
    margin: 0 0 18px;
}

.page-section li {
    margin-bottom: 7px;
}

.entry {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

.entry-date {
    color: #71808c;
    font-size: 14px;
}

.entry h3 {
    margin: 0;
}

.entry p {
    margin-top: 5px;
}

.empty-message {
    color: #71808c;
    font-style: italic;
}

footer {
    margin-top: 70px;
    padding-top: 20px;
    color: #86919a;
    font-size: 13px;
    border-top: 1px solid #e1e5e8;
}

@keyframes appear {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* PHONE AND TABLET LAYOUT */

@media (max-width: 800px) {
    .layout {
        display: block;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
        padding: 40px 25px;
        border-right: none;
        border-bottom: 1px solid #e1e5e8;
    }

    .content {
        width: 100%;
        padding: 30px 22px;
    }

    .navigation {
        overflow-x: auto;
        margin-bottom: 35px;
    }

    .nav-button {
        flex-shrink: 0;
    }

    .entry {
        display: block;
    }

    .entry-date {
        margin-bottom: 5px;
    }

}
/* CUHK-STYLE PROFILE CARD */

.sidebar {
    width: 360px;
    min-height: calc(100vh - 40px);
    margin: 20px 0;
    padding: 45px 35px;
    color: white;
    background: linear-gradient(
        160deg,
        #4b176d 0%,
        #71277d 55%,
        #3e145d 100%
    );
    border: none;
    border-radius: 24px;
    box-shadow: 0 12px 30px rgba(55, 20, 75, 0.22);
}

.profile-photo {
    width: 180px;
    height: 180px;
    border: 4px solid #d6b35a;
    background: white;
}

.sidebar h1 {
    color: white;
}

.position {
    color: #f0dfad;
}

.university {
    color: white;
}

.sidebar a {
    color: #f5d77d;
}

.sidebar a:hover {
    color: white;
}

.contact-details {
    margin-top: 28px;
    padding-top: 25px;
    border-top: 3px dotted rgba(255, 255, 255, 0.8);
}

.contact-details p {
    margin: 0;
    padding: 20px 0;
    border-bottom: 3px dotted rgba(255, 255, 255, 0.8);
}

.social-links {
    margin-top: 25px;
}

.social-links a {
    padding: 7px 12px;
    color: #4b176d;
    background: #f0d17a;
    border-radius: 20px;
    font-weight: 600;
}

.social-links a:hover {
    color: #4b176d;
    background: white;
    text-decoration: none;
}
.institution {
    margin: 5px 0 14px;
    color: #6f6474;
    font-weight: 600;
}

.experience-points {
    margin: 0;
    padding-left: 20px;
}

.experience-points li {
    margin-bottom: 9px;
}

.subsection-heading {
    margin-top: 55px !important;
}
/* RESEARCH AND WORK EXPERIENCE */

.entry {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 30px;
    margin-bottom: 45px;
}

/* Move the main information to the left */

.entry > div:last-child {
    grid-column: 1;
    grid-row: 1;
}

/* Move the date to the right */

.entry-date {
    grid-column: 2;
    grid-row: 1;

    padding-top: 5px;
    color: #77717b;
    font-size: 14px;
    white-space: nowrap;
    text-align: right;
}

/* PROJECT OR POSITION TITLE */

.entry h3 {
    margin: 0 0 7px;
    font-size: 18px;

    color: #2d2830;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 600;
    line-height: 1.45;
}

/* UNIVERSITY OR COMPANY */

.institution {
    margin: 0 0 16px;

    color: #0000cd;
    font-size: 15px;
    font-weight: 600;
}
.company {
    color: #222222;
}