/*
  Starri Skai–style palette: black sky, neon lettering, white star accents.
  Link this file + Fredoka font links on every HTML page.
*/
:root {
  color-scheme: dark;
  --bg: #000000;
  --text: rgba(255, 255, 255, 0.92);
  --text-muted: rgba(255, 255, 255, 0.72);
  --star: #ffffff;
  --c-teal: #00aba1;
  --c-lime: #c6ff64;
  --c-pink: #ff0096;
  --c-red: #ff1900;
  --c-yellow: #ffcf24;
  --font-sans: "Fredoka", system-ui, sans-serif;
}

/* Site-wide custom cursor: cat paw with safe fallback. */
html,
body {
  cursor:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='20' r='7' fill='%23ffb6d9'/%3E%3Ccircle cx='10' cy='11' r='3.1' fill='%23ffb6d9'/%3E%3Ccircle cx='16' cy='8' r='3' fill='%23ffb6d9'/%3E%3Ccircle cx='22' cy='11' r='3.1' fill='%23ffb6d9'/%3E%3C/svg%3E")
      8 7,
    auto;
}

a,
button,
input[type="button"],
input[type="submit"],
label[for],
select,
summary,
[role="button"] {
  cursor:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='20' r='7' fill='%23ffd166'/%3E%3Ccircle cx='10' cy='11' r='3.1' fill='%23ffd166'/%3E%3Ccircle cx='16' cy='8' r='3' fill='%23ffd166'/%3E%3Ccircle cx='22' cy='11' r='3.1' fill='%23ffd166'/%3E%3C/svg%3E")
      8 7,
    pointer;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: var(--font-sans);
}

body {
  margin: 0;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  position: relative;
}

body.page-home {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 1.5rem 1.5rem;
  gap: 1.25rem;
}

body.page-home main.container {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: clamp(1.25rem, 3.5vw, 2rem);
  min-height: 0;
  width: 100%;
  max-width: min(1120px, 100%);
}

body.page-home .hero-block {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}

body.page-inner {
  display: grid;
  place-items: center;
  padding: 1.5rem;
  overflow-x: clip;
}

/* Top-left back link on inner pages (not index) */
.back-nav {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top, 0px));
  left: max(1rem, env(safe-area-inset-left, 0px));
  z-index: 20;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.back-nav.btn--ghost {
  padding: 0.5rem 0.82rem;
  border-color: rgba(0, 171, 161, 0.75);
  color: var(--star);
  background: linear-gradient(
    135deg,
    rgba(0, 171, 161, 0.2) 0%,
    rgba(255, 0, 150, 0.16) 55%,
    rgba(255, 207, 36, 0.2) 100%
  );
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    0 0 22px rgba(0, 171, 161, 0.22);
}

.back-nav.btn--ghost:hover {
  border-color: var(--c-pink);
  color: var(--c-yellow);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.2) inset,
    0 0 26px rgba(255, 0, 150, 0.24);
}

.back-nav.btn--ghost:focus-visible {
  outline: 2px solid var(--c-yellow);
  outline-offset: 2px;
}

/* Bio: readable width, left-aligned body copy under centered heading */
.bio-about {
  width: 100%;
  max-width: 42rem;
  margin: 0 auto 0.5rem;
  text-align: left;
}

/* Full-bleed banner (breaks out of .bio-about max-width) */
.bio-about__portrait {
  margin: 0 0 1.5rem;
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.bio-about__portrait img {
  display: block;
  width: 100%;
  height: min(45vh, 520px);
  object-fit: cover;
  object-position: center 25%;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.bio-about h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.2rem, 2.8vw, 1.45rem);
  font-weight: 700;
  color: var(--c-teal);
  text-align: center;
}

.bio-about p {
  margin-top: 0.85rem;
}

.bio-about p:first-of-type {
  margin-top: 0;
}

/* School projects — base tile; use .project-tile--* for palette tints */
.project-tile {
  width: 100%;
  max-width: 44rem;
  margin: 1.25rem auto 1.5rem;
  padding: 1.25rem 1.15rem 1.4rem;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
}

.project-tile--pink {
  background: rgba(255, 0, 150, 0.1);
}

.project-tile--teal {
  background: rgba(0, 171, 161, 0.1);
}

.project-tile--lime {
  background: rgba(198, 255, 100, 0.11);
}

.project-tile--yellow {
  background: rgba(255, 207, 36, 0.12);
}

.project-tile--red {
  background: rgba(255, 25, 0, 0.09);
}

.project-tile__title {
  margin: 0 0 1rem;
  font-size: clamp(1.15rem, 2.8vw, 1.4rem);
  font-weight: 700;
  color: var(--c-pink);
  text-align: center;
}

