:root {
    color-scheme: light;
    --green-950: #123b29;
    --green-900: #174c32;
    --green-800: #21613d;
    --green-700: #347b4a;
    --green-500: #78a96c;
    --green-300: #b6d2a4;
    --green-100: #e8f0df;
    --cream: #f5f3df;
    --ink: #193b28;
    --shadow: #0c2e1d;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: clamp(14px, 3vw, 28px) clamp(8px, 2vw, 16px);
    background-color: #315b3c;
    background-image:
        radial-gradient(#50754a 1px, transparent 1px),
        radial-gradient(#244b34 1px, transparent 1px);
    background-position: 0 0, 7px 7px;
    background-size: 14px 14px;
    color: var(--ink);
    font-family: "Courier New", Courier, monospace;
    font-size: 14px;
}

a {
    color: #15522f;
    font-weight: bold;
    text-decoration: underline;
}

a:hover,
a:focus-visible {
    color: #071f13;
    background-color: #d6e8bd;
    outline: 2px solid var(--green-700);
    outline-offset: 2px;
}

.page-shell {
    width: min(100%, 1000px);
    margin: 0 auto;
    padding: 10px;
    border: 3px ridge #a9c48e;
    background: var(--cream);
    box-shadow: 8px 8px 0 var(--shadow);
}

.site-header {
    padding: 12px;
    border: 2px inset #d7e5c7;
    background: var(--green-900);
    color: #f0f3d9;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 4px 12px;
}

.site-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #f0f3d9;
    font-size: clamp(20px, 4vw, 32px);
    font-weight: 900;
    letter-spacing: -1px;
    text-decoration: none;
    text-shadow: 2px 2px #092819;
}

.title-mark {
    display: block;
    width: 48px;
    height: 48px;
    border: 2px outset #c8d8a8;
    border-radius: 50%;
    background: var(--green-500);
    object-fit: cover;
}

.header-decoration {
    color: #c5dba6;
    letter-spacing: 5px;
}

.header-banner {
    position: relative;
    display: grid;
    height: 126px;
    overflow: hidden;
    place-items: center;
    border: 2px dashed #91b17a;
    background: #28613c;
}

.skyline-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    shape-rendering: crispEdges;
}

.skyline-mobile {
    display: none;
}

.banner-label {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #f3f3d9;
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(28px, 5vw, 46px);
    font-weight: 600;
    text-shadow: 2px 2px 0 #123b29, 4px 4px 0 #123b29, 0 0 8px rgba(18, 59, 41, .85);
    white-space: nowrap;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
    padding: 7px;
    border: 2px outset #d1dfbd;
    background: var(--green-300);
}

.main-nav a {
    padding: 8px 12px;
    border: 2px outset #c4d7ab;
    background: var(--green-100);
    color: var(--green-950);
    text-decoration: none;
}

.main-nav a:hover,
.main-nav a:focus-visible {
    border-style: inset;
    background: #d5e7bd;
}

.welcome-bar {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    margin: 10px 0;
    padding: 7px 10px;
    border: 1px solid #6d8d57;
    background: #e1ebca;
    color: var(--green-950);
    font-weight: bold;
}

.pixel-icon {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border: 1px solid var(--green-950);
    background: var(--green-700);
    color: white;
}

.content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 270px;
    align-items: start;
    gap: 12px;
}

.main-column,
.sidebar {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.panel {
    border: 2px ridge #9ab57f;
    background: #fbfaec;
}

.panel-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: var(--green-800);
}

.panel-heading {
    margin: 0;
    padding: 9px 11px;
    background: var(--green-800);
    color: #f3f3d9;
    font-size: 16px;
    text-shadow: 1px 1px #163a25;
}

.panel-heading-row .panel-heading {
    flex: 1;
}

.heading-link {
    padding: 0 10px;
    color: #eef4d9;
    font-size: 12px;
}

.panel-body {
    padding: 12px;
}

.tutorial-3ds h1 {
    margin: 0 0 14px;
    color: var(--green-950);
    font-size: 24px;
}

.tutorial-3ds h2 {
    margin: 24px 0 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #b5c99d;
    color: var(--green-900);
    font-size: 18px;
}

