/* ==========================================
   1. RESET & VARIABLES (Pertemuan 7 & 8)
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --bg-color: #f5f6fa;
    --text-color: #333;
    --white: #ffffff;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center; /* Kunci vertikal sejajar lurus di PC */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo-container {
    display: flex;
    align-items: center; /* Membuat logo dan judul teks presisi di tengah */
    gap: 15px;
}

.logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--white);
    display: block;
}

.logo-container h1 {
    font-size: 1.6rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 15px;
}

nav a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

nav a:hover, nav a.active {
    color: var(--white);
    background-color: var(--accent-color);
}

main {
    flex: 1;
    padding: 2.5rem 5%;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* --- BERANDA --- */
.hero-section{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 30px;
}

.hero-image{
    width: 600px;
    height: auto;
    border-radius: 10px;
    display: block;
    margin: auto;
}

.hero-text {
    max-width: 700px;
}

.hero-text h2 {
    color: var(--primary-color);
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.nip-text {
    color: #7f8c8d;
    font-weight: 500;
}

#greeting {
    text-align: center;
    margin-top: 10px;
}

/* --- PROFIL --- */
.profile-container {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 2.5rem;
}

.profile-container h2, .qa-section h2, .form-section h2, .contact-info h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 8px;
}

.profile-container h2::after, .qa-section h2::after, .form-section h2::after, .contact-info h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

.profile-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2.5rem;
    align-items: start;
}

.profile-image-container {
    width: 100%;
}

.profile-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.table-responsive {
    width: 100%;
    overflow-x: auto; /* Mencegah tabel merusak layout di hp */
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th, .data-table td {
    border: 1px solid #e1e8ed;
    padding: 14px 18px;
    text-align: left;
}

.data-table th {
    background-color: #f8f9fa;
    color: var(--primary-color);
    width: 35%;
    font-weight: 600;
}

/* Q&A Section Grid */
.qa-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    border-left: 5px solid var(--accent-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.card-wide {
    grid-column: span 2;
}

.card h3 {
    color: var(--secondary-color);
    margin-bottom: 12px;
}

.highlight-text {
    font-style: italic;
    font-weight: 600;
    font-size: 1.2rem;
    color: #e67e22;
}

.card ul, #list-hobi {
    padding-left: 20px;
}

.card ul li, #list-hobi li {
    margin-bottom: 8px;
}

/* --- KONTAK --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}

.contact-info {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.direct-contact {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 5px solid #27ae60;
    margin: 1.5rem 0;
}

.direct-contact p {
    margin-bottom: 12px;
}

.contact-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

.contact-link:hover {
    text-decoration: underline;
}

.form-section {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.btn {
    display: inline-block;
    background: var(--accent-color);
    color: var(--white);
    padding: 12px 24px;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn:hover {
    background: #2980b9;
}

/* ==========================================
   4. FOOTER & NOTIFICATION UTILITIES
   ========================================== */
footer {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 1.5rem;
    margin-top: auto;
}

.hidden { display: none; }

.alert-success {
    margin-top: 15px;
    padding: 12px;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
}

.alert-danger {
    margin-top: 15px;
    padding: 12px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
}

/* ==========================================
   5. MEDIA QUERIES RESPONSIVE (Pertemuan 10)
   ========================================== */
@media (max-width: 900px) {
    .qa-grid {
        grid-template-columns: 1fr;
    }
    .card-wide {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    /* Responsive Logo & Header Tengah Sempurna di HP */
    header {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 15px;
        padding: 1.5rem 1rem;
    }

    .logo-container {
        flex-direction: column; /* Logo di atas, judul di bawahnya */
        justify-content: center;
        align-items: center;
        text-align: center;
        gap: 8px;
    }

    nav ul {
        justify-content: center;
        gap: 10px;
    }

    /* Layout Konten HP */
    .hero-section {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
        gap: 1.5rem;
    }

    .profile-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .profile-image-container {
        max-width: 250px;
        margin: 0 auto;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}
