body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f8f8;
    padding: 40px;
    color: #444;
}

body.homepage {
    text-align: center;
}

h1 {
    color: #333;
    font-size: 36px;
    margin-bottom: 20px;
}

p {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 30px;
}

ul {
    list-style-type: none;
    padding: 0;
}

li {
    margin-bottom: 15px;
}

a {
    color: #666;
    text-decoration: none;
    border-bottom: 2px solid #ddd;
    transition: border-color 0.3s;
}

a:hover {
    color: #222;
    border-color: #666;
}

/* Other creations footer */
.other-creations {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    z-index: 1000;
}

/* WriteShite link */
.writeshite-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    border: none;
    font-size: 1.2em;
    transition: transform 0.2s ease;
}

.writeshite-logo-link:hover {
    transform: scale(1.1);
    border: none;
}

/* Hit counter & increment badges (footer bottom-left) */
.hit-counter {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 12px;
    align-items: center;
    z-index: 1000;
}

.hit-counter .hit-counter-badge {
    height: 20px;
    display: block;
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.hit-counter .hit-counter-badge:hover {
    opacity: 1;
    transform: scale(1.05);
}

.hit-counter iframe {
    border: none;
    width: 88px;
    height: 31px;
    opacity: 0.85;
    display: block;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.hit-counter iframe:hover {
    opacity: 1;
    transform: scale(1.05);
}

.writeshite-text {
    font-family: 'Dancing Script', Georgia, serif;
    font-weight: bold;
    color: #333;
}

.writeshite-poop {
    font-size: 1.1em;
    margin-left: 2px;
    display: inline-block;
}

.writeshite-poop:hover {
    animation: poop-spin .65s ease infinite;
}

@keyframes poop-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(1turn); }
}

/* PTATOTP mini glitch logo */
.ptatotp-link {
    text-decoration: none;
    border: none;
}

.ptatotp-link:hover {
    border: none;
}

.ptatotp-mini {
    --ptatotp-bg: #f8f8f8;
    --ptatotp-text: #333;
    --ptatotp-glitch-1: #ff00ff;
    --ptatotp-glitch-2: #00ffff;
    --ptatotp-accent: #ff6600;

    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 0.9em;
    color: var(--ptatotp-text);
    position: relative;
    display: inline-block;
    animation: ptatotp-shake 3s infinite linear alternate-reverse;
    letter-spacing: 0.02em;
    cursor: pointer;
}

.ptatotp-mini::before,
.ptatotp-mini::after {
    content: "PTATOTP";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--ptatotp-bg);
    overflow: hidden;
    color: var(--ptatotp-text);
}

.ptatotp-mini::before {
    left: -1px;
    text-shadow: -1px 0 var(--ptatotp-glitch-1);
    animation: ptatotp-anim-1 2s infinite linear alternate-reverse;
}

.ptatotp-mini::after {
    left: 1px;
    text-shadow: -1px 0 var(--ptatotp-glitch-2);
    animation: ptatotp-anim-2 3s infinite linear alternate-reverse;
}

.ptatotp-mini span {
    display: inline-block;
    position: relative;
    z-index: 2;
    transition: transform 0.1s ease-out, color 0.1s ease-out;
}

.ptatotp-mini:hover span {
    animation: ptatotp-letter-glitch 0.15s linear infinite;
}

.ptatotp-mini:hover {
    text-shadow: 2px 2px 0 var(--ptatotp-glitch-2), -2px -2px 0 var(--ptatotp-glitch-1);
}

@keyframes ptatotp-shake {
    0% { transform: translate(0, 0); }
    25% { transform: translate(0.5px, -0.5px); }
    50% { transform: translate(-0.5px, 0.5px); }
    75% { transform: translate(0.5px, 0.5px); }
    100% { transform: translate(-0.5px, -0.5px); }
}

@keyframes ptatotp-anim-1 {
    0% { clip-path: inset(40% 0 61% 0); }
    20% { clip-path: inset(10% 0 86% 0); }
    40% { clip-path: inset(65% 0 21% 0); }
    60% { clip-path: inset(90% 0 6% 0); }
    80% { clip-path: inset(30% 0 51% 0); }
    100% { clip-path: inset(50% 0 41% 0); }
}

@keyframes ptatotp-anim-2 {
    0% { clip-path: inset(70% 0 11% 0); }
    15% { clip-path: inset(20% 0 76% 0); }
    35% { clip-path: inset(50% 0 31% 0); }
    55% { clip-path: inset(85% 0 11% 0); }
    75% { clip-path: inset(10% 0 91% 0); }
    100% { clip-path: inset(60% 0 21% 0); }
}

@keyframes ptatotp-letter-glitch {
    0% { transform: translate(0,0); color: var(--ptatotp-text); }
    25% { transform: translate(1px, -1px); color: var(--ptatotp-accent); }
    50% { transform: translate(-1px, 1px); color: var(--ptatotp-text); }
    75% { transform: translate(0.5px, 0.5px) skewX(-3deg); color: var(--ptatotp-accent); }
    100% { transform: translate(0,0); color: var(--ptatotp-text); }
}

/* ===== Additions, November 2026. Everything above this comment is the original stylesheet,
   unchanged except for its first line (a font import), now replaced by the @font-face below. ===== */

@font-face {
    font-family: 'Dancing Script';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/dancing-script-700-latin.woff2') format('woff2');
}

