:root {
  color-scheme: only light;
  --sky: #79c8f2;
  --sky-deep: #62b8e8;
  --sky-lilac: #f1d5fc;
  --sky-blush: #faeff0;
  --night: #172b63;
  --night-deep: #0d1740;
  --cream: #fffaf1;
  --ink: #16234b;
  --muted: #667091;
  --yellow: #ffd75e;
  --coral: #ff806e;
  --mint: #9fe1ce;
  --lavender: #b9adf3;
  --purple-deep: #51347f;
  --white: #ffffff;
  --shadow: 0 22px 70px rgba(24, 50, 105, 0.16);
  --radius-lg: 32px;
  --radius-md: 22px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--cream);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

.topbar,
.hero-copy,
.scroll-cue {
  -webkit-text-fill-color: currentColor;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible {
  outline: 4px solid var(--yellow);
  outline-offset: 5px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  color: var(--ink);
  background: var(--white);
  border-radius: 999px;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.sky-hero,
.constellation {
  min-height: 100svh;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.sky-hero {
  height: clamp(100svh, 166.78vw, 3000px);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #f4cdfc 0%, #fbeeed 30%, #f7e1d2 52%, #faede4 74%, #edc7bf 100%);
}

.hero-scene-image {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
}

.topbar {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  z-index: 5;
  color: rgba(22, 35, 75, 0.78);
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wordmark {
  color: var(--ink);
  text-decoration: none;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
  letter-spacing: 0;
  text-transform: none;
}

.wordmark span {
  color: #fff6bd;
  text-shadow: 0 2px 10px rgba(255, 215, 94, 0.55);
}

.hero-layout {
  width: 100%;
  flex: 1;
  margin: 0;
  padding: clamp(78px, 9vh, 118px) 0 0;
  position: relative;
  z-index: 3;
}

.hero-copy {
  width: min(920px, calc(100% - 48px));
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  margin: 0 0 15px;
  color: #2d5189;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: "Fraunces", Georgia, serif;
  line-height: 1.05;
}

h1 {
  max-width: 920px;
  margin-inline: auto;
  margin-bottom: 24px;
  font-size: clamp(3.55rem, 7.2vw, 7rem);
  letter-spacing: -0.065em;
}

h1 em {
  color: white;
  font-style: normal;
  text-shadow: 0 4px 22px rgba(44, 102, 154, 0.16);
}

.hero-intro {
  max-width: 580px;
  margin-inline: auto;
  margin-bottom: 32px;
  color: rgba(22, 35, 75, 0.78);
  font-size: clamp(1rem, 2vw, 1.15rem);
}

.scroll-cue,
.continue-cue {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.scroll-cue {
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  box-shadow: 0 14px 34px rgba(45, 81, 137, 0.12);
  backdrop-filter: blur(10px);
}

.scroll-cue span,
.continue-cue span {
  transition: transform 180ms ease;
}

.scroll-cue:hover span,
.continue-cue:hover span {
  transform: translateY(4px);
}

.night-cloud {
  position: absolute;
  width: 180px;
  height: 54px;
  border-radius: 999px;
}
.night-cloud::before,
.night-cloud::after {
  content: "";
  position: absolute;
  bottom: 0;
  border-radius: 50%;
  background: inherit;
}

.night-cloud::before {
  left: 26px;
  width: 74px;
  height: 88px;
}

.night-cloud::after {
  right: 25px;
  width: 96px;
  height: 115px;
}

.constellation {
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(78px, 10vw, 112px) 24px 36px;
  color: white;
  background-color: var(--night-deep);
  background-image: url("assets/choose-a-star-bg-v5.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.constellation::before,
.constellation::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(255, 243, 181, 0.75) 0 1px, transparent 1.5px);
  background-position: 0 0, 37px 43px;
  background-size: 82px 82px, 117px 117px;
  opacity: 0;
  transition: opacity 1.1s ease 120ms;
}

.constellation::before,
.constellation::after,
.night-cloud {
  display: none;
}

.constellation::after {
  background-position: 18px 31px, 9px 4px;
  background-size: 151px 151px, 209px 209px;
  opacity: 0;
  filter: blur(0.2px);
}

.constellation.revealed::before {
  opacity: 0.42;
}

.constellation.revealed::after {
  opacity: 0.7;
}

.night-cloud {
  z-index: -1;
  background: rgba(95, 127, 187, 0.18);
  filter: blur(2px);
}

.night-cloud-one {
  top: 23%;
  left: -40px;
  transform: scale(1.3);
}

.night-cloud-two {
  right: -42px;
  bottom: 18%;
  transform: scale(0.8);
}

.constellation-heading {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
}

.constellation .eyebrow {
  color: #c9d7ff;
}

.constellation h2,
.portfolio h2 {
  margin-bottom: 16px;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  letter-spacing: -0.045em;
}

.constellation-heading > p:last-child {
  color: rgba(255, 255, 255, 0.68);
}

.star-map {
  width: min(1040px, 100%);
  min-height: 490px;
  margin: 16px auto 0;
  position: relative;
}

.constellation-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.constellation-lines path {
  fill: none;
  stroke: rgba(255, 244, 184, 0.2);
  stroke-width: 1.5;
  stroke-dasharray: 5 9;
  stroke-dashoffset: 500;
  transition: stroke-dashoffset 1.5s ease 350ms;
}

.revealed .constellation-lines path {
  stroke-dashoffset: 0;
}

.star-link {
  position: absolute;
  display: grid;
  justify-items: center;
  min-width: 142px;
  color: white;
  text-align: center;
  text-decoration: none;
  opacity: 0;
  transform: translateY(20px) scale(0.85);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.revealed .star-link {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.revealed .star-link:nth-of-type(2) { transition-delay: 120ms; }
.revealed .star-link:nth-of-type(3) { transition-delay: 240ms; }
.revealed .star-link:nth-of-type(4) { transition-delay: 360ms; }

.star-shape {
  display: grid;
  place-items: center;
  width: 110px;
  height: 110px;
  margin-bottom: 9px;
  filter: drop-shadow(0 0 12px rgba(255, 232, 121, 0.7));
  transition: transform 240ms ease, filter 240ms ease;
  animation: twinkle 3.6s ease-in-out infinite;
}

.star-shape img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.star-link:hover .star-shape,
.star-link:focus-visible .star-shape {
  transform: rotate(12deg) scale(1.18);
  filter: drop-shadow(0 0 24px rgba(255, 232, 121, 0.94));
}

.star-label {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
}

.star-link small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.76rem;
}

.star-books { top: 12%; left: 7%; }
.star-illustration { top: 35%; left: 42%; }
.star-about { top: 12%; right: 6%; }
.star-contact { right: 21%; bottom: 4%; }

.continue-cue {
  justify-self: center;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.88rem;
}

.portfolio {
  min-height: 100svh;
  padding: clamp(80px, 9vw, 128px) 24px 28px;
  background:
    radial-gradient(circle at 85% 12%, rgba(255, 215, 94, 0.16), transparent 22%),
    var(--cream);
}

.portfolio-shell {
  width: min(1180px, 100%);
  min-height: 700px;
  margin: 0 auto;
}

.portfolio-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 38px;
  margin-bottom: 48px;
}

.portfolio-header .eyebrow {
  color: #5274a8;
}

.portfolio-header h2 {
  max-width: 720px;
  margin-bottom: 0;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  background: white;
  border: 1px solid #ebe6dc;
  border-radius: 999px;
  box-shadow: 0 10px 34px rgba(32, 46, 84, 0.07);
}

.tab {
  min-height: 42px;
  padding: 9px 15px;
  color: #617091;
  background: transparent;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.tab:hover {
  color: var(--ink);
  background: #f8f5ed;
}

.tab.is-active {
  color: white;
  background: var(--ink);
}

.panel {
  animation: panel-in 420ms ease both;
}

.section-lead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 24px;
}

.section-lead > span {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.55rem;
  font-weight: 700;
}

.section-lead p {
  max-width: 560px;
  margin-bottom: 0;
  color: var(--muted);
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.book-card {
  padding: 14px;
  background: white;
  border: 1px solid #eee8de;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 36px rgba(34, 53, 94, 0.07);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.book-card:hover {
  transform: translateY(-7px) rotate(-0.35deg);
  box-shadow: var(--shadow);
}

.language-switch {
  width: fit-content;
  margin: 2px 0 12px 2px;
  padding: 4px;
  display: inline-flex;
  gap: 3px;
  background: #f3f0e9;
  border-radius: 999px;
}

.language-button {
  min-height: 32px;
  padding: 6px 11px;
  color: #68738d;
  background: transparent;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.language-button:hover {
  color: var(--ink);
}

.language-button.is-active {
  color: white;
  background: var(--ink);
  box-shadow: 0 4px 12px rgba(22, 35, 75, 0.18);
}

.cover-slot {
  aspect-ratio: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: 22px;
  background: color-mix(in srgb, var(--card-color), white 56%);
}

.coral { --card-color: var(--coral); }
.yellow { --card-color: var(--yellow); }
.lavender { --card-color: var(--lavender); }
.mint { --card-color: var(--mint); }

.cover-slot .book-language-panel {
  width: 100%;
  height: 100%;
}

.cover-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.book-copy {
  padding: 24px 12px 14px;
}

.book-kicker {
  margin-bottom: 10px;
  color: #6580ac;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.book-copy h3 {
  min-height: 2.2em;
  margin-bottom: 12px;
  font-size: 1.55rem;
  letter-spacing: -0.025em;
}

.book-copy > p:not(.book-kicker) {
  min-height: 4.8em;
  color: var(--muted);
  font-size: 0.92rem;
}

.book-copy[dir="rtl"] {
  text-align: right;
}

.book-copy[dir="rtl"] .book-kicker {
  letter-spacing: 0;
}

.book-copy[dir="rtl"] h3 {
  line-height: 1.35;
}

.purchase-links {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.purchase-button {
  min-height: 38px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.77rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.purchase-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(22, 35, 75, 0.14);
}

.purchase-button-primary {
  color: white;
  background: var(--ink);
}

.purchase-button-primary:hover {
  background: #243966;
}

.purchase-button-secondary {
  color: #385d98;
  background: #f4f1ea;
  border-color: #e5ded1;
}

.purchase-button-secondary:hover {
  background: white;
}

.coming-soon-card {
  margin-top: 24px;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(26px, 5vw, 64px);
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.34), transparent 22%),
    #f5dfac;
  border: 1px solid #edd18f;
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 45px rgba(54, 44, 99, 0.11);
}

.coming-soon-art {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.42);
}

.coming-soon-copy h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
}

.coming-soon-art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.coming-soon-copy {
  padding: 24px 28px 24px 0;
}

.coming-soon-copy h3 {
  margin-bottom: 14px;
  font-size: clamp(2.6rem, 5vw, 4.5rem);
  letter-spacing: -0.045em;
}

.coming-soon-copy > p:not(.book-kicker) {
  max-width: 510px;
  color: #5f6483;
}

.project-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  padding: 9px 14px;
  color: #433c72;
  background: rgba(255, 255, 255, 0.52);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.project-status span {
  color: #7563c7;
}

.illustrated-books-section {
  margin-top: clamp(58px, 7vw, 88px);
  padding-top: clamp(42px, 5vw, 64px);
  border-top: 1px dashed rgba(22, 35, 75, 0.18);
}

.illustrated-series-list {
  display: grid;
  gap: 28px;
}

.illustrated-series {
  padding: clamp(20px, 3vw, 34px);
  background: white;
  border: 1px solid #e5ddf6;
  border-radius: var(--radius-lg);
  box-shadow: 0 14px 40px rgba(54, 44, 99, 0.08);
}

.illustrated-series-featured {
  background:
    radial-gradient(circle at 92% 5%, rgba(255, 215, 94, 0.2), transparent 28%),
    white;
}

.illustrated-series-heading {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(22px, 4vw, 54px);
  align-items: end;
  margin-bottom: 22px;
}

.illustrated-series-heading h3 {
  margin: 0;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
  text-align: left;
}

.illustrated-series-heading h3[dir="rtl"] {
  text-align: left;
}

.illustrated-series-summary > p {
  max-width: 580px;
  margin: 0;
  color: var(--muted);
}

.series-purchase-links {
  margin-top: 16px;
}

.illustrated-series-gallery {
  display: grid;
  gap: 16px;
}

.illustrated-series-gallery-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.illustrated-series-gallery-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.illustrated-cover-card {
  aspect-ratio: 1;
  margin: 0;
  overflow: hidden;
  border: 1px solid #ece8df;
  border-radius: 22px;
  background: #f7f9fc;
}

.illustrated-cover-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  transition: transform 240ms ease;
}

.illustrated-cover-card:hover .illustrated-cover-image {
  transform: scale(1.025);
}

.art-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
  align-items: start;
}

.portfolio-category {
  position: relative;
  isolation: isolate;
  display: block;
  padding: 0;
  min-height: 0;
  overflow: hidden;
  color: var(--ink);
  text-align: left;
  border: 1px solid #e8e3da;
  border-radius: var(--radius-md);
  background: white;
  box-shadow: 0 12px 36px rgba(34, 53, 94, 0.08);
  font: inherit;
  cursor: pointer;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.portfolio-category:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(34, 53, 94, 0.14);
}

.category-visual {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.category-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(81, 52, 127, 0.84) 100%);
}

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

.category-placeholder span {
  color: rgba(22, 35, 75, 0.34);
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(5rem, 12vw, 9rem);
  line-height: 1;
}

.category-spreads .category-placeholder {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.74), transparent), #cae9e0;
}

