@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap');

/* ───── CSS Variables ───── */
:root {
    --hero-bg: #071A14;
    --primary-bg: #0F2A22;
    --secondary-bg: #173C32;
    --gold: #D4AF37;
    --gold-light: #F5D67B;
    --text-primary: #F5F5E6;
    --text-secondary: #B8C5B0;
    --card-bg: rgba(23, 60, 50, 0.5);
    --glass-bg: rgba(15, 42, 34, 0.6);
}

/* ───── Reset ───── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    cursor: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    display: block;
    max-width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    background: none;
    cursor: none;
    font-family: inherit;
}

input,
textarea,
select {
    font-family: inherit;
}

/* ───── Scrollbar ───── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--hero-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-light);
}

::selection {
    background: rgba(212, 175, 55, 0.3);
    color: var(--text-primary);
}

/* ───── Utility Classes ───── */
.glass {
    background: rgba(15, 42, 34, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 175, 55, 0.15);
}

.glass-strong {
    background: rgba(15, 42, 34, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.gold-glow {
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.2), 0 0 60px rgba(212, 175, 55, 0.1);
}

.gold-border {
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.text-gradient-gold {
    background: linear-gradient(135deg, #D4AF37, #F5D67B);
    -webkit-background-clip: text;
  /*  -webkit-text-fill-color: transparent; */ 
    background-clip: text;
}

.hover-lift {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(212, 175, 55, 0.15);
}

.font-playfair {
    font-family: 'Playfair Display', serif;
}

/* ───── Scroll Progress Bar ───── */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #D4AF37, #F5D67B, #D4AF37);
    z-index: 9997;
    transform-origin: left;
    transition: width 0.05s linear;
}

/* ───── Custom Cursor ───── */
.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-primary);
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: width 0.3s cubic-bezier(0.23, 1, 0.32, 1),
        height 0.3s cubic-bezier(0.23, 1, 0.32, 1),
        background 0.3s ease,
        border 0.3s ease,
        opacity 0.3s ease;
    transform: translate(-50%, -50%);
}

.cursor-dot.hovering {
    width: 40px;
    height: 40px;
    background: rgba(212, 175, 55, 0.8);
    border: 2px solid var(--gold);
}

.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.4);
    pointer-events: none;
    z-index: 9998;
    opacity: 0.5;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease-out, opacity 0.3s ease, scale 0.3s ease;
}

.cursor-ring.hovering {
    transform: translate(-50%, -50%) scale(1.5);
}

/* ───── Navbar ───── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: all 0.5s ease;
    transform: translateY(-100%);
    animation: navSlideIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes navSlideIn {
    to {
        transform: translateY(0);
    }
}

.navbar.scrolled {
    background: rgba(15, 42, 34, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.navbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.5rem;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    letter-spacing: 0.05em;
    transition: transform 0.3s ease;
}

.nav-logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s ease, transform 0.3s ease;
}

.nav-links a:hover {
    color: var(--gold);
    transform: translateY(-2px);
}

.nav-hire-btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.75rem;
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    display: inline-block;
}

.nav-hire-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    transform: scale(1.05);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    z-index: 150;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 42, 34, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    z-index: 140;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-menu.active {
    display: flex;
    opacity: 1;
}

.mobile-menu a {
    font-size: 1.5rem;
    font-family: 'Playfair Display', serif;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
    animation: mobileNavFadeIn 0.4s ease forwards;
}

.mobile-menu.active a {
    animation: mobileNavFadeIn 0.4s ease forwards;
}

.mobile-menu a:nth-child(1) {
    animation-delay: 0.05s;
}

.mobile-menu a:nth-child(2) {
    animation-delay: 0.1s;
}

.mobile-menu a:nth-child(3) {
    animation-delay: 0.15s;
}

.mobile-menu a:nth-child(4) {
    animation-delay: 0.2s;
}

.mobile-menu a:nth-child(5) {
    animation-delay: 0.25s;
}

.mobile-menu a:nth-child(6) {
    animation-delay: 0.3s;
}

@keyframes mobileNavFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu a:hover {
    color: var(--gold);
}

/* ───── Hero Section ───── */
#hero {
    position: relative;
    height: 200vh;
}

