/* Portfolio Specific CSS */

.portfolio-main {
    position: relative;
    overflow-x: hidden;
    background: var(--bg-dark);
}

/* ==========================================================================
Storytelling Scenes
   ========================================================================== */
.story-scene {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 2rem;
    z-index: 10;
}

.story-scene.scene-1 {
    background: radial-gradient(circle at center, rgba(0, 174, 239, 0.05) 0%, #05070A 70%);
}

.story-scene.scene-2 {
    background: #05070A;
}

.story-title {
    font-size: clamp(2rem, 5vw, 4.5rem);
    font-weight: 700;
    color: #FFF;
    text-align: center;
    letter-spacing: -1px;
    opacity: 0; 
    transform: translateY(30px);
    text-shadow: 0 0 20px rgba(0, 174, 239, 0.4);
    font-family: 'Space Grotesk', sans-serif;
}

.scene-2 .story-title {
    position: absolute;
    width: 100%;
    left: 0;
}

.reveal-text-2 {
    color: #00D4FF;
    text-shadow: 0 0 30px rgba(0, 174, 239, 0.6);
}

.blue-particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

/* ==========================================================================
   Category Setup
   ========================================================================== */
.category-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 10vh 5%;
    overflow: hidden;
}

.category-header {
    text-align: center;
    margin-bottom: 4rem;
    z-index: 20;
}

.category-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(3rem, 7vw, 6rem);
    color: #00D4FF;
    letter-spacing: -2px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    opacity: 0;
    text-shadow: 0 0 15px rgba(0, 174, 239, 0.5);
}

.category-header p {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: #A0AAB2;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0;
}

.category-visuals {
    position: relative;
    width: 100%;
    max-width: 1200px;
    min-height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10; 
}

/* ==========================================================================
   Web Design 3D Devices
   ========================================================================== */
.mockup-3d-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.device-mockup {
    position: absolute;
    background: rgba(10, 15, 25, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(160, 170, 178, 0.3);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8), inset 0 0 20px rgba(0, 174, 239, 0.2);
    overflow: hidden;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.device-mockup::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 200%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: skewX(-20deg);
    animation: reflectionSweep 6s infinite ease-in-out;
}

.device-laptop {
    width: 700px;
    height: 420px;
    z-index: 2;
    transform: rotateY(-10deg) rotateX(5deg) scale(0.9);
}

.device-tablet {
    width: 300px;
    height: 400px;
    right: 5%;
    top: 10%;
    z-index: 3;
    transform: rotateY(-20deg) rotateX(10deg);
    border-radius: 20px;
}

.device-mobile {
    width: 160px;
    height: 320px;
    left: 15%;
    bottom: 5%;
    z-index: 4;
    transform: rotateY(15deg) rotateX(5deg);
    border-radius: 24px;
}

.device-mockup:hover {
    transform: rotateY(0deg) rotateX(0deg) scale(1.05) !important;
    box-shadow: 0 30px 60px rgba(0,0,0,0.9), 0 0 30px rgba(0, 174, 239, 0.5), inset 0 0 20px rgba(0, 174, 239, 0.4);
    border-color: #00D4FF;
}

/* ==========================================================================
   Photography Masonry 
   ========================================================================== */
.masonry-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
    gap: 1.5rem;
    padding: 1rem;
    opacity: 0; /* Animated by GSAP */
}

.photo-card {
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    filter: grayscale(40%) brightness(0.8);
    transition: all 0.5s ease;
}

.photo-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-radius: 12px;
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

.photo-card:hover {
    filter: grayscale(0%) brightness(1.1);
    transform: scale(1.02);
    z-index: 10;
}

.photo-card:hover::before {
    border-color: #00D4FF;
    box-shadow: inset 0 0 20px rgba(0, 174, 239, 0.5);
}

.p1 { grid-column: span 2; grid-row: span 2; background-image: url('Kids_photography.png'); }
.p2 { grid-column: span 1; grid-row: span 1; background-image: url('Food.png'); }
.p3 { grid-column: span 1; grid-row: span 2; background-image: url('Product.png'); }
.p4 { grid-column: span 1; grid-row: span 1; background-image: url('event.png'); }

