@font-face {
    font-family: "Acki Preschool";
    src: url("/fonts/AckiPreschool.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Rock Salt Regular";
    src: url("/fonts/RockSalt-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --coral: #ff6b6b;
    --sunny: #f5a800;
    --leaf: #7cc242;
    --sky: #4cb5f5;
    --grape: #a06cd5;
    --text: #333333;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    background: #fdfef5;
    font-family: Charter, "Bitstream Charter", "Sitka Text", Cambria, serif;
    color: var(--text);
    line-height: 1.7;
}

.this-is-the-size-of-my-page {
    width: 100%;
    max-width: 800px;
    margin: 40px auto;
}

.amp {
    font-family: "Rock Salt Regular", cursive;
    font-size: 30px;
}

h1 {
    font-size: 90px;
    font-family: "Acki Preschool", "Patrick Hand", "Comic Sans MS", cursive;
    text-align: center;
    line-height: 1;
    margin: 0 0 20px;
}

.rainbow span:nth-child(5n + 1) {
    color: var(--coral);
}

.rainbow span:nth-child(5n + 2) {
    color: var(--sunny);
}

.rainbow span:nth-child(5n + 3) {
    color: var(--leaf);
}

.rainbow span:nth-child(5n + 4) {
    color: var(--sky);
}

.rainbow span:nth-child(5n + 5) {
    color: var(--grape);
}

h2 {
    color: var(--coral);
    transform: rotate(-2deg);
    display: inline-block;
    font-family: "Acki Preschool", "Patrick Hand", "Comic Sans MS", cursive;
    font-size: 30px;
    line-height: 1;
    letter-spacing: 4px;
    -webkit-text-stroke: 1px currentColor;
}

h2 {
  clear: both;
}

h2.sunny {
    color: var(--sunny);
    transform: rotate(1deg);
}

h2.leaf {
    color: var(--leaf);
    transform: rotate(1.5deg);
}

h2.sky {
    color: var(--sky);
    transform: rotate(-1deg);
}

h2.grape {
    color: var(--grape);
    transform: rotate(-1.5deg);
}

nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 10px;
    margin: 0;
}

nav a {
    font-family: "Acki Preschool", "Patrick Hand", cursive;
    font-size: 21px;
    color: var(--grape);
    text-decoration: none;
    padding: 2px 13px;
    letter-spacing: 3px;
    -webkit-text-stroke: 1px currentColor;
}

nav a:hover {
    color: var(--sky);
}

#scroll-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: var(--leaf);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.2s;
}

#scroll-top.show {
    opacity: 1;
    pointer-events: auto;
}

#scroll-top:hover {
    transform: translateY(-3px);
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px 24px;
    padding: 20px 0;
}

.polaroid {
    position: relative;
    width: 200px;
    margin: 0;
    padding: 12px 12px 8px;
    background: #fff;
    box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;
    transform: rotate(-3deg);
    transition: transform 0.25s, box-shadow 0.25s;
}

.polaroid img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.polaroid figcaption {
    font-family: "Courier New", Courier, monospace;
    font-size: 14px;
    line-height: 1.3;
    text-align: center;
    color: var(--text);
    padding: 12px 4px 6px;
}

.polaroid:nth-child(even) {
    transform: rotate(2.5deg);
}

.polaroid:nth-child(3n) {
    transform: rotate(-1.5deg);
}

.polaroid:nth-child(5n) {
    transform: rotate(4deg);
}

.polaroid:hover {
    transform: rotate(0) scale(1.05);
    box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;
    z-index: 2;
}

.polaroid::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 50%;
    width: 80px;
    height: 30px;
    background: rgba(255, 183, 3, 0.55);
    transform: translateX(-50%) rotate(-4deg);
}

.polaroid:nth-child(even)::before {
    background: rgba(76, 181, 245, 0.5);
}

.polaroid img {
    cursor: zoom-in;
}

.photo-right {
  float: right; 
  width: 200px;
  max-width: 40%; 
  box-sizing: border-box; 
  border: 8px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  margin: 90px 0 12px 16px;
  height: auto;
}

#lightbox {
    border: none;
    background: transparent;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 1rem;
}

#lightbox[open] {
    display: flex;
    align-items: center;
    justify-content: center;
}

#lightbox::backdrop {
    background: rgba(0, 0, 0, 0.85);
}

#lightbox figure {
    margin: 0;
    text-align: center;
}

#lightbox img {
    max-width: 100%;
    max-height: 80vh;
    background: #fff;
    padding: 12px;
}

#lightbox figcaption {
    color: #fff;
    font-family: "Courier New", monospace;
    margin-top: 0.75rem;
}

#lightbox-close {
    position: fixed;
    top: 1rem;
    right: 1.25rem;
    font-size: 2rem;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

blockquote {
    position: relative;
    margin: 2.5rem auto;
    padding: 1.5rem 1.5rem 1rem;
    max-width: 32rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;
    transform: rotate(-1deg);
    font-family: "Acki Preschool", "Patrick Hand", "Comic Sans MS", cursive;
    font-size: 1.7rem;
    line-height: 1.25;
    text-align: center;
    color: var(--coral);
    letter-spacing: 3px;
    -webkit-text-stroke: 1px currentColor;
}

blockquote::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 50%;
    width: 80px;
    height: 30px;
    background: rgba(160, 108, 213, 0.45);
    transform: translateX(-50%) rotate(3deg);
}

blockquote cite {
    display: block;
    margin-top: 0.75rem;
    font-family: "Courier New", Courier, monospace;
    font-size: 14px;
    font-style: normal;
    -webkit-text-stroke: 0;
    color: var(--text);
}

blockquote cite::before {
    content: "— ";
}

@media (max-width: 600px) {
    body {
        padding: 15px;
    }

    .this-is-the-size-of-my-page {
        margin: 25px auto;
    }

    h1 {
        font-size: clamp(42px, 12vw, 70px);
        letter-spacing: 1px;
    }

    .amp {
        font-size: 20px;
    }

    h2 {
        font-size: 25px;
        letter-spacing: 2px;
    }

    nav a {
        font-size: 19px;
        letter-spacing: 2px;
        padding: 2px 8px;
    }

    .gallery {
        gap: 24px 16px;
    }

    .polaroid {
        width: min(200px, 42vw);
    }

    blockquote {
        font-size: 1.4rem;
        letter-spacing: 2px;
    }
}
