/* =========================================================
   BASE — background gif sits behind everything
========================================================= */

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    min-height: 100vh;
    padding: 40px 20px;

    background-image: url("website_background.gif");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;

    color: #f6e6ec;
    font-family: Georgia, serif;
    font-size: 17px;
    line-height: 1.65;
}


/* =========================================================
   THE BOX — semi-transparent red, retro double frame
========================================================= */

.box {
    position: relative;

    width: 99%;
    max-width: 1800px;
    margin: 0 auto;

    /* the reddish tint — bump the last number for more opacity */
    background: rgba(122, 22, 46, 0.62);

    /* nested frame: outer ridge, inner hairline, hard drop shadow */
    border: 4px ridge #d9536f;
    box-shadow:
        0 0 0 1px #3a0a18,
        inset 0 0 0 1px rgba(255, 190, 205, 0.35),
        inset 0 0 0 6px rgba(58, 10, 24, 0.4),
        8px 8px 0 rgba(20, 4, 10, 0.55);
}

/* --- || pipe texture, inset so it runs only between the bars --- */

.box::before,
.box::after {
    content: "";
    position: absolute;
    top: 44px;
    bottom: 38px;
    width: 10px;
    background: repeating-linear-gradient(
        90deg,
        rgba(255, 190, 205, 0.8) 0 2px,
        rgba(45, 6, 18, 0.7) 2px 3px,
        transparent 3px 7px
    );
}

.box::before { left: 10px; }
.box::after  { right: 10px; }

/* =========================================================
   HEADER / FOOTER BARS
========================================================= */

.box-header {
    margin: 6px;
    padding: 6px 0;
    background: rgba(58, 10, 24, 0.55);
    border-bottom: 2px dashed rgba(255, 190, 205, 0.5);
    color: #ffd5e0;
    font-family: "Silkscreen", monospace;
    font-size: 9px;
    letter-spacing: 1px;
}

.box-footer {
    margin: 6px;
    padding: 6px 0;

    border-top: 2px dashed rgba(255, 190, 205, 0.5);

    color: rgba(255, 190, 205, 0.55);
    font-family: "IBM Plex Mono", monospace;
    font-size: 9px;
    letter-spacing: 1px;

    overflow: hidden;
    white-space: nowrap;
}

/* =========================================================
   SCROLLING TEXT
========================================================= */

.box-header,
.box-footer {
    overflow: hidden;
    white-space: nowrap;
}

.scroll-track {
    display: inline-flex;
    animation: scroll-left 25s linear infinite;
}

.scroll-track span {
    flex: none;
    padding-right: 0;
}

.scroll-reverse {
    animation-name: scroll-right;
}

