/* ==========================================================================
   CSS VARIABLES (PENGATURAN WARNA)
   ========================================================================== */
:root {
    /* MODE TERANG (Default) */
    --bg-main: linear-gradient(135deg, #f8fafc, #fee2e2, #f1f5f9);
    --bg-header: rgba(255, 255, 255, 0.85);
    --bg-card: rgba(255, 255, 255, 0.7);
    --text-primary: #1e1b4b;
    --text-secondary: #475569;
    --border-color: rgba(0, 0, 0, 0.08);
    --accent-color: #dc2626; /* Merah Dominan */
    --accent-light: #f87171;
    --btn-gradient: linear-gradient(135deg, #dc2626, #991b1b);
    --shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

body.dark-mode {
    /* MODE GELAP */
    --bg-main: linear-gradient(135deg, #0a0a0a, #291010, #140505);
    --bg-header: rgba(15, 15, 15, 0.85);
    --bg-card: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #d4d4d8;
    --border-color: rgba(255, 255, 255, 0.08);
    --shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   BASE STYLE
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

body {
    background: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    transition: background 0.4s ease, color 0.4s ease;
}

/* HEADER */
header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
    background: var(--bg-header);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: 0.4s;
}

header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 2px;
}

/* NAVBAR */
nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

nav a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    padding: 10px 18px;
    border-radius: 12px;
    transition: 0.3s;
}

nav a:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

/* HAMBURGER */
.menu-toggle {
    display: none;
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 12px;
    background: var(--btn-gradient);
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: 0.3s;
}

/* DARK MODE BUTTON */
#darkModeBtn {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: var(--btn-gradient);
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
}

#darkModeBtn:hover {
    transform: scale(1.08);
}

/* HERO */
.hero {
    padding: 120px 8% 80px;
    text-align: center;
}

.hero h2 {
    font-size: 52px;
    margin-bottom: 18px;
    color: var(--text-primary);
}

.hero p {
    font-size: 20px;
    color: var(--text-secondary);
}

/* HERO BUTTON */
.hero-buttons {
    margin-top: 35px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-btn {
    padding: 14px 28px;
    border-radius: 14px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    background: var(--btn-gradient);
    transition: 0.3s;
    box-shadow: 0 6px 18px rgba(220, 38, 38, 0.35);
}

.hero-btn:hover {
    transform: translateY(-4px) scale(1.03);
}

.hero-btn.secondary {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
}

/* SKILLS */
.skills {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
    padding: 0 8% 80px;
}

/* CARD & BOX */
.card, .box, .profile-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 35px;
    backdrop-filter: blur(12px);
    transition: 0.35s;
    box-shadow: var(--shadow);
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-color);
}

.card h3, .box h2, .profile-info h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.card p, .box p, .box li, .profile-info p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* PROFILE BOX */
.profile-box {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 35px;
    margin-bottom: 40px;
}

.profile-image img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--accent-color);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.3);
}

/* TAG */
.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.tag-container span {
    padding: 12px 20px;
    border-radius: 30px;
    background: var(--btn-gradient);
    color: white;
    font-weight: 600;
}

/* INPUT FORM */
.form-control {
    width: 100%;
    padding: 12px;
    background: var(--bg-header);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    margin-top: 5px;
    transition: 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* SOCIAL GRID */
.social-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 25px;
}

.social-card {
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 35px;
    border-radius: 24px;
    text-align: center;
    transition: 0.35s;
    color: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.social-card:hover { transform: translateY(-8px) scale(1.02); }
.social-card h3 { font-size: 24px; margin-bottom: 12px; }

/* MEDSOS GRADIENT */
.instagram { background: linear-gradient(135deg, #ff512f, #dd2476); }
.whatsapp { background: linear-gradient(135deg, #11998e, #38ef7d); }
.tiktok { background: linear-gradient(135deg, #000000, #ff0050, #00f2fe); }
.github { background: linear-gradient(135deg, #24292e, #4c51bf); }
.discord { background: linear-gradient(135deg, #404eed, #5865f2); }

/* MOBILE RESPONSIVE */
@media(max-width:768px){
    header { padding: 20px 5%; position: relative; }
    .menu-toggle { display: block; }
    nav {
        position: absolute;
        top: 90px;
        right: 5%;
        width: 220px;
        background: var(--bg-header);
        border: 1px solid var(--border-color);
        border-radius: 20px;
        padding: 20px;
        display: none;
        flex-direction: column;
        gap: 15px;
        z-index: 999;
    }
    nav.active { display: flex; }
    #darkModeBtn { width: 100%; border-radius: 12px; }
    .hero h2 { font-size: 36px; }
    .profile-box { flex-direction: column; text-align: center; }
    .social-grid { grid-template-columns: repeat(2, 1fr); }
}