html {
  scroll-behavior: smooth;
}

:root {
  --bg: #f5ecec;
  --text: #3f152c;
  --card: #e9dff5;
  --section: #e2cccc;
  --accent: #b880c9;
  --button: #df71be;
}

[data-theme="darkMode"] {
  --bg: #0f172a;
  --text: #e5e7eb;
  --card: #4f6891;
  --section: #1c2947;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
a {
  color: inherit;
  text-decoration: none;
}
h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

/* HEADER */
header {
  position: sticky;
  top: 0;
  background: transparent;
  display: flex;
  justify-content: space-between;
  padding: 1rem 1rem;
  border-radius: 50px;
  backdrop-filter: blur(8px);
  z-index: 100;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 15px;
}
.logo .nav-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}
.avatar {
  transition: opacity 0.5s ease-in-out;
}
.avatar.fade-out {
  opacity: 0;
}

/* NAVIGATION LINKS */
nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-left: 10px;
}

.nav-link {
  opacity: 0.7;
  transition:
    color 0.3s ease,
    opacity 0.3s ease;
}

nav a:hover,
nav a.active,
a.visited {
  opacity: 1;
  color: var(--text);
}

nav a:hover::after,
nav a.active::after {
  opacity: 1;
  color: var(--accent);
}

.resume-btn {
  background: var(--button);
  border-radius: 35px;
  color: white;
  font-size: 0.9rem;
  padding: 10px 20px;
}

.resume-btn:hover {
  background: var(--card);
  transform: scale(1.05);
}

/* Theme Toggle Button */
.theme-btn {
  background: var(--card);
  border: none;
  border-radius: 50%;
  padding: 0.5rem;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text);
  display: flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  transition:
    background 0.3s ease,
    color 0.3s ease,
    transform 0.2s ease;
}

.theme-btn:hover {
  background: var(--accent);
  color: #fff;
  transform: scale(1.1);
}

.theme-btn i {
  transition: transform 0.3s ease;
}

/* Hamburger menu */
.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--white);
}

/* Responsive: small screens */
@media (max-width: 800px) {
  .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgb(173, 173, 218);
    flex-direction: column;
    align-items: flex-start;
    width: 120px;
    padding: 1rem;
    border-radius: 12px;
    gap: 1rem;
    display: none;
    color: whitesmoke;
  }
  .nav-links :hover {
    color: white;
  }

  .nav-links.show {
    display: flex;
  }

  .hamburger {
    display: block;
  }
}

/* HERO */
.hero {
  background-color: var(--section);
  padding: 4rem 2rem;
}

.hero-greeting {
  text-align: center;
  margin-bottom: 0.5rem;
}

.hero-greeting i {
  font-size: 3rem;
  color: var(--button);
  margin: 0 auto;

  animation: bounce 1.5s infinite;
}
@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
  flex-wrap: wrap;
}

.hero-left {
  flex: 1;
}

.hero-right {
  flex: 1;
  text-align: center;
}

.hero-img {
  width: clamp(200px, 25vw, 350px);
  height: clamp(250px, 30vw, 400px);
  object-fit: cover;
  border-radius: 20px;
}

.buttons a {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1.2rem;
  background: var(--accent);
  border-radius: 8px;
  transition:
    background 0.3s ease,
    transform 0.2s ease;
}
.buttons a:hover {
  background: #d94de0;
  transform: scale(1.05);
}
/* Social icons */
.social-icon-container {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
}

.social-icon {
  font-size: 1.3rem;
  color: var(--accent);
  text-align: left;
  justify-content: flex-start;
}
#typed-text {
  display: inline-block;
  user-select: none;
  pointer-events: none;
  color: #6059e2;
}
#typed-text::after {
  content: "_";
  font-weight: bold;
  animation: blink 0.7s step-start infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }
  .hero-right {
    order: -1;
  }
  .hero-left {
    text-align: center;
  }
}

/* ABOUT SECTION */
.about {
  padding: 4rem 2rem;
  text-align: center;
}

.about-container {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.about-left {
  flex: 1;
  gap: 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
}
.about-right {
  flex: 1;
  gap: 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
}

.career-item {
  background: var(--card);
  padding: 1.5rem 2rem;
  margin: auto;
  border-radius: 12px;
  transition: scale 0.3s ease;
  max-width: 750px;
}
.career-item:hover {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .about-container {
    flex-direction: column;
    align-items: center;
  }
  .about-right {
    order: -1;
    text-align: center;
  }
  .about-left {
    text-align: center;
  }
}

/* SKILLS */

.skills-section {
  position: relative;
  padding: 4rem 2rem;
  text-align: center;
  background-color: var(--section);
  overflow: hidden;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5rem;
  margin-top: 2rem;
  position: relative;
  z-index: 1;
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  font-size: 2.5rem;
  color: var(--accent);
  cursor: pointer;
  transition:
    transform 0.3s ease,
    color 0.3s ease;
}

.skill-item span {
  font-size: 1.5rem;
  color: var(--text);
  transition: color 0.3s ease;
}

.skill-item:hover {
  color: var(--text);
  transform: scale(1.3) rotate(-5deg);
}

/* React spins faster */
.fa-react {
  animation: spin 5s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Canvas for particle/galaxy effect */
#skills-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* PROJECTS */
.projects-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}
.projects-section h2 {
  text-align: center;
  margin-bottom: 2rem;
}
.project-preview h3 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.project-preview {
  text-align: left;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem;
  background: rgba(153, 137, 160, 0.75);
  color: white;
  transform: translateY(100%);
  transition: transform 0.4s ease;
  scroll-behavior: hidden scroll;
}
.project-card:hover .project-preview {
  transform: translateY(0);
}

.project-card {
  background: var(--card);
  padding: 2rem;
  margin-bottom: 20px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(233, 195, 195, 0.15);
}
.project-image {
  flex: 1;
  width: 100%;
  height: auto;
  max-height: 500px;
  border-radius: 12px;
  margin-bottom: 1rem;
  align-items: center;
  object-fit: cover;
}
.projects-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(900px, 0.8fr));
  gap: 2rem;
}

