*, *::before, *::after {
    box-sizing: border-box;
}
:root {
    font-family: "Kanit", sans-serif;
    line-height: 1.6;
    scroll-behavior: smooth;
    --bg: oklch(99.115% 0.00423 15.765);
    --primary: oklch(28.712% 0.00291 16.71);
    --black: oklch(0% 0 0);
    --white: oklch(100% 0 0);
    --red: oklch(62.793% 0.25768 29.223);
    --shadow-color: oklch(33.289% 0.00004 271.152);
    background-color: var(--bg);
    color: var(--primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}
:root.dark {
    --bg: oklch(20% 0.01 240);
    --primary: oklch(90% 0.01 60);
    --black: oklch(100% 0 0);
    --white: oklch(0% 0 0);
    --red: oklch(70% 0.2 29.223);
    --shadow-color: oklch(50% 0.01 271.152);
}
.container {
    max-width: 80rem;
    margin-inline: auto;
    padding-inline: 1rem;
}
header {
    background-color: var(--black);
    box-shadow: 0 0 0.2rem var(--black), 0 0 2rem var(--shadow-color);
    margin-bottom: 1rem;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    img {
        height: 3rem;
        width: auto;
        border-radius: .5em;
        transition: border 0.3s ease;
    }
    img:hover {
        border: solid 2px var(--white);
    }
}
nav {
    ul {
        display: flex;
        flex-wrap: wrap;
        flex-direction: column;
        list-style: none;
        padding: 0rem;
        margin: 0;
    }
    li {
        background-color: var(--red);
        border-radius: .5em;
        margin: .5em;
        transition: background-color 0.3s ease, border 0.3s ease;
    }
    a {
        display: inline-block;
        padding: 1em 2em;
        text-decoration: none;
        color: var(--white);
        text-align: center;
        transition: color 0.3s ease;
    }
    li:hover {
        background-color: var(--white);
        border: solid 2px var(--red);
        border-radius: .5em;
        a {
            color: var(--red);
        }
    }
    button#theme-toggle {
        width: auto;
        background-color: var(--red);
        color: var(--white);
        border: none;
        padding: 1em 2em;
        border-radius: .5em;
        cursor: pointer;
        transition: background-color 0.2s , color 0.2s;
    }
    button#theme-toggle:hover {
        background-color: var(--white);
        color: var(--red);
        border: solid 2px var(--red);
    }
}
/* Tablet & desktop (min-width 48em) */
@media screen and (min-width: 48em) {
    header {
        flex-direction: row;
        padding: 1rem;
        img {
            margin-bottom: 0;
        }
    }
    nav {
        width: auto;
        ul {
            flex-direction: row;
            width: auto;
        }
        li {
            margin: 0.5em;
            width: auto;
        }
        a {
            display: inline-block;
            width: auto;
            padding: 1em 2em;
        }
    }
}

main {
    display: grid;
    grid-template-columns: 1fr;
    padding: 1rem 0.5rem;
    row-gap: 2rem;

    > * {
        grid-column: 1;
    }

    img {
        max-width: 100%;
        border-radius: 50%;
        border: solid 0.25rem var(--black);
        box-shadow: 0 0 1rem var(--shadow-color);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        justify-self: center;
    }
    img:hover {
        transform: scale(1.05);
        box-shadow: 0 0 2rem var(--black);
    }

    h1 {
        font-size: 3rem;
        color: var(--red);
        text-align: center;
        margin: 0;
        text-shadow: 0.0625rem 0.0625rem 0.125rem var(--shadow-color);
    }

    .profile-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        background: linear-gradient(to bottom, var(--white), var(--bg));
        border-radius: 1rem;
        padding: 1.5rem;
        box-shadow: 0 0 1.5rem var(--shadow-color);
        transition: box-shadow 0.3s ease;
    }

    .profile-info:hover {
        box-shadow: 0 0 2rem var(--red);
    }

    .personal-details h2 {
        font-size: 2rem;
        margin: 1rem 0 0.5rem;
        color: var(--primary);
    }

    .personal-details p {
        margin: 0.25rem 0;
        font-size: 1.1rem;
        color: var(--primary);
        font-style: italic;
    }

    .section {
        background-color: var(--white);
        border-radius: 1rem;
        padding: 1.5rem;
        box-shadow: 0 0 1rem var(--shadow-color);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    

        .section:hover {
            transform: translateY(-0.5rem);
            box-shadow: 0 0.5rem 2rem var(--shadow-color);
        }

        h2 {
            font-size: 2rem;
            color: var(--red);
            margin-bottom: 1rem;
            text-align: center;
        }

        p {
            font-size: 1.1rem;
            line-height: 1.8;
            color: var(--primary);
            text-align: justify;
        }

        ul {
            list-style-type: none;
            padding: 0;
            margin: 0;
        }

        li {
            font-size: 1.1rem;
            line-height: 1.8;
            color: var(--primary);
            margin-bottom: 0.75rem;
            position: relative;
            padding-left: 1.5rem;
        }

        li::before {
            content: "•";
            color: var(--red);
            position: absolute;
            left: 0;
        }
    }

    a {
        text-decoration: none;
        background: linear-gradient(to right, var(--red), darken(var(--red), 10%));
        color: var(--white);
        border-radius: 2rem;
        padding: 0.75em 2em;
        border: none;
        transition: background 0.3s ease, transform 0.3s ease;
        font-weight: bold;
        display: inline-block;
        margin-top: 1rem;
        justify-self: center;
    }

    a:hover {
        background: linear-gradient(to right, var(--white), var(--bg));
        color: var(--red);
        transform: scale(1.1);
    }
}

/* Tablet & desktop (min-width 48em) */
@media screen and (min-width: 48em) {
    main {
        grid-template-columns: 1fr minmax(0, 60rem) 1fr;
        padding: 2rem 1rem;
    }

    main > * {
        grid-column: 2;
    }
}
.copy {
    background-color: var(--black);
    color: var(--white);
    padding: 1em;
    text-align: center;
    margin-top: 2rem;
}