/* ============================================
   CUHK Personal Homepage - Dr. CAO Mingde
   Color Palette: CUHK Purple (#52004f) & Gold (#b78e42)
   ============================================ */

/* ---- CSS Variables ---- */
:root {
    --cuhk-purple: #52004f;
    --cuhk-purple-light: #7a0075;
    --cuhk-purple-dark: #380035;
    --cuhk-gold: #b78e42;
    --cuhk-gold-light: #d4aa60;
    --cuhk-gold-dark: #8a6a2e;
    --white: #ffffff;
    --off-white: #f8f6f3;
    --light-gray: #f0eeeb;
    --gray: #888888;
    --dark-gray: #444444;
    --text-primary: #1a1a2e;
    --text-secondary: #555555;
    --shadow-sm: 0 2px 8px rgba(82, 0, 79, 0.08);
    --shadow-md: 0 6px 24px rgba(82, 0, 79, 0.12);
    --shadow-lg: 0 12px 48px rgba(82, 0, 79, 0.16);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s ease;
    --font-heading: 'Merriweather', Georgia, serif;
    --font-body: 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background-color: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    color: var(--cuhk-purple);
    text-decoration: none;
    transition: var(--transition);
}
a:hover { color: var(--cuhk-gold); }

ul { list-style: none; }

img { max-width: 100%; height: auto; }

/* ---- Utility ---- */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    text-decoration: none;
}
.btn-primary {
    background: var(--cuhk-gold);
    color: var(--white);
    border-color: var(--cuhk-gold);
}
.btn-primary:hover {
    background: var(--cuhk-gold-dark);
    border-color: var(--cuhk-gold-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(183, 142, 66, 0.4);
}
.btn-secondary {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.6);
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.15);
    border-color: var(--white);
    color: var(--white);
    transform: translateY(-2px);
}
.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: var(--cuhk-gold);
}
.btn-outline:hover {
    background: var(--cuhk-gold);
    color: var(--white);
    transform: translateY(-2px);
}
.btn-sm {
    padding: 8px 20px;
    font-size: 0.85rem;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0;
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.3s ease;
}
.navbar.scrolled {
    background: var(--cuhk-purple-dark);
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    padding: 0;
}

.nav-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cuhk-logo-nav {
    height: 36px;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}
.nav-name {
    font-family: var(--font-heading);
    color: var(--white);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-link {
    color: rgba(255,255,255,0.85);
    font-size: 0.88rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    letter-spacing: 0.03em;
}
.nav-link:hover,
.nav-link.active {
    color: var(--cuhk-gold-light);
    background: rgba(255,255,255,0.08);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 8px;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(135deg, var(--cuhk-purple-dark) 0%, var(--cuhk-purple) 50%, #7a0075 100%);
}
.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(ellipse at 20% 80%, rgba(183,142,66,0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(183,142,66,0.10) 0%, transparent 50%);
}
.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M0 0h40v40H0V0zm40 40h40v40H40V40zm0-40h2l-2 2V0zm0 4l4-4h2l-6 6V4zm0 4l8-8h2L40 10V8zm0 4L52 0h2L40 14v-2zm0 4L56 0h2L40 18v-2zm0 4L60 0h2L40 22v-2zm0 4L64 0h2L40 26v-2zm0 4L68 0h2L40 30v-2zm0 4L72 0h2L40 34v-2zm0 4L76 0h2L40 38v-2zm0 4L80 0v2L42 40h-2zm4 0L80 4v2L46 40h-2zm4 0L80 8v2L50 40h-2zm4 0L80 12v2L54 40h-2zm4 0L80 16v2L58 40h-2zm4 0L80 20v2L62 40h-2zm4 0L80 24v2L66 40h-2zm4 0L80 28v2L70 40h-2zm4 0L80 32v2L74 40h-2zm4 0L80 36v2L78 40h-2zm4 0L80 40v-2h-2z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(82,0,79,0.4) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 120px 24px 80px;
    max-width: 800px;
}

.hero-badge {
    display: inline-block;
    background: rgba(183,142,66,0.2);
    border: 1px solid rgba(183,142,66,0.5);
    color: var(--cuhk-gold-light);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
}

.hero-name {
    font-family: var(--font-heading);
    color: var(--white);
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin-bottom: 4px;
}
.hero-name-cn {
    font-family: var(--font-heading);
    color: var(--cuhk-gold-light);
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 300;
    letter-spacing: 0.15em;
    margin-bottom: 20px;
}

.hero-tagline {
    color: rgba(255,255,255,0.82);
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    font-weight: 400;
    margin-bottom: 28px;
    line-height: 1.6;
}

.hero-affiliation {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    margin-bottom: 40px;
}
.hero-affiliation i {
    color: var(--cuhk-gold);
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}

.hero-scroll {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}
.hero-scroll a {
    color: rgba(255,255,255,0.5);
    font-size: 1.2rem;
    animation: bounce 2s infinite;
    display: block;
    padding: 8px;
}
.hero-scroll a:hover { color: var(--cuhk-gold); }

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* ============================================
   SECTIONS - General
   ============================================ */
.section {
    padding: 96px 0;
}
.section-alt {
    background: var(--off-white);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    color: var(--cuhk-purple);
    font-weight: 700;
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
}

.section-line {
    width: 64px;
    height: 4px;
    background: linear-gradient(90deg, var(--cuhk-purple), var(--cuhk-gold));
    margin: 0 auto 20px;
    border-radius: 4px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.7;
}

.subsection-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--cuhk-purple);
    font-weight: 700;
    margin-bottom: 28px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--light-gray);
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 60px;
    align-items: start;
}

