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

body,
html {
  height: 100vh;
  font-family: "Inter Tight", sans-serif;
  font-size: 16px;
  scroll-behavior: smooth;
}

.hero-image {
  background-image: linear-gradient(rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.255)),
    url("../images/hero.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
  height: 16rem;
}

.hide {
  display: none;
}

.fa-bars {
  margin: 1rem;
  font-size: 1.5rem;
}

#bar-icon {
  /* background-color: rgba(128, 128, 128, 0.692); */
  margin-bottom: 0;
  position: absolute;
  top: 5px;
  right: 5px;
}

#x-icon {
  position: absolute;
  top: 14px;
  right: 20px;
  color: #fff;
  padding: 1rem;
}

nav {
  padding: 1rem;
  visibility: hidden;
}

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

nav.active {
  animation: fadeIn 0.5s;
  visibility: visible;
}

nav ul {
  display: flex;
  flex-direction: row;
  gap: 0.7rem;
  text-align: center;
  background-color: rgba(128, 128, 128, 0.692);
  border-radius: 20px;
}

nav ul:hover {
  color: grey;
}

nav ul:nth-child(1){
  padding-left: 1.5rem;
}

nav ul li {
  list-style-type: none;
  padding: 0.8rem;
  font-size: 1.1rem;
}

nav a {
  text-decoration: none;
  color: #fff;
}

nav ul li:hover {
  background-color: rgba(255, 255, 255, 0.325);
  color: grey;
}

h1 {
  font-family: "Inter Tight", sans-serif;
  font-size: 2.2rem;
  letter-spacing: 3px;
}

/* Hero Text Animation */
.hero-text {
  color:#fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transform: translateY(40px); /* Starts off-screen above */
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* When it becomes visible, we move it to the normal position */
.hero-text.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Add slight delay to smooth appearance */
.hero-text.visible {
  transition-delay: 0.2s; /* Adjust for smooth transition */
}


.hero-text p {
  font-size: 1.2rem;
  letter-spacing: 0.1rem;
}

.hero-text p.subtext {
  font-size: .7rem;
  text-align: center;
  margin-top: 1rem;
  padding: 1rem;
  letter-spacing: 0.1rem;
}

.hero-text button {
  border: none;
  outline: 0;
  padding: 10px 25px;
  color: black;
  background-color: #efd85a;
  text-align: center;
  cursor: pointer;
  border-radius: 5px;
  font-size: 1rem;
}

.hero-text button:hover {
  background-color: #555;
  color: white;
}

main {
  margin: 0 auto;
  text-align: center;
}

.avatar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 1rem;
  margin-top: 5rem;
}

.avatar img {
  border-radius: 10rem;
  width: 30%;
  border: 2px solid #fff;
  margin-right: 0.5rem;
}

/* PORTFOLIO */
.portfolio {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  margin: 0 auto;
  width: 100%;
}

.card {
  margin: 0.5rem;
  max-width: 320px;
  border: 2px solid rgba(193, 193, 193, 0.677);
  border-radius: 1rem;
  text-align: center;
  transition: all 1s;
}

.portfolio-img {
  max-width: 100%;
  width: 316px;
  height: 210px;
  object-fit: cover;
  object-position: -0.5% 1%;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
}

