/* ========== CUSTOM CSS ========== */

/* ANIMASI FADE-IN */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Terapkan ke semua card dan elemen utama */
.neo-card, .service-card, .project-card, .tech-item, .stat-card, .faq-item, .contact-card, .donasi-box, .rating-container {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

/* Stagger animation */
.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }
.service-card:nth-child(5) { animation-delay: 0.5s; }
.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }
.tech-item { animation-delay: 0.1s; }
.faq-item:nth-child(1) { animation-delay: 0.1s; }
.faq-item:nth-child(2) { animation-delay: 0.2s; }

/* Background pattern */
body {
    background-color: #e0e0e0;
    background-image: radial-gradient(#000 1px, transparent 1px);
    background-size: 24px 24px;
    font-family: 'Courier New', Courier, monospace;
}

/* Neomorphism style */
.neo-card {
    border: 3px solid black;
    box-shadow: 6px 6px 0px 0px rgba(0,0,0,1);
    transition: all 0.2s ease;
}

.neo-card:active {
    box-shadow: 0px 0px 0px 0px rgba(0,0,0,1);
    transform: translate(5px, 5px);
}

/* Modal styles */
#donationModal, #hireModal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    z-index: 50;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Typing animation */
#typing-text::after {
    content: "|";
    animation: blink 0.7s infinite;
    font-weight: bold;
    font-size: 1.2rem;
}

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

/* Skill bar */
.skill-bar-bg {
    height: 18px;
    background: white;
    border: 3px solid black;
    position: relative;
    margin-top: 6px;
}

.skill-bar-fill {
    height: 100%;
    background: #000;
    transition: width 1s ease-in-out;
}

/* Toast notification */
#toast {
    visibility: hidden;
    min-width: 280px;
    background-color: #ff0000;
    color: #fff;
    text-align: center;
    border: 4px solid #000;
    padding: 16px 20px;
    position: fixed;
    z-index: 100;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-weight: 900;
    font-size: 1rem;
    box-shadow: 10px 10px 0px 0px rgba(0,0,0,1);
}

#toast.show {
    visibility: visible;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@keyframes fadein { 
    from { bottom: 0; opacity: 0; } 
    to { bottom: 30px; opacity: 1; } 
}

@keyframes fadeout { 
    from { bottom: 30px; opacity: 1; } 
    to { bottom: 0; opacity: 0; } 
}

/* Copy button */
.copy-btn {
    background: #000;
    color: #fff;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    border: 2px solid white;
    z-index: 10;
    font-weight: bold;
}

.copy-btn:hover {
    background: #333;
}

/* Tab button active */
.tab-btn.active {
    background-color: #000;
    color: #fff;
}

/* Project grid */
.project-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.project-card {
    background: white;
    border: 3px solid black;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 6px 6px 0 black;
    transition: 0.15s ease;
}

.project-card:hover {
    transform: translate(3px, 3px);
    box-shadow: 2px 2px 0 black;
}

.project-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-bottom: 3px solid black;
    cursor: pointer;
    transition: opacity 0.1s ease;
}

.project-img:hover {
    opacity: 0.9;
}

.project-info {
    padding: 1rem;
}

.project-category {
    font-size: 0.7rem;
    font-weight: 900;
    background: #fbbf24;
    display: inline-block;
    padding: 0.2rem 0.8rem;
    border: 2px solid black;
    margin-bottom: 0.5rem;
}

.neo-input {
    border: 3px solid black;
    width: 100%;
    padding: 12px;
    margin-bottom: 14px;
    font-weight: bold;
    outline: none;
    font-size: 1rem;
}

.neo-input:focus {
    background: #f0f0f0;
}

/* FAQ */
.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-item.active .faq-content {
    max-height: 130px;
}

.faq-item.active .faq-toggle {
    transform: rotate(180deg);
}

