/*
Theme Name: Jiye Kim Portfolio
Theme URI: https://example.com/
Author: Custom theme for Jiye Kim
Description: Minimal one-column artist portfolio based on the structure of an Underscores classic theme.
Version: 1.6.4
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Text Domain: jiye-kim
*/

@import url("https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed:wght@300&display=swap");

:root {
  --sidebar-width: 320px;
  --page-gutter: 24px;
  --content-max: 760px;
  --viewport-edge: 24px;
  --text: #000000;
  --muted: #8b526c;
  --bg: #fff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Barlow Semi Condensed", "Gothic A1", sans-serif;
  font-size: 20px;
  font-weight: 200;
  line-height: 1.4;
  letter-spacing: .02em;
}

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

a:hover,
a:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.primary-navigation a:hover,
.primary-navigation a:focus-visible {
  text-decoration-line: underline;
  text-decoration-thickness: 0.5px;
  text-underline-offset: 2px;
}

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

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

.screen-reader-text:focus {
  clip: auto !important;
  width: auto;
  height: auto;
  margin: 8px;
  padding: 10px 14px;
  background: #fff;
  z-index: 100000;
}

.site {
  min-height: 100vh;
}

.site-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  padding: 24px 24px 30px;
  overflow-y: auto;
  background: var(--bg);
  z-index: 20;
}

.site-branding {
  margin-bottom: 48px;
}

.site-title {
  margin: 0 0 0px;
  font-size: 20px;
  line-height: 1.4;
  font-weight: 200;
  text-transform: lowercase;
}

.primary-navigation ul,
.primary-navigation ul.menu {
  display: grid;
  grid-template-columns: max-content max-content;
  column-gap: 28px;
  row-gap: 0;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-navigation li {
  margin: 0;
}

.primary-navigation li:nth-child(3) {
  grid-column: 1;
}

.primary-navigation a {
  display: block;
  font-size: 20px;
  line-height: 1.4;
  text-transform: lowercase;
  font-weight: 200;
}

.sidebar-meta {
  margin-top: 64px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.4;
}

.sidebar-meta p {
  margin: 0 0 26px;
}

.sidebar-drawing {
  margin-top: 48px;
  width: 80px;
}

.sidebar-drawing img {
  width: 100%;
}

.site-main {
  width: 100%;
  min-height: 100vh;
  padding: 24px var(--viewport-edge) 80px;
}

/*
 * The sidebar floats over the page instead of taking up layout width.
 * Work thumbnails therefore remain centered against the browser viewport,
 * not merely within the space to the right of the sidebar.
 */
.work-feed {
  width: min(var(--content-max),
      calc(100vw - (2 * var(--sidebar-width)) - (2 * var(--viewport-edge))));
  max-width: 100%;
  margin-inline: auto;
}

.work-card {
  margin: 0 0 120px;
}

.work-card:last-child {
  margin-bottom: 0;
}

.work-card__media {
  width: 100%;
}

.work-card__media img {
  width: 100%;
}

.work-card__meta {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.4;
}

.work-card__title {
  margin: 0;
  font-weight: 200;
  font-size: inherit;
}

.work-card__caption {
  margin-top: 3px;
}

.work-card__caption p {
  margin: 0;
}

.page-content,
.single-work-content {
  width: min(100%, 760px);
  margin: 0 auto;
  padding-top: 0px;
}

.page-content h1,
.single-work-content h1 {
  margin: 0 0 24px;
  font-size: 20px;
  font-weight: 200;
  text-transform: lowercase;
}

.page-content p,
.single-work-content p {
  margin: 0 0 1.4em;
}

.page-content ul,
.page-content ol {
  padding-left: 1.25em;
}

.page-content figure {
  margin: 2em 0;
}

.pagination {
  margin-top: 56px;
  font-size: 15px;
}

.nav-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* 기존 style.css 맨 아래에 추가 */
html:has(.cv-page, .text-archive) {
  scrollbar-gutter: stable;
}

.cv-page,
.text-archive {
  width: min(100%, 760px);
  margin-inline: auto;
  padding-inline: 0;
}

.cv-page > .cv-entry,
.cv-entry > .cv-page__title,
.cv-entry > .cv-page__body,
.text-archive__header,
.text-archive__header h1,
.text-archive__group {
  margin-inline: 0;
  padding-inline: 0;
}

.text-archive__header {
  margin-bottom: 24px
}

.text-archive__header h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 200;
  line-height: 1.4;
  text-transform: lowercase
}

