/*-----------------------------------*\
  #style.css
  Anas Alhalabi — portfolio

  Based on the "vCard" template by codewithsadee (MIT).
  https://github.com/codewithsadee/vcard-personal-portfolio
  Re-themed (teal/cyan accent) and trimmed for this portfolio.
\*-----------------------------------*/


/*-----------------------------------*\
  #CUSTOM PROPERTY
\*-----------------------------------*/

:root {

  /**
   * colors
   */

  /* gradient */

  --bg-gradient-onyx: linear-gradient(
    to bottom right,
    hsl(240, 1%, 25%) 3%,
    hsl(0, 0%, 19%) 97%
  );
  --bg-gradient-jet: linear-gradient(
    to bottom right,
    hsla(240, 1%, 18%, 0.251) 0%,
    hsla(240, 2%, 11%, 0) 100%
  ), hsl(240, 2%, 13%);

  /* accent gradients (teal → cyan) */
  --bg-gradient-accent-1: linear-gradient(
    to bottom right,
    hsl(170, 75%, 60%) 0%,
    hsla(190, 80%, 60%, 0) 50%
  );
  --bg-gradient-accent-2: linear-gradient(
    135deg,
    hsla(170, 75%, 60%, 0.251) 0%,
    hsla(190, 80%, 60%, 0) 59.86%
  ), hsl(240, 2%, 13%);
  --border-gradient-onyx: linear-gradient(
    to bottom right,
    hsl(0, 0%, 25%) 0%,
    hsla(0, 0%, 25%, 0) 50%
  );
  --text-gradient-accent: linear-gradient(
    to right,
    hsl(170, 75%, 58%),
    hsl(190, 85%, 60%)
  );

  /* solid */

  --jet: hsl(0, 0%, 22%);
  --onyx: hsl(240, 1%, 17%);
  --eerie-black-1: hsl(240, 2%, 13%);
  --eerie-black-2: hsl(240, 2%, 12%);
  --smoky-black: hsl(0, 0%, 7%);
  --white-1: hsl(0, 0%, 100%);
  --white-2: hsl(0, 0%, 98%);
  --accent: hsl(170, 75%, 55%);
  --accent-2: hsl(190, 60%, 55%);
  --light-gray: hsl(0, 0%, 84%);
  --light-gray-70: hsla(0, 0%, 84%, 0.7);
  --bittersweet-shimmer: hsl(0, 43%, 51%);

  /**
   * typography
   */

  --ff-poppins: 'Poppins', sans-serif;
  /* Arabic: MoC "Year of Handicrafts" (self-hosted), Tajawal fallback */
  --ff-arabic: 'Year of Handicrafts', 'Tajawal', 'Poppins', sans-serif;

  --fs-1: 24px;
  --fs-2: 18px;
  --fs-3: 17px;
  --fs-4: 16px;
  --fs-5: 15px;
  --fs-6: 14px;
  --fs-7: 13px;
  --fs-8: 11px;

  --fw-300: 300;
  --fw-400: 400;
  --fw-500: 500;
  --fw-600: 600;

  /**
   * shadow
   */

  --shadow-1: -4px 8px 24px hsla(0, 0%, 0%, 0.25);
  --shadow-2: 0 16px 30px hsla(0, 0%, 0%, 0.25);
  --shadow-3: 0 16px 40px hsla(0, 0%, 0%, 0.25);
  --shadow-4: 0 25px 50px hsla(0, 0%, 0%, 0.15);
  --shadow-5: 0 24px 80px hsla(0, 0%, 0%, 0.25);

  /**
   * transition
   */

  --transition-1: 0.25s ease;
  --transition-2: 0.5s ease-in-out;

}


/*-----------------------------------*\
  #FONTS — Poppins (self-hosted, Latin)
  Self-hosted from Google Fonts (OFL) so there are no external font origins.
  Latin + latin-ext subsets, weights 300/400/500/600. The Arabic webfont
  (Year of Handicrafts) lives in the #RTL section below.
\*-----------------------------------*/

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/poppins/poppins-300-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/poppins/poppins-300-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/poppins/poppins-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/poppins/poppins-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/poppins/poppins-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/poppins/poppins-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/poppins/poppins-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/poppins/poppins-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


/*-----------------------------------*\
  #RESET
\*-----------------------------------*/

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

a { text-decoration: none; }

li { list-style: none; }

img, .icon, a, button, time, span { display: block; }

