/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables for easy customization */
:root {
    --primary-color: #1a1a1a;
    --secondary-color: #666;
    --accent-color: #0066cc;
    --text-color: #333;
    --border-color: #f0f0f0;
    --light-border: #f5f5f5;
    --background-color: #fff;
    --font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

/* Main wrapper and container */
.wrapper {
    min-height: 100vh;
}

.content {
    margin: 0 auto;
    max-width: 800px;
    padding: 40px 20px;
}

.container {
    margin-bottom: 40px;
}

.container.centered {
    text-align: center;
    margin-bottom: 40px;
}

.container.text-justify {
    text-align: justify;
}

/* Profile section */
.about {
    margin-bottom: 40px;
}

.avatar {
    margin-bottom: 20px;
}

.avatar img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
}

/* Profile info */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-color);
}

h2 {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--secondary-color);
    margin-bottom: 25px;
}

/* Social media icons */
.social-icons {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.social-icons li {
    display: inline-block;
}

.social-icons a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.2s ease;
    display: block;
    padding: 5px;
}

.social-icons a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

/* Main content */
main {
    margin-bottom: 40px;
}

section {
    margin-bottom: 40px;
}

/* About section */
.about p {
    margin-bottom: 16px;
    font-size: 1rem;
    line-height: 1.7;
}

/* Main content sections */
.about-text {
    margin-bottom: 40px;
}

.about-text p {
    margin-bottom: 24px;
    font-size: 1rem;
    line-height: 1.7;
}

/* Section headings */
h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
}

/* Publications */
.publication-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--light-border);
    align-items: flex-start;
}

.publication-item:last-child {
    border-bottom: none;
    margin-bottom: 40px;
}

/* Publication figure */
.pub-figure {
    flex-shrink: 0;
    width: 120px;
    height: 90px;
}

.pub-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: #f9f9f9;
}

/* Publication content */
.pub-content {
    flex: 1;
    min-width: 0;
}

.pub-content p {
    margin: 0;
    line-height: 1.6;
}

.pub-content span {
    display: block;
    margin-bottom: 4px;
}

.pub-content span:last-child {
    margin-bottom: 0;
}

/* Publication text styling */
.pub-content strong u {
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: underline;
    font-size: 1.05rem;
}

.pub-content strong {
    font-weight: 600;
    color: var(--primary-color);
}

.pub-content em {
    color: var(--secondary-color);
    font-style: italic;
}

/* Education */
.education-item {
    margin-bottom: 16px;
    font-size: 1rem;
    line-height: 1.6;
}

/* Honors */
.honor-item {
    margin-bottom: 8px;
    font-size: 1rem;
}

/* General content paragraph spacing */
.container p {
    margin-bottom: 20px;
    line-height: 1.7;
}

.container p span {
    display: inline;
}

/* Contact */
.contact p {
    font-size: 1rem;
    line-height: 1.6;
}

/* Unified link styles */
a {
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    text-decoration: underline;
}

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

.contact a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    margin-top: 60px;
}

footer hr {
    border: none;
    height: 1px;
    background-color: #e0e0e0;
    margin-bottom: 20px;
}

.footer-text {
    font-size: 0.9rem;
    color: #888;
    text-align: center;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }
    
    .profile-section {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .profile-info h1 {
        font-size: 2rem;
    }
    
    .avatar {
        width: 100px;
        height: 100px;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    .pub-title {
        font-size: 1rem;
    }
    
    /* Stack publications vertically on mobile */
    .publication-item {
        flex-direction: column;
        gap: 15px;
    }
    
    .pub-figure {
        width: 100%;
        height: 120px;
        align-self: center;
    }
    
    .pub-image {
        max-width: 200px;
        margin: 0 auto;
        display: block;
    }
    
    .social-icons {
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .content {
        padding: 15px 10px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.1rem;
    }
    
    .avatar img {
        width: 120px;
        height: 120px;
    }
    
    .social-icons {
        gap: 12px;
    }
    
    .social-icons a {
        font-size: 0.9em;
    }
    
    body {
        font-size: 15px;
    }
}

/* Print styles */
@media print {
    .container {
        max-width: none;
        padding: 0;
    }
    
    .pub-links {
        display: none;
    }
    
    a {
        color: #333 !important;
        text-decoration: none;
    }
    
    .contact a:after {
        content: " (" attr(href) ")";
        font-size: 0.8rem;
        color: #666;
    }
}
