/* GENERAL STYLING */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap");

/* Default Light Mode */
:root {
  --primary-color: white;
  --primary-color-2: rgb(250, 250, 250);
  --primary-color-3: rgb(181, 181, 181);
  --background-color: rgb(255, 255, 255);
  --secondary-color: black;
  --secondary-color-2: rgb(85, 85, 85);
  --button-background: rgb(53, 53, 53);
  --button-text-hover: grey;
  --button-border: rgb(53, 53, 53) 0.1rem solid;
  --button-border-2: rgb(255, 255, 255) 0.1rem solid;
  --container-border: rgb(163, 163, 163);
}

/* Dark Mode */
[theme="dark"] {
  --primary-color: black;
  --primary-color-2: rgb(39, 39, 39);
  --primary-color-3: rgb(74, 74, 74);
  --background-color: rgb(33, 33, 33);
  --secondary-color: white;
  --secondary-color-2: rgb(170, 170, 170);
  --button-background: rgb(202, 202, 202);
  --button-text-hover: lightgrey;
  --button-border: rgb(202, 202, 202) 0.1rem solid;
  --button-border-2: rgb(0, 0, 0) 0.1rem solid;
  --container-border: rgb(92, 92, 92);
}

* {
  margin: 0;
  padding: 0;
}

h3 {
  color: var(--secondary-color);
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--background-color);
}

html {
  scroll-behavior: smooth;
}

p {
  color: var(--secondary-color-2);
}

/* TRANSITION */

a,
.btn {
  transition: all 300ms ease;
}

/* DESKTOP NAV */

nav,
.nav-links {
  display: flex;
  align-items: center;
}

nav {
  justify-content: space-around;
  height: 17vh;
}

.nav-links {
  gap: 2rem;
  list-style: none;
  font-size: 1.5rem;
}

nav li:last-child {
  width: max-content;
  display: flex;
  margin: auto;
  padding: 10px;
}

a {
  color: var(--secondary-color);
  text-decoration: none;
  text-decoration-color: var(--primary-color);
}

a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
  text-underline-offset: 1rem;
  text-decoration-color: var(--secondary-color);
}

nav a:hover {
  color: var(--secondary-color);
  text-decoration-color: var(--secondary-color);
}

.logo {
  font-size: 2rem;
  color: var(--secondary-color);
}

.logo:hover {
  cursor: default;
}

/* HAMBURGER MENU */

#hamburger-nav {
  display: none;
}

.hamburger-menu {
  position: relative;
  display: inline-block;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 24px;
  width: 24px;
  cursor: pointer;
}

.hamburger-icon span {
  width: 100%;
  height: 2px;
  background-color: var(--secondary-color);
  transition: all 0.3 ease-in-out;
}

.menu-links {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--primary-color);
  width: fit-content;
  min-width: 200px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
  z-index: 1000;
  border-radius: 0 0 1rem 1rem;
  box-shadow: 0 4px 6px var(--secondary-color);
}

.menu-links a {
  display: block;
  padding: 15px 20px;
  text-align: center;
  font-size: 1.2rem;
  color: var(--secondary-color);
  text-decoration: none;
  transition: all 0.3s ease-in-out;
  border-bottom: 1px solid var(--secondary-color);
}

.menu-links a:last-child {
  border-bottom: none;
}

.menu-links a:hover {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

.menu-links li {
  list-style: none;
}

.menu-links.open {
  max-height: 350px;
}

/* Hamburger icon animation states */
.hamburger-icon.open span:first-child {
  transform: rotate(45deg) translate(10px, 5px);
}

.hamburger-icon.open span:nth-child(2) {
  opacity: 0;
}

.hamburger-icon.open span:last-child {
  transform: rotate(-45deg) translate(10px, -5px);
}

.hamburger-icon span:first-child {
  transform: none;
}

.hamburger-icon span:nth-child(2) {
  opacity: 1;
}

.hamburger-icon span:last-child {
  transform: none;
}

/* SECTIONS */

section {
  padding-top: 4vh;
  height: 96vh;
  margin: 0 10rem;
  box-sizing: border-box;
  min-height: fit-content;
}

.section-container {
  display: flex;
}

/* PROFILE */

#profile {
  display: flex;
  justify-content: center;
  gap: 5rem;
  height: 80vh;
}