.card:hover{
  background: linear-gradient(120deg, #fcecafef, #ffd904);
}

.card h2 {
  font-size: 1.5rem;
}

.card h2,
.card p,
.card button {
  padding: 0.5rem;
}

.card ul {
  list-style-type: none;
  text-align: left;
  padding: 1rem;
  line-height: 1.5rem;
}

.card button {
  font-size: 1rem;
  padding: 0.8rem;
  border-radius: 2rem;
  margin-bottom: 1.5rem;
}

.p-heading{
  font-size: 1rem;
  font-weight: bold;
}

/* GET IN TOUCH */
.sec-title {
  margin: 1.5rem 1.5rem;
  padding-bottom: 2rem;
}

.git h2 {
  font-size: 1.7rem;
  margin-bottom: 1.5rem;
}

.contact-social {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 1.5rem;
  margin-top: 1rem;
}

form {
  background-color: rgb(243, 243, 243);
  border-radius: 6px;
  margin: 30px 0;
  padding: 25px;
}

input,
textarea {
  width: 100%;
  padding: 10px 16px;
  margin: 8px 0px;
  border-radius: 5px;
  border: 0;
}

input[type="button"] {
  background-color: #efd85a;
  padding: 14px 20px;
  cursor: pointer;
  color: #fff;
  border: 0;
  font-size: 1rem;
  color: #000;
}

input:hover {
  background-color: rgba(245, 253, 172, 0.705);
}

.contact-social i {
  color: #000;
}

.contact-social a, .card a {
  color: rgb(203, 166, 18);
  text-decoration: none;
  letter-spacing: 2px;
}

.contact-social a:hover {
  color: #000;
}

@media screen and (min-width: 40em) {
  .fa-bars {
    font-size: 2.5rem;
    margin: 1.5rem;
  }

  .fa-x, nav ul li {
    font-size: 1.2rem;
  }

  nav ul{
    justify-content: space-evenly;
  }

  nav ul:nth-child(1){
    padding-left: 0;
  }

  .hero-text {
    font-size: 1.1rem;
  }

  .hero-text p.subtext {
    font-size: 0.8rem;
    width: 90%;
  }

  h1 {
    font-size: 2.2rem;
  }

  .hero-text p {
    font-size: 1.3rem;
  }

  .hero-text button {
    font-size: 0.8rem;
    margin-right: 0.8rem;
  }

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

  .card{
    height: 100%;
  }

  .avatar {
    margin-right: -4rem;
  }

  .avatar img {
    width: 25%;
    margin-top: -3rem;
  }

  /* Add initial hidden state */
  .animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
  }

  .animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
  }

} /* end of media min-width: 40em */

@media screen and (min-width: 60em) {
  #bar-icon, #x-icon{
    display: none;
  }

  nav {
    visibility: visible;
  }

  nav ul{
    justify-content: right;
    background-color: transparent;
  }

  nav ul li{
    font-size: 1.3rem;
  }

  nav ul li a:hover{
    border-radius: 5rem;
  }
  

  h1 {
    font-size: 2.5rem;
  }

  .hero-text p {
    font-size: 1.3rem;
  }

  .hero-text button {
    font-size: 1rem;
    margin-right: 0.2rem;
  }

  .avatar img {
    border-radius: 10rem;
    margin-top: -5rem;
  }

  .card h2{
    font-size: 1.3rem;
  }

  .p-heading{
    font-size: 0.9rem;
  }

  .card {
    font-size: 0.8rem;
  }

  .portfolio {
    grid-template-columns: repeat(3, 1fr);
    justify-items: center;
    align-items: start;
    margin: 0 auto;
    max-width: 1200px;
  }

  .portfolio-img{
    object-fit: cover;
    object-position: 50%;
  }

  /* .contact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-areas:
      "git git"
      "contact-form social";
    gap: 1rem;
    align-items: start;
  } */

  .git {
    grid-area: git;
  }

  .contact-social {
    grid-area: social;
  }

  .contact-form {
    grid-area: contact-form;
    margin-top: 0;
  }
} /* end of media min-width: 60em */

@media screen and (min-width: 90em) {
  h1 {
    font-size: 3rem;
  }

  .hero-text p {
    font-size: 1.3rem;
  }

  .avatar {
    margin-left: 15rem;
    margin-top: 8rem;
  }

  .avatar img {
    width: 30%;
  }

  .hero-text button {
    margin-right: 1rem;
  }


  .hero-text p.subtext {
  font-size: 1rem;
  width: 70%;
  }

  #portfolio {
    margin: 0 auto;

  }
  
  
} /* end of media min-width: 90em */
