@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  color: #ededed;
  background: url('mohammad-rahmani.jpg') no-repeat center center / cover;
  overflow-x: auto;
  overflow-y: auto;
  font-size: 16px;
}

.home,
.portfolio-section,
.form-container, 
#about, 
#services {
  background: url('mohammad-rahmani.jpg') no-repeat center center / cover;
  background-attachment: fixed;
  min-height: 100vh;
  min-width: auto;
  position: relative;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  height: 60px;
  padding: 15px 5%;
  background: rgba(8, 27, 41, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
}

.logo {
  position: relative;
  font-size: 25px;
  color: #ededed;
  text-decoration: none;
  font-weight: 600;
}

.logo::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: #081b29;
  animation: showRight 1s ease forwards;
  animation-delay: 4s;
}

.navbar {
  display: flex;
  align-items: center;
}

.navbar a {
  font-size: 18px;
  color: #ededed;
  text-decoration: none;
  font-weight: 500;
  margin-left: 35px;
  transition: color 0.3s ease;
}

.navbar a:hover,
.navbar a.active {
  color: #00abf0;
}

/* Hamburger Menu Icon */
.menu-icon {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  z-index: 1001;
}

.menu-icon span {
  width: 25px;
  height: 3px;
  background: #00abf0;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.menu-icon.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.menu-icon.active span:nth-child(2) {
  opacity: 0;
}

.menu-icon.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Home & Content Sections */
.home {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 10% 20px;
}

.home-content {
  max-width: 1024px;
  width: 100%;
  padding-top: 20px;
  padding-bottom: 20px;
  z-index: 2;
}

.home-content h1,
.portfolio-left h1,
#services h1,
#about h1 {
  margin-top: 40px;
  font-size: 56px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.home-content h2,
.portfolio-right h2 {
  font-size: 32px;
}

.home-content h3 {
  margin-top: 10px;
  font-size: 24px;
  font-weight: 600;
  color: #00abf0;
}

.home-content p,
.portfolio-left p,
#about p,
#services p {
  position: relative;
  font-size: 16px;
  line-height: 1.7;
  margin: 10px 0;
  max-width: 100%;
}

.home-content ul {
  font-size: 16px;
  line-height: 1.8;
  padding-left: 20px;
}

.home-content ul li {
  margin-bottom: 10px;
}

/* Animations for home content */
.home-content h1::before,
.home-content h3::before,
.home-content p::before,
.home-content .btn-box::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: #081b29;
  animation: showRight 1s ease forwards;
}

.home-content h1::before { animation-delay: 1s; }
.home-content h3::before { animation-delay: 1.3s; }
.home-content p::before { animation-delay: 1.6s; }
.home-content .btn-box::before { animation-delay: 1.9s; }

/* Portrait Image */
.home-imgHover {
  position: absolute;
  top: 0;
  right: 0;
  width: 510px;
  height: 100vh;
  background: transparent;
  transition: 3s;
  animation: manipActiveHover .1s forwards;
  animation-delay: 3s;
  pointer-events: none;
  opacity: 0;
  z-index: 1;
}

.home-imgHover:hover {
  background: #081b29;
  opacity: .6;
}

.home-imgHover::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 120%;
  height: 100%;
  background: #081b29;
  animation: showRight 1s ease forwards;
  animation-delay: 3s;
  z-index: 100;
}

.home-imgHover img {
  width: 100%;
  height: 100vh;
  object-fit: cover;
  display: block;
}

.home-imgHover:hover img {
  transform: scale(1);
  transition: transform 0.5s ease;
}

/* Buttons */
.btn,
.btn-box a,
button {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 12px 28px;
  background: #00abf0;
  border: 2px solid #00abf0;
  border-radius: 8px;
  font-size: 18px;
  color: #081b29;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 1px;
  z-index: 1;
  overflow: hidden;
  transition: .5s;
  cursor: pointer;
  min-width: 200px;
}

