/* 
  Ghostedmyself Portfolio — Redesign
  Philosophy: "Quiet Confidence"
  Inspired by editorial photography portfolios & independent architecture magazines.
*/

/* ═══════════════════════════════════════════
   0. DESIGN TOKENS
   ═══════════════════════════════════════════ */

:root {
    /* Palette — Warm Noir */
    --bg: #111110;
    --surface: #1A1918;
    --text: #E8E0D4;
    --text-muted: #8A847A;
    --accent: #D0673F;
    --accent-hover: #b35133;
    --border: rgba(232, 224, 212, 0.08);
    --border-hover: rgba(232, 224, 212, 0.2);

    /* Glass Design System */
    --glass-bg: rgba(22, 21, 20, 0.55);
    --glass-bg-hover: rgba(35, 33, 30, 0.65);
    --glass-blur: blur(20px);
    --glass-border: 1px solid rgba(255, 255, 255, 0.06);
    --glass-border-hover: 1px solid rgba(255, 255, 255, 0.14);
    --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    --glass-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    --glass-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.05);

    /* Typography */
    --font-serif: 'Instrument Serif', serif;
    --font-sans: 'Outfit', sans-serif;

    /* Spacing */
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 32px;
    --space-lg: 64px;
    --space-xl: 128px;

    /* Radii */
    --radius: 12px;
    --radius-pill: 999px;

    /* Easing */
    --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
    --ease-out: cubic-bezier(0.0, 0.0, 0.2, 1);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ═══════════════════════════════════════════
   ACCESSIBILITY
   ═══════════════════════════════════════════ */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

/* ═══════════════════════════════════════════
   GLOBAL STYLES
   ═══════════════════════════════════════════ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100vh;
    width: 100%;
    overflow: hidden;
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    background-color: var(--bg);
    /* 🌑 Moonlight Cast Shadow Effect */
    background-image: 
        /* The diagonal window light beam */
        linear-gradient(115deg, 
            transparent 20%,
            rgba(160, 180, 220, 0.05) 35%, 
            rgba(160, 180, 220, 0.20) 48%, 
            rgba(160, 180, 220, 0.08) 60%,
            transparent 75%
        ),
        /* Ambient moonlight glow from top right */
        radial-gradient(circle at 85% -10%, rgba(160, 180, 220, 0.20) 0%, transparent 60%);
    background-attachment: fixed;
    background-size: cover;
}

/* --- Splash Screen --- */
.splash-screen {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--bg);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.8s cubic-bezier(0.85, 0, 0.15, 1);
}
.splash-screen.hidden {
    transform: translateY(-100%);
}
.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    width: 100%;
    max-width: 400px;
}
.splash-text-mask {
    overflow: hidden;
    padding: 10px;
}
.splash-logo {
    font-family: 'Instrument Serif', serif;
    font-size: 4rem;
    font-style: italic;
    color: var(--text);
    margin: 0;
    opacity: 0;
    filter: blur(20px);
    transform: scale(1.05);
}
.splash-logo.animate-in {
    animation: ghostBlur 2.5s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.2s;
}
.splash-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
    opacity: 0;
}
.splash-bottom.animate-in {
    animation: fadeIn 1s ease forwards 0.5s;
}
.splash-progress {
    width: 200px;
    height: 2px;
    background: rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
}
.splash-progress-bar {
    position: absolute;
    top: 0; left: 0; height: 100%;
    width: 0%;
    background: var(--accent);
    transition: width 0.1s linear;
}
.splash-counter {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    color: var(--text-muted);
    letter-spacing: 2px;
}

@keyframes ghostBlur {
    0% { opacity: 0; filter: blur(20px); transform: scale(1.05); }
    100% { opacity: 1; filter: blur(0px); transform: scale(1); }
}
@keyframes fadeIn {
    to { opacity: 1; }
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 10px; }

/* Selection */
::selection {
    background: var(--accent);
    color: var(--bg);
}

/* Noise Overlay */
.noise-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Custom Cursor (Desktop) */
.cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: transform 0.15s var(--ease), opacity 0.3s;
    mix-blend-mode: difference;
    opacity: 0;
}

.cursor-dot.visible {
    opacity: 1;
}

.cursor-dot.hovering {
    transform: translate(-50%, -50%) scale(4);
    opacity: 0.5;
}