.category-details .category-placeholder {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.68), transparent), #f8e7a5;
}

.category-sketchbook .category-placeholder {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.68), transparent), #d9d1f5;
}

.category-covers .category-visual {
  background: #d8edf4;
}

.category-covers .category-visual img {
  object-fit: contain;
}

.category-copy {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  padding: clamp(20px, 3.2vw, 34px);
  display: grid;
  gap: 4px;
  color: white;
  background: linear-gradient(180deg, transparent, rgba(81, 52, 127, 0.96));
}

.category-copy strong {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  line-height: 1.15;
}

.category-copy small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.88rem;
}

.category-copy > span {
  margin-top: 7px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.art-wide {
  grid-column: span 7;
  aspect-ratio: 3 / 2;
}

.art-tall {
  grid-column: span 5;
  aspect-ratio: 4 / 5;
  background-color: #f6c7bd;
}

.art-square {
  grid-column: span 6;
  aspect-ratio: 1;
  background-color: #f8e7a5;
}

.art-square.alt {
  background-color: #d9d1f5;
}

.art-feature {
  grid-column: span 12;
  aspect-ratio: 16 / 9;
  background-color: #d9d1f5;
}

.illustration-gallery-view {
  padding: clamp(22px, 4vw, 42px);
  background: white;
  border: 1px solid #e8e3da;
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 50px rgba(34, 53, 94, 0.1);
  animation: panel-in 360ms ease both;
}

.gallery-toolbar {
  margin-bottom: 28px;
  padding-bottom: 24px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: end;
  border-bottom: 1px solid #eee8de;
}

.gallery-toolbar h3 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -0.035em;
}