.text-archive__list {
  width: 100%
}

.text-archive__group-title {
  margin: 0 0 18px;
  font-size: 14px;
  font-weight: 200;
  line-height: 1.4;
}

.text-archive__group--artistic-essay {
  margin-top: 72px;
}

.text-card {
  margin: 0;
  padding: 0px 0px 8px 0;
  border-top: 0px solid rgba(0, 0, 0)
}

.text-card:last-of-type {
  border-bottom: 0px solid rgba(0, 0, 0)
}

.text-card__link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 32px;
  width: 100%;
  text-decoration: none
}

.text-card__link:hover,
.text-card__link:focus-visible {
  text-decoration: none
}

.text-card__title {
  margin: 0;
  font-size: 14px;
  font-weight: 200;
  line-height: 1.4;
}

.text-card__critic {
  font-size: 14px;
  font-weight: 200;
  line-height: 1.4;
  white-space: nowrap
}

.text-card__link:hover .text-card__title,
.text-card__link:focus-visible .text-card__title {
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px
}

.single-text-content {
  width: min(100%, 760px);
  margin: 0 auto
}

.single-text__header {
  margin-bottom: 56px
}

.single-text__title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 200;
  line-height: 1.4;
  text-transform: none
}

.single-text__critic {
  font-size: 14px;
  font-weight: 200;
  line-height: 1.4;
}

.single-text__body {
  font-size: 14px;
  font-weight: 200;
  line-height: 1.4;
  word-break: keep-all;
  overflow-wrap: break-word
}

.single-text__body p {
  margin: 0 0 1.75em;
  line-height: 1.4;
}

.single-text__body p.wp-block-paragraph {
  line-height: 1.8 !important;
}

.single-text__body h2,
.single-text__body h3,
.single-text__body h4 {
  margin: 2.5em 0 1em;
  font-size: inherit;
  font-weight: 200;
  line-height: 1.4;
}

.single-text__body blockquote {
  margin: 2em 0;
  padding-left: 1.5em;
  border-left: 1px solid currentColor
}

.single-text__body figure {
  margin: 2.5em 0
}

.single-text__body img {
  width: 100%
}

/* =========================================================
   REMOVE MOBILE TAP HIGHLIGHT
========================================================= */

