@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  outline: none;
  scroll-behavior: smooth;
  font-family: "Poppins", sans-serif;
}

:root {
  --bg-color: #111827;
  --second-bg-color: #1f2937;
  --text-color: #f9fafb;
  --main-color: #38bdf8;
  --accent-color: #60a5fa;
  --border-color: #374151;
}

html {
  font-size: 62.5%;
  overflow-x: hidden;
}

body {
  background: var(--bg-color);
  color: var(--text-color);
}

/* General Styles */
section {
  min-height: 100vh;
  padding: 10rem 9% 5rem;
}

.heading {
  text-align: center;
  font-size: 4.5rem;
  margin-bottom: 4rem;
}

.heading span {
  color: var(--main-color);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: var(--main-color);
  color: var(--bg-color);
  border: 2px solid var(--main-color);
  border-radius: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  margin-top: 2rem;
}

.btn:hover {
  background: transparent;
  color: var(--main-color);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* HEADER */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem 9%;
  background: var(--bg-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.3s ease;
}

.logo {
  font-size: 2.5rem;
  color: var(--text-color);
  font-weight: 700;
  cursor: default;
}

.navigation a {
  font-size: 1.7rem;
  color: var(--text-color);
  font-weight: 500;
  margin-left: 3.5rem;
  transition: color 0.3s ease;
}

.navigation a:hover,
.navigation a.active {
  color: var(--main-color);
}

#menu-icon {
  font-size: 3.6rem;
  color: var(--text-color);
  display: none;
}

/* HOME SECTION */
.home {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.home-content {
  max-width: 60rem;
}

.home-content h3 {
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1.3;
}

.home-content h3:nth-of-type(2) {
  margin-bottom: 1rem;
}

.home-content h1 {
  font-size: 5.6rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0.5rem 0 1rem;
}

.home-content p {
  font-size: 1.6rem;
  margin-bottom: 3rem;
  line-height: 1.6;
}

.social-media-home a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 4rem;
  height: 4rem;
  background: transparent;
  border: 0.2rem solid var(--main-color);
  border-radius: 50%;
  font-size: 2rem;
  color: var(--main-color);
  margin: 0 1.5rem 3rem 0;
  transition: 0.5s ease;
}

.social-media-home a:hover {
  background: var(--main-color);
  color: var(--bg-color);
  box-shadow: 0 0 1rem var(--main-color);
}

.home-img img {
  width: 30vw;
  border-radius: 50%;
  object-fit: cover;
  border: 0.5rem solid var(--main-color);
  box-shadow: 0 0 2rem var(--main-color);
  animation: floatImage 4s ease-in-out infinite;
}

@keyframes floatImage {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2rem);
  }
  100% {
    transform: translateY(0);
  }
}

/* ABOUT SECTION */
.about {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4rem;
  background: var(--second-bg-color);
}

.about-img img {
  width: 30vw;
  border-radius: 1.5rem;
}

.about-content h2 {
  text-align: left;
  line-height: 1.2;
}

.about-content h3 {
  font-size: 2.6rem;
  margin-bottom: 1rem;
}

.about-content p {
  font-size: 1.6rem;
  margin: 2rem 0 3rem;
  line-height: 1.6;
}

.about-content h4 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--main-color);
}

.skills-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.skills-list span {
  background: var(--second-bg-color);
  padding: 1.2rem 2rem;
  border-radius: 0.8rem;
  border: 1px solid var(--border-color);
  text-align: center;
  font-weight: 600;
  transition: all 0.3s ease;
}

.skills-list span:hover {
  background: var(--main-color);
  color: var(--bg-color);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.3);
}

/* PORTFOLIO SECTION */
.portfolio {
  background: var(--second-bg-color);
  padding-bottom: 10rem;
}

.portfolio .heading {
  margin-bottom: 5rem;
}

.loading-message {
  text-align: center;
  font-size: 2rem;
  color: var(--accent-color);
  padding: 4rem 0;
}

.loading-message i {
  margin-right: 1rem;
}

.portfolio-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(32rem, 1fr));
  gap: 3rem;
}

.portfolio-box {
  position: relative;
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-box:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(56, 189, 248, 0.15);
}

.portfolio-box img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.3s ease;
  display: block;
  opacity: 0.9;
}

.portfolio-box:hover img {
  transform: scale(1.05);
  opacity: 1;
}

.portfolio-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.85) 75%);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.portfolio-box:hover .portfolio-layer {
  opacity: 1;
}

.portfolio-layer h4 {
  font-size: 2.2rem;
  margin-bottom: 0.8rem;
  color: var(--text-color);
}

.portfolio-layer p {
  font-size: 1.5rem;
  margin: 0 0 1rem;
  color: var(--text-color);
  line-height: 1.5;
}

.portfolio-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.portfolio-meta span {
  background: var(--main-color);
  color: var(--bg-color);
  padding: 0.4rem 1rem;
  border-radius: 0.5rem;
  font-size: 1.2rem;
  font-weight: 500;
}

.portfolio-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
  color: var(--accent-color);
}

.portfolio-stats span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.portfolio-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
}

.portfolio-layer a {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  background: var(--main-color);
  color: var(--bg-color);
  font-size: 1.4rem;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 2px solid var(--main-color);
}

.portfolio-layer a i {
  font-size: 1.8rem;
}

.portfolio-layer a:hover {
  background: transparent;
  color: var(--main-color);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  border-color: var(--main-color);
}

/* CONTACT SECTION */
.contact {
  background: var(--bg-color);
  padding-bottom: 8rem;
}

