/* CSS Variables */
:root {
    /* Colors */
    --background: #FFFFFF;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --accent: #2563EB;
    --accent-hover: #1D4ED8;
    --border: #E5E7EB;
    --card-shadow: rgba(0, 0, 0, 0.1);
    --card-hover-shadow: rgba(0, 0, 0, 0.15);
    
    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    
    /* Spacing */
    --container-max-width: 1200px;
    --container-padding: 2rem;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
}

/* Container */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Typography */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Navigation Bar */
.navbar {
    background-color: var(--background);
    box-shadow: 0 2px 4px var(--card-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.nav-brand a {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-brand a:hover {
    color: var(--accent);
    text-decoration: none;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    margin: 3px 0;
    transition: all 0.3s ease;
}

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

.nav-menu a {
    color: var(--text-primary);
    font-weight: 500;
    text-decoration: none;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* Sections */
section {
    padding: 2.5rem 0;
}

/* Reduce spacing between sections on homepage */
body:has(.hero) .bio {
    padding-top: 1.5rem;
}

body:has(.hero) .education {
    padding-top: 1.5rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 2rem 0 1rem;
}

.hero h1 {
    margin-bottom: 0.5rem;
}

.hero .title {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Profile Section */
.profile {
    text-align: center;
    padding: 1.5rem 0;
}

.profile-photo {
    margin-bottom: 2rem;
}

.profile-photo img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--border);
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 150px;
    background-color: white;
}

.contact-link:hover {
    background-color: var(--accent);
    color: white;
    border-color: var(--accent);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--card-shadow);
}

.contact-link svg {
    flex-shrink: 0;
}

/* Bio Section */
.bio-content ul {
    margin-top: 1rem;
    padding-left: 1.5rem;
}

.bio-content li {
    margin-bottom: 0.5rem;
}

.bio-content h3 {
    margin-top: 2.5rem;
    color: var(--accent);
}

.bio-content h3:first-of-type {
    margin-top: 1.5rem;
}

/* Education Section */
.education-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

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

.degree h3 {
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.degree .institution {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.degree .date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Interests Section */
.interests-content p {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Skills Section */
.skills-content p {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Footer */
footer {
    background-color: var(--background);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background-color: var(--background);
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 6px var(--card-shadow);
        gap: 0;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        padding: 0.5rem 0;
    }
    
    section {
        padding: 2rem 0;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
}

/* Page Header */
.page-header {
    text-align: center;
    padding: 2rem 0 1rem;
    border-bottom: 1px solid var(--border);
}

.page-header h1 {
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Publications Section */
.publications {
    padding: 3rem 0;
}

.year-section {
    margin-bottom: 3rem;
}

.year-section h3 {
    color: var(--accent);
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.publication-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.publication-card {
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.publication-card:hover {
    box-shadow: 0 8px 16px var(--card-hover-shadow);
    transform: translateY(-4px);
}

.publication-thumbnail {
    width: 100%;
    height: 200px;
    margin-bottom: 1rem;
    border-radius: 4px;
    overflow: hidden;
    background-color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
}

.publication-thumbnail img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.publication-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    color: var(--text-primary);
}

.publication-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.publication-title a:hover {
    color: var(--accent);
}

.publication-authors {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.publication-authors .author-highlight {
    font-weight: 600;
    color: var(--text-primary);
}

.publication-year {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.publication-venue {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.publication-citations {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.publication-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.publication-link {
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--accent);
    text-decoration: none;
    transition: all 0.3s ease;
}

.publication-link:hover {
    background-color: var(--accent);
    color: white;
    border-color: var(--accent);
    text-decoration: none;
}

/* Patents Section */
.patents {
    padding: 3rem 0;
    background-color: #FAFAFA;
}

.patents h3 {
    color: var(--accent);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.patents h3:first-of-type {
    margin-top: 0;
}

.patent-list {
    list-style: none;
    padding: 0;
}

.patent-item {
    padding: 1rem;
    margin-bottom: 0.75rem;
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: 6px;
    border-left: 4px solid var(--accent);
}

.patent-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.patent-number {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Responsive adjustments for publications */
@media (max-width: 768px) {
    .publication-grid {
        grid-template-columns: 1fr;
    }
    
    .year-section h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .publication-card {
        padding: 1rem;
    }
    
    .publication-thumbnail {
        height: 150px;
    }
}

/* Awards Section */
.honors {
    padding: 3rem 0;
}

.honors h3 {
    color: var(--accent);
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.honors h3:first-of-type {
    margin-top: 0;
}

.awards-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.award-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.25rem;
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.award-item:hover {
    box-shadow: 0 4px 8px var(--card-shadow);
    transform: translateX(4px);
}

.award-year {
    flex-shrink: 0;
    font-weight: 700;
    color: var(--accent);
    font-size: 1rem;
    min-width: 80px;
}

.award-content {
    flex: 1;
}

.award-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.award-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Service Section */
.service {
    padding: 3rem 0;
    background-color: #FAFAFA;
}

.service h3 {
    color: var(--accent);
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.service h3:first-of-type {
    margin-top: 0;
}

.service-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.service-item {
    padding: 1.25rem;
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    border-left: 4px solid var(--accent);
    transition: all 0.3s ease;
}

.service-item:hover {
    box-shadow: 0 4px 8px var(--card-shadow);
    transform: translateX(4px);
}

.service-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.service-years {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.service-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0;
    margin-top: 0.5rem;
}

/* Responsive adjustments for awards */
@media (max-width: 768px) {
    .award-item {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .award-year {
        min-width: auto;
    }
    
    .honors h3,
    .service h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .award-item,
    .service-item {
        padding: 1rem;
    }
    
    .award-content h4 {
        font-size: 1rem;
    }
}
