@bg: #0f172a;
@bg_o: #000000ac;
@card: #1e293b;
@text: #ffffff;
@muted: #94a3b8;
@primary: #38bdf8;

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

  scrollbar-width: 8px;
  scrollbar-color: #38bdf8 #0f172a;

  // legacy sup?
  &::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  &::-webkit-scrollbar-track {
    background-color: #0f172a;
    border-radius: 4px;
  }
  &::-webkit-scrollbar-track:hover {
    background-color: #0f1c38;
  }
  &::-webkit-scrollbar-track:active {
    background-color: #20315b;
  }
  &::-webkit-scrollbar-thumb {
    background-color: #38bdf8;
    border-radius: 4px;
    min-height: 30px;
  }
  &::-webkit-scrollbar-thumb:hover {
    background-color: #818cf8;
  }
  &::-webkit-scrollbar-thumb:active {
    background-color: #a5b4fc;
  }
  &::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
  }
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background: @bg;
  color: @text;
  overflow-x: hidden;

  hr {
    opacity: 0.1;
  }
}

.image_preview {
  display: none;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  position: fixed;
  background-color: @bg_o;
  z-index: 99;

  button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
  }

  img {
    border-radius: 20px;
    max-width: 80vw;
    max-height: 80vh;
    pointer-events: none;
    user-select: none;
  }
}

.container {
  width: min(1100px, 90%);
  margin: 0 auto;
}

nav {
  display: flex;
  justify-content: right;
  align-items: center;
  padding: 3.5vh 0;

  a {
    color: #cbd5e1;
    text-decoration: none;
    margin-left: 10px;

    &:hover {
      color: @primary;
    }
  }
}

.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  margin-top: -3vh;

  .hero-content {
    max-width: 700px;

    h1 {
      font-size: clamp(2.4rem, 3.5vw, 4.5rem);
      line-height: 1.1;
      margin-bottom: 20px;
    }

    p {
      color: @muted;
      font-size: 1.1rem;
      margin-bottom: 30px;
    }
  }

  img {
    position: absolute;
    top: 10vh;
    left: 0;
    z-index: -1;
    opacity: 0.15;
    width: 100vw;
    height: 80vh;
    object-fit: cover;
  }
}

.btn {
  display: inline-block;
  padding: 14px 24px;
  background: @primary;
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  transition: 0.2s ease;
  user-select: none;

  &:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px 1px @primary;
  }

  &:disabled {
    background-color: #0c2936;
    pointer-events: none;
    cursor: not-allowed;
  }
}

section {
  padding: 80px 0;

  &#about,
  &#projects {
    padding: 0 0 80px;
  }

  .section-title {
    font-size: 2rem;
  }

  .section-subtitle {
    margin-top: 8px;
    margin-bottom: 30px;
    color: @muted;
    opacity: 0.7;
    font-style: italic;
    font-size: 0.95rem;
  }
}

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(min(350px, 100%), 1fr));
}

.about {
  .about-card {
    background: @card;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 18px;
    padding: 25px;

    p {
      color: @muted;
      line-height: 1.6;
      margin-bottom: 15px;
    }

    .skills {
      margin-top: 10px;
      cursor: default;
      user-select: none;

      span {
        display: inline-block;
        background: @bg;
        padding: 6px 10px;
        border-radius: 999px;
        margin-right: 5px;
        margin-bottom: 5px;
        font-size: 0.85rem;
        transition: 0.2s ease;
        color: @primary;

        &:hover {
          background: @primary;
          color: @bg;
          transform: translateY(-2px);
        }
      }
    }
  }
}

.projects {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: start;
}

.testimonials {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: start;
}

.galleries {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  align-items: center;

  img {
    border-radius: 10px;
    height: 20%;
    width: 20%;
    transition: 0.2s ease;
    opacity: 0.7;

    &:hover {
      transform: scale(1.05);
      opacity: 1;
      box-shadow: 0 0 10px 2px @primary;
    }
  }
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;

  margin-top: 15px;
  padding: 8px;
  border-radius: 10px;

  background: @bg;
  color: @primary;

  transition: 0.2s ease;

  &:hover {
    background: @primary;
    color: @bg;
    transform: translateY(-2px);
  }
}