/* inline SVG icons (self-hosted sprite) — drop-in for the old ion-icon web
   component: 1em square, inherits text color via currentColor. */
.icon {
  width: 1em;
  height: 1em;
  fill: currentColor;
  flex-shrink: 0;
}

button {
  font: inherit;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
}

input, textarea {
  display: block;
  width: 100%;
  background: none;
  font: inherit;
}

::selection {
  background: var(--accent);
  color: var(--smoky-black);
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

html { font-family: var(--ff-poppins); scroll-behavior: smooth; }

body { background: var(--smoky-black); }


/*-----------------------------------*\
  #REUSED STYLE
\*-----------------------------------*/

.sidebar,
article {
  background: var(--eerie-black-2);
  border: 1px solid var(--jet);
  border-radius: 20px;
  padding: 15px;
  box-shadow: var(--shadow-1);
  z-index: 1;
}

.separator {
  width: 100%;
  height: 1px;
  background: var(--jet);
  margin: 16px 0;
}

.icon-box {
  position: relative;
  background: var(--border-gradient-onyx);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  color: var(--accent);
  box-shadow: var(--shadow-1);
  z-index: 1;
}

.icon-box::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--eerie-black-1);
  border-radius: inherit;
  z-index: -1;
}

article { display: none; }

article.active {
  display: block;
  animation: fade 0.5s ease backwards;
}

@keyframes fade {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.h2, .h3, .h4, .h5 {
  color: var(--white-2);
  text-transform: capitalize;
}

.h2 { font-size: var(--fs-1); }
.h3 { font-size: var(--fs-2); }
.h4 { font-size: var(--fs-4); }
.h5 {
  font-size: var(--fs-7);
  font-weight: var(--fw-500);
}

/* preserve brand casing (iOS, Next.js, noiceanas.com, …) */
.service-item-title,
.timeline-item-title,
.project-title,
.skills-item .h5 { text-transform: none; }

.article-title {
  position: relative;
  padding-bottom: 7px;
}

.article-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 3px;
  background: var(--text-gradient-accent);
  border-radius: 3px;
}

/*-----------------------------------*\
  #MAIN
\*-----------------------------------*/

main {
  margin: 15px 12px;
  margin-bottom: 75px;
  min-width: 259px;
}


/*-----------------------------------*\
  #SIDEBAR
\*-----------------------------------*/

.sidebar {
  margin-bottom: 15px;
  max-height: 112px;
  overflow: hidden;
  transition: var(--transition-2);
}

.sidebar.active { max-height: 450px; }

.sidebar-info {
  position: relative;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 15px;
}

.avatar-box {
  background: var(--bg-gradient-onyx);
  border-radius: 20px;
}

.info-content .name {
  color: var(--white-2);
  font-size: var(--fs-3);
  font-weight: var(--fw-500);
  letter-spacing: -0.25px;
  margin-bottom: 10px;
}

.info-content .title {
  color: var(--white-1);
  background: var(--onyx);
  font-size: var(--fs-8);
  font-weight: var(--fw-300);
  width: max-content;
  padding: 3px 12px;
  border-radius: 8px;
}

.info_more-btn {
  position: absolute;
  top: -15px;
  right: -15px;
  border-radius: 0 15px;
  font-size: 13px;
  color: var(--accent);
  background: var(--border-gradient-onyx);
  padding: 10px;
  box-shadow: var(--shadow-2);
  transition: var(--transition-1);
  z-index: 1;
}

.info_more-btn::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: var(--bg-gradient-jet);
  transition: var(--transition-1);
  z-index: -1;
}

.info_more-btn:hover,
.info_more-btn:focus { background: var(--bg-gradient-accent-1); }

.info_more-btn:hover::before,
.info_more-btn:focus::before { background: var(--bg-gradient-accent-2); }

.info_more-btn span { display: none; }

.sidebar-info_more {
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-2);
}

.sidebar.active .sidebar-info_more {
  opacity: 1;
  visibility: visible;
}

.contacts-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.contact-item {
  min-width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}

.contact-info {
  max-width: calc(100% - 46px);
  width: calc(100% - 46px);
}

