:root {
  /* Palette (provided) */
  --c-aqua: #57f5f2;
  --c-cream: #f6f5f2;
  --c-sand: #bcbab5;
  --c-slate: #969ca7;
  --c-plum: #6c5764;
  --c-mist: #bfd0de;
  --c-steel: #859bbd;
  --c-cloud: #c1c4d0;

  /* Core UI colors */
  --bg: var(--c-cream);
  --panel: rgba(7, 8, 11, 0.04);
  --panel-2: rgba(7, 8, 11, 0.07);
  --text: rgba(7, 8, 11, 0.92);
  --muted: rgba(7, 8, 11, 0.72);
  --border: rgba(7, 8, 11, 0.12);
  --shadow: 0 18px 50px rgba(7, 8, 11, 0.14);

  --radius: 18px;
  --radius-sm: 12px;

  --font-display: "Boowie", ui-serif, Georgia, serif;
  --font-body: "Dolce Vita Light", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --font-body-strong: "Dolce Vita", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --font-prose: "Inter", system-ui, -apple-system, "Helvetica Neue", sans-serif;

  /* Header theme (synced from landing theme) */
  --header-bg: var(--c-steel);
  /* Match the gallery body background (cream) */
  --header-fg: var(--c-cream);
  /* A lighter shade derived from the active theme background */
  --header-accent: color-mix(in srgb, var(--header-bg) 82%, #ffffff 18%);
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  letter-spacing: 0.02em;
}

/* Post page spacing/typography */
.pagePost .container {
  padding-top: 7.25rem;
}

.pageAbout .container {
  padding-top: 8.5rem;
}

.pagePost .entryTitle {
  font-size: clamp(2rem, 6vw, 3rem);
  margin-bottom: 0.55rem;
}

.pagePost .entrySubheader {
  font-size: clamp(1.2rem, 3vw, 1.75rem);
  margin-bottom: 1.05rem;
}

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

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 5.5rem 0 3rem;
}

/* Header */
.siteHeader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  background: var(--header-bg);
  color: var(--header-fg);
}

.siteHeaderInner {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "left center right";
  align-items: center;
  padding: 0.9rem 0;
  gap: 1rem;
}