/* ==========================================================================
   Digital Marketing Dashboard
   ========================================================================== */
.marketing-dashboard {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.dash-panel {
    background: rgba(10, 15, 25, 0.85);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 174, 239, 0.3);
    border-radius: 20px;
    padding: 2.5rem;
    width: 600px;
    height: 380px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.9), 0 0 40px rgba(0, 174, 239, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 1.5rem;
    transform: rotateX(15deg);
    opacity: 0;
}

.stat-bar-container {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 200px;
    padding: 0 1rem;
}

.stat-bar {
    width: 40px;
    background: linear-gradient(0deg, rgba(0, 174, 239, 0.1), #00D4FF);
    border-radius: 8px 8px 0 0;
    box-shadow: 0 0 15px rgba(0, 174, 239, 0.4);
    height: 0; /* GSAP animates */
}

.social-flare {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(0, 174, 239, 0.1);
    border: 1px solid rgba(0, 174, 239, 0.5);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    color: #FFF;
    box-shadow: 0 0 20px rgba(0, 174, 239, 0.3);
    backdrop-filter: blur(8px);
    opacity: 0;
}

.flare-1 { top: 15%; left: 15%; animation: floatHolo 4s infinite alternate; }
.flare-2 { top: 25%; right: 15%; animation: floatHolo 5s infinite alternate-reverse; }
.flare-3 { bottom: 15%; left: 25%; animation: floatHolo 3.5s infinite alternate; }

/* ==========================================================================
   SEO Optimization
   ========================================================================== */
.seo-visual-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.search-mockup {
    width: 500px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(160, 170, 178, 0.3);
    border-radius: 30px;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.5), 0 0 20px rgba(0, 174, 239, 0.1);
    opacity: 0;
    transform: translateY(20px);
}

.search-mockup i {
    color: #A0AAB2;
    font-size: 1.2rem;
    margin-right: 1rem;
}

.search-typing {
    color: #FFF;
    font-family: monospace;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.search-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2rem;
    background: #00D4FF;
    margin-left: 5px;
    animation: blink 1s infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.seo-metrics {
    display: flex;
    gap: 3rem;
    opacity: 0;
}

.seo-metric-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 2px dashed rgba(0, 174, 239, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle, rgba(0, 174, 239, 0.1) 0%, transparent 70%);
    animation: rotateChrome 15s linear infinite;
}

.seo-metric-circle .inner-text {
    animation: rotateChromeReverse 15s linear infinite;
    text-align: center;
}

.metric-num {
    font-size: 2.5rem;
    font-weight: 700;
    color: #00D4FF;
    text-shadow: 0 0 15px rgba(0, 174, 239, 0.5);
    font-family: 'Space Grotesk', sans-serif;
}

/* ==========================================================================
   SEO Ranking Results
   ========================================================================== */
.seo-ranking-results {
    width: 100%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    opacity: 0;
}

.seo-result-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(10, 15, 25, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 174, 239, 0.15);
    border-radius: 14px;
    padding: 1.2rem 1.8rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.seo-result-item:hover {
    border-color: rgba(0, 174, 239, 0.5);
    transform: translateX(8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 174, 239, 0.15);
}

.result-rank {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #00D4FF;
    min-width: 60px;
    text-shadow: 0 0 10px rgba(0, 174, 239, 0.4);
}

.result-rank i {
    margin-right: 4px;
    font-size: 1rem;
}

.result-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.result-keyword {
    color: #FFF;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
}

.result-domain {
    color: #4CAF50;
    font-family: monospace;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.result-change {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    min-width: 55px;
    text-align: right;
}

.result-change.positive {
    color: #4CAF50;
    text-shadow: 0 0 8px rgba(76, 175, 80, 0.4);
}

.result-change i {
    margin-right: 3px;
    font-size: 0.8rem;
}

/* ==========================================================================
   SEO Feature Highlight Cards
   ========================================================================== */
.seo-features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    width: 100%;
    max-width: 1000px;
    margin-top: 1rem;
    opacity: 0;
}

