/*--------------------------------------------------------------
* Custom CSS: Chitchanok.org
* Updated: July 05 2027 with Bootstrap v5.3.3
* Author: RL
--------------------------------------------------------------*/
/*--------------------------------------------------------------
# Font & Color Variables
--------------------------------------------------------------*/
/* Fonts */
:root {
  --font-default:
    "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --font-primary: "Poppins", sans-serif;
  --font-secondary: "Montserrat", sans-serif;
}

/* Colors */
:root {
  --color-default: #212529;
  /*Shark*/
  --color-primary: #ff7a7a;
  /*Salmon*/
  --color-secondary: #ffffff;
  /*White*/
  --color-thirdly: #333333;
  /*Mine Shaft*/
  --color-primary-bg: #fff0f0;
  /*Forget Me Not*/
  --color-primary-mid: #fc9daa;
  /*Sweet Pink*/
  --color-primary-light: #ffd2d2;
  /*Cosmos*/
  --color-highlight-award: #f00da0;
  /*Hollywood Cerise*/
  --color-text-gray: #6c757d;
  /*Pale Sky*/
  --color-text-publications: #004040;
  /*Rich Black*/
}

/* Smooth scroll behavior */
:root {
  scroll-behavior: smooth;
}

/*--------------------------------------------------------------
# General
--------------------------------------------------------------*/
html,
body {
  min-height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--color-secondary);
  font-family: var(--font-primary);
  color: var(--color-default);
}

main {
  flex: 1;
}

a {
  color: var(--color-default);
  text-decoration: none !important; /* Ensures underline is removed */
  transition: color 0.3s ease; /* Smooth transition for color change */
}

a:hover {
  color: var(--color-primary);
  text-decoration: none !important; /* Ensures no underline on hover */
}

.btn-outline {
  margin-top: 1rem;
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-secondary);
  border-radius: 13px;
}

.btn-outline:hover {
  background-color: var(--color-secondary);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Heading Styles */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-primary);
  color: var(--color-default);
}

h2 {
  font-size: 2rem;
  font-weight: 700;
}

/* Style the dotted line divider*/
.section-divider {
  border: none;
  border-top: 2px dotted var(--color-thirdly);
  /* thickness and color of dotted line */
  margin: 30px auto;
  /* Adds spacing around the divider */
  width: 85%;
  /* Adjust width to control how far the line stretches across the page */
  opacity: 5;
  /* Slight opacity for subtle effect */
}

.topic {
  font-weight: bold;
  color: var(--color-primary);
}

.text-link {
  font-weight: bold;
  color: var(--color-text-gray);
}

.btn-outline .bi-plus-circle,
.bi-bookmark {
  margin-right: 0.5rem;
}

.bi-box-arrow-up-right,
.bi-award {
  margin-left: 0.3rem;
}

.bi-filetype-pdf,
.bi-github {
  margin-left: 0.4rem;
  margin-right: 0.4rem;
}

/* Navbar */
.navbar {
  background-color: var(--color-secondary);
}

.nav-link {
  font-size: 1.1rem;
  font-weight: 550 !important;
  color: var(--color-default);
  transition:
    color 0.3s ease,
    font-weight 0.3s ease;
}

.dropdown-toggle {
  margin-left: 0px !important;
}

.dropdown-item:focus,
.dropdown-item:active {
  background-color: transparent !important;
  outline: none;
}

.dropdown-submenu {
  position: relative;
}

.dropdown-submenu .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -6px;
}

.dropdown-submenu:hover > .dropdown-menu {
  display: block;
}

.dropdown-item.dropdown-toggle::after {
  margin-left: 15px;
}

.nav-link:hover {
  font-weight: 700;
  color: var(--color-primary) !important;
}

.navbar-brand {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--color-default);
}

.navbar-brand:hover {
  color: var(--color-primary) !important;
}

/* Additional padding/margins for the navbar items if needed */
.navbar-nav .nav-link {
  font-size: 1.1rem;
  margin-left: 20px;
  font-weight: 400;
  color: var(--color-default);
}

.navbar .btn-primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-secondary);
  /* border-radius: 20px; TODO */
}

