/* ==========================================================================
   aspaz.az — Full Screen CV (ana səhifə tam ekran modalı)
   --------------------------------------------------------------------------
   Ad məkanı: `fscv-`. Yalnız index.php yükləyir.
   Mobil-first: kart kiçik ekranda demək olar bütün ekranı tutur, geniş
   ekranda isə mərkəzdə sabit enli kart kimi görünür.
   ========================================================================== */

/* Modal açıq olanda arxa fon sürüşməsin */
body.fscv-lock { overflow: hidden; }

/* Namizədlərin qabı — görünüşü yoxdur, yalnız JS üçün lövbərdir */
.fscv-root[hidden] { display: none; }

.fscv-slide {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.fscv-slide[hidden] { display: none; }

.fscv-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 9, 12, .72);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .26s ease;
}
.fscv-slide.is-open .fscv-backdrop { opacity: 1; }

/* --------------------------------------------------------------------------
   Kart
   -------------------------------------------------------------------------- */
.fscv-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  /* `dvh` köhnə brauzerlərdə tanınmır və bütün sətir atılır — əvvəlcə `vh` */
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, .1);
  background:
    radial-gradient(circle at 12% 10%, rgba(249, 217, 118, .18), transparent 44%),
    radial-gradient(circle at 90% 90%, rgba(244, 63, 94, .32), transparent 52%),
    linear-gradient(122deg, #1b1b23 0%, #2a1418 55%, #3b1421 100%);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .8);
  opacity: 0;
  transform: translateY(18px) scale(.97);
  transition: opacity .26s ease, transform .26s cubic-bezier(.2, .8, .3, 1);
}
.fscv-slide.is-open .fscv-card { opacity: 1; transform: none; }

/* Bağlama düyməsi */
.fscv-close {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  transition: background .15s ease, transform .15s ease;
}
.fscv-close:hover { background: rgba(255, 255, 255, .22); transform: rotate(90deg); }
.fscv-close svg { display: block; }

/* Avtomatik bağlanma zolağı */
.fscv-timer {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, .12);
}
.fscv-timer i {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #f9d976, #fb5b6e);
}

/* --------------------------------------------------------------------------
   Məzmun
   -------------------------------------------------------------------------- */
.fscv-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 34px 26px 22px;
  text-align: center;
  overscroll-behavior: contain;
  /* Firefox: nazik və şəffaf — tünd kartda brauzerin boz çubuğu yad görünür */
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .28) transparent;
}
/* WebKit/Blink üçün eyni görünüş */
.fscv-body::-webkit-scrollbar { width: 6px; }
.fscv-body::-webkit-scrollbar-track {
  background: transparent;
  /* Çubuq bağlama düyməsinin altından başlasın (düymə 12px + 38px) */
  margin: 54px 0 12px;
}
.fscv-body::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, .26);
  border-radius: 999px;
}
.fscv-body::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, .45); }

.fscv-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f9d976, #c8912a);
  color: #3a2705;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(200, 145, 42, .4);
}
.fscv-badge svg { flex-shrink: 0; }

.fscv-photo {
  position: relative;
  isolation: isolate;
  /* `inline-flex` olsaydı «Seçilmiş aşpaz» nişanı ilə eyni sətirdə dayanardı.
     Blok səviyyəsi + `margin: auto` — öz sətrində və mərkəzdə. */
  display: flex;
  width: 140px;
  height: 140px;
  margin: 18px auto 16px;
}
.fscv-photo::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: linear-gradient(140deg, #f9d976, #fb5b6e 65%, transparent);
  z-index: 0;
}
.fscv-photo img,
.fscv-photo .fscv-photo-fallback {
  position: relative;
  z-index: 1;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, .92);
  box-shadow: 0 14px 34px -14px rgba(0, 0, 0, .9);
  display: block;
}
.fscv-photo .fscv-photo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-tint, #ffe4e9);
  color: var(--color-primary-dark, #d81f3d);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 50px;
}

.fscv-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: -.015em;
  color: #fff;
  overflow-wrap: anywhere;
}
.fscv-role {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: #ffb3c0;
  overflow-wrap: anywhere;
}

