/* ======================================================================
   Portfolio – layer for experiences, studies, lang switcher, RTL, responsive,
   modern cursor, and global button styles.
   Loaded AFTER main.css so it can safely override.
   ====================================================================== */

/* ============================ BORDER RADIUS SCALE ============================ */
:root {
  --radius-xs: 5px; /* chips, tags, small controls */
  --radius-sm: 6px; /* buttons, filters, inputs */
  --radius-md: 8px; /* cards, panels, media */
  --radius-lg: 10px; /* large cards, modals, previews */
  --study-img-filter: grayscale(100%) sepia(28%) contrast(1.12) brightness(0.76);
  --study-img-filter-hover: grayscale(100%) sepia(34%) contrast(1.16) brightness(0.84);
}
body.light-mode {
  --study-img-filter: grayscale(100%) sepia(22%) contrast(1.08) brightness(0.86);
  --study-img-filter-hover: grayscale(100%) sepia(28%) contrast(1.12) brightness(0.9);
}

button,
input,
textarea,
select,
.btn {
  font-family: inherit;
}

/* ============================ INTRO / LOADING SPLASH ============================ */
#intro-splash {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  background: #0c0c0c;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* Always dark – intro looks intentional regardless of theme */
  color: #fff;
  transition:
    opacity 0.6s ease,
    visibility 0.6s ease;
}
#intro-splash.is-hiding {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
#intro-splash * {
  box-sizing: border-box;
}
.intro-splash__box {
  position: relative;
  width: 280px;
  display: flex;
  flex-direction: column;
  transform: scale(1.4);
}
.intro-splash__title {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 50px;
}
.intro-splash__title h1 {
  position: relative;
  font:
    800 32px/1 "Poppins",
    var(--font-primary);
  color: #fff;
  margin: 0;
  display: inline-flex;
  align-items: baseline;
  max-width: 100%;
  opacity: 0;
  animation: introMainFadeIn 2s forwards;
  animation-delay: 1.6s;
}
.intro-splash__dot {
  position: relative;
  top: 0.08em;
  flex-shrink: 0;
  margin-inline-start: 0.12em;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: #0f33ff;
  opacity: 0;
  transform: translateY(0);
  transform-origin: center bottom;
  animation: introPopIn 0.8s cubic-bezier(0.74, 0.06, 0.4, 0.92) forwards;
  animation-delay: 2s;
}
.intro-splash__role {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 30px;
  margin-top: -10px;
}
.intro-splash__role p {
  margin: 0;
  font:
    400 10px/1 "Lato",
    var(--font-primary);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0;
  animation: introSecFadeIn 2s forwards;
  animation-delay: 3.2s;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45em;
  white-space: nowrap;
}
.intro-splash__role .role__word {
  display: inline-block;
  white-space: nowrap;
}
.intro-splash__block {
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: inherit;
  background: #0f33ff;
  animation: introMainBlock 2s cubic-bezier(0.74, 0.06, 0.4, 0.92) forwards;
}
.intro-splash__block--white {
  background: #ffffff;
  animation: introSecBlock 2s cubic-bezier(0.74, 0.06, 0.4, 0.92) forwards;
  animation-delay: 2s;
}
.intro-splash__skip {
  position: absolute;
  bottom: 30px;
  right: 30px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.7);
  font: 700 10px/1 var(--font-primary);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 10px 16px;
  cursor: none;
  border-radius: var(--radius-sm);
  opacity: 0;
  animation: introSecFadeIn 0.6s forwards;
  animation-delay: 1.5s;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}
.intro-splash__skip:hover {
  background: #0f33ff;
  border-color: #0f33ff;
  color: #fff;
}
.intro-splash__skip:focus {
  outline: none;
}
@media (max-width: 600px) {
  .intro-splash__box {
    transform: scale(1);
    width: 260px;
  }
  .intro-splash__title h1 {
    font-size: 26px;
  }
  .intro-splash__skip {
    bottom: 20px;
    right: 20px;
  }
}
/* Hide modern cursor while splash is up (we want a clean intro) */
#intro-splash ~ #cursor-ring,
#intro-splash ~ #circularcursor {
  opacity: 0;
}

@keyframes introMainBlock {
  0% {
    width: 0%;
    left: 0;
  }
  50% {
    width: 100%;
    left: 0;
  }
  100% {
    width: 0;
    left: 100%;
  }
}
@keyframes introSecBlock {
  0% {
    width: 0%;
    left: 0;
  }
  50% {
    width: 100%;
    left: 0;
  }
  100% {
    width: 0;
    left: 100%;
  }
}
@keyframes introMainFadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@keyframes introPopIn {
  0% {
    width: 0;
    height: 0;
    opacity: 0;
    transform: translateY(0);
  }
  50% {
    width: 10px;
    height: 10px;
    opacity: 1;
    transform: translateY(-32px);
  }
  65% {
    width: 15px;
    height: 7px;
    transform: translateY(13px);
  }
  80% {
    width: 10px;
    height: 10px;
    transform: translateY(-7px);
  }
  100% {
    width: 7px;
    height: 7px;
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes introSecFadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 0.7;
  }
}

/* ---------- Global laptop scale-up ---------- */
.l-wrapper {
  width: 1600px;
  max-width: 94%;
}
@media (min-width: 1180px) and (max-width: 1599px) {
  .l-wrapper {
    max-width: 96%;
  }
}
@media (min-width: 1600px) {
  .l-wrapper {
    max-width: 90%;
  }
}

/* ---------- Site footer ---------- */
.site-footer {
  position: absolute;
  left: 108px;
  right: 0;
  bottom: 14px;
  z-index: 20;
  display: flex;
  justify-content: center;
  padding: 0 28px;
  pointer-events: none;
}

.site-footer__text {
  margin: 0;
  max-width: 42rem;
  font: 500 11px/1.5 var(--font-primary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text-color) 42%, transparent);
  text-align: center;
  white-space: nowrap;
}

.site-footer__text::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  margin-right: 12px;
  vertical-align: middle;
  background: color-mix(in srgb, var(--blue-color) 55%, transparent);
  opacity: 0.85;
}

html[dir="rtl"] .site-footer__text::before {
  margin-right: 0;
  margin-left: 12px;
}

@media (max-width: 1180px) {
  .site-footer {
    left: 0;
    bottom: 12px;
    padding: 0 20px;
  }

  .site-footer__text {
    font-size: 10px;
    letter-spacing: 0.04em;
    white-space: normal;
  }
}

#WorldCloud {
  width: 520px;
  max-width: 100%;
  min-height: 460px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.skills--options > .skills-item:nth-child(2) {
  width: 520px;
  max-width: 100%;
  flex: 0 1 auto;
  align-self: center;
}

.skills--options > .skills-item:nth-child(2) svg {
  max-width: 100%;
  height: auto;
}

/* Scale home up on bigger screens */
@media (min-width: 1180px) {
  .intro {
    width: 1100px;
    max-width: 95%;
  }
}
@media (min-width: 1600px) {
  .intro {
    width: 1240px;
    max-width: 92%;
  }
  .intro--banner h2 {
    font-size: 78px;
  }
}
@media (min-width: 1180px) {
  .contact--lockup {
    max-width: 92%;
  }
}

/* ============================ MARGIN BETWEEN SIDE NAV AND CONTENT ============================ */
@media (min-width: 1180px) {
  .l-side-nav {
    left: 0;
  }
  .l-main-content {
    padding-left: 100px;
    box-sizing: border-box;
  }
}
html[dir="rtl"] .l-side-nav {
  left: auto;
  right: 0;
}
@media (min-width: 1180px) {
  html[dir="rtl"] .l-main-content {
    padding-left: 0;
    padding-right: 100px;
  }
}

/* ============================ MODERN CURSOR ============================ */
/* Hide native cursor on devices that have a fine pointer */
@media (pointer: fine) {
  html,
  body,
  a,
  button,
  input,
  .lang-btn,
  .exp-card,
  .study-item,
  .project-card,
  .projects-filter,
  .music-player__mute,
  .music-player__toggle,
  .music-player__item,
  .projects__track,
  .display--mode,
  .header__tool,
  .header--nav-toggle,
  .cta,
  .header--logo {
    cursor: none !important;
  }
}

/* Outer ring – uses blend mode so it inverts color on hover for that
   modern "color change on hovered part" effect. */
#cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  border: 1.5px solid #ffffff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2147483647;
  mix-blend-mode: difference;
  transition:
    width 0.25s ease,
    height 0.25s ease,
    background-color 0.25s ease,
    border-width 0.25s ease,
    opacity 0.25s ease;
  will-change: transform;
  background: transparent;
}

/* Inner dot – instant follow, accent color, also blend mode for color shift */
#circularcursor {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue-color) !important;
  background-image: none !important;
  background-color: var(--blue-color) !important;
  pointer-events: none;
  z-index: 2147483647;
  mix-blend-mode: difference;
  transition:
    width 0.25s ease,
    height 0.25s ease,
    opacity 0.2s ease;
  will-change: transform;
}

/* When hovering interactive: ring grows + inverts colors beneath (difference blend) */
body.cursor-over #cursor-ring {
  width: 64px;
  height: 64px;
  border-width: 0;
  background: #ffffff;
  mix-blend-mode: difference;
  margin: -12px 0 0 -12px;
}
body.cursor-over #circularcursor {
  width: 0;
  height: 0;
  mix-blend-mode: difference;
}

/* Touch / coarse pointer: hide both */
@media (pointer: coarse), (max-width: 900px) {
  #cursor-ring,
  #circularcursor {
    display: none !important;
  }
  html,
  body,
  a,
  button,
  input {
    cursor: auto !important;
  }
}

