:root {
  --page-left: clamp(13rem, 15vw, 20rem); /* 208px–320px */
  --page-top: clamp(13rem, 30vh, 20rem); /* 208px–320px */
  --section-gap: 6.25rem; /* 100px */
  --column-gap: 6.25rem; /* 100px */
  --column-width: 225px;
  --item-gap: 12px;
  --muted: #8e8e8e;
  --project-left: 30rem;
}

* {
  box-sizing: border-box;
}

html {
  font-family: "Karla", sans-serif;
  color: #282828;
  background: #fff;
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: clip;
}

.intro {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100svh;
  padding: var(--page-top) 2rem 4.5rem var(--page-left);
  background: #fff;
}

.intro::before {
  position: absolute;
  z-index: -2;
  inset: -12%;
  content: "";
  background:
    radial-gradient(
      ellipse 55% 42% at 4% -6%,
      color-mix(in srgb, var(--sky-color, rgb(75 171 237)) 70%, transparent) 0%,
      color-mix(in srgb, var(--glow-color, rgb(212 177 232)) 42%, transparent) 38%,
      color-mix(in srgb, var(--cloud-color, rgb(227 233 236)) 24%, transparent) 58%,
      transparent 78%
    ),
    radial-gradient(
      ellipse 60% 72% at 85% 12%,
      color-mix(in srgb, var(--sky-color, rgb(75 171 237)) 92%, transparent) 0%,
      color-mix(in srgb, var(--sky-color, rgb(75 171 237)) 58%, transparent) 34%,
      color-mix(in srgb, var(--sky-color, rgb(75 171 237)) 18%, transparent) 61%,
      transparent 78%
    ),
    radial-gradient(
      ellipse 54% 60% at 72% 42%,
      color-mix(in srgb, var(--glow-color, rgb(212 177 232)) 78%, transparent) 0%,
      color-mix(in srgb, var(--glow-color, rgb(212 177 232)) 34%, transparent) 47%,
      transparent 76%
    ),
    radial-gradient(
      ellipse 62% 48% at 58% 4%,
      color-mix(in srgb, var(--cloud-color, rgb(227 233 236)) 95%, transparent) 0%,
      color-mix(in srgb, var(--cloud-color, rgb(227 233 236)) 42%, transparent) 52%,
      transparent 82%
    );
  filter: blur(18px) saturate(108%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 68%, transparent 90%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 68%, transparent 90%);
  transform: scale(1.04);
  animation: gradient-drift 20s ease-in-out infinite alternate;
}

.intro::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image:
    repeating-radial-gradient(
      circle at 17% 32%,
      rgb(0 0 0 / 24%) 0,
      rgb(0 0 0 / 24%) 0.45px,
      transparent 0.7px,
      transparent 2.5px
    ),
    repeating-radial-gradient(
      circle at 73% 67%,
      rgb(255 255 255 / 30%) 0,
      rgb(255 255 255 / 30%) 0.4px,
      transparent 0.65px,
      transparent 3px
    );
  background-size: 2.5px 2.5px, 3.5px 3.5px;
  mix-blend-mode: soft-light;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 72%, transparent 90%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 72%, transparent 90%);
  opacity: 0.68;
  animation: grain-shift 0.7s steps(2, end) infinite;
}

@keyframes gradient-drift {
  0% {
    transform: scale(1.02) translate3d(-5%, -3%, 0) rotate(-1deg);
    
  }

  50% {
    transform: scale(1.3) translate3d(-14%, 10%, 0) rotate(2deg);
    
  }

  100% {
    transform: scale(1.14) translate3d(13%, -9%, 0) rotate(-2deg);
    
  }
}

@keyframes grain-shift {
  0% {
    transform: translate(0, 0);
  }

  25% {
    transform: translate(-1px, 1px);
  }

  50% {
    transform: translate(1px, -1px);
  }

  75% {
    transform: translate(1px, 1px);
  }
}

h1 {
  max-width: 58rem;
  margin: 0;
  font-size: 2.125rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.details {
  display: grid;
  grid-template-columns: repeat(3, var(--column-width));
  gap: var(--column-gap);
  margin-top: var(--section-gap);
}

.detail {
  width: var(--column-width);
}

.detail--experience.is-sticky {
  position: fixed;
  z-index: 10;
  top: 4rem;
  left: var(--page-left);
}

.detail--experience.is-sticky h2 {
  display: none;
}

body.has-sticky-experience .intro {
  overflow: visible;
}

h2 {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

ul,
ol {
  display: grid;
  gap: var(--item-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

li {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.2;
}

.experience-list li {
  position: relative;
}

.experience-list a {
  color: inherit;
  text-decoration: none;
  transition: color 180ms ease, font-weight 180ms ease;
}

.experience-list a:hover,
.experience-list a:focus-visible,
.experience-list a.is-active {
  color: var(--link-accent, rgb(75 171 237));
}

.experience-list a.is-active {
  font-weight: 600;
}

.year {
  position: absolute;
  top: 0.2em;
  right: calc(100% + 12px);
  width: max-content;
  color: #8E8E8E;
  font-size: 0.875rem;
  line-height: 1.2;
  text-align: right;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
}

a:hover,
a:focus-visible {
  color: var(--link-accent, rgb(75 171 237));
}

.work-link {
  position: absolute;
  bottom: 1.5rem;
  left: var(--page-left);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-transform: uppercase;
}

.projects {
  padding: 7.5rem 0 10rem var(--project-left);
  overflow: hidden;
  background: #fff;
}

.project + .project {
  margin-top: 7.5rem; /* 120px */
}

.project {
  scroll-margin-top: 4rem;
}

.project-title {
  margin: 0;
  color: #282828;
  font-size: 1.625rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-transform: none;
}

.project-meta {
  display: grid;
  grid-template-columns: minmax(0, 700px) repeat(2, minmax(0, var(--column-width)));
  gap: var(--column-gap);
  margin-top: 3rem;
}

.project-meta h3 {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.project-meta p,
.carousel-footer p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
}

.carousel {
  margin-top: 6.5rem;
}

.carousel-viewport {
  width: calc(100% + var(--project-left));
  margin-left: calc(-1 * var(--project-left));
  overflow-x: auto;
  cursor: var(--cloud-cursor, grab);
  scroll-padding-left: var(--project-left);
  scrollbar-width: none;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  touch-action: pan-y;
}

.carousel-viewport::-webkit-scrollbar {
  display: none;
}

.carousel-viewport.is-dragging {
  cursor: var(--cloud-cursor, grabbing);
  scroll-behavior: auto;
  scroll-snap-type: none;
  user-select: none;
}

.carousel-viewport:focus-visible {
  outline: 2px solid #000;
  outline-offset: 4px;
}

.carousel-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  padding-left: var(--project-left);
  padding-right: 1.5rem;
}

.carousel-slide {
  flex: 0 0 calc((100vw - var(--project-left) - 1.5rem) / 1.5);
  aspect-ratio: 16 / 9;
  min-width: 36rem;
  background: #d9d9d9;
  scroll-snap-align: start;
}

.carousel-slide--lavender {
  background: #d4b1e8;
}

.carousel-slide--blue {
  background: #4babed;
}

.carousel-footer {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 1rem;
}

.carousel-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
  height: 30px;
  box-sizing: border-box;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--readable-link, var(--link-accent, #6dbeef));
  color: var(--page-surface, #fff);
}

.carousel-controls button {
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: inherit;
  background: transparent;
  cursor: var(--cloud-cursor, pointer);
  font: inherit;
}

.carousel-controls button svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 150ms ease;
}

.carousel-controls button:hover svg,
.carousel-controls button:focus-visible svg {
  transform: scale(1.15);
}

@media (prefers-reduced-motion: reduce) {
  .carousel-controls button svg { transition: none; }
}

.carousel-controls button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 1px;
}

.carousel-controls .carousel-count {
  min-width: 32px;
  text-align: center;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.carousel-count,
.carousel-caption {
  font-size: 1rem;
}

@media (min-width: 850.01px) {
  .details > .detail:nth-child(2) {
    grid-column: 2;
  }

  .details > .detail:nth-child(3) {
    grid-column: 3;
  }
}

@media (max-width: 850px) {
  .intro {
    padding-left: clamp(7rem, 18vw, 12rem);
  }

  .details {
    grid-template-columns: repeat(2, var(--column-width));
    row-gap: 4rem;
  }

  .work-link {
    left: clamp(7rem, 18vw, 12rem);
  }

  .projects {
    --project-left: clamp(7rem, 18vw, 12rem);
    padding-left: clamp(7rem, 18vw, 12rem);
  }

  .project-meta {
    grid-template-columns: repeat(2, var(--column-width));
    row-gap: 3rem;
  }

  .carousel-slide {
    flex-basis: 68vw;
    min-width: 32rem;
  }
}

@media (max-width: 850px) {
  :root {
    --section-gap: 4rem;
  }

  .intro {
    min-height: auto;
    padding: 4rem 1.5rem 3rem;
  }

  h1 {
    max-width: 22rem;
    font-size: clamp(1.875rem, 8vw, 2.125rem);
  }

  .details {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }

  .detail,
  .detail--experience {
    width: min(100%, var(--column-width));
  }

  .detail--experience {
    width: min(100%, 18rem);
    margin-left: 0;
  }

  .experience-list li {
    display: grid;
    grid-template-columns: 5rem minmax(0, 1fr);
    column-gap: 12px;
  }

  .year {
    position: static;
    width: auto;
    text-align: left;
  }

  .work-link {
    position: static;
    display: inline-block;
    margin-top: 5rem;
  }

  .projects {
    --project-left: 1.5rem;
    padding: 5rem 0 7.5rem 1.5rem;
  }

  .project + .project {
    margin-top: 7.5rem;
  }

  .project-meta {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2.5rem;
    padding-right: 1.5rem;
  }

  .project-meta h3 {
    margin-bottom: 0.75rem;
  }

  .carousel {
    margin-top: 4rem;
  }

  .carousel-slide {
    flex-basis: 78vw;
    min-width: 0;
  }

  .carousel-footer {
    align-items: flex-start;
    gap: 1.25rem;
    padding-right: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .intro::before,
  .intro::after {
    animation: none;
  }
}

/* Four complete phone demos, arranged in the reference order. */
.instagram-meta {
  grid-template-columns: minmax(0, 28rem) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 6.25rem);
  padding-right: 2rem;
}

.instagram-meta h3 { margin-bottom: 0.75rem; }

.instagram-meta ul { gap: 0; }
.instagram-meta a { text-decoration: none; }

.instagram-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.2vw, 1.5rem);
  margin-top: 5.5rem;
  padding-right: 2rem;
}

.instagram-grid video {
  display: block;
  width: 100%;
  min-width: 0;
  aspect-ratio: 400 / 867;
  object-fit: cover;
  border: 0;
  box-shadow: 0 0 0 4px #000;
  border-radius: clamp(1.25rem, 2.2vw, 3rem);
  background: #000;
  scroll-margin-top: 4rem;
}

@media (max-width: 850px) {
  .instagram-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 850px) {
  .instagram-meta { grid-template-columns: 1fr; padding-right: 1.5rem; }
  .instagram-grid { margin-top: 3rem; padding-right: 1.5rem; }
}

/* Keep the title-to-details spacing compact at every screen size. */
#instagram .instagram-meta,
.project--reels .instagram-meta { margin-top: 1.5rem; }


.instagram-meta--skills {
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 0.6fr) minmax(0, 1.25fr);
  gap: clamp(1.5rem, 3.5vw, 5rem);
}

@media (max-width: 850px) {
  .instagram-meta--skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .instagram-meta--skills > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 850px) {
  .instagram-meta--skills { grid-template-columns: 1fr; }
}

.instagram-meta--skills > :last-child p { max-width: 14rem; }

