
/* ====================================
   CV AFTAH ONLINE - EXTERNAL CSS
   File: utama.css
   Version: 2.0.0
   Author: Muhammad Aftah Fauzan
   Website: https://aftah.online
   ==================================== */

/* ====================================
   ADVANCED ANIMATIONS
   ==================================== */

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-100px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    0% {
        opacity: 0;
        transform: translateX(100px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(79, 70, 229, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes shine {
    0% {
        top: -50%;
        left: -50%;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        top: 50%;
        left: 50%;
        opacity: 0;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ====================================
   PREMIUM CARD EFFECTS
   ==================================== */

.premium-card-effect {
    position: relative;
    overflow: hidden;
}

.premium-card-effect::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);
    transition: all 0.6s ease;
    opacity: 0;
}

.premium-card-effect:hover::before {
    animation: shine 0.8s ease-in-out;
}

/* ====================================
   GLOW EFFECTS
   ==================================== */

.glow-effect {
    position: relative;
}

.glow-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: xor;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glow-effect:hover::after {
    opacity: 1;
}

/* ====================================
   TYPOGRAPHY EFFECTS
   ==================================== */

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

.text-shadow-premium {
    text-shadow: 
        0 1px 0 rgba(0, 0, 0, 0.1),
        0 2px 0 rgba(0, 0, 0, 0.1),
        0 3px 0 rgba(0, 0, 0, 0.1),
        0 4px 10px rgba(0, 0, 0, 0.3);
}

/* ====================================
   PREMIUM BUTTONS
   ==================================== */

.btn-premium {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: var(--radius-full);
    color: white;
    padding: 1rem 2rem;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

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

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

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
}

/* ====================================
   SCROLL PROGRESS BAR
   ==================================== */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    z-index: 10000;
    transition: width 0.1s ease;
}

/* ====================================
   FLOATING ACTION BUTTON
   ==================================== */

.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    animation: float 3s ease-in-out infinite;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.6);
}

.fab.pulse {
    animation: pulse 2s infinite, float 3s ease-in-out infinite;
}

/* ====================================
   NOTIFICATION SYSTEM
   ==================================== */

.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-2xl);
    max-width: 400px;
    transform: translateX(500px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 10001;
    backdrop-filter: blur(20px);
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-color: var(--success-color);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), var(--bg-primary));
}

.notification.error {
    border-color: var(--danger-color);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), var(--bg-primary));
}

.notification.warning {
    border-color: var(--warning-color);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), var(--bg-primary));
}

.notification.info {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), var(--bg-primary));
}

/* ====================================
   MODAL SYSTEM
   ==================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

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

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.8) translateY(-50px);
    transition: all 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--border-color);
}

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

/* ====================================
   TOOLTIP SYSTEM
   ==================================== */

.tooltip-popup {
    position: fixed;
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10002;
    pointer-events: none;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

.tooltip-popup.show {
    opacity: 1;
    visibility: visible;
}

.tooltip-popup::after {
    content: '';
    position: absolute;
    border: 6px solid transparent;
}

.tooltip-popup.tooltip-top::after {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: var(--text-primary);
}

.tooltip-popup.tooltip-bottom::after {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-color: var(--text-primary);
}

.tooltip-popup.tooltip-left::after {
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-left-color: var(--text-primary);
}

.tooltip-popup.tooltip-right::after {
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-right-color: var(--text-primary);
}

/* ====================================
   PORTFOLIO HOVER EFFECTS
   ==================================== */

.portfolio-hover-effect {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
}

.portfolio-hover-effect .portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.9), rgba(6, 182, 212, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
    backdrop-filter: blur(5px);
}

.portfolio-hover-effect:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-hover-effect .portfolio-overlay .overlay-content {
    text-align: center;
    color: white;
    transform: translateY(20px);
    transition: transform 0.4s ease 0.1s;
}

.portfolio-hover-effect:hover .portfolio-overlay .overlay-content {
    transform: translateY(0);
}

/* ====================================
   LOADING STATES
   ==================================== */

.skeleton {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 1.5rem;
    width: 60%;
    margin-bottom: 1rem;
}

.skeleton-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

