/* ==================== 
   GENERAL STYLES 
===================== */
:root {
  --primary-color: #1a5276;
  --secondary-color: #3498db;
  --accent-color: #f39c12;
  --light-color: #f5f7fa;
  --dark-color: #2c3e50;
  --text-color: #333;
  --light-text: #f8f9fa;
  --light-gray: #ecf0f1;
  --medium-gray: #95a5a6;
  --dark-gray: #7f8c8d;
  --border-color: #e0e0e0;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --card-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  --hover-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
  --border-radius: 8px;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-color);
  display: flex;
  min-height: 100vh;
}

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

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
}

h1, h2, h3, h4, h5, h6 {
  margin-bottom: 1rem;
  line-height: 1.3;
  color: var(--dark-color);
}

p {
  margin-bottom: 1rem;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.primary-btn {
  background-color: var(--primary-color);
  color: white;
}

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

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

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

.section-title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 1rem;
}

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

/* ==================== 
   SIDEBAR STYLES 
===================== */
.sidebar {
  width: 280px;
  background-color: var(--primary-color);
  color: white;
  padding: 2rem;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 10;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

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

.profile-pic {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 1.5rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
}

.profile-pic:hover {
  transform: scale(1.05);
  border-color: var(--secondary-color);
}

.name {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: white;
}

.title {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.3rem;
}

.university {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.5rem;
}

.contact {
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.8;
  text-align: left;
}

.contact a {
  color: var(--secondary-color);
}

.contact a:hover {
  color: white;
  text-decoration: underline;
}

.social-links {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
  gap: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  transition: var(--transition);
}

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

/* ==================== 
   MAIN CONTENT STYLES 
===================== */
.main-content {
  flex: 1;
  margin-left: 280px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: 0; /* Remove any top padding */
}

/* ==================== 
   HERO SECTION 
===================== */
.hero {
  padding: 7rem 2rem 4rem;  /* Increased top padding to prevent overlap with navbar */
  background: linear-gradient(to right, #f5f7fa, #c3cfe2);
  position: relative;
  overflow: hidden;
  margin-top: 0; /* Ensure no margin is pushing content under navbar */
}

.hero-content {
  display: flex;
  flex-direction: row; /* Explicitly set to row */
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-text {
  flex: 1;
  max-width: 600px;
  z-index: 1;
}

.hero-text h2 {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.hero-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  color: var(--dark-color);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
}

.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* Data visualization animation */
.data-visualization {
  width: 350px;
  height: 350px;
  position: relative;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 30px rgba(52, 152, 219, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
}

.data-point {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--secondary-color);
  box-shadow: 0 0 10px var(--secondary-color);
  top: var(--y);
  left: var(--x);
  animation: pulse 3s infinite alternate var(--delay);
}

.data-line {
  position: absolute;
  height: 1px;
  width: 80%;
  background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.5), transparent);
  animation: rotate 20s linear infinite;
}

.data-line:nth-child(2) {
  animation-delay: -5s;
  width: 60%;
}

.data-line:nth-child(3) {
  animation-delay: -10s;
  width: 70%;
}

@keyframes pulse {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.2);
    opacity: 1;
  }
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.2);
    opacity: 1;
  }
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ==================== 
   HIGHLIGHTS SECTION 
===================== */
.highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 3rem 2rem;
  background-color: white;
}

.highlight-box {
  background-color: var(--light-color);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.highlight-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background-color: var(--primary-color);
  transition: var(--transition);
}

.highlight-box:hover {
  transform: translateY(-10px);
  box-shadow: var(--hover-shadow);
}

.highlight-box:hover::before {
  width: 100%;
  opacity: 0.05;
}

