:root {
  color-scheme: light;
  --bg: #f7f5f1;
  --ink: #1c1b18;
  --muted: #6a6257;
  --accent: #435a7c;
  --surface: #ffffff;
  --border: #d8d2c9;
  --font-display: "TeX Gyre Adventor", "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --nav-blue: #0047ab;
  --page-red: #fc0a0a;
  --home-purple: #7e1f5b;
  --social-yellow: #cfff04;
}

@font-face {
  font-family: "TeX Gyre Adventor";
  src: url("../fonts/TeXGyreAdventor-Regular.61abfb681193.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "TeX Gyre Adventor";
  src: url("../fonts/TeXGyreAdventor-Italic.5dad768717aa.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "TeX Gyre Adventor";
  src: url("../fonts/TeXGyreAdventor-Bold.9cd48b3909a5.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "TeX Gyre Adventor";
  src: url("../fonts/TeXGyreAdventor-BoldItalic.28f66e8945b4.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 12px 5vw;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 5;
}

.site-title {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.95rem;
  color: var(--muted);
}

.site-nav a {
  padding: 6px 8px;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.site-nav a:hover {
  background: rgba(67, 90, 124, 0.12);
  color: var(--ink);
}

.site-main {
  padding: 48px 6vw 72px;
}

.hero {
  max-width: 720px;
  margin-bottom: 48px;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
}

.hero-intro {
  font-size: 1.1rem;
  color: var(--muted);
}

/* Homepage: vertically centered nav map + staged welcome intro */
body.page-home {
  background: var(--bg);
  min-height: 100vh;
}

body.page-home .site-main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 8vw;
}

body.page-home.home-intro-active {
  pointer-events: none;
}

body.page-home.home-intro-active .corner-dots {
  pointer-events: none;
}

.home-stage.photo-stream-section.is-map {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  overflow: visible;
}

.home-welcome-map,
.home-menu-wrap {
  grid-area: 1 / 1;
  justify-self: center;
  align-self: center;
}

.home-welcome-map {
  z-index: 3;
  width: min(420px, 72vw);
  margin-left: auto;
  margin-right: auto;
}

.home-welcome-map.is-gone {
  display: none;
}

.home-welcome-map.is-dropping-out {
  overflow: visible;
}

.home-welcome-map.is-dropping-out .dot-item {
  animation: dot-fall-out 0.58s cubic-bezier(0.4, 0, 1, 1) both;
  animation-delay: calc(var(--drop-i, 0) * 320ms);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .home-welcome-map.is-dropping-out .dot-item {
    animation: none !important;
  }
}

.dot-welcome .dot-disc {
  background: #0047ab;
  color: #fff;
}

/* Desktop / fine pointer: keep the original balanced welcome type. */
.dot-welcome .dot-label {
  opacity: 1;
  font-size: clamp(0.5rem, 1.05vw, 0.72rem);
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.dot-welcome .dot-label.is-long {
  font-size: clamp(0.42rem, 0.9vw, 0.6rem);
  letter-spacing: -0.02em;
}

/* Phone / coarse pointer only: fit "Connor" from --dot-cell. */
body.map-touch .dot-welcome .dot-disc {
  width: 78%;
  height: 78%;
}

body.map-touch .dot-welcome .dot-label {
  font-size: calc(var(--dot-cell, 120px) * 0.18);
  letter-spacing: -0.02em;
  line-height: 1.05;
  padding: 0.06em 0.08em;
  max-width: calc(var(--dot-cell, 120px) * 0.7);
  overflow: visible;
}

body.map-touch .dot-welcome .dot-label.is-long {
  font-size: calc(var(--dot-cell, 120px) * 0.125);
  letter-spacing: -0.055em;
  line-height: 1;
  max-width: calc(var(--dot-cell, 120px) * 0.72);
  padding: 0.02em 0.04em;
}

.home-menu-wrap {
  z-index: 1;
  width: 100%;
  display: flex;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.page-home.is-home-ready .home-menu-wrap {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-landing {
  width: min(720px, 100%);
  margin: 0 auto;
}

.home-brand {
  margin-bottom: 40px;
}

.home-name {
  margin: 0 0 12px;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: clamp(3rem, 8vw, 5.2rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.home-intro {
  margin: 0;
  max-width: 28ch;
  font-size: 1.15rem;
  color: var(--muted);
  line-height: 1.45;
}

.home-fall {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.home-fall-link {
  display: grid;
  gap: 2px;
  padding: 14px 4px;
  border-bottom: 1px solid rgba(28, 27, 24, 0.12);
  opacity: 0;
  transform: translateY(-28px);
  animation: home-fall-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.12s + (var(--fall-delay, 0) * 0.11s));
}

.home-fall-link:last-child {
  border-bottom: 0;
}

.home-fall-label {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: clamp(1.55rem, 3.4vw, 2.15rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  transition: color 0.2s ease, transform 0.2s ease;
}

.home-fall-hint {
  font-size: 0.92rem;
  color: var(--muted);
}

.home-fall-link:hover .home-fall-label,
.home-fall-link:focus-visible .home-fall-label {
  color: var(--accent);
  transform: translateX(6px);
}

@keyframes home-fall-in {
  from {
    opacity: 0;
    transform: translateY(-28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-fall-link {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.card {
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.2s ease;
}

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

.card h2 {
  margin-top: 0;
  margin-bottom: 6px;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.section {
  max-width: 720px;
}

.playground {
  max-width: 1100px;
}

.section-intro {
  color: var(--muted);
  margin-bottom: 24px;
}

.placeholder {
  padding: 20px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  background: rgba(255, 255, 255, 0.6);
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.button,
button,
.playground-actions button {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.prose {
  line-height: 1.7;
}

.stack-list {
  display: grid;
  gap: 20px;
}

.stack-item {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.stack-form p {
  margin-bottom: 12px;
}

.section.narrow {
  max-width: 420px;
}

.project-links {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.photo-stream-section {
  max-width: 980px;
}

.photo-stream-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.photo-stream-count {
  margin: 8px 0 0;
  white-space: nowrap;
}

.collection-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
}

.collection-chip {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
}

.collection-chip.is-active,
.collection-chip:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.photo-stream {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.photo-stream-item {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--border);
  border: 0;
  padding: 0;
  cursor: pointer;
}

.photo-stream-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.25s ease;
}

.photo-stream-item:hover img {
  transform: scale(1.03);
}

/* Dot map: op-art lens view of a photo collection */
.photo-stream-section.is-map {
  max-width: none;
  width: 100%;
  display: flex;
  justify-content: center;
}

body.page-map {
  background: var(--bg);
}

body.page-map .site-main {
  padding: 28px 8vw 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
}

/* Touch / coarse pointer: clear corner chrome and keep content readable */
body.map-touch.page-map .site-main {
  padding: 100px 12px 108px;
}

body.map-touch .photo-stream-section.is-map {
  padding-top: 8px;
  padding-bottom: 8px;
}

body.map-touch .dot-map .photo-stream-item img,
body.map-touch .dot-map .dot-label,
body.map-touch .dot-nav .dot-label,
body.map-touch .dot-page .dot-label {
  opacity: 0.88;
}

body.map-touch .corner-logo,
body.map-touch .corner-label {
  opacity: 1;
}

body.map-touch .corner-dot {
  width: 58px;
  height: 58px;
}

body.map-touch .corner-disc {
  width: 44px;
  height: 44px;
}

body.map-touch .corner-filter-rail {
  top: 92px;
  bottom: 92px;
  left: 14px;
  width: 58px;
}

body.map-touch .corner-filter-rail.is-relocated {
  display: none;
}

/* Filters seated in the map grid (mobile) */
.dot-map .corner-dot-filter.dot-filter {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  bottom: auto;
  width: auto;
  height: auto;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  text-decoration: none;
}

.dot-map .corner-dot-filter.dot-filter .corner-disc {
  width: 72%;
  height: 72%;
  position: relative;
}

.dot-map .corner-dot-filter.dot-filter .corner-label {
  opacity: 1;
  font-size: calc(var(--dot-cell, 120px) * 0.078);
  max-width: calc(var(--dot-cell, 120px) * 0.62);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.dot-map .corner-dot-filter.dot-filter .corner-label.is-long {
  font-size: calc(var(--dot-cell, 120px) * 0.062);
}

body.map-touch .corner-dot-home {
  top: 14px;
  left: 14px;
}

body.map-touch .corner-dot-mail {
  top: 14px;
  right: 14px;
}

body.map-touch .corner-dot-github {
  bottom: 14px;
  left: 14px;
}

body.map-touch .corner-dot-linkedin {
  bottom: 14px;
  right: 14px;
}

body.map-touch .corner-dot-filter .corner-disc {
  width: 50px;
  height: 50px;
}

body.map-touch .dot-disc {
  width: 72%;
  height: 72%;
}

body.map-touch .dot-nav .dot-label,
body.map-touch .dot-page .dot-label {
  font-size: calc(var(--dot-cell, 120px) * 0.1);
  max-width: calc(var(--dot-cell, 120px) * 0.62);
  line-height: 1.15;
}

body.map-touch .dot-nav .dot-label.is-long,
body.map-touch .dot-page .dot-label.is-long {
  font-size: calc(var(--dot-cell, 120px) * 0.078);
  max-width: calc(var(--dot-cell, 120px) * 0.64);
}

/* Mobile shimmer: CSS-only, in-view dots only; paused while scrolling */
@keyframes map-dot-shimmer {
  0%,
  100% {
    opacity: 0.68;
  }
  50% {
    opacity: 1;
  }
}

body.map-touch.map-shimmer .dot-map .dot-photo.is-shimmering img,
body.map-touch.map-shimmer .dot-map .dot-nav.is-shimmering .dot-label,
body.map-touch.map-shimmer .dot-map .dot-page.is-shimmering .dot-label,
body.map-touch.map-shimmer .dot-map .dot-filter.is-shimmering .corner-label {
  animation: map-dot-shimmer 3.4s ease-in-out infinite;
  animation-delay: calc(var(--shimmer-i, 0) * -0.14s);
}

body.map-touch.map-scrolling.map-shimmer .dot-map .is-shimmering img,
body.map-touch.map-scrolling.map-shimmer .dot-map .is-shimmering .dot-label,
body.map-touch.map-scrolling.map-shimmer .dot-map .is-shimmering .corner-label {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  body.map-touch.map-shimmer .dot-map .is-shimmering img,
  body.map-touch.map-shimmer .dot-map .is-shimmering .dot-label,
  body.map-touch.map-shimmer .dot-map .is-shimmering .corner-label {
    animation: none !important;
  }
}

.map-tilt-enable {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 60;
  border: 0;
  border-radius: 999px;
  padding: 0.6rem 1.1rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: rgba(20, 20, 24, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
}

.map-tilt-enable[hidden] {
  display: none !important;
}

body.map-tilt-on .map-tilt-enable {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .map-tilt-enable {
    display: none !important;
  }
}

.dot-map {
  display: grid;
  grid-template-columns: repeat(var(--dot-cols, 7), 1fr);
  gap: 0;
  width: 100%;
}

.dot-map .photo-stream-item {
  aspect-ratio: 1 / 1;
  background: transparent;
  overflow: visible;
  display: grid;
  place-items: center;
  text-decoration: none;
  color: inherit;
}

.dot-disc {
  position: relative;
  display: grid;
  place-items: center;
  width: 62%;
  height: 62%;
  border-radius: 50%;
  background: var(--ink);
  overflow: hidden;
  will-change: transform;
}

.dot-nav .dot-disc {
  background: #0047ab;
  color: #fff;
}

.dot-nav.is-current-nav .dot-disc {
  outline: 3px solid rgba(255, 255, 255, 0.55);
  outline-offset: -3px;
}

.dot-page .dot-disc {
  background: #fc0a0a;
  color: #fff;
}

.dot-label {
  display: block;
  padding: 0.2em 0.25em;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(0.42rem, 0.85vw, 0.58rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: inherit;
  pointer-events: none;
  max-width: 90%;
  overflow: hidden;
  opacity: 0;
}

/* Sized from --dot-cell set by layout JS (avoids container queries collapsing grid). */
.dot-nav .dot-label,
.dot-page .dot-label {
  font-size: calc(var(--dot-cell, 120px) * 0.05);
  line-height: 1.25;
  letter-spacing: -0.01em;
  padding: 0.12em 0.15em 0.2em;
  max-width: calc(var(--dot-cell, 120px) * 0.54);
  /* Keep descenders (g, y, p) inside the disc without clipping mid-glyph. */
  overflow: visible;
}

.dot-nav .dot-label.is-long,
.dot-page .dot-label.is-long {
  font-size: calc(var(--dot-cell, 120px) * 0.042);
  letter-spacing: -0.015em;
  line-height: 1.22;
  max-width: calc(var(--dot-cell, 120px) * 0.55);
  padding: 0.1em 0.12em 0.18em;
}

.dot-map.is-resting .dot-disc {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.dot-map .photo-stream-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  border-radius: 50%;
  transition: none;
}

.dot-photo .dot-disc {
  /* Keep photo dots readable when a dark tag color fills the page. */
  outline: 1.5px solid rgba(255, 255, 255, 0.4);
  outline-offset: -1px;
}

.dot-map .photo-stream-item:hover img {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .dot-map .dot-photo img {
    opacity: 1;
  }

  .dot-map .dot-label {
    opacity: 1;
  }
}

.page-info-modal[hidden] {
  display: none;
}

.page-info-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.page-info-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 11, 10, 0.55);
}

.page-info-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(360px, 70vmin);
  height: min(360px, 70vmin);
  max-width: 70vmin;
  max-height: 70vmin;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: #fc0a0a;
  color: #fff;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18%;
  box-sizing: border-box;
  overflow: hidden;
  flex-shrink: 0;
}

.page-info-modal-dialog h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2.4vw, 1.35rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: #fff;
}

.page-info-modal-dialog p {
  margin: 0;
  font-family: var(--font-display);
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(0.72rem, 1.6vw, 0.92rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
  max-width: 22ch;
}

.page-info-modal-close {
  position: absolute;
  top: 14%;
  right: 18%;
  border: 0;
  background: transparent;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.85);
}

.page-info-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 14px;
  max-height: 30%;
  overflow: auto;
}

.page-info-tag {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.page-info-tag.is-active,
.page-info-tag:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.page-info-tools {
  margin-top: 12px !important;
  font-size: 0.8rem !important;
}

.page-info-tools a {
  color: #fff;
  text-decoration: underline;
}

body.page-journal-filter {
  background: var(--journal-bg, var(--bg));
}

.paint-spill {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.paint-spill[hidden] {
  display: none;
}

.paint-spill::before {
  content: "";
  position: absolute;
  left: var(--spill-x, 50%);
  top: var(--spill-y, 50%);
  width: 0;
  height: 0;
  border-radius: 50%;
  background: inherit;
  transform: translate(-50%, -50%);
  opacity: 0.96;
}

.paint-spill.is-spilling::before {
  animation: paint-spill-expand 0.78s cubic-bezier(0.22, 0.8, 0.25, 1) forwards;
}

@keyframes paint-spill-expand {
  from {
    width: 0;
    height: 0;
    opacity: 0.9;
  }
  to {
    width: var(--spill-size, 220vmax);
    height: var(--spill-size, 220vmax);
    opacity: 1;
  }
}

.corner-filter-rail {
  position: absolute;
  left: 28px;
  top: 110px;
  bottom: 110px;
  width: 72px;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  pointer-events: none;
}

.corner-filter-rail .corner-dot {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  bottom: auto;
  pointer-events: auto;
}

.corner-dot-filter .corner-disc {
  width: 64px;
  height: 64px;
  background: var(--filter-color);
  color: #fff;
  overflow: hidden;
}

.corner-dot-filter.is-selected .corner-disc {
  background: var(--filter-selected);
  outline: 2px solid rgba(255, 255, 255, 0.28);
  outline-offset: -2px;
}

.corner-label {
  display: block;
  padding: 0.15em 0.2em;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(0.48rem, 0.95vw, 0.68rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  max-width: 92%;
}

.corner-dot-filter .corner-label {
  font-size: 0.4rem;
}

.corner-dot-filter .corner-label.is-long {
  font-size: 0.3rem;
  letter-spacing: -0.025em;
  line-height: 1.05;
  max-width: 88%;
}

.dot-photo.is-filter-hidden {
  display: none !important;
}

.dot-photo.is-filter-leaving {
  animation: dot-fall-out 0.55s cubic-bezier(0.4, 0, 1, 1) both;
  animation-delay: calc(var(--fall-i, 0) * 18ms);
  pointer-events: none;
}

/* Subset / filter enter: rain upward from below into grid slots */
.dot-photo.is-filter-raining {
  animation: dot-rain-up 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--fall-i, 0) * 22ms);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .corner-label {
    opacity: 1;
  }

  .dot-photo.is-filter-leaving,
  .dot-photo.is-filter-raining {
    animation: none !important;
  }

  .paint-spill.is-spilling::before {
    animation: none;
    width: 220vmax;
    height: 220vmax;
  }
}

/* Corner dots — home (top-left) + social (bottom corners), narrow local lens */
.corner-dots {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
}

.corner-dot {
  position: absolute;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  pointer-events: auto;
  text-decoration: none;
  color: var(--ink);
}

.corner-dot-home {
  top: 28px;
  left: 28px;
  color: #fff;
}

.corner-dot-mail {
  top: 28px;
  right: 28px;
}

.corner-dot-github {
  bottom: 28px;
  left: 28px;
}

.corner-dot-linkedin {
  bottom: 28px;
  right: 28px;
}

.corner-disc {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--social-yellow);
  will-change: transform;
}

.corner-dot-home .corner-disc {
  background: var(--home-purple);
}

.corner-logo {
  width: 52%;
  height: 52%;
  opacity: 0;
  pointer-events: none;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .corner-logo {
    opacity: 1;
  }
}

/* Page enter / leave: dots fall into place, then fall away */
.dot-map.is-booting .dot-item,
.corner-dots.is-booting .corner-dot {
  opacity: 0;
  transform: translateY(-36px) scale(0.72);
}

.dot-map.is-entering .dot-item,
.corner-dots.is-entering .corner-dot {
  animation: dot-fall-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--fall-i, 0) * 28ms);
}

.dot-map.is-leaving .dot-item,
.corner-dots.is-leaving .corner-dot {
  animation: dot-fall-out 0.55s cubic-bezier(0.4, 0.0, 1, 1) both;
  animation-delay: calc(var(--fall-i, 0) * 22ms);
  pointer-events: none;
}

.dot-map.is-leaving .dot-disc,
.corner-dots.is-leaving .corner-disc {
  transition: none !important;
}

body.is-page-leaving {
  pointer-events: none;
}

@keyframes dot-fall-in {
  from {
    opacity: 0;
    transform: translateY(-42px) scale(0.68);
  }
  70% {
    opacity: 1;
    transform: translateY(4px) scale(1.03);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes dot-fall-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(68vh) scale(0.5);
  }
}

/* Raindrops rising from below the fold into their grid seats */
@keyframes dot-rain-up {
  from {
    opacity: 0;
    transform: translate(var(--rain-x, 0), 78vh) scale(0.52);
  }
  78% {
    opacity: 1;
    transform: translate(0, -5px) scale(1.03);
  }
  to {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dot-map.is-booting .dot-item,
  .corner-dots.is-booting .corner-dot,
  .dot-map.is-entering .dot-item,
  .corner-dots.is-entering .corner-dot,
  .dot-map.is-leaving .dot-item,
  .corner-dots.is-leaving .corner-dot {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}

.map-content {
  max-width: 980px;
  margin: 32px auto 0;
}

/* About Me — social-profile style */
.about-profile {
  max-width: 640px;
}

.about-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
}

.about-banner {
  position: relative;
  height: clamp(140px, 28vw, 220px);
  background: #c5c0b8;
  overflow: hidden;
}

.about-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-avatar-row {
  display: flex;
  align-items: flex-end;
  padding: 0 24px;
  margin-top: -52px;
  position: relative;
  z-index: 1;
}

.about-avatar {
  width: clamp(96px, 18vw, 128px);
  height: clamp(96px, 18vw, 128px);
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--surface);
  background: #ddd;
}

.about-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-identity {
  padding: 12px 24px 0;
}

.about-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.about-handle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.about-blurb-block {
  padding: 16px 24px 28px;
}

.about-blurb {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink);
}

.about-blurb.is-empty {
  color: var(--muted);
  font-style: italic;
}

.about-blurb-form {
  display: grid;
  gap: 10px;
}

.about-edit-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.about-blurb-form textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1.02rem;
  line-height: 1.5;
}

.about-blurb-form textarea:focus {
  outline: 2px solid var(--nav-blue);
  outline-offset: 1px;
}

.about-edit-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.about-save {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--nav-blue);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.about-save:hover {
  filter: brightness(1.08);
}

.about-save-status {
  font-size: 0.92rem;
  color: var(--muted);
}

body.page-about .site-main {
  padding-bottom: 72px;
}

.photo-stream-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(28, 27, 24, 0.72);
  color: #fff;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.modal-open {
  overflow: hidden;
}

.photo-modal[hidden] {
  display: none;
}

.photo-modal {
  position: fixed;
  inset: 0;
  /* Above lens-warped dots, whose z-index can reach a few hundred. */
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.photo-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 11, 10, 0.72);
}

.photo-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--surface);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid var(--border);
}

.photo-modal-dialog img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(70vh, 720px);
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

.photo-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.photo-modal-meta {
  margin-top: 16px;
}

.photo-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.photo-modal-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(67, 90, 124, 0.08);
  font-size: 0.85rem;
  color: var(--ink);
}

.photo-modal-tag-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(28, 27, 24, 0.12);
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
}

.photo-modal-tag-remove:hover {
  background: #8b3a3a;
  color: #fff;
}

.photo-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.button-secondary,
.button-danger {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.button-danger {
  border-color: #8b3a3a;
  background: #8b3a3a;
  color: #fff;
}

.curate-messages {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.curate-messages li {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(67, 90, 124, 0.1);
  margin-bottom: 8px;
}

.curate-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.curate-select-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.curate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.curate-item {
  cursor: pointer;
}

.curate-checkbox {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.curate-item:has(.curate-checkbox:checked) {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}

.curate-tag-panel {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.curate-tag-panel .curate-actions {
  margin-left: 0;
  margin-top: 10px;
}

.curate-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 8px;
}

.curate-tag-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
}

.photo-stream-tags {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.7rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-card {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}

.photo-card img,
.featured-image {
  width: 100%;
  display: block;
  object-fit: cover;
}

.photo-card figcaption {
  padding: 16px;
}

@media (max-width: 800px) {
  .photo-stream:not(.dot-map) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .photo-stream-header {
    flex-direction: column;
  }
}

.playground-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 24px;
  max-width: 1100px;
}

.playground-sidebar {
  font-size: 0.9rem;
}

.example-list,
.schema-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.example-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.example-button {
  flex: 1;
  text-align: left;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  padding: 8px 10px;
  border-radius: 8px;
}

#sql-editor {
  width: 100%;
  font-family: "SFMono-Regular", Menlo, monospace;
  font-size: 0.95rem;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  resize: vertical;
}

.playground-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 20px;
}

.query-status {
  color: var(--muted);
  font-size: 0.9rem;
}

.query-results table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.query-results th,
.query-results td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.query-results th {
  background: rgba(67, 90, 124, 0.08);
}

@media (max-width: 800px) {
  .playground-layout {
    grid-template-columns: 1fr;
  }
}
