@import url("https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@400;500;600;700&display=swap");

:root {
    color-scheme: light;
    --ink: #593b2b;
    --rose: #a05859;
    --paper: #f3e3ca;
    --edge: #826044;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: #403f2c;
}

body {
    margin: 0;
    min-height: 100svh;
    display: grid;
    place-items: center;
    background: radial-gradient(ellipse at center, #bca58a, #454735);
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
}

a {
    color: inherit;
    text-underline-offset: 4px;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid #814847;
    outline-offset: 5px;
}

.skip-link {
    position: fixed;
    z-index: 30;
    left: 16px;
    top: 12px;
    transform: translateY(-180%);
    background: var(--paper);
    padding: 12px;
}

.skip-link:focus {
    transform: none;
}

/* The illustrated garden */

.scene {
    width: min(100%, 150svh, 1800px);
    aspect-ratio: 3 / 2;
    position: relative;
    container-type: inline-size;
    isolation: isolate;
    background: url("background.jpg") center / 100% 100% no-repeat;
    box-shadow: 0 0 70px #171f1c60;
    overflow: hidden;
}

/* Sign and navigation */

.site-header {
    position: absolute;
    top: 7.8%;
    left: 34%;
    width: 30.5%;
    text-align: center;
    z-index: 4;
}

.wordmark {
    display: block;
    padding-left: 0.14em;
    font-family: "Courier New", monospace;
    font-size: 4.5cqw;
    line-height: 1;
    letter-spacing: 0.14em;
    font-weight: 700;
    text-decoration: none;
    text-shadow: 2px 2px #e6cab0;
}

.site-header p {
    font-size: 1.15cqw;
    letter-spacing: 0.12em;
    margin: 0.6cqw 0 0;
}

nav {
    position: absolute;
    z-index: 5;
    top: 21.15%;
    left: 27.2%;
    width: 43%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8cqw;
    height: 4.55%;
}

nav a {
    display: grid;
    place-items: center;
    font-family: "Courier New", monospace;
    font-weight: 700;
    font-size: 1.25cqw;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s, transform 0.15s;
}

nav a:hover {
    color: #872f4a;
    transform: translateY(-2px);
}

nav a[aria-current] {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.4em;
}

/* Main parchment */

main {
    position: absolute;
    z-index: 3;
    left: 24.5%;
    top: 32.5%;
    width: 50.5%;
    height: 41%;
    animation: welcome-in 700ms ease-out both;
}

h1,
h2 {
    font-family: "Courier New", monospace;
    font-weight: 700;
    letter-spacing: -0.035em;
    text-align: center;
}

h1 {
    font-size: 2.05cqw;
    line-height: 1.25;
    margin: 0;
    white-space: nowrap;
}

h2 {
    font-size: 1.85cqw;
    line-height: 1.25;
    margin: 0;
}

.divider {
    text-align: center;
    color: #b77570;
    font-size: 1.65cqw;
    margin: 0.6cqw 0 1.8cqw;
    letter-spacing: 0.55em;
    line-height: 1;
}

/* Your original character picture */

.home-content {
    display: grid;
    grid-template-columns: 40% 1fr;
    gap: 4.5%;
    align-items: center;
}

.portrait {
    margin: 0;
    border: 3px double #826044;
    padding: 0.65cqw;
    background: #e9d0b7;
    box-shadow:
            4px 4px 0 #946c4c30,
            -4px -4px 0 #fff2da80;
    position: relative;
}

.portrait::before,
.portrait::after {
    content: "✿";
    position: absolute;
    font-size: 1.3cqw;
    color: #aa6a61;
    top: -1cqw;
    background: var(--paper);
}

.portrait::before {
    left: -0.5cqw;
}

.portrait::after {
    right: -0.5cqw;
}

.portrait img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
}

figcaption {
    font-size: 0.83cqw;
    text-align: center;
    padding-top: 0.6cqw;
    font-style: italic;
}

/* About me */

