/* 
   Modern Portfolio Styles
   Author: Adi Nurrahman
   Font: Outfit 
*/

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-soft: rgba(79, 70, 229, 0.1);
    --secondary: #0ea5e9;
    --dark: #0f172a;
    --light: #f8fafc;
    --text-main: #334155;
    --text-muted: #64748b;
    --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #0ea5e9 100%);
    --gradient-light: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
    --shadow-primary: 0 10px 25px -5px rgba(79, 70, 229, 0.4);
    --shadow-success: 0 10px 25px -5px rgba(34, 197, 94, 0.4);
    --shadow-warning: 0 10px 25px -5px rgba(234, 179, 8, 0.4);
    --radius-lg: 1.5rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global */
body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    background-color: #ffffff;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--dark);
    font-weight: 700;
}

p {
    line-height: 1.8;
}

a {
    transition: var(--transition);
}

/* Utilities */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.bg-gradient-primary { background: var(--gradient-primary); }
.bg-gradient-light { background: var(--gradient-light); }
.bg-primary-soft { background-color: var(--primary-soft); }
.bg-warning-soft { background-color: rgba(234, 179, 8, 0.1); }
.text-primary { color: var(--primary) !important; }
.text-warning { color: #eab308 !important; }
.text-success { color: #22c55e !important; }

/* Buttons */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    transition: var(--transition);
}

.btn-primary:hover {
    box-shadow: var(--shadow-primary);
    transform: translateY(-2px);
}

.btn-outline-dark {
    border: 2px solid var(--dark);
    color: var(--dark);
    background: transparent;
}

.btn-outline-dark:hover {
    background: var(--dark);
    color: white;
    transform: translateY(-2px);
}

.hover-lift {
    transition: var(--transition);
}
.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg) !important;
}

.tracking-wide { letter-spacing: 0.1em; }
.fw-800 { font-weight: 800; }

/* Glassmorphism Navbar */
.glass-nav {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.3);
    transition: var(--transition);
}

