/* ============================================
   MENNA PORTFOLIO - UPDATED STYLESHEET
   ============================================ */

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #180931;
  font-family: "Sour Gummy", sans-serif;
  overflow-x: hidden;
}

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */

#scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: linear-gradient(to bottom, #9864cd, #6b3fa0);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  z-index: 999;
  box-shadow: 0 0 15px #a771d480;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
}

#scroll-top:hover {
  box-shadow: 0 0 25px #a771d4;
}

/* ============================================
   NAVIGATION BAR
   ============================================ */

nav {
  background-image: linear-gradient(to bottom, #1A0B2E, #3f2462);
  box-shadow: 0 0 10px #a771d4;
  transition: box-shadow 0.4s ease, background 0.4s ease;
}

nav:hover {
    box-shadow: 0 0 30px #a771d4;
}

nav.scrolled {
  box-shadow: 0 0 35px #a771d4bb;
  background-image: linear-gradient(to bottom, #120720ee, #2d1a46ee);
  backdrop-filter: blur(12px);
}

nav .logo {
  color: #fff;
  font-weight: bold;
}

nav .logo span {
  font-weight: 1000;
  color: #9200c2;
}

nav .nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

nav div a {
  text-decoration: none;
  color: #fff;
  transition: color 0.2s;
  position: relative;
}

nav div a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #9200c2;
  transition: width 0.3s ease;
  border-radius: 2px;
}

nav div a:hover {
  color: #9200c2;
}

nav div a:hover::after {
  width: 100%;
}

/* Hamburger menu (mobile) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 0 0.5rem;
  border-top: 0.5px solid #a771d440;
  margin-top: 0.5rem;
}

.mobile-menu a {
  text-decoration: none;
  color: #fff;
  font-size: 15px;
  transition: color 0.2s;
  padding: 4px 0;
}

.mobile-menu a:hover {
  color: #9200c2;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
  min-height: 90vh;
  padding: 4rem 1rem;
}

.hero-section .subtitle {
  color: #c7c7c7;
  font-size: 18px;
}

.hero-section .subtitle span {
  color: #9200c2;
  font-weight: 600;
}

.hero-section h1 {
  font-size: clamp(42px, 8vw, 80px);
  color: #9200c2;
  font-weight: bold;
  line-height: 1.1;
}

.hero-section h1 span {
  color: #fff;
}

/* Typewriter cursor */
.typewriter-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: #9200c2;
  margin-left: 4px;
  vertical-align: text-bottom;
  animation: blink 0.75s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.button1 {
  background-color: #9864cd;
  margin-right: 13px;
  transition: 0.4s ease;
}

.button1 a {
  color: #ffffff;
  text-decoration: none;
}

.button1:hover {
  background-color: #321a52;
  box-shadow: 0 0 10px #a771d4;
}

.button2 {
  background-color: transparent;
  border: 1.5px solid #9864cd !important;
  transition: 0.4s;
}

.button2 a {
  color: #9864cd;
  text-decoration: none;
}

.button2:hover {
  background-color: #321a52;
  box-shadow: 0 0 10px #a771d4;
}

.button2:hover a {
  color: #fff;
}

/* ============================================
   SECTION DIVIDER
   ============================================ */

.section-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(to right, #9200c2, #a771d4);
  border-radius: 2px;
  margin: 0 auto 2rem;
}

/* ============================================
  ABOUT SECTION
   ============================================ */

.about {
  border: 1px solid #a771d4;
}

.about h2 {
  color: #9864cd;
  font-size: clamp(32px, 6vw, 50px);
}

.about p {
  color: #c7c7c7;
}

/* ============================================
  SKILLS SECTION
   ============================================ */

.skills h2 {
  color: #9864cd;
  font-size: clamp(32px, 6vw, 50px);
}

.skills-box {
  background-image: linear-gradient(to bottom, #180931, #3f2462);
  box-shadow: 0 0 10px #a771d4;
  transition: 0.4s ease;
}

.skills-box:hover {
  box-shadow: 0 0 30px #a771d4;
}

.skill {
  width: 180px;
}

.skill .icon-wrap {
  font-size: 72px;
  line-height: 1;
  transition: transform 0.3s ease;
}

.skill:hover .icon-wrap {
  transform: translateY(-6px) scale(1.05);
}

.skill .percent {
  font-size: 18px;
  font-weight: bold;
  color: #e6e6e6;
  margin: 6px 0 8px;
}

/* Progress bar */
.skill-bar {
  width: 100%;
  height: 6px;
  background: #2a1044;
  border-radius: 3px;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  border-radius: 3px;
  width: 0;
  transition: width 1.4s ease;
}

.skill-bar-fill.html { background: #ff6f00; }
.skill-bar-fill.css  { background: #008cff; }
.skill-bar-fill.js   { background: #ffea00; }
.skill-bar-fill.rj   { background: #7952B3; }

.html-icon { font-size: 72px; color: #ff6f00; }
.css-icon  { font-size: 72px; color: #008cff; }
.js-icon   { font-size: 72px; color: #ffea00; }
.rj-icon   { font-size: 72px; color: #7952B3; }

/* ============================================
   PROJECTS SECTION
   ============================================ */

.projects-section h2 {
  color: #9864cd;
  font-size: clamp(32px, 6vw, 50px);
}

.projects-section p {
  color: #c7c7c7;
}

.projects-card {
  background-image: linear-gradient(to bottom, #180931, #3f2462);
  box-shadow: 0 0 10px #a771d4;
  transition: box-shadow 0.4s ease, transform 0.4s ease !important;
  overflow: hidden;
}

.projects-card:hover {
  box-shadow: 0 0 30px #a771d4;
  transform: translateY(-6px) !important;
}

.projects-card h3 {
  color: #a771d4;
}

/* Project image */
.card-img-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.card-img-wrapper img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.projects-card:hover .card-img-wrapper img {
  transform: scale(1.05);
}

/* Tech tags */
.tech-tags span {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  background: #281344;
  border: 1px solid #a771d460;
  color: #c7c7c7;
}

/* Always-visible project action buttons */
.card-links {
  border-top: 1px solid #a771d430;
  padding-top: 16px;
}

.project-btn {
  flex: 1;
  text-align: center;
  padding: 9px 16px;
  border-radius: 8px;
  color: #fff;
  background-color: #9864cd;
  text-decoration: none;
  font-size: 14px;
  transition: 0.3s ease;
}

.project-btn:hover {
  background-color: #321a52;
  box-shadow: 0 0 15px #a771d4;
  transform: translateY(-2px);
  color: #fff;
}

.project-btn-outline {
  background-color: transparent;
  border: 1.5px solid #9864cd;
  color: #c7c7c7;
}

.project-btn-outline:hover {
  background-color: #321a52;
  color: #fff;
}

/* ============================================
   CONTACT SECTION
   ============================================ */

.contact-section {
  border: 1px solid #a771d4;
}

.contact-section h2 {
  color: #9864cd;
  font-size: clamp(32px, 6vw, 50px);
}

.contact-section form input,
.contact-section form textarea {
  width: 100%;
  max-width: 400px;
  border: none;
  color: #fff;
  background-image: linear-gradient(to bottom, #1A0B2E, #3f2462);
  box-shadow: 0 0 10px #a771d4;
  transition: 0.4s ease;
  outline: none;
  font-family: "Sour Gummy", sans-serif;
}

.contact-section form input:focus,
.contact-section form textarea:focus {
  color: #ffffff;
  box-shadow: 0 0 30px #a771d4;
}

.contact-section form input::placeholder,
.contact-section form textarea::placeholder {
  font-size: 15px;
  color: rgb(111, 78, 126);
}

.contact-section form textarea {
  height: 150px;
  resize: vertical;
}

.contact-section form button {
  background-color: #9864cd;
  color: #fefcff;
  transition: 0.4s ease;
  font-family: "Sour Gummy", sans-serif;
  cursor: pointer;
}

.contact-section form button:hover {
  background-color: #321a52;
  box-shadow: 0 0 20px #a771d4;
  transform: translateY(-2px);
}

/* Form success/error feedback */
.form-status {
  text-align: center;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 8px;
  display: none;
}

.form-status.success {
  background: #1a3a1e;
  color: #4fbf5e;
  display: block;
}

.form-status.error {
  background: #3a1a1a;
  color: #e05c5c;
  display: block;
}

/* ============================================
   SOCIAL LINKS
   ============================================ */

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #a771d460;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c7c7c7;
  text-decoration: none;
  transition: 0.3s ease;
  font-size: 16px;
}

.social-links a:hover {
  border-color: #9200c2;
  color: #9200c2;
  box-shadow: 0 0 12px #9200c260;
  transform: translateY(-3px);
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  background-image: linear-gradient(to bottom, #1A0B2E, #3f2462);
  color: #fff;
  box-shadow: 0 0 10px #a771d4;
  transition: 0.4s ease;
}

footer:hover {
  box-shadow: 0 0 30px #a771d4;
}

footer small {
  color: #c7c7c7;
}

footer small span {
  color: #9200c2;
}

/* ============================================
   ANIMATIONS — SCROLL REVEAL
   ============================================ */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  .hero-section h1 {
    font-size: 38px;
  }

  .about p {
    width: 90% !important;
  }

  .contact-section form input,
  .contact-section form textarea {
    max-width: 100%;
  }

  .projects-card {
    width: 100% !important;
  }

  .card-links {
    flex-direction: column;
  }

  .skill {
    width: 130px;
  }

  .skill .icon-wrap {
    font-size: 54px;
  }

  #scroll-top {
    bottom: 20px;
    right: 20px;
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 480px) {
  .buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .button1 {
    margin-right: 0;
  }

  .about-info {
    gap: 1rem !important;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
