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

:root {
  --primary-color: #2373fd;
  --primary-color-dark: #0747b4;
  --secondary-color: #1062ef;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --extra-light: whitesmoke;
  --box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
  --max-width: 1200px;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

a {
  text-decoration: none;
}

body {
  margin: 0;
  height: 100dvh;
}

nav {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  background-color: #ffffff;
  z-index: 99;
}

#messageModal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  text-align: center;
  font-family: 'Arial', sans-serif;
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 0;
}

#messageModal.show {
  display: block;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

#messageText {
  margin: 0;
  padding: 10px;
  font-size: 16px;
  color: #333;
}

#loading-screen {
  position: fixed;
  width: 100%;
  height: 100%;
  background: white; 
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.spinner {
  border: 8px solid rgba(0, 0, 0, 0.1); 
  border-top: 8px solid var(--primary-color); 
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.nav-content {
  max-width: var(--max-width);
  margin: auto;
  padding: 1.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

nav .logo a {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
  transition: 0.3s;
}

nav .logo a:hover {
  color: var(--primary-color-dark);
}

nav .checkbox {
  display: none;
}

nav input {
  display: none;
}

nav .checkbox i {
  font-size: 2rem;
  color: var(--primary-color);
  cursor: pointer;
}

ul {
  display: flex;
  align-items: center;
  gap: 1rem;
  list-style: none;
  transition: left 0.3s;
}

ul li a {
  padding: 0.5rem 1rem;
  border: 2px solid transparent;
  text-decoration: none;
  font-weight: 600;
  color: var(--text-dark);
  transition: 0.3s;
}

ul li a:hover {
  border-bottom-color: var(--secondary-color);
  color: var(--secondary-color);
}

.section {
  background-color: var(--extra-light);
}

.section-container {
  min-height: 100dvh;
  max-width: var(--max-width);
  margin: auto;
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4rem;
}

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

.subtitle {
  letter-spacing: 2px;
  color: var(--text-light);
  font-weight: 600;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.title {
  font-size: 2rem;
  font-weight: 400;
  line-height: 3rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.title span {
  font-weight: 600;
}

.description {
  line-height: 1.5rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

span {
  color: var(--primary-color);
}

.action-btns {
  display: flex;
  gap: 1rem;
}

.action-btns .btn {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 2px;
  padding: 1rem 2rem;
  outline: none;
  border: 2px solid var(--primary-color);
  border-radius: 10px;
  transition: 0.3s;
  cursor: pointer;
}

.action-btns .btnn {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 2px;
  padding: 1rem 2rem;
  outline: none;
  border: 2px solid var(--primary-color);
  border-radius: 10px;
  transition: 0.3s;
  cursor: pointer;
}

.btn {
  background-color: var(--primary-color);
  color: #ffffff;
}

.btn:hover {
  background-color: var(--primary-color-dark);
}

.btnn {
  color: var(--primary-color);
}

.btnn:hover {
  background-color: var(--primary-color-dark);
  color: #ffffff;
}

.image {
  display: grid;
  place-items: center;
}

.image img {
  width: min(21rem, 90%);
  border-radius: 10%;
}

.social-media a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  font-size: 20px;
  color: var(--primary-color-dark);
  text-decoration: none;
  margin: 20px 15px 30px 0;
  transition: 0.5s ease;
}

.social-media a:hover {
  background: var(--primary-color-dark);
  color: #1f242d;
  box-shadow: 0 0 20px var(--primary-color);
}
/*-- about page --*/
.about-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  min-height: 100dvh;
  gap: 100px;
}

.content1 {
  flex: 1;
  text-align: left;
  padding: 20px;
  max-width: 600px;
}

.subtitle1 {
  letter-spacing: 2px;
  color: var(--text-light);
  font-weight: 600;
  font-size: 1.5rem;
  margin-bottom: 3rem;
}

.pre {
  line-height: 1.5rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.pre p {
  margin: 0;
  padding: 10px 0;
  font-size: 1rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.pre strong {
  color: var(--primary-color-dark);
  font-weight: bold;
  margin-right: 5px;
}

.description1 {
  line-height: 1.5rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.image1 {
  flex: 1;
  max-width: 300px;
  margin: 50px;
}

.image1 img {
  width: 100%;
  border-radius: 10px;
}
/*-- projects page --*/
.projects-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100dvh;
  
}

.portfolio-content {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  align-items: center;
  gap: 2.5rem;
  margin-top: 5rem;
  padding: 20px;
  width: 80%;
}

.row {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.row img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  transition: transform 0.5s;
}

.row img:hover {
  transform: scale(1.1);
}

.layer {
  width: 100%;
  height: 0;
  background: linear-gradient(to bottom, rgba(14, 14, 15, 0.5), rgba(123, 125, 121));
  position: absolute;
  border-radius: 8px;
  left: 0;
  bottom: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 40px;
  transition: height 0.5s;
 
}

.layer h5 {
  font-size: 1.5rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.5rem;
}

.layer p {
  font-size: 1rem;
  color: white;
  line-height: 1.2;
}

.layer i {
  font-size: 1.5rem;
  color: var(--primary-color-dark);
  margin-top: 1rem;
  background: var(--extra-light);
  width: 60px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
}

.row:hover .layer {
  height: 100%;
}

.portfolio-content {
  max-height: calc(280px + 2.5rem * 6); 
  overflow-y: auto;
}

.portfolio-content::-webkit-scrollbar {
  width: 12px;
}

.portfolio-content::-webkit-scrollbar-track {
  background: var(--extra-light);
  border-radius: 10px;
}

.portfolio-content::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 10px;
  border: 3px solid var(--extra-light);
}

.portfolio-content::-webkit-scrollbar-thumb:hover {
  background-color: var(--primary-color-dark);
}

/*-- contact page --*/
.contact-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  max-width: var(--max-width);
  margin: 0 auto;
}

.form-container {
  width: 48%;
  background-color: transparent;
  padding: 2rem;
  border-radius: 8px;
}

.form-container input,
.form-container textarea {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--extra-light);
  border-radius: 4px;
  border: 2px solid var(--primary-color);
  resize: none;
}

.form-container textarea::-webkit-scrollbar {
  width: 12px;
}

.form-container textarea::-webkit-scrollbar-track {
  background: var(--extra-light);
  border-radius: 10px;
}

.form-container textarea::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 10px;
  border: 3px solid var(--extra-light);
}

.form-container textarea::-webkit-scrollbar-thumb:hover {
  background-color: var(--primary-color-dark);
}

.form-container button {
  background-color: var(--primary-color-dark);
  color: var(--extra-light);
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.info {
  width: 48%;
  background-color: transparent;
  padding: 2rem;
  height: auto;
  border-radius: 8px;
}

.info h2 {
  font-size: 1.7rem;

}

@media (width < 750px) {
  nav .checkbox {
    display: block;
  }

  ul {
    position: absolute;
    width: 100%;
    height: calc(100vh - 85px);
    left: -100%;
    top: 85px;
    background-color: var(--extra-light);
    flex-direction: column;
    justify-content: center;
    gap: 3rem;
  }

  nav #check:checked~ul {
    left: 0;
  }

  ul li a {
    font-size: 1.25rem;
  }

  .section-container {
    padding: 5rem 1rem 4rem 1rem;
    text-align: center;
    grid-template-columns: repeat(1, 1fr);
  }

  .image {
    grid-area: 1/1/2/2;
  }

  .action-btns {
    margin: auto;
  }

  .action-btns .btn,
  .action-btns .btnn {
    font-size: 0.7rem;
  }

  .about-container {
    flex-direction: column;
    padding: 7rem 1rem 1rem 1rem;
    text-align: center;
    gap: 0;

  }

  .content1 {
    order: 1;
    max-width: 100%;
  }

  .image1 {
    max-width: 90%;
    margin-top: 2rem;
    order: 2;
  }

  .subtitle1,
  .pre,
  .description1 {
    text-align: center;
  }

  .pre p {
    display: flex;
    align-items: center;
    white-space: wrap;
    flex-direction: column;
  }

  .pre strong {
    color: var(--primary-color-dark);
    font-weight: bold;
    margin-top: 5px;
  }

  .projects-container {
    flex-direction: column;
    padding: 5rem 1rem 4rem 1rem;
    text-align: center;
  }

  .portfolio-content {
    grid-template-columns: repeat(1, 1fr);
    width: 100%;
  }

  .layer p {
   display: none;
  }

  .contact-container {
    flex-direction: column-reverse;
    padding: 5rem 1rem 4rem 1rem;
    text-align: center;
  }

  .form-container,
  .info {
    width: 100%;
    padding: 1rem;
  }
}