/* ============================ UNIVERSAL BUTTON STYLE ============================ */
/* Mimics the original "Explore" button: transparent, blue bg slides in on hover. */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px 8px 14px;
  font: 700 11px/1 var(--font-primary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-color);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: none;
  z-index: 1;
  transition: color 0.2s ease;
}
.btn .btn-background {
  position: absolute;
  top: 0;
  left: 23px;
  right: 0;
  bottom: 0;
  background-color: var(--blue-color);
  z-index: -1;
  border-radius: var(--radius-sm);
  transition:
    left 0.2s ease-in-out,
    right 0.2s ease-in-out;
}
.btn:hover .btn-background {
  left: 0;
}
.btn:hover {
  color: #ffffff;
}
.btn:focus {
  outline: none;
}
.btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  stroke: currentColor;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.btn--icon {
  padding: 12px;
}
.btn--icon svg {
  width: 18px;
  height: 18px;
}
/* RTL: bg slides in from the left side */
html[dir="rtl"] .btn .btn-background {
  left: 0;
  right: 23px;
}
html[dir="rtl"] .btn:hover .btn-background {
  right: 0;
}

/* ============================ HEADER LAYOUT ============================ */
.header {
  padding: 0 clamp(14px, 2.5vw, 32px);
  box-sizing: border-box;
}

.header--logo {
  flex-shrink: 0;
  height: 40px;
  align-items: center;
}

.header--right {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  align-content: center;
  gap: 10px;
  height: 100%;
  flex-shrink: 0;
}

.header__tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  min-height: 40px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.header__actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 40px;
  margin-left: 4px;
  padding-left: 10px;
  border-left: 1px solid rgba(127, 127, 127, 0.28);
}
html[dir="rtl"] .header__actions {
  margin-left: 0;
  padding-left: 0;
  border-left: none;
  margin-right: 4px;
  padding-right: 10px;
  border-right: 1px solid rgba(127, 127, 127, 0.28);
}

.header--right .display--mode {
  width: 48px;
  min-width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: none;
  border-radius: var(--radius-sm);
  position: relative;
  z-index: 3;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.header--right .display--mode:hover {
  background: rgba(127, 127, 127, 0.12);
}

.header--right .header--nav-toggle {
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
}

.header--right .header__fullscreen {
  width: 48px;
  min-width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  position: relative;
  z-index: 3;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.header--right .header__fullscreen:hover {
  background: rgba(127, 127, 127, 0.12);
}
.header__fullscreen-icon {
  width: 18px;
  height: 18px;
  pointer-events: none;
  display: block;
}
.header__fullscreen .header__fullscreen-icon--exit {
  display: none;
}
.header__fullscreen[aria-pressed="true"] .header__fullscreen-icon--enter {
  display: none;
}
.header__fullscreen[aria-pressed="true"] .header__fullscreen-icon--exit {
  display: block;
}

.header--right #icon {
  width: 22px;
  height: 22px;
  padding: 0;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.header--right .btn--icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ============================ LANGUAGE SWITCHER ============================ */
.lang-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: 1px solid var(--text-color);
  padding: 3px;
  height: 40px;
  overflow: hidden;
  direction: ltr;
  margin-right: 0;
  border-radius: var(--radius-sm);
  z-index: 5;
  pointer-events: auto;
}
.lang-switcher .lang-btn {
  position: relative;
  z-index: 2;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-color);
  font: 700 11px/1 var(--font-primary);
  letter-spacing: 0.08em;
  padding: 0 10px;
  min-width: 36px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  transition: color 0.25s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  pointer-events: auto;
}
.lang-switcher .lang-btn.is-active {
  color: #fff;
}
.lang-switcher .lang-indicator {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(33.333% - 2px);
  background: var(--blue-color);
  transition: transform 0.35s cubic-bezier(0.74, 0.06, 0.4, 0.92);
  z-index: 1;
  pointer-events: none;
  border-radius: calc(var(--radius-sm) - 2px);
}
.lang-switcher[data-lang="fr"] .lang-indicator {
  transform: translateX(100%);
}
.lang-switcher[data-lang="ar"] .lang-indicator {
  transform: translateX(200%);
}

/* ============================ MUSIC PLAYER ============================ */
.music-player {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  height: 40px;
}

.music-player__mute {
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  justify-content: center;
}
.music-player__mute svg {
  width: 16px;
  height: 16px;
  position: relative;
  z-index: 2;
}
.music-player__icon--off {
  display: none;
}
.music-player.is-muted .music-player__icon--on {
  display: none;
}
.music-player.is-muted .music-player__icon--off {
  display: block;
}

.music-player__picker {
  position: relative;
  height: 40px;
  display: flex;
  align-items: center;
}

.music-player__toggle {
  max-width: 140px;
  height: 40px;
  padding: 0 12px;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  gap: 6px;
  display: inline-flex;
  align-items: center;
}
.music-player__toggle svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  transition: transform 0.25s ease;
}
.music-player.is-open .music-player__toggle svg {
  transform: rotate(180deg);
}

.music-player__label {
  position: relative;
  z-index: 2;
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-player__list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: var(--background-color);
  border: 1px solid var(--text-color);
  z-index: 200;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-md);
  overflow: hidden;
}
body.light-mode .music-player__list {
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.08);
}

.music-player__item {
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  cursor: none;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}
.music-player__item:hover,
.music-player__item.is-active {
  background: var(--blue-color);
  color: #fff;
}

html[dir="rtl"] .music-player__list {
  right: auto;
  left: 0;
}

/* ============================ SECTION PARALLAX DECOR ============================ */
.intro--banner::before,
.intro--banner::after,
.skills--options::before,
.skills--options::after {
  display: none !important;
}

.section-decor {
  position: absolute;
  inset: -4px -22px;
  pointer-events: none;
  overflow: visible;
  z-index: 0;
}

.section-title-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
}

.section-title-wrap--center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 100%;
}

.section-title-wrap__heading {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
}

.section-title-wrap__heading .section-decor {
  inset: -2px -12px;
}

.section-title-wrap--home {
  display: inline-block;
  max-width: 100%;
}

.section-title-wrap--home .section-decor {
  inset: -2px -18px -2px -10px;
}

.section-title-wrap--skills-mobile {
  display: none;
}

.section-title-wrap--skills-mobile .skills__mobile-title {
  width: auto;
  padding: 0;
}

@media (max-width: 1180px) {
  .section-title-wrap--skills-desktop {
    display: none;
  }
  .section-title-wrap--skills-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

.section-decor__item {
  --px: 0px;
  --py: 0px;
  position: absolute;
  display: block;
  opacity: 0;
  will-change: transform;
  transition: opacity 0.45s ease;
  transform: translate3d(var(--px), var(--py), 0);
}

.section--is-active .section-decor__item {
  opacity: 0.88;
}

.section-decor__item--triangle {
  width: 14px;
  height: 14px;
  border: 3px solid var(--blue-color);
  border-right-color: transparent;
  border-bottom-color: transparent;
  transform: translate3d(var(--px), var(--py), 0) rotate(-25deg);
}

.section-decor__item--dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-color);
}

.section-decor__item--ring {
  width: 13px;
  height: 13px;
  border: 2px solid var(--blue-color);
  border-radius: 50%;
  background: transparent;
}

.section-decor__item--diamond {
  width: 7px;
  height: 7px;
  background: var(--blue-color);
  transform: translate3d(var(--px), var(--py), 0) rotate(45deg);
}

.section-decor__item--dash {
  width: 20px;
  height: 2px;
  border-radius: 1px;
  background: var(--blue-color);
  transform: translate3d(var(--px), var(--py), 0) rotate(-12deg);
}

.section-decor__item--frame {
  width: 14px;
  height: 14px;
  border: 2px solid var(--blue-color);
  border-radius: 4px;
  background: transparent;
}

.section-decor__item--plus {
  width: 11px;
  height: 11px;
}

.section-decor__item--plus::before,
.section-decor__item--plus::after {
  content: "";
  position: absolute;
  background: var(--blue-color);
  border-radius: 1px;
}

.section-decor__item--plus::before {
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  transform: translateY(-50%);
}

.section-decor__item--plus::after {
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  transform: translateX(-50%);
}

.section-decor__item--arc {
  width: 12px;
  height: 12px;
  border: 2px solid var(--blue-color);
  border-top-color: transparent;
  border-inline-end-color: transparent;
  border-radius: 50%;
  background: transparent;
  transform: translate3d(var(--px), var(--py), 0) rotate(-45deg);
}

.section-decor__item--tick {
  width: 8px;
  height: 8px;
  border-inline-start: 2px solid var(--blue-color);
  border-bottom: 2px solid var(--blue-color);
  background: transparent;
  transform: translate3d(var(--px), var(--py), 0) rotate(-8deg);
}

/* Home — hug the name line */
.section-decor--home .section-decor__item--triangle {
  top: 4px;
  inset-inline-end: -2px;
}
.section-decor--home .section-decor__item--dot {
  bottom: 6px;
  inset-inline-start: -6px;
}
.section-decor--home .section-decor__item--ring {
  top: -2px;
  inset-inline-start: 38%;
}

/* Experiences — tight to heading box */
.section-decor--experiences .section-decor__item--plus {
  top: -30px;
  inset-inline-start: -3px;
}
.section-decor--experiences .section-decor__item--dash {
  top: 0;
  margin-top: -1px;
  inset-inline-end: -3px;
}
.section-decor--experiences .section-decor__item--diamond {
  bottom: -40px;
  inset-inline-end: -3px;
}

/* Skills */
.section-decor--skills .section-decor__item--ring {
  top: 0;
  inset-inline-start: -8px;
}
.section-decor--skills .section-decor__item--triangle {
  bottom: 2px;
  inset-inline-end: -4px;
  transform: translate3d(var(--px), var(--py), 0) rotate(35deg);
}
.section-decor--skills .section-decor__item--dot {
  top: 50%;
  margin-top: -3px;
  inset-inline-end: -10px;
}
.section-decor--skills .section-decor__item--frame {
  top: -3px;
  inset-inline-end: 12%;
}
.section-title-wrap--skills-desktop .section-decor {
  inset: -8px -20px;
}