.contact-title {
  color: var(--light-gray-70);
  font-size: var(--fs-8);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.contact-info :is(.contact-link, time, address) {
  color: var(--white-2);
  font-size: var(--fs-7);
}

.contact-info .contact-link {
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-info address { font-style: normal; }

.social-list {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 15px;
  padding-bottom: 4px;
  padding-left: 7px;
}

.social-item .social-link {
  color: var(--light-gray-70);
  font-size: 18px;
}

.social-item .social-link:hover { color: var(--accent); }


/*-----------------------------------*\
  #NAVBAR
\*-----------------------------------*/

/* floating pill tab bar */
.navbar {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 430px;
  background: hsla(0, 0%, 96%, 0.82);
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  border: 1px solid hsla(170, 80%, 50%, 0.55);
  border-radius: 18px;
  box-shadow: 0 12px 34px hsla(0, 0%, 0%, 0.5),
              inset 0 1px 0 hsla(0, 0%, 100%, 0.9);
  z-index: 5;
}

.navbar-list {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 2px;
  padding: 6px;
}

.navbar-item { flex: 1 1 0; }

.navbar-link {
  color: hsl(240, 4%, 32%);
  font-size: var(--fs-8);
  font-weight: var(--fw-500);
  text-align: center;
  padding: 11px 6px;
  border-radius: 12px;
  transition: color var(--transition-1), background-color var(--transition-1),
              transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar-link:hover,
.navbar-link:focus {
  color: hsl(240, 6%, 12%);
  background-color: hsla(0, 0%, 0%, 0.05);
}

/* tactile press — physical push on tap */
.navbar-link:active { transform: scale(0.96); }

.navbar-link.active {
  color: var(--white-1);
  font-weight: var(--fw-600);
  /* darkened from hsl(178,48%,44%) so white label passes WCAG AA (2.9:1 → ~5:1) */
  background-color: hsl(178, 52%, 32%);
  box-shadow: 0 6px 16px -4px hsla(178, 52%, 26%, 0.55),
              inset 0 1px 0 hsla(0, 0%, 100%, 0.28);
}


/*-----------------------------------*\
  #ABOUT
\*-----------------------------------*/

.about .article-title { margin-bottom: 15px; }

.about-text {
  color: var(--light-gray);
  font-size: var(--fs-6);
  font-weight: var(--fw-400);
  line-height: 1.6;
}

.about-text p { margin-bottom: 15px; }

/* service */

.service { margin-bottom: 10px; }

.service-title { margin-bottom: 20px; }

.service-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.service-item {
  position: relative;
  background: var(--border-gradient-onyx);
  padding: 20px;
  border-radius: 14px;
  box-shadow: var(--shadow-2);
  z-index: 1;
}

.service-item::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--bg-gradient-jet);
  border-radius: inherit;
  z-index: -1;
}

.service-icon-box { margin-bottom: 10px; }

.service-icon-box img { margin: auto; }

.service-content-box { text-align: center; }

.service-item-title { margin-bottom: 7px; }

.service-item-text {
  color: var(--light-gray);
  font-size: var(--fs-6);
  font-weight: var(--fw-400);
  line-height: 1.6;
}


/*-----------------------------------*\
  #SKILLS
\*-----------------------------------*/

.skills-subtitle { margin-bottom: 20px; }

.skill-tiles-section { margin-bottom: 35px; }

.skill-tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.skill-tile {
  position: relative;
  background: var(--border-gradient-onyx);
  border-radius: 14px;
  box-shadow: var(--shadow-2);
  padding: 18px 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  z-index: 1;
  transition: transform var(--transition-1);
}

.skill-tile::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--bg-gradient-jet);
  border-radius: inherit;
  z-index: -1;
}

.skill-tile:hover { transform: translateY(-4px); }

.skill-tile-icon { width: 40px; height: 40px; }

.skill-tile .icon {
  font-size: 38px;
  color: var(--accent);
}

.skill-tile span {
  color: var(--light-gray);
  font-size: var(--fs-7);
  font-weight: var(--fw-400);
}

/* proficiency — grouped tiers that replaced the old self-rated % bars */

.proficiency-list {
  display: grid;
  gap: 24px;
}

.proficiency-label {
  color: var(--accent);
  font-size: var(--fs-7);
  font-weight: var(--fw-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.proficiency-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.proficiency-tags li {
  position: relative;
  color: var(--light-gray);
  font-size: var(--fs-7);
  font-weight: var(--fw-400);
  background: var(--border-gradient-onyx);
  border-radius: 10px;
  padding: 9px 14px;
  z-index: 1;
}

.proficiency-tags li::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--bg-gradient-jet);
  border-radius: inherit;
  z-index: -1;
}


/*-----------------------------------*\
  #RESUME
\*-----------------------------------*/

