/* ── Fonts ── */
@font-face {
  font-family: 'Josefin Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/josefin-sans-400.ttf') format('truetype');
}
@font-face {
  font-family: 'Josefin Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/josefin-sans-500.ttf') format('truetype');
}
@font-face {
  font-family: 'Josefin Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/josefin-sans-600.ttf') format('truetype');
}
@font-face {
  font-family: 'Josefin Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/josefin-sans-700.ttf') format('truetype');
}

/* ── CSS variable overrides (tailwind.min.css is pre-compiled) ── */
:root {
  --color-primary: #4d8c58;
  --color-cta:     #FF6347;
  --color-bg:      #F5FAF2;
  --color-bg-dark: #1C1F26;
  --color-surface: #FFFFFF;
  --color-border:  #a8d4b0;
  --color-text:    #1A1A2E;
  --color-muted:   #6B7280;
  --font-sans:     'Josefin Sans', sans-serif;
}

/* ── Base font ── */
body {
  font-family: 'Josefin Sans', sans-serif;
}

/* ── Global transitions (dark mode) ── */
*,
*::before,
*::after {
  transition: background-color 300ms ease, color 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
}

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 500ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ── CTA pulse ── */
.btn-cta {
  transition: box-shadow 300ms ease, transform 200ms ease;
}
.btn-cta:hover {
  box-shadow: 0 0 0 4px rgba(255, 99, 71, 0.3);
  transform: scale(1.03);
}

/* ── Photo strip ── */
.photo-strip-item {
  transition: transform 400ms cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 400ms ease;
}
.photo-strip-item:hover {
  transform: scale(1.05) rotate(0deg) !important;
  box-shadow: 0 8px 32px rgba(0, 206, 209, 0.25);
}

/* ── Pillow nav shadow on scroll ── */
.nav-scrolled {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}
.dark .nav-scrolled {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* ── Nav links — pill button style ── */
.nav-link {
  position: relative;
  padding: 6px 14px;
  border-radius: 999px;
  transition: background 200ms ease, color 200ms ease,
              box-shadow 200ms ease, transform 150ms ease;
}
.nav-link:hover,
.nav-link.active {
  background: transparent;
  color: #4d8c58;
  box-shadow: none;
  transform: none;
  font-weight: 700;
}
.dark .nav-link:hover,
.dark .nav-link.active {
  background: transparent;
  box-shadow: none;
}

/* ── SimFive inline badge link ── */
.simfive-badge {
  display: inline;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  font-size: inherit;
  color: #4d8c58;
  border: 1px solid transparent;
  background: transparent;
  text-decoration: none;
  transition: background 200ms ease, box-shadow 200ms ease,
              transform 150ms ease, border-color 200ms ease;
}
.simfive-badge:hover {
  background: rgba(77, 140, 88, 0.08);
  border-color: rgba(77, 140, 88, 0.3);
  box-shadow: 0 2px 8px rgba(77, 140, 88, 0.15);
  transform: translateY(-1px);
}
.dark .simfive-badge:hover {
  background: rgba(77, 140, 88, 0.1);
  border-color: rgba(77, 140, 88, 0.35);
  box-shadow: 0 2px 12px rgba(77, 140, 88, 0.2);
}

/* ── Experience Cards — hover glow ── */
.exp-card {
  transition: border-color 300ms ease, background 300ms ease, box-shadow 300ms ease;
}
.exp-card:hover {
  border-color: rgba(64, 191, 176, 0.75) !important;
  background: rgba(255, 255, 255, 0.10) !important;
  box-shadow: 0 0 28px rgba(64, 191, 176, 0.18);
}

/* ── Experience Timeline Animations ── */
/* Disable the default Y-shift on exp rows — use directional card anims instead */
#experience .reveal {
  transform: none !important;
}
#experience .reveal.visible {
  transform: none !important;
}

/* ── Smooth scroll ── */
html {
  scroll-behavior: smooth;
}

/* ── Selection color ── */
::selection {
  background: rgba(0, 206, 209, 0.2);
  color: #1A1A2E;
}
.dark ::selection {
  background: rgba(0, 206, 209, 0.3);
  color: #F0FAFA;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #a8d4b0;
  border-radius: 4px;
}
.dark ::-webkit-scrollbar-thumb {
  background: #2a2f3a;
}