/* Utilities */
.hidden {
    display: none !important;
}

/* ═══════════════════════════════════════════
   2. TYPOGRAPHY
   ═══════════════════════════════════════════ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

a {
    color: inherit;
    text-decoration: none;
}


/* ═══════════════════════════════════════════
   3. LAYOUT SKELETON
   ═══════════════════════════════════════════ */

.layout-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    position: relative;
    z-index: 10;
}

.content-area {
    flex-grow: 1;
    position: relative;
    height: 100vh;
}

.section-block {
    position: absolute;
    inset: 0;
    padding: 120px 10% 48px 10%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;

    /* Hidden by default */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.6s var(--ease), visibility 0.6s;

    /* Internal scroll */
    overflow-y: auto;
}

/* Beranda centers its content vertically */
#beranda {
    justify-content: center;
    padding-top: 0;
    padding-bottom: 0;
}

.section-block.active-section {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* ═══════════════════════════════════════════
   3.5 MASCOT & VISITOR COUNTER
   ═══════════════════════════════════════════ */

/* Mascot Avatar */
.mascot-avatar-container {
    position: fixed;
    bottom: 60px;
    right: 40px;
    z-index: 101;
    cursor: pointer;
    animation: floatGhost 4s ease-in-out infinite;
    transition: all 0.3s var(--ease);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mascot-svg {
    transition: transform 0.2s var(--ease);
}

.mascot-avatar-container:hover .mascot-svg {
    transform: scale(1.1) rotate(5deg);
}

@keyframes floatGhost {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Kawaii Mascot Animations */
@keyframes tearDrop {
    0% { transform: translateY(-5px); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(15px); opacity: 0; }
}

@keyframes zzzFloat {
    0% { transform: translate(0, 0) scale(1); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translate(15px, -20px) scale(1.5); opacity: 0; }
}

@keyframes breatheBody {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(1.02) translateY(-1px); }
}

@keyframes pulseGlow {
    0%, 100% { filter: drop-shadow(0 0 4px rgba(255,255,255,0.8)); }
    50% { filter: drop-shadow(0 0 10px rgba(255,255,255,1)); }
}

@keyframes earTwitchLeft {
    0%, 90%, 100% { transform: rotate(0deg); }
    92% { transform: rotate(-10deg); }
    94% { transform: rotate(5deg); }
    96% { transform: rotate(-5deg); }
    98% { transform: rotate(0deg); }
}

@keyframes earTwitchRight {
    0%, 80%, 100% { transform: rotate(0deg); }
    82% { transform: rotate(10deg); }
    84% { transform: rotate(-5deg); }
    86% { transform: rotate(5deg); }
    88% { transform: rotate(0deg); }
}

.ear-anim-left {
    animation: earTwitchLeft 5s infinite;
}

.ear-anim-right {
    animation: earTwitchRight 6s infinite;
}

.mascot-kawaii {
    animation: breatheBody 3s ease-in-out infinite;
}

.mascot-sad .tear-anim {
    animation: tearDrop 1.5s linear infinite;
}

.mascot-idle .zzz-anim-1 {
    animation: zzzFloat 2s linear infinite;
}
.mascot-idle .zzz-anim-2 {
    animation: zzzFloat 2s linear infinite 1s;
}

.mascot-chill .headset-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

/* Mascot SVG Parts Visibility */

/* Reset: hide ALL parts by default when any mood is active to prevent overlapping */
.mascot-idle .mascot-part,
.mascot-sad .mascot-part,
.mascot-happy .mascot-part,
.mascot-chill .mascot-part,
.mascot-streaming .mascot-part,
.mascot-dnd .mascot-part,
.mascot-offline .mascot-part,
.mascot-blackhole .mascot-part { opacity: 0 !important; }

/* Then selectively show only the correct parts per mood */
.mascot-idle .cat-eyes-closed, 
.mascot-idle .cat-mouth-normal, 
.mascot-idle .cat-zzz { opacity: 1 !important; }

.mascot-sad .cat-eyes-dizzy, 
.mascot-sad .cat-mouth-normal, 
.mascot-sad .cat-tears { opacity: 1 !important; }

.mascot-happy .cat-eyes-open, 
.mascot-happy .cat-mouth-open, 
.mascot-happy .cat-gamepad { opacity: 1 !important; }

.mascot-chill .cat-eyes-closed, 
.mascot-chill .cat-mouth-normal, 
.mascot-chill .cat-headset { opacity: 1 !important; }

.mascot-streaming .cat-eyes-open, 
.mascot-streaming .cat-mouth-normal, 
.mascot-streaming .cat-sunglasses { opacity: 1 !important; }

.mascot-dnd .cat-eyes-dizzy, 
.mascot-dnd .cat-mouth-open, 
.mascot-dnd .cat-angry { opacity: 1 !important; }

.mascot-offline { opacity: 0.5; filter: grayscale(1); }
.mascot-offline .cat-eyes-closed, 
.mascot-offline .cat-mouth-normal { opacity: 1 !important; }

.mascot-blackhole .cat-eyes-open, 
.mascot-blackhole .cat-mouth-open { opacity: 1 !important; }

/* Mascot Mood Animations */
.mascot-sad { animation: shakeGhost 3s infinite; }
.mascot-happy { animation: bounceGhost 1s infinite; }
.mascot-chill { animation: swayGhost 5s infinite; }
.mascot-streaming { animation: bounceGhost 1.5s infinite; }
.mascot-dnd { animation: shakeGhost 1s infinite; }

@keyframes shakeGhost {
    0%, 100% { transform: translateY(0) rotate(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateY(0) rotate(-5deg); }
    20%, 40%, 60%, 80% { transform: translateY(0) rotate(5deg); }
}

@keyframes bounceGhost {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes swayGhost {
    0%, 100% { transform: translateY(0) translateX(0) rotate(0); }
    33% { transform: translateY(-5px) translateX(-5px) rotate(-5deg); }
    66% { transform: translateY(-5px) translateX(5px) rotate(5deg); }
}

/* Ghost Speech Bubble */
.ghost-speech-bubble {
    position: absolute;
    bottom: 85px;
    right: -20px;
    background: var(--text);
    color: var(--bg);
    padding: 8px 12px;
    border-radius: 12px;
    border-bottom-right-radius: 2px;
    font-size: 0.75rem;
    font-family: var(--font-sans);
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.9);
    transform-origin: bottom right;
    transition: all 0.3s var(--ease);
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.ghost-speech-bubble.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

@media (max-width: 768px) {
    .mascot-ghost {
        bottom: 50px;
        right: 20px;
    }
}


.visitor-counter-pill {
    position: fixed;
    bottom: 24px;
    right: 32px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: 30px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--text-muted);
    z-index: 100;
    transition: all 0.3s var(--ease);
    box-shadow: var(--glass-highlight), var(--glass-shadow);
}

.visitor-counter-pill:hover {
    color: var(--text);
    background: var(--glass-bg-hover);
    border: var(--glass-border-hover);
    transform: translateY(-2px);
    box-shadow: var(--glass-highlight), var(--glass-shadow-hover);
}

.visitor-counter-pill i {
    width: 14px;
    height: 14px;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .visitor-counter-pill {
        bottom: 16px;
        right: 16px;
        font-size: 0.75rem;
        padding: 6px 12px;
    }
}

/* ═══════════════════════════════════════════
   4. TOP HEADER NAVIGATION
   ═══════════════════════════════════════════ */

.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: flex-end !important;
    align-items: center;
    padding: 0 5%;
    z-index: 9999;
    background: transparent;
    border: none !important;
    transition: all 0.3s var(--ease);
}

.main-nav.scrolled {
    background: rgba(22, 22, 21, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: none;
}

.nav-links {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: relative;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 2rem;
    backdrop-filter: blur(12px);
    box-shadow: inset 1px 1px 4px rgba(255, 255, 255, 0.1), 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 4px;
    margin: 0;
}

/* Individual links act as labels */
.nav-links li:not(.nav-glider) {
    display: flex;
    justify-content: center;
    z-index: 2;
    min-width: 90px;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 16px;
    width: 100%;
    border-radius: 1.5rem;
    transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1), font-weight 0.4s;
}

/* Hover & Active States for Text */
.nav-link:hover, 
.nav-link.active {
    color: white; /* Bright white text on orange background */
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* The Glider Pill */
.nav-glider {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc((100% - 8px) / 4); /* 100% minus padding, divided by 4 items */
    border-radius: 1.5rem;
    z-index: 1;
    background: linear-gradient(135deg, rgba(220, 100, 40, 0.6), var(--accent));
    box-shadow: 0 0 16px rgba(220, 100, 40, 0.5), inset 0 0 6px rgba(255, 255, 255, 0.3);
    transition: transform 0.5s cubic-bezier(0.37, 1.95, 0.66, 0.56);
    pointer-events: none;
    transform: translateX(0); /* Default to first item */
}

/* Positioning logic based on which item has .active (fallback) */
.nav-links:has(li:nth-child(1) .active) .nav-glider { transform: translateX(0%); }
.nav-links:has(li:nth-child(2) .active) .nav-glider { transform: translateX(100%); }
.nav-links:has(li:nth-child(3) .active) .nav-glider { transform: translateX(200%); }
.nav-links:has(li:nth-child(4) .active) .nav-glider { transform: translateX(300%); }


/* Positioning logic based on HOVER (overrides active) */
.nav-links:hover:has(li:nth-child(1):hover) .nav-glider { transform: translateX(0%); }
.nav-links:hover:has(li:nth-child(2):hover) .nav-glider { transform: translateX(100%); }
.nav-links:hover:has(li:nth-child(3):hover) .nav-glider { transform: translateX(200%); }
.nav-links:hover:has(li:nth-child(4):hover) .nav-glider { transform: translateX(300%); }


.nav-label {
    display: inline;
}


/* ═══════════════════════════════════════════
   5. HERO / BERANDA
   ═══════════════════════════════════════════ */

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.hero-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
}


.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(3.5rem, 10vw, 8rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -1px;
    color: var(--text);
    margin-bottom: var(--space-md);
    padding: 0 20px;
    
    /* Smooth reveal animation without hard clipping */
    opacity: 0;
    transform: translateY(40px) scale(0.95);
}

.is-visible .hero-title {
    animation: titleReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

@keyframes titleReveal {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
        filter: blur(8px);
    }
    100% { 
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.hero-tagline {
    font-family: var(--font-sans);
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: var(--text-muted);
    font-weight: 300;
    margin-bottom: var(--space-sm);
    letter-spacing: 0.5px;
    
    opacity: 0;
    transform: translateY(16px);
}

.is-visible .hero-tagline {
    animation: fadeSlideUp 0.8s var(--ease-out) 0.6s forwards;
}

.hero-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    max-width: 520px;
    line-height: 1.7;
    margin: 0 auto;
    
    opacity: 0;
    transform: translateY(16px);
}

.is-visible .hero-desc {
    animation: fadeSlideUp 0.8s var(--ease-out) 0.8s forwards;
}

@keyframes fadeSlideUp {
    to { opacity: 1; transform: translateY(0); }
}

.hero-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}


/* ═══════════════════════════════════════════
   6. GALLERY
   ═══════════════════════════════════════════ */

#gallery {
    overflow: hidden; /* Stop page-level scrolling */
}

#gallery .section-title {
    font-family: var(--font-sans);
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    margin-bottom: var(--space-sm);
    color: var(--text-muted);
    flex-shrink: 0;
    align-self: flex-start;
}