/* Tech stack */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    margin-top: 1.25rem;
    padding-top: 0.75rem;
    border-top: 2px dashed black;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: white;
    border: 2px solid black;
    padding: 0.3rem 1rem 0.3rem 0.8rem;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 3px 3px 0 black;
    transition: 0.1s ease;
}

.tech-item i {
    font-size: 1.2rem;
}

.tech-item:hover {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 black;
}

/* Service card */
.service-card {
    display: flex;
    flex-direction: column;
    background: white;
    border: 3px solid black;
    padding: 1rem;
    border-radius: 0.75rem;
    box-shadow: 5px 5px 0 black;
    transition: 0.1s ease;
}

.service-card:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 black;
}

.service-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.service-title {
    font-weight: 900;
    text-transform: uppercase;
    font-size: 1.1rem;
    line-height: 1.2;
}

.service-price {
    font-weight: 800;
    color: #16a34a;
    font-size: 1.25rem;
    margin: 0.25rem 0;
}

.service-desc {
    font-size: 0.8rem;
    color: #4b5563;
    margin-bottom: 0.75rem;
}

.service-btn {
    background: black;
    color: white;
    border: 2px solid black;
    padding: 0.5rem;
    font-weight: bold;
    font-size: 0.8rem;
    text-align: center;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 3px 3px 0 #fbbf24;
    transition: 0.1s ease;
    margin-top: auto;
}

.service-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #fbbf24;
}

/* Extra service */
.extra-service {
    display: none;
}

.show-extra .extra-service {
    display: flex;
}

.toggle-services-btn {
    width: 100%;
    background: white;
    border: 3px solid black;
    padding: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 0.9rem;
    box-shadow: 5px 5px 0 black;
    cursor: pointer;
    transition: 0.1s ease;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.toggle-services-btn:active {
    transform: translate(3px, 3px);
    box-shadow: 2px 2px 0 black;
}

/* Image modal */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 2rem;
}

.image-modal.active {
    display: flex;
}

.modal-image {
    max-width: 95%;
    max-height: 80vh;
    border: 5px solid white;
    box-shadow: 10px 10px 0px 0px rgba(255,255,255,0.5);
}

.close-modal {
    margin-top: 1.5rem;
    background: white;
    border: 3px solid black;
    padding: 0.6rem 2rem;
    font-weight: 900;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 5px 5px 0 black;
    transition: 0.1s ease;
}

.close-modal:active {
    transform: translate(3px, 3px);
    box-shadow: 2px 2px 0 black;
}

/* Scroll to top button */
#scrollToTopBtn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 99;
    background-color: #fbbf24;
    color: black;
    border: 3px solid black;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    font-weight: bold;
    box-shadow: 5px 5px 0 black;
    cursor: pointer;
    transition: 0.1s ease;
    display: none;
    align-items: center;
    justify-content: center;
}

#scrollToTopBtn:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 black;
}

#scrollToTopBtn.show {
    display: flex;
}

/* Rating */
.rating-container {
    background: white;
    border: 3px solid black;
    padding: 1rem;
    border-radius: 2rem;
    box-shadow: 5px 5px 0 black;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.star-rating {
    display: flex;
    gap: 0.25rem;
}

.star {
    font-size: 1.5rem;
    cursor: pointer;
    color: #d1d5db;
    transition: color 0.1s ease;
}

.star.active {
    color: #fbbf24;
}

.star:hover {
    transform: scale(1.1);
}

/* Live chat button */
#liveChatBtn {
    transition: all 0.2s ease;
    bottom: 140px;
}

#liveChatBtn:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 black;
}

/* GitHub repo */
.repo-item {
    background: #f5f5f5;
    border: 2px solid black;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.repo-name {
    font-weight: 900;
    font-size: 0.9rem;
}

.repo-desc {
    font-size: 0.8rem;
    color: #4b5563;
}

/* Toggle section */
.toggle-section {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.toggle-section:hover {
    opacity: 0.8;
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.toggle-icon.rotated {
    transform: rotate(90deg);
}

.hidden-section {
    display: none !important;
}
