:root {
    --primary-color: #2c7cb0;     
    --primary-dark: #1a4e70;      
    --primary-light: #e6f2f9;     
    --bg-soft-blue: #f0f5f9;      
    --text-dark: #2d3748;         
    --text-light: #718096;        
    --border-color: #e2e8f0;      
    --card-bg: #ffffff;           
}


html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; 
}

body {
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-soft-blue); 
  line-height: 1.6;
  margin: 0;
  padding: 0;
}


.navbar {
  position: sticky;
  top: 0;
  background-color: var(--primary-dark); 
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 1000;
  padding: 0.8rem 0;
}

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

.nav-logo {
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
}

.nav-links a {
  color: rgba(255,255,255,0.85);
  margin-left: 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #fff;
}


main {
  max-width: 960px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
}


h1, h2, h3 {
  font-weight: 700;
  color: #1a202c;
  margin-top: 0;
}

.name {
  font-size: 2.8rem;
  margin-bottom: 0.5rem; /* Reduced margin */
  letter-spacing: -0.5px;
  color: var(--primary-dark); 
}

/* === Social Icons (Replaces Email Block & Contact Links) === */
.social-icons {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.social-icons a {
  color: var(--text-dark);
  font-size: 1.8rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

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

h2 {
  font-size: 1.6rem;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
}


h2::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 24px;
    background-color: var(--primary-color);
    margin-right: 12px;
    border-radius: 2px;
}

.section-intro {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}


.profile-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 3rem;
  margin-bottom: 3rem;
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
  border: 1px solid var(--border-color);
}

.profile-text {
  flex: 1;
}

.bio {
  font-size: 1.05rem;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

/* Removed .contact-links styles */

.profile-image-container img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}


.contact-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: var(--primary-light); 
    color: var(--primary-color) !important;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.contact-btn i {
    margin-right: 8px;
}

.contact-btn:hover {
    background-color: var(--primary-color);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(44, 124, 176, 0.2);
}

.news-container {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.news-item {
    display: flex;
    align-items: baseline; 
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed var(--border-color);
}

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

.news-date-badge {
    background-color: var(--primary-dark);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    font-family: monospace;
    margin-right: 15px;
    white-space: nowrap;
    min-width: 85px;
    text-align: center;
}

.news-content {
    font-size: 0.95rem;
}

.card {
  display: flex;
  background: var(--card-bg); 
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 1.5rem;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
  border-color: #cbd5e0;
}

.card-image {
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-right: 1px solid var(--border-color);
  flex-shrink: 0;
}

.research-image {
    width: 200px;
}

.logo-container {
    width: 140px; 
    height: auto;
    min-height: 120px;
}

.logo-container img {
  width: 100%;
  height: 100%;
  max-height: 100px; 
  object-fit: contain; 
  display: block;
}

.research-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.card-details {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.paper-title, .exp-title, .teaching-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.25rem;
  display: block;
}

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

.conference {
  font-size: 0.9rem;
  color: var(--text-dark);
  font-weight: 500;
  margin-bottom: 0.8rem;
}

.links-container {
    margin-bottom: 1rem;
}

.resource-link {
  font-size: 0.8rem;
  background: var(--primary-light);
  padding: 3px 10px;
  border-radius: 15px;
  font-weight: 600;
  margin-right: 8px;
}

.resource-link:hover {
    background: #dbeafe;
}

.abstract {
  font-size: 0.95rem;
  color: #4a5568;
  margin-top: auto;
  text-align: justify;
}


.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.exp-date, .teaching-date {
  font-size: 0.85rem;
  color: var(--text-light);
  white-space: nowrap;
  font-weight: 500;
}

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

.exp-details-list {
  margin: 0.5rem 0 0 1.2rem;
  padding: 0;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.exp-details-list li {
  margin-bottom: 0.4rem;
}


footer {
  text-align: center;
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-light);
  font-size: 0.85rem;
}


/* === Timeline UI (Experience & Teaching) === */
.timeline-container {
  position: relative;
  padding: 10px 0;
}

.timeline-item {
  display: flex;
  gap: 1.5rem;
  position: relative;
  padding-bottom: 2.5rem; /* Space between items */
}

.timeline-item:last-child {
  padding-bottom: 0;
}

/* The Vertical Line */
.timeline-item::before {
  content: '';
  position: absolute;
  left: 45px; /* Center of the 90px marker */
  top: 90px; /* Start below the marker */
  bottom: -10px; /* Extend to next item */
  width: 2px;
  background-color: #e2e8f0;
  transform: translateX(-50%);
  z-index: 0;
}

.timeline-item:last-child::before {
  display: none; /* No line after the last item */
}

/* Circular Marker (Logo) */
.timeline-marker {
  width: 90px;
  height: 90px;
  box-sizing: border-box; /* Fix alignment: ensures total width is 70px */
  flex-shrink: 0;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  overflow: hidden;
  padding: 8px; /* Padding inside the circle */
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  transition: transform 0.2s, border-color 0.2s;
}

.timeline-marker a {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.timeline-item:hover .timeline-marker {
  transform: scale(1.05);
  border-color: var(--primary-color);
}

.timeline-marker img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

/* Content Area */
.timeline-content {
  flex: 1;
  padding-top: 5px; /* Align with top of marker */
}

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

.timeline-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0;
}

.timeline-title a {
  color: inherit;
  text-decoration: none;
}

.timeline-title a:hover {
  color: var(--primary-color);
}

.timeline-date {
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 600;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
}

.timeline-company {
  font-size: 1rem;
  color: #4a5568;
  margin-bottom: 0.8rem;
  font-weight: 500;
}

.timeline-desc {
  font-size: 0.95rem;
  color: var(--text-dark);
  margin: 0;
  line-height: 1.6;
}

.timeline-list {
  margin: 0.5rem 0 0 1.2rem;
  padding: 0;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.timeline-list li {
  margin-bottom: 0.4rem;
}

/* === Mobile RWD === */
@media (max-width: 768px) {
    .nav-links {
        display: none; 
    }
    .nav-container {
        justify-content: center;
    }

    .profile-header {
        flex-direction: column-reverse;
        align-items: center;
        text-align: center;
        padding: 1.5rem;
    }

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

    .card {
        flex-direction: column;
    }

    .card-image {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 20px;
    }

    .research-image, .logo-container {
        width: 100%;
        min-height: auto;
    }

    .logo-container img {
        max-height: 80px; 
    }

    /* Timeline Mobile Adjustments */
    .timeline-item {
        gap: 1rem;
        padding-bottom: 2rem;
    }
    
    .timeline-marker {
        width: 50px;
        height: 50px;
        padding: 5px;
    }
    
    .timeline-item::before {
        left: 25px; /* Center of 50px */
        top: 50px;
    }
    
    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .timeline-date {
        margin-top: 4px;
        font-size: 0.8rem;
    }

    .news-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .news-date-badge {
        margin-bottom: 5px;
    }
}