.work-gallery__link,
.work-lightbox__close {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.work-gallery__link:focus,
.work-gallery__link:active,
.work-gallery__link:focus-visible,
.work-lightbox__close:focus,
.work-lightbox__close:active,
.work-lightbox__close:focus-visible {
  outline: none;
  box-shadow: none;
  border-color: transparent;
}

.work-gallery__link img,
.work-gallery__link:focus img,
.work-gallery__link:active img {
  outline: none;
  box-shadow: none;
  border: 0;
}

@media(max-width:700px) {
  .text-archive__header {
    margin-bottom: 24px
  }

  .text-card {
    padding: 14px 0
  }

  .text-card__link {
    display: block
  }

  .text-card__title {
    font-size: 14px
  }

  .text-card__critic {
    margin-top: 4px;
    font-size: 14px;
    white-space: normal
  }

  .single-text__header {
    margin-bottom: 38px
  }

  .single-text__title {
    font-size: 14px
  }

  .single-text__critic {
    font-size: 14px
  }

  .single-text__body {
    font-size: 14px;
    line-height: 1.75
  }
}


@media (max-width: 900px) {
  :root {
    --sidebar-width: 250px;
    --content-max: 680px;
  }

  body {
    font-size: 17px;
  }
}

@media (min-width: 701px) and (max-width: 1100px) {
  .work-feed {
    width: min(var(--content-max),
        calc(100vw - (2 * var(--sidebar-width)) - 32px));
  }
}

@media (max-width: 700px) {
  .site-sidebar {
    position: static;
    width: 100%;
    padding: 18px 18px 24px;
    overflow: visible;
    border-bottom: 0px solid #eee;
  }

  .site-branding {
    margin-bottom: 22px;
  }

  .site-title,
  .primary-navigation a {
    font-size: 20px;
  }

  .sidebar-meta {
    margin-top: 28px;
    font-size: 16px;
  }

  .sidebar-meta p {
    margin-bottom: 16px;
  }

  .sidebar-drawing {
    margin-top: 24px;
    width: 64px;
  }

  .site-main {
    width: 100%;
    padding: 20px 18px 60px;
  }

  .work-feed {
    width: 100%;
    max-width: var(--content-max);
  }

  .work-card {
    margin-bottom: 80px;
  }
}

/* Single work: justified related-image gallery */
.single-work-content--wide {
  width: 100%;
  max-width: none;
  margin: 0;
}

.single-work-header {
  width: min(100%, 1100px);
  margin: 0 auto 24px;
}

.single-work-header h1 {
  margin-bottom: 0px;
}

.single-work-caption {
  font-size: 16px;
  line-height: 1.4;
}

.single-work-caption p {
  margin: 0;
}

/*
 * 각 행의 이미지 높이를 맞추면서 원본 가로세로 비율을 유지합니다.
 * JavaScript가 화면 폭에 맞춰 한 줄에 2~3장씩 자동 배치합니다.
 */
.work-gallery {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  align-content: flex-start;
  justify-content: flex-start;
  gap: 120px 24px;
  width: min(100%, 1100px);
  margin: 0 auto;
  padding: 0;
  overflow: visible;
}

.work-gallery__item {
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
  margin: 0;
}

.work-gallery__link {
  display: block;
  width: auto;
  cursor: zoom-in;
}

.work-gallery__image,
.work-gallery__item img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: none;
  object-fit: contain;
  object-position: center;
}

.work-gallery.is-justified .work-gallery__item,
.work-gallery.is-justified .work-gallery__link {
  width: var(--gallery-item-width);
}

.work-gallery.is-justified .work-gallery__image,
.work-gallery.is-justified .work-gallery__item img {
  width: var(--gallery-item-width);
  height: auto;
  max-width: none;
}

.work-gallery__item figcaption {
  width: var(--gallery-item-width, auto);
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 200;
  text-align: right;
}

.single-work-description {
  width: min(100%, 760px);
  margin: 44px auto 0;
}

/* Image lightbox */
.work-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(255, 255, 255);
}

.work-lightbox.is-open {
  display: flex;
}

.work-lightbox__image {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100vw - 64px);
  max-height: calc(100vh - 64px);
  object-fit: contain;
}

.work-lightbox__close {
  position: fixed;
  top: 20px;
  right: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 28px;
  font-weight: 200;
  line-height: 1;
  cursor: pointer;
}

body.work-lightbox-open {
  overflow: hidden;
}

@media (max-width: 1200px) and (min-width: 701px) {

  .single-work-header,
  .work-gallery {
    width: min(100%, calc(100vw - (2 * var(--viewport-edge))));
  }

  .work-gallery {
    gap: 120px 20px;
  }
}

@media (max-width: 700px) {
  .single-work-header {
    width: 100%;
    margin-bottom: 18px;
  }

  .work-gallery {
    width: 100%;
    gap: 24px 12px;
  }

  .work-lightbox {
    padding: 18px;
  }

  .work-lightbox__image {
    max-width: calc(100vw - 36px);
    max-height: calc(100vh - 36px);
  }
}

