/* ================================================
   narcissus' css (why are you here?) 
   ================================================ */

/* ==--== ------------- ==--== */
/* ==--== GLOBAL STYLES ==--== */
/* ==--== ------------- ==--== */

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 2rem;
    box-sizing: border-box;
    background-image: url("/images/background.png");
    background-repeat: repeat;
}

/* Spinning flower cursor */
* {
    cursor: url('/images/flower_cursor.png') 0 0, auto !important;
}

/* ── OUTER BOX ── */
.box_container {
    width: 85%;
    max-width: 860px;
    min-height: 90vh;
    border: solid 1px #000;
    background-color: #fff;
    box-shadow: 0 6px 12px rgba(0,0,0,0.12);
    opacity: 0;
    transition: opacity 0.15s ease;
    position: relative;
    overflow: visible;
}

.box_container.ready {
    opacity: 1;
}

/* ── HEADER IMAGE ── */
.head_container {
    width: 100%;
    height: 200px;
    background-color: #ffd8b6;
    border-bottom: solid 1px #000;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}


.head_container a {
    display: flex;
    width: 99%;
    height: 95%;
    justify-content: center;
    align-items: center;
}

.head_container img {
    width: 100%;
    height: 100%;
}

.nav {
    display: flex;
    list-style: none;
    justify-content: center;
    gap: 1.5rem;
    padding: 0.2rem;
    margin: 0;
    margin-bottom: 1rem;
    border-bottom: solid 0.05rem #cbb8a8;
    user-select: none;
}

.nav li a {
    text-decoration: none;
    color: #f39c6b;
    font-weight: 600;
    font-size: 1.1rem;
}

.nav li a:hover {
    color: #c97840;
    text-decoration: underline;
}

.star {
    display: inline-block;
    width: 1.2em;
    transition: transform 0.15s ease;
}

.star::before {
    content: "✦";
}

/* swap to hollow star on hover */
.nav li a:hover .star::before {
    content: "✧";
}

/* tiny motion so it feels alive */
.nav li a:hover .star {
    transform: translateY(-1px) scale(1.05);
}

/* ── BODY LAYOUT ── */
.main_container {
    display: flex;
    gap: 0;
}


/* ── ASIDE / SIDEBAR ── */
aside {
    width: 200px;
    min-width: 200px;
    padding: 1.2rem 1rem;
    border-right: solid 1px #e0c8b8;
    box-sizing: border-box;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: block;
    object-fit: cover;
    margin: 0 auto 0.4rem auto;
}

.name {
    color: #ffb65c;
    font-weight: 700;
    text-decoration: none;
    font-size: 1.5rem;
    display: block;
    text-align: center;
    transition: transform 0.15s ease;
    user-select: none;
}

.namestar {
    display: inline-block;
}

.namestar::before {
    content: "";
}

/* swap to hollow star on hover */
.name .namestar::before {
    content: "✧";
}

/* tiny motion so it feels alive */
.name:hover {
    text-decoration: underline;
    transform: translateY(-1px) scale(1.05);
}

.extras h3 {
    font-size: 0.8rem;
    text-align: center;
    margin: 0.8rem 0 0.3rem;
    color: #555;
    border-bottom: 0.05rem dashed #ddd;
    padding-bottom: 0.2rem;
}

/* 88x31 buttons box */
.extras-box {
    min-height: 60px;
    border: 0.05rem solid #cbb8a8;
    padding: 0.4rem;
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    background: #fffaf6;
    justify-content: center;
}

.web-button {
    width: 100%;
    height: 31px;
    /*image-rendering: pixelated;   /* keeps pixel art crisp if i need at some point */
}

/* Latest posts */
.latest-posts {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.78rem;
}

.latest-posts li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.2rem 0;
    border-bottom: 1px dotted #eee;
}

.latest-posts a {
    color: #c97840;
    text-decoration: none;
}

.latest-posts a:hover {
    text-decoration: underline;
}

.post-date {
    color: #aaa;
    font-size: 0.72rem;
    white-space: nowrap;
    margin-left: 0.3rem;
}

.guestbook-preview {
    background: #fffaf6;
    border: 1px solid #cbb8a8;
    padding: 0.4rem 0.5rem;
    font-size: 0.78rem;
}

.gb-entry {
    margin: 0 0 0.3rem;
    color: #555;
    font-style: italic;
}

.gb-link {
    color: #f39c6b;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.8rem;
}

.gb-link:hover {
    text-decoration: underline;
}

/* ── MAIN CONTENT ── */
.content {
    flex: 1;
    padding: 1.3rem 1.4rem;
    box-sizing: border-box;
}

.content p {
    font-size: 1.05rem;
    color: #3d3d3d;
}

.content h2 {
    margin-top: 0;
    font-size: 1.3rem;
}

.tooltip {
    position: fixed;
    left: -999px;    /* hide off-screen initially instead of 0,0 */
    top: -999px;
    background: #f3e6d9;
    color: #5a4636;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 9999;
}

