/* CSS Custom Properties (Variables) */
:root {
    --color-primary: #2c3e50;
    --color-secondary: #3498db;
    --color-text: #333;
    --color-text-light: #555;
    --color-text-muted: #666;
    --color-background: #fff;
    --color-background-alt: #ecf0f1;
    --color-border: #ecf0f1;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --max-width: 800px;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
}

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

/* Base Styles */
body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
}

/* Navigation */
nav {
    background-color: var(--color-primary);
    color: white;
    padding: var(--spacing-md) 0;
    margin-bottom: var(--spacing-xl);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-title {
    color: white;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: bold;
}

.nav-links a {
    color: white;
    text-decoration: none;
    margin-left: var(--spacing-lg);
    transition: opacity 0.3s;
    padding-bottom: 2px;
}

.nav-links a:hover {
    opacity: 0.8;
}

.nav-links a.active {
    border-bottom: 2px solid white;
}

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

/* Profile Section */
.profile-section {
    display: flex;
    align-items: flex-start;
    margin-bottom: var(--spacing-xl);
    gap: var(--spacing-xl);
}

.profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 4px solid var(--color-primary);
    flex-shrink: 0;
    object-fit: cover;
}

.profile-info {
    flex: 1;
}

.profile-info h1 {
    margin-top: 0;
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
}

.position {
    font-size: 1.1rem;
    color: var(--color-text-light);
    line-height: 1.4;
    margin-bottom: var(--spacing-md);
}

.profile-contacts {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Headings */
h1, h2, h3 {
    color: var(--color-primary);
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: var(--spacing-sm);
}

h3 {
    font-size: 1.25rem;
}

/* Text */
p {
    margin-bottom: var(--spacing-md);
}

ul {
    margin-left: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
}

li {
    margin-bottom: var(--spacing-sm);
}

/* Links */
a {
    color: var(--color-secondary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Publications */
.publication {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--color-border);
}

.publication:last-child {
    border-bottom: none;
}

.pub-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.pub-title {
    color: var(--color-primary);
    font-size: 1.05rem;
    font-weight: bold;
}

.pub-authors {
    color: var(--color-text-light);
    font-style: italic;
    margin-bottom: 0.2rem;
}

.pub-status {
    display: inline-block;
    background-color: #27ae60;
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 3px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.pub-venue {
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-sm);
}

.pub-links a {
    margin-right: var(--spacing-md);
    font-size: 0.9rem;
}

/* Contact Info */
.contact-info {
    line-height: 2;
}

/* Footer */
footer {
    background-color: var(--color-background-alt);
    text-align: center;
    padding: var(--spacing-lg);
    margin-top: 3rem;
    color: var(--color-text-muted);
}

footer a {
    color: var(--color-text-muted);
    text-decoration: underline;
}

/* Horizontal Rule */
hr {
    margin-top: var(--spacing-xl);
    border: none;
    border-top: 1px solid var(--color-border);
}

/* Contact Icons */
.contact-icons {
    display: flex;
    gap: var(--spacing-xl);
    justify-content: center;
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
}

.profile-contacts .contact-icon {
    justify-content: center;
}

.contact-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    text-decoration: none;
    color: var(--color-primary);
    transition: transform 0.2s, opacity 0.2s;
}

.contact-icon:hover {
    transform: translateY(-2px);
    opacity: 0.8;
}

.contact-icon .icon {
    font-size: 1.1rem;
    display: block;
}

.contact-icon .label {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Utility Classes */
.text-muted {
    color: var(--color-text-muted);
}

.text-small {
    font-size: 0.9rem;
}

.last-updated {
    color: #999;
    font-size: 0.9rem;
    margin-top: var(--spacing-md);
    font-style: italic;
}

/* 404 Page */
.error-page {
    text-align: center;
    padding: 4rem 0;
}

.error-page h1 {
    font-size: 6rem;
    margin-bottom: 0;
}

.error-page p {
    font-size: 1.2rem;
    color: var(--color-text-muted);
}

/* Responsive Design */
@media (max-width: 600px) {
    .profile-section {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .profile-contacts {
        flex-direction: row;
        gap: 1.5rem;
    }
    
    .nav-container {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .nav-links {
        display: flex;
        gap: var(--spacing-md);
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-links a {
        margin-left: 0;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
}

/* Print Styles */
@media print {
    nav, footer {
        display: none;
    }
    
    .container {
        max-width: 100%;
    }
    
    a {
        color: var(--color-text);
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}