/* =========================================================
   CV PAGE
========================================================= */

.cv-page__title {
  margin: 0 0 36px;
  font-size: 20px;
  font-weight: 200;
  line-height: 1.4;
  text-transform: lowercase;
}

.cv-page__body {
  font-size: 14px;
  font-weight: 200;
  line-height: 1.4;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.cv-page__body p {
  margin: 0 0 8px;
  line-height: 1.4;
}

.cv-page__body p.wp-block-paragraph {
  line-height: 1.4;
}

.cv-page__body h2,
.cv-page__body h3,
.cv-page__body h4 {
  margin: 2.2em 0 .7em;
  font-size: inherit;
  font-weight: 200;
  line-height: 1.4;
}

.cv-page__body ul,
.cv-page__body ol {
  margin: 0 0 1.4em;
  padding-left: 1.25em;
}

.cv-page__body li {
  margin: 0 0 .35em;
}

@media (max-width: 700px) {
  .cv-page__title {
    margin-bottom: 28px;
    font-size: 17px;
  }

  .cv-page__body {
    font-size: 15px;
    line-height: 1.55;
  }
}

/* =========================================================
   SIDEBAR DRAWING LINK + IMAGE ARCHIVE
========================================================= */

.sidebar-drawing__link {
  display: block;
  width: 100%;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.sidebar-drawing__link:hover,
.sidebar-drawing__link:focus,
.sidebar-drawing__link:active,
.sidebar-drawing__link:focus-visible {
  text-decoration: none;
  outline: none;
  box-shadow: none;
}

.sidebar-drawing__link img {
  width: 100%;
  border: 0;
  outline: none;
  box-shadow: none;
}

.archive-image-page {
  width: min(100%, 1100px);
  margin: 0 auto;
}

.archive-image-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  width: 100%;
}

.archive-image-item {
  margin: 0;
}

.archive-image-item img {
  display: block;
  width: 100%;
  height: auto;
}

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

@media (max-width: 700px) {
  .archive-image-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}


/* =========================================================
   RESPONSIVE CONTENT SAFETY
   Prevent the fixed sidebar from covering centered content,
   and stack galleries/text when the browser becomes narrow.
========================================================= */

/* Desktop: reserve real layout space for the fixed sidebar. */
@media (min-width: 1101px) {
  .site-main {
    width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width);
  }

  .work-feed,
  .page-content,
  .single-work-content,
  .single-work-header,
  .work-gallery,
  .single-text-content,
  .text-archive,
  .cv-page,
  .archive-image-page {
    max-width: 100%;
  }
}