/* ==--== ----- ==--== */
/* ==--== LINKS ==--== */
/* ==--== ----- ==--== */

.link_container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.5rem;
}

.link_box {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 0.8rem;
    border: 0.05rem solid #cbb8a8;
    background: #fffaf6;
    text-decoration: none;
    transition: transform 0.15s ease;
}

.link_box:last-child {
    grid-column: 1 / -1;
}

.link_box:hover {
    transform: translateX(3px);
}

.link_box img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.link_title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #c97840;
    display: block;
}

.link_user {
    font-size: 1rem;
    color: #999;
    display: block;
}

/* ==--== ------- ==--== */
/* ==--== GALLERY ==--== */
/* ==--== ------- ==--== */

.gallery_container_grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.gallery_card {
    border: 0.05rem solid #cbb8a8;
    background: #fffaf6;
    text-align: center;
    padding: 0.05rem;
}

.gallery_card:hover {
    transform: scale(1.02);
}

.gallery_image {
    width: 100%;
    height: auto;
    transition: transform 0.15s ease;
    object-fit: contain;
}

.gallery_card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.gallery_card a .gallery_caption {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ff9100;
}

.gallery_card a .gallery_text {
    font-size: 0.95rem;
    font-style: italic;
    color: #6b6b6b;
}

/* ==--== ---- ==--== */
/* ==--== BLOG ==--== */
/* ==--== ---- ==--== */

.blog_categories {
    display: grid;
    grid-template-columns: repeat(auto-fit);
    gap: 0.5rem;
}

.category_card {
    display: flex;
    align-items: baseline;   /* align on text baseline */
    gap: 0.8rem;
    padding: 0.7rem 1rem;
    border: 0.05rem solid #cbb8a8;
    background: #fffaf6;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease;
}

.category_title {
    font-weight: 600;
    color: #c97840;
    font-size: 1rem;
    flex: 1;
}

.category_desc {
    font-size: 0.78rem;
    color: #bbb;
}

.category_card::before {
    content: "✦";
    color: #e8c9a0;
    font-size: 1.1rem;
}

.category_card:hover::before {
    content: "✧";
}

/* ==--== ------ ==--== */
/* ==--== DEVLOG ==--== */
/* ==--== ------ ==--== */

.back_link {
    font-size: 0.8rem;
    color: #c97840;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 1rem;
}

.back_link:hover { text-decoration: underline; }

.post_list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.post_card {
    display: flex;
    gap: 1rem;
    border: 0.05rem solid #cbb8a8;
    background: #fffaf6;
    padding: 0.8rem;
    margin-bottom: 0.5rem;
}

.post_thumb {
    width: 120px;
    height: 80px;
    object-fit: cover;
    flex-shrink: 0;
}

.post_info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.post_date { font-size: 0.72rem; color: #aaa; }

.post_title { font-size: 0.95rem; color: #444; margin: 0; }

.post_snippet { font-size: 0.82rem; color: #777; margin: 0; flex: 1; }

.continue_reading {
    font-size: 0.78rem;
    color: #c97840;
    text-decoration: none;
    align-self: flex-start;
}

.continue_reading:hover { text-decoration: underline; }

.devlog_grid {
    display: flex;
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
    gap: 1rem;
}

.devlog_image {
    width: 100%;
    height: 180px;
    border: 0.15rem #c97840 solid;
}

.devlog_video {
    width: 100%;
    height: 300px;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background-color: #f39c6b;
    color: white;
    text-align: center;
    line-height: 40px;
    text-decoration: none;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 999;
    opacity: 1;
    transition: opacity 0.3s ease;
}

@supports (animation-timeline: scroll()) {
    .back-to-top {
        opacity: 0;
        pointer-events: none;
        animation: fadeInScroller linear forwards;
        animation-timeline: scroll();
        animation-range: 0vh 100vh;
    }

    @keyframes fadeInScroller {
        0% { opacity: 0; pointer-events: none; }
        100% { opacity: 1; pointer-events: auto; }
    }
}

.back-to-top:hover {
    background-color: #c97840;
    transform: translateY(-3px);
}

/* CHANGELOGS */

.changelog_container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 80%;
}

.changelog_container .changelog_entry {
    border-bottom: 0.05rem dashed #ddd;
    padding-bottom: 1.2rem;
}

.changelog_container h2 {
    margin-bottom: -1rem;
}

.changelog_container p {
    margin-bottom: -1rem;
}

.hanging_gif {
    position: absolute;
    right: -20px;
    top: 270px;
    width: 150px;
    z-index: 10;
}






@media (max-width: 700px) {
    .box_container {
        width: 100%;
        border-left: none;
        border-right: none;
    }

    .main_container {
        flex-direction: column;
    }

    aside {
        width: 100%;
        min-width: unset;
        border-right: none;
        border-bottom: solid 1px #e0c8b8;
    }

    .nav {
        gap: 0.8rem;
        flex-wrap: wrap;
    }

    .head_container {
        height: 120px;
    }
}