/* ══════════════════════════════════════════════════════
   SMOOTH SCROLL — index2
   scroll-behavior: smooth untuk native anchor + custom easing
══════════════════════════════════════════════════════ */
html {
    scroll-behavior: smooth;
}

/* ── Scroll offset untuk section (kompensasi navbar fixed) ── */
section[id] {
    scroll-margin-top: 90px;
}

/* ── Navbar Active Link Indicator ── */
header nav a.nav-active {
    color: #096B5B !important;
    background: rgba(9, 107, 91, 0.10) !important;
    border-radius: 8px !important;
    padding: 0.25rem 0.75rem !important;
    font-weight: 700 !important;
}

/* Underline dot aktif di bawah link */
header nav a.nav-active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    background: #096B5B;
    border-radius: 50%;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.dark header nav a.nav-active {
    color: #5eead4 !important;
    background: rgba(9, 107, 91, 0.18) !important;
}

/* Mobile dropdown active link */
#mobileMenuDropdown a.nav-active {
    color: #096B5B !important;
    background: rgba(9, 107, 91, 0.10) !important;
    font-weight: 700;
}

.dark #mobileMenuDropdown a.nav-active {
    color: #5eead4 !important;
    background: rgba(9, 107, 91, 0.18) !important;
}

/* ── Smooth scroll progress bar di atas viewport ── */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #096B5B, #14b8a6);
    z-index: 9999;
    border-radius: 0 2px 2px 0;
    transition: width 0.1s linear;
    pointer-events: none;
}