.seo-feature-card {
    background: rgba(10, 15, 25, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(160, 170, 178, 0.15);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.seo-feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(0, 174, 239, 0.06), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.seo-feature-card:hover::before {
    transform: translateX(100%);
}

.seo-feature-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 174, 239, 0.4);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 174, 239, 0.15);
}

.seo-feature-icon {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: rgba(0, 174, 239, 0.1);
    border: 1px solid rgba(0, 174, 239, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem;
    font-size: 1.4rem;
    color: #00D4FF;
    box-shadow: 0 0 15px rgba(0, 174, 239, 0.2);
    transition: all 0.4s ease;
}

.seo-feature-card:hover .seo-feature-icon {
    box-shadow: 0 0 25px rgba(0, 174, 239, 0.4);
    transform: scale(1.1);
}

.seo-feature-card h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #FFF;
    margin-bottom: 0.6rem;
}

.seo-feature-card p {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #A0AAB2;
}

/* ==========================================================================
   Grand Portfolio Gallery
   ========================================================================== */
.grand-gallery {
    padding: 10rem 5%;
    position: relative;
    background: linear-gradient(180deg, #05070A 0%, rgba(5,7,10,0.8) 100%);
}

.gallery-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    text-align: center;
    font-family: 'Space Grotesk', sans-serif;
    color: #FFF;
    margin-bottom: 5rem;
    text-shadow: 0 0 20px rgba(0, 174, 239, 0.3);
}

.floating-panels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.proj-panel {
    text-decoration: none;
    background: rgba(10, 15, 25, 0.6);
    border: 1px solid rgba(160, 170, 178, 0.2);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.5s ease;
    opacity: 0;
    transform: translateY(40px);
}

.proj-img-wrap {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

#photo-carousel .proj-img-wrap {
    height: 340px;
}

.proj-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
}

#photo-carousel .proj-img {
    background-position: top center;
}

.proj-panel:hover {
    transform: translateY(-10px) !important;
    border-color: #00D4FF;
    box-shadow: 0 20px 40px rgba(0,0,0,0.8), 0 0 30px rgba(0, 174, 239, 0.3);
}

.proj-panel:hover .proj-img {
    transform: scale(1.1);
}

.proj-info {
    padding: 2rem;
    position: relative;
}

.proj-info h3 {
    font-size: 1.5rem;
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 0.5rem;
    color: #FFF;
}

.proj-cat {
    font-size: 0.85rem;
    color: #00D4FF;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 1rem;
}

.proj-info p {
    color: #A0AAB2;
    font-size: 0.95rem;
}

/* ==========================================================================
   Powerful Ending
   ========================================================================== */
.portfolio-ending {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: radial-gradient(circle at center, rgba(0, 174, 239, 0.1) 0%, #05070A 60%);
    padding: 0 1rem;
}

.ending-headline {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(3rem, 7vw, 6rem);
    color: #FFF;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
    opacity: 0;
}

.ending-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: #A0AAB2;
    margin-bottom: 4rem;
    opacity: 0;
}

.portfolio-cta {
    font-size: 1.2rem;
    padding: 1.2rem 3.5rem;
    border-radius: 50px;
    background: transparent;
    border: 1px solid rgba(160, 170, 178, 0.5);
    color: #FFF;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    opacity: 0;
}

.portfolio-cta::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 174, 239, 0.1);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s ease;
    z-index: -1;
}

.portfolio-cta:hover {
    border-color: #00D4FF;
    box-shadow: 0 0 30px rgba(0, 174, 239, 0.6), inset 0 0 15px rgba(0, 174, 239, 0.3);
    color: #FFF;
}

.portfolio-cta:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

@keyframes reflectionSweep {
    0% { left: -150%; opacity: 0; }
    20% { opacity: 1; }
    100% { left: 150%; opacity: 0; }
}

