@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");

* {
  box-sizing: border-box;
}

body {
  background-color: #f5f5f7;
  font-family: "Inter", sans-serif;
  margin: 0;
  padding: 0 10px;
}

/* wallpaper section */
.wallpaper img {
  width: 100%;
  height: auto;
  max-height: 250px;
  object-fit: cover;
  border-radius: 10px;
}

/* profile section */
.profile-details {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  flex-direction: column;
  text-align: center;
  gap: 20px;
  padding: 20px 0;
}

.profile-picture img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
}

.profile-info h1 {
  font-size: 1.8rem;
  margin: 0;
}

.profile-social {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.profile-social div {
  display: flex;
  align-items: center;
  gap: 5px;
}

.profile-social i {
  width: 20px;
  height: 20px;
}

.profile-social :hover {
  background-color: rgb(251, 203, 145);
  border-radius: 30px;
}

.profile {
  padding: 20px;
  text-align: center;
}

/* menu section */
.menu {
  display: flex;
  justify-content: space-around;
  background-color: #6e6e73;
  color: #f5f5f7;
  text-transform: uppercase;
  border-radius: 20px;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
}

.menu div {
  text-align: center;
  padding: 8px 0;
}

.menu :hover {
  background-color: rgb(247, 155, 155);
  border-radius: 30px;
}

.menu a {
  color: #f5f5f7;
  text-decoration: none;
  padding: 5px;
}

/* project section */
.projects {
  flex-direction: column;
  align-items: center;
  height: auto;
  margin-top: 30px;
  margin-bottom: 30px;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
}

.projects .card {
  width: 90%;
  max-width: 300px;
  height: auto;
  min-height: 150px;
  padding: 20px;
  margin: 15px 0;
  border-radius: 20px;
  font-size: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 1px solid black;
  transition: background-color 0.3s ease;
}

.projects .card:hover {
  background-color: #f9cea7;
  p {
    color: #f5f5f7;
  }
  a {
    background-color: blue;
    color: white;
    border: none;
  }
}

.projects .card p {
  width: 100%;
  margin-bottom: 15px;
  text-align: center;
  font-weight: bold;
  color: black;
}

.projects .card a {
  padding: 10px;
  border-radius: 20px;
  color: black;
  text-decoration: none;
  border: 1px solid;
}

/* education section */
.education {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  margin-bottom: 20px;
  padding: 0 10px;
}

.education a {
  text-decoration: none;
  color: blue;
}

.ru-logo img {
  width: 80px;
  height: 130px;
  object-fit: cover;
}

.ru-logo {
  display: flex;
  flex-direction: column;
  text-align: center;
  gap: 15px;
  margin: 20px 0;
}

.ruce:hover {
  background-color: #f9cea7;
  border-radius: 30px;
  h3 {
    color: #2c1702;
  }
  h5 {
    color: #2c1702;
  }
}

.snjc_logo img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
}

.snjc_logo {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  gap: 15px;
  margin: 20px 0;
  padding: 10px;
}

.snjc :hover {
  background-color: #f9cea7;
  border-radius: 30px;
  h3 {
    color: #2c1702;
  }
  h5 {
    color: #2c1702;
  }
}

.snhs_logo img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
}

.snhs_logo {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  gap: 15px;
  margin: 20px 0;
  padding: 10px;
}

.snhs :hover {
  background-color: #f9cea7;
  border-radius: 30px;
  h3 {
    color: #2c1702;
  }
  h5 {
    color: #2c1702;
  }
}

/* skills section */
.skills {
  display: flex;
  margin-bottom: 20px;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 0 10px;
  width: 100% !important; /* Override the fixed width */
  height: auto !important; /* Override the fixed height */
}
.card {
  width: 130px;
  height: 130px;
  perspective: 1000px; /* Adds depth */
  margin-top: 20px;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d; /* Ensures child elements are rendered in 3D */
}

.card:hover .card-inner {
  transform: rotateX(180deg); /* Flips the card on hover */
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden; /* Hides the back side when flipped */
  border-radius: 30px;
}