:root {
    --page: #f8f8f8;        /* his page */
    --ink: #444;            /* his text, 9.2:1 */
    --head: #333;           /* his h1 */
    --link: #666;           /* his links, 5.4:1 */
    --link-hover: #222;
    --rule: #ddd;           /* his link bar */
    --rule-prose: #909090;  /* link bar inside running text, 3:1 */
    --quiet: #666;          /* his small grey strip text */
    --date: #727272;        /* his poem-date idea, made AA (4.5:1) */
    --faint: #eee;          /* his table and section rules */
    --soda-red: #c00;       /* the soda blog's own red headings, 5.6:1 */
    --measure: 630px;
}

body { overflow-wrap: break-word; padding-bottom: 80px; }
img, video { max-width: 100%; height: auto; }
audio { max-width: 100%; }

/* "Elsewhere" strip, hoisted from his page styles (programming, art, blogs) */
.external-link { font-size: 0.9em; margin-bottom: 2em; color: var(--quiet); }
.external-link a { display: inline-block; margin: 0 1.5em 0.4em 0; }

/* Gallery, hoisted from ceramics.html */
.gallery { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; margin: 2em 0; }
.gallery img { max-width: 300px; height: auto; border: none; }
.gallery figure { margin: 0; max-width: 300px; }
.gallery img.phone { max-width: 240px; }
main.prose .gallery { justify-content: flex-start; }

/* Measure: running text on left-aligned pages */
main.prose p, main.prose blockquote, main.prose figure, main.prose ul, main.prose ol { max-width: var(--measure); }

/* Links inside running text carry a visible bar; nav and list links keep his pale one */
main.prose p a, blockquote a, .note a { border-bottom-color: var(--rule-prose); }
main.prose p a:hover, blockquote a:hover, .note a:hover { border-bottom-color: var(--link); }

/* Note line: a short grey line of ours under an entry */
.note { font-size: 16px; line-height: 1.5; color: var(--quiet); margin: 0 0 20px; }
.date { font-size: 14px; font-style: italic; color: var(--date); white-space: nowrap; }

/* His words, quoted from where he published them */
blockquote.his { margin: 0 0 30px; padding: 0 0 0 16px; border-left: 2px solid var(--rule); }
blockquote.his p { margin-bottom: 16px; }
blockquote.his footer, figcaption { font-size: 16px; line-height: 1.5; color: var(--quiet); }

/* Figures: raw images, no frame, no radius, no shadow */
figure { margin: 0 0 30px; }
figure img, figure video { display: block; }
figcaption { margin-top: 8px; }
.thumb-link { display: block; width: fit-content; border-bottom: none; line-height: 0; }
.thumb-link img { max-width: 320px; }

/* Click-to-load video frame */
.facade { position: relative; display: block; width: fit-content; border-bottom: none; line-height: 0; }
.facade:hover { border-bottom: none; }
.facade img { display: block; max-width: 100%; }
.facade .play { position: absolute; left: 12px; bottom: 12px; line-height: 1; padding: 6px 12px;
                background: var(--page); color: var(--head); font-size: 16px; }
.facade:hover .play { color: var(--link-hover); background: #fff; }
iframe.yt { display: block; width: 100%; max-width: 640px; aspect-ratio: 16 / 9; border: 0; }

/* Lists of entries: older repositories, the playlist, the soda index */
.entries { list-style: none; padding: 0; }
.entries > li { margin-bottom: 24px; line-height: 1.5; }
.entries p { font-size: 16px; line-height: 1.5; margin: 4px 0 0; }
.entries .thumb-link { margin-top: 8px; }
.entries > li:target { background: var(--faint); outline: 8px solid var(--faint); }

/* Year rows on Me */
ul.years { list-style: none; padding: 0; }
ul.years li { display: grid; grid-template-columns: 4.5em 1fr; gap: 0 12px; margin-bottom: 12px; line-height: 1.5; }
ul.years .yr { color: var(--quiet); font-variant-numeric: tabular-nums; }

.colophon { font-size: 14px; line-height: 1.5; color: var(--quiet); margin-top: 60px; }
h1.as-h3 { font-size: 1.17em; color: inherit; margin: 1em 0; }

/* Utilities */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
                   overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 1001; background: var(--page); padding: 8px 12px; }
.skip:focus { left: 16px; }

/* Add #who to any address to outline the sentences written by the agents */
#who:target ~ main [data-by="agent"] { outline: 1px dashed var(--link); outline-offset: 3px; }

/* Focus mirrors his hover */
a:focus-visible { color: var(--link-hover); border-bottom-color: var(--link); outline: 2px solid var(--link); outline-offset: 3px; }

@media (max-width: 600px) {
    body { padding: 28px 16px 80px; }
    h1 { font-size: 28px; }
}
@media (max-width: 700px) {
    .other-creations { position: static; justify-content: center; margin-top: 40px; }
}
@media (pointer: coarse) {
    nav li, .elsewhere li { margin-bottom: 24px; }
    nav li a, .elsewhere a, .games-list > li > a, .external-link a, .nav-line a, .entries > li > a { position: relative; }
    nav li a::after, .elsewhere a::after, .games-list > li > a::after, .external-link a::after,
    .nav-line a::after, .entries > li > a::after { content: ""; position: absolute; inset: -10px -6px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