.btn-box {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.btn-box a:hover {
  color: #00abf0;
}

.btn-box a:nth-child(2) {
  background: transparent;
  color: #00abf0;
}

.btn-box a:nth-child(2):hover {
  color: #081b29;
}

.btn-box a:nth-child(2)::before {
  background: #00abf0;
}

.btn-box a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: #081b29;
  z-index: -1;
  transition: .5s;
}

.btn-box a:hover::before {
  width: 100%;
}

/* CTA Group */
.cta-group {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 10px;
}

.cta-group .btn-box {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.cta-group .home-sci {
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* Social Icons */
.home-sci {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  z-index: 2;
  align-items: center;
}

.home-sci a {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid #00abf0;
  border-radius: 50%;
  font-size: 20px;
  color: #00abf0;
  text-decoration: none;
  transition: 0.4s;
  overflow: hidden;
}

.home-sci a:hover {
  background: #00abf0;
  color: #081b29;
}

.home-sci a::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: #00abf0;
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.4s ease;
  z-index: -1;
}

.home-sci a:hover::before {
  transform: scale(1);
}

/* Contact Form */
.form-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  min-height: 100vh;
  padding: 120px 5% 40px;
}

#contact {
  scroll-margin-top: 100px;
}

label {
  margin: 5px;
  color: #ededed;
  font-size: 16px;
}

input, textarea, select {
  width: 80%;
  margin: 5px auto;
  padding: 5px;
  display: block;
  border-radius: 4px;
  border: 1px solid #00abf0;
  background-color: #081b29;
  color: #ededed;
}

select:focus {
  outline: none;
  border-color: #00abf0;
  background-color: #0e2e43;
}

.submit-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: nowrap;
}

.submit-row button { 
  margin: 0; 
}

.submit-row .home-sci {
  display: flex;
  gap: 15px;
  margin: 0;
}

/* Portfolio Page */
.portfolio-section {
  display: flex;
  min-height: 100vh;
  padding: 40px 5% 40px;
  color: #ededed;
  gap: 40px;
}

.portfolio-left {
  flex: 1;
  padding-top: 20px;
}

.portfolio-right {
  flex: 1;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  padding-top: 20px;
}

.portfolio-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.portfolio-item a {
  color: #00abf0;
  font-weight: 600;
  text-decoration: none;
}

.portfolio-item span {
  margin-left: 10px;
  font-style: italic;
}

/* Graphics Gallery */
.canva-gallery {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}

.canva-gallery img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 2px solid #00abf0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.canva-gallery img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 171, 240, 0.3);
}

/* Skillset Glow */
.skillset-glow {
  margin: 5px 0 0;
  overflow: hidden;
  white-space: nowrap;
  max-width: 80%;
  text-align: left;
}

.skillset-glow span {
  display: inline-block;
  padding: 0 10px;
  font-size: 18px;
  font-weight: 600;
  color: #00abf0;
  text-shadow: 0 0 6px #00abf0, 0 0 12px rgba(0, 171, 240, 0.7);
  animation: marquee 15s linear infinite, softGlow 3s ease-in-out infinite alternate;
}

.skillset-glow:hover span {
  animation-play-state: paused;
}

/* Animations */
@keyframes showRight {
  100% { width: 0; }
}

@keyframes manipActiveHover {
  100% { pointer-events: auto; }
}

