@import url("https://fonts.googleapis.com/css2?family=Yuyu+Short&display=swap");

:root {
  --ink: #1e1b24;
  --muted: #645d70;
  --accent: #5b3f9a;
  --card: rgba(255, 255, 255, 0.82);
  --line: rgba(30, 27, 36, 0.12);
  --radius: 14px;
  --max: 1100px;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: #f7f2e7; /* soft cream */
}

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

/* ---------- Header & navigation ---------- */

.site-header {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 26px 20px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

/* Yuyu Short has only a regular weight, so a thin outline thickens it to keep the name prominent */
.brand {
  font-family: "Yuyu Short", var(--serif);
  font-weight: 400;
  font-size: clamp(2.8rem, 6.5vw, 4.2rem);
  line-height: 1;
  letter-spacing: 0.01em;
  text-decoration: none;
  -webkit-text-stroke: 0.6px currentColor;
}

.site-header nav {
  display: flex;
  gap: 24px;
}

.site-header nav a {
  text-decoration: none;
  font-size: 0.95rem;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
  border-bottom-color: var(--accent);
}

/* ---------- Layout ---------- */

main {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 36px 20px 80px;
  flex: 1;
}

h1, h2 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  margin: 0 0 0.4em;
}

h2 {
  font-size: 1.9rem;
  margin: 0 0 18px;
}

.page-title {
  margin-bottom: 8px;
}

.intro-text {
  color: var(--muted);
  max-width: 60ch;
  margin: 0 0 36px;
  font-size: 1.05rem;
}

.lead {
  font-size: clamp(0.92rem, 2.08vw, 1.16rem);
  line-height: 1.5;
  max-width: none;
  margin: 0 0 24px;
}


.blurb {
  max-width: none;
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 0.84rem;
}

.section {
  margin-bottom: 64px;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.button {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.button:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.button.ghost {
  background: transparent;
  color: var(--ink);
}

.button.ghost:hover {
  color: #fff;
}

.panel {
  background: var(--card);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}

/* ---------- Works grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 28px 24px;
}

.work {
  margin: 0;
}

.work .art {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ph, #ece8f4);
  box-shadow: 0 8px 24px rgba(60, 40, 100, 0.08);
}

.work .art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work figcaption {
  margin-top: 12px;
  font-size: 0.92rem;
}

.work .title {
  font-weight: 500;
}

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

/* ---------- Carousel (Work page) ---------- */

.carousel {
  --slide-w: min(60vw, 340px);
  overflow: hidden;
}

/* Perspective container for the 3D ring of works */
.stage {
  position: relative;
  height: calc(var(--slide-w) * 1.25 + 24px);
  perspective: 1100px;
  touch-action: pan-y;
  cursor: grab;
}

.stage:focus-visible {
  border-radius: var(--radius);
}

.slide {
  position: absolute;
  top: 20px;
  left: 50%;
  width: var(--slide-w);
  aspect-ratio: 4 / 5;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ph, #ece8f4);
  box-shadow: 0 16px 40px rgba(60, 40, 100, 0.16);
  cursor: pointer;
  transform-origin: center center;
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1),
              opacity 0.9s ease,
              filter 0.9s ease,
              visibility 0.9s;
  user-select: none;
  -webkit-user-select: none;
}

/* Wider frame for project photos */
.carousel.landscape {
  --slide-w: min(78vw, 640px);
}

.carousel.landscape .stage {
  height: calc(var(--slide-w) * 0.85 + 24px);
}

.carousel.landscape .slide.has-photo img {
  max-width: var(--slide-w);
  max-height: calc(var(--slide-w) * 0.85);
}

.slide.is-active {
  cursor: zoom-in;
  box-shadow: 0 22px 50px rgba(60, 40, 100, 0.24);
}

.slide {
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* show the whole photo, never cropped */
  display: block;
  pointer-events: none;
}

/* Photo slides: the frame is exactly the photo, with no background or padding around it */
.slide.has-photo {
  aspect-ratio: auto;
  background: none;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 0;
  height: 100%;
}

.slide.has-photo img {
  /* Every photo fills the same width; its own proportions set the height */
  width: auto;
  height: auto;
  max-width: calc(var(--slide-w) * 1.25);
  max-height: calc(var(--slide-w) * 1.25);
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(60, 40, 100, 0.16);
}

.slide.has-photo.is-active img {
  box-shadow: 0 22px 50px rgba(60, 40, 100, 0.24);
}

.slide .media-label {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--muted);
}