.gallery-wrapper {
    width: 100%;
    flex-grow: 1;
    overflow-y: auto;
    padding-bottom: 40px;
    scrollbar-width: none;
}

.gallery-wrapper::-webkit-scrollbar {
    display: none;
}

.gallery-grid-layout {
    column-width: 320px;
    column-gap: 24px;
    width: 100%;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 20px;
    border-radius: var(--radius);
    position: relative;
    cursor: pointer;
    overflow: hidden;
    background: transparent;
    border: none;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
                box-shadow 0.5s ease;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.gallery-img-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.gallery-img {
    display: block;
    width: 100%;
    height: auto;
    transform: scale(1.01); /* Prevent fractional pixel gaps */
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.gallery-item:hover .gallery-img {
    transform: scale(1.05);
}

/* --- Sound Toggle Button --- */
.sound-toggle-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--glass-highlight), var(--glass-shadow);
}

.sound-toggle-btn:hover {
    background: var(--primary-color);
    color: var(--bg-color);
    transform: scale(1.1);
    border-color: var(--primary-color);
}

.sound-toggle-btn.muted {
    opacity: 0.6;
}



/* --- Responsive Adjustments --- */

.gallery-item:hover {
    transform: translateY(-6px) rotate(-0.8deg);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

/* Alternate items tilt the other way for organic feel */
.gallery-item:nth-child(even):hover {
    transform: translateY(-6px) rotate(0.6deg);
}

.gallery-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1),
                filter 0.6s ease;
    filter: saturate(0.85) contrast(1.05);
}