@media (max-width: 900px) {
    .masonry-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    .device-laptop { width: 90%; height: auto; aspect-ratio: 16/9; }
    .device-tablet { width: 40%; height: auto; aspect-ratio: 3/4; right: 0; top: 0;}
    .device-mobile { width: 25%; height: auto; aspect-ratio: 9/16; left: 5%; bottom: 0;}
    .dash-panel { width: 95%; height: 300px; padding: 1.5rem; }
    .seo-metrics { flex-wrap: wrap; gap: 1.5rem; justify-content: center; }
    .seo-metric-circle { width: 120px; height: 120px; }
    .metric-num { font-size: 2rem; }
    .seo-features-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .seo-ranking-results { max-width: 100%; }
    .seo-result-item { padding: 1rem 1.2rem; gap: 1rem; }
    .result-keyword { font-size: 0.85rem; }
}

.carousel-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

#recent-carousel {
    max-width: 1400px;
}

.carousel-viewport {
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
    touch-action: pan-y; 
}

.carousel-track {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 2rem;
    will-change: transform;

.carousel-track .proj-panel {
    flex: 0 0 calc(33.333% - 1.4rem);  
    min-width: 300px;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

#photo-carousel .carousel-track .proj-panel,
#web-carousel .carousel-track .proj-panel {
    flex: 0 0 calc(50% - 1rem);
    min-width: 320px;
}

#photo-carousel .carousel-track .proj-panel {
    flex: 0 0 calc(48% - 1rem);
    min-width: 340px;
}

/* Navigation Dots */
.carousel-dots {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
    padding: 0.5rem 0;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(160, 170, 178, 0.4);
    border: 1px solid rgba(160, 170, 178, 0.2);
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.carousel-dot:hover {
    background: rgba(0, 174, 239, 0.55);
    transform: scale(1.25);
}

.carousel-dot.active {
    background: #00D4FF;
    width: 26px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 174, 239, 0.9), 0 0 22px rgba(0, 174, 239, 0.4);
}

/* ==========================================================================
   Responsive Carousel — Tablet (iPad / MacBook small)
   ========================================================================== */
@media (max-width: 1024px) {
    /* Photography cards on tablet: show 1 card wide */
    #photo-carousel .carousel-track .proj-panel {
        flex: 0 0 calc(80% - 1rem);
        min-width: 280px;
    }
    #photo-carousel .proj-img-wrap {
        height: 300px;
    }
}

@media (max-width: 900px) {
    .carousel-track .proj-panel {
        flex: 0 0 calc(50% - 1rem);
        min-width: 260px;
    }
    #photo-carousel .carousel-track .proj-panel,
    #web-carousel .carousel-track .proj-panel {
        flex: 0 0 calc(85% - 1rem);
    }
    #photo-carousel .proj-img-wrap {
        height: 280px;
    }
}

@media (max-width: 600px) {
    .carousel-track .proj-panel {
        flex: 0 0 calc(88% - 1rem);
        min-width: 240px;
    }
    #photo-carousel .carousel-track .proj-panel,
    #web-carousel .carousel-track .proj-panel {
        flex: 0 0 calc(88% - 1rem);
    }
    #photo-carousel .proj-img-wrap {
        height: 260px;
    }
    .proj-img-wrap {
        height: 220px;
    }
    .seo-metrics { flex-direction: column; align-items: center; gap: 1.2rem; }
    .seo-metric-circle { width: 110px; height: 110px; }
    .metric-num { font-size: 1.8rem; }
    .seo-features-grid { grid-template-columns: 1fr; gap: 1rem; }
    .seo-feature-card { padding: 1.5rem 1rem; }
    .seo-ranking-results { gap: 0.8rem; }
    .seo-result-item { flex-direction: column; text-align: center; gap: 0.6rem; padding: 1rem; }
    .result-rank { min-width: auto; }
    .result-details { align-items: center; }
    .result-change { min-width: auto; text-align: center; }
    .search-mockup { width: 90%; max-width: 350px; }
}
}