@import url("https://fonts.googleapis.com/css2?family=Momo+Trust+Display&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");

* {
  font-family: "Momo Trust Display", sans-serif;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  background-color: rgb(236, 231, 223);
}

.container {
  padding: 2rem;
}

nav {
  display: flex;
  width: fit-content;
  max-width: 80%;
  margin: 0 auto;
  justify-content: center;
  height: clamp(60px, 8vh, 80px);
  position: sticky;
  top: 20px;
  z-index: 999;
  padding: 0 1em;
}

nav.scrolled {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  top: 20px;
  border-radius: 2rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

ul {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  list-style: none;
  padding: 0;
  width: auto;
}

li {
  display: inline-block;
}

ul li a {
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  font-weight: light;
  text-decoration: none;
  white-space: nowrap;
  color: rgb(82, 102, 99);
  transition: all ease 0.5s;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

ul li a:hover {
  background-color: rgb(246, 243, 239);
  border-radius: 2rem;
}

.about {
  height: fit-content;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 6vw;
  align-items: center;
  color: rgb(37, 89, 78);
  font-size: 3vw;
  white-space: nowrap;
  margin-bottom: 10vh;
  gap: 20px;
}

.about h1,
.about p {
  text-align: center;
}
.about p {
  font-size: calc(0.5rem + 1vw);
}

@media (max-width: 768px) {
  ul {
    gap: 0rem;
  }
  ul li a {
    gap: 0;
    font-size: 14px;
  }
}
#projects-header {
  color: rgb(37, 89, 78);
  background: #fff;
  display: inline-block;
  margin-left: 30px;
  padding: 0.75rem 0.75rem 0.75rem 0.75rem;
  border: 4px solid rgb(37, 89, 78);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  z-index: 2;
  position: relative;
  top: 4px;
}

.projects-carousel {
  position: relative;
  padding: 1rem 3.5rem;
  background: #fff;
  border: 4px solid rgb(37, 89, 78);
  border-radius: 20px 20px 20px 20px;
  margin: 0 0 6rem;
  width: 100%;
  box-sizing: border-box;
}

/* --- Horizontal track --- */
.projects-track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 1rem 0.5rem;
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}
.projects-track::-webkit-scrollbar {
  height: 8px;
}
.projects-track::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}
.projects-track::-webkit-scrollbar-track {
  background: transparent;
}

.project {
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

/* --- 50/50 layout inside each project --- */
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 50% text, 50% media */
  gap: 1.25rem;
  padding: 1.25rem;
}

/* --- Text side --- */
.project-text h2 {
  font-family: "Poppins", sans-serif;
  color: rgb(37, 89, 78);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}
.project-text p {
  font-family: "Poppins", sans-serif;
  color: rgb(82, 102, 99);
  line-height: 1.6;
  word-break: break-word; /* wrap long words/URLs */
  overflow-wrap: anywhere;
}
.project-link {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgb(246, 243, 239);
  color: rgb(37, 89, 78);
  text-decoration: none;
  font-family: "Poppins", sans-serif;
  transition: background 0.2s ease, transform 0.2s ease;
}
.project-link:hover {
  background: rgb(240, 236, 230);
  transform: translateY(-1px);
}

/* --- Media side --- */
.project-media {
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-media img,
.project-media video {
  width: 100%;
  height: auto;
  min-width: 100%;
  border-radius: 12px;
  object-fit: cover;
}

/* --- Prev/Next buttons --- */
.proj-nav {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: rgba(37, 89, 78, 0.9);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease, background 0.2s ease;
  z-index: 2;
}
.proj-nav:hover {
  transform: translateY(-2px);
  background: rgba(37, 89, 78, 1);
}
.proj-nav.prev {
  left: 0.75rem;
}
.proj-nav.next {
  right: 0.75rem;
}

/* --- Responsive: stack text & image on small screens --- */
@media (max-width: 800px) {
  .project-grid {
    grid-template-columns: 1fr;
  } /* 100% width each */
  .projects-carousel {
    padding: 1rem 1rem 2rem;
  } /* less side padding */
  .proj-nav {
    display: none;
  } /* optional: hide arrows on small screens */
}
/* Dots container */
.proj-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 0.5rem 1rem;
}

/* Each dot */
.proj-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(37, 89, 78, 0.3);
  cursor: pointer;
  border: 2px solid rgba(37, 89, 78, 0.6);
  transition: transform 0.15s ease, background 0.2s ease;
}
.proj-dot:hover {
  transform: scale(1.1);
}
.proj-dot.is-active {
  background: rgb(37, 89, 78);
  border-color: rgb(37, 89, 78);
}

.proj-dot[aria-label]:hover::after {
  content: attr(aria-label);
  position: absolute;
  transform: translate(-50%, -160%);
  left: 50%;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
  white-space: nowrap;
}
/* --- More Info section wrapper --- */