.hero-sticky {
   position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    transition: opacity 0.4s ease;
    perspective: 1200px;
    perspective-origin: 50% 45%;
}

.hero-canvas,
.particle-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-canvas {
    background: var(--hero-bg);
    transform-style: preserve-3d;
    will-change: transform;
    transform-origin: center center;
}

.particle-canvas {
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(7, 26, 20, 0.6) 0%,
            rgba(7, 26, 20, 0.3) 50%,
            rgba(7, 26, 20, 0.8) 100%);
    pointer-events: none;
    will-change: transform;
    transform-origin: center center;
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 1.5rem;
    z-index: 10;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gold);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 9999px;
    margin-bottom: 2rem;
    background: rgba(15, 42, 34, 0.6);
    backdrop-filter: blur(20px);
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-size: clamp(2rem, 6vw, 5rem);
}

.hero-title .separator {
    color: var(--gold);
    margin: 0 0.75rem;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: clamp(0.9rem, 2vw, 1.25rem);
    max-width: 40rem;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.btn-primary {
    padding: 1rem 2rem;
    background: var(--gold);
    color: var(--hero-bg);
    font-weight: 600;
    border-radius: 9999px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--gold-light);
    transform: scale(1.05);
}

.btn-primary:active {
    transform: scale(0.95);
}

.btn-secondary {
    padding: 1rem 2rem;
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: var(--gold);
    border-radius: 9999px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(212, 175, 55, 0.1);
    transform: scale(1.05);
}

.btn-secondary:active {
    transform: scale(0.95);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 10;
}

.scroll-indicator span {
    color: var(--text-secondary);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.scroll-mouse {
    width: 20px;
    height: 32px;
    border-radius: 9999px;
    border: 1px solid rgba(212, 175, 55, 0.4);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 6px;
}

.scroll-dot {
    width: 4px;
    height: 8px;
    background: var(--gold);
    border-radius: 9999px;
    animation: scrollBounce 1.5s ease-in-out infinite;
}

@keyframes scrollBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(8px);
    }
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--hero-bg);
    transition: opacity 0.5s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-bar-track {
    width: 12rem;
    height: 4px;
    background: var(--secondary-bg);
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.loading-bar-fill {
    height: 100%;
    background: var(--gold);
    border-radius: 9999px;
    width: 0%;
    transition: width 0.1s linear;
}

.loading-text {
    color: var(--text-secondary);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

/* ───── Section Heading ───── */
.section-heading {
    text-align: center;
    margin-bottom: 4rem;
}

.section-heading .subtitle {
    color: var(--gold);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 1rem;
}

.section-heading h2 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--text-primary);
    line-height: 1.1;
}

.heading-divider {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
}

.heading-divider .line {
    height: 1px;
    width: 3rem;
    background: rgba(212, 175, 55, 0.4);
}

.heading-divider .diamond {
    width: 8px;
    height: 8px;
    background: var(--gold);
    transform: rotate(45deg);
}

/* ───── Portfolio Section ───── */
#portfolio {
    position: relative;
    padding: 8rem 0;
    background: var(--primary-bg);
}

.portfolio-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 4rem;
}

