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

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f9f9f9;
}

html {
  scroll-behavior: smooth;
}

p {
  color: rgb(85, 85, 85);
}

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

/* NAVIGATION - IMPROVED */
nav, .nav-links {
  display: flex;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  left: 0;
  right: 0;
  height: 64px;
  padding: 0 1.25rem;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
  z-index: 1000;
}

.nav-links {
  gap: 2.5rem;
  list-style: none;
  font-size: 1.1rem;
  margin: 0;
  padding: 0;
}

.nav-links li {
  list-style: none;
}

.nav-links a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a:hover {
  color: #29d9d5;
  background-color: rgba(41, 217, 213, 0.1);
  transform: translateY(-2px);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: #29d9d5;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-links a:hover::after {
  width: 80%;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: #29d9d5;
  text-decoration: none;
}

.logo:hover {
  cursor: pointer;
  color: #1fb8b4;
}

/* HAMBURGER NAV - HIDDEN BY DEFAULT */
#hamburger-nav {
  display: none;
}

.hamburger-menu {
  position: relative;
}

/* THREE DOTS MENU STYLES */
.three-dots {
  cursor: pointer;
  padding: 0.8rem;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: center;
  z-index: 200;
  transition: transform 0.3s ease;
  background: rgba(41, 217, 213, 0.1);
}

.three-dots:hover {
  background: rgba(41, 217, 213, 0.2);
}

.three-dots span {
  width: 6px;
  height: 6px;
  background-color: #29d9d5;
  border-radius: 50%;
  display: block;
  transition: all 0.3s ease;
}

.menu-links {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.5rem;
  background: white;
  padding: 1rem 0;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  min-width: 220px;
  z-index: 1000;
  border: 1px solid rgba(0,0,0,0.1);
}

.menu-links.open {
  display: block;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.menu-links li {
  list-style: none;
  margin: 0;
}

.menu-links a {
  color: #333;
  text-decoration: none;
  display: block;
  padding: 0.8rem 1.5rem;
  transition: all 0.3s ease;
  font-weight: 500;
  border-left: 3px solid transparent;
}

.menu-links a:hover {
  background-color: rgba(41, 217, 213, 0.1);
  color: #29d9d5;
  border-left-color: #29d9d5;
  padding-left: 2rem;
}

/* SECTIONS */
section {
  padding-top: 10vh;
  min-height: 100vh;
  margin: 0 10rem;
  box-sizing: border-box;
}

.section-container {
  display: flex;
}

/* PROFILE SECTION */
#profile {
  display: flex;
  justify-content: center;
  gap: 5rem;
  height: 80vh;
  align-items: center;
  background: linear-gradient(135deg, #f9f9f9 0%, #e6f7f7 100%);
}

.section__pic-container {
  display: flex;
  height: 400px;
  width: 400px;
  margin: auto 0;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #333;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.section__pic-container:hover {
  border-color: #333;
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.section__pic-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.section__pic-container:hover img {
  transform: scale(1.05);
}

.section__text {
  align-self: center;
  text-align: center;
}

.section__text p {
  font-weight: 600;
}

.section__text__p1 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.section__text__p2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: #29d9d5;
}

.title {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 1rem;
  color: #333;
}

/* SOCIALS */
#socials-container {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  gap: 1.5rem;
}

.icon {
  cursor: pointer;
  height: 2.5rem;
  transition: transform 0.3s ease;
}

.icon:hover {
  transform: translateY(-5px);
}

/* BUTTONS */
.btn-container {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.btn {
  font-weight: 600;
  transition: all 300ms ease;
  padding: 1rem 1.5rem;
  width: 10rem;
  border-radius: 2rem;
  font-size: 1rem;
}

.btn-color-1, .btn-color-2 {
  border: rgb(53, 53, 53) 0.1rem solid;
}

.btn-color-1:hover, .btn-color-2:hover {
  cursor: pointer;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.btn-color-1, .btn-color-2:hover {
  background: #29d9d5;
  color: white;
  border-color: #29d9d5;
}

.btn-color-1:hover {
  background: #1fb8b4;
}

.btn-color-2 {
  background: none;
}

.btn-color-2:hover {
  border: #29d9d5 0.1rem solid;
}

/* ABOUT SECTION */
#about {
  /* subtle background and spacing */
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfb 100%);
  padding-top: 10vh;
  padding-bottom: 6rem;
}

#about .section__text__p1 {
  color: #29d9d5;
  font-weight: 600;
  letter-spacing: .5px;
}

#about .title {
  position: relative;
}
#about .title::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -12px;
  width: 90px;
  height: 3px;
  background: linear-gradient(90deg, #29d9d5, #1fb8b4);
  border-radius: 3px;
}

/* Layout */
#about .section-container {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  align-items: center;
  gap: 3rem;
  margin-top: 3rem;
}

/* Cards row (Experience / Education) */
#about .about-containers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 0 0 1.75rem 0;
}