.highlight-icon {
  width: 60px;
  height: 60px;
  background-color: rgba(26, 82, 118, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  font-size: 1.5rem;
  transition: var(--transition);
}

.highlight-box:hover .highlight-icon {
  background-color: var(--primary-color);
  color: white;
}

.highlight-box h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.highlight-box p {
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

.highlight-box .btn {
  display: inline-block;
  padding: 8px 16px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: var(--transition);
}

.highlight-box .btn:hover {
  background-color: var(--secondary-color);
  color: white;
}

/* ==================== 
   EXPERTISE SECTION 
===================== */
.expertise-section {
  padding: 4rem 2rem;
  background-color: var(--light-color);
}

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

.expertise-card {
  background-color: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  text-align: center;
}

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

.expertise-icon {
  width: 70px;
  height: 70px;
  background-color: rgba(26, 82, 118, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--primary-color);
  font-size: 1.8rem;
  transition: var(--transition);
}

.expertise-card:hover .expertise-icon {
  background-color: var(--primary-color);
  color: white;
}

.expertise-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

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

/* ==================== 
   CONTACT BANNER 
===================== */
.contact-banner {
  padding: 3rem 2rem;
  background: linear-gradient(120deg, var(--primary-color), var(--secondary-color));
  color: white;
  text-align: center;
}

.contact-content {
  max-width: 700px;
  margin: 0 auto;
}

.contact-content h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: white;
}

.contact-content p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.contact-content .btn {
  background-color: white;
  color: var(--primary-color);
  border: none;
}

.contact-content .btn:hover {
  background-color: rgba(255, 255, 255, 0.9);
  transform: translateY(-3px);
}

/* ==================== 
   FOOTER STYLES 
===================== */
.footer {
  background-color: var(--dark-color);
  color: white;
  padding-top: 3rem;
  margin-top: auto;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  padding: 0 2rem 2rem;
}

.footer h3 {
  color: white;
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.8rem;
}

.footer h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background-color: var(--secondary-color);
}

.footer-contact p {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.footer-contact i {
  margin-right: 10px;
  color: var(--secondary-color);
}

.footer-contact a {
  color: rgba(255, 255, 255, 0.8);
}

.footer-contact a:hover {
  color: var(--secondary-color);
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition);
}

.footer-nav a:hover {
  color: var(--secondary-color);
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  padding: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

/* ==================== 
   TOP NAVIGATION 
===================== */
.topnav {
  background-color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: fixed; /* Changed from sticky to fixed */
  top: 0;
  right: 0;
  width: calc(100% - 280px); /* Adjusted width to account for sidebar */
  z-index: 1000; /* Increased z-index to ensure it stays on top */
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--dark-color);
  font-weight: 600;
  padding: 0.5rem 0;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 3px;
  background-color: var(--secondary-color);
  transition: var(--transition);
}

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

.nav-links a.active {
  color: var(--primary-color);
}

.mobile-menu-icon {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.mobile-menu-icon span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--dark-color);
  transition: var(--transition);
}

/* ==================== 
   ABOUT PAGE 
===================== */
.page-content {
  padding: 2rem;
  background-color: white;
  box-shadow: var(--card-shadow);
  border-radius: var(--border-radius);
  margin: 2rem;
}

.page-content h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--secondary-color);
}

.page-content p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.education-section, 
.experience-section {
  margin-top: 3rem;
}

.education-section h3,
.experience-section h3 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.education-card, 
.experience-card {
  background-color: var(--light-color);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}

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

.education-card h4, 
.experience-card h4 {
  color: var(--primary-color);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.education-card p, 
.experience-card p {
  margin-bottom: 0.5rem;
}

.education-card .year, 
.experience-card .period {
  font-weight: 600;
  color: var(--secondary-color);
}

.experience-card ul {
  margin-top: 0.8rem;
  margin-left: 1.5rem;
  list-style-type: disc;
}

.experience-card li {
  margin-bottom: 0.5rem;
}

/* ==================== 
   RESEARCH PAGE 
===================== */
.research-interests {
  margin-bottom: 3rem;
}

.publications-section {
  margin-top: 3rem;
}

.publications-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.publication-tab {
  padding: 0.8rem 1.5rem;
  background-color: var(--light-color);
  border-radius: 30px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.publication-tab.active,
.publication-tab:hover {
  background-color: var(--primary-color);
  color: white;
}

.publication-item {
  background-color: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  border-left: 4px solid var(--primary-color);
}

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

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

.publication-authors {
  font-style: italic;
  margin-bottom: 0.5rem;
}

.publication-journal {
  color: var(--dark-color);
  font-weight: 600;
}

.publication-year {
  display: inline-block;
  padding: 0.2rem 0.8rem;
  background-color: var(--secondary-color);
  color: white;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-left: 0.5rem;
}

.publication-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--secondary-color);
  font-weight: 600;
}