/* ── Category Filter Buttons — Cinematic Hover ── */
.filter-btn {
    position: relative;
    padding: 0.625rem 1.25rem;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 16px;
    color: var(--text-secondary);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.filter-btn.active {
    background: var(--gold);
    color: var(--hero-bg);
    font-weight: 600;
    border-color: var(--gold);
}

/* Wrapper — handles z-index elevation on hover */
.filter-btn-wrapper {
    position: relative;
    display: inline-block;
    z-index: 1;
    transition: z-index 0s 0.4s; /* delay z-index drop on leave */
}

.filter-btn-wrapper.is-hovered {
    z-index: 20;
    transition: z-index 0s 0s; /* instant z-index rise on enter */
}

/* ── Button inside wrapper — cinematic sizing ── */
.filter-btn-wrapper .filter-btn {
    position: relative;
    min-width: 120px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(15, 42, 34, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 175, 55, 0.15);
    transition:
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.4s ease,
        width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        height 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        min-width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Hover State — Scale up + Glow ── */
.filter-btn-wrapper.is-hovered .filter-btn {
    transform: scale(1.1);
    min-width: 130px;
    height: 70px;
    border-radius: 18px;
    border-color: rgba(212, 175, 55, 0.45);
    box-shadow:
        0 0 25px rgba(212, 175, 55, 0.3),
        0 0 50px rgba(212, 175, 55, 0.15),
        0 0 80px rgba(212, 175, 55, 0.08),
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 0 20px rgba(212, 175, 55, 0.06);
}

/* ── Text Layer ── */
.filter-btn-text {
    position: relative;
    z-index: 2;
    display: block;
    transition:
        opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.filter-btn-wrapper.is-hovered .filter-btn-text {
    opacity: 1;
    transform: translateY(12px) scale(0.85);
    color: #fff;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8), 0 0 12px rgba(0, 0, 0, 0.5);
    font-weight: 700;
    letter-spacing: 0.08em;
}

/* ── Preview Image Layer ── */
.filter-btn-preview {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 16px;
    overflow: hidden;
    opacity: 0;
    transform: scale(1.1);
    transition:
        opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1) 0.08s,
        transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.08s;
    pointer-events: none;
}

.filter-btn-wrapper.is-hovered .filter-btn-preview {
    opacity: 1;
    transform: scale(1);
}

.filter-btn-preview img,
.filter-btn-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 16px;
}

/* Ken Burns slow zoom — simulates motion on static images */
@keyframes previewKenBurns {
    0% {
        transform: scale(1) translate(0, 0);
    }
    100% {
        transform: scale(1.15) translate(-2%, -1%);
    }
}

/* ── Shimmer Overlay on Preview ── */
.preview-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 30%,
        rgba(212, 175, 55, 0.12) 45%,
        rgba(245, 214, 123, 0.15) 50%,
        rgba(212, 175, 55, 0.12) 55%,
        transparent 70%
    );
    background-size: 250% 100%;
    animation: previewShimmer 2.5s ease-in-out infinite;
    border-radius: 16px;
    pointer-events: none;
    z-index: 3;
}

@keyframes previewShimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ── Dark vignette over preview for polish ── */
.filter-btn-preview::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(
        to top,
        rgba(7, 26, 20, 0.85) 0%,
        rgba(7, 26, 20, 0.3) 40%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 2;
}

/* ── Active button (selected state) overrides ── */
.filter-btn-wrapper .filter-btn.active {
    background: var(--gold);
    color: var(--hero-bg);
    font-weight: 600;
    border-color: var(--gold);
}

/* When active + hovered, tint the glow warmer */
.filter-btn-wrapper.is-hovered .filter-btn.active {
    box-shadow:
        0 0 30px rgba(212, 175, 55, 0.5),
        0 0 60px rgba(212, 175, 55, 0.25),
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 0 20px rgba(212, 175, 55, 0.1);
}


.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.project-card {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.5s ease;
}

.project-card.tall {
    grid-row: span 2;
}

.project-card .thumb-wrap {
    position: relative;
    overflow: hidden;
}

.project-card .thumb-wrap.aspect-tall {
    aspect-ratio: 3/4;
}

.project-card .thumb-wrap.aspect-video {
    aspect-ratio: 16/9;
}

.project-card .thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.project-card:hover .thumb-wrap img {
    transform: scale(1.1);
}

.project-card .card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--hero-bg) 0%, rgba(7, 26, 20, 0.4) 50%, transparent 100%);
    opacity: 0.6;
    transition: opacity 0.5s ease;
}

.project-card:hover .card-overlay {
    opacity: 0.9;
}

