/* Duc-Cuong VU */
/* ===============================
   🌗 Light/Dark Mode Variables
=================================*/

:root {
  /* --bg-color: #f2f8f3; */
  --bg-color: #ffffff;
  --text-color: #2c2c2c;
  --header-bg: #ffffff;
  --section-bg: #ffffff;
  --link-color: #007acc;
  --link-color: #007acc;
  --link-hover-color: #005c99;
  --border-color: #ccc;
  --footer-bg: #f8f9fa;
  --footer-text-color: #666666;
  --box-shadow-color: rgba(0, 0, 0, 0.06);
}

body.dark-mode {
  --bg-color: #121212;
  --text-color: #e0e0e0;
  --header-bg: #1f1f1f;
  --section-bg: #2a2a2a;
  --link-color: #58a6ff;
  --link-hover-color: #1e90ff;
  --border-color: #444;
  --footer-bg: #1f1f1f;
  --footer-text-color: #aaa;
  --box-shadow-color: rgba(0, 0, 0, 0.8);
}

/* ===== navigation ===== */
/* Navigation bar */
.navbar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%); /* căn giữa */
  background: var(--bg-color);;
  padding: 10px 20px;
  display: flex;
  justify-content: left;
  gap: 20px;
  z-index: 1000;
  max-width: 1000px;  /* Giống body */
  width: 100%;        /* Để nó mở rộng trong max-width */
  box-sizing: border-box;
}

.navbar a {
  text-decoration: none;
  color: var(--text-color);
  font-size: 14px;
}

.navbar a:hover {
  color: var(--link-color);
}

@media (max-width: 768px) {
  .navbar a:not(.navbar-logo) { 
    display: none; /* Ẩn các link, chỉ còn logo */
  }
  #darkModeToggle {
    margin-left: auto;
  }
  .navbar {
    padding: 8px 12px;
  }
}



.content {
  padding-top: 20px;
  padding: 20px;
}

/* ===============================
   🧱 Base Layout
=================================*/
body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.7;
  background: var(--bg-color);
  color: var(--text-color);
  max-width: 1000px;
  margin: auto;
  transition: background-color 0.3s ease, color 0.3s ease;
  scroll-behavior: smooth;
}

.bg-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: url('images/bg.jpg') center/cover no-repeat;
  filter: blur(8px);
  opacity: 0.4;
  z-index: -1;
  transition: filter 0.3s ease, opacity 0.3s ease;
}
body.dark-mode .bg-overlay {
  filter: blur(10px) brightness(0.5);
  opacity: 0.3;
}

.content {
  position: relative;
  padding-top: 60px;
  min-height: 100vh;
}




/* ===============================
   📝 Typography
=================================*/


h1 {
  font-size: 35px;
  font-weight: 540;
  margin-bottom: 10px;
}

h2.section-title {
  font-size: 25px;
  font-weight: 540;
  margin-bottom: 25px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-color);
}

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

a:hover {
  color: var(--link-hover-color);
  text-decoration: underline;
}


strong { color: var(--text-color); }
b {
  font-weight: 550;
  color: var(--text-color);
}
em { color: #999; }
i { color: var(--text-color); }


.pub-info p {
  margin: 5px 0;
  font-size: 1em;
  line-height: 1.5;
}
/* ===============================
   🔗 Links
=================================*/
.contact a, footer a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.3s;
}
.contact a:hover, footer a:hover, footer a:focus {
  color: var(--link-hover-color);
  text-decoration: underline;
}


/* ===============================
   📄 Lists & Blocks
=================================*/
.news-box {
  height: 150px;
  /* border: 1px solid #ddd; */
  /* border-radius: 8px; */
  /* padding: 1rem; */
  overflow-y: auto;
  /* background-color: #fefefe; */
  /* box-shadow: 0 2px 8px rgba(0,0,0,0.05); */
}

.news-content {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  font-size: 0.9em;
}

.news-item {
  display: flex;
  gap: 1rem;
  font-size: 1em;
  line-height: 1.4;
}

.news-date {
  color: var(--text-color);
  min-width: 150px;
  /* text-align: right; */
  font-size: 1em;
}

.news-text {
  color: var(--text-color);
  flex: 2;
  font-size: 1em;
}

ul {
  padding-left: 25px;
  margin-top: 8px;
}
ul li {
  margin-bottom: 6px;
}

.subsection,
.project-item,
.pub-item,
.conf-item,
.award-item,
.skill-item,
.activity-item,
.work-item,
.edu-item {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border-color);
}
.subsection:last-child,
.project-item:last-child,
.pub-item:last-child,
.conf-item:last-child,
.award-item:last-child,
.skill-item:last-child,
.activity-item:last-child,
.work-item:last-child,
.edu-item:last-child {
  border-bottom: none;
}

