/* ==========================================================================
   Zhenyu Dai - Academic Personal Website
   Professional Navy Blue & White Theme
   ========================================================================== */

/* CSS Variables */
:root {
    --primary-color: #1a365d;
    --primary-light: #2c5282;
    --primary-dark: #0f2340;
    --accent-color: #3182ce;
    --text-dark: #1a202c;
    --text-medium: #4a5568;
    --text-light: #718096;
    --bg-white: #ffffff;
    --bg-light: #f7fafc;
    --bg-alt: #edf2f7;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: all 0.3s ease;
}

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

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

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.3;
    color: var(--primary-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-medium);
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    padding: 8rem 0 5rem;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 100%);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-image img {
    width: 280px;
    height: 280px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--bg-white);
    box-shadow: var(--shadow-lg);
}

.hero-content h1 {
    font-size: 2.75rem;
    margin-bottom: 0.5rem;
}

.hero-title {
    font-size: 1.25rem;
    color: var(--text-medium);
    margin-bottom: 0.25rem;
}

.hero-affiliation {
    font-size: 1.1rem;
    color: var(--accent-color);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.hero-contact p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-medium);
}

.contact-icon {
    color: var(--primary-color);
}

.hero-links {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--bg-white);
}

.btn-primary:hover {
    background: var(--primary-light);
    color: var(--bg-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.icon {
    flex-shrink: 0;
}

/* Sections */
.section {
    padding: 5rem 0;
}

.section-alt {
    background: var(--bg-light);
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2.5rem;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin: 1rem auto 0;
}

.section-intro {
    text-align: center;
    color: var(--text-medium);
    margin-bottom: 2rem;
}

.subsection-title {
    font-size: 1.35rem;
    margin: 2.5rem 0 1.5rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

/* About Section */
.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.lead {
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.about-content p {
    color: var(--text-medium);
    line-height: 1.8;
}

/* Achievements Grid */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.achievement-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.achievement-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.achievement-number {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.achievement-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0.5rem 0;
}

.achievement-desc {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-left: 2.5rem;
    padding-bottom: 3rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -6px;
    top: 0;
    width: 15px;
    height: 15px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 3px solid var(--bg-white);
    box-shadow: var(--shadow-sm);
}

.timeline-content {
    background: var(--bg-white);
    padding: 1.5rem 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.timeline-header h3 {
    font-size: 1.25rem;
    margin: 0;
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.timeline-org {
    color: var(--text-medium);
    margin-bottom: 0.25rem;
}

.timeline-focus {
    color: var(--accent-color);
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.timeline-highlights {
    margin-top: 1rem;
    padding-left: 1.25rem;
}

.timeline-highlights li {
    margin-bottom: 0.5rem;
    color: var(--text-medium);
    font-size: 0.95rem;
}

/* Clinical Products */
.clinical-products {
    margin-top: 1.5rem;
}

.clinical-products h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.product-card {
    background: var(--bg-light);
    padding: 1.25rem;
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
}

.product-card h5 {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.product-role {
    font-size: 0.8rem;
    color: var(--accent-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.product-card p:last-child {
    font-size: 0.9rem;
    color: var(--text-medium);
    margin: 0;
}

/* Publications */
.publications-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.publication {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.section-alt .publication {
    border: none;
    box-shadow: var(--shadow-sm);
}

.publication:hover {
    box-shadow: var(--shadow-md);
}

.pub-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.pub-if {
    background: var(--primary-color);
    color: var(--bg-white);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.pub-citations {
    background: var(--bg-alt);
    color: var(--text-medium);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.pub-title {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.pub-authors {
    font-size: 0.9rem;
    color: var(--text-medium);
    margin-bottom: 0.25rem;
}

.pub-journal {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Patents Table */
.patents-table-wrapper {
    overflow-x: auto;
}

.patents-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.patents-table th,
.patents-table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.patents-table th {
    background: var(--primary-color);
    color: var(--bg-white);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.patents-table td {
    font-size: 0.95rem;
    color: var(--text-medium);
}

.patents-table tr:last-child td {
    border-bottom: none;
}

.patents-table tr:hover {
    background: var(--bg-light);
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge.filed {
    background: #ebf8ff;
    color: #2b6cb0;
}

.status-badge.granted {
    background: #c6f6d5;
    color: #276749;
}

.impact-value {
    font-weight: 600;
    color: var(--primary-color);
}

/* Education */
.education-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.education-item {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-color);
}

.edu-degree {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.edu-school {
    font-size: 1.05rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.edu-details {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.edu-year,
.edu-gpa,
.edu-honors {
    font-size: 0.9rem;
    color: var(--text-medium);
}

.edu-gpa,
.edu-honors {
    color: var(--accent-color);
    font-weight: 500;
}

.edu-note {
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
    margin-top: 0.5rem;
}

/* Footer */
.footer {
    background: var(--primary-dark);
    color: var(--bg-light);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-info h3 {
    font-size: 1.25rem;
    color: var(--bg-white);
    margin-bottom: 1rem;
}

.footer-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.7;
}

.footer-contact p {
    margin-bottom: 0.5rem;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-contact a:hover {
    color: var(--bg-white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

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

    .hero-image {
        margin: 0 auto;
    }

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

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

    .nav-menu {
        display: none;
    }

    .timeline::before {
        left: 7px;
    }

    .timeline-marker {
        left: 0;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .section {
        padding: 3.5rem 0;
    }

    .container {
        padding: 0 1.25rem;
    }

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

    .hero {
        padding: 6rem 0 3rem;
    }

    .hero-image img {
        width: 200px;
        height: 200px;
    }

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

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

    .patents-table th,
    .patents-table td {
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    .education-item {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .achievements-grid {
        grid-template-columns: 1fr;
    }

    .hero-contact {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .edu-details {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Print Styles */
@media print {
    .navbar {
        display: none;
    }

    .hero {
        padding-top: 2rem;
    }

    .section {
        padding: 2rem 0;
    }

    .btn {
        display: none;
    }

    body {
        font-size: 12pt;
    }
}