/* Studies — tight to heading box */
.section-decor--studies .section-decor__item--arc {
  top: 0;
  inset-inline-start: -7px;
}
.section-decor--studies .section-decor__item--dot {
  bottom: 0;
  inset-inline-end: -3px;
}
.section-decor--studies .section-decor__item--tick {
  top: 50%;
  margin-top: -4px;
  inset-inline-end: -8px;
}

/* Projects — tight to heading box */
.section-decor--projects .section-decor__item--frame {
  top: 0;
  inset-inline-end: -4px;
}
.section-decor--projects .section-decor__item--dash {
  top: 120%;
  margin-top: -1px;
  inset-inline-start: -10px;
  transform: translate3d(var(--px), var(--py), 0) rotate(10deg);
}
.section-decor--projects .section-decor__item--ring {
  top: -2px;
  inset-inline-start: -6px;
}
.section-decor--projects .section-decor__item--triangle {
  bottom: 30px;
  inset-inline-end: 18%;
  transform: translate3d(var(--px), var(--py), 0) rotate(-38deg);
}

.section-title-wrap h2,
.section-title-wrap .experiences__title,
.section-title-wrap .studies-section__title,
.section-title-wrap .projects-section__title,
.section-title-wrap .skills__mobile-title,
.section-title-wrap .skills--options > .skills-item h2,
.section-title-wrap h2[data-i18n-html="skills.title"] {
  position: relative;
  z-index: 1;
}

.intro--banner h2 em,
.skills__mobile-title em,
.section-title-wrap--skills-desktop h2 em {
  color: var(--blue-color);
  font-style: normal;
}

.experiences__title em,
.studies-section__title em,
.projects-section__title em {
  color: var(--blue-color);
  font-style: normal;
}

@media (max-width: 767px) {
  .section-decor {
    display: none;
  }
}

/* ============================ UNIFIED SECTION TITLES ============================ */
.experiences__title,
.studies-section__title,
.projects-section__title {
  font-family: var(--font-primary);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.15;
  margin: 0;
  text-align: center;
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
}

.section-title-wrap__heading .experiences__title,
.section-title-wrap__heading .studies-section__title,
.section-title-wrap__heading .projects-section__title {
  width: auto;
  padding: 0;
}

.experiences__subtitle,
.studies-section__hint,
.projects-section__subtitle {
  text-align: center;
  margin: 10px 0 36px;
  font-size: 13px;
  opacity: 0.6;
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
}

/* ============================ EXPERIENCES (timeline card slider) ============================ */
.experiences {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  margin: 0 auto;
  padding-top: 70px;
  box-sizing: border-box;
}

/* ---- Slider shell ---- */
.exp-slider {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Viewport: clips horizontal overflow, fades edges */
.exp-slider__clip {
  width: 100%;
  overflow: hidden;
  padding: 44px 0;      /* breathing room so scale-up isn't clipped vertically */
  box-sizing: content-box;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 14%,
    black 86%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 14%,
    black 86%,
    transparent 100%
  );
}

/* The flex row that slides */
.exp-slider__track {
  display: flex;
  align-items: center;
  gap: 28px;
  transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: transform;
}

/* ---- Card (flex item) ---- */
.exp-card {
  flex-shrink: 0;
  width: 360px;
  height: 226px;
  border-radius: 22px;
  overflow: hidden;
  cursor: pointer;
  outline: none;
  -webkit-user-select: none;
  user-select: none;
  /* scale / filter / opacity driven by JS */
  transform-origin: center center;
  transition:
    transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1),
    filter    0.55s cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity   0.55s ease;
}
/* Accent border on active card */
.exp-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 22px;
  border: 2px solid transparent;
  transition: border-color 0.45s ease;
  pointer-events: none;
  z-index: 3;
}
.exp-card.is-active::after {
  border-color: var(--accent, var(--blue-color));
}

/* Background image */
.exp-card__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.exp-card__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.exp-card.is-active .exp-card__bg img {
  transform: scale(1.04);
}

/* Dark gradient overlay */
.exp-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    155deg,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.80) 100%
  );
  transition: background 0.5s ease;
}
.exp-card.is-active .exp-card__overlay {
  background: linear-gradient(
    155deg,
    rgba(0, 0, 0, 0.06) 0%,
    rgba(0, 0, 0, 0.86) 100%
  );
}

/* Card content */
.exp-card__content {
  position: absolute;
  inset: 0;
  padding: 18px 20px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  z-index: 2;
}
.exp-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}
.exp-card__year {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  padding: 5px 10px;
  border-radius: 8px;
  white-space: nowrap;
  line-height: 1;
}
.exp-card__bottom {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.exp-card__name {
  font-size: 22px;
  font-weight: 800;
  margin: 0;
  line-height: 1.1;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}
.exp-card__role {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.72;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.exp-card__cta {
  margin-top: 9px;
  font-size: 10px;
  font-weight: 800;
  color: var(--accent, var(--blue-color));
  text-transform: uppercase;
  letter-spacing: 0.15em;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.35s ease 0.08s,
    transform 0.35s ease 0.08s;
  pointer-events: none;
}
.exp-card__cta svg {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}
.exp-card.is-active .exp-card__cta {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Timeline ---- */
.exp-slider__timeline {
  position: relative;
  width: 100%;
  min-height: 98px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: visible;
  pointer-events: none;
}
.exp-slider__line {
  position: absolute;
  top: 14px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: repeating-linear-gradient(
    to right,
    rgba(127, 127, 127, 0.45) 0 5px,
    transparent 5px 10px
  );
}
html[dir="rtl"] .exp-slider__line {
  background: repeating-linear-gradient(
    to left,
    rgba(127, 127, 127, 0.45) 0 5px,
    transparent 5px 10px
  );
}
.exp-slider__marker {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 5px;
}
.exp-slider__dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-current, var(--blue-color));
  box-shadow: 0 0 0 5px rgba(15, 51, 255, 0.18);
  transition:
    background 0.45s ease,
    box-shadow 0.45s ease;
}
.exp-slider__meta {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  max-width: min(92vw, 520px);
}
.exp-slider__period {
  font-size: 13px;
  font-weight: 700;
  opacity: 0.82;
  line-height: 1.35;
}
.exp-slider__location {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.55;
}
.exp-slider__location[hidden] {
  display: none;
}

/* ---- Nav arrows ---- */
.exp-nav {
  position: absolute;
  /* sit at the vertical center of the clip (cards area) — clip has 44px padding top/bottom */
  top: 0;
  bottom: 98px;            /* exclude timeline below the clip */
  margin: auto 0;
  height: max-content;
  z-index: 15;
}
.exp-nav--prev { left:  6px; }
.exp-nav--next { right: 6px; }
.exp-nav[disabled] {
  opacity: 0.28;
  cursor: not-allowed;
}

/* Hide title/subtitle/slider when detail overlay is open */
.experiences.is-detail .experiences__title,
.experiences.is-detail .experiences__subtitle,
.experiences.is-detail .exp-slider {
  display: none;
}

/* ============================ EXPERIENCE DETAIL (full page) ============================ */
.experience-detail {
  position: absolute;
  inset: 0;
  display: none;
  z-index: 20;
  background: var(--background-color);
  overflow: hidden;
}
.experience-detail.is-open {
  display: block;
}
.experience-detail__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  width: 100%;
  height: 100%;
  padding: 110px 70px 50px;
  box-sizing: border-box;
  animation: expDetailIn 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes expDetailIn {
  0% {
    opacity: 0;
    transform: translateY(24px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
.experience-detail__media {
  display: grid;
  gap: 16px;
  overflow: hidden;
  height: 100%;
  min-height: 0;
  align-self: stretch;
}
.experience-detail__media--count-1 {
  grid-template-rows: 1fr;
}
.experience-detail__media--count-2 {
  grid-template-rows: repeat(2, 1fr);
}
.experience-detail__media--count-3 {
  grid-template-rows: repeat(3, 1fr);
}
.experience-detail__media-slot {
  position: relative;
  overflow: hidden;
  background: #0c0c0c;
  border-radius: var(--radius-lg);
  opacity: 0;
  transform: translateX(-30px);
  animation: expSlotIn 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: var(--delay, 0s);
  min-height: 0;
}
@keyframes expSlotIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.experience-detail__inner.is-no-media {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}
.experience-detail__inner.is-no-media > .experience-detail__media {
  display: none !important;
}
.experience-detail__inner.is-no-media > .experience-detail__body {
  grid-column: 1 / -1;
  width: 100%;
  max-width: none;
}
.experience-detail__media[hidden] {
  display: none;
}
.experience-detail__media-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  transform: scale(1);
  transform-origin: center center;
  transition:
    object-position 0.55s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.experience-detail__media-slot.is-scroll-left:hover img {
  object-position: calc(50% - var(--scroll-percent, 30) * 0.5%) 50%;
}
.experience-detail__media-slot.is-scroll-right:hover img {
  object-position: calc(50% + var(--scroll-percent, 30) * 0.5%) 50%;
}
.experience-detail__media-slot.is-scroll-top:hover img {
  object-position: 50% calc(50% - var(--scroll-percent, 30) * 0.5%);
}
.experience-detail__media-slot.is-scroll-bottom:hover img {
  object-position: 50% calc(50% + var(--scroll-percent, 30) * 0.5%);
}
.experience-detail__media-slot.is-scroll-zoomIn:hover img {
  transform: scale(1.12);
}
.experience-detail__media-slot.is-scroll-zoomOut img {
  transform: scale(1.12);
}
.experience-detail__media-slot.is-scroll-zoomOut:hover img {
  transform: scale(1);
}

/* Experience detail video slot */
.experience-detail__media-slot--video {
  cursor: pointer;
}
.experience-detail__media-slot--video .exp-detail-video__frame {
  position: absolute;
  inset: 0;
  background: #000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.experience-detail__media-slot--video .exp-detail-video__el {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: scale(1.06);
  transform-origin: center center;
  background: #111;
  cursor: pointer;
  transition:
    object-fit 0.55s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity 0.45s ease;
}
.experience-detail__media-slot--video .exp-detail-video__frame.is-playing .exp-detail-video__el {
  object-fit: contain;
  transform: scale(1);
  background: #000;
}
.experience-detail__media-slot--video .exp-detail-video__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s ease, opacity 0.3s ease;
}
.experience-detail__media-slot--video .exp-detail-video__frame.is-playing .exp-detail-video__play {
  opacity: 0;
  pointer-events: none;
}
.experience-detail__media-slot--video .exp-detail-video__play-ring {
  position: absolute;
  width: 72px;
  height: 72px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  animation: playPulse 2s ease infinite;
}
.experience-detail__media-slot--video .exp-detail-video__play-icon {
  position: relative;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent #fff;
  margin-left: 5px;
}

.experience-detail__body {
  overflow-y: auto;
  color: var(--text-color);
  scrollbar-width: thin;
  padding-right: 4px;
}
.experience-detail__head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
}
.experience-detail__logo {
  width: 100px;
  height: 64px;
  object-fit: cover;
  border: 2px solid var(--blue-color);
  flex-shrink: 0;
  border-radius: var(--radius-md);
}
.experience-detail__head h3 {
  font-size: 30px;
  font-weight: 800;
  margin: 0;
  line-height: 1.1;
}
.experience-detail__employment {
  margin: 8px 0 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-current, var(--blue-color));
  opacity: 0.88;
}
.experience-detail__employment[hidden] {
  display: none;
}
.experience-detail__site {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue-color);
  text-decoration: none;
}
.experience-detail__site svg {
  width: 14px;
  height: 14px;
}
.experience-detail__row {
  margin-bottom: 22px;
}
.experience-detail__label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 10px;
  font-weight: 700;
  opacity: 0.55;
  margin-bottom: 10px;
}
.experience-detail__positions {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.experience-detail__positions li {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border: 1px solid var(--text-color);
  border-radius: var(--radius-xs);
}
.experience-detail__period {
  font-weight: 700;
  font-size: 15px;
  margin: 0;
}
.experience-detail__tasks {
  list-style: none;
  padding: 0;
  margin: 0;
}
.experience-detail__tasks li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.55;
}
.experience-detail__tasks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 12px;
  height: 2px;
  background: var(--blue-color);
}