@keyframes scroll-left {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

@keyframes scroll-right {
    from { transform: translateX(-50%); }
    to   { transform: translateX(0); }
}

/* pause on hover so people can actually read it */
.box-header:hover .scroll-track,
.box-footer:hover .scroll-track {
    animation-play-state: paused;
}

@media (max-width: 640px) {

    body { padding: 16px 8px; }

    .box {
        width: 100%;
        border-width: 3px;
    }

    .box::before,
    .box::after {
        width: 9px;
        top: 40px;
        bottom: 34px;
    }

    .box::before { left: 6px; }
    .box::after  { right: 6px; }

    .box-inner { padding: 20px 22px 24px; }

    .box-inner h1 { font-size: 20px; }

    .box-header { font-size: 8px; padding: 6px 0; }
}

/* =========================================================
   CONTENT AREA — sits inside the pipe rails
========================================================= */

.box-inner {
    padding: 26px 34px 30px;
}

.box-inner h1 {
    margin: 0 0 16px;
    font-family: "Silkscreen", monospace;
    font-size: 26px;
    line-height: 1.3;
    color: #fff0f4;
    text-shadow: 3px 3px 0 rgba(45, 6, 18, 0.9);
}

.box-inner p {
    max-width: 68ch;
    margin: 0 0 16px;
}

.box-inner code {
    padding: 1px 5px;
    background: rgba(45, 6, 18, 0.6);
    color: #ffc2d1;
    font-family: "IBM Plex Mono", monospace;
    font-size: 13px;
}

/* =========================================================
   LAYOUT: sidebar + content grid
========================================================= */

.layout {
    display: grid;
    grid-template-columns: 165px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.sidebar {
    display: grid;
    gap: 14px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

/* size modifiers — put these on any .panel */
.span-2 { grid-column: span 2; }
.tall   { min-height: 260px; }


/* =========================================================
   PANELS
========================================================= */

.panel {
    background: rgba(45, 6, 18, 0.45);
    border: 2px ridge rgba(217, 83, 111, 0.8);
    box-shadow: 3px 3px 0 rgba(20, 4, 10, 0.5);
}

.panel-bar {
    padding: 4px 9px;
    background: rgba(58, 10, 24, 0.75);
    border-bottom: 1px dashed rgba(255, 190, 205, 0.45);
    color: #ffd5e0;
    font-family: "Silkscreen", monospace;
    font-size: 8px;
    letter-spacing: 1px;
}

.panel-body {
    padding: 14px;
}

.panel-tight {
    padding: 10px;
    text-align: center;
}

.panel-body p {
    max-width: none;
    margin: 0 0 10px;
    font-size: 15px;
}

.panel-body p:last-child { margin-bottom: 0; }

.panel-body h1 {
    margin: 0 0 10px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-style: italic;
    font-weight: 700;
    font-size: 30px;
    line-height: 1.35;
    letter-spacing: -0.5px;
    color: #f2ecff;
    text-shadow: 2px 2px 0 rgba(20, 6, 32, 0.9);
}

.typed {
    border-right: 3px solid #63d8e4;
    padding-right: 2px;
    animation: caret 0.75s step-end infinite;
}

.typed.done {
    animation: none;
    border-right-color: transparent;
}

@keyframes caret {
    0%, 100% { border-right-color: #63d8e4; }
    50%      { border-right-color: transparent; }
}

.sparkles {
    display: inline-block;
    font-style: normal;
    color: #ffa8d8;
    opacity: 0;
    transition: opacity 0.7s ease-out;
}

.sparkles.show { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
    .typed {
        animation: none;
        border-right-color: transparent;
    }
    .sparkles { opacity: 1; }
}


/* =========================================================
   SIDEBAR NAV
========================================================= */

.panel-nav .panel-body {
    display: grid;
    gap: 5px;
    padding: 9px;
}

.panel-nav a {
    padding: 5px 9px;
    background: rgba(122, 22, 46, 0.6);
    border: 2px outset rgba(217, 83, 111, 0.7);
    color: #ffe0e9;
    text-decoration: none;
    font-family: "Silkscreen", monospace;
    font-size: 8px;
    letter-spacing: 0.5px;
}

.panel-nav a:hover {
    background: #d9536f;
    border-style: inset;
    color: #2d0612;
}

.panel-nav a.active {
    background: #ffc2d1;
    border-style: inset;
    color: #2d0612;
}

.panel-nav a:focus-visible {
    outline: 2px dashed #ffc2d1;
    outline-offset: 2px;
}


/* =========================================================
   SIDEBAR STATUS
========================================================= */

.mood {
    margin: 0;
    font-family: "IBM Plex Mono", monospace;
    font-size: 15px;
    color: #fff0f4;
}

.mood-label {
    margin: 4px 0 0;
    color: rgba(255, 190, 205, 0.75);
    font-family: "Silkscreen", monospace;
    font-size: 7px;
}


/* =========================================================
   LAYOUT MOBILE
========================================================= */

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 640px) {

    body { padding: 16px 8px; }

    .box {
        width: 100%;
        border-width: 3px;
    }

    .box::before,
    .box::after {
        width: 9px;
        top: 40px;
        bottom: 34px;
    }

    .box::before { left: 6px; }
    .box::after  { right: 6px; }

    .box-inner { padding: 20px 22px 24px; }

    .panel-body h1 { font-size: 22px; }

    .box-header { font-size: 8px; padding: 6px 0; }
}