/* ── Material Symbols: paksa render sebagai icon ── */
        .material-symbols-outlined {
            font-family: 'Material Symbols Outlined';
            font-weight: normal;
            font-style: normal;
            font-size: 24px;
            line-height: 1;
            letter-spacing: normal;
            text-transform: none;
            display: inline-block;
            white-space: nowrap;
            word-wrap: normal;
            direction: ltr;
            font-feature-settings: 'liga';
            -webkit-font-feature-settings: 'liga';
            -webkit-font-smoothing: antialiased;
            vertical-align: middle;
        }

        /* ── Loading Screen ── */
        #loadingScreen {
            position: fixed; inset: 0;
            background: #E8E0D0;
            z-index: 9999;
            display: flex; flex-direction: column;
            align-items: center; justify-content: center;
            transition: opacity 0.5s ease;
        }
        #loadingScreen.fade-out { opacity: 0; pointer-events: none; }
        .progress-bar-wrap { width: 180px; height: 2px; background: rgba(9,107,91,0.15); border-radius: 10px; margin-top: 20px; overflow: hidden; }
        .progress-bar-fill { height: 100%; width: 0%; background: #096B5B; border-radius: 10px; transition: width 0.1s linear; }
        #loadingPercentage { font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .15em; color: rgba(9,107,91,.55); text-transform: uppercase; margin-top: 14px; }

        /* ── Popup Modal ── */
        #popupOverlay {
            position: fixed; inset: 0; z-index: 200;
            background: rgba(0,0,0,.6);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            display: flex; align-items: center; justify-content: center;
            padding: 16px;
            opacity: 0; pointer-events: none;
            transition: opacity .35s ease;
        }
        #popupOverlay.active { opacity: 1; pointer-events: all; }
        .popup-container {
            background: #fff;
            border-radius: 2.5rem;
            overflow: hidden;
            max-width: 860px; width: 100%;
            display: flex; flex-direction: column;
            box-shadow: 0 30px 80px rgba(0,0,0,.25);
            position: relative;
        }
        @media (min-width: 768px) { .popup-container { flex-direction: row; } }
        .popup-img-col { width: 100%; height: 200px; flex-shrink: 0; }
        @media (min-width: 768px) { .popup-img-col { width: 45%; height: auto; } }
        .popup-img-col img { width: 100%; height: 100%; object-fit: cover; }
        .popup-text-col { padding: 2rem 2.2rem; display: flex; flex-direction: column; justify-content: center; }
        @media (min-width: 768px) { .popup-text-col { padding: 3rem 3.2rem; } }
        .popup-close-btn {
            position: absolute; top: 14px; right: 14px; z-index: 10;
            background: rgba(0,0,0,.1); border: none; cursor: pointer;
            width: 36px; height: 36px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            transition: background .2s;
        }
        @media (max-width: 768px) {
            .popup-container {
                flex-direction: column;
                max-width: 88%;
                border-radius: 1.5rem;
            }
            .popup-img-col {
                display: block !important;
                width: 140px !important;
                height: 140px !important;
                margin: 2rem auto 0 !important;
                border-radius: 50% !important;
                overflow: hidden !important;
            }
            .popup-text-col {
                width: 100%;
                padding: 1.5rem !important;
                text-align: center;
                align-items: center;
            }
            .popup-text-col h2 {
                font-size: 1.5rem !important;
                margin-bottom: 0.5rem !important;
            }
            .popup-text-col .space-y-3 {
                font-size: 0.75rem !important;
                line-height: 1.5 !important;
                margin-bottom: 1.5rem !important;
            }
            .popup-text-col a {
                align-self: center !important;
                padding: 0.6rem 1.2rem !important;
            }
        }
        
        .popup-close-btn:hover { background: rgba(0,0,0,.2); }
        .popup-close-btn .material-symbols-outlined { font-size: 20px; }
        .dark #popupOverlay .popup-container { background: #1c2a24; }

        /* ── Scroll Reveal Animation ── */
        .scroll-animate { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
        .scroll-animate.active { opacity: 1; transform: translateY(0); }

        /* ── Typewriter Caret ── */
        .typewriter-caret {
            display: inline-block;
            width: 0.08em;
            height: 0.85em;
            background: currentColor;     /* inherits #096B5B from h1 */
            margin-left: 0.06em;
            vertical-align: baseline;
            border-radius: 2px;
            animation: tw-blink 1.1s cubic-bezier(0.4, 0, 0.6, 1) infinite;
            will-change: opacity;
        }

        @keyframes tw-blink {
            0%, 45%  { opacity: 1; }
            55%, 100% { opacity: 0; }
        }


        /* ── Testimonial Carousel ── */
        .testi-track { display: flex; transition: transform .65s cubic-bezier(.25,.46,.45,.94); }
        .testi-slide { min-width: 100%; }
        .testi-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(9,107,91,.25); transition: all .3s; cursor: pointer; }
        .testi-dot.active { background: #096B5B; width: 22px; border-radius: 4px; }

        /* ── Language Skills Animation ── */
        .language-item {
            opacity: 0;
            transform: translateY(16px);
            transition: opacity .6s ease, transform .6s ease;
        }
        .language-item.animate {
            opacity: 1;
            transform: translateY(0);
        }

        /* ══════════════════════════════════════════════════════════════════
           GLOBAL DARK MODE — All pages, all components
           Teal accent #096B5B  →  warm cream #e9e0d1  in dark mode
           ══════════════════════════════════════════════════════════════════ */

        /* ── Base ── */
        .dark body { background-color: #1a2e26; color: #e6efe8; }

        /* ── Navbar ── */
        .dark header a,
        .dark header nav a,
        .dark #mobileMenuDropdown a { color: #ffffff !important; }
        .dark header nav a.font-display { color: #e9e0d1 !important; }

        /* ── All teal text → warm cream in dark ── */
        .dark .text-primary-teal,
        .dark [class*="text-primary-teal"] { color: #e9e0d1 !important; }

        /* ── All teal backgrounds → dark teal tint ── */
        .dark .bg-primary-teal { background-color: #e9e0d1 !important; color: #1a2e26 !important; }
        .dark .bg-primary-teal * { color: #1a2e26 !important; }

        /* ── Teal border → muted warm border ── */
        .dark .border-primary-teal { border-color: rgba(233,224,209,0.3) !important; }
        .dark [class*="border-primary-teal"] { border-color: rgba(233,224,209,0.2) !important; }

        /* ── Teal hover ring ── */
        .dark [class*="hover:text-primary-teal"]:hover { color: #e9e0d1 !important; }
        .dark [class*="hover:bg-primary-teal"]:hover { background-color: rgba(233,224,209,0.15) !important; }

        /* ── Accent soft bg ── */
        .dark .bg-accent-soft\/30 { background-color: rgba(255,255,255,0.04) !important; }

        /* ── Body warm bg ── */
        .dark .bg-bg-warm { background-color: #1a2e26 !important; }

        /* ── About skill cards ── */
        .dark #about .grid > div,
        .dark #about .grid > div .font-bold,
        .dark #about .grid > div .material-symbols-outlined { color: #ffffff !important; }
        .dark #about .grid > div img,
        .dark #about .grid > div svg { filter: brightness(200%) contrast(120%) !important; }

        /* ── Portfolio cards (clean image style) ── */
        .dark .pgp-card-trigger { box-shadow: 0 4px 20px rgba(0,0,0,0.4); }

        /* ── pc-btn (static portfolio card button) ── */
        .dark .pc-btn {
            background: rgba(255,255,255,0.12);
            border-color: rgba(255,255,255,0.18);
            color: #fff;
        }
        .dark .pc-btn:hover {
            background: rgba(255,255,255,0.22);
            color: #e9e0d1;
        }

        /* ── Recent Project magnetic button in dark ── */
        .dark .rp-magnetic-btn {
            background: rgba(255,255,255,0.1);
            color: #e9e0d1;
            border: 1px solid rgba(255,255,255,0.18);
        }
        .dark .rp-magnetic-btn:hover {
            background: rgba(255,255,255,0.2);
            color: #fff;
        }

        /* ── pgp popup magnetic CTA in dark ── */
        .dark .pgp-more-magnetic {
            background: rgba(255,255,255,0.1);
            color: #e9e0d1;
            backdrop-filter: blur(12px);
            border: 1px solid rgba(255,255,255,0.15);
        }
        .dark .pgp-more-magnetic:hover {
            background: rgba(255,255,255,0.2);
            color: #fff;
        }

        /* ── Filter buttons (wedding, gdesign, graduation pages) ── */
        .dark .filter-btn:not(.active) {
            background: rgba(255,255,255,0.06);
            color: #c8d8cc;
            border-color: rgba(255,255,255,0.12);
        }
        .dark .filter-btn:not(.active):hover {
            background: rgba(233,224,209,0.12);
            color: #e9e0d1;
            border-color: rgba(233,224,209,0.3);
        }
        .dark .filter-btn.active {
            background: #e9e0d1 !important;
            color: #1a2e26 !important;
            border-color: #e9e0d1 !important;
            box-shadow: 0 8px 25px rgba(233,224,209,0.15);
        }

        /* ── Tool / Software cards ── */
        .dark .tool-item { background: rgba(28,42,36,0.65); border-color: rgba(255,255,255,0.06); }
        .dark .tool-name { color: #e6efe8; }
        .dark .tool-item:hover .tool-icon img { filter: brightness(180%) !important; }

        /* ── Language skill cards ── */
        .dark .language-item { background: rgba(255,255,255,0.04) !important; border-color: rgba(255,255,255,0.08) !important; }
        .dark .language-item .text-primary-teal { color: #e9e0d1 !important; }

        /* ── Footer ── */
        .dark footer { background-color: #162420; }
        .dark footer p.text-zinc-400,
        .dark footer span.text-zinc-400 { color: #8aa898 !important; }
        .dark footer a.text-primary-teal { color: #e9e0d1 !important; }
        .dark footer a.text-zinc-600 { color: #c8d8cc !important; }
        .dark footer .border-black\/5 { border-color: rgba(255,255,255,0.06) !important; }

        /* ── Contact section inputs/labels ── */
        .dark input, .dark textarea, .dark select {
            background: rgba(255,255,255,0.06) !important;
            border-color: rgba(255,255,255,0.12) !important;
            color: #e6efe8 !important;
        }
        .dark input::placeholder, .dark textarea::placeholder { color: #8aa898 !important; }
        .dark label { color: #c8d8cc !important; }

        /* ── CTA buttons: bg-zinc-800 → stays dark, text white ── */
        .dark .bg-zinc-800 { background-color: rgba(255,255,255,0.08) !important; }
        .dark .hover\:bg-black:hover { background-color: rgba(255,255,255,0.15) !important; }

        /* ── Dividers ── */
        .dark .border-black\/5 { border-color: rgba(255,255,255,0.06) !important; }
        .dark .border-t.border-black\/5 { border-top-color: rgba(255,255,255,0.06) !important; }

        /* ── Testimonial cards ── */
        .dark .testi-slide > div { background: rgba(255,255,255,0.04) !important; border-color: rgba(255,255,255,0.08) !important; }
        .dark .testi-dot { background: rgba(233,224,209,0.25); }
        .dark .testi-dot.active { background: #e9e0d1; }

        /* ── Scroll progress bar ── */
        .dark #scroll-progress { background: linear-gradient(90deg, #e9e0d1, #8aa898); }

        /* ── Loading screen dark ── */
        .dark #loadingScreen { background: #1a2e26; }
        .dark .progress-bar-wrap { background: rgba(233,224,209,0.15); }
        .dark .progress-bar-fill { background: #e9e0d1; }
        .dark #loadingPercentage { color: rgba(233,224,209,0.55); }

                /* ===== Tools / Software section styles (add into existing <style>) ===== */
        #tools { --card-bg: rgba(255,255,255,0.6); }

.linear-underline {
  width: 72px;
  height: 4px;
  background: #096B5B; /* primary-teal */
  border-radius: 999px;
  margin: 8px auto 0;
  box-shadow: 0 4px 18px rgba(9,107,91,0.06);
}

/* Grid: 2 mobile, 3 tablet, 4 desktop */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: center;
  justify-items: center;
  margin-top: 18px;
  max-width: 48rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

/* Breakpoints */
@media (min-width: 640px) { /* sm */
  .tools-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
}
@media (min-width: 1024px) { /* lg */
  .tools-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
}

/* Individual tool card */
.tool-item {
  width: 100%;
  max-width: 156px;
  background: var(--card-bg);
  border-radius: 1.25rem; /* rounded-2xl */
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(9,107,91,0.08); /* subtle teal border */
  box-shadow: 0 6px 18px rgba(15,23,42,0.04);
  transition: transform .22s ease, box-shadow .22s ease;
  text-align: center;
}

/* Hover effect */
.tool-item:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 14px 36px rgba(9,107,91,0.08);
}

/* Icon container */
.tool-icon {
  width: 72px;
  height: 72px;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;
  flex-shrink: 0;
}

/* Ensure SVG fits and gets a teal tint via filter (works reliably for monochrome SVGs from simple-icons) */
.tool-icon img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  transition: filter .18s ease, transform .18s ease;
}

/* Slight pop on icon hover */
.tool-item:hover .tool-icon img {
  transform: scale(1.06);
  filter: invert(29%) black(24%) saturate(100%) hue-rotate(136deg) brightness(98%) contrast(95%);
}

/* Tool name */
.tool-name {
  font-family: Inter, sans-serif;
  color: #0f1724; /* text-zinc-800 */
  font-weight: 600;
  font-size: 0.875rem; /* text-sm */
  line-height: 1.05;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 100%;
}

/* Dark mode tweaks */
.dark .tool-item { background: rgba(28,38,36,0.65); border: 1px solid rgba(255,255,255,0.04); }
.dark .tool-name { color: #e6efe8; }

/* ── Hero Canvas Particle Background — desktop only ── */
#home-canvas {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    z-index: 0;
    pointer-events: none;   /* canvas captures mouse via JS, not CSS */
    display: block;
}

/* Kill canvas entirely on touch/mobile */
@media (hover: none), (pointer: coarse) {
    #home-canvas { display: none !important; }
}

/* All home content sits above the canvas */
#home > *:not(#home-canvas) {
    position: relative;
    z-index: 1;
}
    
#lightbox {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#lightbox.active {
  display: flex;
  opacity: 1;
}

/* Filter Button Styles - TAMBAHKAN INI */
.filter-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.filter-btn:not(.active) {
    background: #ffffff;
    color: #6b7280; /* gray-500 */
    border: 2px solid #d1d5db; /* gray-300 */
}

.filter-btn.active {
    background: #096B5B !important; /* primary-teal */
    color: white !important;
    border-color: #096B5B !important;
    box-shadow: 0 8px 25px rgba(9, 107, 91, 0.3);
    transform: translateY(-2px);
}

.filter-btn:hover:not(.active) {
    background: #f8fafc !important; /* slate-50 */
    color: #096B5B !important;
    border-color: #096B5B !important;
    transform: translateY(-1px);
}

.filter-btn:active {
    transform: translateY(0) !important;
}

/* Ripple effect saat klik */
.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.filter-btn:active::before {
    width: 300px;
    height: 300px;
}

.dark .filter-btn:not(.active) {
    background: #1f2937; /* gray-800 */
    color: #d1d5db; /* gray-300 */
    border-color: #4b5563; /* gray-600 */
}

.dark .filter-btn:hover:not(.active) {
    background: #374151; /* gray-700 */
    color: #10b981; /* emerald-400 */
    border-color: #10b981;
}

/* ═══════════════════════════════════════════════════ */
/* NAVBAR CLEAN & STAY - Kompatibel index2.html + wedding.html */
/* ═══════════════════════════════════════════════════ */

/* Navbar Base - STAY VISIBLE, NO HIDE */
header nav {
    position: center !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    
    /* Clean glassmorphism */
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    
    /* Clean border only */
    border: 1px solid rgba(229, 231, 235, 0.8) !important;
    border-top: none !important;
    
    /* ❌ NO SHADOW - SUPER CLEAN */
    box-shadow: none !important;
    
    /* Smooth transition */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Navbar scrolled state - subtle enhancement */
header nav.scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    border-color: rgba(229, 231, 235, 1) !important;
}

/* Dark Mode Navbar */
.dark header nav {
    background: rgba(31, 41, 55, 0.95) !important;
    border-color: rgba(75, 85, 79, 0.8) !important;
}

.dark header nav.scrolled {
    background: rgba(31, 41, 55, 0.98) !important;
    border-color: rgba(75, 85, 79, 1) !important;
}

/* Navbar Links - Enhanced hover */
header nav a {
    transition: all 0.2s ease !important;
    position: relative;
}

header nav a:not(.font-display):hover {
    color: #096B5B !important;
    background: rgba(9, 107, 91, 0.08) !important;
    border-radius: 8px !important;
    padding: 0.25rem 0.75rem !important;
}

/* Mobile Menu Button */
header #mobileMenu,
header #darkModeToggle {
    transition: all 0.2s ease !important;
}

header #mobileMenu:hover,
header #darkModeToggle:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    border-radius: 50% !important;
}

/* Dark mode hover states */
.dark header nav a:not(.font-display):hover {
    background: rgba(9, 107, 91, 0.15) !important;
    color: #14b8a6 !important;
}

.dark header #mobileMenu:hover,
.dark header #darkModeToggle:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Mobile Dropdown - Clean */
#mobileMenuDropdown {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(229, 231, 235, 0.8) !important;
    box-shadow: none !important;
}

.dark #mobileMenuDropdown {
    background: rgba(31, 41, 55, 0.95) !important;
    border-color: rgba(75, 85, 79, 0.8) !important;
}

/* ═══════════════════════════════════════════════════ */
/* HAPUS SEMUA TRANSFORM HIDE NAVBAR */
/* ═══════════════════════════════════════════════════ */
header nav,
header {
    transform: none !important;
    will-change: auto !important;
}

/* Pastikan navbar TIDAK pernah hide */
header nav * {
    animation: none !important;
}

/* Responsive padding */
@media (max-width: 768px) {
    header nav {
        padding: 0.75rem 1rem !important;
        margin: 0 1rem !important;
    }
}

/* Mobile Dropdown Animation */
#mobileMenuDropdown {
    transform: translateY(-10px);
    opacity: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobileMenuDropdown:not(.hidden) {
    transform: translateY(0);
    opacity: 1;
}

/* Active menu button */
#mobileMenu.active {
    background: rgba(9, 107, 91, 0.1) !important;
}

/* ══════════════════════════════════════════════════════════════════
   PORTFOLIO GRID POPUP — Desktop ONLY
   ALL rules are inside @media (hover: hover) and (pointer: fine).
   On mobile/tablet this entire block is invisible to the browser.
   ══════════════════════════════════════════════════════════════════ */

/* Hard kill-switch: coarse/touch devices see NOTHING from this feature */
@media (hover: none), (pointer: coarse) {
    .pgp-overlay,
    .pgp-overlay.pgp-active,
    .pgp-overlay.pgp-closing {
        display: none !important;
        opacity: 0 !important;
        pointer-events: none !important;
        visibility: hidden !important;
    }
    /* Ensure card articles have zero hover transforms on touch */
    .pgp-card-trigger {
        transform: none !important;
        box-shadow: none !important;
        transition: none !important;
    }
}

/* All popup styles exclusively for true-pointer hover devices */
@media (hover: hover) and (pointer: fine) {

    /* Grid container: relative so popup anchors to its center */
    .pgp-grid-wrap {
        position: relative;
    }

    /* ── Centered liquid popup overlay ── */
    .pgp-overlay {
        position: absolute;
        top: var(--start-y, 50%);
        left: var(--start-x, 50%);
        width: var(--start-w, min(760px, 90%));
        height: var(--start-h, 400px);
        transform: translate(0, 0);
        background: #000;
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 2rem;
        box-shadow:
            0 32px 80px rgba(0, 0, 0, 0.4),
            0 8px 24px rgba(0, 0, 0, 0.2);
        overflow: hidden;
        opacity: 0;
        filter: blur(8px) brightness(1.2);
        pointer-events: none;
        transition:
            top 0.55s cubic-bezier(0.22, 1, 0.36, 1),
            left 0.55s cubic-bezier(0.22, 1, 0.36, 1),
            width 0.55s cubic-bezier(0.22, 1, 0.36, 1),
            height 0.55s cubic-bezier(0.22, 1, 0.36, 1),
            transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
            opacity 0.4s ease-out,
            border-radius 0.55s cubic-bezier(0.22, 1, 0.36, 1),
            filter 0.55s cubic-bezier(0.22, 1, 0.36, 1);
        z-index: 100;
        will-change: top, left, width, height, transform, opacity, filter, border-radius;
    }

    .dark .pgp-overlay {
        border-color: rgba(255, 255, 255, 0.12);
        box-shadow:
            0 32px 80px rgba(0, 0, 0, 0.6),
            0 8px 24px rgba(0, 0, 0, 0.4);
    }

    /* Open state — fully expanded */
    .pgp-overlay.pgp-active {
        opacity: 1;
        filter: blur(0px) brightness(1);
        top: 50%;
        left: 50%;
        width: var(--end-w, 760px);
        height: var(--end-h, 427px);
        transform: translate(-50%, -50%);
        border-radius: 2.5rem;
        pointer-events: auto;
    }

    /* Closing state — morphs back to card */
    .pgp-overlay.pgp-closing {
        top: var(--start-y, 50%);
        left: var(--start-x, 50%);
        width: var(--start-w, min(760px, 90%));
        height: var(--start-h, 400px);
        transform: translate(0, 0);
        border-radius: 2rem;
        opacity: 0;
        filter: blur(8px) brightness(0.8);
        pointer-events: none;
    }

    /* Image section - full cover */
    .pgp-img-wrap {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
        background: #000;
    }

    .pgp-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
        transform: scale(1.15);
    }

    .pgp-overlay.pgp-active .pgp-img {
        transform: scale(1);
    }

    /* Gradient fade bottom of image */
    .pgp-img-wrap::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0.1) 100%);
        pointer-events: none;
    }

    .dark .pgp-img-wrap::after {
        background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.2) 100%);
    }

    /* Content section - overlay structure */
    .pgp-content-overlay {
        position: absolute;
        inset: 0;
        z-index: 2;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        padding: 2.5rem;
        pointer-events: none; /* Let mouse interact with magnetic wrap */
    }

    /* Title card */
    .pgp-info-card {
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        padding: 1.25rem 1.5rem;
        border-radius: 1.25rem;
        margin-bottom: 0.75rem;
        max-width: 65%;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        transform: translateY(20px);
        opacity: 0;
        transition: all 0.5s cubic-bezier(0.2, 1, 0.3, 1);
        transition-delay: 0.1s;
    }

    .dark .pgp-info-card {
        background: rgba(0, 0, 0, 0.25);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .pgp-overlay.pgp-active .pgp-info-card {
        transform: translateY(0);
        opacity: 1;
    }

    .pgp-title {
        font-family: 'Fraunces', serif;
        font-size: 1.6rem;
        font-weight: 700;
        color: #fff;
        margin-bottom: 0.3rem;
        line-height: 1.2;
    }

    .pgp-desc {
        font-size: 0.85rem;
        color: rgba(255, 255, 255, 0.9);
        line-height: 1.5;
    }

    /* Tags */
    .pgp-tags-card {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        transform: translateY(20px);
        opacity: 0;
        transition: all 0.5s cubic-bezier(0.2, 1, 0.3, 1);
        transition-delay: 0.15s;
    }

    .pgp-overlay.pgp-active .pgp-tags-card {
        transform: translateY(0);
        opacity: 1;
    }

    /* Hide Info and Tags smoothly when hovering overlay */
    .pgp-overlay:hover .pgp-info-card,
    .pgp-overlay:hover .pgp-tags-card {
        opacity: 0;
        filter: blur(8px);
        transform: translateY(15px);
        transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        transition-delay: 0s;
        pointer-events: none;
    }

    .pgp-tag {
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        padding: 6px 14px;
        border-radius: 999px;
        color: #fff;
        background: rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.15);
        box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    }

    .dark .pgp-tag {
        background: rgba(0, 0, 0, 0.3);
        border-color: rgba(255, 255, 255, 0.1);
    }

    /* Floating Cursor CTA */
    .pgp-more-magnetic {
        position: absolute;
        top: 0;
        left: 0;
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 12px 24px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.95);
        color: #096b5b;
        text-decoration: none;
        font-weight: 600;
        font-size: 0.85rem;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        opacity: 0;
        transform: translate(-50%, -50%);
        transition: opacity 0.3s ease, background 0.25s, color 0.25s;
        will-change: left, top;
        cursor: pointer;
        z-index: 110;
        pointer-events: none; /* Let overlay catch first entry, JS will enable */
    }

    .dark .pgp-more-magnetic {
        background: rgba(255, 255, 255, 0.1);
        color: #5eead4;
        backdrop-filter: blur(12px);
        border: 1px solid rgba(255, 255, 255, 0.15);
    }

    .pgp-overlay:hover .pgp-more-magnetic {
        opacity: 1;
        pointer-events: auto;
    }

    .pgp-more-magnetic:hover {
        background: #fff;
        color: #000;
        box-shadow: 0 12px 40px rgba(0,0,0,0.25);
        transform: translate(-50%, -50%) !important;
    }

    .dark .pgp-more-magnetic:hover {
        background: rgba(255, 255, 255, 0.2);
        color: #fff;
    }

    /* Card subtle lift on hover */
    .pgp-card-trigger {
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .pgp-card-trigger:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    }

    /* ── Liquid Media Dissolve for Source Card ── */
    .pgp-card-trigger img[class*="absolute"],
    .pgp-card-trigger video[class*="absolute"] {
        transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1), 
                    filter 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                    clip-path 0.5s cubic-bezier(0.22, 1, 0.36, 1) !important;
        clip-path: circle(150% at 50% 50%);
        will-change: opacity, transform, filter, clip-path;
    }

    .pgp-card-trigger.pgp-card-active img[class*="absolute"],
    .pgp-card-trigger.pgp-card-active video[class*="absolute"] {
        opacity: 0 !important;
        filter: blur(12px) !important;
        transform: scale(0.9) !important;
        clip-path: circle(0% at 50% 50%) !important;
    }

} /* end @media (hover: hover) and (pointer: fine) */





/* ══════════════════════════════════════════════════════
   RECENT PROJECT — #recent-project
   Magnetic button (no popup), clean image card
   Desktop only via @media (hover: hover) and (pointer: fine)
══════════════════════════════════════════════════════ */

/* Base card */
.rp-card {
    display: block;
    cursor: default;
}

/* Magnetic CTA button — hidden by default */
.rp-magnetic-btn {
    position: absolute;
    top: 0;
    left: 0;
    display: none;                /* hidden on mobile */
    align-items: center;
    gap: 6px;
    padding: 11px 22px;
    border-radius: 12px;          /* rounded-rect, not circle */
    background: rgba(255, 255, 255, 0.95);
    color: #096b5b;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.28s ease, background 0.2s, color 0.2s, box-shadow 0.2s;
    will-change: left, top;
    pointer-events: none;
    z-index: 20;
    white-space: nowrap;
}

.dark .rp-magnetic-btn {
    background: rgba(255, 255, 255, 0.12);
    color: #5eead4;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Desktop-only activation */
@media (hover: hover) and (pointer: fine) {
    .rp-magnetic-btn {
        display: flex;
    }

    .rp-card:hover .rp-magnetic-btn {
        opacity: 1;
        pointer-events: auto;
    }

    .rp-magnetic-btn:hover {
        background: #fff;
        color: #000;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    }

    .dark .rp-magnetic-btn:hover {
        background: rgba(255, 255, 255, 0.22);
        color: #fff;
    }
}

/* ── Portfolio Card Button (.pc-btn) — static rounded-rect, no magnetic ── */
.pc-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
}

.pc-btn:hover {
    background: rgba(255, 255, 255, 0.32);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

/* ── Portfolio Card: consistent bottom-right button alignment ── */
.pgp-card-trigger {
    display: flex;
    flex-direction: column;
}
/* Info bar row: tags flex-1 left, pc-btn flex-shrink right */
.pgp-card-trigger .pc-btn {
    flex-shrink: 0;
    align-self: flex-end;
}