.btn-outline-primary {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-outline-primary:hover {
  background-color: var(--color-primary);
  color: var(--color-secondary);
}

/* Header Section Customizations */
header {
  padding: 60px 0;
  /* Adjust for vertical spacing */
  background-color: var(--color-secondary);
}

header h1 {
  font-weight: 700;
  font-size: 2.5rem;
  color: var(--color-thirdly);
  line-height: 1.2;
  margin-bottom: 15px;
}

header p.email {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1rem;
  color: var(--color-primary);
}

header p {
  font-size: 1rem;
  color: var(--color-thirdly);
  line-height: 1.5;
}

header a.link {
  color: var(--color-default);
  text-decoration: none !important; /* Ensures underline is removed */
  border-bottom: 2px solid var(--color-primary);
}

header a.link :hover {
  color: var(--color-primary);
  text-decoration: none !important; /* Ensures underline is removed */
}

/* Image styling for the header */
img.rounded {
  border-radius: 0.8rem !important;
  max-width: 76%;
  width: 76%;
  /* Ensure full width */
  height: auto;
  /* Maintain aspect ratio */
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  /* Add shadow effect */
}

/* Header Layout */
header .row {
  display: flex;
  align-items: center;
}

header .col-md-4 img {
  max-width: 90%;
  /* Adjust image size to fit the design */
  margin: 0 auto;
  /* Center the image */
}

header .col-md-8 {
  padding-left: 30px;
  /* Add space between text and image */
}

/* Offset each section to prevent overlap with the fixed navbar */
section {
  padding-top: 80px; /* Adjust based on your navbar height */
  margin-top: -80px; /* Negative margin to counteract the padding */
}

/*--------------------------------------------------------------
# News Section Styling
--------------------------------------------------------------*/
.news-section {
  /* margin-top: 3rem; */
  margin-bottom: 3rem;
}

.news-header {
  font-weight: bold;
  margin-bottom: 2rem;
}

.news-container {
  background-color: var(--color-secondary);
}

.news-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  column-gap: 2rem;
  align-items: start;
  margin-bottom: 1.5rem;
}

.news-date {
  font-size: 1rem;
  font-style: italic;
  color: var(--color-primary);
  margin: 0;
  white-space: nowrap;
}

.news-content {
  font-size: 1rem;
  color: var(--color-thirdly);
  margin: 0;
}

.news-award {
  font-weight: bold;
  color: var(--color-primary);
}

.news-event {
  font-style: italic;
  font-size: 1rem;
  font-weight: bold;
  color: var(--color-text-gray);
  transition: color 0.3s ease;
  /* Smooth transition */
}

.news-event:hover {
  color: var(--color-primary);
  /* Change to primary color on hover */
}

/* .news-event .bi {
  margin-left: 0.5rem;
} */

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
  .news-item {
    grid-template-columns: 1fr;
    row-gap: 0.25rem;
  }

  .news-date {
    margin-bottom: 0.25rem;
  }

  .news-content {
    margin-bottom: 1rem;
  }
}

/*--------------------------------------------------------------
  # Service Section Styling
--------------------------------------------------------------*/
.service-section {
  /* margin-top: 3rem; */
  margin-bottom: 3rem;
}

.service-container {
  background-color: var(--color-secondary);
}

.service-list {
  /* background-color: #f9f9f9; */
  padding: 1.5rem;
  /* border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); */
}

.service-item {
  display: flex;
  align-items: center;
}

.service-icon {
  font-size: 1.2rem;
  color: var(--color-primary);
}

.service-year {
  font-weight: bold;
  color: var(--color-thirdly);
}

.service-org {
  font-weight: 500;
  color: var(--color-text-gray);
}

.service-event {
  font-size: 1rem;
  font-weight: bold;
  color: var(--color-default);
  transition: color 0.3s ease;
}

.service-event:hover {
  color: var(--color-primary);
}

.service-content {
  flex: 1;
  color: var(--color-thirdly);
  font-size: 1rem;
}

.service-container .btn-outline {
  margin-top: 1rem;
  border-color: var(--color-primary);
  background-color: var(--color-secondary);
  color: var(--color-primary);
}

.service-container .btn-outline:hover {
  background-color: var(--color-primary);
  color: var(--color-secondary);
}

