/* Site styles. Colors are theme tokens (var(--bg), var(--link), ...) defined per theme in
   site/themes.yaml and generated into static/themes.css, where contrast is checked for
   every theme in both light and dark mode. */

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-latin-600-italic.woff2") format("woff2");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

/* Color tokens (--bg, --text, --link, ...) come from static/themes.css, generated from
   site/themes.yaml. */

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0 auto;
  max-width: 48rem;
  padding: 0 1.25rem;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.94rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

/* Main headings use --heading; subheadings and links use --link. */
h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.3;
}

h1,
h2 {
  color: var(--heading);
}

h3 {
  color: var(--link);
}

h1 {
  font-size: 1.9rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.25rem;
  margin-top: 2.5rem;
}

h3 {
  font-size: 1.02rem;
}

a {
  color: var(--link);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
  border-radius: 2px;
}

img {
  max-width: 100%;
  border-radius: 6px;
}

strong {
  font-weight: 600;
}

/* **Bold** in the home page bio and About page: emphasis in the heading color (pink in
   the default theme), which is contrast-checked for text in every theme. */
.bio strong,
.about strong {
  color: var(--heading);
}

code {
  font-family: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 0.3em;
}

/* Header and footer bars. */
.site-header,
.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.25rem;
}

/* Nav links wrap among themselves; the gear stays pinned top-right at every width. */
.site-header {
  flex-wrap: nowrap;
  align-items: flex-start;
  border-bottom: 1px solid var(--border);
}

.site-header nav {
  flex: 1;
  min-width: 0;
  row-gap: 0.4rem;
  align-items: center;
}

.site-header nav,
.site-footer {
  gap: 1.25rem;
  display: flex;
  flex-wrap: wrap;
}

.site-header nav a {
  text-decoration: none;
}

/* Header icon button: the color theme menu (gear). */
.header-tools {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.5rem;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--accent);
  cursor: pointer;
}

.icon-button:hover,
.icon-button[aria-expanded="true"] {
  border-color: var(--accent);
}

.icon-button svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:root[data-theme="light"] .icon-button {
  color: var(--link);
}

/* Theme menu: drops down under the gear, right-aligned with it. */
.settings {
  position: relative;
}

.settings-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 10;
  width: max-content;
  min-width: 14rem;
  max-width: calc(100vw - 2.5rem);
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.25);
}

.settings-title {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settings-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.25rem;
}

.palette-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.35rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 4px;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.palette-option:hover {
  border-color: var(--border);
}

.palette-option[aria-pressed="true"] {
  border-color: var(--accent);
}

.palette-option[aria-pressed="true"] .palette-label::after {
  content: " ✓" / "";
  color: var(--accent);
}

