/******** CSS Variables (Color Palette) ********/
:root {
  /* Light Mode Colors */
  --text-light: #1c1c1c;
  --accent-light: #7d82a3;
  --accent-hover-light: #656a8a;
  --border-light: #ddd;

  /* Dark Mode Colors */
  --text-dark: #f5f5f5;
  --accent-dark: #a9afc6;
  --accent-hover-dark: #8d94b3;
  --border-dark: #444;
}

/******** Page Styles ********/
.page-style {
  max-width: 250mm;
  margin: 0 auto;
  padding: 20px 0;
  box-sizing: border-box;
  font-family: 'Lora', serif;
  font-size: 13px;
  font-weight: 400;
}

hr {
  border: none;
  border-top: 1px solid var(--accent-light);
  margin: 1.5rem 0;
}

/******** Backgrounds ********/
/* Light Mode (Default) */
body {
  background-color: white;
  color: var(--text-light);
}

/* Dark Mode */
body.dark-mode {
  background-color: var(--text-light);
  color: var(--text-dark);
}

body.dark-mode a:hover,
body.dark-mode a:focus {
  color: var(--accent-hover-dark);
  text-decoration: underline;
}

body.dark-mode a {
  color: var(--accent-dark);
  text-decoration: underline;
}

/******** Links ********/
a {
  color: var(--accent-light);
  text-decoration: underline;
  transition: color 0.3s ease;
}

a:hover,
a:focus {
  color: var(--accent-hover-light);
  text-decoration: underline;
  outline: none;
}

/******** Icons ********/
.icons i {
  color: var(--accent-light);
  font-size: 14px;
  margin: 0 3px;
}

.icons a {
  font-weight: 600;
  color: var(--accent-light);
}

body.dark-mode .icons i {
  color: var(--accent-dark);
}

body.dark-mode .icons a {
  color: var(--accent-dark);
}

/******** Biography Section ********/
.bio-header {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  margin: auto;
  align-content: center;
}

/* image */
.bio-pic {
  max-width: 200px;
  align-items: center;
  display: flex;
  justify-content: center;
  margin-right: 10px;
  margin-bottom: 10px;
}

/* circular image */
.bio-pic img {
  max-width: 180px;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  justify-content: center;
}

/* Main text block next to the image */
.bio-profile {
  flex: 1 1 auto;
  text-align: center;
}

/* Enhanced name styling */
.bio-profile .lead strong {
  font-family: 'Kalam';
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--accent-light);
}

body.dark-mode .bio-profile .lead strong {
  color: var(--accent-dark);
}

/****** Pills (Sections) ******/
.pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px 5px;
  margin-top: 20px;
  margin-bottom: 20px;
  margin: auto;
}

.pills a {
  padding: 0.375rem 1rem;
  border-radius: 50rem;
  background-color: var(--accent-light);
  color: white;
  text-decoration: underline;
  font-weight: 500;
  transition: background-color 0.3s ease;
  white-space: nowrap;
  margin-bottom: 3px;
}

.pills a:hover,
.pills a:focus {
  background-color: var(--accent-hover-light);
  outline: none;
  text-decoration: none;
}

body.dark-mode .pills a {
   background-color: var(--accent-dark);
   color: white;
}

body.dark-mode .pills a:hover,
body.dark-mode .pills a:focus {
  background-color: var(--accent-hover-dark);
}

.section-title a,
.section-title * {
  font-size: 15px;
}

.section-content strong {
  font-size: 15px;
}

.section-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  margin-bottom: 0.5rem;
}

.section-info a {
  color: var(--accent-light);
  text-decoration: underline;
}


.section-content {
  width: 100%;
}

body.dark-mode .section-info a {
  color: var(--accent-dark);
  text-decoration: underline;
}

/***** Section Template (layout.html) *****/
.section-container {
  list-style: none;
  margin: 0;
  padding: 1rem;
  padding-left: 2rem;
  position: relative;
  border-left: 2px solid var(--accent-light);
  margin-left: 0;
  margin-bottom: 1rem;
}

body.dark-mode .section-container {
  border-left-color: var(--accent-dark);
}

.section-container li {
  display: flex;
  flex-direction: column;
  margin: auto;
  align-items: top;
  padding: 1rem 0 0 0;
  margin-bottom: 0;
  position: relative;
  border: none;
  background-color: transparent;
}

body.dark-mode .section-container li {
  border-left-color: var(--accent-dark);
}

.section-info {
  margin-right: 1rem;
}

.section-title {
  font-weight: 600;
  margin-bottom: 0;
}

.section-title a {
  color: var(--accent-light);
}

body.dark-mode .section-title a {
  color: var(--accent-dark);
}

.section-title-text {
  color: var(--accent-light);
}

body.dark-mode .section-title-text {
  color: var(--accent-dark);
}

.section-badge {
  background-color: var(--accent-light);
  color: white;
  padding: 0.35em 0.75em;
  border-radius: 50rem;
  font-size: 0.875rem;
  white-space: nowrap;
  height: fit-content;
}

body.dark-mode .section-badge {
  background-color: var(--accent-dark);
  color: white;
}

/***** Back to Top Button *****/

#backToTop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: none;
  padding: 0.5rem 1rem;
}

/***** Mobile responsive ******/
@media (max-width: 768px) {
  .page-style {
    font-size: 12px;
    padding: 10px;
  }

  .bio-pic img {
    max-width: 120px;
  }

  .pills a {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
  }

  .section-badge {
    font-size: 0.75rem;
  }

  .lead {
    font-size: 1rem;
  }
}