.gallery-back {
  min-height: 44px;
  padding: 10px 16px;
  color: var(--ink);
  background: #f3f0e9;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.gallery-back:hover {
  background: #eae5da;
}

.gallery-items {
  display: grid;
  gap: 18px;
  align-items: start;
}

#gallery-sketchbook .gallery-items {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#gallery-sketchbook .sketchbook-item {
  grid-column: 1 / -1;
  min-width: 0;
}

#gallery-sketchbook .sketchbook-portrait {
  grid-column: span 2;
}

#gallery-sketchbook .sketchbook-portrait-single {
  grid-column: 2 / 4;
}

.illustration-categories.art-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.illustration-categories > .portfolio-category {
  grid-column: auto;
  aspect-ratio: 3 / 2;
}

.illustration-categories > .portfolio-category:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  aspect-ratio: 3 / 1;
}

@media (max-width: 760px) {
  .illustration-categories.art-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .illustration-categories > .portfolio-category:last-child:nth-child(odd) {
    aspect-ratio: 3 / 2;
  }
}

.gallery-items-portraits,
.gallery-items-squares,
.gallery-items-typography {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gallery-items-masonry,
.gallery-items-portraits,
.gallery-items-squares,
.gallery-items-typography {
  display: block;
  column-count: 3;
  column-gap: 18px;
  font-size: 0;
}

.gallery-items-portraits,
.gallery-items-squares,
.gallery-items-typography {
  column-count: 2;
}

:is(.gallery-items-masonry, .gallery-items-portraits, .gallery-items-squares, .gallery-items-typography) .gallery-art-button {
  width: 100%;
  margin: 0 0 18px;
  display: block;
  break-inside: avoid;
}

.gallery-items-portraits .gallery-art-wide {
  column-span: all;
}

@media (max-width: 760px) {
  .gallery-items-masonry,
  .gallery-items-portraits,
  .gallery-items-squares,
  .gallery-items-typography {
    column-count: 1;
  }
}

.gallery-art-button {
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  text-align: left;
  background: white;
  border: 1px solid #e8e3da;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 28px rgba(34, 53, 94, 0.08);
  font: inherit;
  cursor: zoom-in;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.gallery-art-button:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(34, 53, 94, 0.13);
}

.gallery-art-button img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.story-spread-item {
  width: 100%;
}

.story-spread-item img {
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: auto;
  object-fit: contain;
}

.gallery-art-wide {
  grid-column: 1 / -1;
}

.gallery-art-button > span {
  display: none;
}

.gallery-art-button small {
  color: #60739c;
  font-size: 0.75rem;
}

.gallery-placeholder {
  min-height: 0;
  display: grid;
  place-content: center;
  gap: 6px;
  padding: 28px;
  color: var(--ink);
  text-align: center;
  border: 2px dashed rgba(22, 35, 75, 0.18);
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), transparent),
    #cae9e0;
}