/* Each option previews its own colors: background, heading, link, and accent. */
.swatches {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.swatches span {
  width: 0.8rem;
  height: 1.1rem;
}

.site-header nav a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

.site-footer {
  justify-content: flex-start;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Bio panel: who I am, where to find me, and the PDF downloads. On narrow screens it's
   a compact card above the page content, photo beside the details; on wide ones it
   becomes a sticky column left of the content. */
.bio-panel {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  column-gap: 1.25rem;
  align-items: start;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.bio-panel> :not(.bio-photo) {
  grid-column: 2;
}

.bio-panel p,
.bio-panel ul {
  margin: 0;
}

/* Square photo shown as a circle. */
.bio-photo {
  grid-row: 1 / span 6;
  display: block;
  width: 6rem;
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
}

.bio-name {
  font-size: 1.1rem;
  font-weight: 600;
}

.bio-name a {
  color: var(--heading);
  text-decoration: none;
}

/* Pronouns tucked just under the name, in the heading color. */
.pronouns {
  color: var(--heading);
  font-style: italic;
  font-size: 0.85rem;
}

.bio-headline {
  color: var(--muted);
}

.bio-location {
  margin-top: 0.9rem !important;
  font-size: 0.85rem;
}

/* Logo links (black PNGs, flipped to white in dark mode). An email logo that was just
   clicked shows "Copied!" under it. */
.social-links {
  display: flex;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin-top: 1rem !important;
}

.social-links a {
  position: relative;
  display: block;
}

.social-links img {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 0;
  opacity: 0.85;
}

.social-links a:hover img {
  opacity: 1;
}

:root[data-theme="dark"] .social-links img {
  filter: invert(1);
}

.social-links a.is-copied::after {
  content: "Copied!";
  position: absolute;
  top: calc(100% + 0.3rem);
  left: 50%;
  transform: translateX(-50%);
  padding: 0 0.4rem;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.72rem;
  white-space: nowrap;
}

/* Download dropdown: a solid button that opens outlined choices beneath it. */
.download-menu {
  margin-top: 1.1rem;
}

.download-menu summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.download-menu summary::-webkit-details-marker {
  display: none;
}

.download-menu summary::after {
  content: " ▾" / "";
}

.download-menu[open] summary::after {
  content: " ▴" / "";
}

.download-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

@media (min-width: 68rem) {
  body {
    max-width: 66rem;
  }

  .layout {
    display: grid;
    grid-template-columns: 14rem minmax(0, 1fr);
    column-gap: 3.5rem;
  }

  .bio-panel {
    display: block;
    align-self: start;
    position: sticky;
    top: 0;
    padding: 2rem 0 0;
    border-bottom: 0;
  }

  .bio-photo {
    width: 9rem;
    margin-bottom: 1rem;
  }

  .download-menu .button {
    display: block;
    text-align: center;
  }

  .download-options {
    flex-direction: column;
  }
}

.brand {
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
}

/* Blinking terminal cursor after the brand link, in the accent color. Disabled for now;
   uncomment to bring it back.

.brand::after {
  content: "" / "";
  display: inline-block;
  width: 0.6em;
  height: 1.1em;
  margin-left: 0.15em;
  vertical-align: text-bottom;
  background: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand::after {
    animation: none;
  }
}
*/

.muted {
  color: var(--muted);
  font-weight: normal;
}

/* Last commit to the site's repo, pushed to the footer's right end. */
.updated {
  margin-left: auto;
}

.updated::before {
  content: "● " / "";
  color: var(--link);
}

/* "built from 1c410bb" wraps as one piece, never leaving the hash alone on a line. */
.built {
  white-space: nowrap;
}

.cards {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-2);
  border-radius: 6px;
  padding: 1rem 1.25rem;
}

.card h3 {
  margin: 0 0 0.25rem;
}

.card p {
  margin: 0.25rem 0;
}

/* Maps come in every aspect ratio, so thumbnails show the whole image ("contain")
   inside a fixed square rather than cropping it. */
.card.has-thumb {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1.25rem;
  align-items: start;
}

.card .thumb {
  display: block;
  aspect-ratio: 1;
  padding: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--thumb-bg);
}

.card .thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
}

@media (max-width: 34rem) {
  .card.has-thumb {
    grid-template-columns: 1fr;
  }

  .card .thumb {
    aspect-ratio: 16 / 10;
  }
}

.project figure,
.project img {
  margin: 1.5rem 0 0.5rem;
}

.project em {
  color: var(--muted);
}

/* A project's own logo beside its title, swapped to match the light/dark mode. */
.project-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.project .project-logo {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0;
}

:root[data-theme="dark"] .project-logo.light-only,
:root:not([data-theme="dark"]) .project-logo.dark-only {
  display: none;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tags span {
  padding: 0 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted);
}

.tags span::before {
  content: "#" / "";
  color: var(--accent-2);
}

/* Outlined in the accent color; a hard offset shadow on hover. */
.button {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1.5px var(--accent);
  font-weight: 600;
  text-decoration: none;
}

/* <button class="button">: drop the browser's button border and font. */
button.button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.button:hover {
  color: var(--text);
  box-shadow: inset 0 0 0 1.5px var(--accent), 3px 3px 0 var(--link);
}

/* Filled in the accent color, for the main action. */
.button-solid,
.button-solid:hover {
  background: var(--accent);
  color: var(--on-accent);
}

.button-solid:hover {
  box-shadow: 3px 3px 0 var(--link);
}

ul li::marker {
  color: var(--accent);
}

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

/* ---- Resume timeline ---------------------------------------------------------------
   Work and education share one color (blue) for dots, labels, titles, and bullets.
   Pink is reserved for years and tool chips. */
.timeline-intro h1 {
  margin: 0.4rem 0;
}

.lede {
  color: var(--muted);
  margin-top: 0.75rem;
}

/* Tool chips: "new" marks the step where a tool first appears; the active chip is the
   tool being traced. */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.05rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.76rem;
  line-height: 1.6;
  cursor: pointer;
}

