@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

/* CSS Variables for Theme */
:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --text-secondary: rgb(85, 85, 85);
    --border-color: rgb(163, 163, 163);
    --btn-bg: rgb(53, 53, 53);
    --btn-hover-bg: rgb(0, 0, 0);
    --container-bg: white;
    --container-secondary-bg: rgb(250, 250, 250);
    --link-hover: grey;
    --nav-bg: #ffffff;
    --hamburger-bg: white;
}

[data-theme="dark"] {
    --bg-color: #1a1a2e;
    --text-color: #eaeaea;
    --text-secondary: #b0b0b0;
    --border-color: #444466;
    --btn-bg: #3a3a5c;
    --btn-hover-bg: #4a4a7c;
    --container-bg: #252542;
    --container-secondary-bg: #2a2a4a;
    --link-hover: #a0a0c0;
    --nav-bg: #1a1a2e;
    --hamburger-bg: #252542;
}

* {
    margin: 0;
    padding: 0;
}
body {
    font-family: "Poppins", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}
html {
    scroll-behavior: smooth;
}
p {
    color: var(--text-secondary);
}

a, .btn {
    transition: all 300ms ease;
}

nav, .nav-links {
    display: flex;
}
nav {
    justify-content: space-around;
    align-items: center;
    height: 17vh;
    background-color: var(--nav-bg);
    transition: background-color 0.3s ease;
}
.nav-links {
    gap: 2rem;
    list-style: none;
    font-size: 1.5rem;
    align-items: center;
}
a {
    color: var(--text-color);
    text-decoration: none;
    text-decoration-color: var(--bg-color);
    transition: color 0.3s ease;
}
a:hover {
    color: var(--link-hover);
    text-decoration: underline;
    text-underline-offset: 1rem;
    text-decoration-color: var(--border-color);
}
.logo {
    font-size: 2rem;
    color: var(--text-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: 30px;
    cursor: pointer;
  }
  .hamburger-icon span {
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    transition: all 0.3 ease-in-out;
  }
  .menu-links {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--hamburger-bg);
    width: fit-content;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3 ease-in-out;
  }
  .menu-links a {
    display: block;
    padding: 10px;
    text-align: center;
    font-size: 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3 ease-in-out;
  }
  .menu-links li {
    list-style: none;
  }
  .menu-links.open {
    max-height: 300px;
  }
  .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:first-child {
    opacity: 1;
  }
  .hamburger-icon span:first-child {
    transform: none;
  }

/* Section */

section {
  padding-top: 4vh;
  height: 96vh;
  margin: 0 10rem;
  box-sizing: border-box;
  min-height: fit-content;
}
.section-container {
  display: flex;
}
#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 {
  font-size: 3rem;
  text-align: center;
  color: var(--text-color);
}

.socials-container {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  gap: 1rem;
}

.icon {
  cursor: pointer;
  height: 2rem;
}

.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(--btn-bg) 0.1rem solid;
}

.btn-color-1:hover,
.btn-color-2:hover {
  cursor: pointer;
}

.btn-color-1,
.btn-color-2:hover {
  background: var(--btn-bg);
  color: white;
}

.btn-color-1:hover {
  background: var(--btn-hover-bg);
}

.btn-color-2 {
  background: none;
  color: var(--text-color);
}

.btn-color-2:hover {
  border: var(--btn-hover-bg) 0.1rem solid;
}

.btn-container {
  gap: 1rem;
}

/* About section */

#about {
  position: relative;
}
.about-containers {
  display: flex;
  flex-wrap: wrap;
  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(--container-bg);
  border-radius: 2rem;
  border: var(--btn-bg) 0.1rem solid;
  border-color: var(--border-color);
  text-align: center;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.section-container {
  gap: 4rem;
  height: 80%;
}
.section_pic-container {
  height: 400px;
  width: 400px;
  margin: auto 0;
}

/* skills section */

#skills {
  position: relative;
}

.skills-sub-title {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 1.75rem;
  margin-bottom: 2rem;
}

.skills-details-container {
  display: flex;
  justify-content: center;
  flex-direction: column;
}

.article-container {
  display: flex;
  text-align: initial;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 1.5rem;
  justify-content: space-around;
}

article {
  display: flex;
  width: 10rem;
  
  gap: 0.5rem;
}