@keyframes marquee {
  0%   { transform: translateX(100%); }
  30%  { transform: translateX(0); }
  60%  { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

@keyframes softGlow {
  from {
    text-shadow: 0 0 6px #00abf0, 0 0 12px rgba(0, 171, 240, 0.7);
  }
  to {
    text-shadow: 0 0 10px #33d4ff, 0 0 20px rgba(51, 212, 255, 0.8);
  }
}

/* ========================================
   MOBILE RESPONSIVE (≤ 900px)
   iPhone 12 Pro (390x844), Galaxy S8+ (360x740), etc.
   ======================================== */
@media screen and (max-width: 900px) {
  /* Typography */
  .home-content h1,
  .portfolio-left h1,
  #services h1,
  #about h1 {
    font-size: 32px;
    margin-top: 10px;
  }

  .home-content h2,
  .portfolio-right h2,
  #services h2,
  #about h2 {
    font-size: 24px;
    text-align: center;
  }

  .home-content h3 {
    font-size: 18px;
  }

  .home-content p,
  .portfolio-left p,
  #about p,
  #services p {
    max-width: 100%;
  }

  /* Header */
  .header {
    height: 70px;
    padding: 15px 5%;
  }

  .logo {
    font-size: 20px;
  }

  /* Show hamburger menu */
  .menu-icon {
    display: flex;
  }

  /* Mobile navbar */
  .navbar {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(8, 27, 41, 0.98);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 50px;
    gap: 30px;
    transition: left 0.3s ease;
    z-index: 999;
  }

  .navbar.active {
    left: 0;
  }

  .navbar a {
    font-size: 20px;
    margin: 0;
    padding: 15px 30px;
    width: 80%;
    text-align: center;
    border-bottom: 1px solid rgba(0, 171, 240, 0.2);
  }

  .navbar a:hover {
    background: rgba(0, 171, 240, 0.1);
    border-radius: 8px;
  }

  /* Content sections */
  .home {
    padding: 40px 5% 40px;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .home-content {
    padding-top: 20px;
  }

  /* Buttons - uniform sizing */
  .btn,
  .btn-box a,
  button {
    font-size: 16px;
    padding: 12px 24px;
    min-width: 160px;
  }

  .cta-group {
    margin-top: 30px;
    gap: 20px;
  }

  .cta-group .btn-box {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }

  .btn-box {
    width: 100%;
    flex-direction: column;
    gap: 15px;
  }

  .btn-box a {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  /* Social icons - uniform sizing */
  .home-sci {
    gap: 20px;
  }

  .home-sci a {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .skillset-glow {
    max-width: 100%;
  }

  .skillset-glow span {
    font-size: 14px;
  }

  /* Portfolio mobile layout */
  .portfolio-section {
    flex-direction: column;
    padding: 100px 5% 40px;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .portfolio-left,
  .portfolio-right {
    flex: none;
    width: 100%;
    max-height: none;
    padding-top: 20px;
  }

  /* Horizontal scrolling gallery */
  .canva-gallery {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 15px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .canva-gallery::-webkit-scrollbar {
    height: 10px;
  }

  .canva-gallery::-webkit-scrollbar-track {
    background: rgba(8, 27, 41, 0.8);
    border-radius: 5px;
  }

  .canva-gallery::-webkit-scrollbar-thumb {
    background: #00abf0;
    border-radius: 5px;
    border: 2px solid rgba(8, 27, 41, 0.8);
  }

  .canva-gallery::-webkit-scrollbar-thumb:hover {
    background: #33d4ff;
  }

  .canva-gallery img {
    min-width: 280px;
    max-width: 280px;
    height: 400px;
    object-fit: cover;
    scroll-snap-align: start;
    flex-shrink: 0;
  }

  /* Contact form */
  .form-container {
    padding: 100px 5% 40px;
    overflow-y: auto;
  }

  input, textarea, select {
    width: 100%;
    font-size: 16px;
  }

  .submit-row {
    flex-direction: column;
    gap: 15px;
  }

  /* Disable fixed background on mobile */
  .home,
  .portfolio-section,
  .form-container,
  #about, 
  #services {
    background-attachment: scroll;
  }

  .home-imgHover {
    display: none !important;
  }
}

/* ========================================
   TABLET RESPONSIVE (901px - 1024px)
   ======================================== */
@media screen and (min-width: 901px) and (max-width: 1024px) {
  .home-imgHover {
    width: 200px;
    right: 20px;
  }

  .navbar a {
    margin-left: 20px;
    font-size: 16px;
  }

  .home-content h1,
  .portfolio-left h1,
  #services h1,
  #about h1 {
    font-size: 42px;
  }

  .home-content h2,
  .portfolio-right h2 {
    font-size: 28px;
  }

  .home-content h3 {
    font-size: 20px;
  }

  .canva-gallery img {
    min-width: 200px;
    max-width: 200px;
    height: 300px;
    object-fit: cover;
  }

}