.publication-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.in-progress-section {
  margin-top: 3rem;
}

.in-progress-item {
  background-color: var(--light-color);
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  border-left: 4px solid var(--accent-color);
}

/* ==================== 
   TEACHING PAGE 
===================== */
.teaching-section {
  margin-bottom: 3rem;
}

.teaching-section h3 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.semester-box {
  background-color: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}

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

.semester-title {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.course-list {
  list-style-type: none;
}

.course-list li {
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--border-color);
}

.course-list li:last-child {
  border-bottom: none;
}

.previous-teaching {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.teaching-card {
  background-color: var(--light-color);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
}

.teaching-card h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.teaching-card ul {
  margin-left: 1.2rem;
  list-style-type: disc;
}

.teaching-card li {
  margin-bottom: 0.5rem;
}

.research-supervision {
  margin-top: 3rem;
}

.supervision-item {
  background-color: white;
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  box-shadow: var(--card-shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.supervision-item .project {
  flex: 1;
}

.supervision-item .semester {
  font-weight: 600;
  color: var(--secondary-color);
  white-space: nowrap;
}

/* ==================== 
   CV PAGE 
===================== */
.cv-section {
  margin-bottom: 3rem;
}

.cv-section h3 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--secondary-color);
}

.cv-download {
  text-align: center;
  margin-bottom: 2rem;
}

.skill-category {
  margin-bottom: 2rem;
}

.skill-category h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.skill-tag {
  padding: 0.5rem 1rem;
  background-color: var(--light-color);
  border-radius: 30px;
  font-size: 0.9rem;
}

.award-item {
  background-color: white;
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}

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

.award-name {
  font-weight: 600;
  color: var(--primary-color);
}

.award-institution {
  font-style: italic;
}

.award-period {
  color: var(--secondary-color);
  font-weight: 600;
}

/* ==================== 
   RESPONSIVE DESIGN 
===================== */
@media (max-width: 1100px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }
  
  .hero-text {
    max-width: 100%;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .data-visualization {
    width: 300px;
    height: 300px;
  }
}

@media (max-width: 992px) {
  .expertise-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  body {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    padding: 1.5rem;
  }
  
  .profile-info {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  
  .profile-pic {
    width: 120px;
    height: 120px;
    margin-bottom: 0;
  }
  
  .name-container {
    text-align: left;
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .topnav {
    width: 100%; /* Full width on mobile */
    position: fixed;
    justify-content: space-between;
    padding: 1rem;
  }
  
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: white;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
    gap: 1rem;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.3s ease;
    z-index: 5;
    opacity: 0;
    visibility: hidden;
  }
  
  .nav-links.active {
    transform: scaleY(1);
    opacity: 1;
    visibility: visible;
  }
  
  .mobile-menu-icon {
    display: flex;
  }
  
  .mobile-menu-icon.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .mobile-menu-icon.active span:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-menu-icon.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
  
  .highlights,
  .expertise-grid,
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  .expertise-grid {
    gap: 1.5rem;
  }
  
  .page-content {
    margin: 1rem;
    padding: 1.5rem;
  }
}

@media (max-width: 576px) {
  .hero-text h2 {
    font-size: 2rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
  }
  
  .hero-buttons .btn {
    width: 100%;
  }
  
  .data-visualization {
    width: 250px;
    height: 250px;
    margin: 0 auto;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .expertise-grid {
    grid-template-columns: 1fr;
  }
  
  .previous-teaching {
    grid-template-columns: 1fr;
  }
  
  .supervision-item {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .supervision-item .semester {
    margin-top: 0.5rem;
  }
}
