/* Custom CSS untuk Portfolio Developer */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Viewport fix for mobile */
@viewport {
    width: device-width;
}

/* Reset and base styles */
*, *::before, *::after {
    box-sizing: border-box;
}

/* General Styles */
* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
    padding-top: 76px; /* Account for fixed navbar height */
}

/* Adjust for smaller screens */
@media (max-width: 768px) {
    body {
        padding-top: 66px; /* Smaller navbar height on mobile */
    }
}

.section-title {
    position: relative;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* Hero Section */
.hero-section {
    min-height: calc(100vh - 76px); /* Account for navbar height */
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
    padding-top: 2rem; /* Add some extra padding for better spacing */
}

/* Adjust hero section for mobile */
@media (max-width: 768px) {
    .hero-section {
        min-height: calc(100vh - 66px); /* Account for smaller navbar on mobile */
        padding-top: 1rem;
    }
}

.hero-section::before {
    /* Animated triangle background removed */
    display: none;
}

.hero-image img {
    max-width: 400px;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.3));
}

.hero-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.animate-bounce {
    animation: bounce 2s infinite;
}

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

/* Float animation removed - no longer needed */

/* Skills Section */
.skill-item {
    margin-bottom: 1.5rem;
}

.progress {
    height: 8px;
    border-radius: 10px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 10px;
    transition: width 2s ease-in-out;
}

/* Feature Box */
.feature-box {
    text-align: center;
    padding: 1.5rem;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-5px);
}

.feature-box i {
    font-size: 2.5rem;
}

/* Service Cards */
.service-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.service-title {
    color: var(--dark-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.service-description {
    color: var(--secondary-color);
    line-height: 1.6;
}

/* Portfolio */
#portfolio {
    overflow: hidden;
}

#portfolio .container {
    max-width: 100%;
}

#portfolio .row {
    margin-left: -15px;
    margin-right: -15px;
}

#portfolio .col-lg-4,
#portfolio .col-md-6 {
    padding-left: 15px;
    padding-right: 15px;
    margin-bottom: 2rem;
}

.portfolio-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: block; /* Ensure article behaves as block element */
    height: 100%; /* Make sure all cards have equal height */
    width: 100%;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.portfolio-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
}

.portfolio-links {
    display: flex;
    gap: 1rem;
}

.portfolio-content {
    padding: 1.5rem;
}

.portfolio-title {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.portfolio-meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
}