.gallery-img-wrapper {
    width: 100%;
    overflow: hidden;
}

.gallery-item:hover .gallery-img {
    transform: scale(1.04);
    filter: saturate(1.1) contrast(1.05);
}

/* Caption overlay on hover */
.gallery-item::after {
    content: attr(data-caption);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 14px 12px;
    background: linear-gradient(transparent 10%, rgba(10,10,9,0.85));
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.3px;
    line-height: 1.4;
    opacity: 0;
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
    transform: translateY(6px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
}

.gallery-item:hover::after {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════════
   7. PROJECTS — Divided List
   ═══════════════════════════════════════════ */

#project {
    overflow: hidden;
}

#project .section-title {
    font-family: var(--font-sans);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
    flex-shrink: 0;
}

.project-filters {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
    flex-shrink: 0;
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px 0;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    position: relative;
    transition: color 0.3s var(--ease);
    margin-right: 24px;
}

.filter-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s var(--ease);
}

.filter-btn:hover {
    color: var(--text);
}

.filter-btn.active {
    color: var(--text);
}

.filter-btn.active::after {
    width: 100%;
}

/* Carousel wrapper vertical — repurposed as scroll container */
.carousel-wrapper-vertical {
    width: 100%;
    flex-grow: 1;
    overflow: hidden;
}

