/* ==========================================
   ZHANYAR FADHIL - PORTFOLIO STYLES
   Premium Glassmorphism Design
   ========================================== */

/* ========== CSS Variables ========== */
:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --accent-light: #22d3ee;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --dark-bg: #0f0f23;
    --dark-card: rgba(15, 15, 35, 0.7);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    --text-white: #ffffff;
    --text-light: rgba(255, 255, 255, 0.9);
    --text-muted: rgba(255, 255, 255, 0.6);
    
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
    --gradient-secondary: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
    --shadow-card: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;
    
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ========== Base Styles ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--dark-bg);
    color: var(--text-white);
    overflow-x: hidden;
    min-height: 100vh;
}

/* ========== Fixed Background ========== */
.fixed-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../img/photo_2025-10-27_22-02-09.jpg') center center/cover no-repeat;
    filter: blur(8px) brightness(0.6);
    transform: scale(1.1);
    z-index: -2;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(15, 15, 35, 0.7) 0%,
        rgba(15, 15, 35, 0.8) 50%,
        rgba(15, 15, 35, 0.9) 100%
    );
    z-index: -1;
}

/* ========== Glass Effect ========== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    transition: all var(--transition-medium);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

/* ========== Gradient Text ========== */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-primary-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== Navigation ========== */
.glass-nav {
    background: rgba(15, 15, 35, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 0;
    transition: all var(--transition-medium);
    z-index: 9999;
}

.glass-nav.scrolled {
    background: rgba(15, 15, 35, 0.95);
    padding: 10px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    padding: 8px 16px !important;
    margin: 0 4px;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-white) !important;
    background: var(--glass-bg);
}

/* Responsive Navbar - Show on desktop, collapse on mobile */
@media (min-width: 768px) {
    .navbar-collapse {
        display: flex !important;
    }
}

@media (max-width: 767.98px) {
    .navbar-collapse {
        background: rgba(15, 15, 35, 0.98);
        border-radius: var(--radius-md);
        margin-top: 1rem;
        padding: 1rem;
    }
    
    .navbar-nav {
        gap: 0.5rem;
    }
    
    .nav-link {
        padding: 12px 16px !important;
        border-radius: var(--radius-sm);
    }
}

/* ========== Hero Section ========== */
#hero {
    padding-top: 100px;
    position: relative;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* ========== Buttons ========== */
.btn-primary-gradient {
    background: var(--gradient-primary);
    border: none;
    color: var(--text-white);
    font-weight: 600;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    transition: all var(--transition-medium);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.btn-primary-gradient:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
    color: var(--text-white);
}

.btn-outline-light {
    border: 2px solid var(--glass-border);
    color: var(--text-white);
    font-weight: 600;
    padding: 10px 24px;
    border-radius: var(--radius-full);
    transition: all var(--transition-medium);
}

.btn-outline-light:hover {
    background: var(--glass-bg);
    border-color: var(--primary);
    transform: translateY(-3px);
}

.bg-gradient-primary {
    background: var(--gradient-primary) !important;
}

.bg-success-gradient {
    background: var(--gradient-success) !important;
}

/* ========== Social Icons ========== */
.social-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.social-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: all var(--transition-medium);
}

.social-icon:hover {
    color: var(--text-white);
    background: var(--gradient-primary);
    border-color: transparent;
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--shadow-glow);
}

.social-links-large {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.social-icon-large {
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
    font-size: 1.5rem;
    transition: all var(--transition-medium);
}

.social-icon-large:hover {
    color: var(--text-white);
    background: var(--gradient-primary);
    border-color: transparent;
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--shadow-glow);
}

/* ========== Profile Image ========== */
.profile-image-container {
    position: relative;
    display: inline-block;
}

.profile-image {
    width: 350px;
    height: 350px;
    border-radius: var(--radius-xl);
    object-fit: cover;
    border: 4px solid var(--glass-border);
    box-shadow: var(--shadow-card), var(--shadow-glow);
    position: relative;
    z-index: 2;
}

.profile-ring {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border: 2px solid var(--primary);
    border-radius: var(--radius-xl);
    opacity: 0.5;
    animation: pulse-ring 3s ease-in-out infinite;
}

@keyframes pulse-ring {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.02); opacity: 0.3; }
}

/* ========== Floating Badges ========== */
.floating-badge {
    position: absolute;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    font-size: 1.5rem;
    color: white;
    box-shadow: var(--shadow-glow);
    z-index: 3;
    animation: float 4s ease-in-out infinite;
}

.floating-badge.badge-1 {
    top: 20px;
    right: -10px;
    animation-delay: 0s;
}

.floating-badge.badge-2 {
    bottom: 60px;
    left: -10px;
    animation-delay: 1s;
    background: var(--gradient-secondary);
}

.floating-badge.badge-3 {
    bottom: -10px;
    right: 40px;
    animation-delay: 2s;
    background: var(--gradient-success);
}

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