button.chip:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* A chip that links to a page (resume.yaml skill_links) instead of tracing the timeline.
   The dashed border is the only hint that it's different: a breadcrumb for the curious. */
a.chip-link {
  border-style: dashed;
  text-decoration: none;
}

a.chip-link:hover {
  border-color: var(--accent);
  border-style: solid;
  color: var(--text);
}

.chip.is-new {
  border-color: var(--accent);
  color: var(--text);
}

.chip.is-new::before {
  content: "+" / "";
  color: var(--accent);
  font-weight: 600;
}

.chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.chip.is-active::before {
  color: var(--on-accent);
}

.chip-sample {
  cursor: default;
}

/* Muted, not --accent-2: the count is information, and only text tokens are contrast-checked. */
.chip-count {
  color: var(--muted);
  font-size: 0.7rem;
}

.chip.is-active .chip-count {
  color: var(--on-accent);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.75rem 0 0;
}

.toolbox dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.6rem 1rem;
  align-items: baseline;
}

.toolbox dt {
  font-weight: 600;
  font-size: 0.85rem;
}

.toolbox dd {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
}

/* While a tool is traced, its status bar stays in view while scrolling the timeline.
   Otherwise the bar is empty and takes no space; it stays in the page (rather than
   [hidden]) so screen readers still announce the status as it appears. */
.timeline-controls {
  position: sticky;
  top: 0;
  z-index: 1;
  margin-top: 2.5rem;
  padding: 0.6rem 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.timeline-controls:has(> .tl-status[hidden]) {
  padding: 0;
  border-bottom: 0;
}

.tl-status {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text);
}

.tl-clear {
  margin-left: 0.4rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--link);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* The line runs down the left of the cards; dates sit to its left on wide screens. */
.timeline {
  --kind: var(--link);
  --date-col: 8.5rem;
  --gap: 1.75rem;
  position: relative;
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  bottom: 0;
  left: calc(var(--date-col) + var(--gap) / 2 - 1px);
  width: 2px;
  background: var(--border);
}

.tl-year,
.tl-event {
  display: grid;
  grid-template-columns: var(--date-col) 1fr;
  column-gap: var(--gap);
}

.tl-year {
  margin: 2rem 0 0.75rem;
  color: var(--heading);
  font-size: 1.35rem;
  font-weight: 600;
  text-align: right;
  grid-template-columns: var(--date-col);
}

.tl-year:first-child {
  margin-top: 0.5rem;
}

.tl-event {
  position: relative;
  margin-bottom: 1.1rem;
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

.tl-event::before {
  content: "";
  position: absolute;
  top: 1.2rem;
  left: calc(var(--date-col) + var(--gap) / 2 - 0.4rem);
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: var(--kind);
  box-shadow: 0 0 0 4px var(--bg);
}

.tl-date {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: right;
}

.tl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.9rem 1.15rem 1rem;
}

.tl-card h3 {
  margin: 0;
  color: var(--kind);
}

.tl-card h3 a {
  color: inherit;
  text-decoration: none;
}

.tl-card h3 a:hover {
  text-decoration: underline;
}

.tl-card p,
.tl-card ul {
  margin: 0.4rem 0 0;
}

.tl-card ul {
  padding-left: 1.1rem;
}

.tl-card li::marker {
  color: var(--kind);
}

.tl-kind {
  color: var(--kind);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.15rem !important;
}

.tl-sub {
  color: var(--muted);
  font-size: 0.85rem;
}

.tl-writeup {
  font-size: 0.85rem;
}

.tl-writeup a {
  color: var(--card-link);
}

.tl-event.is-dimmed {
  opacity: 0.3;
}

.tl-event.will-reveal {
  opacity: 0;
  transform: translateY(1rem);
}

/* Narrow screens: one column, line down the far left, date above each card. */
@media (max-width: 34rem) {
  .timeline {
    --date-col: 0rem;
    --gap: 1.6rem;
  }

  .timeline::before {
    left: 0.4rem;
  }

  .tl-year,
  .tl-event {
    grid-template-columns: 1fr;
    padding-left: var(--gap);
  }

  .tl-year {
    text-align: left;
  }

  .tl-event::before {
    left: 0;
    top: 0.3rem;
  }

  .tl-date {
    margin: 0 0 0.3rem;
    text-align: left;
  }

  .toolbox dl {
    grid-template-columns: 1fr;
  }
}

