/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  background: #000000;
  transition: all 0.3s ease;
}

html.light-mode {
  background: #ffffff;
}

body {
  font-family: "Helvetica Neue-Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
  line-height: 1.6;
  color: #d0d0d0;
  background: #000000;
  min-height: 100vh;
  scroll-behavior: smooth;
  transition: all 0.3s ease;
}

body.light-mode {
  background: #ffffff;
  color: #000000;
}

.container {
  width: 100%;
  max-width: 2200px;
  margin: 0 auto;
  padding: 22px;
  background: #000000;
  transition: all 0.3s ease;
}

body.light-mode .container {
  background-color: #ffffff;
}

/* Header */
.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 1.5rem;
  padding: 2rem;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(255, 255, 255, 0.05);
  border: none;
  transition: all 0.3s ease;
}

body.light-mode .header {
  background: #f0f0f0;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.header h1 {
  font-size: 2.2rem;
  font-weight: 300;
  color: #f0f0f0;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

body.light-mode .header h1 {
  color: #000000;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.profile-img {
  width: 100%;
  max-width: 198px;
  height: auto;
  border-radius: 20px;
  margin-top: 1rem;
  border: none;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5), 0 4px 15px rgba(255, 255, 255, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-img:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
}

/* Sections */
section {
  margin-bottom: 0.8rem;
  padding: 0.8rem;
  background: transparent;
  border-radius: 15px;
  transition: all 0.3s ease;
}

body.light-mode section {
  background: transparent;
  border: none;
}

/* Ensure full background coverage for dark mode */
body, html {
  background-attachment: fixed;
}

/* Additional dark mode background fixes */
body:not(.light-mode) {
  background: #000000;
}

body:not(.light-mode) .container {
  background: #000000;
}

/* Ensure proper contrast in dark mode */
body:not(.light-mode) section {
  background: transparent;
}

body:not(.light-mode) .research-item,
body:not(.light-mode) .work-item,
body:not(.light-mode) .education-item,
body:not(.light-mode) .project-item {
  background: rgba(26, 26, 26, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

h2 {
  font-size: 1.6rem;
  font-weight: 300;
  color: #d8d8d8;
  margin-bottom: 0.8rem;
  border-bottom: 2px solid #404040;
  padding-bottom: 0.6rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  position: relative;
  transition: all 0.3s ease;
}

body.light-mode h2 {
  color: #000000;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-bottom: 2px solid #e0e0e0;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: #5a5a5a;
  border-radius: 1px;
  transition: all 0.3s ease;
}

body.light-mode h2::after {
  background: #4a4a4a;
}

/* Special styling for Recent Updates section */
.updates {
  background: transparent;
  border-radius: 0;
  padding: 1rem 0;
  border: none;
  margin-bottom: 1.2rem;
}

body.light-mode .updates {
  background: transparent;
  border: none;
}

.updates h2::after {
  background: currentColor;
  opacity: 0.3;
  width: 60px;
}

body.light-mode .updates h2::after {
  background: currentColor;
  opacity: 0.3;
}

/* Special styling for Research section */
.research {
  background: linear-gradient(135deg, #1f1f1f 0%, #2a2a2a 100%);
  border-radius: 16px;
  padding: 1.5rem;
  border: none;
  margin-bottom: 1.2rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(255, 255, 255, 0.03);
}

body.light-mode .research {
  background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
}

.research h2::after {
  background: #727171;
  width: 70px;
}

body.light-mode .research h2::after {
  background: #4a4a4a;
}

/* Special styling for Project section */
.project {
  background: linear-gradient(135deg, #1f1f1f 0%, #2a2a2a 100%);
  border-radius: 16px;
  padding: 1.5rem;
  border: none;
  margin-bottom: 1.2rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(255, 255, 255, 0.03);
}

body.light-mode .project {
  background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
}

.project h2::after {
  background: #727171;
  width: 75px;
}

body.light-mode .project h2::after {
  background: #4a4a4a;
}

/* Special styling for Work Experience section */
.work-experience {
  background: linear-gradient(135deg, #1f1f1f 0%, #2a2a2a 100%);
  border-radius: 16px;
  padding: 1.5rem;
  border: none;
  margin-bottom: 1.2rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(255, 255, 255, 0.03);
}

body.light-mode .work-experience {
  background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
}

.work-experience h2::after {
  background: #727171;
  width: 90px;
}

body.light-mode .work-experience h2::after {
  background: #4a4a4a;
}

/* Special styling for Education section */
.education {
  background: linear-gradient(135deg, #1f1f1f 0%, #2a2a2a 100%);
  border-radius: 16px;
  border: none;
  padding: 1.5rem;
  margin-bottom: 1.2rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(255, 255, 255, 0.03);
}

body.light-mode .education {
  background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
}

.education h2::after {
  background: #727171;
  width: 85px;
}

body.light-mode .education h2::after {
  background: #4a4a4a;
  width: 85px;
}

/* Special styling for Skills section */
.skills {
  background: linear-gradient(135deg, #1f1f1f 0%, #2a2a2a 100%);
  border-radius: 16px;
  border: none;
  padding: 1.5rem;
  margin-bottom: 1.2rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(255, 255, 255, 0.03);
}

body.light-mode .skills {
  background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
}

.skills h2::after {
  background: #727171;
  width: 75px;
}

body.light-mode .skills h2::after {
  background: #4a4a4a;
}

.skills-content {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  align-items: center;
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.3s ease;
}

.skill-item:hover {
  transform: translateY(-5px);
}

.skill-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 12px;
  margin-bottom: 0.5rem;
  transition: transform 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.skill-logo:hover {
  transform: scale(1.1);
}

.skill-item span {
  font-size: 1rem;
  font-weight: 500;
  color: #d0d0d0;
  transition: all 0.3s ease;
}

body.light-mode .skill-item span {
  color: #222;
}

/* Special styling for Service section */
.teaching-service {
  background: transparent;
  border-radius: 0;
  padding: 1.5rem 0;
  border: none;
  margin-bottom: 1.8rem;
}

body.light-mode .teaching-service {
  background: transparent;
  border: none;
}

.teaching-service h2::after {
  background: currentColor;
  opacity: 0.3;
  width: 60px;
}

body.light-mode .teaching-service h2::after {
  background: currentColor;
  opacity: 0.3;
}

p {
  font-size: 1rem;
  margin-bottom: 1.2rem;
  line-height: 1.7;
  color: #c8c8c8;
  transition: all 0.3s ease;
}

body.light-mode p {
  color: #000000;
}

/* Enhanced styling for Recent Updates list items */
.updates ul li {
  font-weight: 400;
  color: inherit;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0 0.5rem 1rem;
  background: transparent;
  border-radius: 0;
  border-left: 2px solid;
  border-left-color: currentColor;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.updates ul li::before {
  content: "";
  display: none;
}

.updates ul li:hover {
  opacity: 1;
  background: transparent;
  transform: none;
}

body.light-mode .updates ul li {
  color: inherit;
  background: transparent;
  border-left-color: currentColor;
}

body.light-mode .updates ul li:hover {
  background: transparent;
}

.updates ul li strong {
  color: inherit;
  font-weight: 600;
}

body.light-mode .updates ul li strong {
  color: inherit;
}

/* Feature styling for important dates (2024, 2025) */
.updates ul li strong.feature-date {
  position: static;
  display: inline;
  padding: 0;
  background: transparent;
  color: inherit;
  border-radius: 0;
  font-size: inherit;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: none;
  transition: none;
  margin-right: 0.5rem;
}

.updates ul li strong.feature-date:hover {
  transform: none;
  box-shadow: none;
  background: transparent;
}

.updates ul li strong.feature-date::before {
  content: "";
  margin-right: 0;
  color: inherit;
  font-size: inherit;
}

body.light-mode .updates ul li strong.feature-date {
  background: transparent;
  color: inherit;
  box-shadow: none;
}

body.light-mode .updates ul li strong.feature-date:hover {
  box-shadow: none;
  background: transparent;
}

/* Enhanced styling for Service section list items */
.teaching-service ul li {
  font-weight: 400;
  color: inherit;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0 0.5rem 1rem;
  background: transparent;
  border-radius: 0;
  border-left: 2px solid;
  border-left-color: currentColor;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.teaching-service ul li::before {
  content: "";
  display: none;
}

.teaching-service ul li:hover {
  opacity: 1;
  background: transparent;
  transform: none;
}

body.light-mode .teaching-service ul li {
  color: inherit;
  background: transparent;
  border-left-color: currentColor;
}

body.light-mode .teaching-service ul li:hover {
  background: transparent;
}

.teaching-service ul li strong {
  color: inherit;
  font-weight: 600;
}

body.light-mode .teaching-service ul li strong {
  color: inherit;
}

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 1rem;
  margin-top: 1rem;
}

.links a {
  color: #0066cc;
  text-decoration: none;
  margin: 0;
  padding: 0.5rem 1rem;
  font-weight: 400;
  transition: all 0.3s ease;
  border-radius: 8px;
  background: rgba(0, 102, 204, 0.1);
}

.links a:hover {
  color: #0052a3;
  transform: translateY(-2px);
  text-decoration: none;
  background: rgba(0, 102, 204, 0.2);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

body.light-mode .links a {
  color: #0066cc;
  background: rgba(0, 102, 204, 0.08);
}

body.light-mode .links a:hover {
  color: #0052a3;
  background: rgba(0, 102, 204, 0.15);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2);
}

/* About Section */
.about {
  text-align: justify;
  line-height: 1.6;
}

/* Research and Other Items */
.research-item, .work-item, .education-item, .project-item {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.2rem;
  background: linear-gradient(135deg, #1f1f1f 0%, #2a2a2a 100%);
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(255, 255, 255, 0.03);
  border: none;
  transition: all 0.3s ease;
}

body.light-mode .research-item, 
body.light-mode .work-item, 
body.light-mode .education-item, 
body.light-mode .project-item {
  background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  border: none;
}

.research-item::before, .work-item::before, .education-item::before, .project-item::before {
  content: none;
}

.research-item:hover, .work-item:hover, .education-item:hover, .project-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(255, 255, 255, 0.05);
  background: linear-gradient(135deg, #252525 0%, #303030 100%);
}

body.light-mode .research-item:hover, 
body.light-mode .work-item:hover, 
body.light-mode .education-item:hover, 
body.light-mode .project-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  border-color: rgba(0, 0, 0, 0.1);
}

.research-img, .work-img, .education-img {
  width: 100%;
  max-width: 242px;
  height: auto;
  border-radius: 8px;
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

.research-img:hover, .work-img:hover, .education-img:hover {
  transform: scale(1.03);
}

/* Education Logo Styling */
.education-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.work-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.education-logo {
  flex-shrink: 0;
  width: 115.5px;
  height: 115.5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.work-logo {
  flex-shrink: 0;
  width: 115.5px;
  height: 115.5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.university-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.university-logo:hover {
  transform: scale(1.05);
}

.education-content {
  flex: 1;
}

.work-content {
  flex: 1;
}

.research-content h3, .work-content h3, .education-content h3, .project-item h3 {
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  color: #d0d0d0;
  transition: all 0.3s ease;
}

body.light-mode .research-content h3, 
body.light-mode .work-content h3, 
body.light-mode .education-content h3, 
body.light-mode .project-item h3 {
  color: #222;
}

.research-content a, .project-item a {
  color: #007bff;
  text-decoration: none;
}

.research-content a:hover, .project-item a:hover {
  text-decoration: underline;
}

/* Lists */
ul {
  list-style: none;
}

ul li {
  font-size: 1rem;
  margin-bottom: 0.8rem;
  position: relative;
  padding-left: 1.5rem;
  color: #c0c0c0;
  line-height: 1.6;
  transition: all 0.3s ease;
}

body.light-mode ul li {
  color: #333;
}

ul li:before {
  content: "•";
  color: #007bff;
  position: absolute;
  left: 0;
}

/* Footer */
footer {
  text-align: center;
  font-size: 0.9rem;
  color: #a0a0a0;
  margin-top: 2rem;
  padding: 1.5rem;
  border-top: 2px solid #404040;
  background: #0f0f0f;
  border-radius: 15px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

body.light-mode footer {
  background: #f0f0f0;
  border-top: 2px solid #cccccc;
  color: #666666;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* Button Styles */
button {
  background: linear-gradient(135deg, #666666 0%, #999999 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 102, 102, 0.3);
  margin-bottom: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 102, 102, 0.4);
  background: linear-gradient(135deg, #444444 0%, #777777 100%);
}

button:active {
  transform: translateY(0);
}

/* Theme Toggle Button */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: linear-gradient(135deg, #444444 0%, #666666 100%);
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(68, 68, 68, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 120px;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  /* box-shadow: 0 8px 25px rgba(68, 68, 68, 0.4); */
  background: linear-gradient(135deg, #222222 0%, #444444 100%);
}

.theme-toggle.light {
  background: linear-gradient(135deg, #666666 0%, #999999 100%);
  box-shadow: 0 4px 15px rgba(102, 102, 102, 0.3);
}

.theme-toggle.light:hover {
  background: linear-gradient(135deg, #444444 0%, #777777 100%);
  box-shadow: 0 8px 25px rgba(102, 102, 102, 0.4);
}

body.light-mode .theme-toggle {
  background: linear-gradient(135deg, #666666 0%, #999999 100%);
  box-shadow: 0 4px 15px rgba(102, 102, 102, 0.3);
}

body.light-mode .theme-toggle:hover {
  background: linear-gradient(135deg, #444444 0%, #777777 100%);
  box-shadow: 0 8px 25px rgba(102, 102, 102, 0.4);
}

/* Responsive Design */
/* Mobile-first: Reduce font sizes by 5% for mobile devices */
@media (max-width: 767px) {
  .container {
    width: 110%;
    max-width: 110%;
    margin-left: -5%;
    padding: 22px;
  }
  
  .header h1 {
    font-size: 2.09rem;
  }
  
  h2 {
    font-size: 1.52rem;
  }
  
  h3 {
    font-size: 1.52rem;
  }
  
  p, ul li {
    font-size: 0.95rem;
  }
  
  .research-item, .work-item, .education-item {
    flex-direction: column;
    align-items: center;
  }
  
  .research-img, .work-img, .education-img {
    width: 133.1px;
    margin-right: 0;
    margin-bottom: 1rem;
  }
  
  .research-content, .work-content, .education-content {
    text-align: center;
  }
  
  .skills-content {
    gap: 1.5rem;
  }
  
  .skill-logo {
    width: 70px;
    height: 70px;
  }
  
  /* Better mobile content utilization */
  .header {
    padding: 1.5rem;
    margin-bottom: 1.2rem;
  }
  
  section {
    padding: 0.8rem;
    margin-bottom: 1rem;
  }
  
  .research-item, .work-item, .education-item {
    padding: 0.8rem;
  }
}

@media (min-width: 768px) {
  .container {
    width: 100%;
    max-width: 1900px;
    padding: 33px;
  }
  
  .header {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  .header h1 {
    font-size: 2.5rem;
  }

  .profile-img {
    margin-left: 2rem;
    margin-top: 0;
  }

  .research-item, .work-item, .education-item {
    flex-direction: row;
    align-items: center;
  }

  .research-img, .work-img, .education-img {
    width: 200.2px;
    margin-right: 1.5rem;
    margin-bottom: 0;
  }

  .research-content, .work-content, .education-content {
    flex: 1;
  }

  h2 {
    font-size: 1.8rem;
  }

  p {
    font-size: 1.1rem;
  }
}

@media (max-width: 768px) {
  .container {
    width: 110%;
    max-width: 110%;
    margin-left: -5%;
    padding: 22px;
  }
  
  /* Reduce font sizes by 5% for mobile/tablet */
  .header h1 {
    font-size: 2.09rem;
  }
  
  h2 {
    font-size: 1.71rem;
  }
  
  h3 {
    font-size: 1.52rem;
  }
  
  p, ul li {
    font-size: 1.045rem;
  }
}

@media (max-width: 480px) {
  .container {
    width: 110%;
    max-width: 110%;
    margin-left: -5%;
    padding: 22px;
  }

  .header h1 {
    font-size: 1.805rem;
  }

  .profile-img {
    max-width: 165px;
  }

  h2 {
    font-size: 1.354rem;
  }

  h3 {
    font-size: 1.083rem;
  }

  h4 {
    font-size: 0.993rem;
  }

  h5 {
    font-size: 0.903rem;
  }

  h6 {
    font-size: 0.812rem;
  }

  p, ul li {
    font-size: 0.903rem;
  }

  .research-img, .work-img, .education-img {
    max-width: 121px;
  }
  
  .skills-content {
    gap: 1rem;
  }
  
  .skill-logo {
    width: 60px;
    height: 60px;
  }

  .theme-toggle {
    top: 15px;
    right: 15px;
    padding: 10px 14px;
    font-size: 0.76rem;
    min-width: 100px;
  }
  
  /* Better content spacing for very small screens */
  .header {
    padding: 1.2rem;
  }
  
  section {
    padding: 0.6rem;
  }
  
  .research-item, .work-item, .education-item {
    padding: 0.6rem;
  }
  
  /* Improve link spacing on mobile */
  .links a {
    margin: 0.3rem;
    padding: 0.5rem 0.8rem;
  }
}