.headerLeft {
  grid-area: left;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.headerCenter {
  grid-area: center;
  justify-self: center;
}

.headerRight {
  grid-area: right;
  justify-self: end;
  display: flex;
  justify-content: flex-end;
}

.headerSearch {
  width: min(320px, 44vw);
  border-radius: 999px;
  border: 1px solid rgba(246, 245, 242, 0.55);
  background: rgba(0, 0, 0, 0.16);
  color: var(--header-fg);
  padding: 0.55rem 0.85rem;
  font-family: var(--font-body-strong);
  outline: none;
}

.headerSearch::placeholder {
  color: rgba(246, 245, 242, 0.75);
}

.headerSearch:focus {
  border-color: rgba(246, 245, 242, 0.85);
  box-shadow: 0 0 0 4px rgba(246, 245, 242, 0.18);
}

.brandMark {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brandMark img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.brandMark .brandText {
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 1.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.navLink {
  color: rgba(246, 245, 242, 0.92);
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 1.2rem;
  padding: 0.5rem 0.85rem;
  border: 0;
  border-radius: 0;
  white-space: nowrap;
  background: transparent;
  text-decoration: none;
}

.navLink[aria-current="page"] {
  color: var(--header-accent);
  background: transparent;
  text-shadow: none;
  cursor: default;
  pointer-events: none;
}

.navLink:not([aria-current="page"]):hover {
  color: rgba(246, 245, 242, 0.98);
  background: transparent;
  text-shadow: none;
}

.navLink:focus-visible {
  outline: none;
  outline: 2px solid rgba(246, 245, 242, 0.75);
  outline-offset: 4px;
}

.navLink:active {
  color: var(--header-accent);
}

.navLink[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

/* Mobile nav (when grid is 1-up, < 640px). */
.menu {
  display: none;
  position: relative;
}

.desktopNav {
  display: inline-flex;
}

.menuButton {
  appearance: none;
  border: 1px solid rgba(246, 245, 242, 0.55);
  background: rgba(0, 0, 0, 0.14);
  color: var(--header-fg);
  border-radius: 999px;
  width: 40px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.menuButton::-webkit-details-marker {
  display: none;
}

.menuIcon {
  width: 18px;
  height: 2px;
  background: rgba(246, 245, 242, 0.95);
  border-radius: 2px;
  position: relative;
  display: block;
}

.menuIcon::before,
.menuIcon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: rgba(246, 245, 242, 0.95);
  border-radius: 2px;
}

.menuIcon::before {
  top: -6px;
}

.menuIcon::after {
  top: 6px;
}

.menuPanel {
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 0;
  min-width: 170px;
  border-radius: 14px;
  border: 1px solid rgba(7, 8, 11, 0.12);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  padding: 0.35rem;
  display: grid;
  gap: 0.15rem;
  z-index: 30;
}

.menuPanel a {
  color: rgba(7, 8, 11, 0.92);
  font-family: var(--font-body-strong);
  font-size: 0.95rem;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
}

.menuPanel a:hover {
  background: rgba(7, 8, 11, 0.06);
}

.menuPanel a[aria-current="page"] {
  background: rgba(7, 8, 11, 0.08);
}

@media (max-width: 639px) {
  .menu {
    display: none;
  }

  .brandMark .brandText {
    font-size: clamp(1.25rem, 5.4vw, 1.75rem);
  }

  .navLink {
    font-size: 1.05rem;
    padding: 0.55rem 0.85rem;
  }

  .headerSearch {
    width: min(220px, 44vw);
  }
}

/* Grid */
.grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

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

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

.tile {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border);
  aspect-ratio: 1 / 1;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset;
}

.tileMedia {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Avoid constant resampling (can cause moiré on detailed work). */
  transform: none;
  transition: transform 250ms ease, filter 250ms ease;
  filter: none;
  image-rendering: auto;
  image-rendering: -webkit-optimize-contrast;
}

.tile:hover .tileMedia {
  transform: scale(1.02);
  filter: saturate(1.02);
}

.tileOverlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(600px 240px at 50% 0%, rgba(255, 255, 255, 0.40), transparent 60%),
    linear-gradient(to top, rgba(7, 8, 11, 0.25), transparent 55%);
  opacity: 0;
  transition: opacity 250ms ease;
}

.tile:hover .tileOverlay {
  opacity: 1;
}

.badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  border-radius: 999px;
  border: 1px solid rgba(191, 208, 222, 0.18);
  background: rgba(7, 8, 11, 0.55);
  color: rgba(191, 208, 222, 0.86);
  padding: 0.25rem 0.45rem;
  font-size: 0.72rem;
  font-family: var(--font-body-strong);
}

.sentinel {
  height: 1px;
}

.backToTop {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  background: color-mix(in srgb, var(--header-bg) 30%, transparent);
  /* Arrow matches active landing/header theme color (full opacity) */
  color: var(--header-bg);
  display: grid;
  place-items: center;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--header-bg) 28%, transparent) inset;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.backToTopIcon {
  width: 22px;
  height: 22px;
  display: block;
}

.backToTop.isVisible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.backToTop:hover {
  background: color-mix(in srgb, var(--header-bg) 40%, transparent);
}

.backToTop:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(246, 245, 242, 0.22);
}

.button {
  appearance: none;
  border: 1px solid rgba(7, 8, 11, 0.22);
  background: rgba(255, 255, 255, 0.55);
  color: var(--text);
  border-radius: 999px;
  padding: 0.65rem 1rem;
  font-family: var(--font-body-strong);
  cursor: pointer;
}

.button:hover {
  border-color: rgba(7, 8, 11, 0.35);
  background: rgba(255, 255, 255, 0.70);
}

.journalTitle {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 400;
  font-size: clamp(1.25rem, 2.3vw, 2rem);
}

