@import url('https://fonts.googleapis.com/css2?family=Nanum+Myeongjo&display=swap');

body {
    font-family: 'Nanum Myeongjo', serif;
}

* {
    box-sizing: border-box;
}

nav ul {
    list-style-type: none;
    text-align: center;
    display: grid;
    justify-content: center;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    margin: 5%;
}

nav li > a {
    text-decoration: none;
    color: rgb(36, 41, 98);
    font-weight: bolder;
}

nav li > a:hover, nav li > a:active {
    color: rgb(89, 44, 226);
}

h1 {
    color: rgb(36, 41, 98);
    text-align: center;
    font-size: 3em;
}

h1 > a {
    text-decoration: none;
    color: rgb(36, 41, 98);
}

h1 > a:hover, h1 > a:focus {
    color: rgb(36, 41, 98);
}

label {
    display: block;
    margin-top: 30px;
    margin-bottom: 5px;
}

h2 {
    font-size: 2em;
    color: rgb(36, 41, 98);
    margin-left: 2rem;
}

button {
    margin-top: 15px;
    padding: 10px;
    background-color: rgb(36, 41, 98);
    color: white;
    font-family: 'Nanum Myeongjo', serif;
    letter-spacing: 0.15em;
}

button:hover {
    background-color: rgb(89, 44, 226);;
}

.gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

img {
    max-width: 100%;
}

.gallery figure:hover {
    opacity: 0.8;
}

figcaption {
    text-align: center;
    opacity: 0;
}

.gallery figure:is(:hover) figcaption {
    opacity: 1;
}

a:hover, a:active, a:focus {
    color: rgb(89, 44, 226);
}

main {
    display: grid;
    grid-template-columns: 1fr 3fr;
    font-size: 0.9em;
    gap: 20px;
    justify-content: center;
    margin: 5em;
}

main aside {
    grid-column: 1;
    grid-row: 1/5;
    max-width: 11em;
}

@media screen and (max-width: 480px) {
    main {
        display: grid;
        grid-template-areas: 
            "aside aside"
            "section section";
        margin: 0 auto;
        margin-top: 3em;
    }

    main aside {
        grid-area: aside;
        margin-left: 30%;
    }

    main section {
        grid-area: section;
        margin-right: 20%;
    }

    nav ul {
        display: inline-flex;
        justify-content: center;
        gap: 5%;
    }
}

main section {
    grid-column: 2;
}

footer {
    margin: 4em;
    margin-top: 6em;
}

footer a {
    padding: 0.5em;
}

.contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 6vw;
    justify-content: center;
    text-align: center;
    gap: 20px;
}

.contact form {
    grid-column: 1;
}

.contact img {
    grid-column: 2;
    max-height: 30vh;
    max-width: 30vw;
}

input, textarea {
    font-family: 'Nanum Myeongjo', serif;
}

article {
    text-align: center;
    font-size: 0.9rem;
}

article p {
    margin: 5rem auto;
}