.gallery-landscape {
  aspect-ratio: 3 / 2;
}

.gallery-portrait {
  aspect-ratio: 4 / 5;
  background-color: #f6c7bd;
}

.gallery-square {
  aspect-ratio: 1;
  background-color: #f8e7a5;
}

.gallery-square.alt {
  background-color: #d9d1f5;
}

.gallery-square.sketch {
  background-color: #cae9e0;
}

.gallery-placeholder span {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.25rem, 2.5vw, 1.8rem);
  font-weight: 700;
}

.gallery-placeholder small {
  max-width: 300px;
  color: var(--muted);
}

.art-lightbox {
  width: min(680px, calc(100% - 32px));
  max-height: 92vh;
  padding: 18px;
  overflow: auto;
  border: 0;
  border-radius: 28px;
  background: white;
  box-shadow: 0 28px 90px rgba(13, 23, 64, 0.36);
}

.art-lightbox.is-landscape {
  width: min(1280px, calc(100% - 32px));
}

.art-lightbox::backdrop {
  background: rgba(13, 23, 64, 0.72);
  backdrop-filter: blur(5px);
}

.art-lightbox img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 75vh;
  display: block;
  object-fit: contain;
  margin-inline: auto;
  border-radius: 18px;
}

.art-lightbox p {
  display: none;
}

