@import url('color-palette.css');
@import url('img-paths.css');
* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    background-color: var(--cave-top-color);
    color: var(--var-color);
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

a { color: inherit; }

img, video { max-width: 100%; }

header.site-header {
    text-align: center;
    padding: 1.5rem 1rem 0.5rem;
}

header.site-header h1 {
    color: var(--user-color);
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    margin: 0 0 0.3rem;
}

header.site-header p {
    color: var(--function-color);
    margin: 0;
    font-size: 0.95rem;
}

.comment-separator {
    position: relative;
    height: 1px;
    margin: 1.5rem 1.2em;
    background-color: var(--comment-color);
    opacity: 0.5;
}

.comment-separator::before,
.comment-separator::after {
    content: "#";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--comment-color);
    font-family: "JetBrains Mono", "Consolas", "Courier New", monospace;
}

.comment-separator::before { right: calc(100% + 4px); }
.comment-separator::after  { left: calc(100% + 4px); }

.text-box {
    padding: 20px 24px;
    background-color: var(--ui-bg);
    color: var(--comment-color);
    border-radius: 5px;
    line-height: 1.6;
}

main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem 4rem;
}

h2 {
    color: var(--keyword-color);
    font-size: 1.8rem;
    text-align: center;
}
h3 {
    color: var(--control-flow-color);
    font-size: 1.2rem;
    text-align: center;
    width: 100%;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.card {
    display: block;
    max-width: 256px;
    text-decoration: none;
    background-color: var(--ui-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.15s ease;
}

.card:hover { transform: translateY(-3px); }

.card video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    background: #000;
}

.card .card-body {
    padding: 0.9rem 1rem 1.1rem;
}

.card h2 {
    margin: 0 0 0.2rem;
    color: var(--user-color);
    font-size: 1.05rem;
}

.card .tagline {
    margin: 0;
    color: var(--annotation-color);
    font-size: 0.85rem;
}

.back-link {
    display: inline-block;
    margin: 1rem 0 1.5rem;
    color: var(--function-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link:hover { opacity: 0.7; }

.project-header h1 {
    color: var(--user-color);
    font-size: 1.8rem;
    margin: 0 0 0.2rem;
}

.project-header .tagline {
    color: var(--annotation-color);
    font-size: 1rem;
    margin: 0 0 1.2rem;
}

.project-section {
    display: flex;
    align-items: flex-start;    /* align tops of the two boxes */
    gap: 32px;
    margin: 48px 0;
}
.project-section--reversed {
    flex-direction: row-reverse;
}

.project-text-box {
    flex: 1 1 45%;

    /* Stack an optional anchor label above the text card */
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Optional small label above the text card — e.g. a section
   title or anchor target.  Usage:
     <span class="project-text-box__label">Gameplay</span>  */
.project-text-box__label {
    color: var(--annotation-color);
    font-size: 0.9rem;
    letter-spacing: 0.04em;
}

.project-text-box .text-box {
    max-width: 100%;            /* let it fill the flex column */
}

.text-box#proj-description-box {
    margin-bottom: 1.5rem;
}

.video-wrap {
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
}

.video-wrap video {
    width: 100%;
    display: block;
    background: #000;
}

.gallery-label {
    color: var(--annotation-color);
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    display: block;
    margin-bottom: 0.7rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.gallery-grid img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
    cursor: zoom-in;
}

.empty-note {
    color: var(--ui-accent);
    font-size: 0.9rem;
    font-style: italic;
}

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    align-items: center;
    justify-content: center;
    z-index: 50;
    cursor: zoom-out;
}

.lightbox:target { display: flex; }

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 6px;
    cursor: zoom-out;
}

.cave-bg {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 270px;
    background-image: var(--img-background);
    background-color: var(--cave-bottom-color);
    background-repeat: repeat-x;
    background-position: bottom center;
    background-size: auto;
    z-index: -1;
}
.round-gif {
    border-radius: 50%;
    width: 200px;
    height: 200px;
    object-fit: cover;
}
.about-layout {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 20px;
}
.about-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.social-handle {
    color: var(--annotation-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: opacity 0.3s ease;
}
.social-handle:hover {
    opacity: 0.7;
}
.twitch-link {
    color: var(--annotation-p-color);
}

.sticker {
    display: inline-block;
    background-color: var(--annotation-color);
    color: black;
    font-family: "JetBrains Mono", "Consolas", "Courier New", monospace;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 2px 3px 6px var(--ui-accent);
    transform: rotate(-12deg);
    border-radius: 3px;
    position: relative;
    z-index: 10;
    user-select: none;
    white-space: nowrap;
}
.sticker::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    bottom: -2px;
    left: -2px;
    background: inherit;
    border-radius: 3px;
    z-index: -1;
    transform: rotate(2deg);
}