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

body {
    font-family: 'DM Sans', sans-serif;
    color: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow-x: hidden;
    background-color: #f2e8e1;
    -webkit-font-smoothing: antialiased;
}

/* Pola Background */
.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: radial-gradient(#000 1.5px, transparent 1.5px);
    background-size: 25px 25px;
    opacity: 0.08;
    z-index: -1;
}

/* Sidebar & Menu Button */
.menu-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    background: #fff;
    color: #000;
    border: 3px solid #000;
    padding: 10px 14px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    font-size: 1.2rem;
    box-shadow: 4px 4px 0px 0px #000;
    transition: all 0.1s ease;
}

.menu-btn:active {
    transform: translate(4px, 4px);
    box-shadow: 0px 0px 0px 0px #000;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: #FFD874;
    border-right: 4px solid #000;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    padding-top: 80px;
    box-shadow: 10px 0 0px rgba(0,0,0,1);
}

.sidebar.active {
    left: 0;
}

.sidebar ul { list-style: none; }

.sidebar ul li a {
    color: #000;
    font-weight: 900;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 25px;
    border-bottom: 4px solid #000;
    background: #fff;
    transition: 0.2s;
    font-size: 16px;
}

.sidebar ul li a:hover {
    background: #FFB4E6;
    padding-left: 35px;
}

/* Container Responsif */
.card-wrapper {
    margin: 80px auto 40px auto;
    width: 92vw;
    max-width: 420px; /* Cocok untuk mobile/tablet kecil */
}

.card {
    background: #ffffff;
    border: 4px solid #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 8px 8px 0px 0px #000;
}

.card-header {
    position: relative;
    padding-top: 70px;
    padding-bottom: 25px;
    text-align: center;
    background: #fff;
    border-bottom: 4px solid #000;
}

.card-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 110px;
    background: #98FF98;
    border-bottom: 4px solid #000;
}

/* Avatar Setup */
.avatar-wrapper {
    position: relative;
    z-index: 2;
    margin-top: -45px;
    display: inline-block;
}

.card-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #000;
    background: #fff;
    object-fit: cover;
    display: block;
    box-shadow: 4px 4px 0px 0px #000;
}

.card-fullname {
    font-family: 'Patrick Hand', cursive;
    font-size: clamp(32px, 8vw, 42px); /* Teks mengecil otomatis di HP kecil */
    margin-top: 15px;
    font-weight: 900;
    color: #000;
}

.card-jobtitle {
    font-size: clamp(13px, 4vw, 15px);
    color: #000;
    font-weight: 700;
    margin-top: 5px;
    background: #FFE974;
    display: inline-block;
    padding: 4px 12px;
    border: 3px solid #000;
    border-radius: 8px;
    box-shadow: 3px 3px 0px #000;
}

/* Card Main Area */
.card-main { 
    padding: clamp(20px, 5vw, 30px); 
    background: #fff;
}

.card-section {
    display: none;
    animation: fadeIn 0.3s ease-out forwards;
}

.card-section.is-active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-subtitle {
    font-size: 16px;
    color: #000;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 900;
    text-transform: uppercase;
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 4px;
}

.card-text {
    text-align: center;
    font-size: clamp(14px, 4vw, 16px);
    line-height: 1.6;
    color: #222;
    font-weight: 700;
    background: #E8E8E8;
    padding: 15px;
    border: 3px solid #000;
    border-radius: 8px;
    box-shadow: 4px 4px 0px #000;
}