.lightbox-close {
  position: absolute;
  z-index: 2;
  top: 26px;
  right: 26px;
  width: 42px;
  height: 42px;
  padding: 0;
  color: white;
  background: rgba(22, 35, 75, 0.9);
  border: 0;
  border-radius: 50%;
  font: inherit;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
}

.about-layout,
.contact-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(36px, 7vw, 92px);
  align-items: center;
  padding: clamp(28px, 5vw, 64px);
  background: white;
  border: 1px solid #eee8de;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.portrait-slot {
  width: min(100%, 410px);
  aspect-ratio: 4 / 5;
  min-height: 0;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.92);
  border-radius: 52% 48% 45% 55%;
  background: white;
  box-shadow: 0 22px 46px rgba(22, 35, 75, 0.16);
}

.portrait-slot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.about-copy h3,
.contact-layout h3 {
  margin-bottom: 22px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  letter-spacing: -0.035em;
}

.about-copy > p:not(.book-kicker),
.contact-layout > div > p:not(.book-kicker) {
  color: var(--muted);
}

.contact-layout {
  grid-template-columns: minmax(0, 1.1fr) minmax(235px, 0.62fr) minmax(160px, 0.38fr);
  gap: clamp(24px, 3.2vw, 48px);
  min-height: 470px;
  background:
    radial-gradient(circle at 85% 15%, rgba(255, 215, 94, 0.25), transparent 25%),
    white;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.contact-instagram {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 50%;
  color: white;
  background: var(--ink);
}

.contact-instagram:hover {
  background: #51478f;
}

.contact-instagram:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.contact-placeholder {
  display: inline-block;
  padding: 14px 20px;
  color: white;
  background: var(--ink);
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.contact-cards {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 12px;
  width: min(100%, 300px);
  min-height: 225px;
  justify-self: center;
}

.contact-cards span {
  padding: 18px 20px;
  color: #314f83;
  background: #edf6fb;
  border: 1px solid #dcecf5;
  border-radius: 17px;
  font-weight: 700;
  transform: rotate(-1deg);
}

.contact-cards span:nth-child(2) {
  background: #fff5ce;
  border-color: #f3e7af;
  transform: rotate(1.2deg);
}

.contact-cards span:nth-child(3) {
  background: #f0ebfc;
  border-color: #dfd5f6;
  transform: rotate(-0.5deg);
}

.contact-flower-art {
  width: min(100%, 215px);
  height: 225px;
  justify-self: center;
}

.contact-flower-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

footer {
  width: min(1180px, 100%);
  margin: 84px auto 0;
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  border-top: 1px solid #e4ded3;
  font-size: 0.86rem;
}

footer a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-9px) rotate(7deg); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.84; }
  50% { opacity: 1; }
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 920px) {
  h1 {
    font-size: clamp(3.4rem, 8.8vw, 5.6rem);
  }

  .portfolio-header {
    grid-template-columns: 1fr;
  }

  .tabs {
    width: fit-content;
  }

  .book-grid {
    grid-template-columns: 1fr;
  }

  .book-card {
    width: min(100%, 640px);
    margin: 0 auto;
  }

  .coming-soon-card {
    grid-template-columns: minmax(240px, 0.9fr) 1.1fr;
  }

  .art-wide {
    grid-column: span 12;
  }

  .art-tall,
  .art-square {
    grid-column: span 6;
  }
}