.project-card .shimmer-effect {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    background-image: linear-gradient(90deg, transparent 0%, rgba(212, 175, 55, 0.1) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
}

.project-card:hover .shimmer-effect {
    opacity: 1;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.project-card .card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
}

.card-content .cat {
    color: var(--gold);
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 600;
}

.card-content h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.card-content .desc {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .card-content .desc {
    opacity: 1;
}

.card-content .tags {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.card-content .tag {
    font-size: 0.6rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

/* Project Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(7, 26, 20, 0.9);
    backdrop-filter: blur(20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    position: relative;
    max-width: 48rem;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 1.5rem;
    transform: scale(0.9) translateY(40px);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
    opacity: 0;
}

.modal-backdrop.active .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 999999; /* Ensure it stays above everything */
    pointer-events: auto;
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .modal-close {
        top: 15px;
        right: 15px;
        width: 38px;
        height: 38px;
        font-size: 1.3rem;
    }
    .modal-content {
        width: 95%;
        margin-top: 20px;
    }
}

.modal-close:hover {
    color: var(--gold);
}

.modal-image {
    position: relative;
    aspect-ratio: 16/9;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 1.5rem 1.5rem 0 0;
}

.modal-image .gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--primary-bg) 0%, transparent 60%);
}

.modal-body {
    padding: 2rem;
}

.modal-body .cat {
    color: var(--gold);
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 600;
}

.modal-body h2 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--text-primary);
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.modal-body p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.modal-body .tags {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.modal-body .tag {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.modal-body .view-btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--gold);
    color: var(--hero-bg);
    font-weight: 600;
    border-radius: 9999px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.modal-body .view-btn:hover {
    background: var(--gold-light);
    transform: scale(1.05);
}

/* ───── Services Section ───── */
#services {
    position: relative;
    padding: 8rem 0;
    background: var(--secondary-bg);
}

.services-bg-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, var(--primary-bg), var(--secondary-bg), var(--primary-bg));
    pointer-events: none;
}

.services-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

.services-container .section-heading {
    padding: 0 1.5rem;
}