/* ====================================
   STATUS BADGES
   ==================================== */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.online {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.status-badge.busy {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.status-badge.away {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
    border: 1px solid var(--warning-color);
}

.status-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 2s infinite;
}

/* ====================================
   KEYBOARD SHORTCUTS DISPLAY
   ==================================== */

kbd {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: inline-block;
    margin: 0 0.25rem;
}

/* ====================================
   OFFLINE STATE
   ==================================== */

.offline {
    filter: grayscale(0.5);
}

.offline::before {
    content: '📡 You are offline';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--danger-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    z-index: 10003;
    animation: pulse 2s infinite;
}

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

@media print {
    .fab,
    .scroll-progress,
    .notification,
    .modal,
    .tooltip-popup,
    .status-badge {
        display: none !important;
    }
    
    .premium-card-effect,
    .portfolio-hover-effect,
    .glow-effect {
        box-shadow: none !important;
        background: var(--bg-primary) !important;
    }
    
    .text-gradient {
        -webkit-text-fill-color: var(--text-primary);
        background: none;
    }
    
    .btn-premium {
        background: var(--primary-color) !important;
        box-shadow: none !important;
    }
    
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ====================================
   ACCESSIBILITY ENHANCEMENTS
   ==================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .fab {
        animation: none !important;
    }
    
    .scroll-progress {
        transition: none !important;
    }
}


@media (prefers-contrast: high) {
    .premium-card-effect,
    .portfolio-hover-effect,
    .glow-effect {
        border: 3px solid var(--text-primary) !important;
        background: var(--bg-primary) !important;
    }
    
    .text-gradient {
        -webkit-text-fill-color: var(--text-primary) !important;
        background: none !important;
    }
    
    .btn-premium {
        background: var(--text-primary) !important;
        color: var(--bg-primary) !important;
        border: 2px solid var(--text-primary) !important;
    }
    
    .notification {
        border-width: 3px !important;
        background: var(--bg-primary) !important;
    }
    
    .status-badge {
        border-width: 2px !important;
        background: var(--bg-primary) !important;
    }
}

/* ====================================
   DARK MODE ENHANCEMENTS
   ==================================== */

[data-theme="dark"] .premium-card-effect::before {
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
}

[data-theme="dark"] .glow-effect::after {
    background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
}

[data-theme="dark"] .notification {
    backdrop-filter: blur(20px);
    border-color: var(--border-light);
}

[data-theme="dark"] .modal-content {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
}

[data-theme="dark"] .tooltip-popup {
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}

/* ====================================
   PERFORMANCE OPTIMIZATIONS
   ==================================== */

.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* GPU acceleration for animations */
.fab,
.scroll-progress,
.notification,
.modal {
    transform: translateZ(0);
}

/* ====================================
   RESPONSIVE UTILITIES
   ==================================== */

.responsive-text {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
}

.responsive-spacing {
    padding: clamp(1rem, 4vw, 3rem);
}

.responsive-width {
    width: clamp(300px, 50vw, 800px);
}

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

.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    transition: all 0.8s ease;
}

.loading.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 2rem;
}

.loading-text {
    color: var(--text-secondary);
    font-size: 1.125rem;
    font-weight: 500;
    animation: pulse 2s ease-in-out infinite alternate;
}

/* ====================================
   PROGRESS BARS
   ==================================== */

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: inherit;
    width: var(--progress, 0%);
    transition: width 1s ease;
}

.progress-bar.animated::before {
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* ====================================
   SKILL TAGS
   ==================================== */

.skill-tag-premium {
    position: relative;
    background: var(--primary-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    display: inline-block;
    margin: 0.5rem;
}

.skill-tag-premium::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.6s ease;
}

.skill-tag-premium:hover::before {
    width: 300px;
    height: 300px;
}

.skill-tag-premium:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-color);
}

/* ====================================
   MASONRY GRID LAYOUT
   ==================================== */

.masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Fallback for browsers without masonry support */
@supports not (grid-auto-rows: masonry) {
    .masonry-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 2rem;
    }
    
    .masonry-grid > * {
        flex: 1 1 300px;
    }
}

/* ====================================
   MOBILE OPTIMIZATIONS
   ==================================== */

@media (max-width: 768px) {
    .fab {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .notification {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .notification.show {
        transform: translateY(0);
    }
    
    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .tooltip-popup {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }
    
    kbd {
        font-size: 0.75rem;
        padding: 0.125rem 0.375rem;
    }
}

/* ====================================
   TABLET OPTIMIZATIONS
   ==================================== */

@media (min-width: 769px) and (max-width: 1024px) {
    .fab {
        bottom: 1.5rem;
        right: 1.5rem;
    }
    
    .notification {
        top: 1.5rem;
        right: 1.5rem;
        max-width: 350px;
    }
}

/* ====================================
   DESKTOP ENHANCEMENTS
   ==================================== */

@media (min-width: 1025px) {
    .premium-card-effect:hover {
        transform: perspective(1000px) rotateY(5deg) rotateX(5deg);
    }
    
    .portfolio-hover-effect:hover {
        transform: perspective(1000px) rotateY(-5deg) rotateX(-5deg);
    }
    
    .skill-tag-premium:hover {
        transform: translateY(-5px) scale(1.08) perspective(1000px) rotateY(10deg);
    }
}

/* ====================================
   HIGH DPI DISPLAYS
   ==================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .premium-card-effect,
    .portfolio-hover-effect,
    .notification,
    .modal-content {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    }
    
    .fab {
        box-shadow: 0 8px 32px rgba(79, 70, 229, 0.3);
    }
}

/* ====================================
   FOCUS STATES
   ==================================== */

.btn-premium:focus,
.fab:focus,
.skill-tag-premium:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

.modal-content:focus-within {
    box-shadow: 0 0 0 3px var(--primary-color);
}

/* ====================================
   SCROLL BEHAVIOR
   ==================================== */

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

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

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--bg-secondary);
}

/* ====================================
   SELECTION STYLES
   ==================================== */

::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}
