/* Plain type and a page width that still fits a phone. */
:root {
    color-scheme: light;
}

body {
    max-width: 42rem;
    /* Keep the document narrow and just left of the viewport's center. */
    margin: 1.5rem 0 1.5rem max(1.25rem, calc(50vw - 25rem));
    padding: 0 1.25rem;
    background: #faf9f3;
    color: #111;
    font-family: "Times New Roman", Times, serif;
    font-size: 1rem;
    line-height: 1.45;
}

header,
footer {
    text-align: center;
}

h1 {
    margin: 0 0 0.5rem;
    font-size: 1.875rem;
    line-height: 1.2;
}

.name-heading {
    font-size: 0;
}

.name-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    max-width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.name-text {
    display: inline-block;
    font-size: 1.875rem;
    line-height: 1.2;
}

.name-switch #name-image {
    display: block;
    width: auto;
    height: 3rem;
    max-width: 100%;
    object-fit: contain;
}

.name-switch #name-image[hidden],
.name-switch #name-text[hidden] {
    display: none;
}

.name-click-cue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    flex: 0 0 auto;
}

.name-click-arrow {
    display: block;
    width: 33px;
    height: 14px;
}

.name-click-me {
    display: block;
    width: 88px;
    height: 31px;
}

.name-switch:focus-visible {
    outline: 1px dotted currentColor;
    outline-offset: 5px;
}

.name-switch:active {
    opacity: 0.8;
}

header p {
    margin: 0.25rem 0;
}
/* HOME image collection */
.school-gator {
    display: inline-block;
    margin-left: 0.15rem;
    width: 2.25rem;
    height: auto;
    vertical-align: -0.35rem;
    mix-blend-mode: multiply;
}
.BVWC {
    display: inline-block;
    width: 6.9rem;
    height: auto;
    vertical-align: -0.35rem;
    mix-blend-mode: multiply;
}
.PBimagination {
    display: inline-block;
    width: 6.9rem;
    height: auto;
    margin-left: 0.35rem;
    vertical-align: -0.35rem;
    mix-blend-mode: multiply;
}
.GD {
    display: inline-block;
    width: 25rem;
    height: auto;
    vertical-align: -0.35rem;
    mix-blend-mode: multiply;
}
.nav-icon {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    margin-left: 0.35rem;
    object-fit: contain;
    vertical-align: -0.3rem;
}
/*end*/

h2 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    text-transform: uppercase;
}

p {
    margin: 0.75rem 0;
}

hr {
    margin: 1.5rem 0;
    border: 0;
    border-top: 1px solid #b8b8af;
}

nav,
section {
    margin-block: 1.5rem;
}

ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.35rem;
}

a:link {
    color: #0000ee;
}

a:visited {
    color: #551a8b;
}

a {
    text-decoration: underline;
}

a:focus-visible {
    outline: 1px dotted currentColor;
    outline-offset: 3px;
}

/* A short directory, read down each column like an old links page. */
.directory {
    column-count: 2;
    column-gap: 3rem;
}

.directory li {
    break-inside: avoid;
}

/* The project index uses spacing and links instead of cards. */
.project-icons {
    display: inline-block;
    width: 3rem;
    height: 3rem;
    margin-left: 0.2rem;
    object-fit: contain;
    vertical-align: -0.3rem;
}
.play-special {
    margin-left: 0rem;
}
.project-list {
    margin: 1.5rem 0;
    padding: 0;
    list-style: none;
}


.project-entry + .project-entry {
    margin-top: 2.25rem;
}

.project-title {
    margin-bottom: 0.35rem;
    font-size: 1.25rem;
    text-transform: none;
}

.project-entry p {
    margin: 0.5rem 0;
}

.project-tech {
    color: #444;
    font-size: 0.9rem;
}

.project-links {
    margin-top: 0.75rem;
}

.project-links a {
    display: inline-block;
    margin-right: 0.85rem;
    margin-bottom: 0.25rem;
}

.project-links a:last-child {
    margin-right: 0;
}

.CM {
    display: inline-block;
    width: 2.5rem;
    height: 1.25rem;
    vertical-align: -0.3rem;
}
.CM-hand {
    display: inline-block;
    width: 2.5rem;
    height: 1.25rem;
    vertical-align: -0.3rem;
    margin-left: 0.25rem;
}

.other-projects {
    margin-top: 0.5rem;
}