.glass-nav.scrolled {
    box-shadow: var(--shadow-sm);
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

.navbar-brand {
    text-decoration: none;
}

.brand-logo {
    width: 42px;
    height: 42px;
    display: block;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.brand-name {
    line-height: 1;
}

.lang-toggle {
    min-width: 68px;
}

.navbar-nav .nav-link {
    color: var(--text-main);
    padding: 0.5rem 1rem;
    position: relative;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active {
    color: var(--primary);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.navbar-nav .nav-link:not(.btn):hover::after,
.navbar-nav .nav-link.active:not(.btn):after {
    width: 80%;
}

/* Background Animated Blobs */
.blob {
    position: absolute;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.4;
    border-radius: 50%;
    animation: float 10s infinite alternate ease-in-out;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: #4f46e5;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: #0ea5e9;
    bottom: 10%;
    right: -50px;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

/* Hero Section */
.custom-badge {
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary);
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.hero-img-container {
    position: relative;
    width: 350px;
    height: 350px;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background: var(--gradient-primary);
    padding: 8px;
    box-shadow: var(--shadow-primary);
    animation: morph 8s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    border: 6px solid white;
}

@keyframes morph {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

/* Floating Badges */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-md);
}

.floating-badge {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float-icon 4s infinite alternate ease-in-out;
}

.floating-icon {
    width: 32px;
    height: 32px;
    display: block;
}

.badge-1 { top: 10%; left: -20px; animation-delay: 0s; }
.badge-2 { bottom: 20%; right: -20px; animation-delay: 1s; }
.badge-3 { bottom: -10px; left: 20%; animation-delay: 2s; }

@keyframes float-icon {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-15px) rotate(10deg); }
}

/* About Section */
.profile-img-about {
    border-radius: 2rem !important;
    transform: rotate(-3deg);
    transition: var(--transition);
}
.about-img-wrap:hover .profile-img-about {
    transform: rotate(0deg) scale(1.02);
}
.about-img-wrap::before {
    content: '';
    position: absolute;
    inset: -15px;
    background: var(--gradient-primary);
    border-radius: 2.5rem;
    z-index: -1;
    transform: rotate(4deg);
    opacity: 0.3;
    transition: var(--transition);
}
.about-img-wrap:hover::before {
    transform: rotate(0deg);
}

.icon-box {
    width: 50px;
    height: 50px;
}

/* Skills Cards */
.icon-wrap {
    width: 70px;
    height: 70px;
    border-radius: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    transform: rotate(-5deg);
    transition: var(--transition);
}

.bg-primary-gradient { background: linear-gradient(135deg, #4f46e5, #0ea5e9); }
.bg-success-gradient { background: linear-gradient(135deg, #10b981, #34d399); }
.bg-warning-gradient { background: linear-gradient(135deg, #f59e0b, #fbbf24); }

.skill-card:hover .icon-wrap {
    transform: rotate(0deg) scale(1.1);
}

.skill-tag {
    background: rgba(79, 70, 229, 0.05);
    color: var(--primary);
    padding: 0.4rem 0.8rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.product-card {
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--gradient-primary);
}

.product-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.product-visual {
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    background: #e2e8f0;
}

.product-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

/* Timeline/Experience */
.timeline-container { padding-left: 2rem; }
.timeline-line {
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: rgba(79, 70, 229, 0.1);
    border-radius: 3px;
}

.timeline-dot {
    position: absolute;
    left: -20px;
    top: 30px;
    width: 20px;
    height: 20px;
    background: white;
    border: 4px solid var(--primary);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.custom-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}
.custom-list li::before {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: #0ea5e9;
    font-size: 0.9rem;
}

/* Portfolio Carousel */
.portfolio-wrapper {
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
}
.img-overlay-container {
    position: relative;
    height: 450px;
    width: 100%;
}
.img-overlay-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.overlay-grad {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15,23,42,0.9) 0%, rgba(15,23,42,0) 50%);
}

.carousel-caption {
    bottom: 2rem;
    text-align: left;
    left: 4rem;
    right: 4rem;
}

.carousel-indicators button {
    width: 12px !important;
    height: 12px !important;
    border: 2px solid white !important;
}

.control-btn {
    width: 45px;
    height: 45px;
    transition: var(--transition);
}
.control-btn:hover {
    background: var(--primary) !important;
    color: white !important;
}

/* Contact Section */
.custom-input {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.8rem 1.2rem;
    border-radius: 0.8rem;
    transition: var(--transition);
}
.custom-input:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.contact-icon {
    width: 45px;
    height: 45px;
}
.social-btn {
    width: 40px;
    height: 40px;
    transition: var(--transition);
}
.social-btn:hover {
    background: white !important;
    color: var(--primary) !important;
    transform: translateY(-3px);
}

/* Bubbles */
.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.2), rgba(255,255,255,0.01));
}
.bubble-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
}
.bubble-2 {
    width: 150px;
    height: 150px;
    bottom: -50px;
    left: -50px;
}

/* Responsiveness */
@media (max-width: 991px) {
    .reverse-mobile {
        flex-direction: column-reverse;
    }
    .hero-img-container {
        width: 280px;
        height: 280px;
    }
    .hero-section {
        padding-top: 100px;
        text-align: center;
    }
    .hero-section h1 {
        font-size: 2.8rem;
    }
    .brand-logo {
        width: 36px;
        height: 36px;
    }
    .lang-toggle {
        width: 100%;
    }
    .floating-icon {
        width: 28px;
        height: 28px;
    }
    .product-image {
        height: 200px;
    }
    .timeline-container { padding-left: 1rem; }
    .timeline-line { left: 10px; }
    .timeline-dot { left: -30px; }
    .carousel-caption { left: 1rem; right: 1rem; text-align: center; }
}