.profile-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border: 1px solid rgba(82,0,79,0.08);
    position: sticky;
    top: 90px;
}

.profile-avatar {
    background: linear-gradient(135deg, var(--cuhk-purple), var(--cuhk-purple-light));
    padding: 32px 20px 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.profile-avatar::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0; right: 0;
    height: 22px;
    background: var(--white);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.profile-photo {
    width: 148px;
    height: 148px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 4px solid var(--cuhk-gold);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    display: block;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    background: var(--white);
}
.avatar-placeholder {
    width: 110px;
    height: 110px;
    background: rgba(255,255,255,0.15);
    border: 3px solid var(--cuhk-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: var(--white);
    font-size: 3rem;
    position: relative;
    z-index: 1;
}

.profile-info {
    padding: 24px 20px;
    text-align: center;
}
.profile-info h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--cuhk-purple);
    font-weight: 700;
    margin-bottom: 6px;
}
.profile-title {
    color: var(--cuhk-gold-dark);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}
.profile-dept, .profile-inst {
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.5;
}
.profile-inst {
    font-weight: 600;
    color: var(--cuhk-purple);
    margin-bottom: 16px;
}

.profile-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--light-gray);
}
.profile-link {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cuhk-purple);
    font-size: 0.9rem;
    transition: var(--transition);
}
.profile-link:hover {
    background: var(--cuhk-purple);
    color: var(--white);
    transform: translateY(-2px);
}

.about-text-col {}
.about-lead {
    font-size: 1.1rem;
    color: var(--text-primary);
    line-height: 1.8;
    margin-bottom: 20px;
    font-weight: 400;
}
.about-body {
    font-size: 0.97rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 18px;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 36px;
    padding-top: 32px;
    border-top: 2px solid var(--light-gray);
}
.stat-item {
    text-align: center;
    padding: 20px 12px;
    background: var(--off-white);
    border-radius: var(--radius-md);
    border: 1px solid rgba(82,0,79,0.06);
    transition: var(--transition);
}
.stat-item:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(82,0,79,0.15);
    transform: translateY(-3px);
}
.stat-num {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--cuhk-purple);
    font-family: var(--font-heading);
    line-height: 1;
    margin-bottom: 6px;
}
.stat-label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ============================================
   EDUCATION / TIMELINE
   ============================================ */
.timeline {
    position: relative;
    padding-left: 60px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 12px;
    bottom: 12px;
    width: 2px;
    background: linear-gradient(to bottom, var(--cuhk-purple), var(--cuhk-gold));
    opacity: 0.3;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    animation: fadeInUp 0.5s ease both;
}

.timeline-marker {
    position: absolute;
    left: -48px;
    top: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--cuhk-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(82,0,79,0.3);
    z-index: 1;
}
.timeline-item.current .timeline-marker {
    background: linear-gradient(135deg, var(--cuhk-purple), var(--cuhk-gold));
    box-shadow: 0 4px 16px rgba(183,142,66,0.4);
}

.timeline-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 28px 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(82,0,79,0.08);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.timeline-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--cuhk-purple);
    opacity: 0.3;
    border-radius: 4px 0 0 4px;
}
.timeline-item.current .timeline-card::before {
    background: linear-gradient(to bottom, var(--cuhk-purple), var(--cuhk-gold));
    opacity: 1;
}
.timeline-card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(82,0,79,0.16);
    transform: translateX(4px);
}

.timeline-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}
.current-badge { background: linear-gradient(90deg, var(--cuhk-purple), var(--cuhk-gold)); color: white; }
.phd-badge { background: rgba(82,0,79,0.12); color: var(--cuhk-purple); }
.master-badge { background: rgba(183,142,66,0.15); color: var(--cuhk-gold-dark); }
.bachelor-badge { background: rgba(82,0,79,0.06); color: var(--cuhk-purple); }

.timeline-year {
    font-size: 0.82rem;
    color: var(--cuhk-gold-dark);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}