.cv-download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-size: var(--fs-6);
  font-weight: var(--fw-500);
  padding: 12px 20px;
  margin-bottom: 30px;
  border: 1px solid var(--jet);
  border-radius: 12px;
  background: var(--border-gradient-onyx);
  box-shadow: var(--shadow-2);
  transition: var(--transition-1);
}

.cv-download:hover { background: var(--bg-gradient-accent-1); }

.cv-download .icon { font-size: 18px; }

.timeline { margin-bottom: 30px; }

.timeline .title-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
}

.timeline-list {
  font-size: var(--fs-6);
  margin-left: 45px;
}

.timeline-item { position: relative; }

.timeline-item:not(:last-child) { margin-bottom: 20px; }

.timeline-item-title {
  font-size: var(--fs-6);
  line-height: 1.3;
  margin-bottom: 7px;
}

.timeline-list span {
  color: var(--accent-2);
  font-weight: var(--fw-400);
  line-height: 1.6;
}

.timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  top: -25px;
  left: -30px;
  width: 1px;
  height: calc(100% + 50px);
  background: var(--jet);
}

.timeline-item::after {
  content: "";
  position: absolute;
  top: 5px;
  left: -33px;
  height: 6px;
  width: 6px;
  background: var(--text-gradient-accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--jet);
}

.timeline-text {
  color: var(--light-gray);
  font-weight: var(--fw-400);
  line-height: 1.6;
}

/* "Open to opportunities" highlight on the freelance entry */
.timeline-list .open-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  padding: 4px 12px;
  font-size: var(--fs-8);
  font-weight: var(--fw-500);
  line-height: 1.4;
  color: var(--accent);
  background: hsla(170, 75%, 55%, 0.12);
  border: 1px solid hsla(170, 75%, 55%, 0.4);
  border-radius: 20px;
  box-shadow: 0 0 16px hsla(170, 75%, 55%, 0.28);
}

.open-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: open-badge-pulse 2s ease-out infinite;
}

@keyframes open-badge-pulse {
  0%   { box-shadow: 0 0 0 0 hsla(170, 75%, 55%, 0.6); }
  70%  { box-shadow: 0 0 0 7px hsla(170, 75%, 55%, 0); }
  100% { box-shadow: 0 0 0 0 hsla(170, 75%, 55%, 0); }
}

/* make the freelance timeline dot glow so the entry stands out */
.timeline-item--open::after {
  box-shadow: 0 0 0 4px var(--jet), 0 0 12px 2px hsla(170, 75%, 55%, 0.6);
}


/*-----------------------------------*\
  #PROJECTS
\*-----------------------------------*/

.filter-list { display: none; }

.filter-select-box {
  position: relative;
  margin-bottom: 25px;
}

.filter-select {
  background: var(--eerie-black-2);
  color: var(--light-gray);
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--jet);
  border-radius: 14px;
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
}

.filter-select.active .select-icon { transform: rotate(0.5turn); }

.select-list {
  background: var(--eerie-black-2);
  position: absolute;
  top: calc(100% + 6px);
  width: 100%;
  padding: 6px;
  border: 1px solid var(--jet);
  border-radius: 14px;
  z-index: 2;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: 0.15s ease-in-out;
}

.filter-select.active + .select-list {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.select-item button {
  background: var(--eerie-black-2);
  color: var(--light-gray);
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
  text-transform: capitalize;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
}

.select-item button:hover { --eerie-black-2: hsl(240, 2%, 20%); }

.project-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-bottom: 10px;
}

.project-item { display: none; }

.project-item.active {
  display: block;
  animation: scaleUp 0.25s ease forwards;
}

@keyframes scaleUp {
  0% { transform: scale(0.96); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.project-item > a { width: 100%; }

.project-img {
  position: relative;
  width: 100%;
  height: 200px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 15px;
}

.project-img::before {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  z-index: 1;
  transition: var(--transition-1);
}

.project-item > a:hover .project-img::before { background: hsla(0, 0%, 0%, 0.5); }

.project-item-icon-box {
  --scale: 0.8;
  background: var(--jet);
  color: var(--accent);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(var(--scale));
  font-size: 20px;
  padding: 18px;
  border-radius: 12px;
  opacity: 0;
  z-index: 1;
  transition: var(--transition-1);
}

.project-item > a:hover .project-item-icon-box {
  --scale: 1;
  opacity: 1;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-1);
}

.project-item > a:hover img { transform: scale(1.1); }

.project-title,
.project-category { margin-left: 10px; }

.project-title {
  color: var(--white-2);
  font-size: var(--fs-5);
  font-weight: var(--fw-400);
  /* brand casing preserved via the text-transform: none rule above (iOS, noiceanas.com, 4service.co) */
  line-height: 1.3;
}

.project-category {
  color: var(--light-gray-70);
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
}

.project-desc {
  color: var(--light-gray);
  font-size: var(--fs-7);
  font-weight: var(--fw-400);
  line-height: 1.6;
  margin: 8px 10px 0;
}

.project-links {
  display: flex;
  gap: 18px;
  margin: 12px 10px 0;
}

.project-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: var(--fs-7);
  font-weight: var(--fw-400);
  transition: var(--transition-1);
}

