/* ===== PORTFOLIO PAGE SPECIFIC STYLES ===== */
.matrix-showcase {
    background: #0a192f;
    min-height: 100vh;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.hologrid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(rgba(100, 255, 218, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(100, 255, 218, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 0;
    opacity: 0.3;
    animation: gridPulse 15s infinite alternate;
}

@keyframes gridPulse {
    0% { opacity: 0.2; background-size: 40px 40px; }
    50% { opacity: 0.4; background-size: 45px 45px; }
    100% { opacity: 0.2; background-size: 40px 40px; }
}

.cyber-portfolio-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* Animated Header */
.glitch-header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
}

.portfolio-glitch-title {
    font-size: 4rem;
    color: #64ffda;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    animation: glitchSkew 4s infinite;
}

@keyframes glitchSkew {
    0%, 40%, 44%, 58%, 61%, 65%, 69%, 73%, 100% {
        transform: skew(0deg);
    }
    41% {
        transform: skew(5deg);
    }
    42% {
        transform: skew(-5deg);
    }
    59% {
        transform: skew(10deg);
    }
    60% {
        transform: skew(-10deg);
    }
    63% {
        transform: skew(5deg);
    }
    70% {
        transform: skew(-2deg);
    }
    71% {
        transform: skew(2deg);
    }
}

.portfolio-glitch-title::before,
.portfolio-glitch-title::after {
    content: "PORTFOLIO";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.portfolio-glitch-title::before {
    color: #a8ff78;
    z-index: -1;
    animation: glitchEffect 3s infinite;
}

.portfolio-glitch-title::after {
    color: #ff64da;
    z-index: -2;
    animation: glitchEffect 2s reverse infinite;
}

@keyframes glitchEffect {
    0% { transform: translate(0); }
    20% { transform: translate(-5px, 5px); }
    40% { transform: translate(-5px, -5px); }
    60% { transform: translate(5px, 5px); }
    80% { transform: translate(5px, -5px); }
    100% { transform: translate(0); }
}

.portfolio-subtext {
    color: #ccd6f6;
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
    position: relative;
}

.portfolio-subtext::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 2px;
    background: linear-gradient(90deg, #64ffda, transparent);
    bottom: -15px;
    left: 25%;
    animation: lineExtend 3s infinite alternate;
}

@keyframes lineExtend {
    0% { width: 50%; }
    100% { width: 70%; }
}

/* Portfolio Filter */
.cyber-filter {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.neon-filter-btn {
    background: transparent;
    border: 1px solid rgba(100, 255, 218, 0.3);
    color: #64ffda;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.neon-filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(100, 255, 218, 0.2),
        transparent
    );
    transition: 0.5s;
}

.neon-filter-btn:hover,
.neon-filter-btn.active {
    background: rgba(100, 255, 218, 0.1);
    box-shadow: 0 0 15px rgba(100, 255, 218, 0.3);
}

.neon-filter-btn:hover::before {
    left: 100%;
}

/* Portfolio Grid */
.holographic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

.cyber-project {
    background: rgba(17, 34, 64, 0.7);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(100, 255, 218, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.cyber-project:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 20px 40px rgba(100, 255, 218, 0.2);
    border-color: rgba(100, 255, 218, 0.5);
}

.project-image-container {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.cyber-project:hover .project-image {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to top,
        rgba(10, 25, 47, 0.9) 0%,
        transparent 50%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cyber-project:hover .project-overlay {
    opacity: 1;
}

.project-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(100, 255, 218, 0.2);
    color: #64ffda;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    backdrop-filter: blur(5px);
}

.project-info {
    padding: 25px;
}

.project-title {
    color: #64ffda;
    font-size: 1.5rem;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.project-title::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: #64ffda;
    bottom: -5px;
    left: 0;
    transition: width 0.3s ease;
}

.cyber-project:hover .project-title::after {
    width: 100%;
}

.project-desc {
    color: #a8b2d1;
    line-height: 1.6;
    margin-bottom: 15px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tech-tag {
    background: rgba(100, 255, 218, 0.1);
    color: #64ffda;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.cyber-project:hover .tech-tag {
    background: rgba(100, 255, 218, 0.2);
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.2);
}

.project-links {
    display: flex;
    gap: 15px;
}

.project-link {
    color: #64ffda;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.project-link i {
    transition: transform 0.3s ease;
}

.project-link:hover {
    color: #a8ff78;
    text-shadow: 0 0 10px rgba(168, 255, 120, 0.5);
}

.project-link:hover i {
    transform: translateX(3px);
}

/* Project Modal */
.cyber-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 25, 47, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cyber-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: rgba(17, 34, 64, 0.95);
    border: 1px solid rgba(100, 255, 218, 0.3);
    border-radius: 15px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    box-shadow: 0 0 50px rgba(100, 255, 218, 0.2);
}

.cyber-modal.active .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: #64ffda;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-modal:hover {
    transform: rotate(90deg);
    color: #ff64da;
}

.modal-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 1px solid rgba(100, 255, 218, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-title {
    color: #64ffda;
    font-size: 2rem;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.modal-title::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #64ffda, transparent);
    bottom: -10px;
    left: 0;
}

.modal-desc {
    color: #a8b2d1;
    line-height: 1.8;
    margin-bottom: 30px;
}

.modal-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.detail-card {
    background: rgba(13, 27, 42, 0.7);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(100, 255, 218, 0.2);
}

.detail-title {
    color: #64ffda;
    font-size: 1.1rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-content {
    color: #ccd6f6;
    line-height: 1.6;
}

.modal-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

.gallery-item {
    height: 150px;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(100, 255, 218, 0.2);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(100, 255, 218, 0.3);
    border-color: rgba(100, 255, 218, 0.5);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.1);
}

.modal-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.modal-btn {
    background: linear-gradient(45deg, #64ffda, #2dd4bf);
    color: #0a192f;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.modal-btn.secondary {
    background: transparent;
    border: 1px solid #64ffda;
    color: #64ffda;
}

.modal-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(100, 255, 218, 0.4);
}

/* Stats Section */
.portfolio-stats {
    background: linear-gradient(135deg, #112240, #0a192f);
    border-radius: 15px;
    padding: 60px 40px;
    margin-bottom: 80px;
    border: 1px solid rgba(100, 255, 218, 0.2);
    position: relative;
    overflow: hidden;
}

.stats-title {
    text-align: center;
    color: #64ffda;
    font-size: 2.5rem;
    margin-bottom: 60px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.stat-item {
    text-align: center;
    perspective: 1000px;
}

.stat-card {
    background: rgba(17, 34, 64, 0.7);
    border-radius: 10px;
    padding: 30px;
    border: 1px solid rgba(100, 255, 218, 0.2);
    transition: all 0.5s ease;
    transform-style: preserve-3d;
}

.stat-item:hover .stat-card {
    transform: rotateY(15deg);
    box-shadow: 0 10px 30px rgba(100, 255, 218, 0.2);
    border-color: rgba(100, 255, 218, 0.5);
}

.stat-icon {
    font-size: 2.5rem;
    color: #64ffda;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.stat-item:hover .stat-icon {
    transform: scale(1.2);
    text-shadow: 0 0 15px rgba(100, 255, 218, 0.5);
}

.stat-number {
    font-size: 2.5rem;
    color: #64ffda;
    font-weight: bold;
    margin-bottom: 10px;
}

.stat-label {
    color: #a8b2d1;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Floating Binary Elements */
.floating-binary {
    position: absolute;
    color: rgba(100, 255, 218, 0.1);
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    pointer-events: none;
    z-index: 1;
    animation: floatBinary 20s linear infinite;
    user-select: none;
}

@keyframes floatBinary {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 0.3; }
    90% { opacity: 0.3; }
    100% { transform: translateY(-100vh) translateX(50px); opacity: 0; }
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .portfolio-glitch-title {
        font-size: 3rem;
    }
    
    .holographic-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 992px) {
    .modal-content {
        padding: 30px;
    }
    
    .modal-image {
        height: 300px;
    }
    
    .modal-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .portfolio-glitch-title {
        font-size: 2.5rem;
    }
    
    .portfolio-subtext {
        font-size: 1.1rem;
    }
    
    .cyber-filter {
        gap: 10px;
    }
    
    .holographic-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .portfolio-glitch-title {
        font-size: 2rem;
    }
    
    .matrix-showcase {
        padding: 100px 0 60px;
    }
    
    .glitch-header {
        margin-bottom: 50px;
    }
    
    .modal-gallery {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}


/* ===== PROJECT VIEW SPECIFIC STYLES ===== */

.project-view-btn {
    background: transparent;
    border: 1px solid rgba(100, 255, 218, 0.5);
    color: #64ffda;
    padding: 12px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    margin-bottom: 20px;
    z-index: 2;
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.1);
}

.project-view-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(100, 255, 218, 0.2),
        transparent
    );
    transition: 0.5s;
    z-index: -1;
}

.project-view-btn:hover {
    background: rgba(100, 255, 218, 0.1);
    box-shadow: 0 0 20px rgba(100, 255, 218, 0.3);
    transform: translateY(-2px);
}

.project-view-btn:hover::before {
    left: 100%;
}

.project-view-btn:active {
    transform: translateY(0);
    box-shadow: 0 0 15px rgba(100, 255, 218, 0.4);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .project-view-btn {
        padding: 10px 20px;
        font-size: 0.8rem;
    }
}

/* Floating Code Elements */
.floating-code {
    position: absolute;
    color: rgba(100, 255, 218, 0.6);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: pre;
    pointer-events: none;
    z-index: 1;
    text-shadow: 0 0 8px rgba(100, 255, 218, 0.4);
    animation: floatCode 25s linear infinite;
    user-select: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
}

.floating-code:nth-child(odd) {
    color: rgba(168, 255, 120, 0.6);
    text-shadow: 0 0 8px rgba(168, 255, 120, 0.4);
}

.floating-code:nth-child(3n) {
    color: rgba(255, 100, 218, 0.6);
    text-shadow: 0 0 8px rgba(255, 100, 218, 0.4);
}

@keyframes floatCode {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        opacity: 0;
        transform: translateY(-100vh);
    }
}

/* Make the code elements visible after a short delay */
.floating-code {
    animation-delay: 0.5s;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .floating-code {
        font-size: 0.7rem;
        animation-duration: 20s;
    }
}

@media (max-width: 576px) {
    .floating-code {
        display: none; /* Hide on very small screens */
    }
}