/* Tablet and narrow browser windows: sidebar moves above content. */
@media (max-width: 1100px) {

  html,
  body,
  .site {
    max-width: 100%;
    overflow-x: hidden;
  }

  .site-sidebar {
    position: static;
    inset: auto;
    width: 100%;
    height: auto;
    padding: 24px var(--viewport-edge) 28px;
    overflow: visible;
  }

  .site-main {
    width: 100%;
    min-width: 0;
    margin-left: 0;
    padding: 24px var(--viewport-edge) 72px;
  }

  .work-feed,
  .page-content,
  .single-work-content,
  .single-work-content--wide,
  .single-work-header,
  .work-gallery,
  .single-work-description,
  .single-text-content,
  .text-archive,
  .cv-page,
  .archive-image-page {
    width: 100%;
    max-width: 760px;
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
  }

  .single-work-header,
  .work-gallery,
  .archive-image-page {
    max-width: 900px;
  }

  /* Work detail images form one vertical column. */
  .work-gallery,
  .work-gallery.is-justified {
    display: block;
  }

  .work-gallery__item,
  .work-gallery__link,
  .work-gallery.is-justified .work-gallery__item,
  .work-gallery.is-justified .work-gallery__link {
    display: block;
    width: 100% !important;
    max-width: 100%;
  }

  .work-gallery__item:not(:last-child) {
    margin: 0 0 120px;
  }

  .work-gallery__image,
  .work-gallery__item img,
  .work-gallery.is-justified .work-gallery__image,
  .work-gallery.is-justified .work-gallery__item img {
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
    object-fit: contain;
  }

  .work-gallery__item figcaption {
    width: 100% !important;
  }

  /* Text titles and critic names drop to separate lines. */
  .text-card__link {
    display: block;
  }

  .text-card__title,
  .text-card__critic,
  .single-text__title,
  .single-text__body,
  .cv-page__body,
  .work-card__meta,
  .single-work-caption {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: keep-all;
  }

  .text-card__critic {
    margin-top: 4px;
  }

  .archive-image-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .site-sidebar {
    padding: 18px 18px 24px;
  }

  .site-main {
    padding: 20px 18px 60px;
  }

  .work-feed,
  .page-content,
  .single-work-content,
  .single-work-content--wide,
  .single-work-header,
  .work-gallery,
  .single-work-description,
  .single-text-content,
  .text-archive,
  .cv-page,
  .archive-image-page {
    width: 100%;
    max-width: 100%;
  }

  .work-gallery__item {
    margin-bottom: 24px;
  }

  .archive-image-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   MOBILE WORK GALLERY
   Restore the justified 2–3 image layout on mobile.
========================================================= */
@media (max-width: 700px) {

  .work-gallery,
  .work-gallery.is-justified {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    align-content: flex-start;
    justify-content: flex-start;
    gap: 24px 12px;
  }

  .work-gallery__item,
  .work-gallery__link,
  .work-gallery.is-justified .work-gallery__item,
  .work-gallery.is-justified .work-gallery__link {
    display: block;
    width: var(--gallery-item-width) !important;
    max-width: 100%;
  }

  .work-gallery__item {
    margin: 0;
  }

  .work-gallery__image,
  .work-gallery__item img,
  .work-gallery.is-justified .work-gallery__image,
  .work-gallery.is-justified .work-gallery__item img {
    width: var(--gallery-item-width) !important;
    height: auto !important;
    max-width: none;
    object-fit: contain;
  }

  .work-gallery__item figcaption {
    width: var(--gallery-item-width) !important;
  }
}


/* =========================================================
   MOBILE ARCHIVE GALLERY
   Keep original image ratios and arrange 2–3 images per row.
========================================================= */
@media (max-width: 700px) {
  .archive-image-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    align-content: flex-start;
    gap: 12px;
  }

  .archive-image-item {
    min-width: 0;
    margin: 0;
  }

  .archive-image-item--landscape {
    flex: 0 0 calc(50% - 6px);
  }

  .archive-image-item--portrait,
  .archive-image-item--square {
    flex: 0 0 calc(33.333% - 8px);
  }

  .archive-image-item img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
  }
}

/* =========================================================
   VIEWPORT-CENTERED CONTENT
   Keep desktop content centered against the whole browser
   viewport while the fixed sidebar remains an independent layer.
========================================================= */
@media (min-width: 1101px) {
  .site-main {
    width: 100%;
    margin-left: 0;
  }
}

