/* ===========================
   Global Styles & Reset
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #ffffff;
    --bg-light: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--primary-color);
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 1.5rem; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }
h4 { font-size: 1.25rem; margin-bottom: 0.75rem; }

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

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

/* ===========================
   Navigation Bar
   =========================== */
.navbar {
    background-color: var(--primary-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

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

.nav-brand a {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

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

.nav-menu a {
    color: white;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

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

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

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* ===========================
   Hero Section
   =========================== */
.hero {
    padding: 4rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.hero-image {
    flex-shrink: 0;
}

.profile-pic {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid white;
    box-shadow: var(--shadow-hover);
}

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

.subtitle {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.intro {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    opacity: 0.9;
}

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

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: white;
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* ===========================
   Sections
   =========================== */
section {
    padding: 4rem 0;
}

section:nth-child(even) {
    background-color: var(--bg-light);
}

/* ===========================
   News Section
   =========================== */
.news-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

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

.news-item {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.news-date {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.news-item p {
    color: var(--text-color);
    line-height: 1.6;
}

/* ===========================
   Research Section
   =========================== */
.research-section h2 {
    text-align: center;
    margin-bottom: 3rem;
}

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

.research-card {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.research-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.research-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--secondary-color), #9b59b6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.research-card h3 {
    margin-bottom: 1rem;
}

.research-card p {
    color: var(--text-light);
    line-height: 1.7;
}

/* ===========================
   Publications Section
   =========================== */
.publications-section h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.publication-list {
    max-width: 900px;
    margin: 0 auto;
}

.publication-item {
    background-color: white;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.publication-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-hover);
}

.publication-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.authors {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.authors strong {
    color: var(--text-color);
}

.venue {
    color: var(--text-light);
    font-style: italic;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

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

.btn-small {
    padding: 0.4rem 1rem;
    background-color: var(--secondary-color);
    color: white !important;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-small:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

.view-all {
    text-align: center;
    margin-top: 2rem;
}

.btn-primary {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: var(--secondary-color);
    color: white !important;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-primary:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

/* ===========================
   About Page
   =========================== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: start;
}

.about-sidebar {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
}

.about-sidebar .profile-pic {
    width: 200px;
    height: 200px;
    margin-bottom: 1.5rem;
}

.about-main {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.about-main h2 {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.about-main h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.about-main ul {
    margin-left: 1.5rem;
    margin-top: 1rem;
}

.about-main li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.info-item {
    margin-bottom: 1rem;
}

.info-item strong {
    display: block;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

/* ===========================
   CV Page
   =========================== */
.cv-section {
    background-color: white;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.cv-section h2 {
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
}

.cv-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.cv-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

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

.cv-title {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}

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

.cv-institution {
    color: var(--secondary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.cv-description {
    color: var(--text-light);
    line-height: 1.7;
}

.cv-description ul {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

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

.skill-category h4 {
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
}

.skill-category ul {
    list-style: none;
    margin-left: 0;
}

.skill-category li {
    padding: 0.25rem 0;
    color: var(--text-light);
}

.skill-category li:before {
    content: "▹ ";
    color: var(--secondary-color);
    font-weight: bold;
}

/* ===========================
   Teaching Page
   =========================== */
.course-grid {
    display: grid;
    gap: 2rem;
}

.course-card {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.course-code {
    background-color: var(--secondary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.course-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.course-meta {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.course-description {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.course-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ===========================
   Contact Page
   =========================== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.contact-item {
    display: flex;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-details h3 {
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.contact-details p,
.contact-details a {
    color: var(--text-light);
}

.contact-form {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-submit:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

/* ===========================
   Footer
   =========================== */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    margin: 0.25rem 0;
    opacity: 0.9;
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-color);
        padding: 1rem;
        gap: 0;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        margin: 0.5rem 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-pic {
        width: 200px;
        height: 200px;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .cv-header {
        flex-direction: column;
    }
    
    .cv-date {
        margin-top: 0.25rem;
    }
    
    section {
        padding: 2rem 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .news-grid,
    .research-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-pic {
        width: 150px;
        height: 150px;
    }
}