.fscv-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}
.fscv-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .13);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, .8);
  white-space: nowrap;
}
.fscv-meta span svg { flex-shrink: 0; opacity: .75; }

.fscv-summary {
  margin: 16px 0 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: rgba(255, 255, 255, .72);
  overflow-wrap: anywhere;
}

.fscv-skills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
}
.fscv-skills span {
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .85);
  font-size: 12px;
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Alt hissə
   -------------------------------------------------------------------------- */
.fscv-foot {
  flex-shrink: 0;
  padding: 16px 22px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, .1);
  background: rgba(0, 0, 0, .18);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fscv-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 13px 24px;
  border-radius: 999px;
  background: linear-gradient(140deg, #fb5b6e, var(--color-primary-dark, #d81f3d));
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 14px 30px -14px rgba(216, 31, 61, 1);
  transition: transform .14s ease, box-shadow .15s ease, filter .15s ease;
}
.fscv-cta:hover { transform: translateY(-2px); filter: brightness(1.05); }
.fscv-cta:active { transform: scale(.98); }
.fscv-cta svg { flex-shrink: 0; transition: transform .15s ease; }
.fscv-cta:hover svg { transform: translateX(3px); }

.fscv-skip {
  border: none;
  background: none;
  padding: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, .55);
  transition: color .15s ease;
}
.fscv-skip:hover { color: #fff; }

/* --------------------------------------------------------------------------
   Uyğunlaşdırma
   -------------------------------------------------------------------------- */
@media (max-width: 560px) {
  .fscv-slide { padding: 10px; }
  .fscv-card { max-width: none; border-radius: 22px; max-height: calc(100vh - 20px); }
  .fscv-card { max-height: calc(100dvh - 20px); }
  .fscv-body { padding: 30px 18px 18px; }
  .fscv-photo, .fscv-photo img, .fscv-photo .fscv-photo-fallback { width: 116px; height: 116px; }
  .fscv-photo .fscv-photo-fallback { font-size: 42px; }
  .fscv-name { font-size: 22px; }
  .fscv-role { font-size: 14px; }
  .fscv-foot { padding: 14px 15px max(14px, env(safe-area-inset-bottom)); }
}

/* Alçaq ekranlarda şəkil yer tutmasın */
@media (max-height: 640px) {
  .fscv-photo, .fscv-photo img, .fscv-photo .fscv-photo-fallback { width: 96px; height: 96px; }
  .fscv-photo .fscv-photo-fallback { font-size: 34px; }
  .fscv-body { padding-top: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .fscv-card, .fscv-backdrop, .fscv-close, .fscv-cta, .fscv-cta svg { transition: none; }
  .fscv-timer i { transition: none !important; }
}

/* --------------------------------------------------------------------------
   Düzəliş: məzmun uzun olanda bacarıq etiketləri alt hissənin xəttinin
   üstündə yarımçıq kəsilirdi. Xülasə 4 sətirlə məhdudlaşdırılır (tam mətn
   CV səhifəsindədir), məzmunun sonu yumşaq solğunlaşır və xətt əvəzinə
   kölgəli keçid istifadə olunur — kəsik görünmür.
   -------------------------------------------------------------------------- */
.fscv-summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
}
.fscv-skills { padding-bottom: 6px; }
.fscv-body { padding-bottom: 26px; }
.fscv-foot {
  position: relative;
  border-top: 0;
  background: rgba(0, 0, 0, .14);
}
/* Məzmun sürüşəndə alt kənar yumşaq itir (rəng zolağı yaratmadan — maska ilə) */
.fscv-body {
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 22px), transparent);
  mask-image: linear-gradient(180deg, #000 calc(100% - 22px), transparent);
}
.fscv-foot::after {
  content: "";
  position: absolute;
  left: 22px; right: 22px; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .14), transparent);
}
@media (max-width: 560px) {
  .fscv-summary { -webkit-line-clamp: 3; line-clamp: 3; }
  .fscv-body { padding-bottom: 22px; }
  .fscv-skills span { padding: 5px 11px; font-size: 11.5px; }
}
@media (max-height: 700px) {
  .fscv-summary { -webkit-line-clamp: 2; line-clamp: 2; }
}
