/*===== GOOGLE FONTS =====*/
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

/*===== VARIABLES CSS =====*/
:root {
  --header-height: 4rem;
  
  /* Colors */
  --hue: 220;
  --first-color: hsl(var(--hue), 60%, 55%);
  --first-color-alt: hsl(var(--hue), 55%, 45%);
  --first-color-light: hsl(var(--hue), 60%, 97%);
  --title-color: hsl(var(--hue), 15%, 15%);
  --text-color: hsl(var(--hue), 8%, 45%);
  --text-color-light: hsl(var(--hue), 8%, 65%);
  --body-color: #F9FAFC;
  --container-color: #FFFFFF;
  --input-color: #F0F2F5;
  --shadow-soft: 0 10px 40px rgba(0,0,0,0.06);
  --shadow-hover: 0 15px 45px rgba(0,0,0,0.1);
  
  /* Typography */
  --body-font: 'Poppins', sans-serif;
  --big-font-size: 2.5rem;
  --h1-font-size: 1.75rem;
  --h2-font-size: 1.25rem;
  --h3-font-size: 1.125rem;
  --normal-font-size: .938rem;
  --small-font-size: .813rem;
  --smaller-font-size: .75rem;

  /* Font Weights */
  --font-light: 300;
  --font-medium: 500;
  --font-semi-bold: 600;
  --font-bold: 700;

  /* Margins */
  --mb-1: .5rem;
  --mb-2: 1rem;
  --mb-3: 1.5rem;
  --mb-4: 2rem;
  --mb-5: 2.5rem;
  --mb-6: 3rem;

  /* Z-index */
  --z-back: -10;
  --z-normal: 1;
  --z-tooltip: 10;
  --z-fixed: 100;
  
  --border-radius: 16px;
}

@media screen and (min-width: 968px) {
  :root {
    --big-font-size: 4rem;
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: .875rem;
  }
}

/*===== DARK THEME =====*/
body.dark-theme {
  --first-color: hsl(var(--hue), 60%, 65%);
  --first-color-light: hsl(var(--hue), 20%, 15%);
  --title-color: #F1F5F9;
  --text-color: #94A3B8;
  --body-color: #0F172A;
  --container-color: #1E293B;
  --input-color: #283446;
  --shadow-soft: 0 10px 40px rgba(0,0,0,0.3);
  --shadow-hover: 0 15px 45px rgba(0,0,0,0.5);
}

