/* 1. root colours */
:root {
  /* research card */
  --colour-background-research: hsla(49, 32%, 90%, 0.6);
  --colour-border-research: hsl(0, 1%, 18%);

  /* contact card */
  --colour-background-contact: hsla(22, 33%, 94%, 0.579);
  --colour-border-contact: hsl(0, 1%, 18%);

  --colour-shadow1: rgba(40, 40, 40, 0.4);
  --colour-shadow2: rgba(240, 239, 239, 0.6);

  /* shadows */
  --shadow1: -2px -2px 2px 1px var(--colour-shadow1);
  --shadow2: -1px -1px 2px 1px var(--colour-shadow2);
  --shadow1-hover: 2px 2px 2px 0px var(--colour-shadow1);
  --shadow2-hover: 1px 1px 5px 1px var(--colour-shadow2);

  /* info-box icons */
  --colour-stroke: hsl(215, 16%, 47%);
}

:root.dark {
  /* research card */
  --colour-background-research: hsla(60, 58%, 10%, 0.8);
  --colour-border-research: hsla(0, 0%, 0%, 0.6);

  /* contact card */
  --colour-background-contact: hsla(0, 0%, 0%, 0.8);
  --colour-border-contact: hsla(0, 0%, 25%, 0.6);

  --colour-shadow1: hsla(0, 0%, 93%, 0.4);
  --colour-shadow2: hsla(226, 61%, 16%, 0.5);

  /* shadows */
  --shadow1: -2px -2px 2px 1px var(--colour-shadow1);
  --shadow2: -1px -1px 2px 1px var(--colour-shadow2);
  --shadow1-hover: 2px 2px 2px 1px var(--colour-shadow1);
  --shadow2-hover: 1px 1px 2px 1px var(--colour-shadow2);

  /* info box icons */
  --colour-stroke: hsl(213, 27%, 84%);
}

/* page container from header - small fix for index.php */
.page-container {
  gap: 0.5rem;
}

/* name and position */
.name {
  font-size: clamp(1.3rem, 1.3vw, 1.5rem);
  font-family: var(--font-head);
  font-weight: bold;
}
.position {
  font-size: clamp(0.8rem, 0.8vw, 1rem);
  font-family: var(--font-text);
  font-style: italic;
}
/* ------------------ */

/* phd and supervisor - optional */
.academic-introduction {
  display: none;
  width: 100%;
  text-wrap: pretty;
  font-size: clamp(1rem, 1vw, 1.2rem);
  font-family: var(--font-text);
  padding-bottom: 0.5rem;
}
/* ---------------- */

/* headers for every subsequent section */
.header-section {
  text-wrap: nowrap;
  text-decoration: underline;
  font-size: clamp(1rem, 1vw, 1.2rem);
}

/* ------------------ */

/* research box */
/* container box */
.research-box {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-xl);
  width: 100%;
  gap: 0.1rem;
  padding: 0.6rem;
  background-color: var(--colour-background-research);
  border: 0.15rem solid var(--colour-border-research);
  box-shadow: var(--shadow1), var(--shadow2);
}
.research-box:hover {
  box-shadow: var(--shadow1-hover), var(--shadow2-hover);
}

/* research interests subjects */
.research-interests {
  font-size: clamp(1rem, 1vw, 1.2rem);
  /* display: flex; */
  /* width: 95%; */
  text-wrap: pretty;
  /* align: center; */
  align-items: baseline;
}
.subjects {
  text-indent: 0.8rem;
  font-size: clamp(0.9rem, 0.9vw, 1rem);
}

/* brief research summary */
.research-summary {
  text-indent: 0.8rem;
  font-size: clamp(0.9rem, 0.9vw, 1rem);
  text-wrap: balance;
}

/* ------------------------ */

/* research grant list */
.grant-list {
  list-style-position: inside;
}

.grant-item {
  font-size: clamp(0.9rem, 0.9vw, 1rem);
}

.grant-item.finished {
  text-decoration: line-through;
}
/* -------------------------- */

/* university photos */
.university-photo-container {
  overflow: hidden;
  width: 100%;
  height: 300px;
  align-content: center;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow1), var(--shadow2);
}
/*  img tag  */
.university-photo {
  width: 100%;
  height: auto;
  flex-grow: 1; /* Lets the image take up all remaining space */
  object-fit: cover; /* Crops the image beautifully without distorting it */
  min-height: 0;
  border-radius: 12px;
}
.caption {
  font: var(--font-text);
  font-style: italic;
  font-size: clamp(0.5rem, 0.95vw, 0.75rem);
}

/* ------------------------ */

/* upcoming conferences list */
.conference-list {
  list-style-position: outside;
  padding-left: 1.2rem;
}
.header-section-bottom {
  font-size: clamp(1rem, 1vw, 1.2rem);
}
.conference-item {
  font-size: clamp(0.9rem, 0.9vw, 1rem);
}
.conference-item.past {
  text-decoration: line-through;
}
.conference-title {
  font-weight: 600;
}
.conference-info {
  font-style: italic;
}
/* ------------------------- */

/* address footer */
.address-box {
  padding: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.address-box-text {
  width: 20rem;
}
/* my name */
.mailto {
  padding-left: 0.8rem;
  font-size: clamp(0.8rem, 0.8vw, 1rem);
  font-weight: 600;
}
.address {
  display: block;
  font-size: clamp(0.8rem, 0.8vw, 1rem);
  /* line-height: 1rem; */
}
.ndhu-logo {
  /* display: none; */
  align-items: center;
  width: 10rem;
  height: 10rem;
  /* margin-top: 2rem; */
}
.address-image-container {
  height: 10rem;
}
/* ------------------------ */

/* info-box */
.info-title {
  display: none;
}
.info-box-row {
  display: flex;
  gap: 0.1rem;
}
/* info box icons */
.email-symbol {
  /* flex-shrink: 0; */
  height: auto;
  width: 1.5rem;
  color: var(--colour-stroke);
  transition: color 0.3s ease; /* Smooth transition when toggling modes */
  /* transform: translateY(0.1rem); */
}

.phone-symbol {
  height: auto;
  width: 1.5rem;
  color: var(--colour-stroke);
  transition: color 0.3s ease; /* Smooth transition when toggling modes */
}

.location-symbol {
  height: auto;
  width: 1.5rem;
  color: var(--colour-stroke);
  transition: color 0.3s ease; /* Smooth transition when toggling modes */
  transform: translateY(-0.1rem);
}

@media (max-width: 620px) {
  .page-container {
    gap: 0.4rem;
  }

  .academic-introduction {
    margin-top: -0.5rem;
  }
  .address-box {
    margin: auto;
    flex-direction: column;
    gap: 0rem;
  }

  .mailto {
    padding-left: 0.8rem;
  }
  /* .address {
  } */
  .address-box-text {
    order: 2;
    width: 18rem;
  }
  .address-image-container {
    order: 1;
    padding: 0rem;
  }
  .ndhu-logo {
    transform: scale(0.8);
  }

  .picture-back {
    height: auto;
    top: 0px;
    transform: scale(1.5) rotateY(180deg);
  }
  .picture-front {
    height: auto;
    top: -45px;
    transform: scale(1.25);
  }
}
