/* ================================================
   JENGWEI PORTFOLIO — INTERACTION BLOCKS
   interactions.css
   6 blocks: cursor · split reveal · magnetic btn ·
             project preview · parallax hero · counter


/* ------------------------------------------------
   PRELOADER — centre on all screen sizes
   (overrides theme.css desktop bottom-right rule)
   ------------------------------------------------ */
@media (min-width: 992px) {
  .preloader {
    align-items: center;
    justify-content: center;
    padding-right: 0;
    padding-bottom: 0;
  }
}

.jw-preloader-name {
  font-size: 1rem;
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: #666;
}

@media (min-width: 992px) {
  .jw-preloader-name {
    font-size: 1.5rem;
  }
}

================================================*/

/* ------------------------------------------------
   1. CUSTOM CURSOR
   ------------------------------------------------ */
body {
  cursor: none;
}

a,
button,
[role="button"],
label,
select,
input[type="submit"] {
  cursor: none;
}

@media (pointer: coarse) {

  /* Touch devices — restore normal cursor */
  body,
  a,
  button,
  [role="button"] {
    cursor: auto;
  }

  .jw-cursor-dot,
  .jw-cursor-ring {
    display: none !important;
  }
}

.jw-cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background: #111;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease,
    background 0.2s ease, opacity 0.2s ease;
  will-change: left, top;
}

.jw-cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(17, 17, 17, 0.35);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease,
    border-color 0.3s ease, opacity 0.2s ease;
  will-change: left, top;
}

/* Hover state — dot shrinks, ring expands */
.jw-cursor-dot.jw-hovering {
  width: 0;
  height: 0;
  background: transparent;
}

.jw-cursor-ring.jw-hovering {
  width: 52px;
  height: 52px;
  border-color: rgba(17, 17, 17, 0.7);
}

/* Dark-section overrides */
.jw-dark .jw-cursor-dot {
  background: #fff;
}

.jw-dark .jw-cursor-ring {
  border-color: rgba(255, 255, 255, 0.35);
}

.jw-dark .jw-cursor-ring.jw-hovering {
  border-color: rgba(255, 255, 255, 0.8);
}


/* ------------------------------------------------
   CONTENT INNER WRAPPER — max 1440px, centred
   Sections remove horizontal padding; this wrapper
   provides it below 1440px and centres above.
   ------------------------------------------------ */
.jw-section-inner {
  max-width: 1472px;
  margin: 0 auto;
  width: 100%;
  padding: 0 6vw;
}

.jw-section-inner p {
  font-weight: 300;
}

@media (min-width: 1472px) {
  .jw-section-inner {
    padding: 0;
  }
}


/* ------------------------------------------------
   FOOTER SECTION — dark contact strip
   ------------------------------------------------ */
.jw-footer-section {
  background: #0e0e10;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 4.5rem 0;
}


/* ------------------------------------------------
   2. HERO + PARALLAX BG LAYER
   ------------------------------------------------ */
.jw-hero {
  position: relative;
  min-height: 100vh;
  background: #0e0e10;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 7rem 0 5rem;
}

/* Background large text (moved by Rellax / mousemove) */
.jw-para-bg-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(90px, 18vw, 240px);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.03);
  letter-spacing: -0.05em;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  will-change: transform;
  z-index: 0;
}

.jw-hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 6vw;
  max-width: 1440px;
  margin: 0 auto;
}

@media (min-width: 1472px) {
  .jw-hero-inner {
    padding: 0;
  }
}

/* ------------------------------------------------
   HERO EYEBROW LABEL
   ------------------------------------------------ */
.jw-hero-eyebrow {
  position: absolute;
  top: 5.5rem;
  left: 6vw;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-size: 11px;
  font-family: 'PT Mono', 'Courier New', monospace;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.35);
  padding: 5px 0;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.6s ease 1.2s;
}

.jw-hero-eyebrow .jw-eyebrow-name {
  color: rgba(255, 255, 255, 0.7);
}

.jw-hero-eyebrow .jw-eyebrow-sep {
  color: rgba(255, 255, 255, 0.15);
}

.jw-hero.jw-loaded .jw-hero-eyebrow {
  opacity: 1;
}

@media (min-width: 1472px) {
  .jw-hero-eyebrow {
    left: calc((100vw - 1440px) / 2);
  }
}


/* ------------------------------------------------
   3. TEXT SPLIT REVEAL
   ------------------------------------------------ */
.jw-split-reveal .jw-split-line {
  display: block;
  overflow: hidden;
  line-height: 1.08;
}

.jw-split-word {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  will-change: transform, opacity;
  /* transition applied via JS inline style-delay */
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.5s ease;
}

.jw-split-reveal.jw-revealed .jw-split-word {
  transform: translateY(0);
  opacity: 1;
}

.jw-hero-headline {
  font-size: clamp(44px, 7.5vw, 100px);
  font-weight: 300;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 1.75rem;
  font-family: 'Lato', sans-serif;
}

.jw-hero-headline .jw-dim {
  color: rgba(255, 255, 255, 0.35);
}

/* Sub-label fades in after words reveal */
.jw-hero-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0 0 2.5rem;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease 0.9s, transform 0.6s ease 0.9s;
}