.project-list {
    display: flex;
    flex-direction: column;
    padding: 8px 4px; /* Space for hover shadow */
    overflow-y: auto;
    height: 100%;
    scrollbar-width: none;
}

.project-list::-webkit-scrollbar {
    display: none;
}

.project-item {
    display: grid;
    grid-template-columns: 48px 1fr auto auto 36px;
    gap: var(--space-md);
    align-items: center;
    padding: 20px 24px;
    margin-bottom: 12px;
    border: var(--glass-border);
    border-radius: 14px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--glass-highlight), var(--glass-shadow);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
                background 0.3s ease,
                border-color 0.3s ease,
                box-shadow 0.5s ease;
    cursor: pointer;
}

.project-item:hover {
    background: var(--glass-bg-hover);
    border: var(--glass-border-hover);
    transform: translateY(-3px) rotate(-0.3deg);
    box-shadow: var(--glass-highlight), var(--glass-shadow-hover);
}

.project-item:nth-child(even):hover {
    transform: translateY(-3px) rotate(0.3deg);
}

.project-item:hover .project-num {
    color: var(--accent);
}

.project-item:hover .project-title {
    color: var(--accent);
}

.project-num {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    transition: color 0.3s var(--ease);
}

.project-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.project-title {
    font-family: var(--font-sans);
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    transition: color 0.3s var(--ease);
}

.project-tags {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.project-year {
    font-family: var(--font-sans);
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.project-actions {
    display: flex;
    align-items: center;
    margin-right: 24px;
    z-index: 10;
}

.like-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    transition: all 0.2s ease;
    padding: 8px;
    border-radius: 8px;
}

.like-btn:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.like-btn.liked {
    color: #ef4444;
}

.like-btn.liked svg {
    fill: currentColor;
    animation: popHeart 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popHeart {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.project-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.3s var(--ease);
    flex-shrink: 0;
}

.project-item:hover .project-arrow {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
    transform: rotate(45deg);
}


/* ═══════════════════════════════════════════
   8. INFO — Editorial Spec Sheet
   ═══════════════════════════════════════════ */

.info-spec-layout {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    width: 100%;
    max-width: 700px;
}

.spec-header {
    display: flex;
    flex-direction: column;
}

.bio-text-large p {
    font-family: var(--font-sans);
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.25;
    color: var(--text);
    letter-spacing: -0.5px;
}

.spec-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border);
}

