@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

body {
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  color: white;
  background-color: #3a3a3a;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-timeline: view();
  scroll-padding-top: 70px;
}

/* nav bar */
nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

nav ul, footer ul {
  list-style: none;
  margin: 0;
  padding: 2px 5px;

  display: flex;
  justify-content: flex-end;
  align-items: center;
}

nav ul {
  background-color: rgba(42, 42, 42, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #444;
}

footer ul {
  justify-content: center;
  background-color:#141414;
}

nav ul li, footer ul li{
  display: block;
}

nav ul li a, footer ul li a {
  color: white;
  text-decoration: none;
  display: block;

  padding: 15px 12px;

  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 18px;

  transition: all .3s ease;
}

footer ul li a {
  display: flex;
  gap: 2rem;
}

nav ul li a:hover, footer ul li a:hover {
  color: #3e9fff;

  display: inline-block;
  transform: scale(1.1);
  font-weight: 500;
}

footer {
  background-color: #141414;
  color: white;
  text-align: center;
  padding: 2.5rem;
  margin-top: 2.5rem;
}

.title {
  text-align: center;
  margin-bottom: -20px;
  padding-top: 2%;
  margin-top: 5%;
}

/* Hero Page */
.hero {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 100px 5%;
  margin-bottom: 5%;
  min-height: calc(100vh - 70vh);
}

.hero-text {
  padding-top: 0%;
}

.hero h1 {
  font-size: 7rem;
  margin: 0;

  background-image: linear-gradient(
    to right,
  #2665c9, #3373C4,#5494DA, #73B9EE,#5494DA, #3373C4, #2665c9
  );

  -webkit-background-clip: text;
  background-clip: text;
  color:transparent;

  background-size: 200%;

  animation: animate 3s linear infinite;
}

@keyframes animate {
  from {
    background-position: 0;
  }

  to {
    background-position: 200%;
  }
}

.hero h2, span {
  font-size: 48px;
  font-weight: 700;
}

.hero h2 {
  margin-top: 1.1px;
}

.hero h3 {
  font-size: 2rem;
  margin: 0 0 -30px 10px;
}

.hero img {
  width: 450px;
  height: auto;
  border-radius: 50%;
  object-fit: cover;
  border: 10px solid #168bff;
}

/* hero text animation */
.wrapper {
  box-sizing: content-box;
  height: 70px;
  padding-right: 50px;
  margin-top: -40px;
  display: flex;
  white-space: nowrap;
  overflow: hidden;

}

.words{
  overflow: hidden;
  transform: scale(1.1);
  transform-origin: left center;
}

span {
  display: block;
  height: 100%;
  padding-left: 10px;

  color: #168bff;
  
  animation: spin_words 9s infinite;
  animation-delay: .8s;

  /* just for testing */
  /* border: 1px solid red; */

}

@keyframes spin_words {
  12% {
    transform: translateY(-103%);
  }
  20% {
    transform: translateY(-100%);
  }
  32% {
    transform: translateY(-203%);
  }
  40% {
  transform: translateY(-200%);
  }
  52% {
    transform: translateY(-303%);
  }
  60% {
    transform: translateY(-300%);
  }
  72% {
    transform: translateY(-403%);
  }
  80% {
    transform: translateY(-400%);
  }
  92% {
    transform: translateY(-503%);
  }
  100% {
    transform: translateY(-500%);
  }
}


/* socials */
.socials {
  margin-left: -5px;
  margin-top: 9%;
}

.socials a {
  text-decoration: none;
}

.socials i {  
  padding-right: .2rem;
  height: 40px;
  width: auto;

  font-size: 2.2rem;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: white;

  transition: all .3s ease;
}

.socials i:hover {
  color:#3e9fff;
  transform: translateY(-12%) scale(1.1);
}

/* about page */
.about-container {
  display: grid;
  grid-template-rows: auto;
  background-color: #2d2d2d;

  gap: 50px;
  margin: 0 10%;
  padding-bottom: 5%;
  padding-top: -50%;

  border-radius: 2%;

  box-shadow: 10px 10px 10px #2a2a2a;
}

#talking-pic {
  width: 300px;
  height: auto;
}

#breaking-pic {
  width: 255px;
  height: auto;
}

.about-card img {
  transition: all .3s ease;
}

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

.about-card {
  display: flex;
  justify-content: center;
  align-items:center;
  gap: 90px;

  padding: 0 5%;
  margin: -20px 0;

  /* background-color: red; */
}

.about-card p {
  font-weight: 400;
  font-size: 22px;
}

.about-1 {
  animation: appearLeft linear;
  animation-timeline: view();
  animation-range: entry 0 cover 20%;
}

@keyframes appearLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.about-2 {
  animation: appearRight linear;
  animation-timeline: view();
  animation-range: entry 0 cover 20%;
}

