/* -- imports -- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap');

/* -- core elements reset -- */
* {
    margin: 0;
    padding: 0;
}

p {
    margin: 0px !important;
}

a {
    text-decoration: none;
    color: #31748f; /* Rosé Pine foam (link cyan) */
    margin: 5px;
}

a:hover {
    text-decoration: none;
    color: #191724; /* base background */
    background-color: #31748f; /* foam */
    margin: 5px;
}

li {
    list-style: none;
    margin-top: 30px;
}

menu {
    padding: 0;
}

hr {
    align-self: stretch;
    margin-top: 3.5px;
    margin-bottom: 3.5px;
    border: 1.5px solid #524f67; /* muted gray from Rosé Pine */
    margin-left: 0;
    margin-right: 0;
}

/* -- body -- */
body {
    background-image: url("bg.svg");
    background-size: cover;
    background-position: center top;
}

/* -- center content -- */
.center {
    font-family: "Space Mono";
    position: fixed;
    top: 50%;
    left: 50%;
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}

.avatar {
    max-height: 140px;
    max-width: 140px;
}

@media (max-width: 470px) {
    .box {
        width: 95%;
        padding-left: 5px;
        padding-right: 5px;
    }
}

.indent {
    padding-left: 1ch;
}

.box {
    color: #e0def4; /* text */
    background-color: #1f1d2e; /* surface */
    border: 3px solid #eb6f92; /* love (pink) */
    height: 450px;
    width: 400px;
    padding: 25px;
}

.home-grid {
    display: grid;
    grid-template-rows: 1fr 3fr 0.5fr;
}

.home-header {
    display: grid;
    grid-template-columns: 2fr 1fr;
}

.home-footer  {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-items: stretch;
    row-gap: 5px;
}

.home-link {
    font-size: 1.4em;
}

.about-grid {
    display: grid;
    grid-template-rows: 0.5fr 3fr;
}

.about-header {
    display: grid;
    grid-template-columns: 2fr 1.5fr;
}

.about-header-back {
    text-align: right;
    position: relative;
}

/* -- top bar -- */
.topbar {
    padding: 5px;
    border-radius: 25px;
    margin: 15px;
    background-color: #26233aaf; /* muted surface */
}

/* mobile shi */

body.mobile .center.box {
    width: 90%;
    padding: 15px;
    height: 80%; /* allow content to expand */
    font-size: 0.9rem;
}

body.mobile .home-header {
    grid-template-columns: 1fr; /* stack vertically */
    text-align: center;
    row-gap: 15px;
}

body.mobile .avatar {
    max-width: 100px;
    max-height: 100px;
    margin: 0 auto;
}

body.mobile h1 {
    font-size: 1.8rem;
}

body.mobile h2 {
    font-size: 1.4rem;
}

body.mobile .home-link {
    font-size: 1.2rem;
    margin: 10px 0;
}

body.mobile .indent {
    padding-left: 0.5ch;
}

/* further shrink for very small screens */
@media (max-width: 470px) {
    body.mobile .center.box {
        width: 95%;
        padding: 10px;
    }

    body.mobile h1 {
        font-size: 1.5rem;
    }

    body.mobile h2 {
        font-size: 1.2rem;
    }

    body.mobile .home-link {
        font-size: 1rem;
    }

    body.mobile .avatar {
        max-width: 80px;
        max-height: 80px;
    }

    body.mobile .topbar {
        margin: 10px;
        padding: 5px;
    }
}

/* optional: make menu items more touch-friendly */
body.mobile .home-link a {
    display: block;
    padding: 10px 5px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

body.mobile .home-link a:hover {
    background-color: rgba(49, 116, 143, 0.3); /* foam highlight */
}

/* мобило оптимизатион part 2 */

body.mobile .about-grid {
    width: 90%;
    padding: 15px;
    height: auto;
}

body.mobile .about-header {
    grid-template-columns: 1fr;
    text-align: center;
    row-gap: 10px;
}

body.mobile .about-header-back {
    text-align: center;
}

body.mobile h1 {
    font-size: 1.8rem;
}

body.mobile h2 {
    font-size: 1.4rem;
}

body.mobile p {
    font-size: 1rem;
    line-height: 1.4rem;
}

@media (max-width: 470px) {
    body.mobile .about-grid {
        width: 95%;
        padding: 10px;
    }

    body.mobile h1 {
        font-size: 1.5rem;
    }

    body.mobile h2 {
        font-size: 1.2rem;
    }

    body.mobile p {
        font-size: 0.95rem;
    }
}