/* ── Projects — Flat Tile Slider Style ── */
.proj-card {
  cursor: pointer;
  pointer-events: auto;
  width: 340px;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  background: #fff;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #4d8c58;
  border-radius: 0;
  overflow: hidden;
  transition: background 180ms ease;
  position: relative;
}
.dark .proj-card {
  background: #1c2130;
  border-color: #1c2130;
}
.proj-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  pointer-events: none;
  z-index: 10;
  transition: border-color 200ms ease;
}
.proj-card:hover::after {
  border-color: #4d8c58;
}
.proj-card:hover {
  background: rgba(77,140,88,0.04);
  z-index: 2;
}
.dark .proj-card:hover {
  background: rgba(77,140,88,0.09);
}
.proj-card:hover .proj-img {
  transform: scale(1.04);
}
.proj-img {
  position: relative;
  height: 200px;
  overflow: hidden;
  border-radius: 0;
  border-bottom: 1px solid #4d8c58;
  transition: transform 400ms cubic-bezier(0.22, 1, 0.36, 1);
}
.proj-body {
  padding: 14px 14px 10px;
}
.proj-body h3 {
  font-size: .92rem;
  font-weight: 700;
  color: #1A1A2E;
  margin-bottom: 8px;
  line-height: 1.3;
}
.dark .proj-body h3 {
  color: #f0fafa;
}
.proj-dots,
.proj-dots-grid {
  display: none;
}
.proj-num {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: .65rem;
  font-family: 'JetBrains Mono', monospace;
  color: rgba(255,255,255,.75);
  background: rgba(0,0,0,.28);
  padding: 2px 8px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.proj-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.proj-tags span {
  font-size: .72rem;
  font-family: 'JetBrains Mono', monospace;
  color: #4d8c58;
  border: 1px solid rgba(77,140,88,.4);
  background: rgba(77,140,88,.06);
  padding: 2px 7px;
  border-radius: 999px;
}

/* ── Projects — Brick Grid ── */
.proj-brick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(77,140,88,0.4);
  border-left: 1px solid rgba(77,140,88,0.4);
}
.proj-brick-grid .proj-card {
  width: auto;
  flex-shrink: unset;
  margin: 0;
  padding: 0;
  border-radius: 0;
  border: none;
  border-right: 1px solid rgba(77,140,88,0.4);
  border-bottom: 1px solid rgba(77,140,88,0.4);
}
.proj-brick-grid .proj-card:hover {
  background: rgba(77,140,88,0.04);
  box-shadow: inset 0 0 0 2px rgba(77,140,88,0.55);
  z-index: 1;
}
.dark .proj-brick-grid .proj-card:hover {
  background: rgba(77,140,88,0.09);
}
.proj-brick-grid .proj-img {
  border-radius: 0;
}
.proj-brick-grid .proj-body {
  padding: 12px;
}
@media (max-width: 767px) {
  .proj-brick-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .proj-brick-grid .proj-card {
    width: auto !important;
  }
}

/* ── Projects Marquee v1 (auto-scroll horizontal + pause-on-hover + dots indicator) ── */
@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee-wrapper {
  overflow: hidden;
  border-top: 1px solid #4d8c58;
  border-bottom: 1px solid #4d8c58;
}
.marquee-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: marquee-scroll 55s linear infinite;
  will-change: transform;
  padding: 16px 10px;
}
.marquee-wrapper:hover .marquee-track {
  animation-play-state: paused;
}

/* dots indicator — sits below marquee, one dot per unique project, active = currently scrolling past */
.marquee-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.marquee-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(77, 140, 88, 0.3);
  transition: background-color 250ms ease, width 250ms ease;
}
.marquee-dot.active {
  background: #4d8c58;
  width: 26px;
}

/* ── Lightbox v2 — full-image + glassmorphism overlay info ── */
#proj-lightbox { animation: lb-in 200ms ease; }
@keyframes lb-in { from { opacity:0; } to { opacity:1; } }
#proj-panel      { animation: panel-up 280ms cubic-bezier(0.22,1,.36,1); }
@keyframes panel-up {
  from { opacity:0; transform:scale(.93) translateY(16px); }
  to   { opacity:1; transform:scale(1)   translateY(0);    }
}

