/* Layout and theme */
/* Custom font */
@font-face {
  font-family: 'French';
  src: url('fonts/French/French.ttf') format('truetype');
}

@font-face {
  font-family: 'FrenchAlt';
  src: url('fonts/French/French Alternative.ttf') format('truetype');
}

@font-face {
  font-family: 'Indonesian';
  src: url('fonts/Indonesian.ttf') format('truetype');
}

/* Cormorant (body text). Variable fonts, latin subset, self-hosted.
   SIL Open Font License 1.1 — see fonts/Cormorant/OFL.txt. */
@font-face {
  font-family: 'Cormorant';
  src: url('fonts/Cormorant/Cormorant-Variable.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant';
  src: url('fonts/Cormorant/Cormorant-Italic-Variable.woff2') format('woff2');
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #05060a;
  --page-bg: #f8f2e8;
  --page-panel: rgba(255, 255, 255, 0.5);
  --page-text: #1f1b17;
  --page-muted: rgba(35, 31, 28, 0.78);
  --text: #f4f4f8;
  --muted: rgba(244, 244, 248, 0.75);
  --dark-text: #2f2b29;
  --accent: #3b82f6;
  --overlay: rgba(0, 0, 0, 0.55);
  --overlay-strong: rgba(0, 0, 0, 0.72);
  --radius: 18px;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.55);
  --nav-width: 240px;
  --banner-height: 100vh;
  --font-sans: "Heiti TC", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  --font-display: 'French', cursive;
  --font-body: 'Cormorant', Georgia, 'Times New Roman', serif; /* reading text (paragraphs, lists) */
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--page-bg);
  overflow-x: hidden;
}

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

a:focus,
a:hover {
  text-decoration: underline;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  z-index: 30;
  pointer-events: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.menu-btn {
  width: 2.4rem;
  height: 2.4rem;
  border: none;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 14px;
  display: grid;
  place-items: center;
  padding: 0.4rem;
  cursor: pointer;
  transition: background 180ms ease;
}

.menu-btn:hover {
  background: rgba(0, 0, 0, 0.65);
}

.menu-btn span {
  content: "";
  display: block;
  width: 1.4rem;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
  position: relative;
}

.menu-btn span + span {
  margin-top: 5px;
}

.menu {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--nav-width);
  padding: 5.5rem 1.25rem 2.5rem;
  background: linear-gradient(135deg, rgba(4, 9, 21, 0.96), rgba(0, 0, 0, 0.8));
  box-shadow: 4px 0 32px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateX(-14px);
  transition: opacity 280ms ease, transform 280ms ease;
  pointer-events: none;
  z-index: 28;
}

.site-header:hover .menu,
.menu:hover {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.menu ul {
  padding: 0;
  margin: 0;
  list-style: none;
  display: grid;
  gap: 0.85rem;
}

.menu a {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  color: var(--text);
  font-family: "Heiti TC", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 180ms ease, background 180ms ease;
}

.menu a:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(3px);
}

.has-submenu .submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 260ms ease, opacity 260ms ease;
  opacity: 0;
  margin-top: 0.5rem;
  padding-left: 0.5rem;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.has-submenu:hover .submenu {
  max-height: 240px;
  opacity: 1;
}

.submenu li a {
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.04);
}

.site-main {
  scroll-snap-type: y mandatory;
  overflow-y: auto;
  height: 100vh;
}

.banner {
  position: relative;
  min-height: var(--banner-height);
  scroll-snap-align: start;
  display: grid;
  place-items: center;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.85s ease, transform 0.85s ease;
}

.banner__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1);
  transition: transform 450ms ease;
}

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

.banner__overlay {
  position: relative;
  z-index: 2;
  width: min(92vw, 1100px);
  text-align: center;
  padding: 0 1.5rem;
  display: grid;
  gap: 1rem;
}

.banner__overlay h1,
.banner__overlay h2 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  text-transform: none;
  text-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
}

.banner__overlay h1 {
  font-size: clamp(3.4rem, 7vw, 6.2rem);
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
}

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

.carousel-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.brand-wordmark {
  width: min(216vw, 3300px);
  max-width: 100%;
  height: auto;
  display: block;
  opacity: 0.96;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.22));
  transform: translate(-28px, -20px);
}

.banner__overlay h2 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  color: rgba(255, 255, 255, 0.92);
}

.banner--equipment {
  background: #c3b5a8;
}