.contact-intro {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 4rem;
  color: var(--text-color);
  opacity: 0.9;
}

.contact form {
  max-width: 70rem;
  margin: 1rem auto;
  text-align: center;
  margin-bottom: 3rem;
}

.contact form .input-box {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.contact form .input-box input,
.contact form textarea {
  width: 100%;
  padding: 1.5rem;
  font-size: 1.6rem;
  color: var(--text-color);
  background: var(--second-bg-color);
  border-radius: 0.8rem;
  margin: 0.7rem 0;
  border: 1px solid var(--border-color);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact form .input-box input:focus,
.contact form textarea:focus {
  border-color: var(--main-color);
  box-shadow: 0 0 0.5rem var(--main-color);
}

.contact form .input-box input {
  width: 49%;
}

.contact form textarea {
  resize: vertical;
}

.contact form .btn {
  margin-top: 2rem;
  cursor: pointer;
}

.contact-info {
  text-align: center;
  margin-top: 4rem;
}

.contact-info p {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.contact-info p i {
  color: var(--main-color);
  font-size: 2rem;
}

.contact-info a {
  color: var(--text-color);
  transition: color 0.3s ease;
}

.contact-info a:hover {
  color: var(--main-color);
}

/* FOOTER */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 2rem 9%;
  background: var(--second-bg-color);
  border-top: 1px solid var(--border-color);
}

.footer-text p {
  font-size: 1.4rem;
}

.footer-iconTop a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.8rem;
  background: var(--main-color);
  border-radius: 0.8rem;
  transition: box-shadow 0.5s ease;
}

.footer-iconTop a:hover {
  box-shadow: 0 0 1rem var(--main-color);
}

.footer-iconTop a i {
  font-size: 2.4rem;
  color: var(--bg-color);
}

/* More Projects Button */
.more-projects {
  text-align: center;
  margin-top: 3rem;
}

.more-projects-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  background: var(--main-color);
  color: var(--bg-color);
  border: 2px solid var(--main-color);
  border-radius: 0.5rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.more-projects-btn:hover {
  background: transparent;
  color: var(--main-color);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.more-projects-btn i {
  font-size: 1.2rem;
}

/* Achievements Section */
.achievements {
  margin-top: 4rem;
  text-align: center;
}

.achievements h4 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--main-color);
}

.achievement-items {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.achievement-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
  background: var(--bg-color);
  border-radius: 1rem;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  min-width: 15rem;
}

.achievement-item:hover {
  transform: translateY(-5px);
  border-color: var(--main-color);
  box-shadow: 0 10px 25px rgba(56, 189, 248, 0.2);
}

.achievement-item i {
  font-size: 3rem;
  color: var(--main-color);
}

.achievement-item span {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-color);
}

/* BREAKPOINTS */
@media (max-width: 1200px) {
  html {
    font-size: 55%;
  }
}

@media (max-width: 991px) {
  .header {
    padding: 2rem 3%;
  }
  section {
    padding: 10rem 3% 5rem;
  }
  .footer {
    padding: 2rem 3%;
  }
  .portfolio {
    padding-bottom: 7rem;
  }
  .contact {
    min-height: auto;
  }
  .home {
    padding-bottom: 7rem;
  }
}

@media (max-width: 768px) {
  #menu-icon {
    display: block;
  }

  .navigation {
    position: absolute;
    top: 100%;
    left: -100%;
    width: 100%;
    padding: 1rem 3%;
    background: var(--bg-color);
    border-top: 0.1rem solid rgba(0, 0, 0, 0.2);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
    transition: left 0.3s ease;
  }

  .navigation.active {
    left: 0;
  }

  .navigation a {
    display: block;
    font-size: 2rem;
    margin: 3rem 0;
  }

  .home {
    flex-direction: column-reverse;
    text-align: center;
    gap: 2rem;
  }

  .home-content h3 {
    font-size: 2.6rem;
  }

  .home-content h1 {
    font-size: 5rem;
  }

  .home-content {
    order: 2;
    max-width: none;
  }

  .home-img img {
    width: 70vw;
    margin-top: 4rem;
    margin-bottom: 2rem;
  }

  .about {
    flex-direction: column;
    text-align: center;
  }

  .about-img img {
    width: 70vw;
    margin-top: 1rem;
    margin-bottom: 3rem;
  }

  .about-content h2 {
    text-align: center;
  }

  .about-content .btn {
    margin: 3rem auto 0;
  }

  .portfolio h2 {
    margin-bottom: 3rem;
  }

  .achievement-items {
    gap: 2rem;
  }

  .achievement-item {
    min-width: 12rem;
    padding: 1.5rem;
  }

  .achievement-item i {
    font-size: 2.5rem;
  }

  .achievement-item span {
    font-size: 1.2rem;
  }

  .skills-list {
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 1rem;
  }

  .skills-list span {
    padding: 1rem 1.5rem;
    font-size: 1.3rem;
  }

  .contact-intro {
    font-size: 1.6rem;
    margin-bottom: 3rem;
  }

  .portfolio-links {
    flex-direction: column;
    gap: 1rem;
  }

  .portfolio-layer a {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 617px) {
  .home-img img {
    width: 80vw;
    margin-top: 8rem;
  }
  .about-img img {
    width: 80vw;
    margin-top: 4rem;
  }
}

@media (max-width: 450px) {
  html {
    font-size: 50%;
  }

  .contact form .input-box input {
    width: 100%;
  }
}