.project--carousel-creation .instagram-meta { margin-top: 1.5rem; }
.project--carousel-creation .instagram-meta > :last-child p,
.project--gallery .instagram-meta > :last-child p { max-width: 18rem; }
.carousel-comparison {
  grid-template-columns: minmax(0, 1fr) clamp(1rem, 2.5vw, 3rem) repeat(3, minmax(0, 1fr));
}
.comparison-item { min-width: 0; margin: 0; }
.comparison-item--before { grid-column: 1; }
.carousel-comparison .comparison-item:nth-child(2) { grid-column: 3; }
.comparison-item figcaption { margin-bottom: 1.5rem; font-size: 1rem; font-weight: 600; }
@media (max-width: 850px) {
  .carousel-comparison { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2rem; }
  .comparison-item--before { grid-column: 1 / -1; width: calc((100% - clamp(0.75rem, 1.2vw, 1.5rem)) / 2); margin-bottom: 1rem; }
  .carousel-comparison .comparison-item:nth-child(2) { grid-column: auto; }
}

.detail--experience.is-sticky .experience-landing-only { display: none; }

/* Keep the landing experience list intact; show project groups after scrolling. */
.experience-projects { display: none; }
.detail--experience.is-sticky .experience-landing { display: none; }
.detail--experience.is-sticky .experience-projects { display: grid; }

.selected-work-title { display: none; }
.detail--experience.is-sticky .selected-work-title { display: block; }

.project--gallery .project-meta { margin-top: 1.5rem; }
.gallery-toolbar {
  display: flex;
  justify-content: flex-end;
  padding-right: 1.5rem;
  margin-bottom: 1.5rem;
}
.gallery-carousel .carousel-slide {
  display: block;
  min-width: 0;
  width: calc((100vw - var(--project-left) - 1.5rem) / 1.5);
  height: auto;
  object-fit: contain;
  background: transparent;
}
@media (max-width: 850px) {
  .gallery-carousel .carousel-slide {
    flex-basis: calc(100vw - var(--project-left) - 1.5rem);
    width: calc(100vw - var(--project-left) - 1.5rem);
  }
}

/* Center gallery slides vertically while preserving their individual sizes. */
.gallery-carousel .carousel-track { align-items: center; }
.gallery-carousel .gallery-slide--large {
  flex: 0 0 auto;
  width: auto;
  height: 550px;
  aspect-ratio: auto;
}

.gallery-carousel .gallery-comparison-slide {
  margin: 0;
  height: auto;
  background: transparent;
}
.gallery-comparison-slide figcaption {
  margin-bottom: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}
.gallery-comparison-image {
  display: block;
  width: auto;
  height: 550px;
}

/* Use a consistent image height throughout the Gallery System carousel. */
.gallery-carousel img.carousel-slide {
  flex: 0 0 auto;
  width: auto;
  height: 550px;
  aspect-ratio: auto;
}

.gallery-comparison-image--before { height: 575px; }

.project--gallery .gallery-carousel { margin-top: 1rem; }

.project--listing-cards .project-meta { margin-top: 1.5rem; }
.project--listing-cards .instagram-meta > :last-child p { max-width: 18rem; }
.project--listing-cards .gallery-carousel { margin-top: 1rem; }
.gallery-carousel video.carousel-slide {
  display: block;
  flex: 0 0 auto;
  min-width: 0;
  width: auto;
  height: 550px;
  aspect-ratio: auto;
  object-fit: contain;
  background: transparent;
}

/* Outside strokes preserve the listing media dimensions. */
.project--listing-cards .carousel-slide {
  border-radius: 24px;
  outline: 4px solid #F2F2F2;
  outline-offset: 0;
}
.project--listing-cards .carousel-slide:nth-child(2) {
  outline-color: #000;
}
.project--listing-cards .carousel-track {
  padding-top: 4px;
  padding-bottom: 4px;
}

.project--art-department .project-meta { margin-top: 1.5rem; }
.project--art-department .instagram-meta > :last-child p { max-width: 18rem; }
.project--art-department .gallery-carousel { margin-top: 1rem; }
.project--art-department .carousel-slide { border-radius: 12px; }

.project--hackillinois .project-meta { margin-top: 3rem; }
.project--hackillinois .project-meta > :last-child p { max-width: 18rem; }

.project--hackillinois .gallery-carousel { margin-top: 1rem; }
.project--hackillinois .carousel-slide { border-radius: 12px; }

/* NYC's sky sets the palette; typography follows the header reference. */
.intro h1 { max-width: 75rem; font-size: clamp(2.5rem, 3.2vw, 3.75rem); }
.local-conditions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.25em 0.65em;
  margin: 0.12em 0 0; color: #A9A9A9;
  font-size: clamp(2.5rem, 3.2vw, 3.75rem); font-weight: 600;
  line-height: 1.2; letter-spacing: -0.02em;
}
.local-clock { white-space: nowrap; }
.local-weather { display: inline-flex; align-items: center; gap: 0.1em; text-decoration: none; white-space: nowrap; }
.local-weather svg { display: block; width: 0.9em; height: 0.9em; }
.local-weather:hover, .local-weather:focus-visible { color: var(--link-accent, rgb(75 171 237)); }
.details { grid-template-columns: repeat(2, var(--column-width)); column-gap: 1.25rem; margin-top: 4rem; }
@media (max-width: 850px) {
  .intro h1, .local-conditions { font-size: clamp(2rem, 7.5vw, 2.75rem); }
  .details { grid-template-columns: 1fr; }
}

/* Carousel navigation sits below each context paragraph. */
.context-carousel-controls {
  justify-content: flex-start;
  margin: 1.5rem 0 0;
  padding: 0;
}

