
:root {
    --maroon: #7a1f2b;
    --maroon-dark: #5a1520;
    --gold: #c9961a;
    --gold-dark: #a87a10;
    --gold-light: #ecd9a6;
    --gold-input: #d9c27a;
    --cream: #fff8ee;
    --cream-row: #fbeee0;
    --text: #3a1218;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--cream);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--maroon);
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

header {
    padding: 24px 16px;
    background-color: var(--maroon);
    color: var(--white);
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 1.6rem;
}

header p {
    margin: 8px 0 0;
}

nav {
    padding: 10px 12px;
    background-color: var(--white);
    border-bottom: 1px solid var(--gold-light);
    text-align: center;
}

nav a {
    display: inline-block;
    margin: 4px 8px;
    color: var(--maroon);
    font-weight: bold;
    text-decoration: none;
}

nav a:hover {
    text-decoration: underline;
}

main {
    width: 92%;
    max-width: 1000px;
    margin: 20px auto;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

section {
    padding: 16px;
    background-color: var(--white);
    border: 1px solid var(--gold-light);
    border-radius: 16px;
}

section h2 {
    margin-top: 0;
    color: var(--maroon);
    text-align: center;
}

footer {
    margin-top: 24px;
    padding: 20px 16px;
    background-color: var(--maroon);
    color: var(--white);
    text-align: center;
}

footer p {
    margin: 4px 0;
}

.profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    text-align: center;
    position: relative;
}

.profile-info {
    flex: 1;
}

.profile-info h2 {
    margin-bottom: 8px;
}

.profile-info p {
    margin: 5px 0;
}

.profile-photo {
    display: block;
    width: 180px;
    height: 180px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--maroon);
    margin: 0 auto;
}

.profile-photo-portrait {
    display: block;
    width: 100%;
    max-width: 200px;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
    border: 4px solid var(--maroon);
    margin: 0 auto;
}

.badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    background-color: var(--gold);
    color: var(--text);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 8px;
    background-color: var(--maroon);
    color: var(--white);
    font-weight: bold;
    text-decoration: none;
}

.btn:hover {
    background-color: var(--maroon-dark);
}

.btn-gold {
    background-color: var(--gold);
    color: var(--text);
}

.btn-gold:hover {
    background-color: var(--gold-dark);
    color: var(--white);
}

#hobbies ol,
#hobbies ul {
    padding-left: 24px;
}

#hobbies li {
    margin-bottom: 6px;
}

#hobbies h3 {
    margin: 16px 0 4px;
    color: var(--maroon);
}

.table-container {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

caption {
    padding-bottom: 8px;
    color: var(--maroon);
    font-weight: bold;
    text-align: left;
}

th,
td {
    padding: 10px;
    border: 1px solid var(--gold-light);
}

th {
    background-color: var(--maroon);
    color: var(--white);
}

tbody tr:nth-child(even) {
    background-color: var(--cream-row);
}

.contact-list {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.contact-list li {
    padding: 12px 16px;
    background-color: var(--cream);
    border-left: 4px solid var(--gold);
    border-radius: 8px;
    overflow-wrap: anywhere;
}

form {
    display: grid;
    gap: 16px;
}

.form-group {
    display: grid;
    gap: 6px;
}

label {
    font-weight: bold;
}

input,
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gold-input);
    border-radius: 8px;
    font: inherit;
    background-color: var(--white);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

button {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background-color: var(--maroon);
    color: var(--white);
    font: inherit;
    font-weight: bold;
    cursor: pointer;
}

button:hover {
    background-color: var(--maroon-dark);
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 16px;
    padding: 10px 0;
}

.gallery figure {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    flex: 1 1 100%;
    margin: 0;
}

.gallery img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    object-position: center;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(122, 31, 43, 0.25);
}

.gallery figcaption {
    text-align: center;
    font-size: 0.95rem;
    font-weight: bold;
    color: var(--maroon);
}

@media (min-width: 480px) {
    .gallery figure {
        flex: 1 1 220px;
        max-width: 320px;
    }

    button {
        width: fit-content;
    }
}

@media (min-width: 768px) {
    header {
        padding: 32px 20px;
    }

    header h1 {
        font-size: 2rem;
    }

    nav a {
        margin: 4px 10px;
    }

    main {
        width: 90%;
        margin: 24px auto;
    }

    .content-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }

    section {
        padding: 24px;
    }

    .profile,
    #biografi,
    #pengantar,
    #gallery,
    #info,
    #cerita {
        grid-column: 1 / -1;
    }

    .badge {
        top: 16px;
        right: 16px;
    }

    .gallery {
        gap: 20px;
        padding: 20px;
    }

    .gallery figure {
        flex: 1 1 250px;
    }

    footer {
        padding: 24px 20px;
    }
}