/*
Definisikan Global Stling
*/

*{
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #263238;
    background-color: #f5f7f6;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: #17694a;
}

/* Styling untuk Header */
header {
    padding: 32px 20px;
    background-color: #17694a;
    color: white;
    text-align: center;
}
header h1 {
    margin: 0;
    font-size: 2rem;
}

header p{
    margin: 8px 0 0;
}
/* Styling untuk Navigation */
nav {
    padding: 14px 20px;
    background-color: white;
    border-bottom: 1px solid #d7e1dc;
    text-align: center;
}

nav a{
    display: inline-block;
    margin: 4px 10px;
    color: #17694a;
    font-weight: bold;
    text-decoration: none;

}

nav a:hover{
    text-decoration: underline;
}

/* Styling untuk Main */
main {
    width: 90%;
    max-width: 1000px;
    margin: 24px auto;
}

/* memilih class content-grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

/* Styling untuk Profile Section */
section {
    padding: 24px;
    background-color: white;
    border: 1px solid #d7e1dc;
    border-radius: 16px;
}

section h2{
    margin-top: 0;
    color: #17694a;
}

/*Profile section flexbox*/
.profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
    position: relative;

}

.profile-photo{
    width: 180px;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #17694a;
}

.profile-info {
    flex: 1;
}
.profile-info h2{
    margin-bottom: 8px;
}
.profile-info p{
    margin:5px 0;
}

/* badge */
.badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 6px 12px;
    background-color: #17694a;
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
}

/* Styling untuk Hobbies
*/
#hobbies ol, #hobbies ul {
    padding-left:24px;

}
#hobbies li {
    margin-bottom: 6px;

}

.table-container {
    width: 100%;
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;

}
th, td{
    padding: 12px;
    border: 1px solid #d7e1dc;
}
th {
    background-color: #17694a;
    color: white;

}

tbody tr:nth-child(even){
    background-color: #f5f7f6;

}

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 #b9c8c0;
    border-radius: 8px;
    font: inherit;
    background-color: white;
}

textarea{
    min-height: 120px;
    resize: vertical;
}
input:focus, select:focus, textarea:focus{
    outline: 2px solid #17694a;
    outline-offset: 2px;
}
button {
    width: fit-content;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background-color: #17694a;
    color: white;
    font: inherit;
    font-weight: bold;
    cursor: pointer;
}
button:hover {
    background-color: #0d5038;
}
/* Terakhir Footer */
footer {
    margin-top: 0;
}
footer {
    margin-top: 24px;
    padding: 24px 20px;
    background-color: #17694a;
    color: white;
    text-align: center;
}

footer p {
    margin: 4px 0;
}

@media (min-width: 768px){
    .profile{
        flex-direction: row;
        text-align: left;
    }
    .content-grid{
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .profile{grid-column: 1/ -1;}
    #contact{grid-column: 1/ -1;}
}
/* Tambahan agar Student Profile dan foto berada di tengah */
section h2 {
    text-align: center;
}

.profile {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center;
    text-align: center !important;
}

/* Membuat foto profile menjadi bulat dan berada di tengah */
#profile img {
    width: 180px !important;
    height: 180px !important;
    object-fit: cover;
    border-radius: 50% !important;
    border: 4px solid #17694a;
    display: block;
    margin: 0 auto;
}
