:root {
    --bg-dark-red: #470a0a;
    --bg-black: #101010;
    --box-bg: #1a1818;
    --text-color: #ecdddd;
    --accent: #b21c0e;
    --accent-hover: #cb0e40;
    --body-font: "IMFell", sans-serif;
    --header-font: "Jacquard24", serif;
}

@font-face {
    font-family: "Jacquard24";
    src: url("/fonts/Jacquard24.ttf") format("truetype");
    font-display: swap;
}

@font-face {
    font-family: "IMFell";
    src: url("/fonts/IMFellEnglishSC.ttf") format("truetype");
    font-display: swap;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: var(--body-font);
    color: var(--text-color);
    overflow-x: hidden;
    background-color: var(--bg-black);
    background-image: conic-gradient(var(--bg-dark-red) 90deg,
            transparent 90deg 180deg,
            var(--bg-dark-red) 180deg 270deg,
            transparent 270deg);
    background-size: 20px 20px;
    background-attachment: fixed;
}

p {
    font-family: "IMFell", serif;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.content {
    width: 100%;
    max-width: 1000px;
    position: relative;
}

.wireframe-container {
    display: grid;
    grid-template-columns: 180px 1fr;
    grid-gap: 20px;
    position: relative;
}

.upperleft-box,
.nav,
.minibox,
.main-top-large,
.main-top-small,
.main-center,
.main-bottom,
.main-blog {
    background-color: var(--box-bg);
    border: 15px solid var(--accent);
    border-image-source: url('/images/GoldFrame.svg');
    border-image-slice: 50;
    border-image-repeat: round;
    background-clip: padding-box;
    filter: drop-shadow(0px 25px 20px rgba(0, 0, 0, 0.9));
}

.left-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
}

