@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;800&display=swap');

:root {
    --bg-color: #f8fafc;
    --text-color: #0f172a;
    --card-bg: rgba(255, 255, 255, 0.6);
    --primary: #6366f1;
    --secondary: #ec4899;
    --shadow-1: rgba(0, 0, 0, 0.1);
    --shadow-3d: 8px 8px 0px #0f172a;
    --nav-bg: rgba(255, 255, 255, 0.5);
    --blob-1: #c7d2fe;
    --blob-2: #fbcfe8;
}

[data-theme="dark"] {
    --bg-color: #0f172a;
    --text-color: #f1f5f9;
    --card-bg: rgba(30, 41, 59, 0.6);
    --primary: #818cf8;
    --secondary: #f472b6;
    --shadow-1: rgba(0, 0, 0, 0.5);
    --shadow-3d: 8px 8px 0px #818cf8;
    --nav-bg: rgba(15, 23, 42, 0.5);
    --blob-1: #3730a3;
    --blob-2: #831843;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    transition: background-color 0.4s, color 0.4s, border-color 0.4s;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* --- Animated Background (Memanjakan Mata) --- */
.bg-animated {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    filter: blur(80px);
}

.blob {
    position: absolute;
    border-radius: 50%;
    animation: move 10s infinite alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--blob-1);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.blob-2 {
    width: 350px;
    height: 350px;
    background: var(--blob-2);
    bottom: -10%;
    right: -10%;
    animation-duration: 12s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: var(--primary);
    bottom: 20%;
    left: 20%;
    opacity: 0.3;
    animation-duration: 15s;
    animation-direction: alternate-reverse;
}

@keyframes move {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(50px, 50px) scale(1.1); }
}

/* --- Navbar (Glassmorphism) --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 10%;
    background: var(--nav-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid var(--text-color);
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links { display: flex; list-style: none; gap: 1.5rem; }

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 2px solid transparent;
}

.nav-links a.active, .nav-links a:hover {
    background: var(--card-bg);
    border: 2px solid var(--text-color);
    box-shadow: 4px 4px 0px var(--text-color);
    transform: translate(-2px, -2px);
}

.btn-darkmode {
    background: transparent;
    border: 2px solid var(--text-color);
    font-size: 1.2rem;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    box-shadow: 3px 3px 0px var(--text-color);
}

.btn-darkmode:active {
    transform: translate(3px, 3px);
    box-shadow: 0px 0px 0px var(--text-color);
}

/* --- Container & Kartu 3D Glassmorphism --- */
.container {
    margin-top: 100px;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    perspective: 1200px;
}

.card-3d {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 3px solid var(--text-color);
    border-radius: 24px;
    padding: 3rem;
    max-width: 600px;
    width: 100%;
    box-shadow: var(--shadow-3d);
    transform-style: preserve-3d;
}

/* Animasi Mengambang (Floating) */
.floating {
    animation: floating 4s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translateY(0px) rotateX(2deg) rotateY(-2deg); }
    50% { transform: translateY(-10px) rotateX(4deg) rotateY(-4deg); box-shadow: 12px 18px 0px var(--text-color); }
    100% { transform: translateY(0px) rotateX(2deg) rotateY(-2deg); }
}

.badge {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 800;
    display: inline-block;
    margin-bottom: 1rem;
    box-shadow: 2px 2px 0px var(--text-color);
    border: 2px solid var(--text-color);
}

h1, h2 { font-weight: 800; margin-bottom: 0.5rem; line-height: 1.2; }
h1 { font-size: 2.8rem; }
h2 { font-size: 2rem; border-bottom: 3px dashed var(--text-color); padding-bottom: 10px; margin-bottom: 20px;}

.subtitle { color: var(--primary); font-weight: 600; margin-bottom: 1.5rem; font-size: 1.1rem; }
hr { border: 1px solid var(--text-color); margin-bottom: 1.5rem; opacity: 0.3; }
p { margin-bottom: 2rem; font-size: 1.05rem; line-height: 1.7; opacity: 0.9; }

/* --- Tombol 3D --- */
.btn-3d {
    display: inline-block;
    background: var(--text-color);
    color: var(--bg-color);
    text-decoration: none;
    padding: 1rem 2rem;
    font-weight: 800;
    border-radius: 12px;
    border: 2px solid var(--text-color);
    box-shadow: 6px 6px 0px var(--primary);
    cursor: pointer;
    text-align: center;
    width: 100%;
    font-size: 1.1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-3d:hover {
    transform: translate(-3px, -3px);
    box-shadow: 9px 9px 0px var(--secondary);
}

.btn-3d:active {
    transform: translate(5px, 5px);
    box-shadow: 0px 0px 0px transparent;
}

/* --- Tabel Biodata --- */
.info-table { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid var(--text-color);
    border-radius: 12px;
    box-shadow: 4px 4px 0px var(--text-color);
}
[data-theme="dark"] .info-row { background: rgba(0, 0, 0, 0.2); }

.info-label { font-weight: 800; color: var(--primary); }
.info-value { font-weight: 600; }

/* --- Skill Progress Bars --- */
.skills-section h3 { margin-bottom: 15px; font-weight: 800; }
.skill-item { margin-bottom: 1rem; }
.skill-info { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 5px; }

.progress-bar {
    width: 100%;
    height: 20px;
    background: var(--bg-color);
    border: 2px solid var(--text-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: inset 3px 3px 0px var(--shadow-1);
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-right: 2px solid var(--text-color);
    animation: loadProgress 1.5s ease-out forwards;
    width: 0; /* Animasi berawal dari 0 */
}

@keyframes loadProgress {
    0% { width: 0; }
}

/* --- Form (Halaman Kontak) --- */
.form-3d { display: flex; flex-direction: column; gap: 1.5rem; }
.input-group { display: flex; flex-direction: column; gap: 0.5rem; }
.input-group label { font-weight: 800; }

.input-group input, .input-group textarea {
    padding: 1rem;
    border: 2px solid var(--text-color);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 600;
    box-shadow: inset 4px 4px 0px var(--shadow-1);
}
[data-theme="dark"] .input-group input, [data-theme="dark"] .input-group textarea {
    background: rgba(0, 0, 0, 0.2);
}

.input-group input:focus, .input-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 5px 5px 0px var(--primary);
    transform: translate(-2px, -2px);
}