.more-info-header h1 {
  color: rgb(37, 89, 78);
  background-color: #ffffff;
  display: inline-block;
  margin-left: 30px;
  padding: 0.75rem 0.75rem 0 0.75rem;
  border: 4px solid rgb(37, 89, 78);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
}

.more-info {
  margin-top: 6rem;
}

@media (max-width: 768px) {
  .more-info-header {
    margin: 0;
    width: 80%;
    text-align: center;
    position: relative;
    top: 6px;
    justify-self: center;
  }
  .more-info-header h1 {
    font-size: 3.7vw;
    margin: 0;
  }
  .projects-carousel {
    border-radius: 0px 20px 20px 20px;
  }
  #projects-header {
    margin: 0;
    top: 4.5px;
  }
}

/* cards */
.info-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  padding: 1.25rem;
  color: rgb(37, 89, 78);
}

.info-card h2 {
  font-family: "Poppins", sans-serif;
  margin-bottom: 0.75rem;
}

/* grid placement */
.skills {
  grid-area: skills;
}

.root {
  grid-area: root;
}

.favorite-musics {
  grid-area: musics;
}

.favorite-movies {
  grid-area: movies;
}

/* --- Skills sidebar with bars --- */
.skill {
  margin-bottom: 0.75rem;
}

.skill-name {
  display: block;
  font-family: "Poppins", sans-serif;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  color: rgb(82, 102, 99);
}

.skill-bar {
  width: 100%;
  height: 0.5rem;
  border-radius: 999px;
  background: rgba(37, 89, 78, 0.12);
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  border-radius: 999px;
  background: rgb(37, 89, 78);
  transform-origin: left center;
}

.java-skill {
  width: 80%;
}
.csharp-skill {
  width: 65%;
}
.html-skill {
  width: 90%;
}
.css-skill {
  width: 85%;
}
.js-skill {
  width: 70%;
}
.persian-skill {
  width: 100%;
}
.english-skill {
  width: 90%;
}
.french-skill {
  width: 10%;
}
.AI-skill {
  width: 100%;
}
.ml-skill {
  width: 80%;
}
.math-skill {
  width: 60%;
}
.gym-skill {
  width: 80%;
}
/* Custom music player row */
.music-player {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  grid-template-areas:
    "btn info time"
    "btn progress progress";
  column-gap: 0.75rem;
  row-gap: 0.35rem;

  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  background: #ffffff;
  border: 2px solid rgb(37, 89, 78);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

/* hide native audio element */
.music-player audio {
  display: none;
}

/* Play button */
.music-play-btn {
  grid-area: btn;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: none;
  background: rgb(37, 89, 78);
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.2s ease;
}

.music-play-btn:hover {
  background: rgb(30, 70, 62);
  transform: translateY(-1px);
}

.music-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%; /* ⬅ make the list itself full width */
}

.music-player {
  width: 100%; /* ⬅ each row fills the card */
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  grid-template-areas:
    "btn info time"
    "btn progress progress";
  column-gap: 0.75rem;
  row-gap: 0.35rem;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  background: #ffffff;
  border: 2px solid rgb(37, 89, 78);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

/* make long titles not push layout wider */
.music-title {
  font-family: "Poppins", sans-serif;
  font-size: 0.95rem;
  color: rgb(37, 89, 78);
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.music-artist {
  font-family: "Poppins", sans-serif;
  font-size: 0.8rem;
  color: rgb(82, 102, 99);
}

/* Time */
.music-time {
  grid-area: time;
  font-family: "Poppins", sans-serif;
  font-size: 0.8rem;
  color: rgb(82, 102, 99);
}

/* Progress bar */
.music-progress {
  grid-area: progress;
  position: relative;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(37, 89, 78, 0.12);
  overflow: hidden;
  cursor: pointer;
}

.music-progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: rgb(37, 89, 78);
  transition: width 0.1s linear;
}

/* Mobile tweak */
@media (max-width: 600px) {
  .music-player {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "btn info"
      "btn progress"
      "btn time";
  }

  .music-time {
    justify-self: flex-start;
    margin-top: 0.1rem;
  }
}

/* --- Movies grid --- */
.movies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.75rem;
}

.movie-card {
  text-align: center;
}

.movie-card img {
  width: 100%;
  height: 300px;

  border-radius: 0.75rem;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  object-fit: cover;
}

.movie-card figcaption {
  margin-top: 0.35rem;
  font-family: "Poppins", sans-serif;
  font-size: 0.85rem;
  color: rgb(82, 102, 99);
}