.section__pic-container {
  display: flex;
  height: 400px;
  width: 400px;
  margin: auto 0;
}

.section__text {
  align-self: center;
  text-align: center;
}

.section__text p {
  font-weight: 600;
}

.section__text__p1 {
  text-align: center;
}

.section__text__p2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.title {
  color: var(--secondary-color);
  font-size: 3rem;
  text-align: center;
}

#socials-container {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  gap: 1rem;
}

/* ICONS */

.icon {
  cursor: pointer;
  height: 2rem;
}

/* BUTTONS */

.btn-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.btn {
  font-weight: 600;
  transition: all 300ms ease;
  padding: 1rem;
  width: 8rem;
  border-radius: 2rem;
}

.btn-color-1,
.btn-color-2 {
  border: var(--button-border);
  color: var(--secondary-color-2);
}

.btn-color-1:hover,
.btn-color-2:hover {
  cursor: pointer;
}

.btn-color-1,
.btn-color-2:hover {
  background: var(--button-background);
  color: var(--primary-color);
}

.btn-color-1:hover {
  background: var(--secondary-color);
}

.btn-color-2 {
  background: none;
}

.btn-color-2:hover {
  border: var(--button-border);
  background: var(--secondary-color);
}

.btn-container {
  gap: 1rem;
}

/* ABOUT SECTION */

#about {
  position: relative;
}

.about-containers {
  gap: 2rem;
  margin-bottom: 2rem;
  margin-top: 2rem;
}

.about-details-container {
  justify-content: center;
  flex-direction: column;
}

.about-containers,
.about-details-container {
  display: flex;
}

.about-pic {
  border-radius: 2rem;
}

.arrow {
  position: absolute;
  right: -5rem;
  bottom: 2.5rem;
}

.details-container {
  padding: 1.5rem;
  flex: 1;
  background: var(--primary-color-2);
  border-radius: 2rem;
  border: var(--button-border);
  border-color: var(--container-border);
  text-align: center;
}

.section-container {
  gap: 4rem;
  height: 80%;
}

.section__pic-container {
  height: 400px;
  width: 400px;
  margin: auto 0;
}

/* Skills Section Styling */
#experience {
  position: relative;
  padding-top: 4vh;
  height: auto;
  min-height: 96vh;
  margin: 0 10rem;
  box-sizing: border-box;
  overflow-x: hidden;
}

.section__text__p1 {
  text-align: center;
  color: var(--secondary-color);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.title {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--secondary-color);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
  padding: 0 1rem;
}

.skill-category {
  background: var(--primary-color-2);
  border-radius: 2rem;
  padding: 2rem;
  border: var(--container-border) 0.1rem solid;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.skill-category:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px var(--primary-color-3);
}

.category-title {
  font-size: 1.5rem;
  color: var(--secondary-color);
  margin-bottom: 1.5rem;
  text-align: center;
  font-weight: 600;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  align-items: center;
}

.skill-tag {
  background: var(--primary-color);
  border: var(--container-border) 0.1rem solid;
  border-radius: 25px;
  padding: 0.7rem 1.3rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--secondary-color-2);
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.skill-tag:hover {
  background: var(--button-background);
  color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px var(--primary-color-3);
}

.icon {
  height: 2rem;
  cursor: pointer;
}

/* PROJECTS */

#projects {
  position: relative;
}

.project-details {
  padding-bottom: 1rem;
}

.color-container {
  border-color: var(--container-border);
  background: var(--primary-color-2);
}

.project-img {
  border-radius: 2rem;
  width: 90%;
  height: 90%;
}

.project-title {
  margin: 1rem;
  color: var(--secondary-color);
}

.tech-stack {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}

.tech-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.project-btn {
  color: var(--secondary-color);
  border-color: var(--container-border);
}

.tech-stack {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}

.tech-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