/* ========== Scroll Indicator ========== */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-down {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    color: var(--text-muted);
    font-size: 1rem;
    animation: bounce 2s infinite;
    transition: all var(--transition-medium);
}

.scroll-down:hover {
    color: var(--text-white);
    background: var(--gradient-primary);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* ========== Typing Animation ========== */
.typing-cursor {
    animation: blink 1s step-end infinite;
    color: var(--primary);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ========== Section Styles ========== */
.section-padding {
    padding: 100px 0;
}

.section-subtitle {
    display: inline-block;
    color: var(--primary-light);
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 10px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 20px;
}

/* ========== About Section ========== */
.about-image-container {
    position: relative;
}

.about-image {
    width: 100%;
    max-width: 400px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
}

.experience-badge {
    position: absolute;
    bottom: 20px;
    right: -25px;
    padding: 20px 30px;
    text-align: center;
    z-index: 5;
    transform: none;
    left: auto;
}

.experience-badge h3 {
    font-size: 2.5rem;
    font-weight: 700;
}

/* ========== Stats ========== */
.stat-card {
    padding: 15px;
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: all var(--transition-medium);
}

.stat-card:hover {
    transform: scale(1.05);
    border-color: var(--primary);
}

.stat-card h4 {
    font-size: 2rem;
    font-weight: 700;
}

/* ========== Skills Section ========== */
.skill-card {
    border: 1px solid var(--glass-border);
    transition: all var(--transition-medium);
}

.skill-card:hover {
    border-color: var(--primary);
}

.skill-icon-wrapper {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    font-size: 1.8rem;
    color: white;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.skill-tag:hover {
    color: var(--text-white);
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.2);
}

/* ========== Skill Bars ========== */
.skill-bar-item {
    margin-bottom: 20px;
}

.skill-bar {
    height: 10px;
    background: var(--glass-bg);
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.skill-progress {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    width: 0;
    transition: width 1.5s ease-out;
}

/* ========== Timeline ========== */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient-primary);
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -38px;
    top: 0;
    width: 16px;
    height: 16px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    border: 3px solid var(--dark-bg);
    box-shadow: var(--shadow-glow);
}

.timeline-content {
    margin-left: 10px;
}

/* ========== Projects ========== */
.project-card {
    transition: all var(--transition-medium);
    border: 1px solid var(--glass-border);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-glow);
}

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

.project-icon-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    font-size: 4rem;
    color: white;
}

.project-icon-placeholder.telegram {
    background: linear-gradient(135deg, #0088cc 0%, #00a8e8 100%);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--transition-medium);
}

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

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.tech-tag {
    padding: 4px 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: var(--primary-light);
}

/* ========== Education ========== */
.education-card {
    border: 1px solid var(--glass-border);
}

.education-icon {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    font-size: 2.5rem;
    color: white;
    box-shadow: var(--shadow-glow);
}

.education-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.highlight-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.highlight-tag i {
    color: var(--success);
}

/* ========== Contact ========== */
.contact-card {
    border: 1px solid var(--glass-border);
    transition: all var(--transition-medium);
}

.contact-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.contact-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    font-size: 1.8rem;
    color: white;
    margin: 0 auto;
}

/* ========== Footer ========== */
.glass-footer {
    background: rgba(15, 15, 35, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
}

/* ========== Back to Top ========== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    color: white;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-medium);
    z-index: 1000;
    box-shadow: var(--shadow-glow);
}

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

.back-to-top:hover {
    transform: translateY(-5px);
    color: white;
}

/* ========== Responsive Styles ========== */
@media (max-width: 991.98px) {
    .profile-image {
        width: 280px;
        height: 280px;
    }
    
    .floating-badge {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .navbar-collapse {
        background: rgba(15, 15, 35, 0.95);
        border-radius: var(--radius-md);
        padding: 20px;
        margin-top: 15px;
    }
}

@media (max-width: 767.98px) {
    .profile-image {
        width: 220px;
        height: 220px;
    }
    
    .floating-badge.badge-1 {
        top: 10px;
        right: 20px;
    }
    
    .floating-badge.badge-2 {
        bottom: 80px;
        left: 20px;
    }
    
    .floating-badge.badge-3 {
        bottom: 10px;
        right: 60px;
    }
    
    .section-padding {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .about-image {
        max-width: 300px;
        margin: 0 auto;
        display: block;
    }
    
    .experience-badge {
        position: relative;
        margin-top: 20px;
        right: auto;
        bottom: auto;
        display: inline-block;
    }
    
    .education-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
}

@media (max-width: 575.98px) {
    .profile-image {
        width: 180px;
        height: 180px;
    }
    
    .floating-badge {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .timeline {
        padding-left: 20px;
    }
    
    .timeline-dot {
        left: -28px;
        width: 12px;
        height: 12px;
    }
}

/* ========== Custom Scrollbar ========== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ========== Selection ========== */
::selection {
    background: var(--primary);
    color: white;
}

/* ========== Preloader (optional) ========== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