.mediaStrip {
  /* Full-bleed gallery */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  border-radius: 0;
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 12px 0;
  box-shadow: var(--shadow);
  position: relative;
  /* Arrow color follows the current theme (header/landing background). */
  --carousel-arrow: color-mix(in srgb, var(--header-bg) 65%, #221a26 35%);
  --carousel-glow: color-mix(in srgb, var(--header-bg) 55%, transparent);
}

.carouselViewport {
  width: 100%;
  padding: 0 0.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  border-radius: 0;
  outline: none;
  scrollbar-width: none;
}

.carouselViewport::-webkit-scrollbar {
  display: none;
}

.carouselTrack {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}

.mediaItem {
  scroll-snap-align: center;
  /* Size to the media's natural aspect ratio */
  flex: 0 0 auto;
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
}

.mediaItem img,
.mediaItem video {
  /* Keep original aspect ratio, constrain size */
  width: auto;
  max-width: calc(100vw - 3rem);
  height: auto;
  max-height: min(70vh, 680px);
  display: block;
  background: transparent;
}

.mediaItem img {
  -webkit-user-drag: none;
  user-select: none;
}

.carouselBtn {
  display: none; /* only show when >1 image */
  position: absolute;
  top: auto;
  bottom: 14px;
  transform: none;
  z-index: 2;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.14));
  color: var(--carousel-arrow);
  border-radius: 999px;
  padding: 0;
  font-family: var(--font-prose);
  font-size: 1.55rem;
  line-height: 1;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  /* More magical glow, less "drop shadow". */
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18) inset,
    0 0 18px var(--carousel-glow);
  cursor: pointer;
}

.mediaStrip.hasCarousel .carouselBtn {
  display: grid;
}

.carouselBtn:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.20));
  border-color: rgba(255, 255, 255, 0.78);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.22) inset,
    0 0 24px var(--carousel-glow);
}

.carouselBtn:disabled {
  opacity: 0.35;
  cursor: default;
}

.carouselBtnPrev {
  left: 50%;
  transform: translateX(calc(-50% - 30px));
}

.carouselBtnNext {
  left: 50%;
  transform: translateX(calc(-50% + 30px));
}

@media (max-width: 520px) {
  .carouselBtnPrev {
    transform: translateX(calc(-50% - 26px));
  }

  .carouselBtnNext {
    transform: translateX(calc(-50% + 26px));
  }
}
.caption {
  margin: 0;
  padding: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  line-height: 1.55;
  color: var(--text);
  font-family: var(--font-prose);
  font-weight: 300;
  white-space: pre-wrap;
  text-align: center;
  width: 100%;
}

/* Journal title above caption */
.entryTitle {
  margin: 0 0 0.35rem;
  width: 100%;
  text-align: center;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 400;
  /* Match header logo text sizing */
  font-size: clamp(1.25rem, 5.4vw, 1.75rem);
  color: var(--text);
}

/* Post subheader (optional) */
.entrySubheader {
  margin: 0 0 0.85rem;
  width: 100%;
  text-align: center;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  color: rgba(7, 8, 11, 0.78);
}

.entryTextBox {
  width: min(900px, 100%);
  margin: 0 auto 1.1rem;
  padding: 0;
  border: 0;
  background: transparent;
}

.isPlaceholder {
  color: rgba(7, 8, 11, 0.55) !important;
}