/* Close uses .btn pattern */
.experience-detail__close {
  position: absolute;
  top: 90px;
  right: 70px;
  z-index: 30;
}

.experiences.is-detail .experiences__title,
.experiences.is-detail .experiences__subtitle,
.experiences.is-detail .experiences__viewport {
  display: none;
}

/* ============================ STUDIES SECTION ============================ */
.studies-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  margin: 0 auto;
  padding-top: 80px;
  box-sizing: border-box;
}

.studies-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  width: 100%;
  max-width: 880px;
  max-height: 60vh;
  overflow-y: auto;
  scrollbar-width: thin;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(127, 127, 127, 0.25);
}
.study-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 26px;
  border-top: 1px solid rgba(127, 127, 127, 0.25);
  cursor: none;
  overflow: hidden;
  transform: translateY(20px);
  opacity: 0;
  animation: studyItemIn 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.study-item:first-child {
  border-top: none;
}
.study-item:last-child {
  border-bottom: none;
}
.study-item:nth-child(1) {
  animation-delay: 0.04s;
}
.study-item:nth-child(2) {
  animation-delay: 0.1s;
}
.study-item:nth-child(3) {
  animation-delay: 0.16s;
}
.study-item:nth-child(4) {
  animation-delay: 0.22s;
}
.study-item:nth-child(5) {
  animation-delay: 0.28s;
}
.study-item:nth-child(6) {
  animation-delay: 0.34s;
}
@keyframes studyItemIn {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.study-item__bg {
  position: absolute;
  inset: 0;
  background: var(--accent, var(--blue-color));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
  z-index: 0;
}
.study-item:hover .study-item__bg {
  transform: scaleX(1);
}
.study-item__title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
  transition:
    color 0.35s ease,
    transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.study-item__diploma {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.55;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition:
    opacity 0.35s ease,
    color 0.35s ease;
}
.study-item:hover .study-item__title,
.study-item:hover .study-item__diploma {
  color: #fff;
}
.study-item:hover .study-item__title {
  transform: translateX(14px);
}
.study-item__arrow {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 2px solid currentColor;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateX(-30px);
  opacity: 0;
  transition:
    transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity 0.35s ease,
    background-color 0.35s ease,
    color 0.35s ease;
  flex-shrink: 0;
}
.study-item__arrow svg {
  width: 18px;
  height: 18px;
}
.study-item:hover .study-item__arrow {
  transform: translateX(0);
  opacity: 1;
  background: #fff;
  color: #0c0c0c;
}

/* Cursor preview floater */
#study-cursor-preview {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 150px;
  overflow: hidden;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translate(-50%, -120%) scale(0.85);
  transition:
    opacity 0.25s ease,
    transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  border-radius: var(--radius-lg);
}
#study-cursor-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.28);
}
#study-cursor-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--study-img-filter);
  transform: scale(1);
  transition:
    filter 0.45s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
#study-cursor-preview.is-visible img {
  filter: var(--study-img-filter-hover);
  transform: scale(1.04);
}
#study-cursor-preview.is-visible {
  opacity: 1;
  transform: translate(-50%, -120%) scale(1);
}
@media (max-width: 900px) {
  #study-cursor-preview {
    display: none;
  }
}

/* Study detail view (full page) */
.study-detail {
  position: absolute;
  inset: 0;
  display: none;
  z-index: 20;
  background: var(--background-color);
  overflow: hidden;
}
.study-detail.is-open {
  display: block;
}
.study-detail__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  width: 100%;
  height: 100%;
  padding: 110px 70px 50px;
  box-sizing: border-box;
  animation: studyDetailIn 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes studyDetailIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
.study-detail__media {
  position: relative;
  overflow: hidden;
  background: #0c0c0c;
  border-radius: var(--radius-lg);
}
body.light-mode .study-detail__media {
  background: rgba(0, 0, 0, 0.06);
}
.study-detail__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  filter: none;
  animation: studyImgIn 1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  transition: object-position 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.study-detail__media.is-pan-left img {
  object-position: 30% 50%;
}
.study-detail__media.is-pan-right img {
  object-position: 70% 50%;
}
@keyframes studyImgIn {
  0% {
    transform: scale(1.18);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
.study-detail__body {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  scrollbar-width: thin;
  padding-right: 4px;
}
.study-detail__body h3 {
  font-size: 38px;
  font-weight: 800;
  margin: 0 0 8px;
  line-height: 1.1;
}
.study-detail__location {
  font-size: 12px;
  opacity: 0.55;
  margin: 0 0 28px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.study-detail__row {
  margin-bottom: 22px;
}
.study-detail__label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 10px;
  font-weight: 700;
  opacity: 0.55;
  margin-bottom: 8px;
}
.study-detail__row p {
  margin: 0;
  font-weight: 700;
  font-size: 15px;
}
.study-detail__row ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.study-detail__row ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  font-size: 13.5px;
  font-weight: 400;
}
.study-detail__row ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 12px;
  height: 2px;
  background: var(--blue-color);
}

.study-detail__close {
  position: absolute;
  top: 90px;
  left: 70px;
  z-index: 25;
}

.studies-section.is-detail .studies-section__title,
.studies-section.is-detail .studies-section__hint,
.studies-section.is-detail .studies-list {
  display: none;
}

/* ============================ PROJECTS SECTION ============================ */
.projects-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  margin: 0 auto;
  padding-top: 70px;
  box-sizing: border-box;
}

.projects-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
}

.projects-filter {
  min-width: 0;
  padding: 10px 18px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  border: 1px solid rgba(127, 127, 127, 0.45);
  transition:
    color 0.25s ease,
    border-color 0.25s ease;
}
.projects-filter > span:first-child {
  position: relative;
  z-index: 2;
}
.projects-filter.is-active {
  color: #fff;
  border-color: var(--blue-color);
}
.projects-filter.is-active .btn-background {
  left: 0;
}
.projects-filter:not(.is-active):hover {
  border-color: var(--text-color);
}
html[dir="rtl"] .projects-filter.is-active .btn-background {
  left: auto;
  right: 0;
}

.projects__viewport {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  overflow: hidden;
}

.projects__track {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 22px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0 24px;
  width: 100%;
  cursor: grab;
  scrollbar-width: none;
  scroll-padding-inline: 0;
  --proj-cols: 3;
  --proj-rows: 2;
}
.projects__track::-webkit-scrollbar {
  display: none;
}
.projects__track.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  user-select: none;
  -webkit-user-select: none;
}

.projects__slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(var(--proj-cols, 3), minmax(0, 1fr));
  grid-template-rows: repeat(var(--proj-rows, 2), minmax(0, 1fr));
  gap: 22px;
  align-content: stretch;
  padding: 0 80px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  box-sizing: border-box;
}

.proj-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
}
.proj-nav--prev {
  left: 0;
}
.proj-nav--next {
  right: 0;
}
.proj-nav[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

.project-card {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 220px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 24px 22px 52px;
  border: 2px solid var(--text-color);
  background: transparent;
  text-align: left;
  font: inherit;
  color: var(--text-color);
  cursor: none;
  overflow: hidden;
  border-radius: var(--radius-md);
  transition:
    border-color 0.35s ease,
    transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
  animation: projectCardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--delay, 0s);
}

@keyframes projectCardIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.project-card__bg {
  position: absolute;
  inset: 0;
  background: var(--accent, var(--blue-color));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
  z-index: 0;
  border-radius: inherit;
}

.project-card:hover {
  border-color: var(--accent, var(--blue-color));
  transform: translateY(-4px);
}
.project-card:hover .project-card__bg {
  transform: scaleX(1);
}

.project-card__index {
  position: relative;
  z-index: 1;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  opacity: 0.55;
  transition:
    color 0.35s ease,
    opacity 0.35s ease;
}

.project-card__cat {
  position: relative;
  z-index: 1;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent, var(--blue-color));
  transition: color 0.35s ease;
}

