/* Portfolio Premium Styles */

/* Section Container */
.portfolio {
    position: relative;
    overflow: hidden;
    padding-top: 120px;
    padding-bottom: 120px;
}

/* Background Gradients */
.portfolio-bg-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Featured Apps - Staked Layout */
.portfolio-featured {
    display: flex;
    flex-direction: column;
    gap: 160px;
    margin-bottom: 120px;
    position: relative;
    z-index: 1;
}

/* App Showcase Row */
.app-showcase-row {
    display: flex;
    align-items: center;
    gap: 80px;
    perspective: 1000px;
}

.app-showcase-row.reverse {
    flex-direction: row-reverse;
}

/* Visual Side (Phone) */
.app-visual {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 3D Phone Mockup Container */
.phone-mockup-3d {
    position: relative;
    width: 300px;
    height: 600px;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.app-showcase-row:hover .phone-mockup-3d {
    transform: translateY(-20px) rotateY(-5deg) rotateX(5deg);
}

.app-showcase-row.reverse:hover .phone-mockup-3d {
    transform: translateY(-20px) rotateY(5deg) rotateX(5deg);
}

/* The Phone Frame */
.phone-frame {
    position: absolute;
    inset: 0;
    border-radius: 48px;
    background: #0f0f13;
    box-shadow:
        0 0 0 6px #1a1a24,
        0 0 0 8px #2a2a35,
        0 30px 60px rgba(0, 0, 0, 0.6),
        inset 0 0 20px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    z-index: 2;
}

/* Notch */
.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 30px;
    background: #000;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    z-index: 10;
}

/* Screen Image */
.phone-screen {
    width: 100%;
    height: 100%;
    object-fit: fill;
    opacity: 0.9;
    transition: opacity 0.4s ease;
}

.app-visual:hover .phone-screen {
    opacity: 1;
}

/* Floating Elements around phone */
.visual-decoration {
    position: absolute;
    z-index: 1;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    animation: float 6s ease-in-out infinite;

    /* Flex content for icons */
    display: flex;
    align-items: center;
    justify-content: center;
}

.visual-decoration i {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.6);
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.5));
}

.dec-1 {
    top: 20%;
    right: -40px;
    width: 80px;
    height: 80px;
    animation-delay: 0s;
}

.dec-2 {
    bottom: 15%;
    left: -30px;
    width: 120px;
    height: 70px;
    animation-delay: 1.5s;
}

.dec-3 {
    top: 10%;
    left: -20px;
    width: 60px;
    height: 60px;
    animation-delay: 3s;
    border-radius: 50%;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Content Side */
.app-content {
    flex: 1;
}

.app-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 50px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #818cf8;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.app-title {
    font-size: 48px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
    line-height: 1.1;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.app-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 16px;
    color: #fbbf24;
}

.app-rating span {
    color: #94a3b8;
    font-size: 14px;
    font-weight: 500;
}

.app-description {
    font-size: 18px;
    color: #cbd5e1;
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 480px;
}

/* Tech Stack */
.app-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.tech-pill {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tech-pill:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

/* Store Buttons */
.app-actions {
    display: flex;
    gap: 16px;
}

.store-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
}

.store-btn.apple {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.store-btn.google {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.store-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.store-btn.apple:hover {
    background: #fff;
    color: #000;
}

.store-btn.google:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.store-btn i {
    font-size: 24px;
}

.btn-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.btn-small {
    font-size: 10px;
    font-weight: 500;
    opacity: 0.8;
}

.btn-large {
    font-size: 16px;
    font-weight: 700;
}

/* Other Projects Grid - Premium Upgrade */
.other-projects-title {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.other-projects-title h3 {
    font-size: 32px;
    font-weight: 700;
}

.premium-grid {
    display: run-in;
    /* Mistake in thought process, standard grid is better */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.project-card-premium {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 32px;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.project-card-premium:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.project-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    transition: all 0.4s ease;
}

.project-card-premium:hover .project-icon-wrapper {
    background: #6366f1;
    color: white;
    transform: scale(1.1) rotate(5deg);
}

.project-icon-wrapper i {
    font-size: 28px;
    color: #818cf8;
}

.project-card-premium:hover .project-icon-wrapper i {
    color: white;
}

.project-meta {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    display: block;
}

.project-title {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
}

.project-desc {
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 24px;
    font-size: 15px;
}

.project-stats {
    display: flex;
    gap: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
}

.p-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #cbd5e1;
}

.p-stat i {
    color: #6366f1;
}

/* Responsive adjustments */
@media (max-width: 968px) {

    .app-showcase-row,
    .app-showcase-row.reverse {
        flex-direction: column;
        gap: 60px;
        text-align: center;
    }

    .app-visual {
        width: 100%;
    }

    .app-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .app-description {
        margin-left: auto;
        margin-right: auto;
    }

    .app-tech-stack {
        justify-content: center;
    }

    .phone-mockup-3d {
        width: 260px;
        height: 520px;
    }
}

/* ===== Carousel Styles ===== */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    padding: 20px 0;
}

.carousel-track-container {
    overflow: hidden;
    width: 100%;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.carousel-slide {
    min-width: 100%;
    width: 100%;
    flex-shrink: 0;
    padding: 0 10px;
    /* Spacing between slides if needed */
    box-sizing: border-box;
}

/* Ensure app rows fit nicely in slide */
.carousel-slide .app-showcase-row {
    margin-bottom: 0;
    /* Remove bottom margin in carousel context */
}

/* Navigation Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(26, 26, 36, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.carousel-btn:hover {
    background: var(--accent-primary);
    border-color: transparent;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.carousel-btn.prev {
    left: 0;
}

.carousel-btn.next {
    right: 0;
}

/* Dots Navigation */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.carousel-dot.active {
    background: var(--accent-primary);
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

/* Mobile Adjustments for Carousel */
@media (max-width: 768px) {
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
        background: rgba(26, 26, 36, 0.95);
        /* More opacity on mobile */
    }

    .carousel-btn.prev {
        left: -10px;
    }

    .carousel-btn.next {
        right: -10px;
    }
}


/* ===== Image Carousel ===== */
.screen-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.screen-carousel img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    opacity: 0;
    transition: opacity 2.5s ease-in-out;
}

.screen-carousel img.active {
    opacity: 1;
}

/* ===== Phone Premium Gap Fix ===== */
/* Reducing padding in status bar to let content go full screen */
.launch-status-bar {
    padding-top: 15px !important;
    /* Force override */
}

/* Also ensure other top elements are tight */
.terminal-header,
.dp-header {
    margin-top: 5px;
}