.category-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.category-badge.mobile-app {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.category-badge.web-development {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.category-badge.cms {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.date-badge {
    background: var(--light-color);
    color: var(--secondary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #e9ecef;
}

.portfolio-description {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.tech-tag {
    display: inline-block;
    background: var(--light-color);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* Portfolio Carousel */
.portfolio-image .carousel {
    height: 100%;
}

.portfolio-image .carousel-inner {
    height: 100%;
}

.portfolio-image .carousel-item {
    height: 100%;
}

.portfolio-image .carousel-item img {
    height: 100%;
    object-fit: cover;
}

.portfolio-image .carousel-control-prev,
.portfolio-image .carousel-control-next {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .carousel-control-prev,
.portfolio-item:hover .carousel-control-next {
    opacity: 0.8;
}

.portfolio-image .carousel-indicators {
    bottom: 10px;
    margin-bottom: 0;
}

.portfolio-image .carousel-indicators button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin: 0 3px;
    opacity: 0.5;
}

.portfolio-image .carousel-indicators .active {
    opacity: 1;
}

/* Portfolio Fullscreen Button */
.portfolio-fullscreen-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.portfolio-fullscreen-btn:hover {
    background: white;
    transform: scale(1.1);
}

.portfolio-item:hover .portfolio-fullscreen-btn {
    opacity: 1;
}

/* Fullscreen Modal */
.fullscreen-image {
    max-height: 80vh;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

.modal-xl .modal-content {
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

.modal-xl .carousel-control-prev,
.modal-xl .carousel-control-next {
    opacity: 0.8;
    width: 5%;
}

.modal-xl .carousel-control-prev:hover,
.modal-xl .carousel-control-next:hover {
    opacity: 1;
}

.modal-xl .carousel-indicators {
    bottom: 20px;
}

.modal-xl .carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 5px;
}

/* Contact Section */
.contact-info {
    padding: 1.5rem;
}

.contact-info i {
    margin-bottom: 1rem;
}

.contact-info h5 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Stats Section */
.stat-item {
    padding: 2rem 1rem;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-10px);
}

.stat-item i {
    opacity: 0.8;
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.stat-label {
    font-size: 1.1rem;
    margin-bottom: 0;
    opacity: 0.9;
    font-weight: 500;
}

@media (max-width: 768px) {
    .stat-number {
        font-size: 2.5rem;
    }
    
    .stat-item {
        margin-bottom: 2rem;
    }
}

/* Navbar */
.navbar {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.navbar .container {
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
}

.navbar-brand {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.navbar-logo {
    height: 32px;
    width: auto;
    transition: transform 0.3s ease;
}

.navbar-brand:hover .navbar-logo {
    transform: scale(1.1);
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

/* Active navigation state */
.navbar-nav .nav-link.active {
    color: rgba(255,255,255,.9) !important;
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: rgba(255,255,255,.9);
    border-radius: 1px;
    transition: all 0.3s ease;
}

/* Hover effect for nav links */
.navbar-nav .nav-link:hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 15px;
    height: 2px;
    background: rgba(255,255,255,.7);
    border-radius: 1px;
    opacity: 0.7;
}

.navbar-collapse {
    overflow: hidden;
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Language Switcher */
.dropdown-menu {
    border: none;
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
    border-radius: 10px;
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.dropdown-item:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateX(5px);
}

.dropdown-item img {
    border-radius: 2px;
}

#languageDropdown {
    position: relative;
}

.navbar-dark .navbar-nav .nav-link.dropdown-toggle {
    color: rgba(255,255,255,.9);
}

.navbar-dark .navbar-nav .nav-link.dropdown-toggle:hover {
    color: var(--primary-color);
}

/* Buttons */
.btn {
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
}

.btn-primary:hover {
    background: var(--gradient-secondary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Responsive Design */

/* Desktop - Ensure horizontal layout for portfolio */
@media (min-width: 992px) {
    #portfolio .row {
        display: flex;
        flex-wrap: wrap;
    }
    
    #portfolio .col-lg-4 {
        display: flex;
        flex-direction: column;
    }
    
    .portfolio-item {
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    
    .portfolio-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    /* Navbar fixes for mobile */
    .navbar {
        width: 100vw !important;
        max-width: 100% !important;
        overflow-x: hidden;
    }
    
    .navbar .container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
        white-space: nowrap;
    }
    
    .navbar-logo {
        height: 28px;
    }
    
    .navbar-collapse {
        width: 100%;
    }
    
    .navbar-nav {
        width: 100%;
    }
    
    /* Mobile active nav styling */
    .navbar-nav .nav-link.active::after {
        display: none;
    }
    
    .navbar-nav .nav-link.active {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 5px;
        margin: 2px 0;
        color: rgba(255,255,255,.9) !important;
    }
    
    .navbar-nav .nav-link:hover::after {
        display: none;
    }
    
    .dropdown-menu {
        position: absolute;
        right: 0;
        left: auto;
        min-width: 150px;
    }
    
    .hero-section {
        text-align: center;
        padding: 2rem 0;
    }
    
    .hero-image {
        margin-top: 2rem;
    }
    
    .hero-image img {
        max-width: 300px;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .service-card {
        margin-bottom: 2rem;
    }
    
    .portfolio-item {
        margin-bottom: 2rem;
    }
}

@media (max-width: 576px) {
    /* Extra small devices navbar fixes */
    .navbar {
        width: 100vw !important;
        max-width: 100% !important;
        overflow-x: hidden;
        position: fixed;
        left: 0;
        right: 0;
    }
    
    .navbar .container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .navbar-logo {
        height: 24px;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .hero-image img {
        max-width: 250px;
    }
}

/* Loading Animation */
.loading {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.loading.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

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

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

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

/* Smooth scrolling offset for fixed navbar */
html {
    scroll-padding-top: 80px; /* Offset for fixed navbar */
}

/* Section padding adjustment for better spacing */
section {
    scroll-margin-top: 80px; /* Alternative method for older browsers */
}

@media (max-width: 768px) {
    html {
        scroll-padding-top: 70px; /* Smaller offset for mobile */
    }
    
    section {
        scroll-margin-top: 70px;
    }
}
