/* Import Arabic/Kurdish Fonts */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&family=Noto+Sans+Arabic:wght@300;400;500;600;700&display=swap');

/* Global Box-Sizing for consistent layout */
* {
  box-sizing: border-box;
}

/* --- THEME & LAYOUT VARIABLES --- */
/* --- COSMIC SCROLLBAR --- */
::-webkit-scrollbar {
    width: 10px;
    background: #020618; /* Deep space background */
}

html {
    scrollbar-width: thin;
    scrollbar-color: var(--clr-accent) #020618;
}

::-webkit-scrollbar-track {
    background: #020618; 
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--clr-accent), #005f73);
    border-radius: 5px;
    border: 2px solid #020618; /* Creates a 'floating' look */
}

::-webkit-scrollbar-thumb:hover {
    background: var(--clr-accent);
    box-shadow: 0 0 10px var(--clr-accent);
}

/* Base Styles */
:root {
  --clr-text: #ffffff;
  --clr-text-secondary: #ccc;
  --clr-accent: #00ffff;
  --clr-dark: #000000;
  --clr-bg-gradient-start: #1b2735;
  --clr-bg-gradient-end: #090a0f;
  --clr-bg-header: #16161680; /* 50% transparent */
  --clr-bg-footer: #161616;
  --clr-animation: #5bc0eb;
  --font-primary: "Outfit", sans-serif;
}

/* --- BASE STYLES --- */
body {
  background: radial-gradient(
    ellipse at bottom,
    var(--clr-bg-gradient-start) 0%,
    var(--clr-bg-gradient-end) 100%
  );
  color: var(--clr-text);
  font-family: var(--font-primary);
  margin: 0;
  scroll-behavior: smooth; /* Added for smooth navigation scrolling */
  overflow-x: hidden; /* Prevents horizontal scroll from overlapping elements */
}

/* --- UTILITY CLASSES --- */
.accent-text {
  color: var(--clr-accent);
}

/* --- HERO CONTAINER --- */
.hero-section {
  /* Use padding for flexible spacing instead of a fixed height */
  padding: 10rem 5% 6rem;
  width: 100%;
  display: flex;
  justify-content: center;
  position: relative;
  box-sizing: border-box;
}

.hero-container {
  width: 100%;
  max-width: 1200px;
  position: relative;
  height: 100%;
}

/* --- HEADER & NAVIGATION --- */
.header-wrapper {
  position: fixed; /* Changed to fixed */
  top: 20px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 20; /* Ensure wrapper is on top */
}

/* Hide Bottom Dock on Desktop */
.bottom-dock { display: none; }

.header {
  width: 95%;
  max-width: 1200px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 25px 30px;
  box-sizing: border-box;
  background-color: var(--clr-bg-header);
  border-top: 1px solid rgba(70, 70, 70, 0.6);
  border-bottom: 1px solid var(--clr-accent);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.55);
  color: var(--clr-text);
  border-radius: 40px;
}

.navigation a {
  color: var(--clr-text);
  text-decoration: none;
  margin-left: 30px;
  font-size: 0.9rem;
  transition: color 0.3s ease;
  position: relative;
  padding-bottom: 5px; /* Space for the underline */
}

.navigation a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  transform: translateX(
    -50%
  ); /* Corrected typo: translateX instead of translatex */
  background-color: var(--clr-accent);
  transition: width 0.3s ease-in-out;
}

.navigation a:hover::after {
  width: 100%;
}

.navigation a:hover {
  color: var(--clr-accent);
}

.navigation a.active-link {
  color: var(--clr-accent);
}

/* --- MAIN CONTENT --- */
.hero-content {
  width: 100%;
  z-index: 10;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 4rem;
}

.hero-title {
  font-family: var(--font-primary);
  font-size: 4.5rem;
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 0.5rem 0;
  letter-spacing: -2px;
  text-transform: uppercase;
}

