/* Glassmorphism Components */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

/* Animated Border for Glass Panel */
.cyber-border::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(45deg, var(--color-cyber-green), transparent, var(--color-electric-blue));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.cyber-border:hover::before {
    opacity: 1;
}

/* Navigation */
.glass-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    background: rgba(10, 15, 26, 0.8);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 240, 255, 0.1);
    border-radius: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    z-index: 1000;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Buttons */
.cyber-button {
    display: inline-block;
    padding: 12px 24px;
    background: transparent;
    color: var(--color-cyber-green);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-transform: uppercase;
    border: 1px solid var(--color-cyber-green);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 1;
}

.cyber-button::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 0%;
    height: 100%;
    background: var(--color-cyber-green);
    transition: all 0.3s ease;
    z-index: -1;
}

.cyber-button:hover {
    color: var(--color-black);
    text-shadow: none;
    box-shadow: 0 0 15px var(--color-cyber-green);
}

.cyber-button:hover::before {
    width: 100%;
}

.cyber-button.outline {
    border-color: var(--color-electric-blue);
    color: var(--color-electric-blue);
}

.cyber-button.outline::before {
    background: var(--color-electric-blue);
}

.cyber-button.outline:hover {
    color: var(--color-black);
    box-shadow: 0 0 15px var(--color-electric-blue);
}

/* Hero Section Specific */
.hero-content {
    text-align: center;
    max-width: 800px;
    z-index: 10;
}

.hero-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Terminal Loader */
.terminal-loader {
    width: 100%;
    max-width: 600px;
    text-align: left;
}

/* Profile Image Glow */
.profile-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 2rem;
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-cyber-green);
    position: relative;
    z-index: 2;
}

.profile-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--color-cyber-green);
    filter: blur(30px);
    opacity: 0.5;
    z-index: 1;
    animation: pulse 2s infinite;
}

/* Image Standardization */
.img-project {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 240, 255, 0.2);
}

.img-cert {
    width: 100%;
    aspect-ratio: 1.414 / 1; /* Standard landscape certificate */
    object-fit: contain;
    background: rgba(0,0,0,0.8);
    border-radius: 4px;
    padding: 0.5rem;
}

.img-gallery {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: rgba(0,0,0,0.6);
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.img-gallery:hover {
    transform: scale(1.05);
}

/* Custom Slideshows & Modal */
.project-slideshow-container {
    position: relative;
    overflow: hidden;
}

.project-slideshow-container .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.6);
}

.project-slideshow-container .slide.active {
    opacity: 1;
    position: relative; /* So the container height scales */
}

/* Custom Modal */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.custom-modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.close-modal-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--color-electric-blue);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10;
}

.close-modal-btn:hover {
    color: var(--color-cyber-green);
}

.modal-slideshow-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    position: relative;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0, 240, 255, 0.2);
}

.modal-slideshow-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.modal-slideshow-container img.active {
    opacity: 1;
}

.slide-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: var(--color-electric-blue);
    border: 1px solid var(--color-electric-blue);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.slide-nav-btn:hover {
    background: var(--color-electric-blue);
    color: #000;
}

.prev-btn { left: 1rem; }
.next-btn { right: 1rem; }

/* Mobile Components Responsiveness */
@media (max-width: 768px) {
    .glass-nav {
        padding: 0.8rem 1rem;
        border-radius: 20px;
        width: 95%;
    }
    
    .nav-brand {
        display: none; /* Hide brand to save space for links */
    }
    
    .nav-links {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        justify-content: flex-start;
        gap: 1.5rem;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px; /* for scrollbar */
    }
    
    .nav-links::-webkit-scrollbar {
        display: none; /* hide scrollbar for clean look */
    }
    
    .custom-modal-content {
        width: 95%;
        padding: 1rem;
        gap: 1rem;
    }
    
    .close-modal-btn {
        top: 0.5rem;
        right: 1rem;
        font-size: 1.5rem;
    }
    
    .slide-nav-btn {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .prev-btn { left: 0.5rem; }
    .next-btn { right: 0.5rem; }
}