.project-links a:hover { color: var(--accent-2); }

.project-links .icon { font-size: 16px; }

.project-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--light-gray-70);
  font-size: var(--fs-7);
  font-weight: var(--fw-300);
  font-style: italic;
}


/*-----------------------------------*\
  #PROJECT DETAIL
\*-----------------------------------*/

.pd-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--accent);
  font-size: var(--fs-7);
  font-weight: var(--fw-400);
  margin-bottom: 18px;
  transition: color var(--transition-1), transform var(--transition-1);
}

.pd-back:hover { color: var(--accent-2); }
.pd-back:hover .icon { transform: translateX(-3px); }
.pd-back .icon { font-size: 16px; transition: transform var(--transition-1); }

.pd-hero {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--jet);
  box-shadow: var(--shadow-2);
  background: var(--eerie-black-1);
}

.pd-hero img {
  display: block;
  width: 100%;
  height: auto;
}

.pd-title {
  font-size: var(--fs-1);
  outline: none;
}

/* brand casing preserved (My Karage, noiceanas.com, 4service.co) */
.pd-title { text-transform: none; }

.pd-tagline {
  color: var(--light-gray-70);
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
  margin: 6px 0 18px;
}

.pd-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin-bottom: 20px;
}

.pd-chip {
  position: relative;
  color: var(--light-gray);
  font-size: var(--fs-8);
  font-weight: var(--fw-400);
  background: var(--border-gradient-onyx);
  border-radius: 8px;
  padding: 6px 11px;
  z-index: 1;
}

.pd-chip::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--eerie-black-1);
  border-radius: inherit;
  z-index: -1;
}

.pd-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 6px;
}

.pd-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: var(--fs-7);
  font-weight: var(--fw-400);
  transition: color var(--transition-1);
}

.pd-links a:hover { color: var(--accent-2); }
.pd-links .icon { font-size: 16px; }

.pd-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--light-gray-70);
  font-size: var(--fs-7);
  font-weight: var(--fw-300);
  font-style: italic;
}

.pd-section { margin-top: 26px; }

.pd-section-title {
  position: relative;
  padding-bottom: 7px;
  margin-bottom: 12px;
}

.pd-section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 24px;
  height: 3px;
  background: var(--text-gradient-accent);
  border-radius: 3px;
}

.pd-section p {
  color: var(--light-gray);
  font-size: var(--fs-7);
  font-weight: var(--fw-400);
  line-height: 1.7;
}

.pd-feature-list {
  list-style: none;
  display: grid;
  gap: 11px;
}

.pd-feature-list li {
  position: relative;
  padding-left: 22px;
  color: var(--light-gray);
  font-size: var(--fs-7);
  font-weight: var(--fw-400);
  line-height: 1.6;
}

.pd-feature-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-gradient-accent);
}

/* horizontal, snap-scrolling gallery of phone/app screenshots */
.pd-gallery {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.pd-gallery figure {
  flex: 0 0 auto;
  width: 190px;
  scroll-snap-align: start;
}

.pd-gallery img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--jet);
  background: var(--eerie-black-1);
}

.pd-gallery figcaption {
  margin-top: 9px;
  text-align: center;
  color: var(--light-gray-70);
  font-size: var(--fs-8);
  font-weight: var(--fw-300);
}

/* wide, landscape screenshots (dashboards / websites) */
.pd-gallery.pd-gallery-wide figure { width: 280px; }


/*-----------------------------------*\
  #RESPONSIVE
\*-----------------------------------*/

/* larger than 450px */
@media (min-width: 450px) {
  .project-img { height: auto; }
}