.project-home {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.home-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.home-link img {
    display: block;
    width: 2rem;
    height: 2rem;
}

.pointer-hand-placeholder {
    display: none;
    width: 2rem;
    height: 1.25rem;
}

.pointer-hand {
    --hand-angle: 0deg;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 1.25rem;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.pointer-hand img {
    display: block;
    width: 2rem;
    height: auto;
    transform: rotate(var(--hand-angle));
    transform-origin: center;
}

.pointer-hand:focus-visible {
    outline: 1px dotted currentColor;
    outline-offset: 3px;
}

.project-home.hand-floating .pointer-hand {
    position: fixed;
    top: 1rem;
    left: var(--hand-left);
    z-index: 2;
}

.project-home-bottom.hand-floating .pointer-hand {
    top: auto;
    bottom: 1rem;
}

.project-home.hand-floating .pointer-hand-placeholder {
    display: inline-block;
}

.oldweb-badge-wrap {
    margin: 1.25rem 0;
}

.oldweb-badge {
    display: inline-block;
    width: 4rem;
    height: auto;
}

/* It is fake. The number is plain text in index.html. */
.visitor-counter {
    margin: 1.75rem 0;
    text-align: center;
    font-size: 0.875rem;
}

.visitor-counter p {
    margin: 0.2rem 0;
}

.visitor-counter samp {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    border: 2px inset #888;
    background: #222;
    color: #f5f5ed;
    font-family: "Courier New", Courier, monospace;
    font-size: 1rem;
    letter-spacing: 0.15em;
}

footer {
    color: #444;
    font-size: 0.8125rem;
}

footer p {
    margin: 0.25rem 0;
}

.footer-eyes {
    display: block;
    width: min(350px, 100%);
    height: auto;
    margin: 1.5rem auto;
}

/* Screenshot previews for project headings and featured project links. */
.hover-container {
  position: relative; /* Keeps the absolute image positioned near the title */
  display: inline-block;
}

.hover-image {
  display: none; /* Hide the screenshot by default */
  position: absolute;
  top: 100%; /* Places the screenshot directly below the h2 */
  left: 0;
  width: 300px; /* Adjust the preview size as needed */
  border: 1px solid #ccc;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

/* Show the screenshot on hover or keyboard focus. */
.hover-container:hover .hover-image,
.hover-container:focus-visible .hover-image {
  display: block; 
}




@media (max-width: 30rem) {
    .name-switch #name-image {
        height: 2.75rem;
    }

    .directory {
        column-count: 1;
    }

    .pointer-hand,
    .pointer-hand img {
        width: 1.75rem;
    }

    .project-home.hand-floating .pointer-hand {
        position: static;
    }

    .project-home.hand-floating .pointer-hand-placeholder {
        display: none;
    }
}

/* PROJECTS PAGE: tiny Windows-95-style toolbar buttons for project links. */
.project-tools {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.project-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-height: 1.5rem;
    padding: 0.2rem 0.35rem;
    border: 2px outset #dfdfdf;
    background: #c0c0c0;
    color: #000;
    font-family: Arial, sans-serif;
    font-size: 0.7rem;
    font-weight: normal;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.project-tool:link,
.project-tool:visited {
    color: #000;
    text-decoration: none;
}

.project-tool:hover {
    background: #d4d4d4;
}

.project-tool:active {
    border-style: inset;
}

.project-tool:focus-visible {
    outline: 1px dotted currentColor;
    outline-offset: 2px;
}

.project-tool img,
.project-tool .project-icons {
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
    margin: 0;
    object-fit: contain;
}

.project-tool-static {
    cursor: default;
}

/*
   CSS map:
   - shared document and link rules live above this note;
   - homepage selectors include .name-*, .directory, and the home image collection;
   - project-index selectors include .project-*, .pointer-hand*, and .hover-*;
   - research-page selectors are grouped below and scoped to .research-page where practical.
*/

/* RESEARCH PAGE: one plain document with experiment sections and presentation links. */
.research-page h2 {
    font-size: 1.25rem;
    line-height: 1.3;
}

.research-number {
    display: block;
    margin-bottom: 0.5rem;
}

.research-page h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    text-transform: uppercase;
}

.research-status,
.research-scale,
.research-pipeline {
    font-family: "Courier New", Courier, monospace;
    font-size: 0.875rem;
}

.research-status {
    margin-top: 0.5rem;
}

.research-question {
    font-size: 1.125rem;
}

.research-note,
.research-pending {
    color: #444;
    font-size: 0.875rem;
}

.research-facts {
    display: grid;
    grid-template-columns: 6.5rem minmax(0, 1fr);
    gap: 0.5rem 1rem;
    margin: 0.75rem 0;
}

.research-facts dt,
.research-tasks dt {
    font-weight: bold;
}

.research-facts dd {
    margin: 0;
}

.research-tasks dd {
    margin: 0.25rem 0 1rem;
}

.research-phases {
    padding-left: 1.5rem;
}

.research-phases li + li {
    margin-top: 0.75rem;
}

.research-pipeline {
    max-width: 100%;
    overflow-x: auto;
    padding: 0.5rem 0;
    line-height: 1.4;
    tab-size: 2;
}

.research-page figcaption {
    margin-top: 0.4rem;
    font-size: 0.875rem;
}

.research-infographic {
    max-width: 100%;
    margin: 1.25rem 0;
}

.research-infographic img {
    display: block;
    width: 100%;
    height: auto;
}

.research-terminal-graphic {
    max-width: 100%;
}

.research-environment-graphic {
    max-width: 22rem;
}

.research-presentation-links a {
    display: inline-block;
    margin: 0 0.75rem 0.35rem 0;
}

.research-disclosure {
    margin: 1.25rem 0;
    padding-top: 0.75rem;
    border-top: 1px solid #b8b8af;
}

.research-disclosure summary {
    color: #0000ee;
    cursor: pointer;
    text-decoration: underline;
}

.research-disclosure summary strong {
    font-weight: normal;
}

.research-disclosure summary span {
    display: block;
    margin-top: 0.2rem;
    color: #444;
    font-size: 0.875rem;
    text-decoration: none;
}

.research-current-step {
    padding-left: 0.75rem;
    border-left: 2px solid #99998f;
}

.research-current-step summary strong {
    font-weight: bold;
}

.research-page summary:focus-visible {
    outline: 1px dotted currentColor;
    outline-offset: 4px;
}


.research-page button:focus-visible,
.research-pipeline:focus-visible {
    outline: 1px dotted currentColor;
    outline-offset: 4px;
}

/* Research image viewer: native dialog semantics and Escape, with a small keyboard loop in script/research.js. */
.research-viewer {
    box-sizing: border-box;
    width: fit-content;
    max-width: calc(100% - 2rem);
    max-height: calc(100dvh - 2rem);
    padding: 1rem;
    border: 1px solid #555;
    background: #faf9f3;
    color: #111;
    overflow: auto;
    overscroll-behavior: contain;
}

.research-viewer::backdrop {
    background: rgb(0 0 0 / 65%);
}

.research-dialog-open {
    overflow: hidden;
    scrollbar-gutter: stable;
}

.research-viewer form {
    margin-bottom: 0.75rem;
    text-align: right;
}

.research-viewer button {
    padding: 0.25rem 0.5rem;
    border: 1px solid #888;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.research-viewer figure {
    margin: 0;
}

.research-viewer img {
    display: block;
    max-width: 100%;
    max-height: 72dvh;
    width: auto;
    height: auto;
    margin: auto;
    object-fit: contain;
}

.research-viewer [hidden] {
    display: none;
}

.research-viewer p {
    margin-bottom: 0;
    font-size: 0.875rem;
}

@media (max-width: 30rem) {
    .research-facts {
        grid-template-columns: 1fr;
        gap: 0.15rem;
    }

    .research-facts dd {
        margin-bottom: 0.75rem;
    }

}

/* Research introduces no motion. Keep its existing decorative door still when requested. */
@media (prefers-reduced-motion: reduce) {
    .research-page .home-link img {
        display: none;
    }

    .research-page .home-link::after {
        content: "[home]";
    }
}

/* ANIMALS PAGE */
.animals-page [hidden] {
    display: none;
}

.petmatch {
    text-align: center;
}

.animals-page .project-tool {
    min-height: 1.75rem;
    font-size: 0.75rem;
    cursor: pointer;
}

.animals-page .project-tool:disabled,
.animals-page .project-tool[aria-disabled="true"] {
    color: #555;
    cursor: default;
}

.animals-page button:focus-visible,
.animals-page select:focus-visible {
    outline: 2px dotted #111;
    outline-offset: 4px;
}

.animals-page .animal-asset img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 5rem;
    margin: auto;
    object-fit: contain;
}

.animals-page .animal-asset img[hidden] {
    display: none;
}

.animal-portrait figcaption {
    font-size: 0.875rem;
}

.petmatch h2 {
    margin-bottom: 0;
    font-size: 1.5rem;
    letter-spacing: 0.08em;
}

.petmatch-subtitle {
    margin-top: 0;
}

.animal-record-number {
    font-family: "Courier New", Courier, monospace;
    font-size: 0.8125rem;
}

.animal-portrait {
    width: min(20rem, 100%);
    margin: 1rem auto 0.5rem;
}

.animal-photo-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    aspect-ratio: 4 / 3;
    padding: 0.5rem;
    border: 7px ridge #aaa;
    background: #e8e6de;
}