/* ── Scrollable wrapper ── */
.services-grid {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    /* hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    /* smooth edge fade */
    mask-image: linear-gradient(to right, transparent 0%, #000 4%, #000 96%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 4%, #000 96%, transparent 100%);
}

.services-grid::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.services-grid:active {
    cursor: grabbing;
}

/* ── Scrolling track (contains cards) ── */
.services-track {
    display: flex;
    gap: 1.5rem;
    width: max-content;
    padding: 1rem 2rem;
    will-change: transform;
}

.service-card {
    position: relative;
    padding: 2rem;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.4s ease;
    min-width: 340px;
    max-width: 400px;
    flex-shrink: 0;
}

.service-card .hover-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom right, rgba(212, 175, 55, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: 1rem;
}

.service-card:hover .hover-glow {
    opacity: 1;
}

.service-card .corner-accent {
    position: absolute;
    top: 0;
    right: 0;
    width: 5rem;
    height: 5rem;
    background: linear-gradient(to bottom left, rgba(212, 175, 55, 0.1), transparent);
    border-radius: 0 1rem 0 0;
}

.service-card .card-inner {
    position: relative;
    z-index: 1;
}

.service-card .icon-wrap {
    color: var(--gold);
    margin-bottom: 1.5rem;
    transition: transform 0.5s ease;
}

.service-card:hover .icon-wrap {
    transform: scale(1.1);
}

.service-card .icon-wrap svg {
    width: 2.5rem;
    height: 2.5rem;
}

.service-card h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

.service-card:hover h3 {
    color: var(--gold);
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
}

.service-card .bottom-line {
    margin-top: 1.5rem;
    height: 1px;
    background: linear-gradient(to right, rgba(212, 175, 55, 0.4), rgba(212, 175, 55, 0.2), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.service-card:hover .bottom-line {
    transform: scaleX(1);
}

/* ───── Skills Section ───── */
#skills {
    position: relative;
    padding: 8rem 0;
    background: var(--primary-bg);
}

.skills-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 56rem;
    margin: 0 auto;
}

.skill-card {
    padding: 1.5rem;
    border-radius: 1rem;
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.skill-abbr {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    background: rgba(212, 175, 55, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: background 0.3s ease;
}

.skill-card:hover .skill-abbr {
    background: rgba(212, 175, 55, 0.2);
}

.skill-abbr span {
    color: var(--gold);
    font-weight: 700;
    font-size: 0.8rem;
}

.skill-info {
    flex: 1;
}

.skill-info h3 {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.85rem;
}

.skill-info .percentage {
    color: var(--gold);
    font-size: 0.75rem;
    font-weight: 500;
}

.progress-track {
    height: 8px;
    background: var(--hero-bg);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(90deg, #D4AF37, #F5D67B);
    width: 0%;
    transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    overflow: hidden;
}

.progress-fill .shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
}

/* Stats */
.stats-grid {
    margin-top: 5rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
}

.stat-item {
    text-align: center;
}

.stat-item .num {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
}

.stat-item .label {
    color: var(--text-secondary);
    font-size: 0.7rem;
    margin-top: 0.25rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ───── Testimonials Section ───── */
#testimonials {
    position: relative;
    padding: 8rem 0;
    background: var(--secondary-bg);
}

.testimonials-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, var(--primary-bg), var(--secondary-bg), var(--primary-bg));
    pointer-events: none;
}

.testimonials-container {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.testimonial-wrapper {
    max-width: 48rem;
    margin: 0 auto;
}

.testimonial-viewport {
    position: relative;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-card {
    padding: 2.5rem 3rem;
    border-radius: 1.5rem;
    text-align: center;
    position: absolute;
    width: 100%;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.testimonial-card.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    position: relative;
    pointer-events: all;
}

.testimonial-card .quote-mark {
    font-size: 3.5rem;
    color: rgba(212, 175, 55, 0.3);
    font-family: 'Playfair Display', serif;
    line-height: 1;
    margin-bottom: 1.5rem;
}

.testimonial-card .feedback {
    color: var(--text-primary);
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.6;
    font-weight: 300;
    font-style: italic;
    margin-bottom: 2rem;
}

.testimonial-card .stars {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
}

.testimonial-card .stars span {
    font-size: 1.2rem;
    color: var(--gold);
}

.testimonial-card .stars span.empty {
    color: rgba(212, 175, 55, 0.2);
}

.testimonial-card .client-name {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.testimonial-card .client-role {
    color: var(--gold);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.testimonial-dots {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2.5rem;
}

.testimonial-dots button {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background: rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.testimonial-dots button:hover {
    background: rgba(212, 175, 55, 0.5);
}

.testimonial-dots button.active {
    width: 32px;
    background: var(--gold);
}

/* ───── Contact Section ───── */
#contact {
    position: relative;
    padding: 8rem 0;
    background: var(--primary-bg);
    overflow: hidden;
}

.contact-deco-1 {
    position: absolute;
    top: 5rem;
    left: -5rem;
    width: 16rem;
    height: 16rem;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 50%;
    filter: blur(60px);
}

.contact-deco-2 {
    position: absolute;
    bottom: 5rem;
    right: -5rem;
    width: 20rem;
    height: 20rem;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 50%;
    filter: blur(60px);
}

.contact-container {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.contact-headline {
    text-align: center;
    margin-bottom: 5rem;
}

.contact-headline h2 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--text-primary);
    line-height: 1.15;
}

.contact-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 3rem;
}

.contact-form {
    padding: 2rem 2.5rem;
    border-radius: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    color: var(--text-secondary);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(7, 26, 20, 0.5);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 0.75rem;
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(184, 197, 176, 0.4);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: rgba(212, 175, 55, 0.5);
}

.form-group textarea {
    resize: none;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--gold);
    color: var(--hero-bg);
    font-weight: 600;
    border-radius: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.submit-btn:hover {
    background: var(--gold-light);
    transform: scale(1.02);
}

.submit-btn:active {
    transform: scale(0.98);
}

/* Social Links */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: rgba(212, 175, 55, 0.05);
    transform: translateX(8px);
}

.social-link .social-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: rgba(212, 175, 55, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    transition: background 0.3s ease;
}

.social-link:hover .social-icon {
    background: rgba(212, 175, 55, 0.2);
}

.social-link .social-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.social-link .social-info p {
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
}

.social-link .social-info small {
    color: var(--text-secondary);
    font-size: 0.7rem;
}

.social-link .arrow {
    margin-left: auto;
    color: rgba(212, 175, 55, 0.3);
    transition: color 0.3s ease;
    font-size: 1.2rem;
}

.social-link:hover .arrow {
    color: rgba(212, 175, 55, 0.6);
}

/* ───── Footer ───── */
footer {
    background: var(--hero-bg);
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.footer-brand h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
    max-width: 20rem;
}

.footer-nav h4,
.footer-social h4 {
    color: var(--gold);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
}

.footer-nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    list-style: none;
}

.footer-nav-links a {
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.footer-nav-links a:hover {
    color: var(--gold);
}

.footer-social-links {
    display: flex;
    gap: 1rem;
}

.social-circle {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--gold);
    transition: all 0.3s ease;
}

.social-circle:hover {
    transform: translateY(-4px) scale(1.1);
    background: rgba(212, 175, 55, 0.2);
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.7rem;
    letter-spacing: 0.05em;
}

.footer-bottom .credits {
    color: rgba(184, 197, 176, 0.5);
}

/* ───── Scroll Reveal Animation ───── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ───── Responsive ───── */
@media (max-width: 1024px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-card.tall {
        grid-row: span 1;
    }

    .project-card.tall .thumb-wrap.aspect-tall {
        aspect-ratio: 16/9;
    }

    /* services-grid is now a marquee, no grid override needed */

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {

    .nav-links,
    .nav-hire-btn-desktop {
        display: none !important;
    }

    .hamburger {
        display: flex;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    /* services-grid marquee — no grid override needed */

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .testimonial-card {
        padding: 2rem 1.5rem;
    }

    .hero-title .br-desktop {
        display: none;
    }

    .hero-title .separator-desktop {
        display: none;
    }
}

@media (pointer: coarse) {
    body {
        cursor: auto;
    }

    .cursor-dot,
    .cursor-ring {
        display: none !important;
    }
}

/* Video Support */
.portfolio-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.project-card:hover .portfolio-video {
    transform: scale(1.05);
}

/* ═══════ GALLERY SECTION ═══════ */
#gallery {
    padding: 10rem 0;
    position: relative;
    background: linear-gradient(to bottom, var(--primary-bg) 0%, #030303 100%);
}

.gallery-container {
    width: 100%;
}

.gallery-grid {
    width: 100vw;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
    padding: 2rem 0;
    cursor: grab;
    scroll-behavior: auto; /* Important for JS smooth dragging */
}

.gallery-grid::-webkit-scrollbar {
    display: none;
}

.gallery-track {
    display: flex;
    gap: 1.5rem;
    width: max-content;
    padding: 1rem 2rem;
    will-change: transform;
}

.gallery-card {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.4s ease;
    width: 380px;
    height: 480px;
    flex-shrink: 0;
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.gallery-card:hover img {
    transform: scale(1.05);
}

.gallery-card .card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 50%);
    opacity: 0.6;
    transition: opacity 0.4s ease;
}

.gallery-card:hover .card-overlay {
    opacity: 0.2;
}

/* ═══════ GALLERY SECTION ═══════ */
#gallery {
    padding: 10rem 0;
    position: relative;
    overflow: hidden;
}

.gallery-container {
    width: 100%;
}

.gallery-grid {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 2rem 0;
    cursor: grab;
    scroll-behavior: auto;
    touch-action: pan-x;
   
}

.gallery-grid::-webkit-scrollbar {
    display: none;
}

.gallery-track {
    display: flex;
    gap: 1.5rem;
    width: max-content;
    padding: 1rem 2rem;
    will-change: transform;
}

.gallery-card {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.4s ease;
    width: 340px;
    height: 440px;
    flex-shrink: 0;
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.gallery-card:hover img {
    transform: scale(1.05);
}

.gallery-card .card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-card:hover .card-overlay {
    opacity: 0.2;
}

@media (max-width: 768px) {
    .gallery-card {
        width: 280px;
        height: 380px;
    }
}

/* Brand Logo (PNG) Styling */
.brand-logo {
    height: 60px; /* Adjust height based on your image proportions */
    width: auto;
    object-fit: contain;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), filter 0.3s ease;
}

.nav-logo:hover .brand-logo {
    transform: scale(1.05);
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.4));
}