/* PROJECTS SECTION FIX */
.about-containers {
  gap: 2rem;
  margin-bottom: 2rem;
  margin-top: 2rem;
  /* Add flex-wrap to allow items to wrap to next row */
  flex-wrap: wrap;
  /* Ensure proper justification */
  justify-content: center;
}

.details-container {
  padding: 1.5rem;
  /* Change from flex: 1 to fixed width for consistent sizing */
  flex: 0 1 calc(33.333% - 1.5rem); /* 3 items per row with gap */
  min-width: 300px; /* Minimum width to prevent overcrowding */
  background: var(--primary-color-2);
  border-radius: 2rem;
  border: var(--container-border) 0.1rem solid;
  text-align: center;
}

/* PAGINATION STYLES */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 3rem 0;
  gap: 1rem;
}

.pagination-btn {
  padding: 0.8rem 1.2rem;
  border: 1px solid var(--container-border);
  background: var(--primary-color);
  color: var(--secondary-color-2);
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  min-width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-btn:hover {
  background: var(--button-background);
  color: var(--primary-color);
  border-color: var(--button-background);
}

.pagination-btn.active {
  background: var(--secondary-color);
  color: var(--primary-color);
  border-color: var(--secondary-color);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn:disabled:hover {
  background: var(--primary-color);
  color: var(--secondary-color-2);
  border-color: var(--container-border);
}

.projects-grid {
  display: none;
  animation: fadeIn 0.5s ease-in-out;
}

.projects-grid.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* CO-CURRICULAR  */

#co-curricular {
  position: relative;
  height: auto;
  padding-bottom: 4vh;
  margin-top: 6rem;
}

.slideshow-container {
  position: relative;
  max-width: 100%;
  margin: 2rem auto;
  background: var(--primary-color-2);
  border-radius: 2rem;
  border: var(--container-border) 0.1rem solid;
  overflow: hidden;
}

.slide {
  display: none;
  position: relative;
  animation: fadeIn 0.5s ease-in-out;
}

.slide.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.slide-content {
  display: flex;
  align-items: center;
  min-height: 400px;
  padding: 2rem;
  gap: 3rem;
}

.slide-image {
  flex: 1;
  max-width: 45%;
}

.slide-image img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  border-radius: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.slide-text {
  flex: 1;
  padding-left: 2rem;
}

.slide-title {
  font-size: 2rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
  font-weight: 600;
}

.slide-description {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--secondary-color-2);
}

.slide-category {
  display: inline-block;
  background: var(--button-background);
  color: var(--primary-color);
  padding: 0.5rem 1rem;
  border-radius: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

/* Navigation arrows */
.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  margin-top: -22px;
  padding: 16px;
  color: var(--primary-color);
  font-weight: bold;
  font-size: 18px;
  background: var(--button-background);
  border: none;
  border-radius: 0 3px 3px 0;
  transition: all 0.3s ease;
  opacity: 0.7;
}

.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

.prev:hover,
.next:hover {
  background: var(--secondary-color);
  opacity: 1;
}

/* Dots indicators */
.dots-container {
  text-align: center;
  padding: 1.5rem;
  background: var(--primary-color-2);
}

.dot {
  cursor: pointer;
  height: 15px;
  width: 15px;
  margin: 0 5px;
  background-color: var(--container-border);
  border-radius: 50%;
  display: inline-block;
  transition: all 0.3s ease;
}

.dot.active,
.dot:hover {
  background-color: var(--button-background);
  transform: scale(1.2);
}

/* CONTACT */

#contact {
  display: flex;
  justify-content: center;
  flex-direction: column;
  height: 70vh;
}

.contact-info-upper-container {
  display: flex;
  justify-content: center;
  border-radius: 2rem;
  border: var(--container-border) 0.1rem solid;
  background: var(--primary-color-2);
  margin: 2rem;
  padding: 0.5rem;
}

.contact-info-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem;
}

.contact-info-container {
  font-size: larger;
}

.contact-icon {
  cursor: default;
}

.email-icon {
  height: 2.5rem;
}

/* FOOTER */

footer {
  height: 26vh;
  margin: 0 1rem;
}

footer p {
  text-align: center;
  font-size: smaller;
}