.animal-photo-frame.frame-wood {
    border: 9px ridge #85603d;
}

.animal-photo-frame.frame-polaroid {
    border: 1px solid #999;
    padding: 0.5rem 0.5rem 1.5rem;
    background: #fffefa;
}

.animal-photo-frame.frame-gold {
    border: 8px ridge #ad8a35;
}

.animal-photo-frame img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: contain;
}

.animal-photo-frame p {
    margin: 0;
    padding: 1rem;
    font-size: 0.875rem;
}

.animal-portrait figcaption {
    margin-top: 0.4rem;
    overflow-wrap: anywhere;
}

.animal-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.animal-controls .project-tool {
    min-width: 2rem;
}

.animal-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem 1.5rem;
    max-width: 38rem;
    margin: 1.5rem auto;
    text-align: left;
    overflow-wrap: anywhere;
}

.animal-stat {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: baseline;
    gap: 0.45rem;
}

.animal-stats dt {
    font-weight: bold;
    text-transform: uppercase;
}

.animal-stats dd {
    margin: 0;
}

.animal-navigation {
    margin-top: 1.25rem;
}

.animal-photo-navigation .project-tool img {
    width: 20px;
    height: 20px;
}

.animals-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.animal-paw {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    width: auto;
    min-height: 2.75rem;
    height: auto;
    padding: 0.2rem;
    border: 0;
    background: transparent;
    color: inherit;
    font: 1.5rem/1 "Segoe UI Symbol", sans-serif;
    cursor: pointer;
}