.service-topic-underline {
  color: var(--color-primary);
  font-weight: 500;
  position: relative;
  display: inline-block;
  font-size: 1.25rem; /* fs-5 */
}

.service-topic-underline::after {
  content: "";
  display: block;
  width: 100%;
  /* Set the fixed length here */
  /* width: 100%; Set the length according to text */
  height: 1px;
  /* Adjust the thickness here */
  background-color: var(--color-primary);
  position: absolute;
  bottom: -5px;
  /* Adjust the distance from the text */
  left: 0;
}

/*--------------------------------------------------------------
  # Award Section Styling
--------------------------------------------------------------*/
.awards-section {
  margin-top: 3rem;
  /* margin-bottom: 3rem; */
}

.awards-header {
  font-weight: bold;
  margin-bottom: 1rem;
}

.awards-list {
  /* background-color: var(--color-secondary); */
  padding: 1.5rem;
  /* border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); */
}

.awards-item {
  padding-bottom: 0rem;
}

.awards-item:last-child {
  border-bottom: none;
}

.awards-year {
  font-size: 1.3rem;
  color: var(--color-text-gray);
  font-weight: bold;
  font-style: italic;
  text-decoration: none;
  transition: color 0.3s ease;
  margin-bottom: 0rem;
}

.awards-year:hover {
  text-decoration: none;
  color: var(--color-primary);
}

.awards-title {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--color-default);
  margin-bottom: 0.25rem;
}

.awards-description {
  color: var(--color-text-gray);
}

/* .awards-container .btn-outline-danger {
  margin-top: 1rem;
  border-color: var(--color-primary);
  background-color: var(--color-secondary);
  color: var(--color-primary);
}

.awards-container .btn-outline-danger:hover {
  background-color: var(--color-primary);
  color: var(--color-primary);
} */
/*--------------------------------------------------------------
  # Grants and Funding Section Styling
--------------------------------------------------------------*/
.grants-section {
  margin-top: 3rem;
  margin-bottom: 3rem;
}

.grants-header {
  font-weight: bold;
  margin-bottom: 1rem;
}

.grants-card {
  background-color: var(--color-primary-bg);
  border-radius: 10px;
  border: 1px solid var(--color-primary-bg);
  display: flex;
  flex-direction: column;
  justify-content: first baseline;
  height: 100%;
  padding: 20px;
  text-align: left;
}

.grants-card h5 {
  font-weight: 700;
  color: var(--color-thirdly);
}

.grants-card p {
  font-size: 1rem;
  color: var(--color-thirdly);
}

.grants-card p strong {
  font-size: 1.1rem;
  color: var(--color-primary);
}

/* Logo Row */
.logo-img {
  max-height: 65px;
  /* Adjust to control logo height */
  width: auto;
  margin: auto;
  display: block;
  transition: opacity 0.3s ease;
}

.logo-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

/*--------------------------------------------------------------
# Language Skills Section
--------------------------------------------------------------*/
.language-section {
  margin-top: 2rem;
  /* margin-bottom: 3rem; */
}

.language-header {
  font-weight: bold;
  margin-bottom: 3rem;
}

.language-circle {
  width: 80px;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--color-primary);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-secondary);
  border-radius: 50%;
  margin: 0 auto;
}

.language-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.language-name {
  font-weight: bold;
}

h5 {
  font-weight: 600;
  margin-top: 10px;
}

.language-level {
  font-size: 0.9rem;
  color: var(--color-text-gray);
  font-size: 1rem;
}

.flex-fill {
  flex: 1 1 auto;
  /* Ensures items fill space evenly */
  max-width: 130px;
  /* Sets a max width to maintain balance */
}

/*--------------------------------------------------------------
# Pink Glow Styling
--------------------------------------------------------------*/

.section-pink-glow-wide {
  position: relative;
  overflow: visible;
}

.section-pink-glow-wide::before {
  content: "";
  position: absolute;
  z-index: -1;

  width: 120%;
  height: 420px;

  left: 50%;
  top: -120px;
  transform: translateX(-50%);

  background: radial-gradient(
    ellipse 100% 85% at center,
    rgba(255, 122, 122, 0.16) 0%,
    rgba(255, 210, 210, 0.12) 35%,
    rgba(255, 240, 240, 0.08) 58%,
    rgba(255, 255, 255, 0) 82%
  );

  pointer-events: none;
}