.project-card__title {
  position: relative;
  z-index: 1;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.01em;
  transition:
    color 0.35s ease,
    transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.project-card__desc {
  position: relative;
  z-index: 1;
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
  opacity: 0.72;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition:
    color 0.35s ease,
    opacity 0.35s ease;
}

.project-card__arrow {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 1;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--text-color);
  border-radius: var(--radius-xs);
  transition:
    border-color 0.35s ease,
    background 0.35s ease,
    transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.project-card__arrow svg {
  width: 16px;
  height: 16px;
}

.project-card:hover .project-card__index,
.project-card:hover .project-card__cat,
.project-card:hover .project-card__title,
.project-card:hover .project-card__desc {
  color: #fff;
  opacity: 1;
}
.project-card:hover .project-card__arrow {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.12);
  transform: translateX(4px);
}

.project-detail {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: var(--bg-color, #fff);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.45s ease,
    visibility 0.45s;
  overflow-y: auto;
}

.project-detail.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.project-detail__close {
  position: fixed;
  top: 90px;
  right: 70px;
  z-index: 130;
}

.project-detail__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 120px 70px 60px;
}

.project-detail__title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  margin: 0 0 28px;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.project-gallery__item {
  margin: 0;
  border: 2px solid var(--text-color);
  overflow: hidden;
  border-radius: var(--radius-lg);
  animation: projectCardIn 0.5s ease both;
}

.project-gallery__item:nth-child(2) {
  animation-delay: 0.06s;
}
.project-gallery__item:nth-child(3) {
  animation-delay: 0.12s;
}
.project-gallery__item:nth-child(4) {
  animation-delay: 0.18s;
}

.project-gallery__item img {
  display: block;
  width: 100%;
  height: auto;
}

.project-video {
  display: flex;
  justify-content: center;
}

.project-video__frame {
  position: relative;
  width: 100%;
  max-width: 880px;
  border: 3px solid var(--accent, #0f33ff);
  box-shadow:
    0 0 0 1px var(--text-color),
    12px 12px 0 var(--text-color);
  background: #000;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.project-video__el {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #111;
  border-radius: calc(var(--radius-lg) - 3px);
}

.project-video__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  border: none;
  cursor: pointer;
  transition:
    background 0.3s,
    opacity 0.3s;
  padding: 0;
}

.project-video__frame.is-playing .project-video__play {
  opacity: 0;
  pointer-events: none;
}

.project-video__play-ring {
  position: absolute;
  width: 88px;
  height: 88px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  animation: playPulse 2s ease infinite;
}

.project-video__play-icon {
  position: relative;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 14px 0 14px 24px;
  border-color: transparent transparent transparent #fff;
  margin-left: 6px;
}

@keyframes playPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

.projects-section.is-detail .projects-section__title,
.projects-section.is-detail .projects-section__subtitle,
.projects-section.is-detail .projects-filters,
.projects-section.is-detail .projects__viewport {
  visibility: hidden;
}

html[dir="rtl"] .project-card {
  text-align: right;
}
html[dir="rtl"] .project-card__bg {
  transform-origin: right center;
}
html[dir="rtl"] .project-card__arrow {
  right: auto;
  left: 18px;
  transform: scaleX(-1);
}
html[dir="rtl"] .project-card:hover .project-card__arrow {
  transform: scaleX(-1) translateX(4px);
}
html[dir="rtl"] .project-detail__close {
  right: auto;
  left: 70px;
}

.outer-nav li.is-vis:nth-child(6) {
  transition-delay: 0.2s;
}

/* ============================ Hide legacy projects/studies UI ============================ */
.work,
.about {
  display: none !important;
}

/* ============================ Arabic / Cairo (via --font-primary) ============================ */

/* ===========================================================================
   ============================ FULL RTL OVERRIDES ===========================
   =========================================================================== */
html[dir="rtl"] body {
  text-align: right;
}

/* Header */
html[dir="rtl"] .header {
  flex-direction: row-reverse;
}
html[dir="rtl"] .header--cta {
  left: auto;
  right: 50%;
  transform: translate(50%, -50%);
}
html[dir="rtl"] .header--right {
  flex-direction: row-reverse;
}

/* Side nav: numbers + labels on right */
html[dir="rtl"] .side-nav > li::before,
html[dir="rtl"] .side-nav > li span {
  left: auto;
  right: 10px;
}
html[dir="rtl"] .side-nav li.is-active::before {
  left: auto;
  right: -33px;
}
html[dir="rtl"] .l-side-nav::before {
  left: auto;
  right: 0;
}

/* Footer stays centered; year stays readable in RTL */
html[dir="rtl"] .site-footer {
  left: 0;
  right: 108px;
}
html[dir="rtl"] .site-footer__text {
  direction: rtl;
  unicode-bidi: plaintext;
}
@media (max-width: 1180px) {
  html[dir="rtl"] .site-footer {
    right: 0;
  }
}

/* Overlay nav */
html[dir="rtl"] .outer-nav {
  left: auto;
  right: 55%;
  transform: translateY(-50%) translateX(50%);
}

/* Home banner */
html[dir="rtl"] .intro--banner {
  text-align: right;
}
html[dir="rtl"] .intro--banner img.profile-img {
  right: auto;
  left: -12px;
}
html[dir="rtl"] .intro--banner .div {
  right: auto;
  left: 255px;
  transform: skew(-20deg);
  -webkit-transform: skew(-20deg);
}
html[dir="rtl"] .intro--banner::before {
  left: auto;
  right: 340px;
}
html[dir="rtl"] .intro--banner::after {
  left: auto;
  right: 230px;
}
html[dir="rtl"] .intro--banner h2::after {
  left: auto;
  right: 547px;
}
html[dir="rtl"] .intro--banner button .btn-background {
  left: auto;
  right: 23px;
}
html[dir="rtl"] .intro--banner button:hover .btn-background {
  right: 0;
}
html[dir="rtl"] .intro--banner button svg {
  left: auto;
  right: 5px;
  transform: scaleX(-1);
}
html[dir="rtl"] .intro--banner .mini-description {
  margin-left: auto;
  margin-right: 0;
}
html[dir="rtl"] .intro--options {
  direction: rtl;
}

/* Skills decorations */
html[dir="rtl"] .skills--options::before {
  left: auto;
  right: 300px;
}
html[dir="rtl"] .skills--options::after {
  left: auto;
  right: 40px;
}
html[dir="rtl"] .skills--options h2::before {
  left: auto;
  right: 81px;
}
html[dir="rtl"] .skills--options h2::after {
  left: auto;
  right: 400px;
}
html[dir="rtl"] .skills--options > .skills-item h2 {
  text-align: right;
}

/* Contact panel */
html[dir="rtl"] .contact--lockup {
  justify-content: flex-start;
}

/* Perspective rotate animation flips */
html[dir="rtl"] .effect-rotate-left .container {
  transform-origin: 100% 50%;
}
html[dir="rtl"] .effect-rotate-left--animate .container {
  transform: translateZ(-1800px) translateX(50%) rotateY(-45deg);
  -webkit-transform: translateZ(-1800px) translateX(50%) rotateY(-45deg);
}