@media (max-width: 760px) {
  .topbar {
    width: calc(100% - 36px);
    min-height: 72px;
  }

  .topbar > span {
    display: none;
  }

  .hero-layout {
    padding: 12px 0 0;
  }

  .hero-copy {
    width: calc(100% - 36px);
    max-width: 430px;
  }

  .hero-copy .eyebrow {
    margin-bottom: 8px;
    font-size: 0.68rem;
  }

  h1 {
    max-width: 420px;
    margin-bottom: 12px;
    font-size: clamp(2.25rem, 10.2vw, 3.3rem);
    line-height: 0.98;
  }

  .hero-copy h1 em {
    color: #9b70fe;
    text-shadow: 0 4px 22px rgba(95, 63, 207, 0.22);
  }

  .sky-hero {
    height: clamp(840px, 220vw, 1040px);
  }

  .hero-scene-image {
    inset: 0;
    width: 100%;
    height: 100%;
    object-position: 56% top;
  }

  .hero-intro {
    max-width: 355px;
    margin-bottom: 0;
    font-size: 0.88rem;
    line-height: 1.45;
  }

  .scroll-cue {
    position: absolute;
    left: 50%;
    bottom: clamp(125px, 14%, 155px);
    width: max-content;
    max-width: calc(100% - 36px);
    margin: 0;
    padding: 12px 18px;
    transform: translateX(-50%);
    z-index: 4;
  }

  .constellation {
    min-height: 980px;
    padding-inline: 18px;
  }

  .star-map {
    min-height: 650px;
    margin-top: 10px;
  }

  .constellation-lines {
    display: none;
  }

  .star-books { top: 6%; left: 2%; }
  .star-illustration { top: 28%; right: 0; left: auto; }
  .star-about { top: 52%; left: 3%; right: auto; }
  .star-contact { right: 7%; bottom: 1%; }

  .portfolio {
    padding-inline: 18px;
  }

  .portfolio-header {
    margin-bottom: 36px;
  }

  .tabs {
    width: 100%;
    border-radius: 24px;
  }

  .tab {
    flex: 1 1 42%;
  }

  .section-lead {
    display: block;
  }

  .section-lead p {
    margin-top: 8px;
  }

  .book-card {
    display: block;
  }

  .book-copy h3,
  .book-copy > p:not(.book-kicker) {
    min-height: 0;
  }

  .coming-soon-card {
    grid-template-columns: 1fr;
  }

  .coming-soon-copy {
    padding: 8px 10px 18px;
  }

  .illustrated-series-heading,
  .illustrated-series-gallery-pair {
    grid-template-columns: 1fr;
  }

  .illustrated-series-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .illustration-gallery-view {
    padding: 20px;
  }

  .gallery-toolbar,
  .gallery-items-portraits,
  .gallery-items-squares,
  .gallery-items-typography {
    grid-template-columns: 1fr;
  }

  .gallery-toolbar {
    align-items: start;
  }

  .gallery-back {
    justify-self: start;
  }

  .art-wide,
  .art-tall,
  .art-feature {
    grid-column: span 12;
  }

  .art-square {
    grid-column: span 6;
  }

  .about-layout,
  .contact-layout {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .portrait-slot {
    width: min(100%, 370px);
    justify-self: center;
  }
}

@media (max-width: 430px) {
  .constellation h2,
  .portfolio h2 {
    font-size: 2.35rem;
  }

  .star-link {
    min-width: 128px;
  }

  .star-shape {
    width: 88px;
    height: 88px;
  }

  .art-grid {
    grid-template-columns: 1fr;
  }

  .art-wide,
  .art-tall,
  .art-square,
  .art-feature {
    grid-column: auto;
  }

  .art-feature {
    aspect-ratio: 4 / 5;
  }

  footer {
    gap: 20px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .star-link,
  .constellation::before,
  .constellation::after {
    opacity: 1;
    transform: none;
  }
}