#about .details-container {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  border-left: 4px solid #29d9d5;
  border-radius: 16px;
  padding: 1.25rem 1.25rem 1.1rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.06);
  text-align: left;
}
#about .details-container h3 {
  margin: .5rem 0 .4rem;
}
#about .details-container p {
  margin: 0;
  line-height: 1.5;
}

/* Bio card */
#about .text-container {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  border-left: 4px solid #1fb8b4;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 12px 28px rgba(0,0,0,0.06);
}
#about .text-container p {
  margin: 0;
  color: #555;
  line-height: 1.8;
}

/* About image card */
#about .section__pic-container {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  overflow: hidden;
  border: 3px solid #eef6f6;
  box-shadow: 0 18px 40px rgba(0,0,0,0.10);
  transition: transform .35s ease, box-shadow .35s ease;
  justify-self: center;
}
#about .section__pic-container:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 52px rgba(0,0,0,0.14);
}
#about .section__pic-container img.about-pic {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Icons */
#about .icon {
  height: 2rem;
  opacity: .9;
}

/* Responsive */
@media (max-width: 1024px) {
  #about .section-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  #about .about-containers {
    grid-template-columns: 1fr;
  }
  #about .section__pic-container {
    max-width: 380px;
    aspect-ratio: 1/1;
  }
}

@media (max-width: 768px) {
  #about {
    padding-bottom: 4rem;
  }
  #about .title::after { bottom: -10px; }
  #about .section-container { gap: 1.5rem; }
  #about .text-container { padding: 1.25rem; }
}

@media (max-width: 480px) {
  #about .section__pic-container {
    max-width: 300px;
    border-width: 2px;
  }
}
/* --- end About redesign --- */

/* EXPERIENCE SECTION */
#experience {
  position: relative;
  padding-top: 10vh;
}

.experience-sub-title {
  color: rgb(85, 85, 85);
  font-weight: 600;
  font-size: 1.75rem;
  margin-bottom: 2rem;
  text-align: center;
}

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

/* Skills section reset: ensure original look */
#experience .about-containers {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 2rem 0;
}

#experience .details-container {
  padding: 1.5rem;
  flex: 1;
  background: #ffffff;
  border-radius: 2rem;
  border: 0.1rem solid rgb(163, 163, 163);
  text-align: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

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

#experience article {
  display: flex;
  width: 12rem;
  justify-content: space-around;
  gap: 0.5rem;
}


/* SKILL BARS */
.skill-bar {
  width: 100%;
  height: 10px;
  background-color: #e0e0e0;
  border-radius: 10px;
  margin-top: 5px;
  overflow: hidden;
}

.skill-level {
  height: 100%;
  border-radius: 10px;
  background-color: #29d9d5;
  transition: width 1s ease-in-out;
}

/* PROJECTS SECTION */
#projects {
  position: relative;
  padding-top: 10vh;
}

.color-container {
  border-color: rgb(163, 163, 163);
  background: rgb(250, 250, 250);
  transition: all 0.3s ease;
}

.project-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  transform: translateY(-5px) scale(1.02);
  overflow: hidden;
  position: relative;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.project-img {
  border-radius: 2rem;
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: all 0.3s ease;
}

.project-card:hover .project-img {
  transform: scale(1.05);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 1.5rem;
  text-align: center;
  border-radius: 2rem;
}

.project-overlay h3 {
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
  color: #fff;
  font-weight: 600;
}

.project-overlay p {
  font-size: 1rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
  max-width: 90%;
  margin-bottom: 1rem;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-title {
  margin: 1rem 0;
  color: black;
  font-size: 1.3rem;
}

.project-description {
  margin-bottom: 1rem;
  flex-grow: 1;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.tech-tags span {
  background: #e0e0e0;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-size: 0.8rem;
  color: #333;
}

.project-btn {
  color: black;
  border-color: rgb(163, 163, 163);
}

.projects-grid-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2rem;
}

.projects-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.details-container.project-card {
  flex: 1 1 calc(33.333% - 2rem);
  min-width: 300px;
  max-width: 400px;
  margin-bottom: 0;
}

/* FEATURED PROJECT SECTION */
.featured-project {
  margin: 5rem auto;
  padding: 3rem 5%;
  background-color: #fdfdfd;
  border-radius: 2rem;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
}

.featured-project-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.featured-text {
  text-align: left;
  padding: 2rem;
  background: #ffffff;
  border-radius: 1.5rem;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
}

.featured-text h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: #333;
}

.featured-text p {
  font-size: 1rem;
  line-height: 1.7;
  color: #555;
  margin-bottom: 1.5rem;
}