.about {
    padding: 1.2cqw 1.4cqw 0.7cqw;
    text-align: center;
    border: 3px double #987052;
    outline: 1px solid #ba9775;
    outline-offset: 4px;
    background: #ffefd529;
    position: relative;
}

.about p {
    font-size: 1.35cqw;
    line-height: 1.5;
    margin: 1.25cqw 0;
    letter-spacing: 0.035em;
}

.small-flower {
    display: block;
    color: #b77570;
    font-size: 1.2cqw;
    margin-top: 0.7cqw;
}

.heart {
    color: #aa6965;
    font-size: 1.7cqw;
}

/* Web designs */

.design-card {
    display: grid;
    grid-template-columns: 46% 1fr;
    gap: 5%;
    align-items: center;
    margin: 2.4cqw 0 0;
}

.project-preview {
    display: block;
    border: 3px double var(--edge);
    padding: 5px;
    transition: transform 0.2s;
}

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

.project-preview img {
    display: block;
    width: 100%;
    height: auto;
}

.design-card h2 {
    text-align: left;
    font-size: 1.7cqw;
    margin: 0.7cqw 0;
}

.design-card p,
.text-link {
    font-size: 1.22cqw;
    line-height: 1.65;
}

.eyebrow {
    font-family: "Courier New", monospace;
    font-size: 0.9cqw;
    letter-spacing: 0.08em;
    color: var(--rose);
}

.signoff {
    font-size: 1.03cqw;
    text-align: center;
    font-style: italic;
    color: #835744;
    margin: 2cqw 0 0;
}

/* Credits */

.credit-list {
    margin: 1.2cqw 0 0;
    padding: 0 1.5cqw;
    font-size: 1.12cqw;
    line-height: 1.5;
}

.credit-list > div {
    display: grid;
    grid-template-columns: 32% 1fr;
    gap: 4%;
    padding: 1cqw 0;
    border-bottom: 1px solid #bb947654;
}

.credit-list dt {
    font-weight: bold;
}

.credit-list dd {
    margin: 0;
}

/* Animated garden layers */