/* Soft sculpted clouds travel behind the header without intercepting links. */
.day-clouds {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 2s ease;
  -webkit-mask-image: linear-gradient(#000 0%, #000 45%, transparent 78%);
  mask-image: linear-gradient(#000 0%, #000 45%, transparent 78%);
}
.day-clouds { opacity: var(--day-cloud-opacity, 0); }
.sky-cloud {
  position: absolute;
  left: 0;
  width: var(--cloud-width);
  aspect-ratio: 480 / 220;
  background: url("assets/day-cloud.svg") center / contain no-repeat;
  filter: drop-shadow(0 12px 18px rgb(95 124 160 / 10%));
  animation: cloud-crossing var(--cloud-duration) linear infinite;
  animation-delay: var(--cloud-delay);
  will-change: transform;
}
.sky-cloud--one { --cloud-width: clamp(220px, 25vw, 440px); --cloud-duration: 100s; --cloud-delay: -18s; top: 5%; }
.sky-cloud--two { --cloud-width: clamp(170px, 19vw, 330px); --cloud-duration: 135s; --cloud-delay: -78s; top: 18%; opacity: 0.7; filter: blur(1px); }
.sky-cloud--three { --cloud-width: clamp(250px, 31vw, 540px); --cloud-duration: 165s; --cloud-delay: -125s; top: 1%; opacity: 0.8; }
@keyframes cloud-crossing {
  from { transform: translateX(calc(-1 * var(--cloud-width))); }
  to { transform: translateX(100vw); }
}
@media (prefers-reduced-motion: reduce) {
  .day-clouds { transition: none; }
  .sky-cloud { animation: none; will-change: auto; }
  .sky-cloud--one { left: 5%; }
  .sky-cloud--two { left: 70%; }
  .sky-cloud--three { left: 40%; }
}

/* Hover, keyboard, and touch controls share the same clock preview. */
.clock-preview { position: relative; display: inline-flex; }
.local-clock {
  padding: 0; border: 0; background: transparent; color: inherit;
  font: inherit; letter-spacing: inherit; line-height: inherit;
  cursor: var(--cloud-cursor, pointer); text-align: left;
}
.local-clock:hover, .local-clock:focus-visible, .local-clock.is-previewing { color: var(--link-accent, #6dbeef); }
.local-clock:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; border-radius: 3px; }
.time-preview-panel {
  position: absolute; z-index: 20; top: calc(100% + 14px); left: 0;
  display: grid; gap: 16px; width: min(340px, calc(100vw - 3rem));
  padding: 18px; border: 1px solid rgb(255 255 255 / 80%); border-radius: 16px;
  background: rgb(255 255 255 / 94%); color: #666;
  box-shadow: 0 8px 32px rgb(40 50 75 / 12%);
  backdrop-filter: blur(16px); font-size: 13px; font-weight: 400;
  line-height: 1.3; letter-spacing: 0; white-space: normal;
}
.time-preview-panel[hidden] { display: none; }
.time-preview-panel::before { content: ""; position: absolute; inset: -16px 0 auto; height: 16px; }
.time-preview-heading, .time-preview-labels { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.time-preview-heading label { font-weight: 600; }
#time-preview-reset { padding: 4px 8px; border: 0; border-radius: 6px; font: inherit; color: #666; background: #f1f3f5; cursor: var(--cloud-cursor, pointer); }
#time-preview-reset:hover, #time-preview-reset:focus-visible { color: var(--link-accent, #6dbeef); }
#time-preview-slider { display: block; width: 100%; margin: 0; cursor: var(--cloud-cursor, ew-resize); accent-color: var(--link-accent, #6dbeef); }
.time-preview-labels { color: #999; font-size: 11px; }
#time-preview-value { color: #666; }

/* Registered colors interpolate even when the slider jumps or resets. */
@property --sky-color { syntax: '<color>'; inherits: true; initial-value: #6dbeef; }
@property --glow-color { syntax: '<color>'; inherits: true; initial-value: #bed2ef; }
@property --cloud-color { syntax: '<color>'; inherits: true; initial-value: #f3e1ba; }
.intro { transition: --sky-color 600ms ease, --glow-color 600ms ease, --cloud-color 600ms ease; }
@media (prefers-reduced-motion: reduce) {
  .intro { transition: none; }
}

/* Deep nighttime base keeps the sky from washing out against white. */
@property --sky-base { syntax: '<color>'; inherits: true; initial-value: #fff; }
@property --header-ink { syntax: '<color>'; inherits: true; initial-value: #282828; }
.intro {
  background: linear-gradient(to bottom, var(--sky-base) 0%, var(--sky-base) 35%, var(--page-surface, #fff) 100%);
  color: var(--header-ink);
  transition: --sky-color 600ms ease, --glow-color 600ms ease, --cloud-color 600ms ease, --sky-base 600ms ease, --header-ink 600ms ease;
}
.detail--experience.is-sticky { color: var(--page-ink, #282828); }
@media (prefers-reduced-motion: reduce) { .intro { transition: none; } }

/* The night sky fades into the same black used throughout the portfolio. */
@property --page-surface { syntax: '<color>'; inherits: true; initial-value: #fff; }
@property --page-ink { syntax: '<color>'; inherits: true; initial-value: #282828; }
html {
  background: var(--page-surface);
  color: var(--page-ink);
  transition: --page-surface 600ms ease, --page-ink 600ms ease;
}
body, .projects { background: var(--page-surface); color: var(--page-ink); }
.project-title { color: var(--page-ink); }
.carousel-viewport:focus-visible { outline-color: var(--page-ink); }
.time-preview-panel {
  background: color-mix(in srgb, var(--page-surface) 94%, transparent);
  color: var(--page-ink);
  border-color: color-mix(in srgb, var(--page-ink) 15%, transparent);
}
#time-preview-value, #time-preview-reset { color: var(--page-ink); }
#time-preview-reset { background: color-mix(in srgb, var(--page-ink) 8%, var(--page-surface)); }
a:hover, a:focus-visible, .experience-list a:hover,
.experience-list a:focus-visible, .experience-list a.is-active,
.local-weather:hover, .local-weather:focus-visible,
.local-clock:hover, .local-clock:focus-visible, .local-clock.is-previewing,
#time-preview-reset:hover, #time-preview-reset:focus-visible {
  color: color-mix(in srgb, var(--link-accent, #6dbeef), white var(--night-link-tint, 0%));
}
@media (prefers-reduced-motion: reduce) { html { transition: none; } }

.weather-preview { position: relative; display: inline-flex; }
button.local-weather { padding: 0; border: 0; background: transparent; font: inherit; letter-spacing: inherit; line-height: inherit; color: inherit; cursor: var(--cloud-cursor, pointer); }
.weather-preview .time-preview-panel { left: auto; right: 0; }
.weather-preview-note, .weather-credit { font-size: 11px; color: #999; }
.weather-credit { width: fit-content; }
.preview-reset { padding: 4px 8px; border: 0; border-radius: 6px; font: inherit; color: var(--page-ink); background: color-mix(in srgb, var(--page-ink) 8%, var(--page-surface)); cursor: var(--cloud-cursor, pointer); }
.preview-reset:hover, .preview-reset:focus-visible, button.local-weather:hover, button.local-weather:focus-visible, button.local-weather.is-previewing {
  color: color-mix(in srgb, var(--link-accent, #6dbeef), white var(--night-link-tint, 0%));
}
#weather-preview-slider { width: 100%; margin: 0; accent-color: color-mix(in srgb, var(--link-accent, #6dbeef), white var(--night-link-tint, 0%)); cursor: var(--cloud-cursor, ew-resize); }
@media (max-width: 850px) { .weather-preview .time-preview-panel { left: 0; right: auto; width: min(300px, calc(100vw - 3rem)); } }
.extra-cloud { opacity: 0; transition: opacity 1.5s; }
.sky-cloud--four { --cloud-width: 35vw; --cloud-duration: 110s; --cloud-delay: -54s; top: 8%; }
.sky-cloud--five { --cloud-width: 28vw; --cloud-duration: 145s; --cloud-delay: -28s; top: 27%; }
.sky-cloud--six { --cloud-width: 40vw; --cloud-duration: 180s; --cloud-delay: -104s; top: 14%; }
.sky-cloud--seven { --cloud-width: 32vw; --cloud-duration: 155s; --cloud-delay: -138s; top: 33%; }
.sky-cloud--eight { --cloud-width: 30vw; --cloud-duration: 125s; --cloud-delay: -65s; top: 2%; }
.intro[data-weather="cloudy"] .extra-cloud,
.intro[data-weather="rain"] .extra-cloud,
.intro[data-weather="snow"] .extra-cloud,
.intro[data-weather="storm"] .extra-cloud { opacity: 0.85; }
.intro[data-weather="clear"] .sky-cloud--three { opacity: 0; }
.intro[data-weather="storm"] .day-clouds { filter: brightness(0.65); }
.sky-effect { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity 1.5s; mask-image: linear-gradient(#000 0%, #000 55%, transparent 95%); }
.sky-stars { opacity: var(--star-opacity, 0); }
.sky-stars i { position: absolute; left: var(--x); top: var(--y); width: var(--size); height: var(--size); background: #e4f2ff; border-radius: 50%; box-shadow: 0 0 5px rgb(167 209 255 / 45%); animation: star-twinkle var(--duration) ease-in-out var(--delay) infinite alternate; }
@keyframes star-twinkle { from { opacity: 0.25; } to { opacity: 0.9; } }
.sky-rain i { position: absolute; left: var(--x); top: -40px; width: 1px; height: 30px; background: linear-gradient(transparent, rgb(149 190 222 / 70%)); animation: rain-fall var(--duration) linear var(--delay) infinite; }
.intro[data-weather="rain"] .sky-rain { opacity: 0.7; }
.intro[data-weather="storm"] .sky-rain { opacity: 1; }
.intro[data-weather="storm"] .sky-rain i { height: 45px; animation-duration: 0.55s; }
@keyframes rain-fall { from { transform: translate3d(70px, -40px, 0) rotate(12deg); } to { transform: translate3d(-100px, 100svh, 0) rotate(12deg); } }
.sky-snow i { position: absolute; left: var(--x); top: -15px; width: calc(var(--size) * 1.4); height: calc(var(--size) * 1.4); border-radius: 50%; background: #fff; box-shadow: 0 0 4px rgb(156 184 209 / 40%); animation: snow-fall calc(var(--duration) * 2) linear var(--delay) infinite; }
.intro[data-weather="snow"] .sky-snow { opacity: 0.9; }
@keyframes snow-fall { 0% { transform: translate3d(0, -15px, 0); } 50% { transform: translate3d(35px, 50svh, 0); } 100% { transform: translate3d(-20px, 100svh, 0); } }
.sky-fog { background: radial-gradient(ellipse at 20% 30%, rgb(215 224 230 / 55%), transparent 65%), radial-gradient(ellipse at 85% 48%, rgb(215 224 230 / 45%), transparent 60%); filter: blur(25px); animation: fog-drift 24s ease-in-out infinite alternate; }
.intro[data-weather="fog"] .sky-fog { opacity: 0.8; }
@keyframes fog-drift { from { transform: translateX(-5%); } to { transform: translateX(5%); } }
.sky-meteor { opacity: var(--meteor-opacity, 0); }
.sky-meteor i { position: absolute; left: 68%; top: 8%; width: 130px; height: 2px; background: linear-gradient(to right, transparent, #e4f2ff); border-radius: 50%; transform: rotate(30deg); opacity: 0; animation: shooting-star 32s linear 8s infinite; }
@keyframes shooting-star { 0%, 94% { opacity: 0; transform: translate3d(0, 0, 0) rotate(30deg); } 94.5% { opacity: 1; } 98% { opacity: 0; transform: translate3d(350px, 202px, 0) rotate(30deg); } 100% { opacity: 0; transform: translate3d(350px, 202px, 0) rotate(30deg); } }
@media (prefers-reduced-motion: reduce) {
  .sky-effect, .extra-cloud { transition: none; }
  .sky-effect, .sky-effect i { animation: none; }
  .sky-rain i, .sky-snow i { top: var(--y); }
  .sky-stars i { opacity: 0.65; }
  .sky-meteor { display: none; }
  .sky-cloud--four { left: 15%; } .sky-cloud--five { left: 60%; }
  .sky-cloud--six { left: 35%; } .sky-cloud--seven { left: 5%; } .sky-cloud--eight { left: 75%; }
}

/* Heavier precipitation: denser particles with more visible streaks and flakes. */
.sky-rain i { width: 1.5px; height: 42px; background: linear-gradient(transparent, rgb(149 190 222 / 90%)); }
.intro[data-weather="rain"] .sky-rain { opacity: 0.9; }
.intro[data-weather="storm"] .sky-rain i { width: 2px; height: 55px; }
.sky-snow i { width: calc(var(--size) * 1.7); height: calc(var(--size) * 1.7); }
.intro[data-weather="snow"] .sky-snow { opacity: 1; }

/* Overscan the fog so drifting and blur cannot expose clear screen edges. */
.sky-fog {
  inset: -20%;
  min-height: 140svh;
  mask-image: none;
  -webkit-mask-image: none;
  background:
    radial-gradient(ellipse at 20% 30%, rgb(215 224 230 / 45%), transparent 75%),
    radial-gradient(ellipse at 85% 48%, rgb(215 224 230 / 40%), transparent 75%),
    linear-gradient(rgb(215 224 230 / 20%), rgb(215 224 230 / 35%));
}
/* Most stars stay steady; scattered stars shimmer at independent speeds. */
.sky-stars i { animation: none; opacity: 0.6; }
.sky-stars i:nth-child(3n), .sky-stars i:nth-child(7n) {
  animation: star-twinkle var(--duration) ease-in-out var(--delay) infinite;
}
@keyframes star-twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.8); box-shadow: 0 0 2px rgb(167 209 255 / 20%); }
  50% { opacity: 1; transform: scale(1.3); box-shadow: 0 0 9px rgb(205 231 255 / 85%); }
}
@media (prefers-reduced-motion: reduce) {
  .sky-stars i:nth-child(3n), .sky-stars i:nth-child(7n) { animation: none; opacity: 0.65; }
}

/* Fog follows the sky from pale daytime mist to dark nighttime haze. */
@property --fog-color { syntax: '<color>'; inherits: true; initial-value: #d7e0e6; }
.sky-fog {
  background:
    radial-gradient(ellipse at 20% 30%, color-mix(in srgb, var(--fog-color) 45%, transparent), transparent 75%),
    radial-gradient(ellipse at 85% 48%, color-mix(in srgb, var(--fog-color) 40%, transparent), transparent 75%),
    linear-gradient(color-mix(in srgb, var(--fog-color) 20%, transparent), color-mix(in srgb, var(--fog-color) 35%, transparent));
  transition: opacity 1.5s, --fog-color 600ms ease;
}
@media (prefers-reduced-motion: reduce) { .sky-fog { transition: none; } }

/* Lightning softly illuminates individual storm clouds from within. */
.sky-cloud::after {
  content: ""; position: absolute; inset: 0;
  background: url("assets/day-cloud.svg") center / contain no-repeat;
  filter: brightness(2.2) saturate(0.35) drop-shadow(0 0 12px rgb(184 204 255 / 35%));
  opacity: 0;
}
.intro[data-weather="storm"] .sky-cloud--one::after,
.intro[data-weather="storm"] .sky-cloud--six::after {
  animation: storm-cloud-glow 19s ease-in-out infinite;
}
.intro[data-weather="storm"] .sky-cloud--one::after { animation-delay: -6s; }
.intro[data-weather="storm"] .sky-cloud--six::after { animation-duration: 27s; animation-delay: -18s; }
@keyframes storm-cloud-glow {
  0%, 80%, 92%, 100% { opacity: 0; }
  84% { opacity: 0.65; }
  87% { opacity: 0.2; }
  89% { opacity: 0.45; }
}
@media (prefers-reduced-motion: reduce) {
  .intro[data-weather="storm"] .sky-cloud::after { animation: none; opacity: 0; }
}

/* Personal updates align with Contact and hide when the layout narrows. */
.details { grid-template-columns: var(--column-width) var(--column-width) minmax(225px, 320px); column-gap: 2rem; }
.detail--lately { width: 100%; }
.lately-list li { display: flex; align-items: flex-start; gap: 10px; }
.lately-list svg { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.lately-pending { color: var(--muted); }
@media (max-width: 850px) {
  .details { grid-template-columns: repeat(2, var(--column-width)); }
  .detail--lately { display: none; }
}
@media (max-width: 850px) {
  .details { grid-template-columns: minmax(0, 1fr); }
  .detail--lately { grid-column: 1; }
}

/* Give personal updates more room beside Contact. */
@media (min-width: 850.01px) {
  .details {
    grid-template-columns: var(--column-width) calc(var(--column-width) + 3rem) minmax(225px, 320px);
  }
}
.intro a { text-decoration: none; }

.lately-list .game-controller-icon { stroke-width: 1.9; }


.intro .detail > h2 { font-size: 12px; }

.temperature-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.temperature-heading label { font-weight: 600; }
.temperature-units { display: inline-flex; padding: 2px; border-radius: 7px; background: color-mix(in srgb, var(--page-ink) 8%, var(--page-surface)); }
.temperature-units button { border: 0; padding: 4px 9px; border-radius: 5px; font: inherit; background: transparent; color: var(--page-ink); cursor: var(--cloud-cursor, pointer); }
.temperature-units button[aria-pressed="true"] { background: var(--page-surface); box-shadow: 0 1px 4px rgb(0 0 0 / 12%); }
#temperature-preview-slider { width: 100%; margin: 0; accent-color: color-mix(in srgb, var(--link-accent, #6dbeef), white var(--night-link-tint, 0%)); cursor: var(--cloud-cursor, ew-resize); }
.sky-filter-definitions { position: absolute; pointer-events: none; }
.intro[data-temperature="hot"]::before { filter: url("#heat-distortion") blur(18px) saturate(115%) !important; }
.intro[data-temperature="hot"] .day-clouds { filter: url("#heat-distortion"); }
@media (prefers-reduced-motion: reduce) {
  .intro[data-temperature="hot"]::before { filter: blur(18px) saturate(115%) !important; }
  .intro[data-temperature="hot"] .day-clouds { filter: none; }
}

/* Keep hover menus anchored while time and temperature digits change. */
.local-conditions, .time-preview-panel { font-variant-numeric: tabular-nums; }
#nyc-time { display: inline-block; text-align: left; }
#weather-temperature { display: inline-block; min-width: 5.3ch; text-align: left; }
.weather-preview .time-preview-panel { left: 0; right: auto; }
.time-preview-labels > :first-child,
.time-preview-labels > :last-child { min-width: 6ch; }
.time-preview-labels > :last-child { text-align: right; }
#temperature-preview-value { min-width: 7ch; text-align: center; }

/* Temperature effects reach the text while preview controls remain usable. */
.intro[data-temperature="hot"] h1,
.intro[data-temperature="hot"] .local-clock,
.intro[data-temperature="hot"] .local-weather,
.intro[data-temperature="hot"] .details,
.intro[data-temperature="hot"] .work-link { filter: url("#heat-distortion"); }
@media (prefers-reduced-motion: reduce) {
  .intro[data-temperature="hot"] h1,
  .intro[data-temperature="hot"] .local-clock,
  .intro[data-temperature="hot"] .local-weather,
  .intro[data-temperature="hot"] .details,
  .intro[data-temperature="hot"] .work-link { filter: none; }
}

/* Foreground colors switch for contrast instead of fading through gray. */
html { transition: --page-surface 600ms ease; }
.intro { transition: --sky-color 600ms ease, --glow-color 600ms ease, --cloud-color 600ms ease, --sky-base 600ms ease; }
.local-conditions { color: var(--conditions-ink, #A9A9A9); }
.intro .details { color: var(--header-ink); }
.detail--experience.is-sticky { color: var(--page-ink); }
@media (prefers-reduced-motion: reduce) { html, .intro { transition: none; } }

a:hover, a:focus-visible, .experience-list a:hover,
.experience-list a:focus-visible, .experience-list a.is-active,
.local-clock:hover, .local-clock:focus-visible, .local-clock.is-previewing,
button.local-weather:hover, button.local-weather:focus-visible, button.local-weather.is-previewing {
  color: var(--readable-link, var(--page-ink));
}
.detail--experience.is-sticky { --readable-link: inherit; }

.local-conditions, .intro .detail > h2 { color: #8E8E8E; }

.work-link, .project-meta h3 { color: #8E8E8E; }

.local-conditions { column-gap: 0.65em; }
.local-clock, button.local-weather {
  color: var(--readable-link, var(--link-accent, #6dbeef));
}

.intro .detail > h2 { margin-bottom: 0.75rem; }

/* Real star positions, projected as a decorative all-sky view above NYC. */
#constellation-sky { z-index: 0; mask-image: none; -webkit-mask-image: none; }
#constellation-map { display: block; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.catalog-star { fill: #e4f2ff; opacity: 0.7; }
.twinkling-star { animation: catalog-twinkle var(--duration) ease-in-out var(--delay) infinite; }
@keyframes catalog-twinkle { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
.constellation-hit { fill: none; stroke: transparent; stroke-width: 24px; pointer-events: none; }
#constellation-sky.is-night .constellation-hit { pointer-events: stroke; cursor: var(--cloud-cursor, pointer); }
.constellation-outline { fill: none; stroke: #badbff; stroke-width: 1.2px; opacity: 0; pointer-events: none; transition: opacity 250ms ease; }
.constellation-label { font: 13px "Karla", sans-serif; fill: #e4f2ff; paint-order: stroke; stroke: #001123; stroke-width: 3px; stroke-linejoin: round; opacity: 0; pointer-events: none; transition: opacity 250ms ease; }
.constellation-group:hover .constellation-outline,
.constellation-group:focus .constellation-outline,
.constellation-group.is-revealed .constellation-outline,
.constellation-group:hover .constellation-label,
.constellation-group:focus .constellation-label,
.constellation-group.is-revealed .constellation-label { opacity: 0.85; }
.constellation-group { outline: none; }
.intro > h1, .intro > .local-conditions, .intro > .details { position: relative; z-index: 1; }
.intro > .work-link { z-index: 1; }
@media (prefers-reduced-motion: reduce) {
  .twinkling-star { animation: none; }
  .constellation-outline, .constellation-label { transition: none; }
}

/* Put menus above their triggers and above the heading/content layers. */
.intro > .local-conditions { z-index: 10; }
.time-preview-panel { top: calc(100% + 14px); bottom: auto; }
.time-preview-panel::before { inset: -16px 0 auto; height: 16px; }
.catalog-star { opacity: 0.85; }
#constellation-sky { display: block; visibility: visible; }

/* Clouds pass in front of the full-width constellation field. */
#constellation-sky { z-index: -2; }
.intro::before { z-index: -3; }
.day-clouds { z-index: -1; }

/* Night clouds occlude stars instead of letting them show through. */
#constellation-sky { z-index: -2; }
.day-clouds { z-index: 0; }
.intro[data-sky^="night-"] .day-clouds { opacity: 0.78; filter: brightness(0.32) saturate(0.6); }
.intro[data-sky^="night-"] .sky-cloud:not(.extra-cloud) { opacity: 1; }
.intro[data-sky="night-clear"] .sky-cloud--three { opacity: 0; }
.intro[data-sky^="night-"][data-weather="cloudy"] .extra-cloud,
.intro[data-sky^="night-"][data-weather="rain"] .extra-cloud,
.intro[data-sky^="night-"][data-weather="snow"] .extra-cloud,
.intro[data-sky^="night-"][data-weather="storm"] .extra-cloud { opacity: 1; }
.constellation-star { animation: constellation-star-twinkle var(--duration) ease-in-out var(--delay) infinite; }
@keyframes constellation-star-twinkle {
  0%, 100% { opacity: 0.12; r: 1px; filter: drop-shadow(0 0 1px #a7d1ff); }
  45% { opacity: 0.55; r: 1.55px; }
  60% { opacity: 1; r: 2.7px; filter: drop-shadow(0 0 7px #e0f1ff); }
  80% { opacity: 0.45; r: 1.4px; }
}
@media (prefers-reduced-motion: reduce) { .constellation-star { animation: none; opacity: 0.85; } }

/* Keep the sky steady; only constellation stars have a soft glow. */
.twinkling-star, .constellation-star { animation: none; }
.catalog-star { opacity: 0.65; }
.constellation-star { opacity: 1; r: 1.9px; fill: #f0f8ff; filter: drop-shadow(0 0 3px rgb(205 231 255 / 95%)) drop-shadow(0 0 7px rgb(167 209 255 / 70%)); }

.constellation-area { fill: transparent; stroke: none; pointer-events: none; }
#constellation-sky.is-night .constellation-area { pointer-events: fill; cursor: var(--cloud-cursor, pointer); }

/* Constellations fade in with a soft halo when revealed. */
.constellation-outline {
  transition: opacity 650ms ease;
  filter: drop-shadow(0 0 3px rgb(186 219 255 / 80%)) drop-shadow(0 0 7px rgb(136 187 255 / 45%));
}
.constellation-label { transition: opacity 650ms ease; }
@media (prefers-reduced-motion: reduce) {
  .constellation-outline, .constellation-label { transition: none; }
}

/* Keep compositing cheap: gradients move without animating their blur. */
.intro::after { animation: none; }
.constellation-star { filter: none; }
.constellation-star-halo { pointer-events: none; }
.constellation-outline { filter: none; }
.constellation-line-halo { fill: none; stroke: rgb(136 187 255 / 22%); stroke-width: 5px; opacity: 0; pointer-events: none; transition: opacity 650ms ease; }
.constellation-group:hover .constellation-line-halo,
.constellation-group:focus .constellation-line-halo,
.constellation-group.is-revealed .constellation-line-halo { opacity: 0.85; }
.intro:not([data-weather="rain"]):not([data-weather="storm"]) .sky-rain i,
.intro:not([data-weather="snow"]) .sky-snow i,
.intro:not([data-weather="fog"]) .sky-fog,
.intro:not([data-sky^="night-"]) .sky-meteor i { animation-play-state: paused; }
.intro[data-weather="clear"] .extra-cloud,
.intro[data-weather="partly-cloudy"] .extra-cloud,
.intro[data-weather="unknown"] .extra-cloud { animation-play-state: paused; }
.intro.is-sky-paused::before, .intro.is-sky-paused::after,
.intro.is-sky-paused *, .intro.is-sky-paused *::after { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) { .constellation-line-halo { transition: none; } }

/* A simpler star field: crisp dots, with constellation stars slightly brighter. */
.catalog-star { animation: none; filter: none; opacity: 0.55; }
.constellation-star { r: 1.7px; opacity: 0.95; filter: none; }

/* Existing media strokes switch to gray against the black night surface. */
html.has-black-background .instagram-grid video { box-shadow: 0 0 0 4px #3D3D3D; }
html.has-black-background .project--listing-cards .carousel-slide { outline-color: #3D3D3D; }

#time-preview-slider { accent-color: color-mix(in srgb, var(--link-accent, #6dbeef), white var(--night-link-tint, 0%)); }

/* The outer button drifts; its inner shape can poof without moving that anchor. */
button.sky-cloud {
  padding: 0; border: 0; background: none; color: inherit;
  pointer-events: auto; cursor: var(--cloud-cursor, pointer); -webkit-tap-highlight-color: transparent;
}
.sky-cloud:hover, .sky-cloud:focus-visible, .sky-cloud.is-poofing { animation-play-state: paused; }
.sky-cloud:focus-visible { outline: 2px dashed var(--link-accent, #6dbeef); outline-offset: 4px; border-radius: 50%; }
.cloud-shape {
  display: block; position: absolute; inset: 0;
  background: var(--cloud-shape, url("assets/day-cloud.svg")) center / contain no-repeat;
  pointer-events: none; transform-origin: center;
}
.sky-cloud[data-shape="heart"] { --cloud-shape: url("assets/day-cloud-heart.svg?v=3"); }
.sky-cloud[data-shape="rabbit"] { --cloud-shape: url("assets/day-cloud-rabbit.svg?v=1"); }
.sky-cloud::after { background-image: var(--cloud-shape, url("assets/day-cloud.svg")); pointer-events: none; }
.intro[data-weather="clear"] .extra-cloud,
.intro[data-weather="partly-cloudy"] .extra-cloud,
.intro[data-weather="unknown"] .extra-cloud,
.intro[data-weather="clear"] .sky-cloud--three { visibility: hidden; }

/* Native cloud cursor, with no tracking delay. Touch keeps its normal behavior. */
@media (hover: hover) and (pointer: fine) {
  :root:not(.is-scrolled) { --cloud-cursor: url("assets/sun-cursor.svg?v=1") 1 1, auto; }
  :root[data-weather="cloudy"]:not(.is-scrolled) { --cloud-cursor: url("assets/cloud-cursor.svg?v=1") 1 1, auto; }
  :root[data-weather="partly-cloudy"]:not(.is-scrolled) { --cloud-cursor: url("assets/partly-cloudy-cursor.svg?v=1") 1 1, auto; }
  :root[data-weather="rain"]:not(.is-scrolled) { --cloud-cursor: url("assets/rain-cursor.svg?v=1") 1 1, auto; }
  :root[data-weather="storm"]:not(.is-scrolled) { --cloud-cursor: url("assets/storm-cursor.svg?v=1") 1 1, auto; }
  :root[data-weather="snow"]:not(.is-scrolled) { --cloud-cursor: url("assets/snow-cursor.svg?v=1") 1 1, auto; }
  :root.is-night:not(.is-scrolled) { --cloud-cursor: var(--night-cursor, url("assets/star-cursor.svg?v=1") 1 1, auto); }
  body, input, select, label { cursor: var(--cloud-cursor, auto); }
  a, button { cursor: var(--cloud-cursor, pointer); }
}

/* A slightly fuller shower, with longer, faster drops. */
.intro[data-weather="rain"] .sky-rain { opacity: 1; }
.intro[data-weather="rain"] .sky-rain i {
  width: 1.8px; height: 48px;
  animation-duration: calc(var(--duration) * .85);
}


/* Mobile projects show one complete item and a preview of the next. */
@media (max-width: 850px) {
  .projects { --mobile-slide-width: calc(100vw - 72px); }

  .gallery-carousel .carousel-viewport {
    touch-action: pan-x pan-y;
    scroll-snap-type: x mandatory;
  }
  .gallery-carousel .carousel-track {
    gap: 16px;
    padding-top: 4px;
    padding-bottom: 4px;
    padding-right: 72px;
    align-items: flex-start;
  }
  .gallery-carousel .carousel-slide,
  .gallery-carousel img.carousel-slide,
  .gallery-carousel video.carousel-slide,
  .gallery-carousel .gallery-slide--large {
    flex: 0 0 var(--mobile-slide-width);
    width: var(--mobile-slide-width);
    min-width: 0;
    height: auto;
    max-height: none;
    aspect-ratio: auto;
    object-fit: contain;
    object-position: top left;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  .gallery-carousel .gallery-comparison-image {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    object-position: top left;
  }

  .instagram-grid,
  .instagram-grid.carousel-comparison {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    overflow-x: auto;
    padding: 4px 72px 4px 4px;
    margin-left: -4px;
    scroll-padding-left: 4px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    touch-action: pan-x pan-y;
  }
  .instagram-grid::-webkit-scrollbar { display: none; }
  .instagram-grid > video,
  .instagram-grid > .comparison-item {
    flex: 0 0 var(--mobile-slide-width);
    width: var(--mobile-slide-width);
    min-width: 0;
    margin: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  .instagram-grid video {
    aspect-ratio: auto;
    height: auto;
    max-height: none;
    object-fit: contain;
    background: transparent;
  }
  .comparison-item video { width: 100%; }
}

/* Controls follow all project details and sit directly above the media. */
.project > .context-carousel-controls { margin: 20px 0 0; }
.project .gallery-carousel { margin-top: 8px; }
.gallery-carousel .carousel-track { align-items: center; }
.gallery-carousel .media-frame,
.gallery-carousel .gallery-comparison-slide {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: 0 0 auto;
  width: min(680px, calc(100vw - var(--project-left) - 48px));
  height: auto;
  aspect-ratio: auto;
  background: transparent;
  outline: none;
  border-radius: 0;
}
.gallery-carousel .carousel-media,
.gallery-carousel .gallery-comparison-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 550px;
  object-fit: contain;
}
.gallery-comparison-slide figcaption { align-self: flex-start; }
.project--listing-cards .carousel-media {
  border-radius: 24px;
  outline: 4px solid #F2F2F2;
}
.project--listing-cards .media-frame:nth-child(2) .carousel-media { outline-color: #000; }
html.has-black-background .project--listing-cards .carousel-media { outline-color: #3D3D3D; }
.project--art-department .carousel-media,
.project--hackillinois .carousel-media { border-radius: 12px; }
@media (max-width: 850px) {
  .gallery-carousel .media-frame,
  .gallery-carousel .gallery-comparison-slide {
    flex: 0 0 var(--mobile-slide-width);
    width: var(--mobile-slide-width);
  }
  .gallery-carousel .carousel-media,
  .gallery-carousel .gallery-comparison-image {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: min(62vw, 320px);
    object-position: center;
  }
  .instagram-grid,
  .instagram-grid.carousel-comparison { align-items: center; }
}

/* Portrait media keeps a fixed mobile height without letterboxing. */
@media (max-width: 850px) {
  .gallery-carousel .carousel-media.is-portrait,
  .gallery-carousel .gallery-comparison-image.is-portrait,
  .instagram-grid video.is-portrait {
    height: 500px;
    width: auto;
    max-height: none;
    max-width: none;
    aspect-ratio: auto;
    flex: 0 0 auto;
  }
  .gallery-carousel .media-frame:has(.is-portrait),
  .gallery-carousel .gallery-comparison-slide:has(.is-portrait),
  .instagram-grid > .comparison-item:has(.is-portrait) {
    flex: 0 0 auto;
    width: max-content;
    min-width: 0;
    height: auto;
  }
}

/* Mobile controls and stable slide slots are ready before media loads. */
.mobile-carousel-controls { display: none; }
@media (min-width: 850.01px) {
  .mobile-project-carousel, .mobile-project-viewport { display: contents; }
  .instagram-grid > .carousel-slide { min-width: 0; aspect-ratio: auto; background: transparent; }
  .instagram-grid > video.carousel-slide { aspect-ratio: 400 / 867; background: #000; }
}
@media (max-width: 850px) {
  .mobile-carousel-controls { display: flex; }
  .mobile-project-viewport {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 4px;
    scrollbar-width: none;
    touch-action: pan-x pan-y;
    margin-left: -4px;
  }
  .mobile-project-viewport::-webkit-scrollbar { display: none; }
  .mobile-project-viewport .instagram-grid {
    overflow: visible;
    margin: 8px 0 0;
    width: max-content;
    padding: 4px 72px 4px 4px;
  }
  .gallery-carousel .media-frame,
  .gallery-carousel .gallery-comparison-slide,
  .gallery-carousel .media-frame:has(.is-portrait),
  .gallery-carousel .gallery-comparison-slide:has(.is-portrait),
  .instagram-grid > .comparison-item:has(.is-portrait) {
    flex: 0 0 var(--mobile-slide-width);
    width: var(--mobile-slide-width);
  }
  .instagram-grid > .carousel-slide {
    flex: 0 0 var(--mobile-slide-width);
    width: var(--mobile-slide-width);
    min-width: 0;
    aspect-ratio: auto;
    background: transparent;
    scroll-snap-stop: always;
  }
  .instagram-grid > .comparison-item { display: flex; flex-direction: column; align-items: center; }
  .instagram-grid > video.is-portrait {
    object-fit: contain;
    box-shadow: none;
    border-radius: 0;
  }
}

@media (min-width: 850.01px) {
  .instagram-grid > .comparison-item { min-width: 0; }
}
@media (max-width: 850px) {
  .instagram-grid .comparison-item video.is-portrait { height: 500px; width: auto; }
  .instagram-grid > .comparison-item { justify-content: center; }
  .gallery-carousel .carousel-track { min-height: 1px; }
}

/* Mobile carousels show a single centered slide, with no neighboring peek. */
@media (max-width: 850px) {
  .gallery-carousel .carousel-viewport,
  .mobile-project-viewport {
    position: relative;
    width: 100vw;
    margin-left: -24px;
    scroll-padding-left: 0;
  }
  .gallery-carousel .carousel-track,
  .mobile-project-viewport .instagram-grid {
    display: flex;
    gap: 0;
    padding: 4px 0;
    margin-left: 0;
    align-items: center;
  }
  .gallery-carousel .media-frame,
  .gallery-carousel .gallery-comparison-slide,
  .gallery-carousel .media-frame:has(.is-portrait),
  .gallery-carousel .gallery-comparison-slide:has(.is-portrait),
  .instagram-grid > .carousel-slide,
  .instagram-grid > .comparison-item:has(.is-portrait) {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 100vw;
    width: 100vw;
    min-width: 0;
    padding: 0 24px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  .gallery-carousel .carousel-media,
  .gallery-carousel .gallery-comparison-image,
  .instagram-grid .comparison-item video {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: none;
    aspect-ratio: auto;
  }
  .gallery-carousel .carousel-media.is-portrait,
  .gallery-carousel .gallery-comparison-image.is-portrait,
  .instagram-grid .comparison-item video.is-portrait {
    --portrait-height: clamp(300px, calc((100vw - 48px) / var(--media-ratio, 0.46)), 600px);
    height: var(--portrait-height);
    width: calc(var(--portrait-height) * var(--media-ratio, 0.46));
    max-height: 600px;
    min-height: 300px;
    max-width: 100%;
  }
  .gallery-comparison-slide figcaption { align-self: center; }
}

/* Mobile media uses softer corners and centered controls below the carousel. */
@media (max-width: 850px) {
  .project { display: flex; flex-direction: column; }
  .project > .project-title { order: 0; }
  .project > .project-meta { order: 1; }
  .project > .gallery-carousel,
  .project > .mobile-project-carousel { order: 2; }
  .project > .context-carousel-controls {
    order: 3;
    display: flex;
    justify-content: center;
    width: 100vw;
    margin: 16px 0 0 -24px;
    padding: 0;
  }
  .gallery-carousel .carousel-media,
  .gallery-carousel .gallery-comparison-image,
  .instagram-grid .comparison-item video {
    border-radius: 32px;
  }
  .gallery-carousel .carousel-viewport,
  .mobile-project-viewport {
    overflow-x: auto;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
  }
}

/* Compact mobile introduction with more breathing room. */
.mobile-intro-copy { display: none; }
@media (max-width: 850px) {
  .intro { padding-top: 112px; }
  .intro .detail--lately { display: none; }
  .desktop-intro-copy { display: none; }
  .mobile-intro-copy { display: inline; }
  .project > .gallery-carousel,
  .project > .mobile-project-carousel { margin-top: 32px; }
  .mobile-project-viewport .instagram-grid { margin-top: 0; }
}

.mobile-selected-work-title { display: none; }
@media (max-width: 850px) {
  .mobile-selected-work-title {
    display: block;
    margin: 0 0 32px;
    font-size: 12px;
    color: #8E8E8E;
  }
}

.link-ending { white-space: nowrap; }

/* Selected links keep their label and arrow on a single line. */
.project-meta a { white-space: nowrap; }

/* Keep the original desktop columns; stack Skills when space gets tight. */
@media (min-width: 850.01px) and (max-width: 90rem) {
  .instagram-meta--skills {
    grid-template-columns: minmax(0, 1.8fr) max-content;
  }
  .project-meta > .project-skills { grid-column: 1 / -1; }
  .instagram-meta--skills > .project-skills { max-width: 32rem; }
  .instagram-meta--skills > .project-skills p { max-width: none; }
}

/* Let project context paragraphs flex with the layout, up to 600px. */
.project-meta > :first-child > p { max-width: 600px; }

/* Mobile Carousel Creation shows only the three after examples. */
@media (max-width: 850px) {
  .carousel-comparison > .comparison-item--before { display: none; }
  .carousel-comparison .comparison-item figcaption { display: none; }
}

/* Context and Skills share the same maximum width across every project. */
.project-meta > :first-child,
.project-meta > .project-skills { max-width: 700px; }
.project-meta > :first-child > p,
.projects .project .project-meta > .project-skills > p { max-width: 700px; }

/* Compact desktop keeps web styling while reclaiming the side-navigation space. */
@media (min-width: 850.01px) and (max-width: 1199.99px) {
  .projects {
    --project-left: 32px;
    padding-left: 32px;
  }
  .intro .detail--lately { display: none; }
  .intro .details { grid-template-columns: repeat(2, var(--column-width)); }
}

/* Keep Selected Links 24px from the Context column while side by side. */
@media (min-width: 850.01px) {
  .project-meta { column-gap: 24px; }
  .instagram-meta--skills {
    grid-template-columns: minmax(0, 700px) max-content minmax(0, 1.25fr);
  }
}
@media (min-width: 850.01px) and (max-width: 90rem) {
  .instagram-meta--skills { grid-template-columns: minmax(0, 700px) max-content; }
}

/* Keep these desktop galleries compact around each media item's edges. */
@media (min-width: 850.01px) {
  .project--art-department .carousel-track,
  .project--listing-cards .carousel-track { gap: 12px; }
  .project--art-department .media-frame,
  .project--listing-cards .media-frame {
    width: max-content;
    flex: 0 0 auto;
  }
  .project--art-department .carousel-media,
  .project--listing-cards .carousel-media {
    width: auto;
    height: 550px;
    max-width: none;
  }
}
/* HackIllinois media shares a consistent height within each layout. */
.project--hackillinois .carousel-media {
  width: auto;
  height: 550px;
  max-height: none;
  max-width: none;
}
@media (max-width: 850px) {
  .project--hackillinois .carousel-media,
  .project--hackillinois .carousel-media.is-portrait {
    height: min(300px, calc((100vw - 48px) / var(--hackillinois-max-ratio, 1.78)));
    min-height: 0;
    max-height: none;
    width: auto;
    max-width: 100%;
  }
}

@media (min-width: 850.01px) {
  .project--hackillinois .media-frame { width: max-content; flex: 0 0 auto; }
}

@media (min-width: 850.01px) {
  .project--listing-cards .carousel-track { gap: 20px; }
}

@media (min-width: 850.01px) {
  .project--hackillinois .carousel-track { gap: 12px; }
}

/* Use one shared Context column width so every project responds consistently. */
.project-meta > :first-child,
.project-meta > :first-child > p { max-width: 600px; }
@media (min-width: 850.01px) {
  .projects { --context-width: min(550px, calc((100vw - var(--project-left) - 48px) * 0.6)); }
  .project-meta,
  .instagram-meta--skills {
    grid-template-columns: var(--context-width) max-content minmax(0, 1fr);
  }
  .project-meta > :first-child { width: var(--context-width); }
}
@media (min-width: 850.01px) and (max-width: 90rem) {
  .project-meta,
  .instagram-meta--skills { grid-template-columns: var(--context-width) max-content; }
}

/* Keep Context and Skills readable; wrap sections before they become too narrow. */
.project-meta > :first-child,
.project-meta > .project-skills { min-width: min(400px, 100%); }
@media (min-width: 850.01px) {
  .projects { --context-width: clamp(400px, calc((100vw - var(--project-left) - 48px) * 0.6), 550px); }
  .project-meta,
  .instagram-meta--skills {
    display: flex;
    flex-wrap: wrap;
    column-gap: 24px;
  }
  .project-meta > :first-child { flex: 0 0 var(--context-width); }
  .project-meta > div:not(:first-child):not(.project-skills) { flex: 0 0 auto; }
  .project-meta > .project-skills { flex: 1 1 400px; }
}
@media (min-width: 850.01px) and (max-width: 90rem) {
  .project-meta > .project-skills { flex-basis: 100%; }
}

/* Apply the same Skills cap to every project and layout. */
.projects .project .project-meta > .project-skills,
.projects .project .project-meta > .project-skills > p { max-width: 300px; }

.projects .project .project-meta > .project-skills { min-width: min(200px, 100%); }
@media (min-width: 850.01px) {
  .project-meta > .project-skills { flex-basis: 200px; }
}
@media (min-width: 850.01px) and (max-width: 90rem) {
  .project-meta > .project-skills { flex-basis: 100%; }
}

.project-meta > :first-child,
.project-meta > :first-child > p { max-width: 550px; }

/* Context expands only when the details need separate rows. */
.project { container-type: inline-size; }
.project-meta > :first-child,
.project-meta > :first-child > p { max-width: 600px; }
@media (min-width: 850.01px) {
  .project-meta,
  .instagram-meta--skills {
    display: grid;
    grid-template-columns: max-content minmax(200px, 300px);
  }
  .project-meta > :first-child {
    grid-column: 1 / -1;
    width: min(600px, 100%);
  }
  .project-meta > .project-skills { grid-column: auto; }
}
@container (min-width: 1000px) {
  @media (min-width: 850.01px) {
    .project-meta,
    .instagram-meta--skills { grid-template-columns: 450px max-content minmax(200px, 300px); }
    .project-meta > :first-child { grid-column: auto; width: 450px; max-width: 450px; }
  }
}

/* Give project details more breathing room in both rows and columns. */
.project-meta,
.instagram-meta--skills { gap: 40px; }

/* Desktop image enlargement preserves the existing image layout. */
.image-enlarge-trigger {
  display: contents;
  padding: 0;
  border: 0;
  background: transparent;
}
@media (min-width: 850.01px) {
  .image-enlarge-trigger img { cursor: zoom-in; }
  .image-enlarge-trigger:focus-visible img { outline: 2px solid var(--page-ink); outline-offset: 6px; }
}
.image-viewer-open { overflow: hidden; }
.image-viewer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 48px;
  border: 0;
  background: rgb(0 0 0 / 90%);
  color: white;
}
.image-viewer[open] { display: flex; align-items: center; justify-content: center; }
.image-viewer::backdrop { background: rgb(0 0 0 / 70%); }
.image-viewer > img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.image-viewer-close {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #333;
  color: white;
  font-size: 28px;
  cursor: pointer;
}
.image-viewer-close:focus-visible { outline: 2px solid white; outline-offset: 3px; }

@media (min-width: 850.01px) {
  .image-enlarge-trigger video { cursor: zoom-in; }
  .image-enlarge-trigger:focus-visible video { outline: 2px solid var(--page-ink); outline-offset: 6px; }
}
.image-viewer > video { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.image-viewer > [hidden] { display: none; }

/* Gallery System assets share one height without comparison captions. */
.project--gallery .carousel-media,
.project--gallery .gallery-comparison-image {
  width: auto;
  height: 550px;
  max-width: none;
  max-height: none;
}
@media (min-width: 850.01px) {
  .project--gallery .media-frame,
  .project--gallery .gallery-comparison-slide { width: max-content; flex: 0 0 auto; }
}
@media (max-width: 850px) {
  .project--gallery .carousel-media,
  .project--gallery .gallery-comparison-image {
    height: calc((100vw - 48px) / 1.77875);
    width: auto;
    max-width: 100%;
  }
}

@media (min-width: 850.01px) {
  .project--gallery .carousel-track { gap: 12px; }
}

/* City selection shares the subtitle's live time and weather styling. */
.city-preview { position: relative; display: inline-block; white-space: nowrap; }
.city-toggle {
  padding: 0; border: 0; background: transparent;
  font: inherit; letter-spacing: inherit; color: var(--readable-link, var(--page-ink));
  cursor: var(--cloud-cursor, pointer);
}
.city-toggle:hover, .city-toggle:focus-visible { text-decoration: none; }
.city-panel { z-index: 30; width: min(240px, calc(100vw - 3rem)); }
.city-panel[hidden] { display: none; }
.city-panel::before { content: ''; position: absolute; inset: -16px 0 auto; height: 16px; }
.city-panel > button {
  padding: 10px 12px; border: 0; border-radius: 8px; background: transparent;
  color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.city-panel > button:hover, .city-panel > button:focus-visible,
.city-panel > button[aria-pressed="true"] { background: color-mix(in srgb, var(--page-ink) 10%, var(--page-surface)); }
.city-menu-title { font-weight: 600; }

/* Let time and weather wrap independently with the subtitle. */
.conditions-live-group { display: contents; }

/* When the subtitle overflows, stack city, time, and weather in that order. */
.local-conditions.is-stacked { flex-direction: column; align-items: flex-start; }

@media (hover: hover) and (pointer: fine) {
  .cloud-shape { transition: scale 220ms ease; }
  .sky-cloud:hover .cloud-shape,
  .sky-cloud:focus-visible .cloud-shape { scale: 1.07; }
}
.cursor-sunlight {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 240px;
  margin: -120px 0 0 -120px;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(255 231 153 / 40%) 0%, rgb(255 216 117 / 20%) 30%, rgb(255 210 105 / 7%) 50%, transparent 72%);
  opacity: 0;
  transition: opacity 180ms ease;
}
.cursor-sunlight.is-visible { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .cloud-shape, .cursor-sunlight { transition: none; }
}

/* Match frames to the Carousel Creation videos' native proportions. */
.project--carousel-creation .comparison-item video {
  aspect-ratio: auto;
  object-fit: cover;
  background: #000;
}
.project--listing-cards .carousel-media,
.project--art-department .carousel-media,
.project--hackillinois .carousel-media { border-radius: 16px; }
@media (max-width: 850px) {
  .project--gallery .gallery-comparison-image {
    width: 100%;
    height: auto;
    max-width: 100%;
  }
  .project--carousel-creation .comparison-item video {
    height: auto;
    width: 100%;
  }
  .project--carousel-creation .comparison-item video.is-portrait {
    height: var(--portrait-height);
    width: calc(var(--portrait-height) * var(--media-ratio));
  }
  .image-viewer { padding: 56px 12px 24px; }
}

#city-prefix { display: inline-block; }
.time-preview-panel { background: var(--page-surface); }

/* Consistent carousel corners for the last four projects. */
.project--gallery .carousel-media,
.project--gallery .gallery-comparison-image,
.project--listing-cards .carousel-media,
.project--art-department .carousel-media,
.project--hackillinois .carousel-media { border-radius: 24px; }
@media (max-width: 850px) {
  .project--gallery .carousel-media,
  .project--gallery .gallery-comparison-image,
  .project--listing-cards .carousel-media,
  .project--art-department .carousel-media,
  .project--hackillinois .carousel-media { border-radius: 12px; }
}

.image-viewer { padding-bottom: 88px; }
.image-viewer-navigation {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #333;
  color: #fff;
  font-size: 14px;
}
.image-viewer-navigation button {
  width: 44px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 26px;
  cursor: pointer;
}
.image-viewer-navigation button:disabled { opacity: 0.3; cursor: default; }
.image-viewer-navigation button:focus-visible { outline: 2px solid white; }
.image-viewer-navigation span { min-width: 40px; text-align: center; font-variant-numeric: tabular-nums; }
.image-viewer > img { touch-action: pan-y pinch-zoom; }

/* Pink balloon lettering remains crisp and readable at both layout sizes. */
.intro .balloon-heading { max-width: 780px; }
.balloon-title { display: block; width: 100%; height: auto; }
.designer-role { display: block; margin-top: -0.35em; }
@media (max-width: 850px) {
  .intro .balloon-heading { width: 100%; max-width: 640px; }
  .designer-role { margin-top: 0; }
}

/* Align the visible lettering, accounting for the image's transparent margins. */
.intro { padding-top: max(96px, calc(var(--page-top) - 40px)); }
.intro .balloon-heading {
  position: relative;
  width: 100%;
  aspect-ratio: 4.8;
}
.balloon-title {
  position: absolute;
  top: 0;
  left: -2.8%;
  width: 106%;
  max-width: none;
  transform: translateY(-25%);
}
@media (max-width: 850px) {
  .intro { padding-top: 80px; }
}

/* Independent balloon letters have slight natural overlaps and resting tilts. */
.intro .balloon-heading { aspect-ratio: auto; }
.balloon-letters { display: flex; align-items: center; width: 100%; padding: 12px 0; }
.balloon-letter {
  display: block;
  position: relative;
  flex: var(--weight) 1 0;
  min-width: 0;
  margin-left: -0.5%;
  transform: translateY(var(--lift)) rotate(var(--tilt));
  transform-origin: 50% 75%;
  transition: transform 320ms cubic-bezier(.2,.7,.3,1);
}
.balloon-letter:first-child { margin-left: 0; }
.balloon-letter svg { display: block; width: 100%; height: auto; overflow: hidden; }
@media (hover: hover) and (pointer: fine) {
  .balloon-letter:hover {
    z-index: 2;
    transform: translateY(calc(var(--lift) - 9px)) rotate(calc(var(--tilt) + 2deg));
  }
}
@media (prefers-reduced-motion: reduce) {
  .balloon-letter { transition: none; }
  .balloon-letter:hover { transform: translateY(var(--lift)) rotate(var(--tilt)); }
}

/* A little breathing room between “I'm” and “Lisa”. */
.balloon-letter:nth-of-type(7) { margin-left: 4%; }

.balloon-filter-defs { position: absolute; pointer-events: none; }

.balloon-letter { cursor: var(--cloud-cursor, pointer); -webkit-tap-highlight-color: transparent; }
.balloon-letter:focus-visible { outline: 2px dashed var(--readable-link, currentColor); outline-offset: 4px; border-radius: 16px; }

.balloon-pop-burst { position: absolute; inset: 50% auto auto 50%; pointer-events: none; }
.balloon-pop-burst > span {
  position: absolute;
  width: 3px;
  height: 10px;
  border-radius: 99px;
  background: #e994b8;
  opacity: 0;
  animation: balloon-pop-ray 260ms 45ms ease-out forwards;
}
@keyframes balloon-pop-ray {
  0% { opacity: 0; transform: rotate(var(--angle)) translateY(-8px) scaleY(.5); }
  20% { opacity: .9; }
  100% { opacity: 0; transform: rotate(var(--angle)) translateY(-48px) scaleY(.3); }
}

/* Each balloon drifts gently at its own pace, independent of hover and pop. */
.balloon-letter {
  animation: balloon-idle-float 8s ease-in-out infinite;
  animation-delay: -1.2s;
}
.balloon-letter:nth-of-type(2n) { animation-duration: 9s; animation-delay: -3.1s; }
.balloon-letter:nth-of-type(3n) { animation-duration: 7.5s; animation-delay: -4.2s; }
.balloon-letter:nth-of-type(4n) { animation-duration: 9.5s; animation-delay: -2.3s; }
@keyframes balloon-idle-float {
  0%, 100% { translate: 0 4px; }
  50% { translate: 0 -4px; }
}
@media (prefers-reduced-motion: reduce) {
  .balloon-letter { animation: none; translate: none; }
}

/* Separate the greeting from “I'm” slightly more. */
.balloon-letter:nth-of-type(4) { margin-left: 1.5%; }

/* Tighten apostrophe-to-m spacing; following letters move together. */
.balloon-letter:nth-of-type(6) { margin-left: -1.5%; }

/* Move only the apostrophe, preserving the following letters’ positions. */
.balloon-letter:nth-of-type(5) { left: 0.6%; }

.local-conditions { font-family: "Space Mono", monospace; font-weight: 400; }

/* A slightly smaller bold mono subtitle, with more space before the details. */
.local-conditions {
  font-family: "Space Mono", monospace;
  font-weight: 700;
  font-size: clamp(2rem, 2.7vw, 3.125rem);
}
.intro .details { margin-top: 6rem; }
@media (max-width: 850px) {
  .local-conditions { font-size: clamp(1.75rem, 6.5vw, 2.375rem); }
}

.local-conditions { font-family: "Karla", sans-serif; font-weight: 600; }

/* Bring every sky layer back to the page surface before the header ends. */
.sky-bottom-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: clamp(140px, 24vh, 280px);
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(to bottom,
    transparent 0%,
    color-mix(in srgb, var(--page-surface) 35%, transparent) 35%,
    color-mix(in srgb, var(--page-surface) 85%, transparent) 70%,
    var(--page-surface) 96%, var(--page-surface) 100%);
}

/* Link indicators appear without shifting the label or surrounding layout. */
a { position: relative; }
a::after {
  content: '→';
  position: absolute;
  left: 100%;
  margin-left: 0.3em;
  color: currentColor;
  opacity: 0;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 150ms ease;
}
a:hover::after,
a:focus-visible::after { opacity: 1; }
.experience-projects a::after { content: '•'; margin-left: 0.5em; }
.experience-projects a.is-active::after { opacity: 1; }
@media (prefers-reduced-motion: reduce) { a::after { transition: none; } }

.experience-projects a::after { margin-left: 0.25em; }
.experience-projects a:hover::after,
.experience-projects a:focus-visible::after { opacity: 0; }
.experience-projects a.is-active::after { opacity: 1; }

@media (hover: hover) and (pointer: fine) {
  .balloon-letter,
  .balloon-letter * { cursor: url("assets/pushpin-cursor.svg") 8 27, pointer; }
}

/* A gentle hover lift in size without changing subtitle layout. */
.city-toggle,
.local-clock,
button.local-weather {
  display: inline-flex;
  transform-origin: center;
  transition: scale 180ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .city-toggle:hover,
  .local-clock:hover,
  button.local-weather:hover { scale: 1.035; }
}
.city-toggle:focus-visible,
.local-clock:focus-visible,
button.local-weather:focus-visible { scale: 1.035; }
@media (prefers-reduced-motion: reduce) {
  .city-toggle, .local-clock, button.local-weather { transition: none; }
}

.time-preview-panel[data-closing="true"] { pointer-events: none; }

.cursor-sunlight.is-moonlight {
  background: radial-gradient(circle, rgb(212 229 255 / 30%) 0%, rgb(169 203 255 / 14%) 30%, rgb(150 187 247 / 5%) 52%, transparent 72%);
}

.cursor-sunlight.is-moonlight.is-visible { opacity: var(--moon-glow-strength, 1); }

/* A small first-visit loading screen; content stays available if scripts fail. */
.site-loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #fff;
  color: #666;
  font: 400 14px "Karla", sans-serif;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 220ms ease, visibility 220ms;
}
.is-site-loading { overflow: hidden; }
.is-site-loading .site-loader { opacity: 1; visibility: visible; pointer-events: auto; }
.is-site-loading main { visibility: hidden; }
.loader-dot { width: 8px; height: 8px; border-radius: 50%; background: #e994b8; animation: loader-breathe 1.2s ease-in-out infinite; }
@keyframes loader-breathe { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .site-loader { transition: none; } .loader-dot { animation: none; } }

/* The loading screen shares the current sky's palette. */
.site-loader {
  flex-direction: column;
  gap: 18px;
  color: var(--loader-ink, #596779);
  background:
    radial-gradient(ellipse at 4% 0%, color-mix(in srgb, var(--sky-color, #6dbeef) 75%, transparent), transparent 70%),
    radial-gradient(ellipse at 85% 12%, color-mix(in srgb, var(--glow-color, #bed2ef) 85%, transparent), transparent 68%),
    radial-gradient(ellipse at 65% 50%, color-mix(in srgb, var(--cloud-color, #f3e1ba) 60%, transparent), transparent 70%),
    var(--loader-base, #fff);
}
.loader-cloud {
  width: 56px;
  height: 40px;
  color: #fff;
  filter: drop-shadow(0 3px 10px rgb(76 113 145 / 12%));
  animation: loader-cloud-drift 2.8s ease-in-out infinite;
}
@keyframes loader-cloud-drift {
  0%, 100% { transform: translateY(2px); }
  50% { transform: translateY(-3px); }
}
@media (prefers-reduced-motion: reduce) { .loader-cloud { animation: none; } }

@media (max-width: 850px) {
  .intro.mobile-header-adjusted {
    padding-top: 152px;
    min-height: var(--mobile-header-original-height, 100svh);
  }
  .intro.mobile-header-adjusted .detail--experience { display: none; }
}

/* Keep the mobile sky steady while its colors still reflect time and weather. */
@media (max-width: 850px) {
  .intro::before,
  .intro::after { animation: none; }
}

/* Mobile clouds occupy more of the header instead of gathering at the top. */
@media (max-width: 850px) {
  .sky-cloud--one { top: 4%; }
  .sky-cloud--two { top: 34%; }
  .sky-cloud--three { top: 17%; }
  .sky-cloud--four { top: 26%; }
  .sky-cloud--five { top: 49%; }
  .sky-cloud--six { top: 40%; }
  .sky-cloud--seven { top: 62%; }
  .sky-cloud--eight { top: 9%; }
  .day-clouds {
    -webkit-mask-image: linear-gradient(#000 0%, #000 62%, transparent 90%);
    mask-image: linear-gradient(#000 0%, #000 62%, transparent 90%);
  }
}

/* Give the subtitle more space below the balloon lettering. */
.intro > .local-conditions { margin-top: 12px; }

/* Local CSS clipping avoids cross-SVG mask failures in mobile browsers. */
.balloon-glyph-I {
  clip-path: polygon(0 0, 93.33% 0, 93.33% 39.71%, 80.95% 39.71%, 80.95% 65.22%, 100% 65.22%, 100% 100%, 0 100%);
}
.balloon-glyph-apostrophe {
  clip-path: polygon(12.38% 0, 100% 0, 100% 43.48%, 0 43.48%, 0 33.04%, 15.24% 24.64%, 4.76% 16.81%);
}

/* Mobile time and weather share a row beneath the location. */
@media (max-width: 850px) {
  .conditions-live-group {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    white-space: nowrap;
  }
}

@media (max-width: 850px) {
  .local-conditions { font-size: clamp(1.875rem, 7vw, 2.5rem); }
}

@media (max-width: 850px) {
  .local-conditions { font-size: clamp(2.125rem, 8vw, 2.875rem); }
}

/* Dotted underlines quietly signal that the subtitle controls are interactive. */
.city-toggle,
.local-clock,
button.local-weather {
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
.city-toggle:hover,
.city-toggle:focus-visible { text-decoration-line: underline; text-decoration-style: dotted; }

/* Custom dots allow a more open pattern, closer to each control's text. */
.city-toggle,
.local-clock,
button.local-weather,
.city-toggle:hover,
.city-toggle:focus-visible {
  text-decoration: none;
  padding-bottom: 0;
  background-image: radial-gradient(circle, color-mix(in srgb, currentColor 35%, transparent) 0.8px, transparent 1px);
  background-size: 4px 2px;
  background-repeat: repeat-x;
  background-position: left calc(100% - 0.04em);
}

button.local-weather { background-image: none; }
.weather-temperature-value {
  display: inline-block;
  background-image: radial-gradient(circle, color-mix(in srgb, currentColor 35%, transparent) 0.8px, transparent 1px);
  background-size: 4px 2px;
  background-repeat: repeat-x;
  background-position: left calc(100% - 0.04em);
}

.weather-preview[hidden] { display: none; }

/* One fitted underline spans the weather symbol and complete temperature. */
.weather-temperature-value { background-image: none; }
.weather-display {
  display: inline-flex;
  align-items: center;
  gap: 0.1em;
  background-image: radial-gradient(circle, color-mix(in srgb, currentColor 35%, transparent) 0.8px, transparent 1px);
  background-size: 4px 2px;
  background-repeat: repeat-x;
  background-position: left calc(100% - 0.04em);
}
.weather-display #weather-temperature { min-width: 0; }

/* The contact plane gently floats in place; only its envelope opens on hover. */
.detail--contact { position: relative; width: 180px; }
.contact-plane { display: block; width: 180px; padding: 0; border: 0; background: transparent; cursor: var(--cloud-cursor, pointer); }
.contact-plane-art { position: relative; display: block; width: 100%; aspect-ratio: 1; animation: contact-plane-float 9s ease-in-out infinite; }
.contact-plane-art img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; transition: opacity 180ms ease; }
.contact-plane-open { opacity: 0; }
@media (hover: hover) and (pointer: fine) {
  .contact-plane:hover .contact-plane-open { opacity: 1; }
  .contact-plane:hover .contact-plane-closed { opacity: 0; }
}
.contact-plane:focus-visible { outline: 2px dashed var(--readable-link, var(--page-ink)); outline-offset: 4px; border-radius: 24px; }
.contact-panel { top: calc(100% + 10px); left: auto; right: 0; width: min(300px, calc(100vw - 48px)); z-index: 30; }
.contact-panel ul { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.contact-panel .time-preview-heading { font-weight: 600; }
@keyframes contact-plane-float { 0%, 100% { translate: 0 3px; } 50% { translate: 0 -3px; } }
@media (min-width: 850.01px) {
  .intro .details { grid-template-columns: var(--column-width) minmax(225px, 320px) minmax(180px, 1fr); }
  .details > .detail--experience { grid-column: 1; grid-row: 1; }
  .details > .detail--lately { grid-column: 2; grid-row: 1; }
  .details > .detail--contact { grid-column: 3; grid-row: 1; justify-self: end; margin-right: 32px; }
}
@media (max-width: 850px) {
  .detail--contact, .contact-plane { width: 160px; }
  .contact-panel { left: 0; right: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .contact-plane-art { animation: none; }
  .contact-plane-art img { transition: none; }
}
@media (min-width: 850.01px) and (max-width: 1199.99px) {
  .intro .details { grid-template-columns: var(--column-width) minmax(180px, 1fr); }
  .details > .detail--contact { grid-column: 2; }
}

.contact-panel { top: auto; bottom: 100%; }
.intro > .details:has(#contact-toggle[aria-expanded="true"]) { z-index: 20; }

/* Anchor desktop contact artwork to the browser edge rather than a grid column. */
@media (min-width: 850.01px) {
  .intro > .details { min-height: 180px; }
  .intro > .details > .detail--contact {
    position: absolute;
    top: 0;
    right: 32px;
    margin: 0;
    grid-column: auto;
  }
  .intro > .details > .detail--lately { grid-column: 2; grid-row: 1; }
}
.contact-plane-art { animation-duration: 7s; }
@keyframes contact-plane-float {
  0%, 100% { translate: 0 7px; rotate: -1deg; }
  50% { translate: 0 -7px; rotate: 1deg; }
}

.contact-plane[aria-expanded="true"] .contact-plane-open { opacity: 1; }
.contact-plane[aria-expanded="true"] .contact-plane-closed { opacity: 0; }

@media (min-width: 850.01px) {
  .intro > .details > .detail--contact { right: 64px; }
}
/* Bridge the small space between the envelope and its hover menu. */
.contact-panel::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 16px; }

/* Lower the compositing cost of mobile skies and popovers. */
@media (max-width: 850px) {
  .time-preview-panel { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .sky-cloud { filter: none; }
  .sky-rain i:nth-child(2n), .sky-snow i:nth-child(2n) { display: none; }
  .constellation-star { filter: none; }
  .twinkling-star { animation: none; }
  .sky-fog { filter: none; }
}

@media (max-width: 850px) {
  /* Let native range dragging own the gesture rather than scroll the page. */
  #time-preview-slider, #weather-preview-slider, #temperature-preview-slider { touch-action: none; }
  /* Closing a dialog must not leave a focus ring around the whole carousel. */
  .carousel-viewport:focus,
  .carousel-viewport:focus-visible,
  .mobile-project-viewport:focus,
  .mobile-project-viewport:focus-visible,
  .image-enlarge-trigger:focus,
  .image-enlarge-trigger:focus-visible { outline: none; box-shadow: none; }
}

.cursor-sunlight.is-partly-cloudy.is-visible:not(.is-moonlight) { opacity: 0.35; }

@media (min-width: 850.01px) {
  .intro > .details > .detail--contact { right: calc(clamp(96px, 12vw, 192px) + 128px); }
}

/* Header availability and previous teams, matching the supplied reference. */
.detail--currently p, .detail--previous p { margin: 0; font-size: 16px; line-height: 1.3; }
.detail--previous { width: 320px; }
.project-sidebar { display: none; }
@media (min-width: 850.01px) {
  .intro > .details > .detail--currently { grid-column: 1; grid-row: 1; }
  .intro > .details > .detail--previous { grid-column: 2; grid-row: 1; }
}
@media (max-width: 850px) {
  .detail--currently, .detail--previous { display: none; }
}
@media (min-width: 1200px) {
  .projects { position: relative; overflow: clip; }
  .project-sidebar {
    display: block;
    position: absolute;
    left: var(--page-left);
    top: 7.5rem;
    bottom: 0;
    width: var(--column-width);
  }
  .project-sidebar .detail--experience { position: sticky; top: 64px; }
  .project-sidebar .selected-work-title { display: block; font-size: 12px; }
  .project-sidebar .experience-projects { display: grid; }
}
@media (min-width: 850.01px) and (max-width: 1199.99px) {
  .intro > .details { row-gap: 32px; }
  .intro > .details > .detail--previous { grid-column: 1; grid-row: 2; }
}

#city-prefix { color: rgb(40 40 40 / 40%); }
html.has-black-background #city-prefix { color: #8E8E8E; }

@media (min-width: 850.01px) {
  .intro > .details { column-gap: 64px; }
  .intro > .details > .detail--contact { top: -32px; }
}
@media (min-width: 850.01px) and (max-width: 1199.99px) {
  .intro > .details { row-gap: 48px; }
}

@media (min-width: 850.01px) {
  .intro > .details > .detail--currently,
  .intro > .details > .detail--previous { position: relative; top: 40px; }
}

.detail--currently a, .detail--previous a { text-decoration: none; }
.detail--currently a::after, .detail--previous a::after { content: none; }
.detail--currently a:hover, .detail--currently a:focus-visible,
.detail--previous a:hover, .detail--previous a:focus-visible {
  color: var(--readable-link, var(--link-accent));
  font-weight: 700;
}

.loader-cloud { width: 120px; height: auto; }

/* Bring the work closer to the header without shortening the desktop hero. */
.projects { padding-top: 56px; }
@media (min-width: 1200px) { .project-sidebar { top: 56px; } }
@media (max-width: 850px) { .projects { padding-top: 56px; } }

/* Native desktop images avoid animating an SVG image surface. Mobile stays unchanged. */
.balloon-desktop-art { display: none; }
@media (min-width: 850.01px) {
  .balloon-letter > svg { display: none; }
  .balloon-desktop-art {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: var(--crop-width) / var(--crop-height);
    overflow: hidden;
  }
  .balloon-native-image {
    position: absolute;
    width: var(--art-width);
    max-width: none;
    height: var(--art-height);
    left: var(--art-left);
    top: var(--art-top);
    image-rendering: auto;
  }
}
@media (min-width: 1200px) {
  .project-sidebar { top: 64px; }
  .project-sidebar .selected-work-title { color: #8E8E8E; }
}

/* Keep availability copy to two lines, with room for the previous teams. */
@media (min-width: 1200px) {
  .intro .details { grid-template-columns: 400px minmax(225px, 320px) minmax(0, 1fr); }
}
@media (min-width: 850.01px) and (max-width: 1199.99px) {
  .intro .detail--currently { width: min(400px, calc(100vw - 96px)); max-width: none; }
}

@media (min-width: 850.01px) {
  .intro .detail--currently { width: min(400px, calc(100vw - 96px)); max-width: none; }
}

@media (min-width: 1200px) {
  .intro > .details { column-gap: 24px; }
}

/* Size the availability column to its copy so the visible gap is 72px. */
@media (min-width: 1200px) {
  .intro > .details { grid-template-columns: max-content 320px minmax(0, 1fr); column-gap: 72px; }
  .intro .detail--currently { width: max-content; }
  .intro .detail--currently p { white-space: nowrap; }
}

/* Extra separation after Selected Links, while retaining the Context gap. */
@media (min-width: 850.01px) {
  .project-meta > div:not(:first-child):not(.project-skills) { padding-right: 24px; }
}

/* A deeper desktop sky, with a few additional clouds in every forecast. */
.sky-cloud--nine, .sky-cloud--ten { display: none; }
@media (min-width: 850.01px) {
  .sky-cloud--one { top: 3%; }
  .sky-cloud--two { top: 29%; }
  .sky-cloud--three { top: 15%; }
  .sky-cloud--four { top: 41%; }
  .sky-cloud--five { top: 58%; }
  .sky-cloud--six { top: 22%; }
  .sky-cloud--seven { top: 66%; }
  .sky-cloud--eight { top: 8%; }
  .sky-cloud--nine { display: block; --cloud-width: clamp(150px, 19vw, 310px); --cloud-duration: 148s; --cloud-delay: -44s; top: 48%; opacity: 0.65; }
  .sky-cloud--ten { display: block; --cloud-width: clamp(180px, 23vw, 380px); --cloud-duration: 172s; --cloud-delay: -141s; top: 34%; opacity: 0.7; }
  .intro[data-weather="partly-cloudy"] .sky-cloud--five,
  .intro[data-weather="fog"] .extra-cloud { opacity: 0.7; }
}

/* Mobile availability, previous teams, and contact sit within a taller sky. */
@media (max-width: 850px) {
  .intro,
  .intro.mobile-header-adjusted { min-height: calc(100svh + 80px); padding-bottom: 96px; }
  .intro > .details { grid-template-columns: minmax(0, 1fr); gap: 32px; margin-top: 48px; }
  .intro .detail--currently,
  .intro .detail--previous { display: block; width: 100%; max-width: 400px; position: relative; top: auto; }
  .intro .detail--currently { grid-column: 1; grid-row: 1; }
  .intro .detail--previous { grid-column: 1; grid-row: 2; }
  .intro .detail--currently p { white-space: normal; }
  .intro .detail--currently .availability-break { display: none; }
  .intro > .details > .detail--contact { grid-column: 1; grid-row: 3; justify-self: end; position: relative; top: auto; right: auto; width: 140px; margin: 0; }
  .intro .contact-plane { width: 140px; }
  .intro .contact-panel { left: auto; right: 0; }
  .intro .sky-bottom-fade { height: 220px; }
}

@media (max-width: 850px) {
  .intro::before { -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 76%, transparent 96%); mask-image: linear-gradient(to bottom, #000 0%, #000 76%, transparent 96%); }
}

@media (max-width: 850px) {
  .intro, .intro.mobile-header-adjusted { padding-top: 112px; }
}

@media (max-width: 850px) {
  .intro, .intro.mobile-header-adjusted { min-height: var(--mobile-header-stable-height, calc(100svh + 80px)); }
}

@media (max-width: 850px) {
  .intro > .details > .detail--contact { top: -24px; }
  .projects { margin-top: -40px; position: relative; }
}

.local-conditions { font-family: "JetBrains Mono", monospace; font-weight: 800; }

.local-conditions { font-family: "Sometype Mono", monospace; font-weight: 600; }
.local-conditions #city-prefix { font-weight: 500; }

.time-preview-panel { font-family: "Karla", sans-serif; }

@media (max-width: 850px) {
  .local-conditions { font-size: calc(clamp(34px, 8vw, 46px) - 4px); }
}

/* Reduce mobile Karla type without changing rem-based spacing or mono type. */
@media (max-width: 850px) {
  body { font-size: 14px; }
  h2, .intro .detail > h2, .project-meta h3,
  .mobile-selected-work-title, .work-link { font-size: 10px; }
  .project-title { font-size: 24px; }
  li, .project-meta p, .carousel-footer p,
  .comparison-item figcaption, .carousel-count, .carousel-caption,
  .detail--currently p, .detail--previous p { font-size: 14px; }
  .year { font-size: 12px; }
  .carousel-controls .carousel-count { font-size: 10px; }
  .time-preview-panel { font-size: 11px; }
  .time-preview-labels, .weather-preview-note, .weather-credit { font-size: 9px; }
  .contact-panel li { font-size: 14px; }
  .constellation-label { font-size: 11px; }
  .site-loader { font-size: 12px; }
  .image-viewer-navigation { font-size: 12px; }
  .image-viewer-navigation button { font-size: 24px; }
  .image-viewer-close { font-size: 26px; }
}

@media (max-width: 850px) {
  .intro .detail--currently p { max-width: 280px; }
}

@media (max-width: 850px) {
  .intro > .local-conditions { margin-top: 6px; }
  .intro .detail--currently, .intro .detail--previous { top: 12px; }
}
@media (min-width: 850.01px) {
  .local-conditions { font-size: calc(clamp(2rem, 2.7vw, 3.125rem) - 2px); }
}

.local-conditions { line-height: 1.1; row-gap: 0.18em; }

@media (max-width: 850px) {
  .intro > .details { margin-top: 72px; }
}

@media (min-width: 850.01px) {
  .contact-panel { bottom: calc(100% - 4px); }
}

@media (min-width: 850.01px) {
  .intro > .details > .detail--contact { top: var(--plane-heading-top, -300px); }
}

@media (min-width: 850.01px) {
  .intro > .details > .detail--contact { left: var(--plane-heading-left, auto); right: auto; }
}