@keyframes appearRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* projects tab */

.carosel {
  width: 90%;
  overflow-x: auto;
  margin: 3em auto;
  display: flex;
  gap: 1em;
  scroll-behavior: smooth;

  anchor-name: --carosel;

  scroll-snap-type: x mandatory;
scroll-snap-stop: always;
  
  height: auto;
  padding: 2rem 3rem;
}

.carosel::-webkit-scrollbar {
  display: none;
}

.carosel::scroll-button(right), .carosel::scroll-button(left) {
  content: ">";
  border: none;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 2rem;
  font-weight: 600;
  background-color:#3e9fff;
  color: white;

  height: 60px;
  width: 60px;
  border-radius: 50%;
  cursor: pointer;
  padding-left: .2em;

  position: fixed;
  position-anchor: --carosel;
  position-area: right center;
  translate: -50%;
}

.carosel::scroll-button(left) {
  content: "<";
  position-area: left center;
  translate: 50%;
}

.carosel::scroll-button(right):disabled, .carosel::scroll-button(left):disabled {
  opacity: .25;
  cursor: auto;
}

/* project cards */

.project-card {
  scroll-snap-align: center;

  flex: 0 0 24em;
  height: 20em;
  background-color: #2d2d2d;
  padding: 1em;
  border-radius: .5em;
  text-align: center;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  transition: transform .3s ease, box-shadow .1s ease;
}

.project-card h3 {
  margin: 0;
  align-self: center;
  padding-top: 2%;
  color: #a5a5a5;
}

.project-card h4 {
  margin: 5px 0 15px 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: #168aff72; /* Using your signature blue to make it pop */
  text-transform: uppercase;
  letter-spacing: .5px;
}

.project-card p {
  margin: auto 0;
  color: #a5a5a5;

  transition: all .3s ease;
}

.project-card h3, .project-card h4, .project-card p, .project-card img {
  transition: all .3s ease;
}

.project-card:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  cursor: pointer;
}

.project-card:hover h3 {
  color: white;
}
.project-card:hover h4 {
  color: #168bff;
}

.project-card:hover p {
  color: white;
}

.project-card:hover img {
  filter: grayscale(0%);
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 15px;
  padding-top: 10px;
}

.tech-stack img {
  width: 35px;
  height: auto;
  object-fit: contain; 
  filter: grayscale(100%);
}

.tech-stack img:hover {
  transform: scale(1.2); 
}

.project-link {
  text-decoration: none;
  color: inherit;
  
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  
  width: 100%;
  height: 100%;
}

.tech-link {
  text-decoration: none;
}

/* contact form */

.contact-container {
  background-color: #2d2d2d;
  margin: 5% 30%; 
  padding: 1rem 5%;
  border-radius: 20px;
  box-shadow: 10px 10px 10px #2a2a2a;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
  padding-top: 2rem;
  margin: 0 auto;
  text-align: left;

  /* background-color: red; */

  margin-bottom: 2rem;
}

.contact-desc {
  text-align: center;
  width: 0% 100%;
  margin: 0% 2%;
  padding-top: 2rem;
  padding-bottom: 0;
}

.contact-form label {
  font-weight: bold;
}

.contact-form input, .contact-form textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
}

.contact-form textarea {
  resize: none;
  min-height: 8rem;
}

.contact-form button {
  padding: 12px;
  background-color: #3e9fff;
  color: white;
  border: none;
  border-radius: 4px;
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;

  transition: all .3s ease;
}

.contact-form button:hover {
  background-color: #168bff;
  transform: translateY(-10%);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 40px;
    min-height: auto;
  }

  .wrapper {
    justify-content: center;
    padding-right: 3rem;
  }

  .socials {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    gap: 2rem;
  }

  .contact-container {
    margin: 5% 20%;
  }
}

@media (max-width: 1024px) {
  .about-card {
    gap: 30px;
  }

  .about-card p {
    font-size: 20px;
  }

  #talking-pic {
    width: 25vw;
    height: auto;
  }

  #breaking-pic {
    width: 25vw;
    height: auto;
  }

  .project-card {
    flex: 0 0 85%;
    min-width: 250px;
  }

  .carosel {
    width: 90%;
    margin: 2em 2em;
    padding: 1rem 0;
  }
}

@media (max-width: 680px) {
  .wrapper {
    margin-top: -10px;
    padding-right: 50px;
  }

  .hero h2, span {
    font-size: 35px; 
  }
}

@media (max-width: 510px) {
  .wrapper {
    margin-top: -10px;
    padding-right: 50px;
  }
  
  .hero h2, span {
    font-size: 25px; 
  }

  .hero img {
    width: 300px;
    height: auto;
  }

  .hero h1 {
    font-size: 70px;
  }

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

  .about-card p {
    font-size: 15px;
  }
}