/* ========================================
   ZAKTO Portfolio - Custom Styles
   Custom animations, flame effects, and special styling
   ======================================== */

/* ========================================
   FLAME ANIMATIONS & EFFECTS
   ======================================== */

/* Flame Loader for Loading Screen */
.flame-loader {
    width: 60px;
    height: 60px;
    margin: 0 auto;
    position: relative;
}

.flame-loader::before,
.flame-loader::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, #FF6B35, #FF8C42, #FFA366);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: flameFlicker 1.5s ease-in-out infinite;
}

.flame-loader::after {
    width: 30px;
    height: 30px;
    background: linear-gradient(45deg, #FFA366, #FFBB88);
    animation-delay: 0.3s;
}

@keyframes flameFlicker {
    0%, 100% {
        transform: translateX(-50%) scaleY(1) scaleX(1);
        opacity: 1;
    }
    50% {
        transform: translateX(-50%) scaleY(1.1) scaleX(0.9);
        opacity: 0.8;
    }
}

/* Small Flame Icon */
.flame-icon-small {
    width: 24px;
    height: 30px;
    position: relative;
    animation: flameFlicker 2s ease-in-out infinite;
}

.flame-icon-small::before {
    content: '🔥';
    font-size: 24px;
    position: absolute;
    top: 0;
    left: 0;
}

/* Medium Flame Icon */
.flame-icon-medium {
    width: 40px;
    height: 50px;
    position: relative;
    animation: flameFlicker 2s ease-in-out infinite;
}

.flame-icon-medium::before {
    content: '🔥';
    font-size: 40px;
    position: absolute;
    top: 0;
    left: 0;
}

/* Large Flame Icon */
.flame-icon-large {
    width: 80px;
    height: 100px;
    position: relative;
    animation: flameFlicker 2.5s ease-in-out infinite;
}

.flame-icon-large::before {
    content: '🔥';
    font-size: 80px;
    position: absolute;
    top: 0;
    left: 0;
}

/* Flame Background Elements */
.flame-bg {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,107,53,0.3) 0%, transparent 70%);
    animation: floatFlame 8s ease-in-out infinite;
}

.flame-bg-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.flame-bg-2 {
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.flame-bg-3 {
    bottom: 10%;
    left: 50%;
    animation-delay: 4s;
}

@keyframes floatFlame {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-30px, 30px) scale(0.9);
    }
}

/* ========================================
   NAVBAR STYLES
   ======================================== */

#navbar {
    background: linear-gradient(135deg, #1E5BA8 0%, #2B6CB0 100%);
    backdrop-filter: blur(10px);
}

#navbar.scrolled {
    background: rgba(30, 91, 168, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* ========================================
   SCROLL REVEAL ANIMATIONS
   ======================================== */

.reveal-fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

.reveal-slide-up {
    opacity: 0;
    transform: translateY(30px);
}

.reveal-slide-up.active {
    animation: slideUp 0.8s ease-out forwards;
}

.reveal-slide-left {
    opacity: 0;
    transform: translateX(-30px);
}

.reveal-slide-left.active {
    animation: slideInLeft 0.8s ease-out forwards;
}

.reveal-slide-right {
    opacity: 0;
    transform: translateX(30px);
}

.reveal-slide-right.active {
    animation: slideInRight 0.8s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================
   PORTFOLIO FILTER BUTTONS
   ======================================== */

.filter-btn {
    background: #E2E8F0;
    color: #2D3748;
}

.filter-btn:hover {
    background: #4A90E2;
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.filter-btn.active {
    background: linear-gradient(135deg, #FF6B35, #FF8C42);
    color: #FFFFFF;
    box-shadow: 0 4px 6px -1px rgba(255, 107, 53, 0.3);
}

/* ========================================
   PORTFOLIO ITEMS
   ======================================== */

.portfolio-item {
    transition: all 0.3s ease;
}

.portfolio-item.hidden {
    display: none;
}

/* ========================================
   SKILL BARS
   ======================================== */

.skill-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.skill-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #FF6B35, #FF8C42);
    border-radius: 3px;
    animation: fillSkillBar 2s ease-out forwards;
}

@keyframes fillSkillBar {
    to {
        width: 90%;
    }
}

.skill-card:nth-child(1) .skill-bar::after {
    animation-delay: 0.2s;
}

.skill-card:nth-child(2) .skill-bar::after {
    animation-delay: 0.4s;
}

.skill-card:nth-child(3) .skill-bar::after {
    animation-delay: 0.6s;
}

.skill-card:nth-child(4) .skill-bar::after {
    animation-delay: 0.8s;
}

/* ========================================
   RETRO FRAME EFFECT (MS Paint Style)
   ======================================== */

.retro-frame {
    border: 3px solid #1E5BA8;
    box-shadow:
        3px 3px 0 0 rgba(0, 0, 0, 0.1),
        6px 6px 0 0 rgba(0, 0, 0, 0.05);
}

/* ========================================
   BACK TO TOP BUTTON
   ======================================== */

#back-to-top {
    transition: all 0.3s ease;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   CUSTOM SCROLLBAR
   ======================================== */

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #F7FAFC;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #1E5BA8, #2B6CB0);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #FF6B35, #FF8C42);
}

/* ========================================
   CONTACT FORM ENHANCEMENTS
   ======================================== */

#contact-form input:focus,
#contact-form textarea:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: #FF8C42;
}

#contact-form input::placeholder,
#contact-form textarea::placeholder {
    color: rgba(237, 242, 247, 0.6);
}

/* ========================================
   LOADING SCREEN
   ======================================== */

#loading-screen {
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

/* ========================================
   MODAL/LIGHTBOX
   ======================================== */

#project-modal {
    transition: opacity 0.3s ease;
}

#project-modal.show {
    display: flex !important;
}

/* ========================================
   GRADIENT TEXT EFFECT
   ======================================== */

.gradient-text {
    background: linear-gradient(135deg, #1E5BA8, #FF6B35);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   FOCUS ITEM ANIMATION
   ======================================== */

.focus-item {
    transition: all 0.3s ease;
}

.focus-item:hover {
    transform: translateX(10px);
}

/* ========================================
   PROCESS CARD
   ======================================== */

.process-card {
    transition: all 0.3s ease;
}

.process-card:hover {
    transform: translateY(-10px);
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
    .flame-icon-large::before {
        font-size: 60px;
    }

    .flame-bg {
        width: 150px;
        height: 150px;
    }
}

/* ========================================
   SMOOTH SCROLL
   ======================================== */

html {
    scroll-behavior: smooth;
}

/* ========================================
   SELECTION COLORS
   ======================================== */

::selection {
    background: #FF6B35;
    color: #FFFFFF;
}

::-moz-selection {
    background: #FF6B35;
    color: #FFFFFF;
}

/* ========================================
   ACCESSIBILITY - Focus Styles
   ======================================== */

a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid #FF8C42;
    outline-offset: 2px;
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    #navbar,
    #loading-screen,
    #back-to-top,
    .flame-icon-small,
    .flame-icon-medium,
    .flame-icon-large {
        display: none;
    }
}

/* ========================================
   PERFORMANCE OPTIMIZATION
   ======================================== */

.portfolio-card,
.skill-card,
.focus-item,
.process-card {
    will-change: transform;
}

/* ========================================
   END OF CUSTOM STYLES
   ======================================== */