/* desktop: full-image panel with floating glassmorphism overlay (bottom-left) */
.proj-panel-2col {
  max-width: 1100px;
  width: 100%;
  position: relative;
  aspect-ratio: 16 / 10;
  display: block;
}
.proj-lbimg-2col {
  position: absolute;
  inset: 0;
  background-color: #f4f7f3;
}
.dark .proj-lbimg-2col {
  background-color: #0d1117;
}
.proj-lbinfo-2col {
  position: absolute;
  left: 1.75rem;
  bottom: 1.75rem;
  max-width: 420px;
  padding: 1.25rem 1.5rem 1.35rem;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18);
  z-index: 5;
}
.dark .proj-lbinfo-2col {
  background: rgba(15, 17, 23, 0.45);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
}
/* tighter typography for overlay (HTML keeps text-2xl/mb-* — we override here) */
.proj-lbinfo-2col #proj-lbtitle { font-size: 1.25rem; margin-bottom: 0.45rem; }
.proj-lbinfo-2col #proj-lbdesc  { font-size: 0.9rem;  line-height: 1.5; margin-bottom: 0.75rem; }
.proj-lbinfo-2col #proj-lbtags  { margin-bottom: 0.75rem; }

/* tablet & mobile: panel becomes taller, overlay spans full width at bottom */
@media (max-width: 860px) {
  .proj-panel-2col {
    max-width: 560px;
    aspect-ratio: 4 / 5;
  }
  .proj-lbinfo-2col {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: none;
    padding: 1rem 1.25rem 1.15rem;
  }
}
@media (max-width: 480px) {
  .proj-panel-2col { aspect-ratio: 3 / 4; }
  .proj-lbinfo-2col {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    padding: 0.9rem 1.1rem 1rem;
  }
  .proj-lbinfo-2col #proj-lbtitle { font-size: 1.1rem; }
}

/* ── Lightbox mobile helpers — hidden on desktop ── */
.lb-sheet-handle { display: none; }
.lb-nav-arrow    { display: none; }

/* ── Language switcher dropdown ── */
.lang-switch {
  position: relative;
}
.lang-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--color-text);
  background: transparent;
  border: 1px solid rgba(77,140,88,0.3);
  border-radius: 8px;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}
.lang-btn:hover {
  background: rgba(77,140,88,0.07);
  border-color: rgba(77,140,88,0.5);
}
.dark .lang-btn {
  color: #d1d5db;
  border-color: rgba(255,255,255,0.15);
}
.dark .lang-btn:hover {
  background: rgba(255,255,255,0.07);
}
.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 110px;
  background: #fff;
  border: 1px solid rgba(77,140,88,0.25);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  overflow: hidden;
  z-index: 100;
}
.dark .lang-dropdown {
  background: #1C1F26;
  border-color: rgba(255,255,255,0.1);
}
.lang-dropdown.open { display: block; }
.lang-dropdown a {
  display: block;
  padding: 8px 14px;
  font-size: .8rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  transition: background 150ms ease;
}
.dark .lang-dropdown a { color: #d1d5db; }
.lang-dropdown a:hover { background: rgba(77,140,88,0.08); }

/* ── Mobile menu ── */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 350ms cubic-bezier(0.22, 1, 0.36, 1);
}
.mobile-menu.open {
  max-height: 300px;
}

/* ── Custom Cursor Ring ── */

#cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  border: 2px solid #4d8c58;
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  opacity: 0;
  will-change: transform;
  transition: opacity 200ms ease;
}

/* ── Footer reveal on scroll ── */
body {
  overflow-x: clip; /* clip does NOT create BFC — sticky still works; hidden breaks it */
}
#page-wrap {
  position: relative;
  z-index: 1;
}
footer#contact {
  position: sticky;
  bottom: 0;
  z-index: 0;
}

