/* --------------------------------------
>>> TABLE OF CONTENTS:
-----------------------------------------
# GENERAL
# HEADER
# MAIN 
# FOOTER 
# DESKTOP 
# DARK MODE 
-----------------------------------------
---------------------------- */

body {
  background-color: #7b0748;
  font-family: "Merriweather", serif;
  line-height: 1.6;
  font-size: 1rem;
  color: #ffffff;
  margin: 0;
  padding: 1rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0.5em 0;
}

h1 {
  font-size: 3.5rem;
  text-align: center;
}

h2 {
  font-size: 1.5rem;
}

/* Links */
a {
  color: #000000;
  text-decoration: none;
}

a.logo {
  color: #ffffff;
}

a:hover {
  color: #ffa0c0;
  text-decoration: none;
}

/* Header */
.flexbox {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  text-align: center;
}

.flexbox img {
  width: 80px;
  display: block;
  margin: 0 auto;
  /* height: auto; */
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  gap: 2rem;
  padding: 0;
  margin: 0;
}

nav a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem;
}

nav a:hover {
  color: #ffa0c0;
}

/* Theme Toggle Buttons */
header div {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

#theme-toggle-light,
#theme-toggle-dark {
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  transition: transform 0.2s;
  border: none;
}

#theme-toggle-light:hover,
#theme-toggle-dark:hover {
  transform: scale(1.1);
}

/* MAIN */
/* Bio */

.bio h2 {
  font-size: 2rem;
  display: flex;
  max-width: fit-content;
  text-decoration: #1f001b wavy underline;
}

.bio p {
  font-size: 1.125rem;
  background-color: #c987a5;
  color: #000000;
  padding: 1.5rem;
  border-radius: 16px;
  border-left: 6.5px solid #1f001b;
  border-bottom: 3.5px solid #1f001b;
  margin: 1rem 0 4rem 0;
}

.bio {
  gap: 2rem;
}

/* Projects Section */
.section-projects {
  margin: 2rem 0;
}

.section-projects h2 {
  font-size: 2rem;
  display: flex;
  text-align: start;
  text-decoration: #1f001b wavy underline;
  margin: 0;
}

/* Each category group (HTML/CSS, Javascript, etc.) */
.projects {
  margin-bottom: 2.5rem;
}

/* Project Titles */
.projects > h3 {
  font-size: 1.5rem;
  color: #ffffff;
  border-bottom: 2px solid #ffffff;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

/* Individual Project Card */
.projects-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  background-color: #c987a5;
  color: #000000;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  border-left: 8px solid #1f001b;
  border-bottom: 4px solid #1f001b;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.project-card-link {
  text-decoration: none;
  display: block;
  flex-direction: row;
}

.project-card-link:hover .projects-wrapper {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.637);
}

.project-card-link:focus {
  outline: none;
}

.project-card-link:focus-visible .projects-wrapper {
  outline: 2px solid #ffa0c0;
  outline-offset: 2px;
}

/* Project Image */
.project-image {
  width: 200px;
  height: 200px;
  object-fit: cover;
  /* border: 1px solid #383838c2; */
  border-radius: 12px;
}

/* Project Text Area */
.project-title h4 {
  margin: 0;
  font-size: 1.125rem;
}

.project-date {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: #000000;
}

/* Let's Connect Section */
.social-media {
  text-align: center;
  background-color: #c987a5;
  border-left: 8px solid #1f001b;
  border-bottom: 4px solid #1f001b;
  border-radius: 24px;
  color: #1f001b;
  padding: 2rem 1.5rem;
  margin: 3rem 0 2rem;
}

.social-media h2 {
  color: #000000;
  margin-bottom: 0.5rem;
}

.social-icon a {
  color: #000000;
}

.connect-message {
  font-size: 1.125rem;
  font-weight: bold;
  max-width: 500px;
  margin: 0 auto 1.5rem;
  color: #000000;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.social-icon {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.social-icon:hover {
  transform: translateY(-4px);
  text-decoration: none;
}

.social-icon .icon {
  width: 40px;
  height: 40px;
}

.social-icon span {
  font-size: 0.875rem;
  font-weight: 500;
}

/* Back to Top Link */
.back-to-top {
  position: fixed;
  cursor: pointer;
  bottom: 30px;
  right: 1rem;
  z-index: 1000;
  visibility: hidden;
}