.card-front {
  display: flex;
  justify-content: center;
  align-items: center;
}

.card-back {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #007bff; /* Change as needed */
  color: white;
  transform: rotateX(180deg); /* Initially hide the back */
}

/* experience section */
.experience {
  display: flex;
  justify-content: center;
  background-color: #4e9495;
  color: #d5d5d5;
  text-transform: uppercase;
  text-align: center;
  border-radius: 10px;
  margin: 0 auto;
  margin-top: 30px;
  margin-bottom: 20px;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  box-sizing: border-box;
  height: auto;
  padding: 15px 0;
}

.marquee-text {
  display: inline-block;
  padding-left: 100%;
  animation: scroll-left 10s linear infinite;
}
@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* achievements section */
.Achievements {
  display: flex;
  flex-direction: column;
  text-align: center;
  color: black;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  row-gap: 30px;
  margin-bottom: 20px;
  padding: 0 15px;
}

.Achievements > div {
  width: 100%;
  padding: 20px;
  margin-bottom: 20px;
}

.Achievements :hover {
  background-color: #f9cea7;
  border-radius: 30px;
  h2 {
    color: #f5f5f7;
  }
  h4 {
    color: #f5f5f7;
  }
  p {
    color: #f5f5f7;
  }
  a {
    background-color: blue;
    color: white;
    border: none;
  }
}

.Achievements a {
  padding: 10px;
  border-radius: 20px;
  text-decoration: none;
  border: 1px solid;
}

/* Footer */
footer {
  background: linear-gradient(135deg, #2c3e50, #34495e);
  color: white;
  padding: 5px 0;
  text-align: center;
  border-radius: 0 0 10px 10px;
}

.copyright {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Tablet Styles */

@media (min-width: 320px) {
  .ru-logo {
    align-items: center;
    text-align: center;
  }
}

@media (min-width: 768px) {
  body {
    padding: 0 20px;
  }

  .profile-details {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  .profile-picture img {
    width: 200px;
    height: 200px;
  }

  .profile-social {
    flex-direction: column;
    align-items: flex-start;
  }

  .menu {
    flex-direction: row;
  }

  .projects {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
  }

  .projects .card {
    width: 45%;
    max-width: 250px;
  }

  .ru-logo,
  .snjc_logo,
  .snhs_logo {
    flex-direction: row;
    align-items: center;
    text-align: left;
  }

  .skills .card {
    width: 140px;
    height: 140px;
  }

  .Achievements > div {
    width: 80%;
  }
}

/* Desktop Styles */
@media (min-width: 1024px) {
  body {
    max-width: 1200px;
    margin: 0 auto;
  }

  .profile-details {
    justify-content: space-around;
  }

  .profile-picture img {
    width: 220px;
    height: 220px;
  }

  .projects .card {
    width: 30%;
    max-width: 300px;
  }

  .skills .card {
    width: 150px;
    height: 150px;
  }

  .Achievements > div {
    width: 70%;
  }
}

/* Large Desktop Styles */
@media (min-width: 1440px) {
  .projects .card {
    width: 23%;
  }
}

/* Fix for small mobile devices */
@media (max-width: 360px) {
  .profile-picture img {
    width: 150px;
    height: 150px;
  }

  .profile-info h1 {
    font-size: 1.5rem;
  }

  .profile-social {
    gap: 10px;
  }

  .projects .card {
    width: 95%;
  }

  .skills .card {
    width: 120px;
    height: 120px;
  }
}

/* Ensure text remains readable */
.profile p,
.education h3,
.education h5,
.Achievements h2,
.Achievements h4,
.Achievements p {
  line-height: 1.5;
}

/* Improve button/links for touch devices */
.profile-social a,
.menu a,
.projects .card a,
.Achievements a,
.education a {
  padding: 8px 12px;
  display: inline-block;
  min-height: 44px; /* Minimum touch target size */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Make sure images don't overflow */
img {
  max-width: 100%;
  height: auto;
}