/* ===============================
   🎓 Education
=================================*/
.edu-degree {
  font-weight: 540;
  font-size: 1.0em;
}
.edu-school { color: #777; margin-top: 2px; }
.edu-date { font-style: italic; color: #777; margin-top: 5px; }
.edu-details { margin-top: 10px; padding-left: 20px; }
.edu-details li { margin-bottom: 5px; }

.edu-item {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
}
.edu-img img {
  width: 50px;
  max-width: 100%;
  border-radius: 0px;
}
.edu-info {
  flex: 1;
  min-width: 250px;
}


/* ===============================
   Work Experience
=================================*/
.work-role {
  font-weight: 540;
  font-size: 1.0em;
}
.work-institute { color: #777; margin-top: 2px; }
.work-date { font-style: italic; color: #777; margin-top: 5px; }
.work-details { margin-top: 10px; padding-left: 20px; }
.work-details li { margin-bottom: 5px; }

.work-item {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
}
.work-img img {
  width: 50px;
  max-width: 100%;
  border-radius: 0px;
}
.work-info {
  flex: 1;
  min-width: 250px;
}

/* ===============================
   🚀 Projects
=================================*/
.project-role { font-weight: 540; }
.project-date { font-style: italic; color: #777; }
.project-details { margin-top: 10px; padding-left: 20px; }
.project-details li { margin-bottom: 5px; }
.project-works { margin-top: 10px;}

.project-item {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
}
.project-img img {
  width: 400px;
  max-width: 100%;
  border-radius: 0px;
}
.project-info {
  flex: 1;
  min-width: 250px;
}

/* ===============================
   📱 Responsive
=================================*/
@media (max-width: 768px) {
  .project-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .project-info { text-align: left; }
  header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* ===============================
   📚 Publications
=================================*/
.pub-item {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
}
.pub-img img {
  width: 280px;
  max-width: 100%;
  border-radius: 0px;
}
.pub-info {
  flex: 1;
  min-width: 250px;
}

/* ===============================
   📍 Conferences 
=================================*/
.skill, .award-title, .activity-title {
  font-weight: 540;
}
.skill-detail, .award-org, .activity-detail {
  font-style: italic;
  color: var (--text-color);
  margin-top: 3px;
}


/* ===============================
   📱 Responsive
=================================*/
@media (max-width: 768px) {
  .pub-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .pub-info { text-align: left; }
  header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* ===============================
   🧱 Header Layout
=================================*/
header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

header > div {
  flex: 1 1 300px;
}

header img {
  max-width: 100%;
  height: auto;
  border-radius: 0px;
}


@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: center;   
    text-align: center;
  }
  header > div {
    flex: unset;                
  }
  header img {
    margin: 10px auto;
  }
  header p{
    text-align: left;
  }
  header h2 {
    text-align: left;
    width: 100%;
  }
}


/* ===============================
   📝 Abstract Toggle
=================================*/
.abstract-content {
  display: none; /* hidden by default */
  margin-top: 10px;
  /* padding: 10px; */
  /* background: #f8f8f8; */
  /* border-left: 3px solid #0077cc; */
  /* border-radius: 6px; */
  text-align: left;  /* align text with p text */
}
.abstract-toggle {
  background: none;      /* remove gray background */
  border: none;          /* remove border */
  padding: 0;            /* remove extra padding */
  margin: 0;             /* align with text */
  font: inherit;         /* inherit font from <p> */
  color: var(--link-color);        /* match your link color */
  cursor: pointer;
  text-align: left;      /* align text flush left */
}

.abstract-toggle:hover {
  text-decoration: underline;
  color: var(--link-hover-color);
}



/* ===============================
   🦶 Footer
=================================*/
footer {
  text-align: center;
  color: var(--footer-text-color);
  font-size: 12px;
  border-top: 1px solid var(--border-color);
}
footer p { margin: 5px 0; }


/* ===============================
   🌙 Dark Mode Toggle
=================================*/
/* #darkModeToggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 25px;
  background: var(--link-color);
  color: white;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
} */

#darkModeToggle {
  margin-left: auto;  
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-color);
}

#darkModeToggle:hover {
  /* background: var(--link-hover-color); */
  transform: scale(1.1);
}
#darkModeToggle:active {
  transform: scale(0.95);
}

/* body.dark-mode #darkModeToggle { */
  /* background: #444; */
  /* color: #f0e68c; */
/* } */
/* body.dark-mode #darkModeToggle:hover { */
  /* background: #666; */
/* } */
/* 
#darkModeToggle:hover {
  color: var(--link-color);
} */


:target::before {
  content: "";
  display: block;
  height: 40px;
  margin-top: -40px;
}