.tutorial-3ds p,
.tutorial-3ds li {
    line-height: 1.6;
}

.tutorial-3ds li + li {
    margin-top: 5px;
}

.intro-body {
    display: grid;
    grid-template-columns: minmax(160px, .9fr) 1fr;
    gap: 14px;
}

.placeholder-image {
    display: grid;
    overflow: hidden;
    place-items: center;
    border: 2px dashed #71945f;
    background:
        repeating-linear-gradient(45deg, #e8efda 0 10px, #dce8ca 10px 20px);
    color: #55734b;
    font-size: 11px;
    text-align: center;
}

.header-banner > img,
.placeholder-image > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.intro-image {
    height: 150px;
}

.placeholder-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 11px;
    padding: 7px 0;
}

.retro-button {
    display: inline-block;
    padding: 8px 11px;
    border: 2px outset #d6e2c1;
    background: var(--green-700);
    color: #fff;
    text-decoration: none;
}

.empty-button {
    min-width: 100px;
    min-height: 34px;
}

.empty-link {
    display: block;
    min-height: 18px;
}

.text-space {
    min-height: 36px;
}

.community-copy {
    min-height: 54px;
}

.empty-heading {
    min-height: 17px;
}

.retro-button:hover,
.retro-button:focus-visible {
    border-style: inset;
    background: var(--green-900);
    color: #fff;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.content-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 8px;
    border: 1px solid #bdcdaa;
    background: #f5f6e8;
}

.meetup-poster {
    display: grid;
    box-sizing: border-box;
    width: 100%;
    aspect-ratio: 3 / 1;
    place-items: center;
    margin: 0 auto 12px;
    padding: 8px;
    border: 3px solid;
    background-size: 24px 24px;
    font-family: "Courier New", monospace;
    font-size: clamp(16px, 2.4vw, 21px);
    font-weight: bold;
    line-height: 1.2;
    text-align: center;
    text-shadow: 1px 1px 0 rgba(45, 37, 22, .45);
}

