/* =========================================
   Variabel Tema (Warna Liquid & Kaca)
   ========================================= */
:root {
    /* TEMA TERANG: Gradasi Merah & Biru Gelap */
    --bg-base: #0a0f24;         /* Dasar biru gelap */
    --blob-1: #ff0f47;          /* Merah menyala */
    --blob-2: #050a1f;          /* Biru sangat gelap */
    --blob-3: #ff477e;          /* Merah sedikit terang */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border-light: rgba(255, 255, 255, 0.3);
    --glass-border-dark: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] {
    /* TEMA GELAP: Biru Gelap & Ungu Terang Dikit */
    --bg-base: #020617;         /* Dasar biru kehitaman */
    --blob-1: #1e1b4b;          /* Biru ungu sangat gelap */
    --blob-2: #312e81;          /* Biru gelap */
    --blob-3: #a855f7;          /* Ungu terang dikit */
    --glass-bg: rgba(0, 0, 0, 0.25);
    --glass-border-light: rgba(255, 255, 255, 0.15);
    --glass-border-dark: rgba(255, 255, 255, 0.02);
}

/* =========================================
   Reset & Base Typography (Font Oswald Diterapkan Di Sini)
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Font Oswald diprioritaskan, jika gagal akan pakai sans-serif */
    font-family: "Oswald", sans-serif;
    -webkit-tap-highlight-color: transparent; 
}

body {
    background-color: var(--bg-base);
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
    overflow-x: hidden;
    transition: background-color 0.8s ease;
}

/* =========================================
   Liquid Background (Dioptimalkan agar ringan)
   ========================================= */
.liquid-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px); 
    opacity: 0.8;
    animation: move 18s infinite alternate ease-in-out;
    transition: background-color 1s ease; 
    will-change: transform;
}

.blob-1 { width: 400px; height: 400px; background: var(--blob-1); top: -10%; left: -10%; }
.blob-2 { width: 500px; height: 500px; background: var(--blob-2); bottom: -10%; right: -10%; animation-delay: -3s; }
.blob-3 { width: 350px; height: 350px; background: var(--blob-3); top: 40%; left: 30%; animation-delay: -6s; }

@keyframes move {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(80px, 120px) scale(1.1); }
}

/* =========================================
   Tombol Toggle Tema (Pojok Kanan Atas)
   ========================================= */
#theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    z-index: 100;
}

/* =========================================
   Liquid Glass Apple Effect (Reusable Class)
   ========================================= */
.glass-element {
    background: var(--glass-bg);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    border: 1px solid var(--glass-border-dark);
    border-top: 1px solid var(--glass-border-light);
    border-left: 1px solid var(--glass-border-light);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* =========================================
   Layout Kontainer Linktree
   ========================================= */
.container {
    width: 100%;
    max-width: 400px;
    text-align: center;
    z-index: 10;
}

.glass-panel {
    border-radius: 32px;
    padding: 3rem 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid var(--glass-border-dark);
    border-top: 1px solid var(--glass-border-light);
    border-left: 1px solid var(--glass-border-light);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    transition: background 0.8s ease, border-color 0.8s ease;
}

/* Profil */
.profile-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.2rem;
    padding: 3px; 
}

.profile h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    letter-spacing: 1px; /* Tambahan sedikit jarak huruf karena Oswald karakternya rapat */
}

.profile p {
    font-size: 1rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
}

/* =========================================
   Tombol Link (Desain & Ikon)
   ========================================= */
.links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.link-btn {
    display: flex; 
    align-items: center; 
    justify-content: flex-start; /* Ganti ke 'center' kalau mau logo & teks ada di tengah */
    gap: 15px; 
    padding: 1.2rem 1.5rem; /* Tambah padding kiri kanan agar teks tidak nempel border */
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem; /* Sedikit dibesarkan karena Oswald terlihat agak kecil */
    border-radius: 20px;
    will-change: transform;
    cursor: pointer;
}

.icon {
    width: 24px;
    height: 24px;
    fill: currentColor; 
    transition: transform 0.3s ease;
}

.link-btn:hover .icon {
    transform: scale(1.1);
}

/* =========================================
   Interaksi Tombol Ala Apple (Bouncy Effect)
   ========================================= */
.link-btn, #theme-toggle {
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.link-btn:hover, #theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px) scale(1.02);
}

.link-btn:active, #theme-toggle:active {
    transform: scale(0.88) !important;
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    transition: all 0.1s ease-out !important;
}

/* =========================================
   ENTRANCE ANIMATIONS (Animasi Masuk)
   ========================================= */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleUp {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.5); }
    70% { opacity: 1; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

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

#theme-toggle { animation: slideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; }
.glass-panel { animation: scaleUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both; }
.profile-img { animation: popIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both 0.2s; }
.profile h1 { animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both 0.3s; }
.profile p { animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both 0.4s; }
.link-btn { animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; }

/* =========================================
   Efek Partikel Melayang (Ringan)
   ========================================= */
.particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1; 
    pointer-events: none; 
    overflow: hidden;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
    animation: floatUp linear infinite;
    will-change: transform, opacity;
}

@keyframes floatUp {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 1; transform: translateY(90vh) scale(1); }
    90% { opacity: 1; }
    100% { transform: translateY(-10vh) scale(0.5); opacity: 0; }
}