.animal-paw:disabled,
.animal-paw[aria-disabled="true"] {
    cursor: default;
}

.animals-page .animal-paw .animal-asset img {
    width: 20px;
    height: 20px;
}

.animals-page .animal-paw .animal-paw-hand {
    width: 33px;
    height: 14px;
}

.animals-page .animal-paw .animal-paw-click {
    width: 88px;
    height: 31px;
}

.animal-shelf-scene {
    position: relative;
    height: 5rem;
    margin: 0.75rem 0 1.5rem;
}

.animal-shelf {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 11rem;
    height: 0.45rem;
    border: 2px outset #967b61;
    background: #796047;
}

.animal-sign {
    position: absolute;
    right: 1rem;
    bottom: 0.6rem;
    box-sizing: border-box;
    width: 8.5rem;
    padding: 0.5rem 0.2rem;
    border: 4px ridge #8c7455;
    background: #fffde7;
    text-align: center;
    font: bold 0.65rem/1.4 Arial, sans-serif;
    transform-origin: center;
}

.animal-fall-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    z-index: 20;
    overflow: hidden;
    pointer-events: none;
}

.animal-sign-loose {
    right: auto;
    bottom: auto;
    z-index: 1;
}

.animal-cat {
    position: absolute;
    left: 0;
    width: 500px;
    height: 50px;
    font-size: 0.75rem;
    pointer-events: none;
}

.animals-page .animal-cat img {
    width: 100%;
    max-height: none;
}

.animal-gag-status {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.animal-reset-space {
    min-height: 2rem;
    text-align: left;
}

.animal-cat-lover {
    margin: 1.5rem 0;
    text-align: center;
}

@media (max-width: 30rem) {
    .animals-heading {
        flex-wrap: wrap;
    }

    .animal-stat {
        grid-template-columns: 1fr;
        gap: 0.1rem;
    }

    .animal-stats {
        gap: 0.75rem 1rem;
    }

}

@media (prefers-reduced-motion: reduce) {
    .animals-page .animal-cat,
    .animals-page .home-link img {
        display: none;
    }

    .animals-page .home-link::after {
        content: "[home]";
    }
}