.project-tile__grid {
  display: grid;
  gap: 1rem;
}

.project-tile__grid--two {
  grid-template-columns: 1fr;
}

@media (min-width: 560px) {
  .project-tile__grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.project-tile__storyboards {
  margin-top: 0.9rem;
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .project-tile__storyboards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Same-size frames for side-by-side images (e.g. Dice + Party Glitch) */
.project-tile__grid--matched {
  align-items: stretch;
}

.project-tile__grid--matched .project-tile__figure {
  min-width: 0;
}

.project-tile__grid--matched .project-tile__figure img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  object-position: center;
}

.project-tile__figure {
  margin: 0;
}

.project-tile__figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  vertical-align: middle;
}

.project-tile__figure figcaption {
  margin-top: 0.45rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.35;
}

.project-tile__subtitle {
  margin: 1.25rem 0 0.8rem;
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  font-weight: 700;
  color: var(--c-teal);
  text-align: center;
}

.project-tile__desc {
  margin-top: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.project-tile__desc strong {
  color: var(--text);
}

.project-tile__video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 0 1rem;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
}

.project-tile__video iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.project-tile__video video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}

.project-tile__sketch-cta {
  margin: 0 0 0.85rem;
  text-align: center;
}

.project-tile__sketch-cta-link {
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  color: #0a0a0a;
  background: var(--c-teal);
  border: 2px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.project-tile__sketch-cta-link:hover {
  filter: brightness(1.08);
  color: #0a0a0a;
}

.project-tile__sketch-cta-link:focus-visible {
  outline: 2px solid var(--c-pink);
  outline-offset: 3px;
}

.project-tile__codepen {
  width: 100%;
  margin: 0 0 0.65rem;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
}

.project-tile__codepen iframe {
  display: block;
  width: 100%;
  height: min(70vh, 520px);
  min-height: 400px;
  border: 0;
}

@media (max-width: 560px) {
  .project-tile__codepen iframe {
    min-height: 260px;
    height: min(55vh, 420px);
  }
}

.project-tile__external {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  text-align: center;
  word-break: break-all;
}

.project-tile__external a {
  color: var(--c-teal);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.project-tile__external a:hover {
  color: var(--c-pink);
}

.commissions-gallery {
  width: 100%;
  max-width: 44rem;
  margin: 1rem auto 1.5rem;
}

.commissions-image-tile {
  margin: 0 0 1rem;
}

.commissions-gallery .project-tile__figure {
  margin: 0;
}

.commissions-gallery .project-tile__figure img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.commissions-gallery .project-tile__figure > a {
  display: block;
}

@media (min-width: 900px) {
  .commissions-gallery .project-tile__figure img {
    max-height: 78vh;
    margin-inline: auto;
    width: auto;
    max-width: 100%;
  }
}

.commissions-image-tile:last-of-type {
  margin-bottom: 0;
}

.art-gallery {
  width: 100%;
  max-width: min(1240px, 100%);
  margin: 1rem auto 1.5rem;
}

.art-gallery .project-tile__title {
  margin-bottom: 1rem;
}

.art-gallery__grid {
  column-count: 1;
  column-gap: 0.9rem;
}

@media (min-width: 760px) {
  .art-gallery__grid {
    column-count: 2;
  }
}

@media (min-width: 1120px) {
  .art-gallery__grid {
    column-count: 3;
  }
}

.art-gallery__item {
  break-inside: avoid;
  margin: 0 0 0.9rem;
}

.art-gallery__item img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}

.art-gallery__item > a {
  display: block;
}

.page-image-viewer .container.image-viewer {
  width: 100%;
  max-width: min(1400px, 100%);
  padding-top: 4.25rem;
}

.image-viewer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.image-viewer__stage {
  width: 100%;
  max-width: 100%;
  max-height: min(85vh, 1200px);
  overflow: auto;
  border-radius: 8px;
  cursor: zoom-in;
}

.image-viewer__stage.is-zoomed {
  cursor: zoom-out;
}

.image-viewer__stage.is-zoomed.is-panning {
  cursor: grabbing;
}

.image-viewer #viewer-image {
  display: block;
  max-width: 100%;
  max-height: min(85vh, 1200px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  transform-origin: center center;
  transition: transform 0.2s ease;
  will-change: transform;
  cursor: inherit;
  margin-inline: auto;
  user-select: none;
}

/* Home: section nav (equal vertical gap from hero + events via main.container gap) */
.site-nav.btn-row {
  justify-content: center;
  width: 100%;
  max-width: min(1120px, 100%);
  margin-top: 0;
  margin-bottom: 0;
  flex-shrink: 0;
  z-index: 1;
}

.events-stack {
  position: relative;
  width: 100%;
  margin-top: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.site-nav.site-nav--on-events {
  position: relative;
  z-index: 1;
  align-self: center;
  width: 100%;
  max-width: 100%;
  margin-bottom: 0;
  flex-wrap: wrap;
}

body.page-home .instagram-section {
  margin-top: 0;
}

.events-stack .events-tile {
  margin-top: 0;
  position: relative;
  z-index: 1;
  padding-top: 1.35rem;
}

body::before,
body::after {
  position: fixed;
  top: 1rem;
  color: var(--star);
  font-size: clamp(0.75rem, 2vw, 0.95rem);
  letter-spacing: 0.4em;
  line-height: 1.5;
  opacity: 0.92;
  pointer-events: none;
  z-index: 0;
  white-space: pre;
}

body::before {
  content: "✦  ★  ✧";
  left: 1rem;
  text-align: left;
}

body::after {
  content: "★  ✦  ✧";
  right: 1rem;
  text-align: right;
}

/* Extra white stars (✦ ★ ✧) — same glyphs as corners, varied sizes / placement */
.stars-sky {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.stars-sky .star {
  position: absolute;
  color: var(--star);
  line-height: 1;
  user-select: none;
  font-family: var(--font-sans);
  letter-spacing: 0;
  opacity: 0.9;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.star--2xs {
  font-size: 0.42rem;
  opacity: 0.7;
}
.star--xs {
  font-size: 0.55rem;
  opacity: 0.78;
}
.star--sm {
  font-size: 0.72rem;
  opacity: 0.85;
}
.star--md {
  font-size: 0.9rem;
  opacity: 0.9;
}
.star--lg {
  font-size: 1.12rem;
  opacity: 0.92;
}
.star--xl {
  font-size: 1.38rem;
  opacity: 0.88;
}
.star--xxl {
  font-size: 1.75rem;
  opacity: 0.82;
}

@keyframes star-twinkle {
  0%,
  100% {
    filter: brightness(1.08);
    opacity: 1;
  }
  35% {
    filter: brightness(0.22);
    opacity: 0.35;
  }
  52% {
    filter: brightness(1.45);
    opacity: 1;
  }
  68% {
    filter: brightness(0.5);
    opacity: 0.55;
  }
}

/* About half the field twinkles; durations/delays desync the pattern */
.stars-sky .star:nth-child(2n) {
  animation: star-twinkle 2.65s ease-in-out infinite;
}

.stars-sky .star:nth-child(4n) {
  animation-duration: 3.45s;
  animation-delay: -1.1s;
}

.stars-sky .star:nth-child(6n + 2) {
  animation-duration: 2.05s;
  animation-delay: -0.55s;
}

.stars-sky .star:nth-child(10n + 6) {
  animation-duration: 3.85s;
  animation-delay: -1.75s;
}

@media (prefers-reduced-motion: reduce) {
  .stars-sky .star {
    animation: none !important;
  }

  .hero-welcome.rainbow-chars > span:not(.rainbow-chars__gap) {
    animation: none !important;
  }

  .events-tile__item:hover {
    transform: none;
  }
}

button,
input,
textarea,
select {
  font-family: inherit;
}

.container {
  position: relative;
  z-index: 1;
  width: min(800px, 100%);
  padding: 2rem;
  text-align: center;
}

/* Per-letter neon cycle (gaps use .rainbow-chars__gap and are skipped so each word starts on teal) */
.rainbow-chars {
  margin-top: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
}

.rainbow-chars > span:nth-child(5n + 1 of :not(.rainbow-chars__gap)) {
  color: var(--c-teal);
}
.rainbow-chars > span:nth-child(5n + 2 of :not(.rainbow-chars__gap)) {
  color: var(--c-pink);
}
.rainbow-chars > span:nth-child(5n + 3 of :not(.rainbow-chars__gap)) {
  color: var(--c-yellow);
}
.rainbow-chars > span:nth-child(5n + 4 of :not(.rainbow-chars__gap)) {
  color: var(--c-lime);
}
.rainbow-chars > span:nth-child(5n + 5 of :not(.rainbow-chars__gap)) {
  color: var(--c-red);
}

.rainbow-chars span.rainbow-chars__gap {
  color: transparent;
  display: inline-block;
  width: 0.35em;
}

/* Home hero: large “Welcome”, tagline underneath */
.hero-title {
  margin: 0;
}

.hero-title .hero-welcome {
  display: block;
  font-size: clamp(3.25rem, 14vw, 7rem);
  line-height: 1.05;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* “WELCOME”: smooth wave — same ease loop on each letter, staggered delay for left-to-right flow */
@keyframes hero-welcome-letter-wave {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-0.2em);
  }
}

.hero-welcome.rainbow-chars > span:not(.rainbow-chars__gap) {
  display: inline-block;
  animation: hero-welcome-letter-wave 1.5s ease-in-out infinite;
}

.hero-welcome.rainbow-chars > span:nth-child(1):not(.rainbow-chars__gap) {
  animation-delay: 0s;
}
.hero-welcome.rainbow-chars > span:nth-child(2):not(.rainbow-chars__gap) {
  animation-delay: 0.12s;
}
.hero-welcome.rainbow-chars > span:nth-child(3):not(.rainbow-chars__gap) {
  animation-delay: 0.24s;
}
.hero-welcome.rainbow-chars > span:nth-child(4):not(.rainbow-chars__gap) {
  animation-delay: 0.36s;
}
.hero-welcome.rainbow-chars > span:nth-child(5):not(.rainbow-chars__gap) {
  animation-delay: 0.48s;
}
.hero-welcome.rainbow-chars > span:nth-child(6):not(.rainbow-chars__gap) {
  animation-delay: 0.6s;
}
.hero-welcome.rainbow-chars > span:nth-child(7):not(.rainbow-chars__gap) {
  animation-delay: 0.72s;
}

.hero-title .hero-to {
  display: block;
  margin-top: 0.35rem;
  font-size: clamp(1.35rem, 3.8vw, 2.15rem);
  line-height: 1.3;
}

.hero-title .hero-tagline-rest {
  display: block;
  margin-top: 0.35rem;
  font-size: clamp(1.05rem, 2.75vw, 1.85rem);
  line-height: 1.35;
}

p {
  line-height: 1.65;
  margin: 0.75rem 0 0;
  color: var(--text-muted);
}

.btn {
  margin-top: 1.25rem;
  display: inline-block;
  text-decoration: none;
  color: #0a0a0a;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-weight: 700;
  border: 2px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--c-yellow);
  outline-offset: 3px;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.btn-row .btn:nth-child(1) {
  background: var(--c-teal);
}
.btn-row .btn:nth-child(2) {
  background: var(--c-pink);
}
.btn-row .btn:nth-child(3) {
  background: var(--c-lime);
}
.btn-row .btn:nth-child(4) {
  background: var(--c-yellow);
}
.btn-row .btn:nth-child(5) {
  background: var(--c-red);
}

.btn--ghost {
  background: transparent;
  color: var(--star);
  border-color: rgba(255, 255, 255, 0.55);
}

.btn--ghost:hover {
  border-color: var(--c-yellow);
  color: var(--c-yellow);
  box-shadow: 0 0 24px rgba(255, 207, 36, 0.2);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.btn-row .btn {
  margin-top: 0;
}

footer {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.site-footer {
  flex-shrink: 0;
  margin-top: auto;
  width: 100%;
  max-width: min(800px, 100%);
  padding-top: 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  z-index: 1;
}

body.page-home .site-footer {
  max-width: min(1120px, 100%);
}

/* Instagram tiles (feed from /api/instagram when deployed) */
.instagram-section {
  flex-shrink: 0;
  width: 100%;
  margin-top: 1.75rem;
  padding-top: 0.5rem;
}

/* Instagram embeds: column on small screens, two columns on wide screens */
.instagram-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  width: 100%;
  margin-bottom: 0.75rem;
  align-items: start;
  justify-items: center;
}

@media (min-width: 880px) {
  .instagram-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-items: stretch;
  }
}

.instagram-embed {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 540px;
}

/* No white card behind embed placeholders (Instagram script may set inline bg) */
.instagram-embed blockquote.instagram-media,
.instagram-embed blockquote.instagram-media > a {
  background: transparent !important;
}

.instagram-embed iframe,
.instagram-embed iframe.instagram-media {
  background: transparent !important;
}

@media (min-width: 880px) {
  .instagram-embed {
    max-width: none;
  }
}

.instagram-status {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  min-height: 1.35em;
}

.instagram-status:empty {
  display: none;
}

.instagram-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
  width: 100%;
}

/* Events tile — subtle --c-teal wash; border + neon accents; text uses --text on dark bg */
.events-tile {
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  margin: 2rem auto 0;
  padding: 1.35rem 1.25rem 1.5rem;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 171, 161, 0.09);
  box-shadow: none;
  text-align: left;
}

.events-tile__heading.rainbow-chars {
  margin: 0 0 1.15rem;
  font-size: clamp(1.05rem, 2.5vw, 1.28rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  line-height: 1.2;
}

/* Lime is low-contrast on white; use cyan for that cycle step (still in palette) */
.events-tile__heading.rainbow-chars > span:nth-child(5n + 4 of :not(.rainbow-chars__gap)) {
  color: var(--c-teal);
}

.events-tile__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 700px) {
  .events-tile__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.events-tile__item {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.events-tile__item:hover {
  border-color: rgba(255, 0, 150, 0.45);
  box-shadow: 0 4px 18px rgba(255, 0, 150, 0.12);
  transform: translateY(-1px);
}

.events-tile__when {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 3.6rem;
  padding: 0.4rem 0.5rem;
  border-radius: 10px;
  line-height: 1.1;
  background: transparent;
}

.events-tile__item:nth-child(odd) .events-tile__when {
  border: 2px solid var(--c-teal);
  box-shadow: 0 0 16px rgba(0, 171, 161, 0.2);
}

.events-tile__item:nth-child(even) .events-tile__when {
  border: 2px solid var(--c-pink);
  box-shadow: 0 0 16px rgba(255, 0, 150, 0.15);
}

.events-tile__month {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--c-pink);
}

.events-tile__item:nth-child(even) .events-tile__month {
  color: var(--c-teal);
}

.events-tile__day {
  font-size: 1.32rem;
  font-weight: 700;
  color: var(--text);
}

.events-tile__year {
  font-size: 0.56rem;
  font-weight: 600;
  color: var(--text-muted);
}

.events-tile__detail {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
  min-width: 0;
}

.events-tile__event-name {
  font-size: clamp(0.95rem, 2.2vw, 1.06rem);
  font-weight: 700;
  color: var(--text);
}

a.events-tile__event-link {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(255, 0, 150, 0.4);
  text-underline-offset: 0.18em;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a.events-tile__event-link:hover {
  color: var(--c-pink);
  text-decoration-color: var(--c-pink);
}

a.events-tile__event-link:focus-visible {
  outline: 2px solid var(--c-teal);
  outline-offset: 3px;
  border-radius: 4px;
}

.events-tile__meta {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.instagram-tile {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: none;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.instagram-tile:hover,
.instagram-tile:focus-within {
  transform: translateY(-2px);
  border-color: var(--c-pink);
  box-shadow: 0 0 20px rgba(255, 0, 150, 0.18);
}

.instagram-tile:focus-visible {
  outline: 2px solid var(--c-yellow);
  outline-offset: 2px;
}

.instagram-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  vertical-align: middle;
}

.instagram-tile__link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.instagram-tile__badge {
  position: absolute;
  bottom: 0.35rem;
  right: 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.65);
  color: var(--c-yellow);
}

/* Home: large sky-style star → look-at-my-cat.html (matches .stars-sky .star) */
.home-cat-link {
  position: fixed;
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  right: max(1rem, env(safe-area-inset-right, 0px));
  z-index: 18;
  display: block;
  padding: 0.25rem 0.45rem;
  line-height: 1;
  text-decoration: none;
  border-radius: 14px;
  pointer-events: auto;
  transition:
    transform 0.2s ease,
    filter 0.2s ease;
}

.home-cat-link__star {
  display: block;
  font-family: var(--font-sans);
  color: var(--star);
  line-height: 1;
  user-select: none;
  letter-spacing: 0;
  opacity: 0.9;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
  font-size: clamp(2.35rem, 8vw, 3.6rem);
  transform: rotate(-10deg);
  animation: star-twinkle 3.1s ease-in-out infinite;
  animation-delay: -0.85s;
}

.home-cat-link:hover .home-cat-link__star,
.home-cat-link:focus-visible .home-cat-link__star {
  filter: brightness(1.35);
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.35),
    0 0 22px rgba(255, 255, 255, 0.25);
}

.home-cat-link:hover {
  transform: scale(1.06);
}

.home-cat-link:focus-visible {
  outline: 2px solid var(--c-yellow);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .home-cat-link__star {
    animation: none;
  }

  .home-cat-link:hover {
    transform: none;
  }
}

/* Look at my Cat page */
.cat-page {
  width: 100%;
  max-width: 36rem;
  margin: 0 auto 1rem;
  text-align: center;
}

.cat-page__intro {
  text-align: left;
  margin-bottom: 1.25rem;
}

.cat-gallery {
  width: 100%;
  max-width: min(1120px, 100%);
  margin: 0 auto 1rem;
}

.cat-gallery__hero {
  margin: 0 0 1.1rem;
}

.cat-gallery__hero > a {
  display: block;
}

.cat-gallery__hero-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}