article .icon {
  cursor: default;
}

/*Projects section */

#projects {
  position: relative;
}

/* Projects grid layout */
#projects .about-containers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.color-container {
  border-color: var(--border-color);
  background: var(--container-secondary-bg);
}
.project-img {
  border-radius: 2rem;
  width: 90%;
  height: 90%;
}
.project-title {
  margin: 1rem;
  color: var(--text-color);
}
.project-btn {
  color: var(--text-color);
  border-color: var(--border-color);
}

#more-projects {
  position: relative;
}

/*Contact section */

#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(--btn-bg) 0.1rem solid;
  border-color: var(--border-color);
  background: var(--container-secondary-bg);
  margin: 2rem auto;
  padding: 0.5rem;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.contact-info-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem;
}
.contact-info-container p {
  font-size: larger;
}
.contact-icon {
  cursor: default;
}
.email-icon {
  height: 2.5rem;
}

/* Footer section */

footer {
  height: 26vh;
  margin: 0 rem;
  background-color: var(--bg-color);
  transition: background-color 0.3s ease;
}
footer p {
  text-align: center;
  color: var(--text-secondary);
}

.home-icon {
  display: inline-block;
  cursor: pointer;
  margin: 1rem; 
}

.home-icon img {
  width: 70px;
  height: 70px;
  transition: transform 0.3s ease;
}

/* Theme Toggle Button - Animated */
.theme-toggle {
  background: none;
  border: 2px solid var(--container-bg);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: static;
  overflow: hidden;
}

.theme-toggle:hover {
  border-color: var(--container-bg);
  transform: scale(1.1);
}

.toggle-icon {
  position: relative;
  width: 24px;
  height: 24px;
}

.theme-toggle svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle .sun-icon {
  stroke: #f39c12;
  transform: rotate(0deg) scale(1);
  opacity: 1;
}

.theme-toggle .moon-icon {
  stroke: #9b59b6;
  transform: rotate(-90deg) scale(0);
  opacity: 0;
}

[data-theme="dark"] .theme-toggle .sun-icon {
  transform: rotate(90deg) scale(0);
  opacity: 0;
}

[data-theme="dark"] .theme-toggle .moon-icon {
  transform: rotate(0deg) scale(1);
  opacity: 1;
}

/* Hamburger menu container for theme toggle */
.hamburger-menu-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Projects page top nav */
.projects-top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: var(--nav-bg);
  transition: background-color 0.3s ease;
}

/* Back button for projects page */
.back-btn {
  background: none;
  border: 2px solid var(--border-color);
  border-radius: 2rem;
  padding: 0.5rem 1.2rem;
  font-size: 1rem;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.back-btn:hover {
  background: var(--btn-bg);
  color: white;
  border-color: var(--btn-bg);
}

/* Dark mode icon filter for icons that need inversion */
[data-theme="dark"] .icon {
  filter: brightness(0.8) invert(0.8);
}

/* Project Side Slider */
.project-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 999;
}
.project-overlay.open { display: block; }

.project-slider {
  position: fixed;
  top: 0;
  right: -780px;
  width: 740px;
  max-width: 95vw;
  height: 100%;
  background: var(--container-bg);
  border-left: 1px solid var(--border-color);
  border-radius: 1rem 0 0 1rem;
  z-index: 1000;
  overflow-y: auto;
  padding: 2rem 2rem 3rem;
  box-sizing: border-box;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.project-slider.open { right: 0; }

.slider-close-btn {
  float: right;
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.slider-close-btn:hover { background: var(--container-secondary-bg); }

.slider-project-img {
  width: 20%;
  border-radius: 1rem;
  margin: 1rem 0;
  display: block;
  clear: both;
}
.slider-project-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.75rem;
}
.slider-project-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}
.slider-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.slider-tag {
  background: var(--container-secondary-bg);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 2rem;
}
.slider-section-heading {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 1.5rem 0 0.6rem;
}
.slider-features {
  list-style: none;
  padding: 0;
  margin-bottom: 0.5rem;
}
.slider-features li {
  font-size: 0.9rem;
  color: var(--text-color);
  padding: 0.4rem 0;
  padding-left: 1rem;
  position: relative;
}
.slider-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-secondary);
}
.slider-btn-container {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}