/* Experiences */
html[dir="rtl"] .exp-nav--prev svg,
html[dir="rtl"] .exp-nav--next svg {
  transform: scaleX(-1);
}
html[dir="rtl"] .experience-detail__inner {
  grid-template-columns: 1.1fr 1fr;
  direction: rtl;
}
html[dir="rtl"] .experience-detail__body {
  direction: rtl;
  padding-right: 0;
  padding-left: 4px;
}
html[dir="rtl"] .experience-detail__media-slot {
  transform: translateX(30px);
  animation-name: expSlotInRtl;
}
@keyframes expSlotInRtl {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
html[dir="rtl"] .experience-detail__tasks li {
  padding-left: 0;
  padding-right: 22px;
}
html[dir="rtl"] .experience-detail__tasks li::before {
  left: auto;
  right: 0;
}
html[dir="rtl"] .experience-detail__close {
  right: auto;
  left: 70px;
}

/* Studies */
html[dir="rtl"] .studies-list {
  direction: rtl;
}
html[dir="rtl"] .study-item__bg {
  transform-origin: right center;
}
html[dir="rtl"] .study-item:hover .study-item__title {
  transform: translateX(-14px);
}
html[dir="rtl"] .study-item__arrow {
  transform: translateX(30px) scaleX(-1);
}
html[dir="rtl"] .study-item:hover .study-item__arrow {
  transform: translateX(0) scaleX(-1);
}
html[dir="rtl"] .study-detail__inner {
  direction: rtl;
}
html[dir="rtl"] .study-detail__body {
  padding-right: 0;
  padding-left: 4px;
}
html[dir="rtl"] .study-detail__row ul li {
  padding-left: 0;
  padding-right: 22px;
}
html[dir="rtl"] .study-detail__row ul li::before {
  left: auto;
  right: 0;
}
html[dir="rtl"] .study-detail__close {
  left: auto;
  right: 70px;
}
html[dir="rtl"] .study-detail__close svg {
  transform: scaleX(-1);
}

/* ============================ Responsive ============================ */

/* Bigger laptops */
@media (min-width: 1600px) {
  .experiences__title,
  .studies-section__title,
  .projects-section__title {
    font-size: 36px;
  }
  .exp-card {
    width: 360px;
    height: 228px;
  }
  .study-item__title {
    font-size: 28px;
  }
}

/* Standard laptops */
@media (max-width: 1400px) {
  .experiences {
    padding-top: 60px;
  }
  .studies-section {
    padding-top: 70px;
  }
}

/* Tablets / small laptops */
@media (max-width: 1180px) {
  .experiences__title,
  .studies-section__title,
  .projects-section__title {
    font-size: 24px;
  }
  .projects__track {
    padding: 8px 0 24px;
  }
  .projects__slide {
    gap: 18px;
    padding: 0 60px;
  }
  .project-card {
    min-height: 210px;
  }
  .project-detail__inner {
    padding: 100px 40px 40px;
  }
  .project-detail__close {
    top: 80px;
    right: 40px;
  }
  html[dir="rtl"] .project-detail__close {
    left: 40px;
    right: auto;
  }
  .exp-card {
    width: 320px;
    height: 202px;
    border-radius: 18px;
  }
  .exp-card__name { font-size: 19px; }
  .study-item__title {
    font-size: 22px;
  }
  .experience-detail__inner {
    grid-template-columns: 1fr;
    padding: 100px 40px 30px;
    gap: 24px;
  }
  .experience-detail__inner.is-no-media {
    grid-template-rows: 1fr;
  }
  html[dir="rtl"] .experience-detail__inner {
    grid-template-columns: 1fr;
  }
  .experience-detail__media {
    height: auto;
  }
  .experience-detail__media--count-1 {
    grid-template-rows: min(420px, 55vh);
  }
  .experience-detail__media--count-2 {
    grid-template-rows: repeat(2, min(210px, 27.5vh));
  }
  .experience-detail__media--count-3 {
    grid-template-rows: repeat(3, 140px);
  }
  .study-detail__inner {
    grid-template-columns: 1fr;
    padding: 100px 40px 30px;
    gap: 30px;
  }
  .study-detail__media {
    min-height: 240px;
    max-height: 320px;
  }
  .experience-detail__close {
    top: 80px;
    right: 40px;
  }
  .study-detail__close {
    top: 80px;
    left: 40px;
  }
  html[dir="rtl"] .experience-detail__close {
    left: 40px;
    right: auto;
  }
  html[dir="rtl"] .study-detail__close {
    right: 40px;
    left: auto;
  }
}

/* Tablets portrait / mobile landscape */
@media (max-width: 900px) {
  .experiences,
  .studies-section {
    padding-top: 90px;
  }
  .exp-card {
    width: 280px;
    height: 178px;
    border-radius: 16px;
  }
  .exp-card__name { font-size: 17px; }
  .experience-detail__head h3 {
    font-size: 22px;
  }
  .study-detail__body h3 {
    font-size: 28px;
  }
}

/* ============================ MOBILE HOME FIX ============================ */
@media (max-width: 767px) {
  /* Layout: scrollable single column, comfortable spacing */
  .intro {
    padding: 90px 20px 30px;
    height: auto;
    min-height: 100%;
    justify-content: flex-start;
    box-sizing: border-box;
    overflow-y: auto;
  }
  .intro--banner {
    height: auto;
    text-align: center;
    margin-bottom: 30px;
  }
  .intro--banner h2 {
    font-size: 40px;
    margin-top: 0;
    line-height: 1.1;
  }
  /* Hide the decorative dots/squares on mobile – they clip otherwise */
  .intro--banner::before,
  .intro--banner::after,
  .intro--banner h2::after {
    display: none;
  }
  .intro--banner .mini-description {
    max-width: 100%;
    margin: 16px 0;
  }
  .intro--banner .div {
    display: none;
  }
  .intro--banner img.profile-img {
    position: static;
    display: block;
    width: 60%;
    max-width: 240px;
    height: auto;
    margin: 18px auto 0;
  }
  .intro--banner .btn-resume-open {
    display: inline-block;
    margin-top: 10px;
  }

  /* KEEP the three options visible on mobile and stack them */
  .intro--options {
    display: block !important;
    margin-top: 20px;
    padding-bottom: 10px;
  }
  .intro--options > a {
    display: block;
    max-width: 100%;
    margin: 0 0 22px 0;
    text-align: center;
  }
  .intro--options h3 {
    font-size: 15px;
  }
  .intro--options p {
    font-size: 13px;
    margin: 6px 0 0;
  }

  /* Section titles mobile */
  .experiences__title,
  .studies-section__title,
  .projects-section__title {
    font-size: 20px;
    padding: 0 20px;
  }
  .experiences__subtitle,
  .studies-section__hint,
  .projects-section__subtitle {
    font-size: 12px;
    padding: 0 20px;
  }

  /* Experiences mobile */
  .exp-card {
    width: 250px;
    height: 158px;
    border-radius: 14px;
  }
  .exp-card__name  { font-size: 15px; }
  .exp-card__role  { font-size: 9px; }
  .exp-slider__stage { height: 210px; }
  .exp-nav { display: none; }

  /* Experience detail mobile */
  .experience-detail__inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    padding: 90px 18px 24px;
    gap: 18px;
  }
  .experience-detail__inner.is-no-media {
    grid-template-rows: 1fr;
  }
  .experience-detail__media--count-1 {
    grid-template-rows: min(300px, 45vh);
  }
  .experience-detail__media--count-2 {
    grid-template-rows: repeat(2, min(150px, 22.5vh));
  }
  .experience-detail__media--count-3 {
    grid-template-rows: 110px 110px 110px;
  }
  .experience-detail__media {
    gap: 10px;
  }
  .experience-detail__head h3 {
    font-size: 20px;
  }
  .experience-detail__close {
    top: 75px;
    right: 18px;
  }
  html[dir="rtl"] .experience-detail__close {
    left: 18px;
    right: auto;
  }

  /* Studies mobile */
  .studies-list {
    padding: 0 16px;
  }
  .study-item {
    padding: 18px 14px;
  }
  .study-item__title {
    font-size: 18px;
  }
  .study-item__diploma {
    font-size: 10px;
  }
  .study-item__arrow {
    width: 32px;
    height: 32px;
  }
  .study-detail__inner {
    grid-template-columns: 1fr;
    grid-template-rows: 220px 1fr;
    padding: 90px 18px 24px;
    gap: 20px;
  }
  .study-detail__media {
    min-height: 220px;
  }
  .study-detail__body h3 {
    font-size: 24px;
  }
  .study-detail__close {
    top: 75px;
    left: 18px;
  }
  html[dir="rtl"] .study-detail__close {
    right: 18px;
    left: auto;
  }

  /* Projects mobile */
  .projects-section {
    padding-top: 70px;
  }
  .projects__track {
    padding: 8px 0 20px;
    gap: 16px;
  }
  .projects__slide {
    gap: 16px;
    padding: 0 20px;
  }
  .proj-nav {
    display: none;
  }
  .project-card {
    min-height: 200px;
    padding: 20px 18px 48px;
  }
  .project-card__title {
    font-size: 18px;
  }
  .projects-filters {
    gap: 8px;
    margin-bottom: 20px;
  }
  .projects-filter {
    padding: 8px 12px;
    font-size: 10px;
  }
  .project-detail__inner {
    padding: 90px 18px 24px;
  }
  .project-detail__close {
    top: 75px;
    right: 18px;
  }
  .project-gallery {
    grid-template-columns: 1fr;
  }
  html[dir="rtl"] .project-detail__close {
    left: 18px;
    right: auto;
  }

  /* Disable side nav margin on mobile */
  .l-main-content {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* Smaller mobile */
@media (max-width: 480px) {
  .lang-switcher .lang-btn {
    padding: 0 6px;
    font-size: 9px;
  }
  .intro--banner h2 {
    font-size: 34px;
  }
  .exp-card {
    width: 220px;
    height: 140px;
    border-radius: 12px;
  }
  .exp-card__name { font-size: 13px; }
  .study-item__title {
    font-size: 16px;
  }
}

/* Fix home banner overflow on very small heights */
@media (max-height: 720px) and (min-width: 1180px) {
  .intro--banner {
    height: auto;
  }
}

/* Make profile image scale gracefully on laptops */
@media (min-width: 768px) and (max-width: 1599px) {
  .intro--banner .profile-img-wrap {
    width: 280px;
  }
}
@media (min-width: 1600px) {
  .intro--banner .profile-img-wrap {
    width: 340px;
  }
}

html[dir="rtl"] .header--right {
  flex-direction: row-reverse;
}
html[dir="rtl"] .header__actions {
  flex-direction: row-reverse;
}

@media (max-width: 900px) {
  .header--right {
    gap: 8px;
  }
  .music-player__toggle {
    max-width: 110px;
  }
  .music-player__label {
    max-width: 72px;
  }
}

@media (max-width: 600px) {
  .header {
    padding: 0 10px;
  }
  .header--right {
    gap: 6px;
  }
  .header__actions {
    margin-left: 2px;
    padding-left: 6px;
  }
  html[dir="rtl"] .header__actions {
    margin-right: 2px;
    padding-right: 6px;
  }
  .lang-switcher .lang-btn {
    padding: 0 7px;
    font-size: 10px;
  }
  .music-player__picker {
    display: none;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 0 8px;
  }
  .header--right {
    gap: 4px;
  }
  .lang-switcher .lang-btn {
    padding: 0 6px;
    font-size: 9px;
  }
}

/* ============================ GLOBAL RADIUS (site-wide) ============================ */
/* Small controls — 5–6px */
.header--cta,
.intro--banner button,
.intro--banner button .btn-background,
.contact-form__submit,
.contact-form__submit .btn-background,
#submit,
.work-request--options label,
.contact--lockup .modal--options > a,
.exp-nav,
.proj-nav,
.music-player__mute,
.music-player__toggle,
.btn--icon {
  border-radius: var(--radius-sm);
}

.header--cta,
.intro--banner button,
.intro--banner .btn-resume-open,
.contact-form__submit,
.music-player__mute,
.btn {
  overflow: hidden;
}

/* Medium surfaces — 8px (only the wrapper has the radius, image fills it) */
.intro--banner .profile-img-wrap {
  border-radius: var(--radius-md);
}

/* Large panels & media — 10px */
.contact--lockup .modal {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.study-item__bg {
  border-radius: inherit;
}

html[dir="rtl"] .btn .btn-background {
  border-radius: var(--radius-sm);
}

/* ============================================================================
   HOME — profile image (soft fade borders + hover blur)
   ============================================================================ */
.profile-img-wrap {
  position: absolute;
  bottom: 21px;
  right: -12px;
  width: 280px;
  z-index: -1;
  display: block;
  pointer-events: auto;
  /* Soft radial mask so the cropped image fades into the background
     instead of showing a hard edge at the bottom/sides. */
  -webkit-mask-image: radial-gradient(
    ellipse 70% 80% at 50% 45%,
    #000 55%,
    rgba(0, 0, 0, 0.85) 70%,
    rgba(0, 0, 0, 0) 95%
  );
  mask-image: radial-gradient(
    ellipse 70% 80% at 50% 45%,
    #000 55%,
    rgba(0, 0, 0, 0.85) 70%,
    rgba(0, 0, 0, 0) 95%
  );
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}
.profile-img-wrap .profile-img {
  position: static;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  transition:
    filter 0.55s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity 0.4s ease;
  will-change: filter, transform;
}
.profile-img-wrap:hover .profile-img {
  filter: blur(6px) saturate(0.9);
  transform: scale(1.04);
}
.profile-img-wrap::after {
  /* Extra fade towards the bottom edge to fully blend with the section bg */
  content: "";
  position: absolute;
  inset: auto 0 -2px 0;
  height: 40%;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--background-color) 100%
  );
  opacity: 0.85;
}
body.light-mode .profile-img-wrap::after {
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--background-color) 100%
  );
}
html[dir="rtl"] .profile-img-wrap {
  right: auto;
  left: -12px;
}