.card,
.testimonial {
  width: 100%;

  background: @card;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  padding: 25px;
  transition: 0.25s;

  &:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 10px 1px @primary;
  }
}

.card {
  h3 {
    margin-bottom: 10px;
  }

  p {
    color: @muted;
  }

  .tags {
    margin-top: 15px;
    cursor: default;
    user-select: none;

    span {
      display: inline-block;
      background: @bg;
      padding: 6px 10px;
      border-radius: 999px;
      margin-right: 5px;
      margin-bottom: 5px;
      font-size: 0.85rem;
      transition: 0.2s ease;

      &:hover {
        background: @primary;
        color: @bg;
        transform: translateY(-2px);
      }
    }
  }
}

.testimonial {
  .quote {
    color: @muted;
  }

  .author {
    color: @muted;
    margin-top: 15px;
    font-size: 0.9rem;
  }
}

.contact {
  text-align: center;

  p {
    color: @muted;
    margin: 15px 0 25px;
  }

  img {
    padding: 0;
    margin: 0;
    height: 30%;
    width: 30%;
  }

  form {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;

    .request-section {
      display: grid;
      grid-template-columns: 40% 73%;
      align-content: center;
      gap: 15px;
      border: 2px solid @card;
      border-radius: 10px;
      padding: 15px;

      h3 {
        text-align: justify;
        padding: 0;
        margin-top: 10px;
        
      }
    }

    input, textarea, select {
      width: 80%;
      padding: 14px 16px;
      
      background: @card;
      color: @text;
      font: inherit;
      
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 12px;
      transition: all 0.2s ease;

      &:focus-visible {
        outline: none;
        border-color: @primary;
        box-shadow: 0 0 0 3px fade(@primary, 15%);
      }
    }

    textarea {
      min-height: 140px;
      resize: vertical;
    }

    select {
      cursor: pointer;

      &, &::picker(select) {
        appearance: base-select;
      }
      
      &::picker(select) {
        background: @card;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 12px;
        padding: 8px;
        transform-origin: top center; 
        transition: display 0.5s allow-discrete, overlay 0.5s allow-discrete;
        animation: slideUpClose 0.18s ease-in forwards;
        @starting-style {
          transform: translateY(-10px) scaleY(0.95);
          opacity: 0;
        }
      }

      &:open::picker(select) {
        animation: slideDownOpen 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
      }

      option {
        display: flexbox;
        flex-wrap: wrap;
        width: 100%;
        padding: 10px 14px;
        border-radius: 8px;
        color: @text;
        position: relative; 

        &::after {
          content: attr(data-price);
          position: absolute;
          font-style: italic;
          font-size: 0.85em;
          opacity: 0.5;
          right: 14px;
        }
      }
    }

    .checkbox {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      color: @muted;
      font-size: 0.95rem;
      user-select: none;

      input {
        width: auto;
        margin-top: 3px;
      }
    }

    button {
      // align-self: flex-start;
      padding: 14px 24px;
      border: none;
      border-radius: 12px;
      background: @primary;
      font-weight: 600;
      cursor: pointer;
      transition: 0.2s;

      &:hover {
        transform: translateY(-2px);
      }
    }
  }
}

footer {
  text-align: center;
  color: #64748b;
  padding: 30px;

  svg[svgButton] {
    margin: -10px 10px -10px 10px;
    transition: all 0.5s ease;
    &:hover {
      cursor: pointer;
      filter: drop-shadow(0px 3px 5px @primary);
      -webkit-filter: drop-shadow(0px 3px 5px @primary);
    }
  }
}

@media (max-width: 768px) {
  nav {
    flex-direction: column;
    gap: 15px;

    [title] {
      margin: -10px 0 0 0 !important;
    }
  }

}

@keyframes slideDownOpen {
  0% {
    transform: translateY(-10px) scaleY(0.95);
    opacity: 0;
  }
  100% {
    transform: translateY(0) scaleY(1);
    opacity: 1;
  }
}
@keyframes slideUpClose {
  0% {
    transform: translateY(0) scaleY(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-8px) scaleY(0.95);
    opacity: 0;
  }
}