/* Custom CSS untuk Portfolio Website */

/* CSS Variables untuk konsistensi warna */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --white-color: #ffffff;
    --black-color: #000000;
    
    --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.12);
    --border-radius: 12px;
}

/* Reset dan Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Smooth Scrolling untuk Safari */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0B5ED7;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

.section-title {
    position: relative;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    font-weight: 700;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Navbar Styles */
.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(33, 37, 41, 0.98) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white-color) !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius);
    transition: var(--transition-smooth);
    color: rgba(255, 255, 255, 0.85) !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--white-color) !important;
    background: rgba(13, 110, 253, 0.2);
    transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    background-color: #000;
}

.parallax-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background: url('../images/hero-bg.jpg') no-repeat center center;
    background-size: cover;
    transform: translateZ(0);
    will-change: transform;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 20, 0.8) 100%
    );
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 50%;
    animation: floatAnimation 20s infinite;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -150px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: -100px;
    left: -100px;
    animation-delay: 5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    bottom: 50%;
    right: 10%;
    animation-delay: 10s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    top: 30%;
    left: 10%;
    animation-delay: 15s;
}

@keyframes floatAnimation {
    0% {
        transform: translate(0, 0) rotate(0);
    }
    33% {
        transform: translate(30px, -50px) rotate(120deg);
    }
    66% {
        transform: translate(-30px, 50px) rotate(240deg);
    }
    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-top: 20vh;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    animation: fadeInDown 1s ease-out;
}

.typing-container {
    height: 30px;
    margin: 2rem 0;
}

.typing-text {
    font-size: 1.5rem;
    font-weight: 300;
    color: #fff;
    opacity: 0.9;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #fff;
    opacity: 0.8;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out;
}

.hero-buttons {
    animation: fadeIn 1.5s ease-out;
}

.btn-glow {
    background: rgba(255, 255, 255, 0.95);
    color: #000;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: none;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transform: rotate(45deg);
    animation: glowingEffect 3s infinite;
}

.btn-glow:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background: #fff;
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

@keyframes glowingEffect {
    0% {
        transform: rotate(45deg) translate(-100%, -100%);
    }
    100% {
        transform: rotate(45deg) translate(100%, 100%);
    }
}

.hero-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: bounce 2s infinite;
}

.hero-mouse {
    position: absolute;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    z-index: 2;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    position: relative;
}

.mouse-wheel {
    width: 4px;
    height: 8px;
    background: #fff;
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    animation: mouseWheel 1.5s infinite;
}

@keyframes mouseWheel {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(12px);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-30px);
    }
    60% {
        transform: translateY(-15px);
    }
}

/* About Section */
.profile-img-wrapper {
    position: relative;
    width: 250px;
    height: 250px;
    margin: 0 auto;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 5px solid var(--primary-color);
    transition: all 0.3s ease;
}

.profile-img:hover {
    transform: scale(1.05);
}

/* Skills Section */
.skill-item {
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.skill-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.skill-name i {
    font-size: 1.3rem;
    margin-right: 0.5rem;
}

.skill-percentage {
    font-weight: 700;
    color: var(--primary-color);
}

.progress {
    height: 8px;
    border-radius: 50px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 50px;
    transition: width 1.5s ease;
}

/* Projects Section */
.project-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.project-card img {
    height: 200px;
    object-fit: cover;
}

.project-card .card-body {
    padding: 1.5rem;
}

.project-card .card-title {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.project-card .card-text {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.project-card .badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

.project-card .card-footer {
    border-top: none;
}

.project-card .btn {
    border-radius: 25px;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    transition: var(--transition-smooth);
}

.project-card .btn:hover {
    transform: translateY(-2px);
}

/* Contact Section */
#contact {
    background: linear-gradient(135deg, var(--dark-color) 0%, #1a1a1a 100%);
}

#contact .section-title::after {
    background: var(--white-color);
}

.form-control {
    padding: 0.8rem;
    border-radius: 8px;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--white-color);
}

/* Social Links */
.social-links .btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    padding: 0;
    line-height: 50px;
    transition: all 0.3s ease;
}

.social-links .btn:hover {
    transform: translateY(-5px);
}

/* Footer */
footer {
    background: var(--black-color) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading Animation untuk progress bars */
.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    0% {
        background-position-x: 1rem;
    }
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .section-title {
        font-size: 2rem;
    }
    
    .hero-section .display-4 {
        font-size: 2.5rem;
    }
    
    .profile-img {
        width: 220px;
        height: 220px;
    }
    
    .navbar-nav {
        text-align: center;
        margin-top: 1rem;
    }
    
    .hero-buttons .btn {
        margin: 0.5rem 0;
        width: 200px;
    }
}

@media (max-width: 767.98px) {
    .section-title {
        font-size: 1.8rem;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .profile-img {
        width: 180px;
        height: 180px;
    }
    
    .skill-item {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .social-links .btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        margin: 0.25rem !important;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
}

@media (max-width: 575.98px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section .display-4 {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .profile-img {
        width: 150px;
        height: 150px;
    }
    
    .project-card .card-img-top {
        height: 150px;
    }
}

/* Custom Utilities */
.text-gradient {
    background: linear-gradient(45deg, var(--primary-color), var(--info-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-gradient {
    background: linear-gradient(45deg, var(--primary-color), var(--info-color));
    border: none;
    color: var(--white-color);
}

.btn-gradient:hover {
    background: linear-gradient(45deg, #0B5ED7, #31d2f2);
    color: var(--white-color);
}

/* Focus states untuk accessibility */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .navbar,
    .hero-scroll,
    #contact,
    footer {
        display: none !important;
    }
    
    .hero-section {
        background: var(--white-color) !important;
        color: var(--dark-color) !important;
        min-height: auto !important;
        padding: 2rem 0 !important;
    }
    
    .section-title::after {
        background: var(--dark-color) !important;
    }
}