.upperleft-box {
    height: 180px;
    width: 180px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.pfp {
    display: block;
    margin: 0;
    width: 150px;
    height: 150px;
    object-fit: cover;
    background-color: var(--box-bg);
    position: relative;
    z-index: 1;
}

.nav {
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 8px;
    width: 100%;
}

.nav a.button {
    display: block;
    width: 100%;
    margin-bottom: 8px;
    text-decoration: none;
    box-sizing: border-box;
}

.nav a.button:last-child {
    margin-bottom: 0;
}

.btn-velvet {
    padding: 12px 10px;
    background: linear-gradient(135deg, var(--bg-dark-red) 0%, #2a0505 100%);
    color: var(--text-color);
    font-family: var(--header-font);
    font-size: 15px;
    text-align: center;
    letter-spacing: 1px;
    border: 1px solid var(--accent);
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.8), 2px 2px 5px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.btn-velvet:hover {
    background: linear-gradient(135deg, var(--accent) 0%, var(--bg-dark-red) 100%);
    border-color: #ffb8c6;
    letter-spacing: 2px;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

.left-widgets-container {
    position: relative;
    width: 100%;
    flex-grow: 1;
    min-height: 160px;
}

.minibox {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 20px 15px;
    color: white;
    font-size: 14px;
    text-align: left;
    text-shadow:
        -1px -1px 0 black, 0px -1px 0 black, 1px -1px 0 black,
        -1px 0px 0 black, 1px 0px 0 black,
        -1px 1px 0 black, 0px 1px 0 black, 1px 1px 0 black;
}

.email {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    margin: 0;
    text-align: center;
    z-index: 15;
}

.email a {
    color: white;
    font-size: 14px;
    font-family: var(--header-font);
    text-decoration: underline dotted #cacaca;
    text-shadow:
        -1px -1px 0 #000, 0px -1px 0 #000, 1px -1px 0 #000,
        -1px 0px 0 #000, 1px 0px 0 #000,
        -1px 1px 0 #000, 0px 1px 0 #000, 1px 1px 0 #000;
}

.email a:hover {
    color: var(--accent);
}

.main-area {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 20px;
}

.top-row {
    display: grid;
    grid-template-columns: 1fr 150px;
    gap: 20px;
}

.main-top-large {
    width: 100%;
    aspect-ratio: 3200 / 1200;
    background-image: url('/images/RoselineBanner.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 120px;
}

.main-top-small {
    min-height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.upper-right {
    max-width: 100%;
    max-height: 205px;
    width: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.main-center {
    min-height: 300px;
    padding-top: 20px;
    padding-right: 25px;
    padding-bottom: 25px;
    padding-left: 25px;
    position: relative;
}

.main-bottom-row {
    display: flex;
    gap: 20px;
}

.main-bottom,
.main-blog {
    flex: 1;
    min-height: 80px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.blog-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 5px;
}

.blog-header .boxtitle {
    margin: 0;
}

.rss-icon {
    image-rendering: pixelated;
    display: block;
    background-color: transparent !important;
}

.boxtitle {
    color: var(--accent);
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    letter-spacing: 1px;
    font-family: var(--header-font);
}

.boxtitle a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.boxtitle a:hover {
    color: var(--accent-hover);
    text-shadow: 0 0 8px rgba(203, 14, 64, 0.6);
}

.header {
    font-size: 1.5rem;
    color: var(--accent);
    font-family: var(--header-font);
    margin-bottom: 10px;
}

.text {
    line-height: 1.6;
    max-width: 53%;
}

#latest-post-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    word-break: break-word;
}

.speech-box {
    position: absolute;
    right: 130px;
    bottom: 180px;
    z-index: 11;
    background-color: var(--bg-dark-red);
    color: var(--text-color);
    border: 2px solid var(--accent);
    padding: 12px 15px;
    max-width: 200px;
    font-size: 0.9rem;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.speech-box::before {
    content: '';
    position: absolute;
    top: 20px;
    right: -15px;
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 13px solid var(--accent);
}

.speech-box::after {
    content: '';
    position: absolute;
    top: 22px;
    right: -12px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 11px solid var(--bg-dark-red);
}

.tooltip {
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--box-bg);
    color: var(--text-color);
    padding: 6px 10px;
    white-space: nowrap;
    border: 1px solid var(--accent);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 12;
}

.speech-box:hover .tooltip {
    opacity: 1;
}

.roseline {
    position: absolute;
    right: -25px;
    bottom: 1px;
    height: 270px;
    width: auto;
    z-index: 10;
    filter: drop-shadow(1px 1px 0px rgba(50, 0, 5, 1));
}

.curtain-deco {
    position: absolute;
    z-index: 10;
    pointer-events: none;
    height: auto;
}

.pos-top-box-left {
    top: 0;
    left: 0;
    transform: translate(-10%, -15%) scale(1.5, 1);
    width: 4rem;
    max-width: 100px;
}

.pos-top-box-right {
    top: 0;
    right: 0;
    transform: translate(10%, -15%) scale(1.5, 1);
    width: 4rem;
    max-width: 100px;
}

.rose-deco {
    position: absolute;
    width: 10rem;
    max-width: 25vw;
    height: auto;
    z-index: 10;
    pointer-events: none;
}

.pos-top-right {
    top: 0;
    right: 0;
    transform: translate(30%, -30%);
}

.pos-bottom-left {
    bottom: 0;
    left: 0;
    transform: translate(-25%, 25%);
}

.pos-mid-left {
    top: 50%;
    left: 0;
    transform: translate(-50%, -100%);
    width: 10rem;
    max-width: 8vw;
}

.pos-mid-right {
    top: 50%;
    right: 0;
    transform: translate(50%, 0%);
    width: 10rem;
    max-width: 6vw;
}

@media screen and (max-width: 800px) {
    .wireframe-container {
        grid-template-columns: 1fr;
    }

    .top-row {
        grid-template-columns: 1fr;
    }

    .main-top-small {
        justify-self: center;
        width: max-content;
        padding: 10px;
    }

    .main-bottom-row {
        flex-direction: column;
    }

    .upperleft-box {
        margin: 0 auto;
    }

    .main-center {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-bottom: 30px;
    }

    .text {
        max-width: 100%;
    }

    .speech-box {
        position: relative;
        right: auto;
        bottom: auto;
        margin-top: 20px;
        margin-bottom: 15px;
        max-width: 90%;
    }

    .speech-box::before {
        top: auto;
        bottom: -13px;
        right: 30px;
        border-top: 13px solid var(--accent);
        border-bottom: none;
        border-left: 12px solid transparent;
        border-right: 12px solid transparent;
    }

    .speech-box::after {
        top: auto;
        bottom: -10px;
        right: 31px;
        border-top: 11px solid var(--bg-dark-red);
        border-bottom: none;
        border-left: 11px solid transparent;
        border-right: 11px solid transparent;
    }

    .roseline {
        display: block !important;
        position: relative;
        right: auto;
        bottom: auto;
        height: 220px;
        margin-top: 10px;
    }

    .curtain-deco {
        max-width: 42vw;
    }

    .pos-top-box-left {
        width: 5rem;
        max-width: none;
        transform: translate(-27%, -15%);
    }

    .pos-top-box-right {
        width: 5rem;
        max-width: none;
        transform: translate(27%, -15%);
    }

    .rose-deco {
        max-width: 42vw;
    }

    .pos-mid-left {
        width: 7rem;
        max-width: none;
        transform: translate(-50%, -200%);
    }

    .pos-mid-right {
        width: 5rem;
        max-width: none;
        transform: translate(45%, 100%);
    }
}