.slide-caption {
  text-align: center;
  margin-top: 18px;
  max-width: 560px;
  min-height: 120px;
  margin-inline: auto;
}

.slide-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.7rem;
  line-height: 1.2;
  margin: 0 0 6px;
}

.slide-caption .meta {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
}

.slide-price {
  margin: 8px 0 0;
  font-weight: 500;
  font-size: 0.95rem;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 24px;
}

.controls[hidden] {
  display: none;
}

.nav-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.nav-btn:hover:not(:disabled) {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.nav-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.counter {
  min-width: 4.5em;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- Year filter ---------- */

.years {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.years button {
  font: inherit;
  font-size: 0.9rem;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}

.years button:hover {
  border-color: var(--accent);
}

.years button[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.year-group {
  margin-bottom: 60px;
}

.year-group h2 {
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

/* ---------- Projects ---------- */

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

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 36px 28px;
}

.project-card {
  display: block;
  text-decoration: none;
}

.project-card .art {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ph, #ece8f4);
  box-shadow: 0 8px 24px rgba(60, 40, 100, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover .art {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(60, 40, 100, 0.14);
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-title {
  font-size: 1.6rem;
  margin: 14px 0 4px;
}

.project-info .meta {
  margin: 0;
}

.back-link {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.back-link:hover {
  color: var(--accent);
}

#project-meta {
  margin: 0 0 12px;
}

/* Project viewer: main photo, arrows, and a row of thumbnails */

.viewer-stage {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(60, 40, 100, 0.14);
  touch-action: pan-y;
}

.media {
  width: 100%;
  height: 100%;
  background: var(--ph, #ece8f4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.media-label {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--muted);
}

.viewer-stage:focus-visible {
  outline-offset: 4px;
}

.viewer-label {
  text-align: center;
  font-weight: 500;
  margin: 18px 0 0;
}

.viewer .controls {
  margin-top: 14px;
}

.thumbs {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 22px;
}

.thumbs[hidden] {
  display: none;
}

.thumb {
  width: 76px;
  height: 76px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: none;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s, border-color 0.2s;
}

.thumb:hover {
  opacity: 0.9;
}

.thumb[aria-current="true"] {
  border-color: var(--accent);
  opacity: 1;
}

.thumb .media-label {
  display: none;
}

/* ---------- Shop list ---------- */

.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

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

.price {
  font-weight: 500;
  white-space: nowrap;
}

.empty {
  color: var(--muted);
}

/* ---------- Contact form ---------- */

form label {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 16px;
}

form input,
form select,
form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 13px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 10px;
}

form textarea {
  min-height: 160px;
  resize: vertical;
}

form .button {
  border: 0;
  margin-top: 6px;
}

.hp {
  position: absolute;
  left: -9999px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 32px;
  align-items: start;
}

.contact-info p {
  margin: 0 0 14px;
}

/* ---------- Footer ---------- */

.site-footer {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  padding: 24px 20px 32px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 20px 28px;
  box-sizing: border-box;
  background: rgba(247, 242, 231, 0.97);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.lightbox-close:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.lightbox-dialog {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1000px;
  min-height: 0;
}

.lightbox-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
}

.lightbox-media {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(60, 40, 100, 0.2);
}

.lightbox-media img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
}

.lightbox-media.placeholder {
  width: min(86vw, 480px);
  aspect-ratio: 4 / 5;
  background: var(--ph, #ece8f4);
}

.lightbox-media .media-label {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--muted);
}

.lightbox-caption {
  min-height: 0;
  margin-top: 16px;
}

.lightbox .controls {
  margin-top: 14px;
}

/* ---------- Small screens ---------- */

@media (max-width: 720px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px 16px;
  }

  .panel {
    padding: 22px;
  }

  .site-header nav {
    gap: 18px;
  }
}