/* Post media gallery */
.masonry {
  width: min(520px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  row-gap: 6px;
  column-gap: 6px;
}

@media (min-width: 640px) {
  .masonry {
    width: min(900px, 100%);
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.masonryItem {
  width: 100%;
  height: auto;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
  border: 0;
  background: transparent;
}

.journalNavButtons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.entryNavBottom {
  width: min(900px, 100%);
  margin: 1rem auto 0;
  display: flex;
  gap: 0.35rem;
  justify-content: center;
  flex-wrap: wrap;
}

.linkButton {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(191, 208, 222, 0.14);
  background: rgba(191, 208, 222, 0.04);
  color: var(--muted);
  font-family: var(--font-body-strong);
  font-size: 0.88rem;
}

.linkButton:hover {
  color: var(--text);
  border-color: rgba(87, 245, 242, 0.25);
}

.pagePost .entryNavBottom .linkButton {
  border: 1px solid rgba(246, 245, 242, 0.38);
  background: var(--header-bg);
  color: rgba(246, 245, 242, 1);
}

.pagePost .entryNavBottom .linkButton:hover {
  border-color: rgba(246, 245, 242, 0.65);
  background: var(--header-accent);
  color: rgba(246, 245, 242, 1);
}

.pagePost .entryNavBottom .linkButton[aria-disabled="true"] {
  opacity: 0.35;
}

.linkButton[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

/* About */
.aboutPage {
  width: min(950px, 100%);
  margin: 0 auto;
  text-align: center;
}

.aboutLogo {
  width: 160px;
  height: auto;
  display: block;
  opacity: 0.92;
  margin: 0 auto;
}

.aboutLogoThemed {
  width: 180px;
  height: 180px;
}

.aboutLogoThemed svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Recolor the uploaded SVG to match the active theme */
.aboutLogoThemed svg .cls-3 {
  fill: var(--header-bg) !important;
}

.aboutLogoThemed svg .cls-2 {
  fill: var(--header-fg) !important;
}

.aboutQuote {
  position: relative;
  width: min(950px, 100%);
  margin: 0 auto 1.35rem;
  padding: 0 1.35rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.75rem, 3.6vw, 2.85rem);
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: rgba(7, 8, 11, 0.82);
}

.aboutTitle {
  margin: 0 0 0.6rem;
  font-family: var(--font-body);
  font-weight: 300;
  letter-spacing: 0.02em;
  text-transform: none;
  font-size: clamp(1.05rem, 2.1vw, 1.45rem);
  color: var(--text);
}

.aboutText {
  font-family: var(--font-prose);
  font-weight: 100;
  font-size: clamp(0.92rem, 1.35vw, 1.02rem);
  color: var(--text);
  line-height: 1.55;
  text-align: center;
}

.aboutText p {
  margin: 0 0 0.85rem;
}

.aboutDivider {
  width: min(520px, 78%);
  margin: 2.1rem auto 1.85rem;
  border: 0;
  border-top: 1px solid rgba(7, 8, 11, 0.14);
}

.aboutDividerTop {
  /* Give the statement a little breathing room under the quote */
  margin-top: 1.35rem;
  margin-bottom: 2.35rem;
}

.aboutContactSection {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.aboutContact {
  margin-top: 0;
  font-family: var(--font-prose);
  color: var(--text);
}

.aboutContactLabel {
  font-family: var(--font-body-strong);
  margin-right: 0.35rem;
}

.aboutContactTitle {
  font-family: var(--font-body-strong);
  margin-bottom: 0.35rem;
}

.aboutContact a {
  text-decoration: underline;
  font-family: inherit;
  font-weight: inherit;
}

.aboutCopyright {
  width: min(950px, 100%);
  margin: 2.25rem auto 0;
  font-family: var(--font-prose);
  color: rgba(7, 8, 11, 0.65);
  text-align: center;
  font-size: 0.9rem;
}

@media (max-width: 560px) {
  .aboutLogo {
    width: min(220px, 60vw);
  }

  .aboutText {
    text-align: center;
  }
}

/* Landing */
body.landing {
  overflow: hidden;
  background: var(--landing-bg, var(--c-steel));
  color: var(--c-plum);
}

#stars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.9;
}

.landingMain {
  position: relative;
  z-index: 1;
  height: 100%;
  display: block;
  padding: 0;
}

.landingEnter {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2.5rem 2rem;
  border-radius: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.landingEnter:hover {
  /* no-op: keep whole-page link steady */
}

/* Coming-soon / welcome: same layout as .landingEnter but not a link */
.landing .landingEnter:not(a) {
  cursor: default;
}
.landing .landingEnter:not(a):hover .landingLogo {
  transform: none;
}

.landingEnter:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 4px rgba(108, 87, 100, 0.18);
}

.landingEnter:hover .landingLogo {
  transform: translateY(-1px);
}

.landingLogo {
  width: min(420px, 74vw);
  height: auto;
  filter: drop-shadow(0 14px 34px rgba(108, 87, 100, 0.22));
  transition: transform 240ms ease, filter 240ms ease;
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-user-select: none;
  user-select: none;
}

.landingHint {
  display: block;
  font-family: var(--font-body-strong);
  font-size: 1rem;
  letter-spacing: 0.03em;
  color: var(--c-cream);
  opacity: 0.65;
  /* Nudge to visually align with the moon mark in the logo. */
  transform: translateX(-0.35rem);
}

.srOnly {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