@media (max-width: 768px) {
  .more-info-content {
    grid-template-columns: 1fr;
    grid-template-areas:
      "root"
      "skills"
      "musics"
      "movies";
    padding: 1.25rem 1.25rem 1.75rem;
    margin: 0 16px 4rem;
  }
}
@media (max-width: 485px) {
  nav {
    display: none;
  }
  .more-info-content {
    margin: 0;
    justify-content: center;
  }
}
/* ---------- MORE INFO SECTION LAYOUT ---------- */

.more-info-content {
  border: 4px solid rgb(37, 89, 78);
  border-radius: 0 20px 20px 20px;
  background: rgba(255, 255, 255, 0.9);
  padding: 1.5rem 2rem 2rem;
  margin: 0 30px 3rem; /* smaller gap to Contact */
  margin-top: -4px;
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) 1.6fr;
  grid-template-areas:
    "skills root"
    "skills musics"
    "skills movies";
  gap: 1.5rem;
  box-sizing: border-box;
}

/* ---------- CONTACT SECTION (DESKTOP) ---------- */

.contact {
  margin-top: 3rem; /* normal distance from More Info */
}

.contact-header h1 {
  color: rgb(37, 89, 78);
  background-color: #ffffff;
  display: inline-block;
  margin-left: 30px;
  padding: 0.75rem 0.75rem 0 0.75rem;
  border: 4px solid rgb(37, 89, 78);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
}

.contact-content {
  border: 4px solid rgb(37, 89, 78);
  border-radius: 0 20px 20px 20px;
  background: rgba(255, 255, 255, 0.9);
  padding: 2rem 2.25rem 2.25rem;
  margin: 0 30px 3rem;
  margin-top: -4px;
  box-sizing: border-box;

  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) 1fr;
  gap: 2rem;
}

/* left intro text */
.contact-intro h2 {
  font-family: "Poppins", sans-serif;
  color: rgb(37, 89, 78);
  margin-bottom: 0.75rem;
}

.contact-intro p {
  font-family: "Poppins", sans-serif;
  color: rgb(82, 102, 99);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.contact-intro ul {
  margin-left: 1.2rem;
  margin-top: 0.5rem;
  color: rgb(82, 102, 99);
  font-family: "Poppins", sans-serif;
  line-height: 1.5;
}
.contact-intro ul {
  display: block; /* override global flex */
  list-style: disc;
  margin-left: 1.5rem;
  margin-top: 0.75rem;
  line-height: 1.6;
}

.contact-intro ul li {
  margin-bottom: 0.6rem; /* space between bullets */
}

/* right side details */
.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-row {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.contact-label {
  font-family: "Poppins", sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgb(82, 102, 99);
}

.contact-value {
  font-family: "Poppins", sans-serif;
  font-size: 0.95rem;
  color: rgb(37, 89, 78);
  text-decoration: none;
  word-break: break-word;
}

.contact-value:hover {
  text-decoration: underline;
}

/* buttons */
.contact-actions {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.contact-btn {
  font-family: "Poppins", sans-serif;
  font-size: 0.9rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid rgb(37, 89, 78);
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.primary-btn {
  background: rgb(37, 89, 78);
  color: #fff;
}

.primary-btn:hover {
  background: rgb(30, 70, 62);
  transform: translateY(-1px);
}

.secondary-btn {
  background: #ffffff;
  color: rgb(37, 89, 78);
}

.secondary-btn:hover {
  background: rgb(246, 243, 239);
  transform: translateY(-1px);
}

/* ---------- MOBILE RESPONSIVE (MORE INFO + CONTACT) ---------- */

@media (max-width: 768px) {
  /* More Info card on phone */
  .more-info-content {
    margin: 0 16px 2.5rem;
    padding: 1.25rem 1.25rem 1.75rem;
    grid-template-columns: 1fr;
    grid-template-areas:
      "root"
      "skills"
      "musics"
      "movies";
    gap: 1.25rem;
    border-radius: 20px;
  }

  .contact-header h1 {
    position: relative;
    top: 4.5px;
    text-align: left;
    font-size: 1rem;
  }

  .contact-content {
    margin: 0 12px 2.5rem;
    padding: 1.75rem 1.25rem 2.25rem;
    grid-template-columns: 1fr;
    gap: 1.75rem; /* more space between left + right sections */
    border-radius: 20px;
    width: 100%;
  }

  /* More space between paragraphs in intro */
  .contact-intro p {
    margin-bottom: 1rem;
    line-height: 1.7;
  }

  .contact-intro ul {
    margin-top: 0.75rem;
    line-height: 1.6;
  }

  /* More space between contact rows on the right */
  .contact-details {
    gap: 1.25rem;
  }

  .contact-row {
    gap: 0.25rem;
  }

  /* Buttons full-width like before is ok, keep this if you already had it */
  .contact-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .contact-btn {
    width: 100%;
    text-align: center;
  }
  .contact-intro ul li {
    margin-right: 0;
    margin-bottom: 0.75rem;
  }
}