.timeline-degree {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--cuhk-purple);
    font-weight: 700;
    margin-bottom: 4px;
}
.timeline-field {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 4px;
}
.timeline-inst {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.inst-logo {
    height: 20px;
    filter: none;
}
.timeline-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* ============================================
   RESEARCH SECTION
   ============================================ */
.research-interests { margin-bottom: 60px; }

.interests-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.interest-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 28px 24px;
    border: 1px solid rgba(82,0,79,0.08);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
}
.interest-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--cuhk-purple);
    transform: translateY(-4px);
}
.interest-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(82,0,79,0.08), rgba(183,142,66,0.12));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.5rem;
    color: var(--cuhk-purple);
    transition: var(--transition);
}
.interest-card:hover .interest-icon {
    background: linear-gradient(135deg, var(--cuhk-purple), var(--cuhk-purple-light));
    color: var(--white);
}
.interest-card h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--cuhk-purple);
    margin-bottom: 10px;
    font-weight: 700;
}
.interest-card p {
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* Research Methods */
.research-methods { margin-bottom: 60px; }
.methods-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.method-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--white);
    border: 1px solid rgba(82,0,79,0.2);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--cuhk-purple);
    font-weight: 500;
    transition: var(--transition);
}
.method-tag:hover {
    background: var(--cuhk-purple);
    color: var(--white);
    border-color: var(--cuhk-purple);
}
.method-tag i { color: var(--cuhk-gold); font-size: 0.75rem; }
.method-tag:hover i { color: var(--cuhk-gold-light); }

/* Grants */
.grants-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.grant-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 28px;
    border: 1px solid rgba(82,0,79,0.1);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-left: 4px solid var(--cuhk-gold);
}
.grant-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}
.grant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.grant-source {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    background: rgba(82,0,79,0.08);
    color: var(--cuhk-purple);
    padding: 4px 10px;
    border-radius: 50px;
}
.grant-year {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--cuhk-gold-dark);
}
.grant-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 16px;
}
.grant-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid var(--light-gray);
}
.grant-role {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.grant-role i { color: var(--cuhk-purple); }
.grant-amount {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--cuhk-gold-dark);
}

/* ============================================
   PUBLICATIONS SECTION
   ============================================ */
.pub-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 40px;
}
.filter-btn {
    padding: 8px 22px;
    border-radius: 50px;
    border: 2px solid rgba(82,0,79,0.2);
    background: transparent;
    color: var(--cuhk-purple);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-body);
}
.filter-btn:hover,
.filter-btn.active {
    background: var(--cuhk-purple);
    color: var(--white);
    border-color: var(--cuhk-purple);
}

.publications-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.pub-item {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 0;
    padding: 24px 0;
    border-bottom: 1px solid var(--light-gray);
    transition: var(--transition);
    animation: fadeIn 0.3s ease both;
}
.pub-item:first-child { border-top: 1px solid var(--light-gray); }
.pub-item:hover { background: rgba(82,0,79,0.02); }
.pub-item.hidden { display: none; }

.pub-year, .pub-year-col {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--cuhk-gold-dark);
    padding-top: 2px;
    text-align: center;
    min-width: 54px;
}
.pub-content { padding: 0 24px 0 0; }
.pub-title {
    font-size: 0.96rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 4px;
}
.pub-authors {
    font-size: 0.84rem;
    color: var(--text-secondary);
    margin-bottom: 3px;
}
.pub-journal {
    font-size: 0.84rem;
    color: var(--cuhk-purple);
    margin-bottom: 8px;
}
.pub-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.pub-tag {
    padding: 2px 10px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.ptoa-tag  { background: rgba(82,0,79,0.1);     color: var(--cuhk-purple); }
.oa-tag    { background: rgba(82,0,79,0.1);     color: var(--cuhk-purple); }
.acl-tag   { background: rgba(183,142,66,0.15); color: var(--cuhk-gold-dark); }
.mito-tag  { background: rgba(183,142,66,0.15); color: var(--cuhk-gold-dark); }
.clinical-tag { background: rgba(22,112,187,0.1); color: #1670bb; }
.review-tag { background: rgba(0,128,96,0.1);   color: #008060; }
.other-tag { background: rgba(100,100,100,0.1); color: #666; }

.pub-note {
    text-align: center;
    margin-top: 32px;
    padding: 16px 24px;
    background: rgba(82,0,79,0.04);
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    color: var(--text-secondary);
}
.pub-note a { color: var(--cuhk-purple); font-weight: 600; }
.pub-note a:hover { color: var(--cuhk-gold-dark); }
.pub-note i { color: var(--cuhk-gold); margin-right: 6px; }

/* ============================================
   AWARDS SECTION
   ============================================ */
.awards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.award-card {
    display: flex;
    gap: 20px;
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 28px;
    border: 1px solid rgba(82,0,79,0.08);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.award-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: rgba(182,142,66,0.3);
}
.award-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cuhk-purple), var(--cuhk-purple-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cuhk-gold-light);
    font-size: 1.2rem;
}
.award-year {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--cuhk-gold-dark);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 6px;
}
.award-card h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--cuhk-purple);
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
}
.award-card p {
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.contact-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.contact-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cuhk-purple), var(--cuhk-purple-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cuhk-gold-light);
    font-size: 1rem;
}
.contact-detail h4 {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--cuhk-purple);
    margin-bottom: 4px;
}
.contact-detail p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}
.contact-detail a {
    color: var(--cuhk-purple);
    font-weight: 500;
}
.contact-detail a:hover { color: var(--cuhk-gold-dark); }