/* ============================================================================
   CONTACT — right half panel (spacious, not compressed)
   ============================================================================ */
.contact.contact--modern {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 80px 56px 40px 48px;
  box-sizing: border-box;
}
html[dir="rtl"] .contact.contact--modern {
  padding: 80px 48px 40px 56px;
}

.contact-shell {
  width: 100%;
  max-width: 1280px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 72px;
  align-items: center;
}

/* Fills the entire right half — left column stays empty */
.contact-panel {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: start;
  gap: 28px;
  width: 100%;
  min-width: 0;
}
html[dir="rtl"] .contact-shell {
  grid-template-columns: 1fr 1fr;
}
html[dir="rtl"] .contact-panel {
  grid-column: 1;
  text-align: right;
}

.contact-panel__head {
  width: 100%;
}
.contact__title {
  font: 800 clamp(34px, 4vw, 52px)/1.05 var(--font-primary);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.contact__title em {
  color: var(--blue-color);
  font-style: normal;
}
.contact__subtitle {
  font-size: 14px;
  opacity: 0.65;
  margin: 0;
  max-width: 520px;
  line-height: 1.6;
}

.contact-panel__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  font-size: 13px;
}
.contact-panel__meta a {
  color: var(--text-color);
  text-decoration: none;
  opacity: 0.8;
  transition:
    color 0.2s ease,
    opacity 0.2s ease;
}
.contact-panel__meta a:hover {
  color: var(--blue-color);
  opacity: 1;
}
.contact-panel__meta-sep {
  opacity: 0.35;
}

.contact-panel__social {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-panel__social-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.55;
}
.contact-panel__social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contact-social {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(127, 127, 127, 0.35);
  border-radius: var(--radius-sm);
  color: var(--text-color);
  text-decoration: none;
  cursor: none;
  transition:
    color 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease,
    transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.contact-social svg {
  width: 18px;
  height: 18px;
}
.contact-social:hover {
  background: var(--blue-color);
  border-color: var(--blue-color);
  color: #fff;
  transform: translateY(-2px);
}

/* Form */
.contact-form {
  width: 100%;
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 22px;
  box-sizing: border-box;
}
.contact-form__reasons {
  border: none;
  padding: 0;
  margin: 0;
  width: 100%;
}
.contact-form__reasons legend {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 10px;
  text-align: right;
  width: 100%;
}
.contact-form__reason-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.contact-reason {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 10px;
  background: transparent;
  border: 1px solid rgba(127, 127, 127, 0.3);
  border-radius: var(--radius-sm);
  color: var(--text-color);
  font: 700 10px/1.45 var(--font-primary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: none;
  transition:
    border-color 0.25s ease,
    color 0.25s ease,
    background 0.25s ease;
  text-align: right;
}
.contact-reason svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.contact-reason__label {
  min-width: 0;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.contact-reason:hover {
  border-color: var(--text-color);
}
.contact-reason.is-active {
  border-color: var(--blue-color);
  background: var(--blue-color);
  color: #fff;
}

.contact-form__fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.contact-field {
  position: relative;
  display: block;
}
.contact-field--full {
  grid-column: 1 / -1;
  width: 100%;
}
.contact-field {
  width: 100%;
}

.contact-field__error {
  display: block;
  margin-top: 6px;
  font: 500 12px/1.35 var(--font-primary);
  color: #e5484d;
}
.contact-field.is-invalid input,
.contact-field.is-invalid textarea,
.contact-field.is-invalid select {
  border-color: #e5484d;
}
.contact-field.is-invalid .contact-field__label {
  color: #e5484d;
}

.contact-form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.contact-field input,
.contact-field textarea,
.contact-field select {
  width: 100%;
  background: transparent;
  color: var(--text-color);
  border: 1px solid rgba(127, 127, 127, 0.35);
  border-radius: var(--radius-sm);
  padding: 18px 14px 8px;
  font: 500 14px/1.4 var(--font-primary);
  outline: none;
  transition:
    border-color 0.25s ease,
    background 0.25s ease;
  box-sizing: border-box;
  resize: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: text;
}
.contact-field select {
  cursor: pointer;
  padding-right: 36px;
}
.contact-field textarea {
  min-height: 110px;
  padding-top: 22px;
  cursor: text;
}

.contact-field__label {
  position: absolute;
  top: 14px;
  left: 14px;
  color: var(--text-color);
  opacity: 0.55;
  font-size: 13px;
  pointer-events: none;
  transition:
    top 0.2s ease,
    font-size 0.2s ease,
    color 0.2s ease,
    opacity 0.2s ease;
  background: transparent;
}
.contact-field input:focus + .contact-field__label,
.contact-field input:not(:placeholder-shown) + .contact-field__label,
.contact-field textarea:focus + .contact-field__label,
.contact-field textarea:not(:placeholder-shown) + .contact-field__label,
.contact-field select:focus + .contact-field__label,
.contact-field.is-filled .contact-field__label {
  top: 4px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
  color: var(--blue-color);
  font-weight: 700;
}
.contact-field input:focus,
.contact-field textarea:focus,
.contact-field select:focus {
  border-color: var(--blue-color);
}
.contact-field--select .contact-field__caret {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-color);
  opacity: 0.6;
}
html[dir="rtl"] .contact-field__label {
  left: auto;
  right: 14px;
}
html[dir="rtl"] .contact-field--select .contact-field__caret {
  right: auto;
  left: 12px;
}

/* Submit — same design as "See my resume" (intro--banner button) */
.contact-form__submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 5px 17px 5px 12px;
  font: 700 11px/1 var(--font-primary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-color);
  background: transparent;
  border: none;
  border-radius: 6px;
  overflow: hidden;
  cursor: none;
  align-self: flex-start;
  transition: color 0.2s ease;
}
.contact-form__submit .btn-background {
  position: absolute;
  top: 0;
  left: 23px;
  right: 0;
  height: 100%;
  background-color: var(--blue-color);
  z-index: -1;
  border-radius: 6px;
  transition:
    left 0.2s ease-in-out,
    right 0.2s ease-in-out;
}
.contact-form__submit:hover .btn-background {
  left: 0;
}
.contact-form__submit:hover {
  color: #fff;
}
.contact-form__submit:focus {
  outline: none;
}
.contact-form__submit[disabled] {
  opacity: 0.55;
  pointer-events: none;
}
.contact-form__submit svg {
  position: relative;
  left: 5px;
  width: 15px;
  height: auto;
  fill: currentColor;
}
html[dir="rtl"] .contact-form__submit {
  align-self: flex-end;
}
html[dir="rtl"] .contact-form__submit .btn-background {
  left: auto;
  right: 23px;
}
html[dir="rtl"] .contact-form__submit:hover .btn-background {
  right: 0;
}
html[dir="rtl"] .contact-form__submit svg {
  left: auto;
  right: 5px;
  transform: scaleX(-1);
}

.contact-form__hint {
  font-size: 11px;
  opacity: 0.55;
  margin: 0;
  letter-spacing: 0.04em;
  text-align: start;
  width: 100%;
  transition:
    opacity 0.25s ease,
    color 0.25s ease;
}
.contact-form__hint--error {
  color: #e5484d;
  opacity: 0.9;
}
.contact-form__hint--success {
  color: var(--accent-color, #0f33ff);
  opacity: 0.9;
}
html[dir="rtl"] .contact-form__hint {
  text-align: right;
}

/* Hide legacy contact UI */
.contact--lockup {
  display: none !important;
}

/* ============================================================================
   MOBILE BOTTOM NAV + TOP TOOLBAR
   ============================================================================ */
.mobile-bottom-nav {
  display: none;
}
.skills__mobile-title {
  display: none;
}

@media (max-width: 900px) {
  /* --- Top toolbar header (lang / music mute / theme) --- */
  .header {
    height: 56px;
    padding: 0 10px;
    background: var(--background-color);
    border-bottom: 1px solid rgba(127, 127, 127, 0.2);
    z-index: 100;
  }
  .header--logo {
    margin-right: auto;
  }
  .header--cta {
    display: none !important;
  }
  .header--nav-toggle {
    display: none !important;
  } /* replaced by bottom nav */
  .header--right {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
  }
  .header__actions {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
    gap: 4px;
  }
  html[dir="rtl"] .header__actions {
    border-right: none;
    padding-right: 0;
    margin-right: 0;
  }
  .music-player__picker {
    display: none !important;
  }
  .music-player__mute {
    width: 34px;
    min-width: 34px;
    height: 34px;
  }
  .header__tool {
    height: 44px;
    min-height: 44px;
  }
  .lang-switcher {
    height: 44px;
    padding: 2px;
  }
  .lang-switcher .lang-btn {
    height: 36px;
  }
  .header--right .display--mode,
  .header--right .header--nav-toggle,
  .header--right .header__fullscreen {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }
  .header--right #icon {
    width: 20px;
    height: 20px;
  }

  /* --- Bottom nav --- */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 64px;
    background: var(--background-color);
    border-top: 1px solid rgba(127, 127, 127, 0.25);
    z-index: 100;
    padding: 4px 4px env(safe-area-inset-bottom, 4px);
    box-sizing: content-box;
    justify-content: space-around;
    align-items: stretch;
  }
  .mobile-bottom-nav__btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 2px;
    background: transparent;
    border: none;
    color: var(--text-color);
    opacity: 0.55;
    cursor: pointer;
    transition:
      color 0.25s ease,
      opacity 0.25s ease,
      transform 0.2s ease;
    font: 700 9px/1 var(--font-primary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    min-width: 0;
  }
  .mobile-bottom-nav__btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
  }
  .mobile-bottom-nav__btn span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }
  .mobile-bottom-nav__btn.is-active {
    color: var(--blue-color);
    opacity: 1;
  }
  .mobile-bottom-nav__btn:active {
    transform: scale(0.95);
  }

  /* Reserve room for the bottom nav inside content sections */
  .l-main-content {
    padding-bottom: 70px !important;
    box-sizing: border-box;
  }
  .site-footer {
    display: none;
  }

  /* Hide the rotate-perspective menu on mobile (we use the bottom nav) */
  .outer-nav,
  .outer-nav--return,
  .copyright {
    display: none !important;
  }
  .perspective.perspective--modalview .container,
  .effect-rotate-left--animate .container {
    transform: none !important;
    -webkit-transform: none !important;
  }
  .perspective--modalview {
    background: var(--background-color);
  }
}