/* ---- Publications page ---------------------------------------------------------- */
.pub-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.pub {
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.pub:last-child {
  border-bottom: 1px solid var(--border);
}

.pub h3 {
  margin: 0.2rem 0;
  color: var(--text);
  font-weight: 400;
}

.pub h3 a {
  color: inherit;
  text-decoration: none;
}

.pub h3 a:hover {
  text-decoration: underline;
}

.pub-meta,
.pub-authors {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.pub-authors .me {
  color: var(--link);
}


/* ---- Hidden /type page (easter egg) ----------------------------------------------- */
.type-board {
  margin-top: 1.5rem;
}

.type-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.type-timer {
  color: var(--accent-2);
  font-size: 1.6rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Three lines of words; type.js scrolls the current one into view. */
.type-words {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.7em;
  height: 6.6em;
  overflow: hidden;
  padding: 0.3em 0.5em;
  font-size: 1.2rem;
  line-height: 2;
  color: var(--muted);
}

.type-word {
  border-radius: 3px;
}

.type-word.is-current {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

.type-word.is-typo {
  background: var(--surface);
  color: var(--accent);
}

.type-word.is-correct {
  color: var(--text);
}

.type-word.is-wrong {
  color: var(--accent);
  text-decoration: line-through;
}

.type-input {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1.1rem;
}

.type-input:focus {
  border-color: var(--accent);
  outline: none;
}

.type-score {
  color: var(--heading);
  font-size: 1.25rem;
  font-weight: 600;
}

.type-breadcrumb {
  padding: 0.6rem 0.9rem;
  border-left: 3px solid var(--accent-2);
  background: var(--surface);
}

/* ---- Treasure (easter-egg finale, static/treasure.js) ----------------------------- */
/* Treasure themes and the footer trophy stay hidden until the visitor finds it. */
:root:not([data-treasure="found"]) .treasure-only {
  display: none !important;
}

.treasure-title {
  margin-top: 0.5rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
}

.treasure-dialog {
  width: min(26rem, calc(100vw - 2rem));
  padding: 1.75rem 1.5rem 1.5rem;
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent-2);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: center;
  box-shadow: 0 12px 40px rgb(0 0 0 / 0.35);
}

.treasure-dialog::backdrop {
  background: rgb(0 0 0 / 0.55);
}

.treasure-dialog h2 {
  margin: 0.5rem 0 0.75rem;
}

.treasure-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

/* The ❌ stamps down, then gives way to the gold. */
.treasure-art {
  display: grid;
  place-items: center;
  height: 5rem;
  font-size: 3.5rem;
}

.treasure-art>span {
  grid-area: 1 / 1;
}

.treasure-x {
  animation: treasure-x 1.4s ease-in forwards;
}

.treasure-chest {
  opacity: 0;
  animation: treasure-chest 0.6s 1.1s ease-out forwards;
}

@keyframes treasure-x {
  0% {
    transform: scale(2.5) rotate(-20deg);
    opacity: 0;
  }

  25% {
    transform: scale(1) rotate(0);
    opacity: 1;
  }

  75% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(0.4);
    opacity: 0;
  }
}

@keyframes treasure-chest {
  from {
    transform: translateY(1rem) scale(0.6);
    opacity: 0;
  }

  to {
    transform: none;
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .treasure-x {
    display: none;
  }

  .treasure-chest {
    opacity: 1;
    animation: none;
  }
}

/* The chest's "locked" hint on treasure.html, for visitors who haven't found it yet. */
:root[data-treasure="found"] .treasure-locked {
  display: none;
}

.treasure-mark {
  text-decoration: none;
}

/* Gallery (treasure.html): each painting beside its title and try-on button. */
.gallery {
  display: grid;
  gap: 2.5rem;
  margin-top: 2rem;
}

.gallery-piece {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
  margin: 0;
}

.gallery-piece img {
  width: 100%;
  max-height: 34rem;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 6px 24px rgb(0 0 0 / 0.25);
}

.gallery-piece h2 {
  margin-top: 0;
}

.gallery-piece p {
  color: var(--muted);
}

.wear-theme[aria-pressed="true"] {
  background: var(--accent);
  color: var(--on-accent);
}

@media (max-width: 640px) {
  .gallery-piece {
    grid-template-columns: 1fr;
  }
}