.tech-tag {
  display: inline-block;
  background: var(--accent);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  margin: 0.2rem;
  font-size: 0.8rem;
}
.tech-tag:hover {
  background: #faa4ff;
  transform: scale(1.1);
}

.project-card:hover {
  transform: scale(1.02);
  transition: 0.3s ease;
  cursor: pointer;
}


.gallery-wrapper {
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; 
  padding-bottom: 0.5rem;
  margin-top: 1rem;
}


.gallery-wrapper::-webkit-scrollbar {
  display: none;
}
.gallery-wrapper {
  -ms-overflow-style: none; 
  scrollbar-width: none; 
}


.gallery {
  display: flex;
  gap: 0.5rem;
}


.gallery img {
  flex: 0 0 auto; 
  width: 200px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.gallery img:hover {
  transform: scale(1.1) rotate(2deg);
}

@media (max-width: 768px) {
  .gallery img {
    width: 140px;
    height: 100px;
  }
}

.project-link {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1.2rem;
  background: var(--accent);
  border-radius: 8px;
  transition:
    background 0.3s ease,
    transform 0.2s ease;
}
.project-link:hover {
  background: #ffffff;
  transform: scale(1.05);
  color: var(--accent);
  border-color: #11001e;
}
/* Projects modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal-content {
  background: var(--card);
  padding: 2rem;
  border-radius: 16px;
  max-width: 900px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  animation: popup 0.3s ease;
}

@keyframes popup {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2rem;
  cursor: pointer;
}

.close-btn:hover {
  color: var(--accent);
}
/* CERTIFICATES */
.certificates {
  padding: 4rem 2rem;
  text-align: center;
  background-color: var(--section);
  gap: 2rem;
}

.certificates h2 {
  text-align: center;
}

.certificates-items {
  display: inline-block;
  justify-content: center;
}

.certificates-image {
  width: clamp(440px, 45vw, 550px);
  height: clamp(400px, 50vw, 500px);
  max-width: 90%;
  border-radius: 12px;
  cursor: pointer;
  transition:
    transform 0.4s ease,
    box-shadow 0.4s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.certificates-image:hover {
  transform: scale(1.05) rotate(-1deg);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* CONTACT */
.contact {
  padding: 4rem 2rem;
  gap: 2rem;
}
.contact h2 {
  text-align: center;
  margin-bottom: 2rem;
}
.contact-flex {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 60px;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  flex-wrap: wrap;
}

.contact-text {
  display: flex;
  flex: 1 1 350px;
  font-family: "Pacifico", cursive;
  font-size: 3.5rem;
  color: #c583c5;
  margin: 0;
  padding-top: 10px;
}

#contactForm {
  flex: 2 1 400px;
}

#contactForm p {
  margin: 12px 0 6px;
  font-weight: 500;
  text-align: left;
  color: var(--text);
}

#contactForm input,
#contactForm textarea {
  width: 100%;
  margin-bottom: 20px;
  padding: 12px;
  border: 1px solid #da80e2;
  border-radius: 8px;
  background-color: transparent;
  color: var(--text);
  font-size: 1rem;
  font-family: "Inter", sans-serif;
}

.buttons-email {
  padding: 12px 24px;
  background: var(--button);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s ease;
  display: block;
  margin-top: 10px;
  margin: 0 auto;
  width: 60%;
}

.buttons-email:hover {
  background: var(--card);
  color: var(--text);
}

.skills a {
  align-items: center;
}

.social-icon-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.social-icon {
  color: rgb(226, 152, 255);
  font-size: 28px;
  transition:
    color 0.3s ease,
    transform 0.3s ease;
}

.social-icon:hover {
  color: #ff67d1;
  transform: scale(1.2);
}

/* FOOTER */
footer {
  text-align: center;
  padding: 30px;
  background: #11001e;
  color: #aaa;
}

/* ---------------- Scroll Animations ---------------- */
.section,
.left,
.right,
.project-card {
  opacity: 0;
  transition:
    opacity 0.8s ease-out,
    transform 0.8s ease-out;
}

.section.visible,
.project-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.left {
  transform: translateX(-50px);
}
.left.visible {
  transform: translateX(0);
  opacity: 1;
}

.right {
  transform: translateX(50px);
}
.right.visible {
  transform: translateX(0);
  opacity: 1;
}