/*--------------------------------------------------------------
# Footer Section
--------------------------------------------------------------*/
footer {
  margin-top: auto;
  background-color: var(--color-primary-bg);
  padding: 20px 0;
}

.copyright {
  text-align: center;
}

footer h4.nav-title {
  font-weight: bold;
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 0.5rem;
}

footer ul {
  list-style-type: none;
  padding: 0;
}

footer ul li {
  margin-bottom: 10px;
}

footer a {
  color: var(--color-thirdly);
  text-decoration: none;
}

footer a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/*--------------------------------------------------------------
# Publications Page Style
--------------------------------------------------------------*/
/* .publications-section {
  margin-top: 2rem;
} */

.publications-section h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.publications-topic-underline {
  color: var(--color-primary);
  /* font-weight: 500; */
  font-size: 1.25rem; /* fs-5 */
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
}

.publications-topic-underline::after {
  content: "";
  display: block;
  width: 100%;
  /* Set the fixed length here */
  /* width: 100%; Set the length according to text */
  height: 1px;
  /* Adjust the thickness here */
  background-color: var(--color-primary);
  position: absolute;
  bottom: -5px;
  /* Adjust the distance from the text */
  left: 0;
}

.text-publications {
  color: var(--color-text-publications);
  font-size: 1.1rem;
  font-weight: bold;
}

.text-detail {
  color: var(--color-default);
}

.authors {
  color: var(--color-default);
  margin-top: -0.5rem;
  font-size: 1rem;
}

.event {
  color: var(--color-default);
  margin-top: -0.5rem;
  font-size: 1rem;
  font-weight: bold;
}

.award {
  color: var(--color-primary);
  margin-top: -0.5rem;
  font-size: 1.1rem;
  font-weight: normal;
  font-style: italic;
}

.software {
  color: var(--color-default);
  margin-top: -0.5rem;
  font-size: 1rem;
  font-weight: normal;
}

/* Item Styling */
.publications-item {
  margin-bottom: 2rem;
  /* padding-bottom: 1rem; */
  /* border-bottom: 1px dotted #ddd; */
}

.publications-item:last-child {
  border-bottom: none;
}

.pdf-link {
  color: var(--color-default);
  text-decoration: none;
}

.pdf-link:hover {
  color: var(--color-primary);
  text-decoration: none;
}

/*--------------------------------------------------------------
# Impact Page Style
--------------------------------------------------------------*/
.impact-section {
  margin-top: 7rem;
  padding: 4rem 0;
}

.impact-section h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  top: 5rem;
}

.impact-topic-underline {
  color: var(--color-primary);
  font-size: 1.25rem; /* fs-5 */
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
}

.impact-topic-underline::after {
  content: "";
  display: block;
  width: 100%;
  /* Set the fixed length here */
  height: 1px;
  /* Adjust the thickness here */
  background-color: var(--color-primary);
  position: absolute;
  bottom: -5px;
  /* Adjust the distance from the text */
  left: 0;
}

.impact-header-content {
  position: relative;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.impact-header-image {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.impact-header-description {
  position: flex;
  /* top: 20px; */
  /* Adjust to control vertical position */
  /* left: 20px; */
  /* Adjust to control horizontal position */
  color: var(--color-default);
  /* max-width: 65%; */
  /* padding: 20px; */
  /* background: rgba(0, 0, 0, 0.6); */
  /* Semi-transparent background for readability */
  /* border-radius: 10px; */
  /* margin-bottom: 5rem; */
}
@media (max-width: 768px) {
  .impact-header-description {
    font-size: 0.875rem;
    padding: 10px;
  }
}

.impact-header-description p {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.5;
  font-style: italic;
}

/* Topics Section */
.impact-topic-title {
  font-size: 1.5rem;
  color: var(--color-primary);
  font-weight: bold;
}

.impact-topics {
  font-size: 1.1rem;
  display: flex;
  gap: 10px;
}

.impact-topic-button {
  padding: 8px 15px;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  border-radius: 20px;
  background: none;
  font-weight: normal;
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
  text-decoration: none;
}

.impact-topic-button:hover {
  background-color: var(--color-primary);
  color: var(--color-secondary);
}

/* Project Description */
.impact-project-content {
  margin-top: 1rem;
  margin-bottom: 5rem;
  /*padding-top: 60px; /* Adjust if needed */
  /*margin-top: -60px; /* Offset to prevent title from hiding under navbar */
}

.impact-project-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--color-default);
  margin-bottom: 15px;
}