/* larger than 580px */
@media (min-width: 580px) {

  :root {
    --fs-1: 32px;
    --fs-2: 24px;
    --fs-3: 26px;
    --fs-4: 18px;
    --fs-6: 15px;
    --fs-7: 15px;
    --fs-8: 12px;
  }

  .sidebar, article {
    width: 520px;
    margin-inline: auto;
    padding: 30px;
  }

  .article-title {
    font-weight: var(--fw-600);
    padding-bottom: 15px;
  }

  .article-title::after {
    width: 40px;
    height: 5px;
  }

  .icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    font-size: 18px;
  }

  main {
    margin-top: 60px;
    margin-bottom: 100px;
  }

  .sidebar {
    max-height: 180px;
    margin-bottom: 30px;
  }

  .sidebar.active { max-height: 620px; }

  .sidebar-info { gap: 25px; }

  .avatar-box { border-radius: 30px; }

  .avatar-box img { width: 120px; }

  .info-content .name { margin-bottom: 15px; }

  .info-content .title { padding: 5px 18px; }

  .info_more-btn {
    top: -30px;
    right: -30px;
    padding: 10px 15px;
  }

  .info_more-btn span {
    display: block;
    font-size: var(--fs-8);
  }

  .info_more-btn .icon { display: none; }

  .separator { margin: 32px 0; }

  .contacts-list { gap: 20px; }

  .contact-info {
    max-width: calc(100% - 64px);
    width: calc(100% - 64px);
  }

  .navbar {
    max-width: 460px;
    border-radius: 20px;
  }

  .navbar-link { --fs-8: 14px; }

  .about .article-title { margin-bottom: 20px; }

  .about-text { margin-bottom: 40px; }

  .service-item {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 18px;
    padding: 30px;
  }

  .service-icon-box {
    margin-bottom: 0;
    margin-top: 5px;
  }

  .service-content-box { text-align: left; }

  .skill-tiles { grid-template-columns: repeat(3, 1fr); }

  .timeline-list { margin-left: 65px; }

  .timeline-item:not(:last-child)::before { left: -40px; }

  .timeline-item::after {
    height: 8px;
    width: 8px;
    left: -43px;
  }

  .project-img { border-radius: 16px; }

}

/* larger than 768px */
@media (min-width: 768px) {

  .sidebar, article { width: 700px; }

  .contacts-list {
    grid-template-columns: 1fr 1fr;
    gap: 30px 15px;
  }

  .navbar-link { --fs-8: 15px; }

  .skill-tiles { grid-template-columns: repeat(4, 1fr); }

  .article-title { padding-bottom: 20px; }

  .filter-select-box { display: none; }

  .filter-list {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 25px;
    padding-left: 5px;
    margin-bottom: 30px;
  }

  .filter-item button {
    color: var(--light-gray);
    font-size: var(--fs-5);
    transition: var(--transition-1);
  }

  .filter-item button:hover { color: var(--light-gray-70); }

  .filter-item button.active { color: var(--accent); }

  .project-list { grid-template-columns: 1fr 1fr; }

}

/* larger than 1024px */
@media (min-width: 1024px) {

  :root {
    --shadow-1: -4px 8px 24px hsla(0, 0%, 0%, 0.125);
    --shadow-2: 0 16px 30px hsla(0, 0%, 0%, 0.125);
    --shadow-3: 0 16px 40px hsla(0, 0%, 0%, 0.125);
  }

  .sidebar, article {
    width: 950px;
    box-shadow: var(--shadow-5);
  }

  main { margin-bottom: 60px; }

  .main-content {
    position: relative;
    width: max-content;
    margin: auto;
  }

  .navbar {
    position: absolute;
    bottom: auto;
    top: 18px;
    left: auto;
    right: 18px;
    transform: none;
    width: max-content;
    max-width: none;
    border-radius: 16px;
    padding: 6px;
  }

  .navbar-list {
    gap: 4px;
    padding: 0;
  }

  .navbar-item { flex: 0 0 auto; }

  .navbar-link {
    font-weight: var(--fw-500);
    padding: 10px 16px;
  }

  .service-list {
    grid-template-columns: 1fr 1fr;
    gap: 20px 25px;
  }

  .project-list { grid-template-columns: repeat(3, 1fr); }

}