.meetup-poster--orange {
    border-color: #d7bd91;
    background-color: #e4792d;
    background-image: conic-gradient(#d76520 25%, #f08a39 0 50%, #d76520 0 75%, #f08a39 0);
    box-shadow: inset 0 0 0 2px rgba(255, 246, 219, .55);
    color: #fff8e9;
}

.meetup-poster--green {
    border-color: #c3d0a6;
    background-color: #3e7d4d;
    background-image: conic-gradient(#326e42 25%, #4f8d5c 0 50%, #326e42 0 75%, #4f8d5c 0);
    box-shadow: inset 0 0 0 2px rgba(225, 242, 207, .55);
    color: #fff8e9;
}

.content-card .text-space {
    flex: 1;
}

.card-grid .empty-heading:empty,
.card-grid .text-space {
    display: none;
}

.card-grid .content-card p {
    margin: 8px 0 4px;
}

.card-grid .content-card a {
    margin-top: 4px;
}

.drawings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.drawing-frame {
    height: 140px;
}

.drawing-item {
    min-width: 0;
}

.drawing-link {
    display: grid;
    overflow: hidden;
    align-items: center;
    justify-items: center;
    text-decoration: none;
}

.drawing-frame > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.drawing-credit {
    margin: 8px 0 0;
    color: #666;
    font-size: 12px;
}

.drawings-more {
    display: block;
    width: max-content;
    margin: 12px auto 0;
}

.content-card h3,
.event-details h3 {
    margin: 10px 0;
    color: var(--green-950);
    font-size: 14px;
}

.content-card a {
    display: inline-block;
    margin-top: 7px;
    font-size: 12px;
}

.event-list {
    padding-top: 4px;
    padding-bottom: 4px;
}

.event-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.event-item + .event-item {
    border-top: 1px dashed #a9bf91;
}

.event-date {
    display: grid;
    flex: 0 0 52px;
    min-height: 53px;
    align-content: center;
    justify-items: center;
    border: 2px outset #b5c99d;
    background: #e0ebcf;
    color: var(--green-950);
}

.event-date span {
    font-size: 17px;
    font-weight: bold;
}

.event-date strong {
    font-size: 10px;
}

.event-date--green {
    border: 0;
    background: var(--green-700);
    color: #fff;
}

.event-date--green span {
    font-size: 24px;
}

.event-date.event-logo {
    padding: 2px;
    overflow: hidden;
    border: 0;
    background: transparent;
}

.event-date.event-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.event-details {
    flex: 1;
    min-width: 0;
}

.event-details h3 {
    margin: 0;
    min-height: 17px;
}

.event-date-info {
    margin: 6px 0 0;
    color: var(--green-700);
    font-size: 20px;
    font-weight: bold;
    line-height: 1.25;
}

.event-status {
    margin: 6px 0 0;
    color: var(--green-700);
    font-size: 20px;
    font-weight: bold;
    line-height: 1.25;
}

.small-button {
    padding: 6px 8px;
    font-size: 11px;
}

.sidebar-panel .panel-body {
    padding: 10px;
}

.community-image {
    height: 100px;
    margin-bottom: 10px;
}

.full-button {
    display: block;
    margin-top: 12px;
    text-align: center;
}

.link-list {
    margin: 0;
    padding: 11px 12px 11px 30px;
    line-height: 2;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 7px;
    margin-bottom: 10px;
}

.gallery-tile {
    display: block;
    overflow: hidden;
    aspect-ratio: 1;
    border: 2px solid #bdcdaa;
    background: #dfe8d1;
}

.gallery-tile--first:first-child {
    grid-column: 1;
    grid-row: 1;
}

.gallery-tile--second:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
}

.gallery-tile--second:nth-child(3) {
    grid-column: 1;
    grid-row: 2;
}

.gallery-tile--first:nth-child(4) {
    grid-column: 2;
    grid-row: 2;
}

.gallery-tile img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-image {
    height: 70px;
}

.site-footer {
    margin-top: 12px;
    padding: 13px 10px;
    border: 2px inset #91aa77;
    background: var(--green-900);
    color: #edf2d7;
    text-align: center;
}

.outside-mascot {
    display: block;
    width: clamp(180px, 30vw, 300px);
    max-height: 40vh;
    margin: 20px 0 24px 16px;
    object-fit: contain;
    image-rendering: pixelated;
    transform: scaleX(-1);
    filter:
        drop-shadow(2px 0 #b6d2a4)
        drop-shadow(-2px 0 #b6d2a4)
        drop-shadow(0 2px #b6d2a4)
        drop-shadow(0 -2px #b6d2a4)
        drop-shadow(0 0 4px rgba(182, 210, 164, .65));
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.site-footer a {
    color: #edf2d7;
}

.site-footer p {
    margin: 12px 0 0;
    font-size: 12px;
}

.site-footer .footer-copy {
    min-height: 14px;
}

@media (max-width: 800px) {
    .skyline-desktop {
        display: none;
    }

    .skyline-mobile {
        display: block;
    }

    .outside-mascot {
        width: clamp(150px, 36vw, 220px);
    }

    .content-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sidebar-panel:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 460px) {
    .page-shell {
        padding: 6px;
    }

    .site-title {
        gap: 8px;
        font-size: clamp(16px, 5vw, 20px);
    }

    .site-title > span {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .title-mark {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
    }

    .header-decoration {
        display: none;
    }

    .banner-label {
        font-size: clamp(20px, 7vw, 32px);
    }

    .main-nav a {
        flex: 1 1 30%;
        padding: 8px 5px;
        text-align: center;
    }

    .intro-body {
        grid-template-columns: 1fr;
    }

    .intro-image {
        height: 120px;
    }

    .panel-heading-row {
        flex-wrap: wrap;
    }

    .panel-heading-row .panel-heading {
        flex: 1 1 100%;
    }

    .heading-link {
        padding-bottom: 8px;
    }

    .card-grid,
    .sidebar {
        grid-template-columns: 1fr;
    }

    .sidebar-panel:last-child {
        grid-column: auto;
    }

    .drawings-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }

    .drawing-frame {
        height: 100px;
    }

    .event-item {
        gap: 8px;
    }
}

@media (max-width: 360px) {
    .event-item {
        flex-wrap: wrap;
    }

    .event-item .small-button {
        margin-left: 60px;
    }
}