.hero-tagline {
  font-size: 1.2rem;
  color: var(--clr-text-secondary);
  margin-bottom: 2rem;
  font-weight: 600;
  min-height: 1.5em; /* Reserve space for typing */
}

/* Typing Cursor */
.cursor {
  display: inline-block;
  width: 2px;
  background-color: var(--clr-accent);
  margin-left: 2px;
  animation: blink 1s infinite;
}

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

/* Scroll Reveal Animation */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

.hero-content p {
  font-size: 1rem;
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto 30px auto;
  color: var(--clr-text-secondary);
}

.cta-button {
  background-color: var(--clr-accent);
  color: var(--clr-dark);
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 15px 35px;
  display: inline-block;
  border-radius: 25px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.cta-button:hover {
  background-color: var(--clr-text);
}

/* --- RESPONSIVE DESIGN --- */

/* Medium screens (e.g., tablets) */
@media (max-width: 992px) {
  .hero-content p {
    font-size: 0.9rem;
    max-width: 350px;
  }

  .cta-button {
    font-size: 0.9rem;
    padding: 12px 30px;
  }

  .navigation a {
    font-size: 0.85rem;
    margin-left: 20px;
  }
}

/* Small screens (e.g., mobile phones) */
/* THIS SECTION HAS BEEN CORRECTED */
@media (max-width: 768px) {
  .hero-section {
    /* Adjust padding for mobile, removing the large fixed gap */
    padding: 8rem 5% 4rem;
  }

  .hero-container {
    height: auto;
    display: flex;
    flex-direction: column;
    /* align-items: center; */
    text-align: center;
  }

   /* Make the wrapper flow in the document instead of being absolute */
   /* Standard Header is HIDDEN on mobile in favor of Bottom Dock */
   .header-wrapper, .desktop-only {
     display: none;
   }
   
   /* --- BOTTOM DOCK (Mobile Nav) --- */
   .bottom-dock {
        display: flex;
        justify-content: space-around;
        align-items: center;
        position: fixed;
        bottom: 20px;
        left: 5%;
        width: 90%;
        background: rgba(255, 255, 255, 0.02); /* Minimal tint */
        backdrop-filter: blur(3px); /* Reduced blur to show background */
        -webkit-backdrop-filter: blur(3px);
        border: 1px solid rgba(255,255,255,0.1);
        border-radius: 20px;
        padding: 15px 0;
        z-index: 1000;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    }

    .dock-item {
        color: rgba(255,255,255,0.6);
        font-size: 1.5rem;
        text-decoration: none;
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        position: relative;
    }

    .dock-item:hover, .dock-item:active {
        color: var(--clr-accent);
        transform: translateY(-10px) scale(1.2);
    }

    .dock-item.active-dock {
        color: var(--clr-accent);
        transform: translateY(-5px);
    }
    
    .dock-item.active-dock::after {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 50%;
        transform: translateX(-50%);
        width: 5px; height: 5px;
        background: var(--clr-accent);
        border-radius: 50%;
        box-shadow: 0 0 10px var(--clr-accent);
    }

  .hero-content {
    position: static;
    width: 100%;
    order: 2; /* Display text after the image */
    margin-top: 0; /* Replaced with gap on parent */
  }

  .hero-title {
    font-size: 2.8rem;
  }

  .hero-content p {
    max-width: 100%;
    margin: 20px 0;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  body{
    font-size: 0.8rem;;
  }
  .navigation a {
    font-size: 0.9rem; /* Make font smaller */
    padding: 8px; /* Reduce padding for a more compact header */
  }

  .hero-title {
    font-size: 2.2rem;
  }
}

@media (max-width: 426px) {
  .navigation a {
    font-size: 0.7rem; /* Make font smaller */
    padding: 6.2px; /* Reduce padding for a more compact header */
  }
}

/* --- ABOUT SECTION --- */
.about-section {
  padding: 6rem 5%;
  display: flex;
  justify-content: center;
}

.about-card {
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 1000px;
    width: 100%;
    
    /* Glassmorphic Style */
    background: rgba(255, 255, 255, 0.02); /* Slightly more transparent */
    backdrop-filter: blur(3px); /* Reduced blur to see stars */
    -webkit-backdrop-filter: blur(3px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.about-content {
  flex: 1;
}

.about-content h2 {
  font-family: var(--font-primary);
  font-size: 2.5rem;
  color: var(--clr-text);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.about-content p {
  color: var(--clr-text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.about-image {
  flex: 0 0 300px; /* Fixed width for image container */
}

.about-image img {
  width: 100%;
  border-radius: 50%; /* Makes the image circular */
  border: 3px solid var(--clr-accent);
  box-shadow: 0 0 25px var(--clr-accent) 4d; /* 30% opacity */
}

/* Responsive adjustments for About Section */
@media (max-width: 850px) {
  .about-card {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
    padding: 2rem;
  }

  .about-image {
    flex: 0 0 auto;
  }
  .about-image {
    flex: 0 0 auto;
    width: 200px; /* Smaller on mobile */
  }
}

/* Specific adjustments for small mobile screens (e.g. 320px) */
@media (max-width: 480px) {
  .skills-grid-glass {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .skill-card-glass {
    width: 132px !important;
    height: 40px !important;
    padding: 0 !important;
    font-size: 0.7rem !important;
    justify-content: center;
    border-radius: 8px;
  }
  
  .skill-card-glass i {
      font-size: 0.8rem;
      margin-right: 5px;
  }
}

/* --- SKILLS SECTION & DESIGN OPTIONS --- */
.skills-section {
  padding: 4rem 5%;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
}

.skills-section h2 {
  font-family: var(--font-primary);
  font-size: 2.5rem;
  color: var(--clr-text);
  font-weight: 600;
  margin-bottom: 2rem;
}

/* Option 1: Glassmorphic */
.skills-grid-glass {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.skill-card-glass {
  background: rgba(255, 255, 255, 0.05); /* Very transparent */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 3px solid var(--skill-color, rgba(255,255,255,0.3)); /* colored bottom border */
  color: var(--clr-text);
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  cursor: default;
  position: relative;
  overflow: hidden;
}

.skill-card-glass::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, transparent, var(--skill-color));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.skill-card-glass i {
    font-size: 1.3rem; 
    color: var(--skill-color); /* Icon takes the same color */
    text-shadow: 0 0 10px var(--skill-color); /* Icon glows */
}

.skill-card-glass:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px var(--skill-color); /* Glow matches brand color */
  border-color: var(--skill-color);
}

.skill-card-glass:hover::before {
    opacity: 0.1; /* Subtle background tint on hover */
}

/* Shimmer Effect */
.skill-card-glass::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    transform: skewX(-25deg);
    animation: shimmer 10s infinite; /* Slower loop (10s) */
    z-index: 1;
    pointer-events: none;
}

/* Staggered Delays (Doubled for slower ripple) */
.skill-card-glass:nth-child(1)::after { animation-delay: 0s; }
.skill-card-glass:nth-child(2)::after { animation-delay: 0.3s; }
.skill-card-glass:nth-child(3)::after { animation-delay: 0.6s; }
.skill-card-glass:nth-child(4)::after { animation-delay: 0.9s; }
.skill-card-glass:nth-child(5)::after { animation-delay: 1.2s; }
.skill-card-glass:nth-child(6)::after { animation-delay: 1.5s; }
.skill-card-glass:nth-child(7)::after { animation-delay: 1.8s; }

@keyframes shimmer {
    0% { left: -100%; }
    15% { left: 200%; } /* Sweep takes ~1.5s (15% of 10s) */
    100% { left: 200%; }
}

/* --- PROJECTS SECTION & CAROUSEL --- */
.projects-section {
  padding: 4rem 0; /* Add vertical padding, horizontal is handled by wrapper */
  text-align: center;
}

.projects-section h2 {
  font-family: var(--font-primary);
  font-size: 2.5rem;
  color: var(--clr-text);
  font-weight: 600;
  margin: 0 0 3rem 0;
}

.carousel-wrapper {
  position: relative;
  max-width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel {
  display: flex;
  gap: 24px;
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
  padding: 24px;
  width: 100%;
  max-width: 900px; /* Adjust as needed */
}

.carousel::-webkit-scrollbar {
  display: none; /* Chrome, Safari, and Opera */
}

.carousel article {
  scroll-snap-align: center;
  flex: 0 0 280px;
  background: rgba(255, 255, 255, 0.03); /* Glassy background */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0; /* Remove padding for edge-to-edge */
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative; /* For the clickable area */
  overflow: hidden; /* Clip content */
}

/* The active (center) item in the carousel */
.carousel article.is-active {
  transform: scale(1.05);
  box-shadow: 0 8px 30px rgba(0, 255, 255, 0.15);
  border-color: var(--clr-accent);
}
.carousel article img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  margin-bottom: 0; /* Remove bottom margin */
  display: block;
}

.project-preview-container {
    width: 100%;
    height: 200px;
    margin-bottom: 0; /* Remove bottom margin */
    overflow: hidden;
    position: relative;
    background: #000; /* Fallback */
}

.project-preview-container iframe {
  width: 200%;
  height: 200%;
  border: none;
  pointer-events: none;
  transform: scale(0.5);
  transform-origin: top left;
  background: white; /* Ensure iframe has background if transparent */
}

.card-content {
    padding: 1.5rem; /* Re-add padding for text */
}

.carousel article h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
}

/* This is the main link for the card */
.carousel article h3 a {
  color: var(--clr-text);
  text-decoration: none;
  transition: color 0.3s ease;
}

/* The "stretched link" pseudo-element */
.carousel article h3 a::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1; /* Place it above other content in the card */
}

/* Hover/focus styles for the entire card */
.carousel article:hover h3 a,
.carousel article h3 a:focus-visible {
  color: var(--clr-accent);
  outline: none;
}

.carousel article:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 8px 25px #00ffff2a;
}

.carousel article p {
  color: var(--clr-text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* The "Launch Tool" text */
.project-cta-text {
  color: var(--clr-accent);
  font-weight: 600;
  font-size: 0.9rem;
  position: relative;
  z-index: 2; /* Ensure it's above the stretched link */
}

/* Styles for disabled project cards */
.disabled-link {
  pointer-events: none; /* Make the link unclickable */
  cursor: default;
}

.carousel article:has(.disabled-link) {
  opacity: 0.6;
  filter: grayscale(50%);
}

.carousel article:has(.disabled-link):hover {
  transform: none; /* Disable hover effect */
  box-shadow: none;
}

/* --- CONTACT SECTION --- */
.contact-section {
  padding: 4rem 5%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.contact-section h2 {
  font-family: var(--font-primary);
  font-size: 2.5rem;
  color: var(--clr-text);
  font-weight: 600;
  margin: 0;
}

.contact-intro {
  color: var(--clr-text-secondary);
  max-width: 500px;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.contact-details {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap; /* For responsiveness */
}

.contact-item {
  background: rgba(22, 22, 22, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem;
  border-radius: 10px;
  min-width: 280px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px var(--clr-accent) 1a; /* 10% opacity */
}

.contact-item h3 {
  color: var(--clr-text);
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
}

.contact-item a {
  color: var(--clr-accent);
  text-decoration: none;
  font-size: 1rem;
  word-break: break-all; /* Prevents long text like emails from overflowing */
  transition: text-shadow 0.3s ease;
}

.contact-item a:hover,
.contact-item a:focus-visible {
  text-shadow: 0 0 8px var(--clr-accent) b3; /* 70% opacity */
  outline: none; /* Remove default outline in favor of our custom shadow */
}

/* --- HOLOGRAPHIC CONTACT FORM --- */
.contact-form-styled {
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 10;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-input {
    width: 100%;
    padding: 10px 0;
    font-size: 1rem;
    color: var(--clr-text);
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    outline: none;
    transition: border-color 0.3s, text-shadow 0.3s;
    font-family: var(--font-primary);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-input:focus {
    border-bottom-color: var(--clr-accent);
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
}

/* Focus underline animation effect */
.form-input:focus + .focus-border {
    width: 100%;
}

textarea.form-input {
    min-height: 100px;
    resize: vertical;
}

/* Submit Button ("Send into Orbit") */
.btn-orbit {
    background: transparent;
    color: var(--clr-accent);
    border: 1px solid var(--clr-accent);
    padding: 12px 30px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    width: 100%;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-orbit:hover {
    background: var(--clr-accent);
    color: #000;
    box-shadow: 0 0 20px var(--clr-accent);
}

.btn-orbit i {
    transition: transform 0.4s ease;
}

.btn-orbit:hover i {
    transform: translate(5px, -5px); /* Blast off effect */
}


/* --- FOOTER & BACK TO TOP --- */
.back-to-top {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: #020618;
    border: 1px solid var(--clr-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--clr-accent);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 5;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.back-to-top:hover {
    box-shadow: 0 0 20px var(--clr-accent);
    transform: translateX(-50%) translateY(-5px);
}

footer {
  background-color: var(--clr-bg-footer);
  color: var(--clr-text);
  text-align: center;
  padding: 25px 0; /* Vertical padding */
  font-size: 0.9rem;
  font-family: var(--font-primary);
  border-top: 1px solid rgba(70, 70, 70, 0.6); /* Subtle top border */
  box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.55); /* Subtle top shadow, matching header style */
  margin-top: 60px; /* Provide some space from the content above */
  position: relative; /* For pseudo-element positioning */
}

footer p {
  margin: 0; /* Remove default paragraph margin */
  transition: color 0.3s ease, text-shadow 0.3s ease; /* Smooth transition for hover effects */
  position: relative; /* Ensure text is above ::before */
  z-index: 1; /* Ensure text is above ::before */
}

footer:hover p {
  color: var(--clr-accent); /* Change text color to accent on hover */
  text-shadow: 0 0 10px var(--clr-accent) cc; /* 80% opacity */
}

/* Subtle animated background element for the footer */
footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    var(--clr-accent) 14,
    transparent 50%,
    var(--clr-accent) 14
  ); /* 8% opacity */
  background-size: 200% 100%; /* Make gradient wider than element */
  background-position: 100% 0; /* Start off-screen to the right */
  opacity: 0;
  transition: background-position 0.8s ease-out, opacity 0.5s ease;
  z-index: 0; /* Behind the text */
}

footer:hover::before {
  opacity: 1;
  background-position: 0 0; /* Slide gradient into view */
}

/* Carousel Controls */
.carousel-control {
  background: rgba(255, 255, 255, 0.05); /* Glassy */
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--clr-accent);
  font-size: 1.2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.carousel-control:hover {
    background: var(--clr-accent);
    color: #000;
    box-shadow: 0 0 20px var(--clr-accent);
    transform: translateY(-50%) scale(1.1); /* Pop effect */
    border-color: var(--clr-accent);
}

.carousel-control.prev {
  left: 2%;
}

.carousel-control.next {
  right: 2%;
}

/* Specific style for links within project page footers */
footer a.footer-link {
  color: var(--clr-accent);
  text-decoration: none;
}

/* --- Parallax Star Background --- */
/* Moved to css/stars.css */

/* --- RTL & I18N SUPPORT --- */



/* Font Variables */
:root {
  --font-en: "Outfit", sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "Noto Sans Arabic", sans-serif;
  --font-primary: var(--font-en); /* Default to English */
}

/* Language Specific Overrides */
[lang="ar"], [lang="ku"] {
  --font-primary: var(--font-ar);
}

/* RTL Layout Flip */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .navigation a {
    margin-left: 0;
    margin-right: 30px;
}

[dir="rtl"] .navigation a::after {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

[dir="rtl"] .hero-title {
    letter-spacing: 0; /* Arabic letters shouldn't have wide spacing */
}

[dir="rtl"] .carousel article {
    text-align: right;
}

[dir="rtl"] .form-group input, 
[dir="rtl"] .form-group textarea {
    text-align: right;
}

[dir="rtl"] .carousel-control.prev {
    left: auto;
    right: 2%;
    transform: rotate(180deg) translateY(50%); /* Flip arrow */
}

[dir="rtl"] .carousel-control.next {
    right: auto;
    left: 2%;
    transform: rotate(180deg) translateY(50%); /* Flip arrow */
}

[dir="rtl"] .carousel-control:hover {
     transform: rotate(180deg) translateY(50%) scale(1.1);
}

/* Language Switcher Styles - Desktop Dropdown */
.nav-lang-dropdown {
    position: relative;
    margin-left: 20px;
    display: inline-block;
}

[dir="rtl"] .nav-lang-dropdown {
    margin-left: 0;
    margin-right: 20px;
}

.nav-lang-toggle {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--clr-text);
    padding: 5px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-family: var(--font-primary);
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.nav-lang-toggle:hover {
    border-color: var(--clr-accent);
    color: var(--clr-accent);
}

.nav-lang-menu {
    position: absolute;
    top: 120%;
    right: 0;
    background: rgba(10, 10, 20, 0.95);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 5px;
    display: flex;
    flex-direction: column;
    min-width: 100px;
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

[dir="rtl"] .nav-lang-menu {
    right: auto;
    left: 0;
}

.nav-lang-dropdown:hover .nav-lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-btn-desktop {
    background: transparent;
    border: none;
    color: #ccc;
    padding: 8px 12px;
    text-align: left; /* Default */
    cursor: pointer;
    font-family: var(--font-primary);
    transition: all 0.2s;
    border-radius: 5px;
}

[dir="rtl"] .lang-btn-desktop {
    text-align: right;
}

.lang-btn-desktop:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--clr-accent);
}

/* Language Switcher Styles - Mobile Dock Popup */
.lang-dock-wrapper {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* The popup menu checks for an active state or can be purely click-based JS */
.dock-lang-menu {
    position: absolute;
    bottom: 140%; /* Above the dock */
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(10, 10, 20, 0.95);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.lang-dock-wrapper.active .dock-lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.lang-btn-mobile {
    background: transparent;
    border: none;
    color: #fff;
    padding: 10px 15px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 8px;
    font-weight: 600;
}

/* --- CTA BUTTON (Request Quote) --- */
.btn-orbit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 40px;
    background: var(--clr-accent); /* Solid accent color for primary CTA */
    border: none;
    border-radius: 50px;
    color: #000; /* Contrast text (black on cyan Usually) */
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy spring */
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    margin-top: 1.5rem;
    width: 100%; /* Full width on mobile looks good, or auto? Let's go fit-content but wide */
    max-width: 300px; /* Cap width */
}

.btn-orbit:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.6);
    background: #fff; /* White on hover? Or just brighter accent? */
}

.btn-orbit i {
    transition: transform 0.3s;
}

.btn-orbit:hover i {
    transform: translateX(5px) rotate(-45deg); /* Rocket flight animation */
}

/* --- PRINCIPLES SECTION --- */
.principles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.principles-card {
    background: rgba(22, 22, 22, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: left;
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.principles-card:hover {
    transform: translateY(-5px);
    border-color: var(--clr-accent);
}

.principles-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    color: var(--clr-text);
}

.principles-card i {
    font-size: 1.5rem;
    color: var(--clr-accent);
    margin-bottom: 1rem;
}

/* Force Skills Grid to LTR (Keep English technical terms LTR) */
[dir="rtl"] .skills-grid-glass {
    direction: ltr;
    text-align: left;
}

/* Force Phone Number to LTR to prevent scrambling */
.phone-number {
    direction: ltr;
    display: inline-block;
}

/* Ensure Principles cards flip text alignment in RTL */
[dir="rtl"] .principles-card {
    text-align: right;
}
