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

* {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", sans-serif;
  opacity: 0;
  animation: fadeInBody 1s ease-in-out forwards;
}

@keyframes fadeInBody {
  to {
    opacity: 1;
  }
}

html {
  scroll-behavior: smooth;
}

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


@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

section {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

section.animate-in {
  opacity: 1;
  transform: translateY(0);
}

#profile {
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.details-container,
.color-container,
article {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease-out;
}

.details-container.animate-in,
.color-container.animate-in,
article.animate-in {
  opacity: 1;
  transform: translateY(0);
}

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


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

nav {
  justify-content: space-around;
  align-items: center;
  height: 17vh;
  opacity: 0;
  transform: translateY(-20px);
  animation: fadeInDown 0.8s ease-out 0.1s both;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-links {
  gap: 2rem;
  list-style: none;
  font-size: 1.5rem;
}

.nav-links li {
  opacity: 0;
  transform: translateY(-10px);
  animation: fadeInDown 0.6s ease-out forwards;
}

.nav-links li:nth-child(1) { animation-delay: 0.3s; }
.nav-links li:nth-child(2) { animation-delay: 0.4s; }
.nav-links li:nth-child(3) { animation-delay: 0.5s; }
.nav-links li:nth-child(4) { animation-delay: 0.6s; }

a {
  color: black;
  text-decoration: none;
  text-decoration-color: white;
  position: relative;
  overflow: hidden;
}

a::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: rgb(181, 181, 181);
  transition: width 0.3s ease-in-out;
}

a:hover {
  color: grey;
}

a:hover::before {
  width: 100%;
}

.logo {
  font-size: 2rem;
}

.logo:hover {
  cursor: default;
}


#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: black;
  transition: all 0.3s ease-in-out;
}

.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);
}

.menu-links {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: white;
  width: fit-content;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.menu-links.open {
  max-height: 300px;
  border: 1px solid rgb(163, 163, 163);
}

.menu-links a {
  display: block;
  padding: 10px 20px;
  text-align: center;
  font-size: 1.5rem;
  color: black;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.menu-links a:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

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



.hamburger-icon span:first-child {
  transform: none;
}

.hamburger-icon span:first-child {
  opacity: 1;
}

.hamburger-icon span:first-child {
  transform: none;
}


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;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #353535;
}

.section__pic-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.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;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease-out 0.8s both;
}

.section__text__p1 {
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.6s ease-out 0.6s both;
}

.section__text__p2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.6s ease-out 1s both;
}

#socials-container {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  gap: 1rem;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.6s ease-out 1.4s both;
}

.btn-container {
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.6s ease-out 1.2s both;
}

.icon {
  cursor: pointer;
  height: 2rem;
  transition: all 0.3s ease;
}

.icon:hover {
  transform: scale(1.1);
  opacity: 0.8;
}

.section__pic-container {
  display: flex;
  height: 400px;
  width: 400px;
  margin: auto 0;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #353535;
  animation: scaleIn 1s ease-out 0.5s both;
}

.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);
}


.btn-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.btn {
  font-weight: 600;
  transition: all 300ms ease;
  padding: 1rem;
  width: 8rem;
  border-radius: 2rem;
  transform: translateY(0);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

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

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

.btn-color-1:hover {
  background: rgb(0, 0, 0);
}

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

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

.btn-container {
  gap: 1rem;
}


#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: white;
  border-radius: 2rem;
  border: rgb(53, 53, 53) 0.1rem solid;
  border-color: rgb(163, 163, 163);
  text-align: center;
  transition: all 0.3s ease;
  transform: translateY(0);
}

.details-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: rgb(53, 53, 53);
}

.color-container {
  transition: all 0.3s ease;
  transform: translateY(0);
}

.color-container:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.project-img {
  transition: transform 0.3s ease;
}

.color-container:hover .project-img {
  transform: scale(1.02);
}

article {
  transition: all 0.3s ease;
  transform: translateX(0);
}

article:hover {
  transform: translateX(5px);
  background-color: rgba(53, 53, 53, 0.05);
}

.section-container {
  gap: 4rem;
  height: 80%;
}

