html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
}

body {
    margin: 0;
    background-color: #2e3440;
    color: #d8dee9;
    font-family: "JetBrains Mono", monospace;
}

.page {
    max-width: 800px;
    margin: auto;
    padding-inline: 10px;
    padding-bottom: 60px;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 24px 30px;
    background-color: #3b4252;
}

.nav-links {
    display: flex;
    gap: 20px;
    margin-left: auto;
    font-size: 18px;
    font-weight: 500;
}

.realNavBar {
    max-width: 950px;
    width: 100%;
    margin: auto;
    display: flex;
    align-items: center;
}

.realNavBar a {
    text-decoration: none;
    color: #e5e9f0;
}

.hero-link {
    font-size: 24px;
    font-weight: 700;
}

.realNavBar a:hover {
    color: #81a1c1;
}

.hero {
    padding-top: 80px;
    padding-bottom: 80px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 500;
    margin: 0;
}

.description {
    font-size: 16px;
    color: #d8dee9;
    line-height: 1.5;
    font-weight: 400;
    white-space: nowrap;
}

.about,
.skills,
.projects,
.contact {
    padding-top: 64px;
    padding-bottom: 64px;
    border-top: 1px solid rgba(129, 161, 193, 0.12);
    scroll-margin-top: 96px;
}

.about h2,
.skills h2,
.projects h2,
.contact h2 {
    font-size: 32px;
    margin-top: 0;
    margin-bottom: 24px;
}

.about p {
    font-size: 18px;
    line-height: 1.6;
    margin: 0;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-class {
    padding: 10px;
    border: solid 2px;
    border-color: #81a1c1;
    border-radius: 8px;
    color: #d8dee9;
}

.project {
    display: block;
    padding: 10px;
    border: solid 1px #4c566a;
    border-radius: 8px;
    text-decoration: none;
    background-color: rgba(59, 66, 82, 0.25);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.project:hover {
    background-color: rgba(94, 129, 172, 0.08);
    border-color: #5e81ac;
}

.project-name-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #e5e9f0;
}

.project-name-container h3 {
    margin: 0;
}

.project:hover .project-name-container {
    color: #81a1c1;
}

.project p {
    color: #d8dee9;
    margin-top: 7px;
    margin-bottom: 9px;
}

.icon {
    display: flex;
    color: #d8dee9;
}

.icon svg {
    width: 14px;
    height: 14px;
}

.project:hover .icon {
    color: #81a1c1;
}

.project .skill-list {
    gap: 6px;
}

.project .skill-class {
    padding: 5px 8px;
    border-width: 1px;
    font-size: 13px;
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mail {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.mail a {
    text-decoration: none;
    color: #d8dee9;
}

.portfolios {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.portfolios a {
    text-decoration: none;
    color: #d8dee9;
}

.mail a:hover {
    color: #81a1c1;
}

.portfolios a:hover {
    color: #81a1c1;
}

.footer {
    width: 100%;
    background-color: #3b4252;
    padding: 24px 30px;
    box-sizing: border-box;
}

.footer-inner {
    max-width: 950px;
    width: 100%;
    margin: auto;
    font-size: 14px;
    color: #8f98a8;
}

.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #3b4252;
    color: #d8dee9;
    border: 1px solid #5e81ac;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.back-to-top:hover {
    background-color: rgba(94, 129, 172, 0.25);
    color: #81a1c1;
}

.back-to-top.show {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 768px) {
    html {
        scroll-padding-top: 125px;
    }

    .page {
        width: 100%;
        padding-inline: 18px;
        box-sizing: border-box;
    }

    .navbar {
        padding: 16px 18px;
    }

    .realNavBar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .hero-link {
        font-size: 20px;
    }

    .nav-links {
        width: 100%;
        margin-left: 0;
        justify-content: space-between;
        gap: 8px;
        font-size: 13px;
    }

    .hero {
        padding-top: 56px;
        padding-bottom: 56px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .description {
        font-size: 14px;
        white-space: normal;
    }

    .about,
    .skills,
    .projects,
    .contact {
        padding-top: 48px;
        padding-bottom: 48px;
        scroll-margin-top: 125px;
    }

    .about h2,
    .skills h2,
    .projects h2,
    .contact h2 {
        font-size: 28px;
        margin-bottom: 20px;
    }

    .about p {
        font-size: 16px;
    }

    .skill-list {
        gap: 8px;
    }

    .skill-class {
        padding: 7px 8px;
        font-size: 14px;
    }

    .project {
        padding: 10px;
    }

    .project .skill-list {
        gap: 6px;
    }

    .project .skill-class {
        padding: 4px 7px;
        font-size: 12px;
    }

    .footer {
        padding: 20px 18px;
        font-size: 13px;
    }

    .back-to-top {
        right: 16px;
        bottom: 16px;
        width: 40px;
        height: 40px;
        z-index: 2;
    }
}