.banner--equipment .banner__overlay {
  width: min(92vw, 1100px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  text-align: left;
  gap: 2rem;
}

.equipment-copy {
  display: grid;
  gap: 1rem;
}

.equipment-copy h2 {
  color: rgba(255, 255, 255, 0.96);
  font-size: clamp(2.6rem, 5.9vw, 4.4rem);
}

.equipment-copy p {
  margin: 0;
  max-width: 34rem;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.82);
}

.equipment-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.8rem;
  justify-items: start;
}

.equipment-list li {
  position: relative;
  padding-left: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(0.95rem, 1.2vw, 1.15rem);
  line-height: 1.6;
}

.equipment-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: rgba(255, 255, 255, 0.9);
}

.content-panel h1 {
  font-family: var(--font-display);
  text-transform: none;
}

@media (max-width: 760px) {
  .banner--equipment .banner__overlay {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .equipment-copy,
  .equipment-list {
    justify-items: start;
  }
}

.site-title .alt-letter {
  font-family: 'FrenchAlt', cursive;
}

.banner__overlay h2.indonesian-title,
.artwork-card .indonesian-title {
  font-family: 'French', cursive;
  text-transform: none;
  letter-spacing: 0.04em;
}

.banner__overlay p {
  margin: 0;
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 720px;
}

.banner--portfolio {
  background: var(--page-bg);
}

/* Full screen like the hero and About sections; content is centered vertically by
   .banner (display: grid; place-items: center). min-height (not height) lets the
   section grow taller than the screen on phones instead of cutting content off. */
.banner--portfolio,
.banner--services-contact {
  min-height: var(--banner-height);
}

/* Split layout like About: text column on the left, scrolling video rows filling the
   right. --left = width of the text column; --edge = space around the video block
   (0 = flush to the section's top, bottom and right edges). */
.portfolio-overlay {
  --left: 33%;
  --edge: 0px;
  --gap: 0.7rem;
  --screen-h: 100vh;
  width: 100%;
  max-width: none;
  height: var(--screen-h);
  padding: 0;
  display: grid;
  grid-template-columns: var(--left) minmax(0, 1fr);
  gap: 0;
  text-align: left;
}

.portfolio-text {
  display: grid;
  align-content: center;
  gap: 0.9rem;
  padding: 2.8rem 2.2rem 2.8rem 3.2rem;
  color: var(--dark-text);
  min-width: 0;
}

.portfolio-title {
  margin: 0 0 0.4rem;
  line-height: 0;
}

/* Sized to match the "About Me" heading: same font-size formula, and the PNG's
   lowercase letters are ~0.48 of a font-size tall vs ~0.21 of the image height. */
.portfolio-title-img {
  display: block;
  height: calc(2.1 * clamp(2.6rem, 4.3vw, 4.1rem));
  width: auto;
  max-width: 100%;
}

.portfolio-text p {
  margin: 0;
  font-size: clamp(0.88rem, min(1.12vw, 2vh), 1.1rem);
  font-weight: 500;
  color: rgba(31, 27, 23, 0.9);
  line-height: 1.45;
  max-width: 460px;
  font-family: var(--font-body);
}

.portfolio-text .portfolio-cta {
  margin-top: 0.3rem;
}

.portfolio-link {
  font-family: "Heiti TC", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  color: rgba(31, 27, 23, 0.85);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  white-space: nowrap; /* keep the "Watch Full Videos →" link on one line */
}

.portfolio-link:hover {
  text-decoration: none;
  opacity: 0.8;
}

/* Scrolling rows: three equal rows fill the right column's height. Each clip is as
   tall as its row and 16:9 wide (the script in index.html sets the width and moves
   the clips with transforms; a clip leaving on the left wraps round to the right). */
.portfolio-marquee {
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  margin: var(--edge) var(--edge) var(--edge) 0;
  min-width: 0;
  min-height: 0;
}

.portfolio-row {
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.portfolio-row .portfolio-video-card {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: auto;
  aspect-ratio: 16 / 9;
  min-height: 0;
  will-change: transform;
}

/* Before the script runs (or without JS), lay clips out side by side. */
.portfolio-marquee:not(.is-ready) .portfolio-row { display: flex; gap: var(--gap); }
.portfolio-marquee:not(.is-ready) .portfolio-row .portfolio-video-card { position: relative; flex: 0 0 auto; }

/* Rows can be held (pause) and dragged/flung (see script in index.html).
   touch-action: pan-y keeps up/down swipes scrolling the page on phones. */
.portfolio-marquee.is-ready .portfolio-row {
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.portfolio-marquee.is-ready .portfolio-row.is-grabbing {
  cursor: grabbing;
}

.portfolio-marquee.is-ready .portfolio-video {
  pointer-events: none; /* let presses reach the row, never the video */
}

.portfolio-video-card {
  position: relative;
  display: block;
  padding: 0;
  border-radius: 0;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  box-shadow: none;
  border: 0;
  width: 100%;
  height: 100%;
  min-height: 150px;
}

.portfolio-video-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: none;
}

.portfolio-video-card span {
  display: none;
}

.portfolio-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  background: linear-gradient(135deg, #7a685a, #302d2b);
}

.portfolio-video-card--featured {
  background: linear-gradient(135deg, #7a685a, #302d2b);
}

.portfolio-video-card--second {
  background: linear-gradient(135deg, #6a6e75, #2a3037);
}

.portfolio-video-card--one { background-image: linear-gradient(135deg, #7a685a, #302d2b); }
.portfolio-video-card--two { background-image: linear-gradient(135deg, #6d767f, #273239); }
.portfolio-video-card--three { background-image: linear-gradient(135deg, #8a6c5d, #453d39); }
.portfolio-video-card--four { background-image: linear-gradient(135deg, #5c6d6a, #2e393b); }
.portfolio-video-card--five { background-image: linear-gradient(135deg, #837564, #463d37); }
.portfolio-video-card--six { background-image: linear-gradient(135deg, #586f7d, #2d3a45); }
.portfolio-video-card--seven { background-image: linear-gradient(135deg, #8f7a68, #474139); }
.portfolio-video-card--eight { background-image: linear-gradient(135deg, #74686d, #3a2d34); }
.portfolio-video-card--nine { background-image: linear-gradient(135deg, #4f5f75, #28313f); }
.portfolio-video-card--ten { background-image: linear-gradient(135deg, #7a675d, #332c2b); }
.portfolio-video-card--eleven { background-image: linear-gradient(135deg, #5f6875, #2c3138); }
.portfolio-video-card--twelve { background-image: linear-gradient(135deg, #867767, #463f3a); }

.banner--services-contact {
  background: #c8b8a4;
}

.services-contact-overlay {
  width: min(94vw, 1200px);
  max-width: none;
  padding: 3.5rem 1.5rem;
  display: grid;
  gap: 1.5rem;
  text-align: left;
}

.services-contact-header h2 {
  margin: 0;
  line-height: 0;
  text-shadow: none;
}

/* Script title image (white on transparent), centred, with the old heading's soft
   shadow. Width follows the old heading's font-size (about as wide as the text title
   was); height is --squash of the image's natural proportions, so the tall script
   letters are flattened a little. The PNG is 1827 x 650. */
.services-contact-title-img {
  --fs: clamp(2.6rem, 5vw, 4.2rem);
  display: block;
  margin: 0 auto;
  width: calc(8.5 * var(--fs)); /* thin, wide script: wider than the old title so letters read at a similar size */
  height: auto;
  max-width: 100%;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.35)); /* tight shadow: lifts the thin white strokes without a haze */
}

/* Two boxes: Equipment | Pricing & Contact */
.services-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}

/* Second list in the Pricing & Contact box: a gap above to separate the contact lines */
.services-contact-panel .services-contact-details {
  margin-top: 1.6rem;
}

/* Email and phone are tappable but look like the other lines (only "Get a quote" is bold) */
.services-contact-details a[href^="mailto:"],
.services-contact-details a[href^="tel:"] {
  font-weight: inherit;
  color: inherit;
}

.services-contact-panel {
  padding: 1.4rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.8rem;
  background: rgba(34, 29, 25, 0.14);
}

.services-contact-panel h3 {
  margin: 0 0 0.9rem;
  text-align: center;
  font-family: "Heiti TC", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.96);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.services-contact-panel ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.7rem;
}

.services-contact-panel li {
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(0.95rem, min(1.1vw, 2vh), 1.08rem);
  line-height: 1.45;
}

.services-contact-panel li strong {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.98);
}

.services-contact-panel a {
  color: rgba(255, 255, 255, 0.98);
  font-weight: 700;
}

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

@media (max-width: 600px) {
  /* Phones: stack the text above the video rows. */
  .portfolio-overlay {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    --edge: 0px;
  }

  .portfolio-text {
    padding: 4.5rem 1.5rem 1.2rem;
    gap: 0.6rem;
  }

  .portfolio-marquee {
    margin: 0 0 1rem;
  }
}

.banner--artwork .banner__overlay {
  width: 100vw;
  height: 100vh;
  max-width: none;
  padding: 0 1.2rem 0 3.5rem;
  display: grid;
  grid-template-columns: minmax(16rem, 1fr) auto;
  align-items: stretch;
  column-gap: 1.8rem;
}

.artwork-intro {
  display: grid;
  align-content: center;
  gap: 1.1rem;
  text-align: left;
  max-width: 30rem;
}

.artwork-intro h2 {
  margin: 0;
  font-family: 'French', cursive;
  font-size: clamp(3rem, 5.5vw, 5rem);
  color: rgba(31, 27, 23, 0.95);
  text-shadow: none;
  letter-spacing: 0.03em;
}

.artwork-intro p {
  margin: 0;
  font-family: "Heiti TC", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: clamp(1.05rem, 1.4vw, 1.35rem);
  line-height: 1.75;
  color: rgba(31, 27, 23, 0.8);
  max-width: 28rem;
}

.banner__link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.banner:hover .banner__bg {
  transform: scale(1.035);
}

.banner.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.artwork-mosaic {
  --mosaic-gap: 0.55rem;
  --mosaic-cell-by-width: calc((74vw - (2 * var(--mosaic-gap))) / 3);
  --mosaic-cell-by-height: calc((100vh - (2 * var(--mosaic-gap))) / 3);
  --mosaic-cell: min(var(--mosaic-cell-by-width), var(--mosaic-cell-by-height));
  display: grid;
  grid-template-columns: repeat(3, var(--mosaic-cell));
  grid-template-rows: repeat(3, var(--mosaic-cell));
  gap: var(--mosaic-gap);
  width: calc((3 * var(--mosaic-cell)) + (2 * var(--mosaic-gap)));
  height: calc((3 * var(--mosaic-cell)) + (2 * var(--mosaic-gap)));
  justify-self: end;
}

.artwork-mosaic-card {
  position: relative;
  overflow: hidden;
  border-radius: 0.15rem;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.24);
  background-size: cover;
  background-position: center;
  transition: transform 260ms ease, box-shadow 260ms ease;
}

.artwork-mosaic-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.5));
}

.artwork-mosaic-card span {
  position: absolute;
  left: 50%;
  bottom: 0.55rem;
  transform: translateX(-50%);
  z-index: 1;
  font-family: "Heiti TC", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: clamp(0.9rem, 1.25vw, 1.15rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.98);
  text-align: center;
  white-space: nowrap;
  padding: 0;
}

.artwork-mosaic-placeholder {
  border-radius: 0.15rem;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.2);
  background-size: cover;
  background-position: center;
}

.artwork-mosaic-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
}

.artwork-mosaic-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.artwork-mosaic-card--real-estate {
  background-image: url('https://pub-b90a8e956c8f4cb28ee9d0205af29830.r2.dev/services-bg.png');
}

.artwork-mosaic-card--interviews {
  background-image: url('https://pub-b90a8e956c8f4cb28ee9d0205af29830.r2.dev/Michael_portrait_1.jpg');
}

.artwork-mosaic-card--weddings {
  background-image: url('https://pub-b90a8e956c8f4cb28ee9d0205af29830.r2.dev/about-bg.png');
}

.artwork-mosaic-card--portfolio {
  background-image: url('https://pub-b90a8e956c8f4cb28ee9d0205af29830.r2.dev/Michael_portrait_2.jpg');
}

.artwork-mosaic-card--events {
  background-image: url('https://pub-b90a8e956c8f4cb28ee9d0205af29830.r2.dev/services-bg.png');
}

.artwork-mosaic-card--tbd-1 {
  background-image: url('https://pub-b90a8e956c8f4cb28ee9d0205af29830.r2.dev/Michael_portrait_2.jpg');
}

.artwork-mosaic-card--tbd-2 {
  background-image: linear-gradient(135deg, #606870, #353a42);
}

.artwork-mosaic-card--tbd-3 {
  background-image: linear-gradient(135deg, #8d786d, #4b3f38);
}

.artwork-mosaic-card--editing {
  background-image: linear-gradient(135deg, #4f6877, #2f3940);
}

.artwork-mosaic-placeholder--left-1 {
  background-image: linear-gradient(135deg, #8b7b70, #5d5249);
}

.artwork-mosaic-placeholder--right-1 {
  background-image: linear-gradient(135deg, #4e6780, #2f3f54);
}

.artwork-mosaic-placeholder--left-2 {
  background-image: linear-gradient(135deg, #758377, #4f5f4f);
}

.artwork-mosaic-placeholder--right-2 {
  background-image: linear-gradient(135deg, #82636d, #5d4654);
}

.artwork-mosaic-placeholder--left-3 {
  background-image: linear-gradient(135deg, #546273, #394858);
}

.artwork-mosaic-placeholder--right-3 {
  background-image: linear-gradient(135deg, #6c655d, #4a453f);
}

.content-page.gallery-page {
  display: block;
  min-height: 100vh;
  overflow: visible;
  padding: 7rem 0 3rem;
  background: #f7efe4;
  scroll-snap-type: none;
  -webkit-overflow-scrolling: touch;
}

.gallery-shell {
  width: min(92vw, 1200px);
  margin: 0 auto;
  padding-bottom: 3rem;
}

.gallery-header {
  margin-bottom: 2rem;
  text-align: center;
  min-height: auto;
  display: grid;
  place-items: center;
  scroll-snap-align: none;
}

.gallery-page h1 {
  margin: 0;
  font-family: 'French', cursive;
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  color: var(--page-text);
  text-align: center;
}

/* Portfolio page title: the same script image as the home Portfolio section.
   Height uses the home formula (2.1 × font-size) so it matches the old text title's size. */
.gallery-page h1.gallery-title {
  line-height: 0;
}

.gallery-title-img {
  display: block;
  height: calc(2.1 * clamp(2.8rem, 5vw, 4.2rem));
  width: auto;
  max-width: 100%;
  margin: 0 auto;
}

/* ====== PORTFOLIO PAGE — mixed wall (portfolio.html) ======
   Filter buttons, then one wall (CSS columns) where every piece keeps its own shape.
   Clicking a tile opens the viewer: YouTube videos play in place, photos open large. */
.work-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 auto 2rem;
}

.work-filter {
  font: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(31, 27, 23, 0.35);
  background: transparent;
  color: var(--page-text);
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
}

.work-filter:hover {
  border-color: var(--page-text);
}

.work-filter[aria-pressed="true"] {
  background: var(--page-text);
  border-color: var(--page-text);
  color: #f7efe4;
}

.work-filter:focus-visible,
.work-tile:focus-visible,
.work-viewer button:focus-visible {
  outline: 2px solid var(--page-text);
  outline-offset: 3px;
}

/* Without the script: plain CSS columns. With it (.is-masonry): the script builds
   .work-col columns and places tiles by rank, so the wall reads across. */
.work-wall {
  margin: 0;
  padding: 0;
  columns: 3;
  column-gap: 1rem;
}

.work-wall.is-masonry {
  columns: auto;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.work-col {
  flex: 1 1 0;
  min-width: 0;
}

.work-item {
  break-inside: avoid;
  margin: 0 0 1rem;
}

.work-tile {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0.8rem;
  overflow: hidden;
  background: #2b2522;
  box-shadow: 0 18px 45px rgba(17, 15, 14, 0.12);
  cursor: pointer;
  transition: transform 280ms ease, box-shadow 280ms ease;
}

.work-tile img {
  display: block;
  width: 100%;
  height: auto;
}

.work-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 52px rgba(17, 15, 14, 0.18);
}

/* Play button on video tiles */
.work-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3.2rem;
  height: 3.2rem;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.7);
  transition: background 200ms ease;
}

.work-play::after {
  content: "";
  position: absolute;
  left: 54%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-left: 0.9rem solid #fff;
  border-top: 0.55rem solid transparent;
  border-bottom: 0.55rem solid transparent;
}

.work-tile:hover .work-play {
  background: rgba(0, 0, 0, 0.65);
}

.work-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2rem 0.9rem 0.7rem;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.65));
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.3;
  text-align: left;
}

/* Viewer (pop-up) */
.work-viewer {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f4f4f8;
}

.work-viewer::backdrop {
  background: rgba(8, 7, 6, 0.9);
}

.work-viewer__frame {
  height: 100%;
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr) 4rem;
  grid-template-rows: 1fr auto;
  align-items: center;
  justify-items: center;
  padding: 3.5rem 0 1.5rem;
}

.work-viewer__stage {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  min-height: 0;
}

.work-viewer__stage iframe {
  width: min(100%, calc((100vh - 9rem) * 16 / 9));
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 0.5rem;
  background: #000;
}

.work-viewer__stage img {
  max-width: 100%;
  max-height: calc(100vh - 9rem);
  width: auto;
  height: auto;
  border-radius: 0.5rem;
}

.work-viewer__caption {
  grid-column: 2;
  grid-row: 2;
  margin: 0.9rem 0 0;
  font-size: 0.95rem;
  text-align: center;
  color: rgba(244, 244, 248, 0.85);
}

.work-viewer button {
  font: inherit;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 2.8rem;
  height: 2.8rem;
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
}

.work-viewer button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.work-viewer__prev { grid-column: 1; grid-row: 1; }
.work-viewer__next { grid-column: 3; grid-row: 1; }

.work-viewer__close {
  position: absolute;
  top: 0.9rem;
  right: 1rem;
}

@media (max-width: 900px) {
  .work-wall {
    columns: 2;
  }
}

@media (max-width: 600px) {
  .work-filters {
    gap: 0.4rem;
    margin-bottom: 1.4rem;
  }

  .work-filter {
    font-size: 0.78rem;
    padding: 0.4rem 0.8rem;
  }

  .work-wall {
    column-gap: 0.6rem;
  }

  .work-wall.is-masonry {
    gap: 0.6rem;
  }

  .work-item {
    margin-bottom: 0.6rem;
  }

  .work-tile {
    border-radius: 0.6rem;
  }

  .work-play {
    width: 2.4rem;
    height: 2.4rem;
  }

  .work-play::after {
    border-left-width: 0.7rem;
    border-top-width: 0.42rem;
    border-bottom-width: 0.42rem;
  }

  .work-title {
    font-size: 0.75rem;
    padding: 1.4rem 0.6rem 0.5rem;
  }

  /* Phones: arrows sit under the picture, beside the caption */
  .work-viewer__frame {
    grid-template-columns: 3.2rem minmax(0, 1fr) 3.2rem;
    padding: 3.5rem 0.5rem 1.2rem;
  }

  .work-viewer__stage {
    grid-column: 1 / -1;
  }

  .work-viewer__stage iframe {
    width: 100%;
  }

  .work-viewer__prev,
  .work-viewer__next {
    grid-row: 2;
    margin-top: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .work-tile:hover {
    transform: none;
  }
}


/* ====== ABOUT SECTION — split layout (index.html scroll section) ====== */
.banner--about {
  background: var(--page-bg);
}

/* Photo on the left, text on the right (desktop/tablet). row-reverse keeps the text first
   in the HTML, so screen readers and the stacked phone layout still read text first. */
.banner--about .banner__overlay.about-split {
  display: flex;
  flex-direction: row-reverse;
  align-items: stretch;
  justify-content: space-between;
  gap: 0;
  width: 100%;
  max-width: none;
  height: 100vh;
  min-height: 100vh;
  text-align: left;
  padding: 0;
  background: var(--page-bg);
}

/* Text block is centred (left-aligned lines) in the space right of the photo */
.about-text {
  flex: 1 1 48%;
  display: grid;
  align-content: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 2.8rem 2.7rem;
  color: var(--dark-text);
  height: 100%;
}

.about-text h2 {
  margin: 0;
  font-size: clamp(2.6rem, 4.3vw, 4.1rem);
  line-height: 1.05;
  color: rgba(31, 27, 23, 0.95);
  text-align: left;
  font-family: 'French', cursive;
  letter-spacing: 0.04em;
}

/* "About Me" is an image (titles/about_me.png: French, letter-spacing 0.04em, thickened to
   match the browser's bold heading), sized like the old text title — 1.38 × its font size tall. */
.about-text h2.about-title {
  line-height: 0;
}

.about-title-img {
  display: block;
  height: calc(1.383 * clamp(2.6rem, 4.3vw, 4.1rem));
  width: auto;
  max-width: 100%;
}

.about-intro {
  margin: 0;
  font-size: clamp(1.2rem, 1.7vw, 1.8rem);
  font-weight: 700;
  color: rgba(31, 27, 23, 0.96);
  font-family: "Heiti TC", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
}

.about-text p {
  margin: 0;
  font-size: clamp(0.82rem, 1.1vw, 1.02rem);
  color: rgba(31, 27, 23, 0.84);
  line-height: 1.55;
  max-width: 540px;
  font-family: "Heiti TC", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
}

/* Cormorant for the About section text (title stays French). Sizes follow the smaller
   of the window's width and height, so the text also fits short laptop windows. */
.banner--about .about-text p.about-intro {
  font-family: var(--font-body);
  font-weight: 600;
  font-style: italic;
  font-size: clamp(1.05rem, min(1.55vw, 2.7vh), 1.45rem);
  color: rgba(31, 27, 23, 0.96);
}

.banner--about .about-text p {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(0.88rem, min(1.12vw, 2vh), 1.1rem);
  line-height: 1.45;
  color: rgba(31, 27, 23, 0.9);
}

/* Profile photo — fills the left side flush to top and bottom; slides in from the left */
.about-photo-wrap {
  flex: 0 0 46vw;
  max-width: 46vw;
  width: 46vw;
  min-width: 0;
  height: 100vh;
  margin: 0;
  align-self: stretch;
  overflow: hidden;
  border-radius: 0;
  opacity: 0;
  transform: translateX(-70px);
  transition: opacity 0.9s ease 0.25s, transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.25s;
  flex-shrink: 0;
}

.banner.is-visible .about-photo-wrap {
  opacity: 1;
  transform: translateX(0);
}

.about-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* ====== INNER PAGES (portfolio, contact, redirects) ====== */
.content-page {
  min-height: 100vh;
  padding: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: var(--page-bg);
  color: var(--page-text);
  overflow: visible;
}

.content-panel {
  width: min(92vw, 920px);
  padding: 2rem 2.5rem;
  border-radius: var(--radius);
  background: var(--page-panel);
  border: 1px solid rgba(31, 27, 23, 0.08);
  box-shadow: 0 18px 45px rgba(25, 21, 17, 0.08);
  color: var(--page-text);
}

.content-panel h1,
.content-panel p,
.content-panel li {
  font-family: "Heiti TC", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
}

.content-panel h1 {
  color: var(--page-text);
}

.content-panel p,
.content-panel li {
  color: var(--page-muted);
}

/* "Home →" link (contact page) */
.home-back-link {
  margin-top: 0.5rem;
}

.site-footer {
  background: rgba(255, 255, 255, 0.12);
  color: var(--page-text);
}

/* Phones: the section grows with its text (no fixed screen height). The text block's
   pieces join the column directly (display: contents) so the photo can sit between the
   title and the paragraphs, at full width in its natural landscape shape. */
@media (max-width: 600px) {
  .banner--about .banner__overlay.about-split {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    padding: 5rem 1.5rem 2.5rem;
    gap: 0.7rem;
  }

  .about-text {
    display: contents;
  }

  .about-text > * {
    order: 2;
  }

  .about-text h2.about-title {
    order: 0;
  }

  .about-photo-wrap {
    order: 1;
    flex: none;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    align-self: stretch;
    margin: 0.8rem 0 1.1rem;
  }
}

/* ====== VIDEO CAROUSEL ====== */
.carousel-hero {
  position: relative;
  min-height: var(--banner-height);
  scroll-snap-align: start;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.carousel-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-item {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translateX(100%);
  transition: opacity 800ms ease-out, transform 800ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
}

.carousel-item--active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  z-index: 1;
}

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

/* Video carousel indicators (dots) */
.carousel-indicators {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.8rem;
  z-index: 10;
  pointer-events: auto;
}

.carousel-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  cursor: pointer;
  transition: all 300ms ease;
  padding: 0;
}

.carousel-indicator:hover {
  background: rgba(255, 255, 255, 0.7);
}

.carousel-indicator--active {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.95);
}

/* Carousel overlay content */
.carousel-overlay {
  position: relative;
  z-index: 5;
  width: min(92vw, 1100px);
  text-align: center;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  pointer-events: none;
}

.carousel-overlay .site-title {
  margin: 0;
  font-family: 'FrenchAlt', 'French', cursive;
  letter-spacing: 0.01em;
  text-transform: none;
  font-size: clamp(2.4rem, 13vw, 11rem);
  white-space: nowrap;
  flex: 0 0 max-content;
  color: rgba(255, 255, 255, 0.96);
  text-shadow: none;
  line-height: 0.82;
  filter: none;
  -webkit-text-stroke: 0.35px rgba(255, 255, 255, 0.18);
}

.site-footer {
  padding: 0.7rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.55);
}

.site-footer p {
  margin: 0;
}

/* Home page: the footer is the last thing in the snap-scrolling area */
.site-main .site-footer {
  scroll-snap-align: end;
}

/* svh = screen height with the phone browser's address bar showing */
@supports (height: 100svh) {
  .portfolio-overlay { --screen-h: 100svh; }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto;
    transition: none !important;
  }
}

@media (max-width: 680px) {
  .gallery-page {
    padding-top: 6rem;
  }

  .artwork-mosaic {
    --mosaic-cell-by-width: calc((100vw - 2.4rem - (2 * var(--mosaic-gap))) / 3);
    --mosaic-cell-by-height: calc((62vh - (2 * var(--mosaic-gap))) / 3);
    grid-template-columns: repeat(3, var(--mosaic-cell));
    grid-template-rows: repeat(3, var(--mosaic-cell));
  }

  .banner--artwork .banner__overlay {
    padding: 4.5rem 1.2rem 1.2rem;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    row-gap: 1rem;
    align-content: start;
    height: 100vh;
  }

  .artwork-intro {
    max-width: none;
  }

  .artwork-intro h2 {
    font-size: clamp(2.2rem, 7vw, 3.3rem);
  }

  .artwork-mosaic-card span {
    font-size: 0.9rem;
  }
}

/* ====== CONTACT PAGE — contact.html (quote request form) ====== */
.content-page.contact-page {
  display: block;
  padding: 7rem 0 3rem;
}

.contact-shell {
  width: min(92vw, 860px);
  margin: 0 auto;
}

.contact-header {
  margin-bottom: 1rem;
  text-align: center;
}

/* Contact page title is an image (titles/contact.png), sized like the old text title. */
.contact-header h1.contact-title {
  line-height: 0;
}

.contact-title-img {
  display: block;
  height: calc(1.7 * clamp(3.6rem, 6.5vw, 5.6rem));
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  /* The "t" crossbar trails far right, so the letters sit left of centre; nudge right. */
  transform: translateX(8%);
}

.contact-header h1 {
  margin: 0;
  font-family: 'French', cursive;
  font-size: clamp(3.6rem, 6.5vw, 5.6rem);
  line-height: 1.1;
  letter-spacing: 0.06em;
  color: var(--page-text);
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 1.5rem;
  padding: 2.25rem 2.5rem;
  border-radius: var(--radius);
  background: var(--page-panel);
  border: 1px solid rgba(31, 27, 23, 0.08);
  box-shadow: 0 18px 45px rgba(25, 21, 17, 0.08);
}

.form-field {
  display: grid;
  gap: 0.45rem;
  align-content: start;
}

.form-field--full {
  grid-column: 1 / -1;
}

.form-field > label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--page-text);
}

.form-field .req {
  color: #a4552f;
}

.form-field .opt {
  text-transform: none;
  letter-spacing: 0;
  color: var(--page-muted);
}

.contact-form input:not([type="checkbox"]),
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font: inherit;
  font-size: 1rem;
  color: var(--page-text);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(31, 27, 23, 0.18);
  border-radius: 10px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.contact-form textarea {
  resize: vertical;
  min-height: 9rem;
  line-height: 1.6;
}

.contact-form select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231f1b17' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(35, 31, 28, 0.45);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--page-text);
  box-shadow: 0 0 0 3px rgba(31, 27, 23, 0.12);
}

.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--page-muted);
  cursor: pointer;
}

.form-check input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--page-text);
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.5rem;
}

.form-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--page-muted);
}

.form-submit {
  padding: 0.85rem 2rem;
  font: inherit;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: var(--page-bg);
  background: var(--page-text);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: opacity 200ms ease;
}

.form-submit:hover,
.form-submit:focus-visible {
  opacity: 0.8;
}

.form-status {
  margin: 0;
  font-size: 0.9rem;
  color: var(--page-text);
}

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

.contact-back {
  margin-top: 1.5rem;
  text-align: center;
}

.contact-back a {
  color: var(--page-text);
  font-weight: 600;
  letter-spacing: 0.03em;
}

@media (max-width: 600px) {
  .content-page.contact-page {
    padding-top: 5rem;
  }

  .contact-form {
    grid-template-columns: 1fr;
    padding: 1.5rem 1.25rem;
  }

  .form-actions {
    flex-direction: column-reverse;
    align-items: stretch;
    text-align: center;
  }
}