.section__pic-container {
  height: 400px;
  width: 400px;
  margin: auto 0;
}


#experience {
  position: relative;
}

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

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

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

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

article .icon {
  cursor: default;
}

#projects {
  position: relative;
}

.color-container {
  border-color: rgb(163, 163, 163);
  background: rgb(250, 250, 250);
}

.project-img {
  border-radius: 2rem;
  width: 90%;
  height: 90%;
}

.project-title {
  margin: 1rem;
  color: black;
}

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

/* 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: rgb(53, 53, 53) 0.1rem solid;
  border-color: rgb(163, 163, 163);
  background: (250, 250, 250);
  margin: 2rem auto;
  padding: 0.5rem;
}

.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 {
  height: auto;
  min-height: 26vh;
  margin: 0 1rem;
  padding-bottom: 2rem;
}

footer p {
  text-align: center;
}


@media (max-width: 768px) {
  .btn {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
  }
  
  .icon {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
  }
  
  .hamburger-icon {
    padding: 10px;
    min-height: 44px;
    min-width: 44px;
    justify-content: center;
    align-items: center;
  }
  
  * {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
  }
  

  .section__pic-container:hover img {
    transform: scale(1.02);
  }
  
  .details-container:hover {
    transform: translateY(-2px);
  }
  
  .color-container:hover {
    transform: translateY(-3px);
  }
  

  .nav-links a {
    padding: 12px 16px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  

  section {
    will-change: transform, opacity;
  }
  
  .details-container,
  .color-container,
  article {
    will-change: transform, opacity;
  }
}


@media (min-width: 769px) and (max-width: 1024px) {
  .section__pic-container {
    width: 320px;
    height: 320px;
  }
  
  .btn:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.18);
  }
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .section__pic-container {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}


@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


form {
  max-width: 600px;
  margin: 2rem auto;
  padding: 2rem;
  background: rgb(250, 250, 250);
  border-radius: 2rem;
  border: rgb(163, 163, 163) 0.1rem solid;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

form input,
form textarea {
  width: 100%;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border: rgb(163, 163, 163) 0.1rem solid;
  border-radius: 1rem;
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  color: rgb(85, 85, 85);
  background: white;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

form input:focus,
form textarea:focus {
  outline: none;
  border-color: rgb(53, 53, 53);
  box-shadow: 0 0 0 3px rgba(53, 53, 53, 0.1);
  transform: translateY(-2px);
}

form input::placeholder,
form textarea::placeholder {
  color: rgb(163, 163, 163);
}

form textarea {
  resize: vertical;
  min-height: 180px;
  font-family: "Poppins", sans-serif;
}

form button {
  width: 100%;
  padding: 1rem;
  background: rgb(53, 53, 53);
  color: white;
  border: none;
  border-radius: 2rem;
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  transform: translateY(0);
}

form button:hover {
  background: rgb(0, 0, 0);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

form button:active {
  transform: translateY(0);
}

/* Form mobile responsiveness */
@media screen and (max-width: 768px) {
  form {
    margin: 1rem;
    padding: 1.5rem;
    border-radius: 1.5rem;
  }
  
  form input,
  form textarea {
    padding: 0.8rem;
    margin-bottom: 1rem;
    border-radius: 0.8rem;
  }
  
  form textarea {
    min-height: 150px;
  }
  
  form button {
    padding: 0.8rem;
    border-radius: 1.5rem;
    min-height: 44px;
    touch-action: manipulation;
  }
}

@media (prefers-color-scheme: dark) {
  .menu-links {
    background-color: #2d2d2d;
    border: 1px solid #444;
  }
  
  .menu-links a {
    color: white;
  }
  
  .menu-links a:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }
  
  form {
    background: #2d2d2d;
    border-color: #444;
  }
  
  form input,
  form textarea {
    background: #333;
    border-color: #444;
    color: white;
  }
  
  form input::placeholder,
  form textarea::placeholder {
    color: #888;
  }
  
  form input:focus,
  form textarea:focus {
    border-color: #666;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
  }
  #success-message {
  font-weight: bold;
  color: green;
  margin-top: 1rem;
}
}
