/* 
 * Dynamic Layout & Visual Polish
 * High-end visual effects: Glassmorphism, 3D Tilt, Glows, and Animations
 */

/* =========================================
   1. Glassmorphism & Visual Depth
   ========================================= */

:root {
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-highlight: rgba(255, 255, 255, 0.1);
    --neon-blue: #667eea;
    --neon-purple: #764ba2;
    --neon-green: #4ade80;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-panel:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--glass-highlight);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

/* Glowing Borders */
.glow-border {
    position: relative;
    z-index: 1;
}

.glow-border::after {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: -1;
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple), var(--neon-green));
    filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.glow-border:hover::after {
    opacity: 0.4;
}

/* =========================================
   2. 3D Tilt Effect Styles
   ========================================= */

.tilt-card {
    transform-style: preserve-3d;
    transform: perspective(1000px);
}

.tilt-content {
    transform: translateZ(20px);
}

.tilt-glare {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.2), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    mix-blend-mode: overlay;
}

/* =========================================
   3. Advanced Animations
   ========================================= */

/* Staggered Scroll Reveal */
.reveal-hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }

/* Floating Animation */
@keyframes float-dynamic {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.animate-float {
    animation: float-dynamic 6s ease-in-out infinite;
}

/* Pulse Glow */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(102, 126, 234, 0.2); }
    50% { box-shadow: 0 0 20px rgba(102, 126, 234, 0.6); }
}

.animate-pulse-glow {
    animation: pulse-glow 3s infinite;
}

/* Text Gradient Flow */
@keyframes gradient-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.text-gradient-flow {
    background: linear-gradient(270deg, #667eea, #764ba2, #4ade80, #667eea);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-flow 6s ease infinite;
}

/* =========================================
   4. Component Specific Polish
   ========================================= */

/* Skill Cards */
.skill-item {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.skill-item:hover {
    transform: translateY(-5px) scale(1.02);
}

/* Project Cards */
.project-card-image {
    overflow: hidden;
}

.project-card-image img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card:hover .project-card-image img {
    transform: scale(1.1);
}

/* Navbar Blur Enhancement */
.glass-nav {
    background: rgba(26, 31, 58, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* =========================================
   5. Enhanced Certificate Popup Styles
   ========================================= */

/* Premium Certificate Card */
.cert-card-premium {
    background: linear-gradient(145deg, rgba(45, 55, 72, 0.9), rgba(26, 32, 44, 0.95));
    border: 1px solid rgba(102, 126, 234, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.cert-card-premium:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.6);
    z-index: 10;
}

/* Source Badge Animation */
.cert-source-badge {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
}

.cert-source-badge::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

/* Popup Container Enhancement */
.cert-popup-enhanced {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Certificate Provider Colors */
.cert-provider.coursera {
    background: rgba(0, 86, 210, 0.15);
    color: #4299e1;
    border-color: rgba(0, 86, 210, 0.3);
}

.cert-provider.dicoding {
    background: rgba(45, 55, 72, 0.8);
    color: #a0aec0;
    border-color: rgba(74, 85, 104, 0.5);
}

.cert-provider.bangkit {
    background: rgba(237, 28, 36, 0.15);
    color: #fc8181;
    border-color: rgba(237, 28, 36, 0.3);
}

.cert-provider.oracle {
    background: rgba(248, 0, 0, 0.15);
    color: #feb2b2;
    border-color: rgba(248, 0, 0, 0.3);
}

.cert-provider.unidha {
    background: rgba(255, 215, 0, 0.15);
    color: #f6e05e;
    border-color: rgba(255, 215, 0, 0.3);
}

.cert-provider.msib {
    background: rgba(0, 255, 255, 0.15);
    color: #63b3ed;
    border-color: rgba(0, 255, 255, 0.3);
}

/* Skill Highlight Badge */
.skill-highlight {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: #a3bffa;
    transition: all 0.3s ease;
}

.skill-highlight:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}
