/* =========================================
   WEB DEVELOPMENT STORY & TROPHY LIBRARY
   ========================================= */

/* --- 1. Storytelling Section (Refined into Service Showcase) --- */

/* Seamless Transition Gradient */
.knowledge-showcase::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom, transparent, #0B1121);
    z-index: 10;
    pointer-events: none;
}

/* Ensure background continuity */
.knowledge-showcase {
    padding: 6rem 0;
    position: relative;
    background: #0B1121;
    /* Match background */
    margin-top: -1px;
    /* overlapping slightly */
}

/* Smooth Scroll Offset */
#story-start {
    scroll-margin-top: 100px;
}

/* Typography Enhancements - Removed to use shared library-header styles */

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

/* Holographic Card Module */
.holo-card {
    background: rgba(30, 41, 59, 0.3);
    /* Dark glass */
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: default;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 280px;
    /* Ensure uniform height */
}

/* Glowing Border Gradient on Hover */
.holo-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, transparent 40%, var(--brand-blue), var(--brand-green), transparent 60%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.holo-card:hover::before {
    opacity: 1;
}

/* Background Highlight */
.holo-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 100% 0%, rgba(59, 130, 246, 0.1), transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.holo-card:hover::after {
    opacity: 1;
}

.holo-card:hover {
    transform: scale(1.02);
    background: rgba(30, 41, 59, 0.6);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* Icons styling */
.holo-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    transition: transform 0.4s ease;
}

.holo-card:hover .holo-icon {
    transform: scale(1.1);
}

.holo-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.holo-desc {
    font-size: 0.95rem;
    color: #94A3B8;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* Interactive Detail (Knowledge Bit) */
.knowledge-bit {
    margin-top: auto;
    /* Push to bottom */
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    color: var(--brand-green);
    font-weight: 600;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease 0.1s;
    /* Delay slightly */
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.holo-card:hover .knowledge-bit {
    opacity: 1;
    transform: translateY(0);
}

/* --- 2. Trophy Library (Portfolio) --- */
.trophy-library {
    padding: 6rem 0;
    background: radial-gradient(circle at center, #0B1121 0%, #020617 100%);
    position: relative;
    overflow: hidden;
}

.library-header {
    text-align: center;
    margin-bottom: 4rem;
}

.trophy-shelf {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    perspective: 1000px;
}

.trophy-case {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    /* Structured, less rounded */
    padding: 1.5rem;
    position: relative;
    transition: all 0.5s ease;
    transform-style: preserve-3d;
    box-shadow:
        0 20px 40px -10px rgba(0, 0, 0, 0.5),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Shelf bottom light */
.trophy-case::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 5%;
    width: 90%;
    height: 10px;
    background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.4), transparent 70%);
    filter: blur(5px);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.trophy-case:hover {
    transform: translateY(-10px) rotateX(2deg);
    border-color: rgba(59, 130, 246, 0.4);
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.05), rgba(255, 255, 255, 0.01));
}

.trophy-case:hover::after {
    opacity: 1;
}

.trophy-img-container {
    height: 200px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.trophy-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.trophy-case:hover .trophy-img {
    transform: scale(1.05);
}

.trophy-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--brand-blue);
    margin-bottom: 0.5rem;
    display: block;
}

.trophy-title {
    font-size: 1.25rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.trophy-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #64748B;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* --- 3. Final Call (Enthusiastic) --- */
.enthusiasm-cta {
    text-align: center;
    padding: 6rem 0;
    position: relative;
}

.big-toggle-btn {
    background: var(--brand-green);
    color: #000;
    font-weight: 800;
    padding: 1rem 3rem;
    border-radius: 99px;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.4);
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.big-toggle-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 50px rgba(16, 185, 129, 0.6);
}

