* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    min-height: 100%;
    font-family: 'DM Serif Display', serif;
    font-size: 20px;
}

body {
    background-image: url("images/aboutme-wallpaper.webp");
    background-repeat: repeat;
    background-size: auto;
    background-position: top left;
    color: #eef3f8;
}

.page-shell {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 50px 20px;
}

.about-board {
    width: min(1200px, 100%);
    background: #9fb7d3;
    padding: 18px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.22);
    overflow: hidden;
}

.board-header {
    background: #496c98;
    padding: 22px 20px;
    margin-bottom: 18px;
    text-align: center;
    position: relative; /* added */
}

.board-header h1 {
    font-size: clamp(2.3rem, 4.8vw, 4rem);
    font-weight: 400;
    letter-spacing: 1px;
    color: #f3eee9;
}

.about-grid {
    display: grid;
    grid-template-columns: 260px 1fr 1fr 1fr;
    grid-template-rows: 280px 280px;
    gap: 18px;
}

.panel {
    background: #496c98;
    overflow: hidden;
}

.panel-profile {
    grid-column: 1;
    grid-row: 1;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-profile img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #ffffff;
}

.panel-main-text {
    grid-column: 2 / 5;
    grid-row: 1;
    padding: 28px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

.panel-main-text p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #eef3f8;
    font-weight: bold;
}

.panel-favorites {
    grid-column: 1;
    grid-row: 2;
    padding: 16px 18px;
    font-weight: bold;
}

.panel-favorites h2 {
    font-size: 1.1rem;
    font-weight: 400;
    text-align: center;
    text-decoration: underline;
    margin-bottom: 14px;
    color: #f3eee9;
}

.panel-favorite-response {
    color:  #add4ff;
}

.panel-favorites p {
    font-weight: bold;
    color: #eef3f8;
}

.panel-picture {
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-picture img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #ffffff;
}

.panel-picture-1 {
    grid-column: 2;
    grid-row: 2;
}

.panel-picture-2 {
    grid-column: 3;
    grid-row: 2;
}

.panel-picture-3 {
    grid-column: 4;
    grid-row: 2;
}

@media (max-width: 1100px) {
    .about-grid {
        grid-template-columns: 240px 1fr 1fr;
        grid-template-rows: 260px 240px 240px;
    }

    .panel-profile {
        grid-column: 1;
        grid-row: 1;
    }

    .panel-main-text {
        grid-column: 2 / 4;
        grid-row: 1;
    }

    .panel-favorites {
        grid-column: 1;
        grid-row: 2;
    }

    .panel-picture-1 {
        grid-column: 2;
        grid-row: 2;
    }

    .panel-picture-2 {
        grid-column: 3;
        grid-row: 2;
    }

    .panel-picture-3 {
        grid-column: 1 / 4;
        grid-row: 3;
    }
}

@media (max-width: 760px) {
    .page-shell {
        padding: 20px 12px;
    }

    .about-board {
        padding: 12px;
    }

    .board-header {
        padding: 16px 12px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .panel-profile,
    .panel-main-text,
    .panel-favorites,
    .panel-picture-1,
    .panel-picture-2,
    .panel-picture-3 {
        grid-column: auto;
        grid-row: auto;
    }

    .panel-profile,
    .panel-picture {
        min-height: 260px;
    }

    .panel-main-text,
    .panel-favorites {
        padding: 18px;
    }

    /* added mobile fix */
    .header-left {
        position: static;
        transform: none;
        margin-bottom: 8px;
        text-align: left;
    }

    .board-header h1 {
        margin-top: 6px;
    }
}

/* === Home button styles (added) === */

.header-left {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.back-home,
.back-home:link,
.back-home:visited,
.back-home:hover,
.back-home:active,
.back-home:focus {
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    text-decoration: none;
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 14px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.35);
    transition: all 0.2s ease;
    display: inline-block;
}

.back-home:hover {
    background: rgba(255,255,255,0.22);
    border-color: rgba(255,255,255,0.6);
}