.spec-item {
    display: grid;
    grid-template-columns: 140px 1fr 32px;
    align-items: center;
    padding: 16px 20px;
    margin-bottom: 12px;
    border: var(--glass-border);
    border-radius: var(--radius);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-highlight), var(--glass-shadow);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
                background 0.3s ease,
                border-color 0.3s ease,
                box-shadow 0.5s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.spec-item:hover {
    background: var(--glass-bg-hover);
    border: var(--glass-border-hover);
    transform: translateY(-3px) rotate(-0.2deg);
    box-shadow: var(--glass-highlight), var(--glass-shadow-hover);
}

.spec-item:nth-child(even):hover {
    transform: translateY(-3px) rotate(0.2deg);
}

.spec-item:hover .spec-value {
    color: var(--accent);
}

.spec-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
}

.spec-value {
    font-family: var(--font-sans);
    font-size: 1.2rem;
    color: var(--text);
    transition: color 0.3s var(--ease);
}

.spec-item i, .spec-item svg {
    color: var(--text-muted);
    width: 16px;
    height: 16px;
    justify-self: end;
}


/* ═══════════════════════════════════════════
   9. SECTION TITLE (shared)
   ═══════════════════════════════════════════ */

.section-title {
    font-family: var(--font-sans);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--text-muted);
    letter-spacing: -0.5px;
    flex-shrink: 0;
}


/* ═══════════════════════════════════════════
   10. STAGGER ANIMATIONS
   ═══════════════════════════════════════════ */

.animate-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: calc(var(--delay, 0) * 0.1s);
    will-change: opacity, transform;
}

.animate-up.revealed {
    opacity: 1;
    transform: translateY(0);
}


/* ═══════════════════════════════════════════
   11. BUTTONS
   ═══════════════════════════════════════════ */

.btn {
    padding: 14px 28px;
    border-radius: var(--radius-pill);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--text);
    color: var(--bg);
}

.btn-primary:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--text);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--border-hover);
    color: var(--text);
}

.btn-secondary:hover {
    border-color: var(--text);
}


/* ═══════════════════════════════════════════
   12. MODALS
   ═══════════════════════════════════════════ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(17, 17, 16, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s var(--ease);
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.modal-content {
    background-color: var(--surface);
    padding: 48px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    max-width: 480px;
    width: 90%;
    transform: translateY(0);
    transition: transform 0.4s var(--ease-spring);
}

.modal-overlay.hidden .modal-content {
    transform: translateY(32px);
}

.modal-title {
    font-family: var(--font-sans);
    font-size: 1.8rem;
    margin-bottom: var(--space-sm);
}

.modal-desc {
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}

.modal-url {
    color: var(--accent);
    font-weight: 500;
    word-break: break-all;
    margin-bottom: var(--space-md);
    font-size: 0.9rem;
}

.modal-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
}

/* Image Modal */
.image-modal-content {
    max-width: 1000px;
    width: 90vw;
    height: 70vh;
    max-height: 700px;
    min-height: 400px;
    padding: 0;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: row;
    background-color: var(--bg);
}

.modal-action-btn {
    position: absolute;
    top: 16px;
    background: rgba(17, 17, 16, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    color: var(--text);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s var(--ease);
}

.modal-action-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.image-modal-body {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
}

#image-modal-img {
    width: 60%;
    height: 100%;
    object-fit: contain;
    background-color: var(--surface);
}

.image-modal-info {
    width: 40%;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

#image-modal-title {
    font-family: var(--font-sans);
    font-size: 1.8rem;
    margin-bottom: var(--space-sm);
}

#image-modal-desc {
    color: var(--text-muted);
    line-height: 1.7;
}

/* Fullscreen Mode for Image Modal */
#image-modal.modal-fullscreen .image-modal-content {
    width: 100%;
    height: 100vh;
    max-width: none;
    max-height: none;
    min-height: none;
    border-radius: 0;
    border: none;
    background: #000;
}

#image-modal.modal-fullscreen #image-modal-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#image-modal.modal-fullscreen .image-modal-info {
    display: none;
}


/* ═══════════════════════════════════════════
   13. RESPONSIVE — Tablet
   ═══════════════════════════════════════════ */

@media (max-width: 1024px) {
    .section-block {
        padding: 100px 8% 40px 8%;
    }

    .section-title {
        font-size: clamp(1.3rem, 2.5vw, 2rem);
    }
}


/* ═══════════════════════════════════════════
   14. RESPONSIVE — Mobile
   ═══════════════════════════════════════════ */