.garden {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.cat {
    position: absolute;
    width: 9%;
    aspect-ratio: 1;
    background-image: url("cats.jpg.png");
    background-size: 300% 200%;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    filter: drop-shadow(0 2px 0 #51332126);
}

.cat-porch {
    left: 9%;
    top: 44%;
    width: 9.5%;
}

.cat-roof {
    left: 77%;
    top: 0;
    width: 6.5%;
}

.cat-sleep {
    left: 66.5%;
    top: 37.8%;
    width: 8.5%;
}

.cat-moss {
    left: 3%;
    top: 79%;
    width: 11%;
}

.cat-path {
    left: 37%;
    top: 80.5%;
    width: 8.5%;
}

.cat-lantern {
    left: 88%;
    top: 57%;
    width: 7%;
}

.petal {
    position: absolute;
    top: -6%;
    left: var(--x);
    width: clamp(5px, 0.65cqw, 12px);
    height: clamp(5px, 0.6cqw, 11px);
    background: #eeb5b3;
    box-shadow: 2px 0 #e4a2a3, 0 2px #f7d0c7;
    clip-path: polygon(
            25% 0, 75% 0, 75% 25%, 100% 25%,
            100% 75%, 75% 75%, 75% 100%, 25% 100%,
            25% 75%, 0 75%, 0 25%, 25% 25%
    );
    animation: petal-fall var(--duration) linear var(--delay) infinite;
    opacity: 0.8;
}

.firefly {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #ffe1a6;
    box-shadow: 0 0 5px 2px #ffde9477;
    left: var(--x);
    top: var(--y);
    animation: firefly 5s ease-in-out var(--delay) infinite;
}

.pond {
    position: absolute;
    left: 58%;
    top: 86%;
    width: 29%;
    height: 14%;
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0 100%);
}

.ripple {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 2cqw;
    height: 0.45cqw;
    border-top: 2px solid #d5ddc58c;
    border-bottom: 1px solid #c3d4bc66;
    animation: ripple 5s steps(12) var(--delay) infinite;
}

.lantern-glow {
    position: absolute;
    left: 18.4%;
    top: 26.3%;
    width: 2.7%;
    height: 4.8%;
    background: #ffd08a25;
    box-shadow: 0 0 1.8cqw #ffce733d;
    animation: lantern 4s steps(5) infinite;
}

.water-stream {
    position: absolute;
    left: 6.1%;
    top: 66.2%;
    width: 0.4%;
    height: 6.1%;
    background: repeating-linear-gradient(
            180deg,
            #e2efdcaa 0 3px,
            #93bab888 3px 7px,
            transparent 7px 10px
    );
    animation: flow 0.8s linear infinite;
    clip-path: polygon(0 0, 65% 0, 100% 100%, 30% 100%);
}

.leaf-sprig {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 2%;
    height: 3%;
    transform-origin: 50% 0;
    animation: leaves 5s steps(14) var(--delay) infinite alternate;
    color: #71804b;
    filter: drop-shadow(1px 2px #3f492d66);
}

.motion-toggle {
    position: fixed;
    z-index: 20;
    bottom: 12px;
    right: 14px;
    border: 1px solid #8c694b;
    background: #f3e4ceec;
    color: #5a3b2b;
    padding: 9px 13px;
    box-shadow: 2px 2px 0 #5a3b2b40;
    font: 12px "Courier New", monospace;
    cursor: pointer;
}

.motion-paused .garden * {
    animation-play-state: paused !important;
}

/* Movement */

@keyframes welcome-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes petal-fall {
    0% {
        transform: translate(0, -20px) rotate(0);
    }
    35% {
        transform: translate(3cqw, 28cqw) rotate(110deg);
    }
    70% {
        transform: translate(-1cqw, 55cqw) rotate(220deg);
    }
    100% {
        transform: translate(4cqw, 76cqw) rotate(310deg);
    }
}

@keyframes firefly {
    0%, 100% {
        opacity: 0.1;
        transform: translate(0, 0);
    }
    50% {
        opacity: 0.9;
        transform: translate(3px, -9px);
    }
}

@keyframes ripple {
    0% {
        transform: scaleX(0.3);
        opacity: 0;
    }
    25% {
        opacity: 0.6;
    }
    100% {
        transform: scaleX(3) translateX(9px);
        opacity: 0;
    }
}

@keyframes lantern {
    0%, 100% {
        opacity: 0.45;
    }
    50% {
        opacity: 1;
    }
}

@keyframes flow {
    to {
        background-position-y: 20px;
    }
}

@keyframes leaves {
    from {
        transform: rotate(-5deg);
    }
    to {
        transform: rotate(6deg);
    }
}

@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
    .portrait {
        animation: welcome-in 0.9s 0.2s both;
    }

    .about {
        animation: welcome-in 0.9s 0.35s both;
    }
}

/* Phone and tablet layout */

@media (max-width: 900px) {
    body {
        display: block;
        background: #d9baa2;
    }

    .scene {
        width: 100%;
        min-height: 100svh;
        aspect-ratio: auto;
        padding: 25px 18px 115px;
        background-size: auto 820px;
        background-position: center top;
        background-color: #758059;
        overflow: hidden;
    }

    .scene::after {
        content: "";
        position: absolute;
        inset: 600px 0 0;
        z-index: -1;
        background: linear-gradient(transparent, #6c7753 190px);
    }

    .site-header {
        position: relative;
        top: auto;
        left: auto;
        width: max-content;
        max-width: 100%;
        margin: 0 auto;
        padding: 12px 28px;
        background: #f3e3ca;
        border: 3px double #826044;
        box-shadow: 4px 4px #4c302a70;
    }

    .wordmark {
        font-size: 44px;
    }

    .site-header p {
        font-size: 11px;
        margin: 6px 0 0;
        letter-spacing: 0.05em;
    }

    nav {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        max-width: 550px;
        margin: 22px auto;
        gap: 10px;
        height: auto;
    }

    nav a {
        font-size: 13px;
        min-height: 45px;
        background: #f3e3ca;
        border: 3px double #826044;
        padding: 9px 4px;
        box-shadow: 3px 3px #4c302a70;
    }

    nav a[aria-current] {
        background: #e5aaa5;
    }

    main {
        position: relative;
        left: auto;
        top: auto;
        width: 100%;
        max-width: 580px;
        height: auto;
        margin: auto;
        padding: 25px 22px 30px;
        background: #f4e5ce;
        border: 4px double #826044;
        box-shadow: 5px 5px #553e2b70;
    }

    h1 {
        font-size: clamp(19px, 4.5vw, 29px);
        white-space: normal;
    }

    h2 {
        font-size: 25px;
    }

    .divider {
        font-size: 22px;
        margin: 12px 0 25px;
    }

    .home-content {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .portrait {
        width: min(100%, 280px);
        justify-self: center;
        padding: 8px;
    }

    .portrait::before,
    .portrait::after {
        font-size: 21px;
        top: -14px;
    }

    .portrait::before {
        left: -7px;
    }

    .portrait::after {
        right: -7px;
    }

    figcaption {
        font-size: 12px;
        padding: 8px 0 2px;
    }

    .about {
        padding: 25px 12px 15px;
    }

    .about p {
        font-size: 17px;
        line-height: 1.65;
        margin: 22px 0;
        letter-spacing: 0;
    }

    .small-flower {
        font-size: 20px;
        margin-top: 9px;
    }

    .heart {
        font-size: 25px;
    }

    .design-card {
        grid-template-columns: 1fr;
        gap: 24px;
        margin: 0;
    }

    .design-card h2 {
        font-size: 23px;
    }

    .design-card p,
    .text-link {
        font-size: 17px;
    }

    .eyebrow {
        font-size: 12px;
    }

    .signoff {
        font-size: 14px;
        line-height: 1.6;
        margin-top: 28px;
    }

    .credit-list {
        font-size: 16px;
        padding: 0;
        margin: 0;
    }

    .credit-list > div {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 15px 0;
    }

    .garden {
        z-index: 1;
    }

    .petal {
        animation-name: petal-fall-mobile;
    }

    .cat {
        width: 90px;
        top: auto;
        bottom: 10px;
    }

    .cat-roof {
        left: 1%;
        top: 2px;
        width: 65px;
        bottom: auto;
    }

    .cat-path {
        left: 40%;
    }

    .cat-lantern {
        left: auto;
        right: 3%;
    }

    .cat-moss {
        left: 4%;
    }

    .cat-sleep,
    .cat-porch {
        display: none;
    }

    .pond,
    .water-stream,
    .lantern-glow {
        display: none;
    }

    .leaf-sprig {
        width: 35px;
        height: 50px;
    }

    .motion-toggle {
        bottom: 8px;
        right: 8px;
        font-size: 11px;
        padding: 8px;
    }
}

@keyframes petal-fall-mobile {
    0% {
        transform: translate(0, -20px) rotate(0);
    }
    50% {
        transform: translate(22px, 600px) rotate(160deg);
    }
    100% {
        transform: translate(-10px, 1300px) rotate(320deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }

    .petal {
        display: none;
    }
}
/* Pixel lettering throughout the website */

body,
button,
a,
h1,
h2,
p,
span,
dt,
dd,
figcaption,
.wordmark,
.eyebrow,
.motion-toggle {
    font-family: "Pixelify Sans", monospace;
    letter-spacing: 0;
}

.wordmark {
    font-weight: 700;
    letter-spacing: 0.08em;
}

h1,
h2,
nav a {
    font-weight: 600;
}

.about p,
.design-card p,
.credit-list {
    line-height: 1.5;
}

figcaption,
.signoff {
    font-style: normal;
}
nav a {
    font-family: "Pixelify Sans", monospace;
}