/* ============================================
   JIANG Xiantao — Academic Homepage
   Ocean Theme
   ============================================ */

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #0f172a;
    background: #f0f9ff;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: #0c4a6e;
    color: #fff;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: 'Source Serif 4', 'Georgia', 'Times New Roman', serif;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

h1 { font-size: 2.75rem; color: #0a1628; }
h2 { font-size: 1.85rem; }
h3 { font-size: 1.25rem; }

a {
    color: #0c4a6e;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #0d9488;
}

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

.section {
    padding: 80px 0;
}

.alt-bg {
    background: #ffffff;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 22, 40, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(45, 212, 191, 0.15);
    z-index: 100;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.nav-brand {
    font-family: 'Source Serif 4', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #e2e8f0;
}

.nav-brand:hover {
    color: #2dd4bf;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 28px;
}

.nav-links a {
    font-size: 0.875rem;
    color: #94a3b8;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.nav-links a:hover {
    color: #2dd4bf;
}

/* --- Hero --- */
.hero {
    padding-top: 136px;
    padding-bottom: 72px;
    background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60'%3E%3Cpath fill='%23ffffff' d='M0,30 C240,0 480,60 720,30 C960,0 1200,60 1440,30 L1440,60 L0,60Z'/%3E%3C/svg%3E") no-repeat bottom;
    background-size: cover;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 160px;
    gap: 48px;
    align-items: start;
    position: relative;
    z-index: 1;
}

.hero-text h1 {
    margin-bottom: 4px;
}

.subtitle {
    font-size: 1.1rem;
    color: #0d9488;
    font-weight: 500;
    margin-bottom: 2px;
}

.affiliation {
    font-size: 0.95rem;
    color: #64748b;
}

.affiliation-desc {
    margin-top: 16px;
    font-size: 0.95rem;
    color: #475569;
    max-width: 540px;
}

.hero-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.contact-link {
    font-size: 0.85rem;
    color: #475569;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    transition: all 0.2s;
}

.contact-link:hover {
    color: #0d9488;
    border-color: #0d9488;
    background: #f0fdfa;
}

/* --- Avatar --- */
.hero-avatar {
    display: flex;
    justify-content: center;
}

.avatar-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 8px 32px rgba(13, 148, 136, 0.2);
    border: 3px solid rgba(45, 212, 191, 0.3);
}

.hero-avatar {
    padding-top: 8px;
}

/* --- Section Titles --- */
.sec-title {
    text-align: center;
    margin-bottom: 48px;
    position: relative;
    color: #0a1628;
}

.sec-title::after {
    content: '';
    display: block;
    width: 64px;
    height: 4px;
    margin: 12px auto 0;
    border-radius: 2px;
    background: linear-gradient(90deg, #0c4a6e, #0d9488, #2dd4bf);
}

/* --- Research Cards --- */
.research-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.research-card {
    background: #f0f9ff;
    padding: 32px 24px;
    border-radius: 12px;
    border: 1px solid #bae6fd;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.research-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(13, 148, 136, 0.1);
    border-color: #0d9488;
}

.card-icon {
    font-size: 1.5rem;
    color: #0d9488;
    margin-bottom: 12px;
}

.research-card h3 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1rem;
    color: #0a1628;
}

.research-card p {
    font-size: 0.875rem;
    color: #475569;
}

/* --- Publications --- */
.pub-item {
    display: flex;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid #e2e8f0;
}

.pub-item:last-of-type {
    border-bottom: none;
}

.pub-num {
    font-family: 'Source Serif 4', serif;
    font-size: 1rem;
    color: #0d9488;
    font-weight: 600;
    min-width: 28px;
}

.pub-title {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
    color: #0a1628;
}

.pub-authors {
    font-size: 0.875rem;
    color: #475569;
    margin-bottom: 2px;
}

.pub-venue {
    font-size: 0.85rem;
    color: #64748b;
    font-style: italic;
    margin-bottom: 8px;
}

.pub-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 500;
    color: #0f766e;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    padding: 1px 8px;
    border-radius: 4px;
    margin-left: 6px;
    white-space: nowrap;
}

.pub-links {
    display: flex;
    gap: 12px;
}

.pub-links a {
    font-size: 0.8rem;
    color: #0c4a6e;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.pub-links a:hover {
    color: #0d9488;
}

.pub-full {
    text-align: center;
    margin-top: 24px;
}

.pub-full a {
    font-size: 0.9rem;
}

/* --- Teaching --- */
.teaching-item {
    display: flex;
    gap: 24px;
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid #e2e8f0;
}

.teaching-item:last-child {
    border-bottom: none;
}

.teaching-term {
    font-family: 'Source Serif 4', serif;
    font-weight: 700;
    color: #0d9488;
    min-width: 56px;
    font-size: 1rem;
}

.teaching-detail h3 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
    color: #0a1628;
}

.teaching-detail p {
    font-size: 0.875rem;
    color: #475569;
}

.advisor {
    font-size: 0.8rem !important;
    color: #64748b !important;
    margin-top: 2px;
}

/* --- Footer --- */
.footer {
    background: linear-gradient(180deg, #0a1628, #0f2b4a);
    color: #94a3b8;
    text-align: center;
    padding: 40px 0;
    font-size: 0.825rem;
}

.footer-credit {
    margin-top: 4px;
}

.footer .fa-heart {
    color: #0d9488;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-avatar {
        order: -1;
    }

    .avatar-img {
        width: 110px;
        height: 110px;
    }

    .affiliation-desc {
        max-width: 100%;
    }

    .hero-contact {
        justify-content: center;
    }

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

    .teaching-item {
        flex-direction: column;
        gap: 4px;
    }

    .pub-item {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .nav-links {
        gap: 16px;
    }

    .nav-links a {
        font-size: 0.75rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }

    .section {
        padding: 56px 0;
    }

    .hero {
        padding-top: 100px;
    }
}