/* larger than 1250px */
@media (min-width: 1250px) {

  body::-webkit-scrollbar { width: 12px; }

  body::-webkit-scrollbar-track { background: var(--smoky-black); }

  body::-webkit-scrollbar-thumb {
    border: 3px solid var(--smoky-black);
    background: hsla(0, 0%, 100%, 0.1);
    border-radius: 20px;
    box-shadow: inset 1px 1px 0 hsla(0, 0%, 100%, 0.11),
                inset -1px -1px 0 hsla(0, 0%, 100%, 0.11);
  }

  body::-webkit-scrollbar-thumb:hover { background: hsla(0, 0%, 100%, 0.15); }

  .sidebar, article { width: auto; }

  article { min-height: 100%; }

  main {
    max-width: 1200px;
    margin-inline: auto;
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 25px;
  }

  .main-content {
    min-width: 75%;
    width: 75%;
    margin: 0;
  }

  .sidebar {
    position: sticky;
    top: 60px;
    max-height: max-content;
    height: 100%;
    margin-bottom: 0;
    padding-top: 60px;
    z-index: 1;
  }

  .sidebar-info { flex-direction: column; }

  .avatar-box img { width: 150px; }

  .info-content .name {
    white-space: nowrap;
    text-align: center;
  }

  .info-content .title { margin: auto; }

  .info_more-btn { display: none; }

  .sidebar-info_more {
    opacity: 1;
    visibility: visible;
  }

  .contacts-list { grid-template-columns: 1fr; }

  .contact-info :is(.contact-link) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .contact-info :is(.contact-link, time, address) {
    --fs-7: 14px;
    font-weight: var(--fw-300);
  }

  .separator:last-of-type {
    margin: 15px 0;
    opacity: 0;
  }

  .social-list { justify-content: center; }

  .timeline-text { max-width: 700px; }

}


/*-----------------------------------*\
  #ANIMATIONS
\*-----------------------------------*/

/* page load entrance — opacity only, so these containers never become a
   containing block that would break the fixed navbar / sticky sidebar */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.sidebar { animation: fadeIn 0.5s ease both; }
.main-content { animation: fadeIn 0.5s ease 0.08s both; }

/* scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease var(--reveal-delay, 0ms),
              transform 0.6s ease var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* hover micro-interactions */
.service-item { transition: transform var(--transition-1), box-shadow var(--transition-1); }
.service-item:hover { transform: translateY(-4px); }

.project-item > a { display: block; transition: transform var(--transition-1); }
.project-item.active:hover > a { transform: translateY(-4px); }
.project-item > a:hover .project-img { box-shadow: 0 16px 34px hsla(0, 0%, 0%, 0.45); }

.cv-download { transition: background var(--transition-1), transform var(--transition-1); }
.cv-download:hover { transform: translateY(-2px); }

.social-item .social-link { transition: color var(--transition-1), transform var(--transition-1); }
.social-item .social-link:hover { transform: translateY(-2px) scale(1.08); }

/* language toggle — badge on the avatar */
.avatar-box { position: relative; }

.lang-toggle {
  position: absolute;
  top: -10px;
  inset-inline-start: -10px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-size: var(--fs-8);
  font-weight: var(--fw-500);
  color: var(--accent);
  background: var(--eerie-black-1);
  border: 1px solid var(--jet);
  border-radius: 20px;
  box-shadow: var(--shadow-2);
  z-index: 3;
  transition: transform var(--transition-1), background var(--transition-1);
}

.lang-toggle:hover { background: var(--onyx); transform: translateY(-1px); }
.lang-toggle .icon { font-size: 14px; }
.lang-toggle span { letter-spacing: 0.5px; }

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}


/*-----------------------------------*\
  #RTL / ARABIC
\*-----------------------------------*/

