/* Reset and Base Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.7;
    color: #333;
    background-color: #fff;
}

a {
    color: #0369a1;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #075985;
}

/* Navigation */
nav {
    background-color: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.nav-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.nav-name:hover {
    color: #0369a1;
}

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

.nav-links a {
    color: #4b5563;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
    color: #0369a1;
    border-bottom-color: #0369a1;
}

/* Main Content */
main {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Profile Section (Home Page) */
.profile {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
    margin-bottom: 3rem;
}

.profile-image img {
    width: 180px;
    height: 220px;
    border-radius: 12px;
    object-fit: cover;
    object-position: center top;
    border: 4px solid #f3f4f6;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.profile-info h1 {
    font-size: 2rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.profile-info .title {
    font-size: 1.1rem;
    color: #0369a1;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.profile-info .affiliation {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

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

.contact-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f3f4f6;
    color: #4b5563;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.contact-links a:hover {
    background-color: #0369a1;
    color: #fff;
}

/* About Section */
.about h2 {
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #0369a1;
    display: inline-block;
}

.about p {
    color: #4b5563;
    text-align: justify;
}

/* Content Pages (CV, Teaching) */
.content-page h1 {
    font-size: 2rem;
    color: #1f2937;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #0369a1;
}

/* CV Sections */
.cv-section {
    margin-bottom: 2.5rem;
}

.cv-section h2 {
    font-size: 1.3rem;
    color: #0369a1;
    margin-bottom: 1rem;
    font-weight: 600;
}

.cv-item {
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 3px solid #e5e7eb;
}

.cv-item:hover {
    border-left-color: #0369a1;
}

.cv-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cv-title {
    font-weight: 600;
    color: #1f2937;
}

.cv-location,
.cv-date {
    color: #6b7280;
    font-size: 0.9rem;
}

.cv-location-inline {
    color: #0369a1;
    font-weight: 500;
    margin: 0.25rem 0;
}

.cv-details {
    color: #4b5563;
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

/* Teaching Tables */
.teaching-section {
    margin-bottom: 2.5rem;
}

.teaching-section h2 {
    font-size: 1.3rem;
    color: #0369a1;
    margin-bottom: 1rem;
    font-weight: 600;
}

.teaching-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.teaching-table th,
.teaching-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.teaching-table th {
    background-color: #f9fafb;
    color: #1f2937;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.teaching-table td {
    color: #4b5563;
}

.teaching-table tbody tr:hover {
    background-color: #f9fafb;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid #e5e7eb;
    color: #9ca3af;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .profile {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-info {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

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

    .about h2 {
        display: block;
    }

    .cv-header {
        flex-direction: column;
        gap: 0.25rem;
    }

    .teaching-table {
        font-size: 0.85rem;
    }

    .teaching-table th,
    .teaching-table td {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    main {
        padding: 2rem 1rem;
    }

    .profile-image img {
        width: 150px;
        height: 150px;
    }

    .profile-info h1 {
        font-size: 1.5rem;
    }

    .teaching-table {
        display: block;
        overflow-x: auto;
    }
}