/* Animations Logic Helper */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.reveal-on-scroll.active {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for grid items */
.showcase-grid .holo-card:nth-child(1) {
    transition-delay: 0s;
}

.showcase-grid .holo-card:nth-child(2) {
    transition-delay: 0.1s;
}

.showcase-grid .holo-card:nth-child(3) {
    transition-delay: 0.2s;
}

.showcase-grid .holo-card:nth-child(4) {
    transition-delay: 0.3s;
}

.showcase-grid .holo-card:nth-child(5) {
    transition-delay: 0.4s;
}

.showcase-grid .holo-card:nth-child(6) {
    transition-delay: 0.5s;
}


@media (max-width: 1024px) {
    .showcase-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .trophy-shelf {
        grid-template-columns: 1fr;
    }

    .showcase-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Code Creation Animation --- */
.code-creation-module {
    margin: 0 auto 3rem auto;
    max-width: 500px;
    perspective: 1000px;
}

.code-window {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    text-align: left;
    transform: rotateX(10deg);
    transition: transform 0.5s ease;
}

.code-window:hover {
    transform: rotateX(0deg) scale(1.02);
}

.window-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red {
    background: #FF5F56;
}

.dot.yellow {
    background: #FFBD2E;
}

.dot.green {
    background: #27C93F;
}

.window-title {
    margin-left: auto;
    margin-right: auto;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: #94A3B8;
    opacity: 0.7;
}

.code-content {
    padding: 1.5rem;
    font-family: 'Courier New', Courier, monospace;
    /* Fallback to monospace */
    font-size: 0.9rem;
    line-height: 1.6;
    color: #E2E8F0;
}

.line {
    opacity: 0;
    animation: typeLine 0.5s forwards;
}

.line:nth-child(1) {
    animation-delay: 0.5s;
}

.line:nth-child(2) {
    animation-delay: 1.5s;
}

.line:nth-child(3) {
    animation-delay: 2.5s;
}

.line:nth-child(4) {
    animation-delay: 3.5s;
}

.line:nth-child(5) {
    animation-delay: 4.5s;
}

.indent {
    padding-left: 1.5rem;
}

.tag {
    color: #F472B6;
}

/* Pink */
.attr {
    color: #A78BFA;
}

/* Purple */
.val {
    color: #34D399;
}

/* Green */

.cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--brand-blue);
    vertical-align: middle;
    animation: blink 1s step-end infinite;
}

@keyframes typeLine {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* =========================================
   COMING SOON OVERLAY (PORTFOLIO)
   ========================================= */
.trophy-blur-container {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}

.trophy-content-blur {
    filter: blur(8px);
    opacity: 0.4;
    pointer-events: none;
    user-select: none;
}

.coming-soon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
    width: 100%;
    padding: 2rem;
}

.coming-soon-badge {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 2rem;
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.coming-soon-text {
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.coming-soon-icon {
    font-size: 1.25rem;
    animation: spin-slow 4s linear infinite;
}

@keyframes spin-slow {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================
   MOBILE RESPONSIVENESS
   ========================================= */

/* CTA Flex Container (Replaces inline styles) */
.tech-cta-flex {
    display: flex;
    align-items: center;
    gap: 4rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {

    /* Stack Grids */
    .showcase-grid,
    .trophy-shelf {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Stack CTA */
    .tech-cta-flex {
        flex-direction: column;
        gap: 3rem;
        text-align: center;
    }

    .tech-cta-flex .cta-content {
        text-align: center !important;
    }

    /* Adjust Typography */
    .hero-title {
        font-size: 2.5rem !important;
    }

    .section-title {
        font-size: 2rem !important;
    }

    /* Adjust Padding */
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .enthusiasm-cta {
        padding: 4rem 0 !important;
    }

    /* Adjust Hero Height/Spacing */
    .tech-hero {
        min-height: auto !important;
        padding-top: 120px;
        padding-bottom: 60px;
    }

    /* Coming Soon Badge */
    .coming-soon-badge {
        padding: 0.75rem 1.5rem;
        width: 90%;
        justify-content: center;
    }

    .coming-soon-text {
        font-size: 0.9rem;
    }
}