/* Ministry of Culture "Year of Handicrafts" — self-hosted webfont (Arabic) */
@font-face {
  font-family: 'Year of Handicrafts';
  src: url('../fonts/year-of-handicrafts/YearofHandicrafts-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Year of Handicrafts';
  src: url('../fonts/year-of-handicrafts/YearofHandicrafts-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Year of Handicrafts';
  src: url('../fonts/year-of-handicrafts/YearofHandicrafts-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Year of Handicrafts';
  src: url('../fonts/year-of-handicrafts/YearofHandicrafts-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

html[lang="ar"] { font-family: var(--ff-arabic); }

[dir="rtl"] button { text-align: right; }

[dir="rtl"] .article-title::after { left: auto; right: 0; }

[dir="rtl"] .social-list { padding-left: 0; padding-right: 7px; }

[dir="rtl"] .project-title,
[dir="rtl"] .project-category { margin-left: 0; margin-right: 10px; }

/* project detail mirrors */
[dir="rtl"] .pd-section-title::after { left: auto; right: 0; }
[dir="rtl"] .pd-back .icon { transform: scaleX(-1); }
[dir="rtl"] .pd-back:hover .icon { transform: scaleX(-1) translateX(-3px); }
[dir="rtl"] .pd-feature-list li { padding-left: 0; padding-right: 22px; }
[dir="rtl"] .pd-feature-list li::before { left: auto; right: 2px; }

/* timeline mirrors to the right side */
[dir="rtl"] .timeline-list { margin-left: 0; margin-right: 45px; }
[dir="rtl"] .timeline-item:not(:last-child)::before { left: auto; right: -30px; }
[dir="rtl"] .timeline-item::after { left: auto; right: -33px; }

/* mobile "show contacts" button flips to the other corner */
[dir="rtl"] .info_more-btn {
  right: auto;
  left: -15px;
  border-radius: 15px 0;
}

@media (min-width: 580px) {
  [dir="rtl"] .timeline-list { margin-right: 65px; }
  [dir="rtl"] .timeline-item:not(:last-child)::before { right: -40px; }
  [dir="rtl"] .timeline-item::after { right: -43px; }
  [dir="rtl"] .info_more-btn { right: auto; left: -30px; }
}

@media (min-width: 768px) {
  [dir="rtl"] .filter-list { padding-left: 0; padding-right: 5px; }
}

@media (min-width: 1024px) {
  [dir="rtl"] .navbar { right: auto; left: 18px; }
}


/*-----------------------------------*\
  #CONTACT INFO CARDS
\*-----------------------------------*/

.contact-intro {
  color: var(--light-gray);
  font-size: var(--fs-6);
  font-weight: var(--fw-400);
  line-height: 1.6;
  margin-bottom: 25px;
}

/* save contact (vCard download + QR) */
.save-contact {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  background: var(--border-gradient-onyx);
  padding: 20px;
  border-radius: 14px;
  box-shadow: var(--shadow-2);
  margin-bottom: 25px;
  z-index: 1;
}

.save-contact::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--bg-gradient-jet);
  border-radius: inherit;
  z-index: -1;
}

.save-contact-body { flex: 1 1 220px; }

.save-contact-title {
  color: var(--white-2);
  font-size: var(--fs-5);
  font-weight: var(--fw-500);
  margin-bottom: 6px;
}

.save-contact-hint {
  color: var(--light-gray-70);
  font-size: var(--fs-7);
  font-weight: var(--fw-400);
  line-height: 1.6;
  margin-bottom: 16px;
}

.save-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid hsla(170, 75%, 55%, 0.4);
  background: hsla(170, 60%, 45%, 0.09);
  color: var(--accent);
  font-size: var(--fs-6);
  font-weight: var(--fw-500);
  transition: background var(--transition-1), border-color var(--transition-1), transform var(--transition-1);
}

.save-contact-btn .icon {
  font-size: 18px;
}

.save-contact-btn:hover {
  background: hsla(170, 60%, 45%, 0.16);
  border-color: hsla(170, 75%, 55%, 0.65);
  transform: translateY(-2px);
}

.save-contact-qr {
  flex-shrink: 0;
  padding: 10px;
  background: #ffffff;
  border-radius: 12px;
  line-height: 0;
}

.save-contact-qr img { display: block; width: 130px; height: 130px; }

@media (min-width: 580px) {
  .save-contact-qr img { width: 150px; height: 150px; }
}

.contact-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  margin-bottom: 10px;
}

.contact-card > a,
.contact-card-plain {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--border-gradient-onyx);
  padding: 18px;
  border-radius: 14px;
  box-shadow: var(--shadow-2);
  z-index: 1;
  transition: transform var(--transition-1);
}

.contact-card > a::before,
.contact-card-plain::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--bg-gradient-jet);
  border-radius: inherit;
  z-index: -1;
}

.contact-card > a:hover { transform: translateY(-4px); }

.contact-card .icon-box { flex-shrink: 0; }

.contact-card-text { min-width: 0; }

.contact-card-label {
  color: var(--light-gray-70);
  font-size: var(--fs-8);
  text-transform: uppercase;
  margin-bottom: 3px;
}

.contact-card-value {
  color: var(--white-2);
  font-size: var(--fs-7);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[dir="rtl"] .contact-card-value { text-align: right; }

@media (min-width: 580px) {
  .contact-cards { grid-template-columns: 1fr 1fr; }
}

/* static (non-link) project card — e.g. private dashboard */
.project-static { display: block; width: 100%; }