.back-to-top:hover {
  transform: translateY(-4px);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

/* Footer */
footer {
  text-align: center;
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid #ffffff;
  font-size: 0.875rem;
}

/* --------------------------------
# Desktop Styles
----------------------------------- */
@media (min-width: 120em) {
  body {
    max-width: 1920px;
    margin: 0 auto;
    padding: 2rem 4rem;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  /* Reset nav to horizontal layout on desktop */
  .flexbox {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: center;
  }

  .flexbox img {
    margin: 0;
  }

  nav ul {
    gap: 2rem;
  }

  header div {
    justify-content: flex-end;
  }

  /* Project Grid */
  .section-projects {
    display: flex;
    flex-direction: column;
  }

  /* Make all project cards in a row have consistent styling */
  .projects-wrapper {
    flex-direction: column;
    text-align: center;
  }

  .project-image {
    width: 300px;
    height: 200px;
    object-fit: cover;
  }

  .project-title h3 {
    margin-top: 0.75rem;
  }

  /* Category Headings */
  .projects > h3 {
    width: 100%;
  }

  .projects a {
    display: block;
    width: 21.25rem;
  }

  /* Project Cards */
  .projects {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
  }

  /* Let's Connect Desktop Styles */
  .social-media {
    padding: 3rem 2rem;
    margin: 4rem 0 2rem;
  }

  .connect-message {
    font-size: 1.25rem;
    max-width: 600px;
  }

  .social-icon .icon {
    width: 48px;
    height: 48px;
  }

  .social-links {
    gap: 3rem;
  }
}

/* ------------------------------------------
# Extra Large Desktop
-------------------------------------------- */

@media (min-width: 75em) {
  body {
    padding: 2rem 6rem;
  }

  .projects > h2 {
    font-size: 2rem;
  }

  .project-image {
    height: 240px;
  }

  .projects-wrapper {
    transition:
      transform 0.3s,
      box-shadow 0.3s;
  }

  .projects-wrapper:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.637);
  }
}

/* --------------------------------
# Ultra Wide 
-------------------------------- */
@media (min-width: 120em) {
  body {
    max-width: 1920px;
    margin: 0 auto;
    padding: 2rem 8rem;
  }

  .bio {
    gap: 2rem;
  }

  .project-image {
    height: 260px;
  }

  .projects > h2 {
    font-size: 2rem;
  }

  .project-title h3,
  .project-title h4 {
    font-size: 1.35rem;
  }

  .project-date {
    font-size: 1rem;
  }
}

/* --------------------------------
# Dark Mode Styles
-------------------------------- */
body.dark-mode {
  background-color: #1f001b;
  color: #ffffff;
}

body.dark-mode .bio {
  background-color: #1f001b;
  border-left-color: #7b0748;
  border-bottom-color: #7b0748;
  color: #f5e6e6;
}

body.dark-mode .bio h2,
body.dark-mode .section-projects h2 {
  text-decoration: #ffa0c0 wavy underline;
}

body.dark-mode .projects-wrapper {
  background-color: #1f001b;
  border-left: 8px solid #7b0748;
  border-bottom: 2px solid #7b0748;
  color: #ffffff;
  /* box-shadow: 0 2px 8px rgba(255, 255, 255, 0.637); */
}

body.dark-mode .projects-wrapper:hover {
  box-shadow: rgba(255, 255, 255, 0.637);
}

body.dark-mode .project-date {
  color: #ffffff;
}

body.dark-mode a {
  color: #ffa0c0;
}

body.dark-mode a:hover {
  color: #ffffff;
}

body.dark-mode main > p a {
  /* background-color: #ff7bac; */
  color: #ffffff;
}

body.dark-mode footer {
  border-top-color: #7b0748;
}

body.dark-mode .social-media {
  background-color: #1f001b;
  border-left: 8px solid #7b0748;
  border-bottom: 4px solid #7b0748;
  color: #ffffff;
}

body.dark-mode .social-media h2 {
  color: #ffa0c0;
}

body.dark-mode .connect-message {
  color: #ffa0c0;
}

body.dark-mode .social-icon:hover {
  transform: translateY(-4px);
  opacity: 0.9;
}

body.dark-mode .back-to-top img {
  filter: brightness(0) invert(1);
}

/* Dark Mode theme buttons - active state */
body.dark-mode #theme-toggle-light {
  border-color: #ffffff;
  background-color: darkkhaki;
}

body.dark-mode #theme-toggle-dark {
  border-color: #ffffff;
  background-color: #ffffff;
}

/* Light Mode theme buttons - active state */
body:not(.dark-mode) #theme-toggle-light {
  opacity: 1;
  border-color: #ffffff;
  background-color: rgba(251, 241, 252, 0.788);
}

body:not(.dark-mode) #theme-toggle-dark {
  border-color: #ffffff;
  background-color: #a790fa;
}