/*===== BASE =====*/
*, ::before, ::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { margin: var(--header-height) 0 0 0; font-family: var(--body-font); font-size: var(--normal-font-size); background-color: var(--body-color); color: var(--text-color); line-height: 1.6; transition: .4s; overflow-x: hidden; }
h1, h2, h3, ul, p { margin: 0; }
h1, h2, h3 { font-weight: var(--font-semi-bold); color: var(--title-color); }
ul { padding: 0; list-style: none; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/*===== BACKGROUND SHAPES =====*/
.background-shapes { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: var(--z-back); overflow: hidden; pointer-events: none; }
.shape { position: absolute; filter: blur(100px); border-radius: 50%; opacity: 0.4; }
.shape-1 { top: -10%; left: -10%; width: 500px; height: 500px; background: var(--first-color); }
.shape-2 { bottom: -10%; right: -10%; width: 400px; height: 400px; background: #6366f1; }
body.dark-theme .shape { opacity: 0.15; }

/*===== LAYOUT =====*/
.bd-container { max-width: 1024px; width: calc(100% - 3rem); margin-left: 1.5rem; margin-right: 1.5rem; }
.bd-grid { display: grid; gap: 2.5rem; }

/*===== HEADER =====*/
.l-header { width: 100%; position: fixed; top: 0; left: 0; z-index: var(--z-fixed); background-color: rgba(255, 255, 255, 0.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: .4s; }
body.dark-theme .l-header { background-color: rgba(15, 23, 42, 0.7); }
.nav { height: var(--header-height); display: flex; justify-content: space-between; align-items: center; }
.nav__logo { color: var(--title-color); font-weight: var(--font-bold); font-size: 1.25rem; letter-spacing: -0.5px; }
.nav__logo .dot { color: var(--first-color); font-size: 2rem; line-height: 0; }
.nav__menu { margin-right: auto; margin-left: 3rem; }
.nav__list { display: flex; flex-direction: column; gap: 2rem; }
.nav__link { color: var(--text-color); font-weight: var(--font-medium); transition: .3s; }
.nav__link:hover, .active-link { color: var(--first-color); }
.nav__actions { display: flex; align-items: center; gap: 1.25rem; }
.lang-switcher { display: flex; align-items: center; gap: .4rem; font-size: var(--small-font-size); font-weight: var(--font-semi-bold); background: var(--input-color); padding: 0.3rem 0.6rem; border-radius: 8px; }
.divider { color: var(--text-color-light); }
.lang-link { color: var(--text-color-light); }
.lang-link:hover, .lang-active { color: var(--title-color); }
.change-theme { font-size: 1.25rem; color: var(--title-color); cursor: pointer; transition: .3s; }
.change-theme:hover { color: var(--first-color); }
.nav__toggle { font-size: 1.5rem; color: var(--title-color); cursor: pointer; }

/*===== BUTTONS =====*/
.button { display: inline-block; background-color: var(--first-color); color: #fff; padding: .85rem 2rem; border-radius: 50px; font-weight: var(--font-medium); transition: .3s; box-shadow: 0 4px 12px rgba(var(--hue), 60%, 55%, 0.2); border: none; outline: none; cursor: pointer; }
.button:hover { background-color: var(--first-color-alt); transform: translateY(-2px); box-shadow: 0 8px 16px rgba(var(--hue), 60%, 55%, 0.3); }
.button-full { width: 100%; border-radius: var(--border-radius); }

/*===== HOME =====*/
.home { position: relative; min-height: calc(100vh - var(--header-height)); display: flex; align-items: center; padding: 2rem 0; }
.home__container { row-gap: 3rem; align-items: center; }
.home__data { text-align: center; }
.home__greeting { display: block; font-size: var(--h3-font-size); font-weight: var(--font-light); color: var(--text-color); margin-bottom: .5rem; }
.home__title { font-size: var(--big-font-size); font-weight: var(--font-bold); background: linear-gradient(to right, var(--title-color), var(--first-color)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; line-height: 1.1; margin-bottom: var(--mb-2); }
.home__scramble-wrapper { height: 50px; margin-bottom: var(--mb-4); }
.home__subtitle-scramble { font-size: var(--h2-font-size); color: var(--text-color); }
.home__img-wrapper { display: flex; justify-content: center; position: relative; }
.home__blob { width: 280px; height: 280px; border-radius: 50%; background: linear-gradient(145deg, var(--first-color-light), var(--container-color)); display: flex; align-items: flex-end; justify-content: center; overflow: hidden; box-shadow: var(--shadow-soft); position: relative; }
body.dark-theme .home__blob { background: linear-gradient(145deg, #1e293b, #0f172a); }
.home__img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; transition: .5s; }
.home__social { display: flex; justify-content: center; column-gap: 1.5rem; }
.home__social-icon { font-size: 1.5rem; color: var(--text-color); transition: .3s; padding: .5rem; border-radius: 50%; background-color: var(--container-color); box-shadow: 0 4px 8px rgba(0,0,0,0.05); }
.home__social-icon:hover { color: var(--first-color); transform: translateY(-3px); box-shadow: 0 6px 12px rgba(0,0,0,0.1); }

/*===== SECTION GENERAL =====*/
.section { padding: 5rem 0 2rem; }
.section-title { font-size: var(--h1-font-size); color: var(--title-color); margin-bottom: var(--mb-6); text-align: center; position: relative; letter-spacing: -0.5px; }
.section-title::after { content: ""; position: absolute; bottom: -0.5rem; left: 50%; transform: translateX(-50%); width: 30px; height: 3px; background-color: var(--first-color); border-radius: 10px; }

/*===== ABOUT =====*/
.about__container { row-gap: 2.5rem; background-color: var(--container-color); padding: 2rem; border-radius: var(--border-radius); box-shadow: var(--shadow-soft); }
.about__img { justify-self: center; position: relative; }
.about__img img { width: 250px; border-radius: var(--border-radius); box-shadow: var(--shadow-soft); }
.about__data { text-align: center; }
.about__subtitle { font-size: var(--h2-font-size); color: var(--first-color); margin-bottom: var(--mb-2); }
.about__text { text-align: justify; line-height: 1.8; color: var(--text-color); }

/*===== SKILLS =====*/
.skills__container { display: grid; gap: 2rem; }
.skills__header { text-align: center; max-width: 700px; margin: 0 auto; }
.skills__subtitle { font-size: var(--h2-font-size); margin-bottom: var(--mb-1); }
.skills__text { margin-bottom: var(--mb-4); color: var(--text-color-light); }
.skills__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1.5rem; }
.skill-card { background-color: var(--container-color); padding: 1.5rem; border-radius: var(--border-radius); box-shadow: var(--shadow-soft); text-align: center; transition: .3s; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; }
.skill-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.skill-icon { font-size: 2.5rem; color: var(--first-color); margin-bottom: .25rem; }
.skill-name { font-size: var(--normal-font-size); font-weight: var(--font-medium); color: var(--title-color); line-height: 1.2; }
.skill-progress-bg { width: 100%; height: 6px; background-color: var(--input-color); border-radius: 10px; overflow: hidden; margin-top: auto; }
.skill-progress { height: 100%; background-color: var(--first-color); border-radius: 10px; transition: width 1s ease-in-out; }

/*===== WORK (PROJECTS) =====*/
.work__container { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.work__card { background-color: var(--container-color); border-radius: var(--border-radius); overflow: hidden; box-shadow: var(--shadow-soft); transition: .3s; display: flex; flex-direction: column; height: 100%; }
.work__card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); }
.work__img-wrapper { position: relative; overflow: hidden; padding-top: 65%; width: 100%; }
.work__img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.work__card:hover .work__img { transform: scale(1.05); }
.work__overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(var(--hue), 60%, 55%, 0.7); display: flex; justify-content: center; align-items: center; opacity: 0; transition: .3s; }
.work__overlay i { font-size: 2rem; color: #fff; }
.work__card:hover .work__overlay { opacity: 1; }
.work__content { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.work__description { font-size: var(--small-font-size); color: var(--text-color); text-align: justify; line-height: 1.6; }

/*===== CONTACT =====*/
.contact__container { max-width: 600px; margin: 0 auto; }
.contact__form { background-color: var(--container-color); padding: 2.5rem; border-radius: var(--border-radius); box-shadow: var(--shadow-soft); }
.contact__inputs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin-bottom: 1.5rem; }
.contact__content { position: relative; height: 3rem; border-bottom: 2px solid var(--input-color); }
.contact__input { position: absolute; top: 0; left: 0; width: 100%; height: 100%; padding: 1rem .5rem; background: none; color: var(--title-color); border: none; outline: none; z-index: 1; font-family: var(--body-font); }
.contact__label { position: absolute; top: .75rem; left: .5rem; font-size: var(--normal-font-size); color: var(--text-color-light); transition: .3s; }
.contact__area { height: 8rem; margin-bottom: 2rem; }
.contact__area textarea { resize: none; }
.contact__input:focus + .contact__label, .contact__input:not(:placeholder-shown) + .contact__label { top: -12px; font-size: var(--smaller-font-size); color: var(--first-color); }
.contact__content:focus-within { border-bottom-color: var(--first-color); }

/*===== FOOTER =====*/
.footer { background-color: var(--container-color); color: var(--text-color); padding: 3rem 0; margin-top: 4rem; box-shadow: 0 -5px 20px rgba(0,0,0,0.03); }
.footer__container { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.footer__title { font-size: 1.5rem; }
.footer__title .dot { color: var(--first-color); }
.footer__social { display: flex; gap: 1.5rem; }
.footer__link { font-size: 1.25rem; color: var(--title-color); transition: .3s; }
.footer__link:hover { color: var(--first-color); }
.footer__info { text-align: center; }
.footer__copy { font-size: var(--smaller-font-size); margin-bottom: .5rem; }
.footer__visitors { display: flex; align-items: center; justify-content: center; gap: .4rem; font-size: var(--smaller-font-size); color: var(--text-color-light); background: var(--input-color); padding: .2rem .8rem; border-radius: 20px; }

/*===== MESSENGER FLOAT =====*/
.messenger-float { position: fixed; width: 50px; height: 50px; bottom: 30px; right: 30px; background: linear-gradient(45deg, #0965fe, #0088ff); color: #fff; border-radius: 50%; text-align: center; font-size: 28px; display: flex; align-items: center; justify-content: center; z-index: 100; box-shadow: 0 4px 15px rgba(9, 101, 254, 0.4); transition: .3s; }
.messenger-float:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(9, 101, 254, 0.6); }
body.rtl-mode .messenger-float { right: auto; left: 30px; }


/*===== MEDIA QUERIES (RESPONSIVE) =====*/
@media screen and (max-width: 576px) {
  .contact__inputs { grid-template-columns: 1fr; }
  .home__img-wrapper { width: 220px; height: 220px; margin: 0 auto; }
  .home__blob { width: 220px; height: 220px; }
  .about__container { padding: 1.5rem; }
}

@media screen and (max-width: 768px) {
  .nav__menu {
    position: fixed;
    top: var(--header-height);
    right: -100%; /* Hidden by default (English) */
    width: 80%;
    height: 100vh;
    padding: 2rem;
    background-color: #FFFFFF;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
    transition: .5s;
    margin: 0;
    z-index: var(--z-fixed);
  }

  /* === THE FIX FOR ENGLISH MENU === */
  .nav__menu.show {
    right: 0; /* Visible (English) */
  }

  body.dark-theme .nav__menu {
      background-color: #1E293B;
      box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
  }

  /* RTL (Kurdish) Settings */
  body.rtl-mode .nav__menu {
      left: -100%;
      right: auto;
      box-shadow: 5px 0 30px rgba(0,0,0,0.15);
  }
  
  body.rtl-mode .nav__menu.show {
      left: 0;
      right: auto;
  }
  
  body.rtl-mode .contact__label { left: auto; right: .5rem; }
}

@media screen and (min-width: 576px) {
  .home__data { text-align: left; }
  .home__container { grid-template-columns: 1fr .8fr; align-items: center; }
  .home__social { justify-content: flex-start; }
  .home__img-wrapper { justify-content: flex-end; }
  .about__container { grid-template-columns: repeat(2, 1fr); align-items: center; text-align: left; }
}

@media screen and (min-width: 768px) {
  .nav__list { flex-direction: row; gap: 3rem; }
  .nav__toggle { display: none; }
  .section { padding: 7rem 0 3rem; }
  .home { min-height: 100vh; }
  .home__blob { width: 350px; height: 350px; }
}

@media screen and (min-width: 968px) {
  .bd-container { margin-left: auto; margin-right: auto; }
  .home__blob { width: 450px; height: 450px; }
}

/*===== RTL MODE =====*/
body.rtl-mode { direction: rtl; }
body.rtl-mode .nav__menu { margin-left: auto; margin-right: 3rem; }
body.rtl-mode .home__data, body.rtl-mode .about__data, body.rtl-mode .about__text, body.rtl-mode .contact__input { text-align: right; }
body.rtl-mode .skills__grid, body.rtl-mode .work__description { direction: rtl; }
@media screen and (min-width: 576px) {
  body.rtl-mode .home__data { text-align: right; }
  body.rtl-mode .home__social { justify-content: flex-end; }
  body.rtl-mode .about__container { text-align: right; }
  body.rtl-mode .home__img-wrapper { justify-content: flex-start; }
}
@media screen and (max-width: 768px) {
  body.rtl-mode .nav__menu { margin: 0; }
}