/* ==========================================================================
   Variables & Reset
   ========================================================================== */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #f59e0b;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --gray-color: #64748b;
    --border-color: #e2e8f0;

    --bg-color: #ffffff;
    --text-color: #334155;

    --font-primary: 'Inter', sans-serif;

    --transition: all 0.3s ease;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
}

.bg-light {
    background-color: var(--light-color);
}

.bg-dark {
    background-color: var(--dark-color);
}

.text-white {
    color: #fff;
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    color: var(--dark-color);
    font-weight: 700;
    line-height: 1.2;
}

.text-white h1,
.text-white h2,
.text-white h3,
.text-white h4,
.text-white h5,
.text-white h6 {
    color: #fff;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.underline {
    width: 70px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 0 auto;
    border-radius: 2px;
}

.underline.light {
    background-color: var(--secondary-color);
}

.highlight {
    color: var(--primary-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: transparent;
    padding: 1.5rem 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
}

.navbar.scrolled .logo {
    color: var(--dark-color);
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--dark-color);
    font-weight: 500;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

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

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-color);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 100vh;
    min-height: 100dvh; /* iOS safe */
    display: flex;
    align-items: center;
    padding-top: 5rem; /* Account for navbar */
    padding-top: calc(5rem + env(safe-area-inset-top));
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

.hero-content {
    flex: 1;
}

.greeting {
    font-size: 1.25rem;
    color: var(--primary-color);
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.name {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.roles {
    font-size: 1.5rem;
    color: var(--gray-color);
    margin-bottom: 1rem;
    font-weight: 500;
}

.tagline {
    font-size: 1.125rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    font-style: italic;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.fiverr-badge {
    display: inline-block;
    background-color: var(--light-color);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
}

.fiverr-link {
    color: #1dbf73; /* Fiverr green */
    font-weight: 700;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.image-wrapper {
    position: relative;
    width: 350px;
    height: 350px;
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%; /* Menggeser fokus gambar sedikit ke atas agar kepala berada di tengah area bulat */
    box-shadow: var(--shadow-lg);
}

.image-wrapper::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    width: 100%;
    height: 100%;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    z-index: -1;
}

.placeholder-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--gray-color);
    box-shadow: var(--shadow-lg);
    object-fit: cover;
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
}

.about-content p {
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   Skills Section
   ========================================================================== */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.skill-category h3 {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary-color);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    background-color: var(--light-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.skill-tag:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* ==========================================================================
   Services Section
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--bg-color);
    padding: 2.5rem 2rem;
    border-radius: 0.5rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid transparent;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-color);
}

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

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
    background-color: var(--secondary-color);
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

/* ==========================================================================
   Projects Section
   ========================================================================== */
.project-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--border-color);
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-color);
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

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

.project-card {
    background-color: var(--bg-color);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.project-card.hide {
    display: none;
}

.project-img-wrapper {
    height: 200px;
    overflow: hidden;
}

.placeholder-project {
    width: 100%;
    height: 100%;
    background-color: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-color);
    font-weight: 600;
    transition: transform 0.5s ease;
}

.project-card:hover .placeholder-project {
    transform: scale(1.05);
}

.project-info {
    padding: 1.5rem;
}

.project-category {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 0.5rem;
}

.project-info h3 {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.project-info p {
    color: var(--gray-color);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

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

.project-links a {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-links a:hover {
    color: var(--primary-color);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-subtitle {
    text-align: center;
    margin-top: 1rem;
    font-size: 1.1rem;
    color: #e2e8f0;
}

.contact-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 3rem;
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: #fff;
    transition: var(--transition);
}

.contact-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.3);
}

.whatsapp {
    background-color: #25D366;
}

.whatsapp:hover {
    background-color: #128C7E;
    color: #fff;
}

.email {
    background-color: var(--primary-color);
}

.email:hover {
    background-color: var(--primary-dark);
    color: #fff;
}

.fiverr {
    background-color: #1dbf73;
}

.fiverr:hover {
    background-color: #19a463;
    color: #fff;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: #0f172a;
    color: #fff;
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-logo span {
    color: var(--primary-color);
}

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

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    color: #fff;
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* ==========================================================================
   Animations
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s ease;
}

.reveal.active,
.reveal-right.active,
.reveal-delay-1.active,
.reveal-delay-2.active {
    opacity: 1;
    transform: translate(0);
}

.reveal-delay-1 {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease 0.2s;
}

.reveal-delay-2 {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease 0.4s;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal, .reveal-right, .reveal-delay-1, .reveal-delay-2 {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media screen and (max-width: 992px) {
    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 2rem;
    }

    .hero-cta {
        justify-content: center;
    }

    .tagline {
        margin: 0 auto 2rem;
    }

    .image-wrapper {
        width: 280px;
        height: 280px;
        margin: 0 auto;
    }
}

@media screen and (max-width: 768px) {
    .section {
        padding: 4rem 0;
    }

    .name {
        font-size: 2.5rem;
    }

    .roles {
        font-size: 1.25rem;
    }

    /* Mobile Menu */
    .mobile-menu-btn {
        display: block;
        z-index: 1001;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--bg-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: right 0.4s ease;
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

    /* Overlay */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(0,0,0,0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .skills-container,
    .services-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
    }

    /* Touch target improvements */
    .btn, .nav-link, .filter-btn, .contact-btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Hover effects disabled for touch, replaced with active state */
    @media (hover: none) {
        .btn-primary:hover, .btn-outline:hover, .filter-btn:hover {
            transform: none;
            box-shadow: none;
        }

        .project-card:hover {
            transform: none;
        }

        .project-card:active, .service-card:active {
            transform: scale(0.98);
        }

        .btn:active {
            transform: scale(0.98);
        }
    }
}

@media screen and (max-width: 480px) {
    .name {
        font-size: 2rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: 1rem;
    }

    .contact-links {
        flex-direction: column;
        width: 100%;
    }

    .contact-btn {
        width: 100%;
        justify-content: center;
    }

    .project-filters {
        flex-direction: column;
    }

    .filter-btn {
        width: 100%;
    }
}