/* Global Styles */
:root {
    --primary-color: #ae0a0a;
    --secondary-color: #1a1a1a;
    --accent-color: #f4f4f4;
    --text-primary: #333333;
    --text-secondary: #666666;
    --bg-light: #ffffff;
    --bg-alt: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Merriweather', Georgia, serif;
    font-weight: 400;
    line-height: 1.3;
    color: var(--secondary-color);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: #990000;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

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

.nav-brand a {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--secondary-color);
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 35px;
}

.nav-link {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--secondary-color);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-alt) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--secondary-color);   /* ✅ uses your secondary color directly */
    display: inline-block;
    position: relative;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.hero-institution {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 25px;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 35px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.btn {
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 14px rgba(204, 0, 0, 0.25);
}

.btn-primary:hover {
    background: #990000;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(204, 0, 0, 0.35);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: var(--transition);
}

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

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .profile-img {
    width: 240px;           /* fixed width */
    height: 240px;          /* fixed height */
    border-radius: 5%;     /* makes it circular (change to 0 for square) */
    object-fit: cover;      /* ensures image fills frame without distortion */
    object-position: 50% 5%; /* 👈 adjust second value */
    display: block;         /* removes inline gap under image */
  }
  

/* Sections */
.section {
    padding: 80px 0;
}

.section-alt {
    background: var(--bg-alt);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-color);
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-text p {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.stat-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.stat-card h3 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.stat-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Research Section */
.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.research-card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.research-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #ff6b6b);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.research-card:hover::before {
    transform: scaleX(1);
}

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

.research-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(204, 0, 0, 0.1), rgba(204, 0, 0, 0.05));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

.research-icon i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.research-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.research-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.research-link {
    color: var(--primary-color);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s ease;
}

.research-link:hover {
    gap: 10px;
}

/* Publications Section */
.publications-filter {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
}

.filter-btn {
    padding: 10px 25px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

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

.publication-item {
    display: flex;
    gap: 30px;
    padding: 35px 0;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.publication-item:hover {
    padding-left: 10px;
}

.publication-year {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    min-width: 60px;
}

.publication-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.publication-authors {
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.publication-venue {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.publication-links {
    display: flex;
    gap: 15px;
}

.pub-link {
    padding: 6px 15px;
    background: var(--bg-alt);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.pub-link:hover {
    background: var(--primary-color);
    color: white;
}

/* Teaching Section */
.teaching-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.teaching-card {
    background: white;
    padding: 35px;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.teaching-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.teaching-header h3 {
    font-size: 1.3rem;
}

.teaching-role {
    background: rgba(204, 0, 0, 0.1);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.teaching-semester {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.teaching-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.teaching-stats {
    display: flex;
    gap: 20px;
}

.teaching-stats span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.teaching-stats i {
    color: var(--primary-color);
}

/* CV Section */
.cv-preview {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    padding: 50px;
    box-shadow: var(--shadow-md);
}

.cv-header h3 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--secondary-color);
}

.cv-timeline {
    position: relative;
    padding-left: 40px;
    margin-bottom: 40px;
}

.cv-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 35px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -32px;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--border-color);
}

.timeline-date {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.timeline-content h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.timeline-content p {
    color: var(--text-secondary);
    margin-bottom: 5px;
}

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

.cv-download {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.cv-update {
    margin-top: 15px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 30px;
    flex-wrap: wrap; /* allows stacking on smaller screens */
}


.contact-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    flex: 1 1 300px;  /* allows cards to grow/shrink evenly */
    max-width: 400px; /* prevents overly wide boxes */
    text-align: center; /* center the text inside each card */
    display: flex;
    flex-direction: column;
    justify-content: center;
}


.contact-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.contact-card i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.contact-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.contact-card p,
.contact-card a {
    color: var(--text-secondary);
    line-height: 1.6;
}

.contact-form {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
}

.contact-form h3 {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.1);
}

.form-group textarea {
    resize: vertical;
}

/* Footer */
.footer {
    background: var(--secondary-color);
    color: white;
    padding: 40px 0;
}

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

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

/* Responsive Design */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        align-items: center;
        justify-content: start;
        padding-top: 40px;
        transition: right 0.3s ease;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .profile-img {
        width: 300px;
        height: 300px;
    }
    
    .research-grid,
    .teaching-grid {
        grid-template-columns: 1fr;
    }
    
    .publication-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0.5;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(204, 0, 0, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background: rgba(204, 0, 0, 0.1);
    color: var(--primary-color);
}

/* Focus Visible */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* =========================
   NEWS SECTION STYLING
========================= */

.news-wrapper {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 20px auto;             /* ✅ centers the block horizontally */
    border-left: 3px solid #e0e0e0;
    padding-left: 20px;
    max-width: 950px;              /* ✅ makes it narrower */
    text-align: left;              /* keeps text aligned neatly */
  }
  
  .news-row {
    display: flex;
    align-items: baseline;
    gap: 1.5em;                    /* slightly tighter spacing */
    position: relative;
    padding-bottom: 6px;
    border-bottom: 1px solid #f0f0f0;
  }
  
  .news-row:last-child {
    border-bottom: none;
  }
  
  .news-date {
    flex-shrink: 0;
    min-width: 80px;               /* ✅ smaller date column */
    font-weight: 600;
    color: #555;
    font-size: 0.95em;
    text-align: right;             /* aligns dates neatly next to text */
  }
  
  .news-text {
    flex: 1;
    font-size: 0.95em;
    color: #111;
    line-height: 1.6;
  }
  
  .news-text a {
    color: #0057b7;
    text-decoration: none;
    font-weight: 500;
  }
  
  .news-text a:hover {
    text-decoration: underline;
  }
  
  /* Optional: keep section title centered */
  .section-title {
    text-align: center;            /* ✅ centers the title */
    margin-bottom: 25px;
  }
  
  