/* =========================================================
   VIEWPORT CENTER + SIDEBAR COLLISION SAFETY
   Center content against the whole browser while reducing its
   width before it can slide underneath the fixed sidebar.
========================================================= */
@media (min-width: 1101px) {
  .site-main {
    width: 100%;
    margin-left: 0;
    padding-left: var(--viewport-edge);
    padding-right: var(--viewport-edge);
  }

  .work-feed,
  .page-content,
  .single-work-content,
  .single-work-description,
  .single-text-content,
  .text-archive,
  .cv-page {
    width: min(760px,
        calc(100vw - (2 * var(--sidebar-width)) - (2 * var(--viewport-edge))));
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .single-work-content--wide {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  .single-work-header,
  .work-gallery,
  .archive-image-page {
    width: min(1100px,
        calc(100vw - (2 * var(--sidebar-width)) - (2 * var(--viewport-edge))));
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
}

/* =========================================================
   MOBILE WORK DETAIL: SAFE FIRST PAINT
   Keep images inside the viewport before Safari finishes the
   JavaScript gallery calculation, then switch to the 2–3 image
   justified layout as soon as measurements are ready.
========================================================= */
@media (max-width: 700px) {

  .single-work-content,
  .single-work-content--wide,
  .single-work-content article,
  .work-gallery,
  .work-gallery__item,
  .work-gallery__link {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .work-gallery:not(.is-justified) {
    display: block;
    width: 100%;
  }

  .work-gallery:not(.is-justified) .work-gallery__item,
  .work-gallery:not(.is-justified) .work-gallery__link {
    display: block;
    width: 100% !important;
  }

  .work-gallery:not(.is-justified) .work-gallery__image,
  .work-gallery:not(.is-justified) .work-gallery__item img {
    display: block;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
  }

  .work-gallery.is-justified .work-gallery__item,
  .work-gallery.is-justified .work-gallery__link {
    max-width: 100%;
  }

  .work-gallery.is-justified .work-gallery__image,
  .work-gallery.is-justified .work-gallery__item img {
    max-width: 100%;
  }
}

/* =========================================================
   MOBILE TEXT ARCHIVE: KEEP TITLE / CRITIC ON BOTH SIDES
========================================================= */
@media (max-width: 700px) {
  .text-card {
    padding: 0px 0px 8px;
  }

  .text-card__link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    column-gap: 16px;
    width: 100%;
  }

  .text-card__title {
    min-width: 0;
    font-size: 14px;
    overflow-wrap: anywhere;
  }

  .text-card__critic {
    margin-top: 0;
    font-size: 14px;
    white-space: nowrap;
    text-align: right;
  }
}

/* =========================================================
   MOBILE WORK DETAIL: ONE IMAGE PER ROW
   Only the single Work detail gallery changes on mobile.
========================================================= */
@media (max-width: 700px) {

  .single-work-content .work-gallery,
  .single-work-content .work-gallery.is-justified {
    display: flex !important;
    flex-direction: column;
    row-gap: 80px;
    width: 100% !important;
  }

  .single-work-content .work-gallery__item,
  .single-work-content .work-gallery__link,
  .single-work-content .work-gallery.is-justified .work-gallery__item,
  .single-work-content .work-gallery.is-justified .work-gallery__link {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0px !important;
  }

  .single-work-content .work-gallery__image,
  .single-work-content .work-gallery__item img,
  .single-work-content .work-gallery.is-justified .work-gallery__image,
  .single-work-content .work-gallery.is-justified .work-gallery__item img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
  }

  .single-work-content .work-gallery__item figcaption {
    width: 100% !important;
  }
}

/* =========================================================
   WORK LIGHTBOX CAPTION
   Show each gallery image caption below the expanded image.
========================================================= */
.work-lightbox__content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  width: max-content;
  max-width: calc(100vw - 64px);
  max-height: calc(100vh - 64px);
}

.work-lightbox__content .work-lightbox__image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 124px);
  object-fit: contain;
}

.work-lightbox__caption {
  width: 100%;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 200;
  line-height: 1.4;
  text-align: right;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.work-lightbox__caption[hidden] {
  display: none;
}

@media (max-width: 700px) {
  .work-lightbox__content {
    max-width: calc(100vw - 36px);
    max-height: calc(100vh - 36px);
  }

  .work-lightbox__content .work-lightbox__image {
    max-width: 100%;
    max-height: calc(100vh - 100px);
  }

  .work-lightbox__caption {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.4;
  }
}