.impact-project-description {
  color: var(--color-default);
}

/* Impact project content with image side by side */
.impact-project-content-side {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 20px 0;
}

.impact-project-image-side {
  flex: 1;
  max-width: 40%;
}

.project-image-side {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.impact-project-description-side {
  flex: 2;
  max-width: 60%;
  color: var(--color-default);
}

/* Talks and Slides Section */
.impact-talks-title {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--color-text-publications);
  margin-bottom: 10px;
}

.impact-talks-detail {
  color: var(--color-default);
}

.impact-talks-award {
  color: var(--color-primary);
  font-weight: bold;
}

.impact-talks-event {
  color: var(--color-text-gray);
  font-weight: bold;
  font-style: italic;
  text-decoration: none;
}

.impact-talks-invited {
  color: var(--color-text-gray);
  margin-top: -0.5rem;
  font-size: 1rem;
  font-weight: normal;
  font-style: italic;
}

.pdf-link {
  color: var(--color-default);
  text-decoration: none;
  font-weight: bold;
}

.pdf-link:hover {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: bold;
}

.impact-talks-item {
  margin-bottom: 2rem;
}

.impact-item:last-child,
.impact-item:last-child {
  border-bottom: none;
}

.impact-project-footer {
  font-size: 0.875rem;
  color: var(--color-text-gray);
  font-style: italic;
}

/*--------------------------------------------------------------
# Supervision Page Style
--------------------------------------------------------------*/
/* .supervision-section {
  margin-top: 2rem;
} */

.supervision-section h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.supervision-topic-underline {
  color: var(--color-primary);
  /* font-weight: 500; */
  font-size: 1.25rem;
  /* fs-5 */
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
}

.supervision-topic-underline::after {
  content: "";
  display: block;
  width: 100%;
  /* Set the fixed length here */
  /* width: 100%; Set the length according to text */
  height: 1px;
  /* Adjust the thickness here */
  background-color: var(--color-primary);
  position: absolute;
  bottom: -5px;
  /* Adjust the distance from the text */
  left: 0;
}

.student {
  color: var(--color-text-publications);
  font-size: 1.1rem;
  font-weight: bold;
}

.text-detail {
  color: var(--color-default);
}

.supervisor {
  color: var(--color-text-gray);
  margin-top: -0.5rem;
  font-size: 1rem;
  font-style: italic;
}

.award {
  color: var(--color-primary);
  margin-top: -0.5rem;
  font-size: 1.1rem;
  font-weight: normal;
  font-style: italic;
}

/* Item Styling */
/* .supervision-item {
  padding-bottom: 1rem;
  border-bottom: 1px dotted #ddd;
} */

.supervision-item:last-child,
.supervision-item:last-child {
  border-bottom: none;
}

.supervisor-link {
  color: var(--color-text-gray);
  text-decoration: none;
  font-weight: bold;
  font-style: italic;
}

.supervisor-link:hover {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: bold;
  font-style: italic;
}

/*--------------------------------------------------------------
# Back to Top Button Style
--------------------------------------------------------------*/
.back-to-top {
  position: fixed;
  bottom: 30px;
  /* Adjust to lift it slightly above the footer */
  right: 30px;
  /* Adjust as needed */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background-color: var(--color-primary);
  color: var(--color-secondary);
  padding: 10px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.back-to-top.show {
  opacity: 1;
  /* Show button when scrolled down */
}

.back-to-top i {
  font-size: 1.5rem;
  margin: 0;
}

.back-to-top p {
  font-size: 0.75rem;
  margin: 5px 0 0 0;
  color: var(--color-secondary);
}

/* Hover Effect */
.back-to-top:hover {
  background-color: var(--color-primary-mid);
}