/* Social Icons */
.card-social {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.social-icon {
    color: #000;
    font-size: 20px;
    width: 45px;
    height: 45px;
    background: #fff;
    border: 3px solid #000;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 4px 4px 0px #000;
    transition: all 0.1s ease;
}

.whatsapp { background: #98FF98; }
.instagram { background: #FFB4E6; }
.github { background: #E8E8E8; }

.social-icon:active { transform: translate(4px, 4px); box-shadow: 0px 0px 0px #000; }

/* Skills Section */
.skill-container { margin-bottom: 18px; }
.skill-header {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 800;
    color: #000;
}
.skill-bar {
    width: 100%;
    height: 20px;
    background-color: #E8E8E8;
    border: 3px solid #000;
    border-radius: 20px;
    overflow: hidden;
}
.skill-progress {
    height: 100%;
    width: 0;
    border-right: 3px solid #000;
    transition: width 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.js-color { background: #FFE974; }
.html-color { background: #FF9B73; }
.py-color { background: #74FFED; }
.prompt-color { background: #FFB4E6; }

.vibe-text {
    text-align: center;
    font-size: clamp(12px, 3.5vw, 14px);
    margin-top: 30px;
    font-family: 'Fira Code', monospace;
    font-weight: bold;
    background: #000;
    color: #74FFED;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 4px 4px 0px #FFB4E6;
}

/* Items Umum (Contact & Player) */
.box-item {
    padding: 12px 15px;
    background: #fff;
    border: 3px solid #000;
    border-radius: 12px;
    box-shadow: 4px 4px 0px #000;
    margin-bottom: 15px;
    font-weight: 800;
    color: #000;
    font-size: clamp(13px, 3.5vw, 15px);
    display: flex;
    align-items: center;
}

.card-contact i { margin-right: 10px; font-size: 18px;}

/* Tombol Kunjungan */
.contact-me {
    width: 100%;
    padding: 15px;
    background: #74FFED;
    color: #000;
    font-weight: 900;
    border: 3px solid #000;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 4px 4px 0px #000;
    transition: all 0.1s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.contact-me:active { transform: translate(4px, 4px); box-shadow: 0px 0px 0px #000; }

/* Mini Player Fix untuk Mobile */
.mini-player {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 25px;
    background: #FFE5E5;
    margin-bottom: 0;
    flex-wrap: wrap; /* Jika layar sangat kecil, elemen akan membungkus ke bawah otomatis */
    gap: 10px;
}

.track-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1; /* Mengambil sisa ruang */
    min-width: 0; /* Mencegah teks overlap */
}

.music-icon {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 15px;
    flex-shrink: 0;
}

.music-icon .bar {
    width: 4px;
    height: 4px;
    background: #000;
    border-radius: 2px;
}

.music-icon.playing .bar { animation: bounceBar 0.8s infinite alternate; }
.music-icon.playing .bar:nth-child(2) { animation-delay: 0.2s; }
.music-icon.playing .bar:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounceBar {
    0% { height: 4px; }
    100% { height: 15px; }
}

.track-name {
    font-size: 14px;
    font-weight: 800;
    color: #000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.ctrl-btn {
    background: #fff;
    border: 3px solid #000;
    border-radius: 8px;
    color: #000;
    cursor: pointer;
    font-size: 14px;
    padding: 6px 10px;
    box-shadow: 2px 2px 0px #000;
    transition: 0.1s;
}
.ctrl-btn:active { transform: translate(2px, 2px); box-shadow: 0px 0px 0px #000;}

.play-btn {
    width: 40px;
    height: 40px;
    background: #FFD874;
    border: 3px solid #000;
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 3px 3px 0px #000;
    cursor: pointer;
    transition: 0.1s;
}
.play-btn:active { transform: translate(3px, 3px); box-shadow: 0px 0px 0px #000;}

/* Navigasi Bawah Fix (Biar gak mepet/rusak di mobile) */
.card-batten {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 10px;
}

.nav-btn {
    flex: 1;
    background: #fff;
    border: 3px solid #000;
    color: #000;
    font-size: clamp(12px, 3vw, 14px); /* Ukuran teks responsif */
    font-weight: 900;
    cursor: pointer;
    padding: 12px 0;
    border-radius: 12px;
    box-shadow: 4px 4px 0px #000;
    transition: 0.1s ease;
}

.nav-btn.is-active {
    background: #000;
    color: #fff;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #FF9B73;
}

.footer p {
    text-align: center;
    color: #000;
    font-weight: bold;
    font-size: 14px;
    margin-top: 20px;
    padding-bottom: 20px;
}

/* === DESKTOP ENHANCEMENT === */
@media (min-width: 768px) {
    .card-wrapper {
        max-width: 460px; /* Card sedikit lebih lebar di Desktop/Tablet */
        margin-top: 100px;
    }
    
    .nav-btn:hover {
        background: #f0f0f0;
    }
    
    .contact-me:hover {
        background: #5CE0D3;
    }
    
    .social-icon:hover {
        background: #000;
        color: #fff;
    }
}