/* ── Experience Accordion ── */
.exp-acc summary { list-style: none; }
.exp-acc summary::-webkit-details-marker { display: none; }
.acc-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Mobile overrides (< 768px) ── */
@media (max-width: 767px) {

  /* Experience: fshih linjën qendrore dhe dot-et absolute */
  .exp-timeline > div[style*="position:absolute"] { display: none !important; }

  /* Timeline rows: stack vertikalisht, jo grid 3-kolona */
  .exp-timeline > .reveal {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    margin-bottom: 1.5rem;
  }

  /* Fshih kolonën qendrore (year badge + vija lidhëse) */
  .exp-timeline > .reveal > div:nth-child(2) {
    display: none !important;
  }

  /* Fshih kolonat boshe (div:empty) */
  .exp-timeline > .reveal > div:empty { display: none !important; }

  /* Karta: full width, pa padding anash */
  .exp-timeline > .reveal > div:not(:empty) {
    padding: 0 !important;
  }

  /* ── Slider → Scroll-snap carousel ── */
  .marquee-wrapper {
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .marquee-wrapper::-webkit-scrollbar { display: none; }
  .marquee-wrapper:hover .marquee-track { animation-play-state: unset; }
  .marquee-track {
    animation: none !important;
    gap: 0 !important;
    padding: 12px 0 !important;
  }
  .marquee-track .proj-card[aria-hidden] { display: none !important; }
  .proj-card {
    width: calc(100vw - 32px) !important;
    scroll-snap-align: center !important;
    border-radius: 8px !important;
    margin: 0 8px !important;
    flex-shrink: 0;
  }
  .proj-img { height: 200px !important; border-radius: 8px 8px 0 0 !important; }
  .marquee-dot { cursor: pointer; }

  /* ── Lightbox → Fullscreen gallery ── */
  #proj-lightbox {
    padding: 0 !important;
    align-items: stretch !important;
  }
  .proj-panel-2col {
    aspect-ratio: unset !important;
    max-width: none !important;
    border-radius: 0 !important;
    background: #000 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    height: 100% !important;
  }
  .proj-lbimg-2col {
    position: relative !important;
    flex: 1 1 0% !important;
    min-height: 0 !important;
    background-color: #000 !important;
  }
  /* bottom sheet */
  .proj-lbinfo-2col {
    position: relative !important;
    flex-shrink: 0 !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    top: auto !important;
    inset: auto !important;
    max-width: none !important;
    width: 100% !important;
    border-radius: 16px 16px 0 0 !important;
    margin-top: -16px;
    background: rgba(10,12,18,0.94) !important;
    backdrop-filter: blur(24px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(160%) !important;
    padding: 0 1.25rem 2.5rem !important;
    max-height: 42vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: none !important;
    box-shadow: none !important;
    z-index: 5;
  }
  /* sheet handle bar */
  .lb-sheet-handle {
    display: block !important;
    width: 36px;
    height: 4px;
    background: rgba(255,255,255,0.32);
    border-radius: 2px;
    margin: 10px auto 14px;
    flex-shrink: 0;
  }
  /* sheet typography */
  .proj-lbinfo-2col #proj-lbtitle {
    font-size: 1rem !important;
    margin-bottom: 0.4rem !important;
    color: #f0fafa !important;
  }
  .proj-lbinfo-2col #proj-lbdesc {
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
    margin-bottom: 0.65rem !important;
    color: rgba(190,205,215,0.9) !important;
  }
  .proj-lbinfo-2col #proj-lbtags { margin-bottom: 0.75rem !important; }
  .proj-lbinfo-2col #proj-lburl  {
    font-size: 0.8rem !important;
    padding: 0.4rem 0.9rem !important;
  }
  /* close button — bigger tap target */
  #proj-lbclose {
    width: 44px !important;
    height: 44px !important;
    top: 12px !important;
    right: 12px !important;
    font-size: 1rem !important;
    background: rgba(0,0,0,0.52) !important;
  }
  /* nav arrows */
  .lb-nav-arrow {
    display: flex !important;
    position: absolute;
    top: 38%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(0,0,0,0.42);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.88);
    font-size: 1.6rem;
    align-items: center;
    justify-content: center;
    z-index: 20;
    cursor: pointer;
    transition: background 180ms ease;
    line-height: 1;
  }
  .lb-nav-arrow:active { background: rgba(0,0,0,0.65); }
  .lb-nav-prev { left: 10px; }
  .lb-nav-next { right: 10px; }
  .lb-nav-arrow[disabled] { opacity: 0.22; pointer-events: none; }
}
