* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Open Sans', sans-serif;
  font-size: 18px;
  line-height: 2;
  color: #333;
  background-color: #ddd;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 32px;
  z-index: 1000;
  padding: 1rem 2rem;
  margin: 20px auto;
  width: fit-content;
  backdrop-filter: blur(10px);
  background-color: rgba(244, 244, 244, 0.9);
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  max-width: 1200px;
  margin: 0 auto;
}

nav a {
  text-decoration: none;
  color: #333;
  font-weight: 700;
  font-size: 1.1rem;
  transition: color 0.3s ease;
  padding: 0.65rem 1rem;
  border-radius: 2rem;

  &:hover {
    background-color: rgba(0, 0, 0, 0.05);
  }

  &.current {
    background-color: rgba(0, 0, 0, 0.1);
  }
}

@media (max-width: 768px) {
  nav ul {
    gap: 0.5rem;

    li {
      a {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
      }
    }
  }
}

/* Hero Section */
.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  text-align: center;
  padding: 2rem;
  background-image: url('./images/hero.webp');
  background-size: cover;
  background-position: center;
  position: relative;
  text-shadow: 0 2px 8px black;

  &::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.8));
  }
}

.profile-image {
  width: 300px;
  max-width: 90%;
  aspect-ratio: 1 / 1;
  display: block;
  margin-left: auto;
  margin-right: auto;
  border-radius: 50%;
  object-fit: cover;
  margin-top: 1rem;
  float: left;
}

@media (max-width: 768px) {
  .profile-image {
    float: none;
    margin: 1rem auto;
  }
}

.hero .text h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero .text p {
  font-size: 1.5rem;
  font-weight: 400;
  opacity: 0.95;
}

/* Projects Section */
#exhibitions {
  padding: 1rem;
  background: linear-gradient(135deg, #d62839 0%, #7b2d5b 100%);
  .text {
    color: #fff;
  }
}

.text {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 0 1rem;

  h1 {
    margin-bottom: 1rem;
  }

  p + p {
    margin-top: 1rem;
  }
}

#exhibitions > h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  text-align: right;
}

.projects-desc {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 3rem;
  text-align: right;
}

/* Project Section */
.project-section {
  background-color: #fff;
  padding: 3rem 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-align: right;
  border: 1px solid #eee;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}



.project-section h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #222;
}

.project-section h2 {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
  color: #555;
}

.project-section .project-image {
  display: block;
  width: 100%;
  border-radius: 10px;
  height: 200px;
  margin: 1.5rem 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  object-fit: cover;
  object-position: center;
}

.project-section .video-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: #0056b3;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.project-section .project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.project-section .project-gallery img {
  display: block;
  
  width: min(100%, 420px);
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.project-section img {
  display: block;
  max-width: 100%;
  border-radius: 10px;
  
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.project-section .video-container {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 9 / 16;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.project-section .video-container iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.project-section p {
  font-size: 1.05rem;
  line-height: 1.9;
  color: #444;
  direction: rtl;
}

/* Responsive */
@media (max-width: 768px) {
  nav{
    padding: 0.5rem 1rem;
    margin: 10px auto;
  }

  nav ul {
    gap: .5rem;

    li {
      a {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
      }
    }
  }

  nav a {
    font-size: 1rem;
  }


  .hero .text h1 {
    font-size: 2.5rem;
  }

  .hero .text p {
    font-size: 1.2rem;
  }

  #exhibitions > h1 {
    font-size: 2rem;
  }

  .projects-toc {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
  }

  .projects-toc li {
    height: 250px;
  }

  .projects-toc h2 {
    font-size: 1.4rem;
  }

  .project-section h1 {
    font-size: 1.5rem;
  }

}

.project-link {
  font-weight: bold;
  color: #222;
}

#skills {
  background-color: #f9f9f9;
  padding: 100px 1rem;
  
  h1, li {
    max-width: 1000px;
    margin: 0 auto;
  }
  

  
  li {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas: 
      'title title' 'description image';
      /* 'description image'; */
    
    column-gap: 2rem;
    padding: 1rem;
    margin-top: 2rem;
    border: 4px solid transparent;
    border-radius: 14px;
    background:
      linear-gradient(#f9f9f9, #f9f9f9) padding-box,
      var(--skill-gradient) border-box;

    &:nth-child(4n + 1) {
      --skill-gradient: linear-gradient(120deg, #667eea, #764ba2);
    }

    &:nth-child(4n + 2) {
      --skill-gradient: linear-gradient(120deg, #11998e, #38ef7d);
    }

    &:nth-child(4n + 3) {
      --skill-gradient: linear-gradient(120deg, #f7971e, #ffd200);
    }

    &:nth-child(4n) {
      --skill-gradient: linear-gradient(120deg, #ee609c, #ff9966);
    }

    img {
      grid-area: image;
      height: 200px;
      
    }

    h2 {
      grid-area: title;
      font-size: 1.5rem;
      margin-bottom: 0.5rem;
    }

    figure {
      grid-area: image;
    }

  }
}

@media (max-width: 768px) {
  #skills li {
    grid-template-columns: 1fr;
    grid-template-areas: 
      'title'
      'description'
      'image';
    
    img {
      width: 100%;
      margin-left: 0;
    }
  }
}


figcaption {
  font-size: 0.9rem;
  color: #555;
  margin-top: 5px;
}



ul.cards {
  list-style: none;
  padding: 0;
  column-count: 2;
  max-width: 1200px;
  margin: 0 auto;

  li {
    margin-bottom: 1rem;
    break-inside: avoid;
  }
}

@media (max-width: 768px) {
  ul.cards {
    column-count: 1;
  }
}

ul.points {
  list-style: disc;
  padding-inline-start: 1.5rem;
  margin-bottom: 1rem;
}

.me-desc {
  max-width: 800px;
}

.video-container {
  position: relative;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 1 / 1;
  margin: 3rem auto;

  iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
  }
}

footer {
  text-align: center;
  padding: 2rem 1rem;
  background-color: #000;
  color: #ddd;
  font-size: 0.9rem;

  a {
    color: inherit;
    direction: ltr;
    display: block;
  }
}

section.more-1 {
  background-color: #f9f9f9;
  color: #ddd;
    padding: 1px 1rem;
  background: linear-gradient(135deg, #355e3b 0%, #6b8e23 100%);
}

.project-image {
  display: none !important;
}