@media (max-width: 768px) {
    .section-block {
        padding: 90px 6% 32px 6%;
    }

    #beranda {
        padding-top: 0;
        padding-bottom: 0;
    }

    /* Navigation - top header mobile */
    .main-nav {
        height: 60px;
        padding: 0 4%;
    }

    .nav-links {
        width: auto;
        max-width: 100%;
        margin: 0;
    }

    .nav-links li:not(.nav-glider) {
        min-width: 0;
    }

    .nav-link {
        font-size: 0.65rem;
        letter-spacing: 0.5px;
        padding: 6px 10px;
    }

    .content-area {
        height: calc(100vh - 60px);
    }

    /* Hero */
    .hero-title {
        letter-spacing: -2px;
    }

    /* Gallery — masonry responsive */
    .gallery-grid-layout {
        column-width: 200px;
        column-gap: 14px;
    }

    .gallery-item {
        margin-bottom: 14px;
        padding: 6px;
        border-radius: 10px;
    }

    .gallery-item:hover {
        transform: translateY(-4px) rotate(0deg);
    }
    .gallery-item:nth-child(even):hover {
        transform: translateY(-4px) rotate(0deg);
    }

    /* Project */
    .project-item {
        grid-template-columns: 28px 1fr auto;
        grid-template-areas: 
            "num info year"
            "num actions .";
        gap: 4px 12px;
        padding: 16px;
        align-items: start;
    }

    .project-num { grid-area: num; margin-top: 4px; }
    .project-info { grid-area: info; }
    .project-year { grid-area: year; margin-top: 4px; }
    .project-actions { 
        grid-area: actions; 
        margin-right: 0; 
        margin-left: -8px; 
    }

    .project-arrow {
        display: none;
    }

    .project-title {
        font-size: 1.1rem;
    }

    /* Info */
    .info-spec-layout {
        gap: var(--space-md);
    }

    .bio-text-large p {
        font-size: clamp(1.4rem, 5vw, 2rem);
    }

    .spec-item {
        grid-template-columns: 1fr 24px;
        gap: var(--space-sm);
        padding: 16px 20px;
    }

    .spec-label {
        display: none;
    }

    .spec-value {
        font-size: 1rem;
    }

    /* Image Modal */
    .modal-action-btn {
        position: absolute;
        top: 16px;
        z-index: 99999;
        width: 44px;
        height: 44px;
    }
    #image-modal-close {
        right: 20px !important;
    }
    #image-modal-fullscreen {
        right: 76px !important;
    }

    #image-modal:not(.modal-fullscreen) .image-modal-content {
        height: auto;
        min-height: auto;
    }

    .image-modal-body {
        flex-direction: column;
    }

    #image-modal:not(.modal-fullscreen) #image-modal-img {
        width: 100%;
        height: 50vh;
        max-height: 50vh;
    }

    .image-modal-info {
        width: 100%;
        padding: 24px;
    }

    #image-modal-title {
        font-size: 1.3rem;
    }

    /* Hide custom cursor on touch */
    .cursor-dot {
        display: none !important;
    }
}


/* ═══════════════════════════════════════════
   15. RESPONSIVE — Small Mobile
   ═══════════════════════════════════════════ */

@media (max-width: 420px) {
    .nav-link {
        font-size: 0.55rem;
        padding: 5px 6px;
        letter-spacing: 0;
    }



    .hero-desc {
        font-size: 0.85rem;
    }

    .project-num {
        font-size: 0.7rem;
    }
}

/* ══════════════════════════════════════════════════════════════
   16. ANIMATIONS & PREMIUM EFFECTS
   ══════════════════════════════════════════════════════════════ */

/* Scroll Reveal (AOS) */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}
.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* Animated Mesh Background */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: -2;
    background: radial-gradient(circle at 50% 50%, rgba(196, 90, 60, 0.05), transparent 40%),
                radial-gradient(circle at 80% 20%, rgba(200, 200, 255, 0.03), transparent 50%);
    background-size: 100% 100%;
    animation: bgMesh 20s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes bgMesh {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-3%, -3%) scale(1.05); }
}

/* Splash Screen Enhancements */
.splash-screen {
    background-color: var(--bg);
    background-image: radial-gradient(circle at 50% 50%, rgba(196, 90, 60, 0.1), transparent 60%);
}