/* On mobile: hide the profile image, keep the 3 options visible as cards */
@media (max-width: 767px) {
  .profile-img-wrap {
    display: none !important;
  }
  .intro--banner img.profile-img,
  .intro--banner .profile-img-wrap {
    display: none !important;
  }

  /* Show the skills mobile title */
  .skills__mobile-title {
    display: block;
    text-align: center;
    font: 800 clamp(22px, 6vw, 30px)/1.15 var(--font-primary);
    margin: 0 0 14px;
    padding: 0 20px;
  }
  .skills__mobile-title em {
    color: var(--blue-color);
    font-style: normal;
  }

  /* Hide the original skills h2 on mobile (decorative & too large for phone) */
  .skills--options::before,
  .skills--options::after,
  .skills--options h2::before,
  .skills--options h2::after {
    display: none !important;
  }
  .skills--options > .skills-item:first-child {
    display: none;
  }
  .skills--options {
    padding-top: 60px;
  }
  .skills {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 80px;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
  }
  .skills .skills--options {
    width: 100%;
  }

  /* Style the 3 cards (Coder / Designer / Collaborator) as proper cards */
  .intro--options {
    gap: 12px;
  }
  .intro--options > a {
    display: block;
    background: transparent;
    border: 1px solid rgba(127, 127, 127, 0.3);
    border-radius: var(--radius-md);
    padding: 18px 18px;
    text-align: left;
    margin: 0 0 14px 0;
    transition:
      border-color 0.25s ease,
      background 0.25s ease,
      transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
    color: var(--text-color);
    text-decoration: none;
  }
  .intro--options > a:hover,
  .intro--options > a:active {
    border-color: var(--blue-color);
    transform: translateY(-2px);
  }
  .intro--options h3 {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 800;
    color: var(--blue-color);
    text-transform: none;
  }
  .intro--options p {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.5;
    opacity: 0.75;
  }

  /* Studies: centered title + cards fit, arrow visible */
  .studies-section {
    padding-top: 80px;
    padding-bottom: 12px;
  }
  .studies-section__title,
  .studies-section__hint {
    text-align: center;
  }
  .studies-list {
    width: calc(100% - 32px);
    max-width: 100%;
    margin: 0 16px;
    padding: 0;
    overflow-x: hidden;
  }
  .study-item {
    padding: 16px 14px;
    gap: 10px;
    box-sizing: border-box;
  }
  .study-item > div {
    flex: 1;
    min-width: 0;
  }
  .study-item__title {
    font-size: 16px;
    white-space: normal;
    overflow-wrap: break-word;
  }
  .study-item__diploma {
    font-size: 9.5px;
    white-space: normal;
  }
  /* Show arrow on mobile (no hover) and align with row */
  .study-item__arrow {
    width: 34px;
    height: 34px;
    opacity: 1;
    transform: none;
    flex-shrink: 0;
    border-width: 1px;
    background: transparent;
    color: var(--blue-color);
    border-color: var(--blue-color);
  }
  .study-item.is-active .study-item__arrow,
  .study-item:active .study-item__arrow {
    background: var(--blue-color);
    color: #fff;
  }
  html[dir="rtl"] .study-item__arrow {
    transform: scaleX(-1);
  }

  /* Projects mobile — show arrows and fix card arrow placement */
  .projects__viewport {
    padding: 0 44px;
    box-sizing: border-box;
  }
  .proj-nav {
    display: inline-flex !important;
    width: 36px;
    height: 36px;
    background: var(--background-color);
    border: 1px solid var(--blue-color);
    color: var(--blue-color);
    z-index: 10;
  }
  .proj-nav svg {
    width: 14px;
    height: 14px;
  }
  .proj-nav--prev {
    left: 4px;
  }
  .proj-nav--next {
    right: 4px;
  }
  .projects__slide {
    padding: 0 4px;
  }

  /* Card arrow: keep it inline with description, not absolute over content */
  .project-card {
    padding: 18px 18px 18px 18px;
    gap: 10px;
  }
  .project-card__arrow {
    position: relative;
    right: auto;
    bottom: auto;
    margin-top: 6px;
    align-self: flex-end;
    width: 32px;
    height: 32px;
  }
  html[dir="rtl"] .project-card__arrow {
    left: auto;
    right: auto;
    align-self: flex-start;
  }
  .project-card__desc {
    -webkit-line-clamp: 4;
  }

  /* Contact mobile */
  .contact.contact--modern {
    padding: 80px 20px 24px;
    height: auto;
    min-height: 100%;
    overflow-y: auto;
    align-items: flex-start;
  }
  html[dir="rtl"] .contact.contact--modern {
    padding: 80px 20px 24px;
  }
  .contact-shell {
    grid-template-columns: 1fr;
    gap: 0;
    max-width: none;
  }
  .contact-panel,
  html[dir="rtl"] .contact-panel {
    grid-column: 1;
    gap: 22px;
  }
  .contact__title {
    font-size: 32px;
  }
  .contact__subtitle {
    max-width: none;
  }
  .contact-form__reason-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .contact-form__fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .mobile-bottom-nav {
    height: 60px;
  }
  .mobile-bottom-nav__btn {
    font-size: 8.5px;
  }
  .mobile-bottom-nav__btn svg {
    width: 18px;
    height: 18px;
  }
}

/* ============================ RESUME DOWNLOAD DIALOG ============================ */
body.resume-dialog-open {
  overflow: hidden;
}

.resume-dialog {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.resume-dialog.is-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.resume-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.resume-dialog__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 380px);
  padding: 28px 24px 22px;
  background: var(--background-color);
  border: 1px solid rgba(127, 127, 127, 0.28);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.38s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.resume-dialog.is-open .resume-dialog__panel {
  transform: translateY(0) scale(1);
}

.resume-dialog__panel.is-success .resume-dialog__content {
  display: none;
}

.resume-dialog__close {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid rgba(127, 127, 127, 0.25);
  border-radius: var(--radius-sm);
  color: var(--text-color);
  cursor: none;
  overflow: hidden;
}

.resume-dialog__close svg {
  width: 16px;
  height: 16px;
  position: relative;
  z-index: 1;
}

.resume-dialog__eyebrow {
  margin: 0 0 6px;
  font: 700 10px/1 var(--font-primary);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue-color);
  opacity: 0.9;
}

.resume-dialog__title {
  margin: 0 0 8px;
  font: 800 22px/1.15 var(--font-primary);
  color: var(--text-color);
}

.resume-dialog__subtitle {
  margin: 0 0 18px;
  font: 400 13px/1.5 var(--font-primary);
  color: color-mix(in srgb, var(--text-color) 62%, transparent);
}

.resume-dialog__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.resume-dialog__option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  background: transparent;
  border: 1px solid rgba(127, 127, 127, 0.28);
  border-radius: var(--radius-sm);
  color: var(--text-color);
  font: 700 13px/1.2 var(--font-primary);
  text-align: start;
  cursor: none;
  overflow: hidden;
  transition: border-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.resume-dialog__option:hover {
  border-color: var(--blue-color);
  transform: translateY(-1px);
}

.resume-dialog__code {
  flex-shrink: 0;
  min-width: 2.2em;
  font: 800 11px/1 var(--font-primary);
  letter-spacing: 0.08em;
  color: var(--blue-color);
}

.resume-dialog__label {
  flex: 1;
}

.resume-dialog__arrow {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.55;
  position: relative;
  z-index: 1;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.resume-dialog__option:hover .resume-dialog__arrow {
  opacity: 1;
  transform: translateY(2px);
}

.resume-dialog__success {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 28px 12px 18px;
  text-align: center;
}

.resume-dialog__success:not([hidden]) {
  display: flex;
}

.resume-dialog__check {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--blue-color);
  color: #fff;
  animation: resumeCheckPop 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.resume-dialog__check svg {
  width: 28px;
  height: 28px;
}

.resume-dialog__done {
  margin: 0;
  font: 600 14px/1.4 var(--font-primary);
  color: var(--text-color);
  animation: resumeFadeUp 0.45s ease 0.12s both;
}

@keyframes resumeCheckPop {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes resumeFadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

html[dir="rtl"] .resume-dialog__option {
  text-align: right;
}

@media (max-width: 767px) {
  .resume-dialog {
    padding: 16px;
    align-items: flex-end;
  }
  .resume-dialog__panel {
    width: 100%;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
}