.crud-features {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.crud-features li {
  margin-bottom: 0.8rem;
  color: #555;
  font-size: 0.95rem;
}

.featured-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  padding: 0 1rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.gallery-item {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center;
  border-bottom: 1px solid #eee;
}

.image-caption {
  padding: 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: #555;
  background: white;
  font-weight: 500;
}

.tech-stack {
  margin: 2rem 0;
}

.tech-stack h3 {
  color: #333;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.tech-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.tech-icon {
  background: #29d9d5;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* CONTACT SECTION */
#contact {
  display: flex;
  justify-content: center;
  flex-direction: column;
  height: 70vh;
  padding-top: 10vh;
}

.contact-info-upper-container {
  display: flex;
  justify-content: center;
  border-radius: 2rem;
  border: rgb(53, 53, 53) 0.1rem solid;
  border-color: rgb(163, 163, 163);
  background: rgb(250, 250, 250);
  margin: 2rem auto;
  padding: 0.5rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.contact-info-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem;
}

.contact-info-container p {
  font-size: larger;
}

.contact-info-container a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-info-container a:hover {
  color: #29d9d5;
}

.contact-icon {
  cursor: default;
}

.email-icon {
  height: 2.5rem;
}

/* FOOTER SECTION */
footer {
  height: 26vh;
  margin: 0 1rem;
  padding: 2rem 0;
  background-color: white;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

footer p {
  text-align: center;
  margin-top: 1rem;
}

.nav-links-container {
  display: flex;
  justify-content: center;
}

/* RESPONSIVE DESIGN */
@media screen and (max-width: 1200px) {
  section {
    margin: 0 5rem;
  }

  .section__pic-container {
    height: 350px;
    width: 350px;
  }
}

@media screen and (max-width: 900px) {
  section {
    margin: 0 3rem;
  }

  #profile {
    flex-direction: column;
    gap: 3rem;
    height: auto;
    padding-top: 5rem;
  }

  .section__pic-container {
    width: 300px;
    height: 300px;
  }

  .about-containers {
    flex-direction: column;
  }

  .featured-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* MOBILE NAVIGATION STYLES */
@media screen and (max-width: 768px) {
  /* Force hide desktop nav */
  #desktop-nav {
    display: none !important;
  }

  /* Force show hamburger nav */
  #hamburger-nav {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    padding: 0 1.25rem;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
    z-index: 1000;
  }

  /* Ensure hamburger menu container is visible */
  #hamburger-nav .hamburger-menu {
    display: flex !important;
    position: relative;
    align-items: center;
  }

  /* Force three dots to show with enhanced visibility */
  #hamburger-nav .three-dots {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    cursor: pointer;
    padding: 12px !important;
    border-radius: 8px;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
    z-index: 200;
    transition: transform 0.3s ease;
    background: rgba(41, 217, 213, 0.15) !important;
    min-width: 48px !important;
    min-height: 48px !important;
    border: 2px solid transparent;
  }

  #hamburger-nav .three-dots:hover {
    background: rgba(41, 217, 213, 0.25) !important;
    border-color: rgba(41, 217, 213, 0.3);
  }

  /* Make dots bigger and more visible on mobile */
  #hamburger-nav .three-dots span {
    width: 6px !important;
    height: 6px !important;
    background-color: #29d9d5 !important;
    border-radius: 50% !important;
    display: block !important;
    transition: all 0.3s ease;
    opacity: 1 !important;
  }

  /* Mobile menu dropdown */
  #hamburger-nav .menu-links {
    display: none !important;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    background: white;
    padding: 12px 0;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    min-width: 220px;
    z-index: 1000;
    border: 1px solid rgba(0,0,0,0.1);
  }

  #hamburger-nav .menu-links.open {
    display: block !important;
    animation: slideDown 0.3s ease;
  }

  #hamburger-nav .menu-links li {
    list-style: none;
    margin: 0;
  }

  #hamburger-nav .menu-links a {
    color: #333;
    text-decoration: none;
    display: block;
    padding: 12px 20px;
    transition: all 0.3s ease;
    font-weight: 500;
    border-left: 3px solid transparent;
    font-size: 16px;
  }

  #hamburger-nav .menu-links a:hover {
    background-color: rgba(41, 217, 213, 0.1);
    color: #29d9d5;
    border-left-color: #29d9d5;
  }

  section {
    margin: 0 1.5rem;
  }

  .title {
    font-size: 2.5rem;
  }

  .section__text__p2 {
    font-size: 1.5rem;
  }

  .featured-gallery {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  /* Content offset for fixed header */
  #profile {
    padding-top: 6.5rem;
  }

  .details-container.project-card {
    flex: 1 1 100%;
  }

  .projects-row {
    gap: 1.5rem;
  }
}

@media screen and (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .gallery-item img {
    height: 180px;
  }
}

@media screen and (max-width: 480px) {
  section {
    margin: 0 1rem;
  }

  #hamburger-nav {
    height: 58px;
    padding: 0 .85rem;
  }

  .menu-links {
    min-width: 200px;
  }

  .menu-links a {
    font-size: 1rem;
  }

  .btn-container {
    flex-direction: column;
    align-items: center;
  }

  .contact-info-upper-container {
    flex-direction: column;
    align-items: center;
  }

  .nav-links {
    gap: 1rem;
    font-size: 1rem;
  }

  .logo {
    font-size: 1.5rem;
  }
}

@media (max-width: 1024px) {
  .details-container.project-card {
    flex: 1 1 calc(50% - 2rem);
  }
}