.academic-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}
.academic-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--cuhk-purple);
    font-weight: 500;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    background: rgba(82,0,79,0.05);
    transition: var(--transition);
    width: fit-content;
}
.academic-link:hover {
    background: var(--cuhk-purple);
    color: var(--white);
}
.academic-link i { font-size: 0.9rem; }

.map-placeholder {
    background: linear-gradient(135deg, var(--cuhk-purple-dark), var(--cuhk-purple));
    border-radius: var(--radius-lg);
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.map-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(183,142,66,0.15) 0%, transparent 70%);
}
.map-content {
    text-align: center;
    color: var(--white);
    z-index: 1;
    padding: 24px;
}
.map-content i {
    font-size: 3rem;
    color: var(--cuhk-gold);
    margin-bottom: 16px;
    display: block;
}
.map-content h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 8px;
    font-weight: 700;
}
.map-content p {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.75);
    margin-bottom: 4px;
    line-height: 1.5;
}
.map-content .btn {
    margin-top: 20px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--cuhk-purple-dark);
    color: rgba(255,255,255,0.8);
    padding: 60px 0 24px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}
.footer-brand h3 {
    font-family: var(--font-heading);
    color: var(--white);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 12px;
}
.footer-brand p {
    font-size: 0.88rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.65);
}
.footer-links h4,
.footer-affiliation h4 {
    color: var(--cuhk-gold-light);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}
.footer-links ul { display: flex; flex-direction: column; gap: 8px; }
.footer-links a {
    color: rgba(255,255,255,0.65);
    font-size: 0.88rem;
    transition: var(--transition);
}
.footer-links a:hover { color: var(--cuhk-gold-light); padding-left: 4px; }
.footer-affiliation p { margin-bottom: 8px; }
.footer-affiliation a {
    color: rgba(255,255,255,0.65);
    font-size: 0.88rem;
    transition: var(--transition);
}
.footer-affiliation a:hover { color: var(--cuhk-gold-light); }

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.footer-bottom p {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.45);
}

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--cuhk-purple);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: 0 4px 16px rgba(82,0,79,0.35);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}
.back-to-top:hover {
    background: var(--cuhk-gold-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(183,142,66,0.4);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 260px 1fr;
        gap: 40px;
    }
    .interests-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .section { padding: 72px 0; }

    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--cuhk-purple-dark);
        padding: 16px 24px;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    }
    .nav-links.open { display: flex; }
    .nav-link { padding: 12px 16px; }
    .nav-toggle { display: block; }

    .hero-content { padding: 100px 24px 72px; }
    .hero-buttons { flex-direction: column; align-items: center; }

    .about-grid {
        grid-template-columns: 1fr;
    }
    .profile-card { position: static; max-width: 300px; margin: 0 auto; }

    .about-stats { grid-template-columns: repeat(2, 1fr); }

    .timeline { padding-left: 40px; }
    .timeline-marker { left: -36px; width: 36px; height: 36px; font-size: 0.85rem; }
    .timeline-card { padding: 20px 20px; }

    .interests-grid { grid-template-columns: 1fr; }

    .grants-grid { grid-template-columns: 1fr; }

    .contact-grid {
        grid-template-columns: 1fr;
    }
    .map-placeholder { height: 240px; }

    .awards-grid { grid-template-columns: 1fr; }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .footer-bottom { flex-direction: column; text-align: center; }

    .back-to-top { bottom: 20px; right: 20px; }
}

@media (max-width: 480px) {
    .hero-name { font-size: 2rem; }
    .hero-badge { font-size: 0.72rem; padding: 6px 14px; }

    .pub-item { grid-template-columns: 50px 1fr; }
    .pub-content { padding-right: 0; }

    .award-card { flex-direction: column; gap: 14px; }

    .timeline::before { left: 14px; }
    .timeline { padding-left: 34px; }
    .timeline-marker { left: -30px; width: 30px; height: 30px; font-size: 0.7rem; }
}