.jw-hero.jw-loaded .jw-hero-sub {
  opacity: 1;
  transform: translateY(0);
}

/* Scroll hint */
.jw-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 6vw;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.6s ease 1.2s;
}

.jw-hero.jw-loaded .jw-scroll-hint {
  opacity: 1;
}

@media (min-width: 1472px) {
  .jw-scroll-hint {
    left: calc((100vw - 1440px) / 2);
  }
}

.jw-scroll-hint::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
}


/* ------------------------------------------------
   4. MAGNETIC BUTTON
   ------------------------------------------------ */
.jw-mag-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-size: 13px;
  font-family: 'Lato', sans-serif;
  letter-spacing: 0.06em;
  border-radius: 50px;
  cursor: none;
  text-decoration: none;
  will-change: transform;
  transition: background 0.25s ease, border-color 0.25s ease;
  -webkit-font-smoothing: antialiased;
}

.jw-mag-btn:hover,
.jw-mag-btn:focus {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
  text-decoration: none;
  outline: none;
}

.jw-mag-btn .jw-btn-arrow {
  display: inline-block;
  font-style: normal;
  font-size: 15px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.jw-mag-btn:hover .jw-btn-arrow {
  transform: translate(4px, -4px);
}


/* ------------------------------------------------
   5. STATS COUNTER SECTION
   ------------------------------------------------ */
.jw-stats-section {
  background: #0e0e10;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 5rem 0 5.5rem;
}

.jw-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 0;
  width: fit-content;
}

.jw-stat-item {
  padding-right: 4rem;
}

.jw-stat-item:last-child {
  padding-right: 0;
}

.jw-stat-number {
  font-size: clamp(44px, 6vw, 76px);
  font-weight: 300;
  color: #fff;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-family: 'Lato', sans-serif;
}

.jw-stat-plus {
  font-size: 0.45em;
  vertical-align: super;
  color: rgba(255, 255, 255, 0.35);
  margin-left: 2px;
}

.jw-stat-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 0.6rem;
}

@media (max-width: 576px) {
  .jw-stats-grid {
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    gap: 1.5rem;
  }

  .jw-stat-item {
    padding-right: 0;
  }
}


/* ------------------------------------------------
   6. PROJECT LIST WITH HOVER PREVIEW
   ------------------------------------------------ */
.jw-work-section {
  background: #f8f7f4;
  padding: 6rem 0 7rem;
  position: relative;
}

.jw-work-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 3rem;
}

.jw-work-title {
  font-size: clamp(26px, 3.5vw, 44px);
  font-weight: 300;
  color: #111;
  letter-spacing: -0.025em;
  font-family: 'Lato', sans-serif;
}

.jw-work-all-link {
  font-size: 11px;
  color: #999;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1px solid #ccc;
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
  cursor: none;
}

.jw-work-all-link:hover {
  color: #111;
  border-color: #111;
  text-decoration: none;
}

/* List */
.jw-work-list {
  position: relative;
}

.jw-work-item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  text-decoration: none;
  color: inherit;
  transition: padding-left 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.2s;
  cursor: none;
}

.jw-work-item:first-child {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.jw-work-item:hover {
  padding-left: 14px;
  text-decoration: none;
}

.jw-work-item:hover .jw-work-name {
  color: #000;
}

.jw-work-num {
  font-size: 11px;
  color: rgba(0, 0, 0, 0.22);
  font-family: 'PT Mono', 'Courier New', monospace;
  letter-spacing: 0.05em;
}

.jw-work-name {
  font-size: clamp(20px, 2.8vw, 32px);
  font-weight: 300;
  color: #222;
  letter-spacing: -0.02em;
  line-height: 1;
  font-family: 'Lato', sans-serif;
  transition: color 0.2s;
}

.jw-work-meta {
  font-size: 11px;
  color: rgba(0, 0, 0, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
  font-family: 'Lato', sans-serif;
}

/* Floating preview */
.jw-work-preview {
  position: fixed;
  width: 300px;
  height: 210px;
  border-radius: 6px;
  overflow: hidden;
  pointer-events: none;
  z-index: 500;
  opacity: 0;
  transform: scale(0.9) rotate(-1.5deg);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity, left, top;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.jw-work-preview.jw-preview-visible {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.jw-work-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (pointer: coarse),
(max-width: 768px) {
  .jw-work-preview {
    display: none;
  }

  .jw-work-item {
    cursor: pointer;
  }

  .jw-work-all-link {
    cursor: pointer;
  }
}


/* ------------------------------------------------
   NAVBAR — solid background, dark icons
   ------------------------------------------------ */
.fancynavbar-togglerbar,
.fancynavbar-togglerbar.bg-white {
  background-color: #f8f7f4 !important;
}

@media (min-width: 992px) {
  .fancynavbar-togglerbar {
    background-color: #f8f7f4 !important;
  }
}

.fancynavbar-toggler-icon path {
  stroke: rgba(0, 0, 0, 0.65) !important;
}

.fancynavbar-addon-item span {
  color: rgba(0, 0, 0, 0.45) !important;
}