/*
Theme Name: YU HANG Portfolio
Theme URI: https://yuhangstudio.com/
Author: Custom theme for YU HANG
Description: Minimal responsive artist portfolio theme for works, projects, archive, about and contact.
Version: 0.4.3
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: yuhang-portfolio
*/

:root{
  --bg:#ffffff;
  --text:#111111;
  --muted:#6f6f6f;
  --line:#e8e8e8;
  --soft:#f3f3f1;
  --page-pad:clamp(18px,4vw,64px);
  --content-max:1500px;
  --work-content-max:1120px;
  --text-max:1120px;
  --header-h:72px;
  --gap-home:clamp(72px,8vw,128px);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:Inter,"Helvetica Neue",Helvetica,Arial,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  font-size:15px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
a{color:inherit;text-decoration:none}
img{max-width:100%;height:auto;display:block}
figure{margin:0}
.site-header{
  position:sticky;
  top:0;
  z-index:100;
  background:rgba(255,255,255,.96);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  border-bottom:1px solid rgba(232,232,232,.42);
}
body.admin-bar .site-header{top:32px}
.header-inner{
  min-height:var(--header-h);
  padding:0 var(--page-pad);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:32px;
}
.site-brand{
  font-size:14px;
  font-weight:500;
  letter-spacing:.02em;
  white-space:nowrap;
}
.site-nav{
  display:flex;
  align-items:center;
  gap:clamp(16px,2vw,34px);
  font-size:12px;
  line-height:1;
  letter-spacing:.045em;
  text-transform:uppercase;
}
.site-nav a{transition:opacity .2s ease}
.site-nav a:hover,.site-nav a:focus{opacity:.48}
.language-switch{
  display:flex;
  align-items:center;
  gap:7px;
  padding-left:4px;
}
.language-switch .is-active{opacity:.45}
.menu-toggle{
  display:none;
  width:34px;
  height:34px;
  padding:7px;
  border:0;
  background:transparent;
  cursor:pointer;
}
.menu-toggle span{
  display:block;
  height:1px;
  background:#111;
  margin:6px 0;
}
.site-main{padding:38px var(--page-pad) 96px}
.home-feed{
  width:min(84vw,var(--content-max));
  margin:0 auto;
}
.work-card{margin:0 0 var(--gap-home)}
.work-card:last-child{margin-bottom:0}
.work-card__media{
  width:100%;
  background:var(--soft);
}
.work-card__media img,
.work-card__media video{
  width:100%;
  height:auto;
  display:block;
  object-fit:contain;
  transition:opacity .25s ease;
}
.work-card__media video{pointer-events:none;background:var(--soft)}
.work-card__media:hover img,.work-card__media:hover video{opacity:.92}
.work-card__video-mark{
  position:absolute;
  right:10px;
  bottom:9px;
  padding:3px 6px;
  background:rgba(255,255,255,.9);
  font-size:9px;
  letter-spacing:.08em;
  line-height:1;
}
.work-card__media{position:relative}
.work-card__caption{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:1px;
  width:100%;
  margin-top:6px;
  font-size:12px;
  line-height:1.38;
}
.work-card__caption > span{display:block;width:100%;max-width:none}
.work-card__title{font-weight:500}
.work-card__year{color:var(--muted)}
.empty-state{
  max-width:760px;
  margin:18vh auto;
  color:var(--muted);
}
.page-wrap,.single-wrap,.archive-wrap{
  width:min(100%,var(--content-max));
  margin:0 auto;
}
.page-header,.single-header{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(260px,420px);
  gap:clamp(32px,7vw,120px);
  align-items:start;
  margin:38px 0 54px;
}
.page-title,.single-title{
  margin:0;
  font-size:clamp(28px,4.2vw,68px);
  line-height:.98;
  font-weight:400;
  letter-spacing:-.035em;
}
.meta{
  border-top:1px solid var(--line);
  padding-top:10px;
  font-size:13px;
}
.meta-row{
  display:grid;
  grid-template-columns:92px 1fr;
  gap:20px;
  padding:4px 0;
}
.meta-label{color:var(--muted)}
.meta-freeform,
.project-info-lines{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.single-hero{
  margin:0 0 clamp(36px,5vw,80px);
}
.single-hero img{
  width:auto;
  max-width:100%;
  max-height:82vh;
  object-fit:contain;
}
.single-hero--video{
  width:min(100%,1200px);
  margin-left:auto;
  margin-right:auto;
  aspect-ratio:16/9;
  background:#000;
}
.single-hero--video video{width:100%;height:100%;display:block;object-fit:contain}
.work-detail .single-header{margin-top:0}
.single-opening{
  margin:0 0 clamp(34px,5vw,70px);
}
.single-opening .yuhang-opening-banner{
  width:calc(100vw - (2 * var(--page-pad)));
  max-width:none;
  margin:0 calc(50% - 50vw + var(--page-pad));
}
.single-opening .wp-block-cover{
  min-height:clamp(190px,25vw,380px);
}
.single-opening .wp-block-cover__image-background,
.single-opening .wp-block-cover__video-background{
  object-fit:cover;
}
.entry-content{
  font-size:16px;
  line-height:1.72;
}
.entry-content > *{
  width:min(100%,var(--work-content-max));
  margin-left:auto;
  margin-right:auto;
}
.entry-content > p,
.entry-content > h2,
.entry-content > h3,
.entry-content > ul,
.entry-content > ol,
.entry-content > blockquote{
  max-width:var(--text-max);
}
.entry-content > p{margin-top:0;margin-bottom:1.45em}
.entry-content h2,.entry-content h3{
  font-weight:500;
  letter-spacing:-.015em;
  margin-top:3em;
  margin-bottom:1em;
}
.entry-content figure,
.entry-content .wp-block-image,
.entry-content .wp-block-gallery,
.entry-content .wp-block-embed,
.entry-content .wp-block-video{
  margin-top:clamp(30px,3.8vw,58px);
  margin-bottom:clamp(30px,3.8vw,58px);
}
.entry-content > .wp-block-image:not(.alignleft):not(.alignright) img,
.entry-content > figure:not(.alignleft):not(.alignright) img{
  width:100%;
  max-width:100%;
  height:auto;
}
.entry-content > .wp-block-image.yuhang-media-portrait:not(.alignleft):not(.alignright),
.entry-content > figure.yuhang-media-portrait:not(.alignleft):not(.alignright){
  width:min(100%,620px)!important;
  max-width:620px!important;
}
.entry-content > .yuhang-media-portrait:not(.alignleft):not(.alignright) img{
  width:auto!important;
  max-width:100%!important;
  max-height:82vh;
  margin-left:auto;
  margin-right:auto;
  object-fit:contain;
}
.entry-content .alignwide{
  width:min(100%,var(--work-content-max));
  max-width:none;
  margin-left:auto;
  margin-right:auto;
}
.entry-content .alignfull{
  width:calc(100vw - (2 * var(--page-pad)));
  max-width:none;
  margin-left:calc(50% - 50vw + var(--page-pad));
  margin-right:calc(50% - 50vw + var(--page-pad));
}
.entry-content > .alignleft{margin-left:0;margin-right:auto}
.entry-content > .alignright{margin-left:auto;margin-right:0}
.entry-content > .aligncenter{margin-left:auto;margin-right:auto}
.entry-content .wp-block-columns{gap:clamp(18px,3vw,48px)}
.entry-content .wp-block-video video{width:100%;height:auto}
.entry-content .wp-block-embed,
.entry-content .wp-block-embed__wrapper,
.entry-content .wp-block-embed iframe{width:100%;max-width:100%}
.entry-content > .wp-block-image:not(.alignleft):not(.alignright),
.entry-content > .wp-block-video:not(.alignleft):not(.alignright),
.entry-content > .wp-block-embed:not(.alignleft):not(.alignright),
.entry-content > .wp-block-gallery:not(.alignleft):not(.alignright),
.entry-content > .wp-block-yuhang-image-slider:not(.alignleft):not(.alignright){
  width:min(100%,var(--work-content-max))!important;
  max-width:var(--work-content-max)!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
.entry-content > .wp-block-image:not(.alignleft):not(.alignright) img,
.entry-content > .wp-block-video:not(.alignleft):not(.alignright) video,
.entry-content > .wp-block-embed:not(.alignleft):not(.alignright) iframe{
  max-width:100%!important;
}
.entry-content .wp-block-embed__wrapper{
  width:100%!important;
  max-width:100%!important;
}
.entry-content .wp-embed-aspect-16-9 .wp-block-embed__wrapper{aspect-ratio:16/9}
.entry-content .wp-embed-aspect-16-9 iframe{width:100%!important;height:100%!important}
.entry-content figcaption{
  margin-top:8px;
  font-size:12px;
  color:var(--muted);
  text-align:left;
}
.video-embed{
  width:min(100%,var(--work-content-max))!important;
  max-width:var(--work-content-max)!important;
  margin:clamp(30px,3.8vw,58px) auto;
  aspect-ratio:16/9;
}
.video-embed iframe{width:100%;height:100%;border:0}
.yuhang-slider,
.yuhang-gallery-shell,
.yuhang-gallery-viewer{
  width:min(100%,var(--work-content-max))!important;
  max-width:var(--work-content-max)!important;
  margin:clamp(30px,3.8vw,58px) auto!important;
}
.yuhang-gallery-viewer__stage{
  display:flex;
  width:100%;
  min-height:0;
  margin:0;
  padding:0;
  align-items:center;
  justify-content:center;
  border:0;
  background:transparent;
  color:inherit;
  cursor:e-resize;
}
.yuhang-gallery-viewer__stage.is-single{cursor:default}
.yuhang-gallery-viewer__stage:focus:not(:focus-visible){outline:none}
.yuhang-gallery-viewer__stage:focus-visible{outline:1px solid var(--muted);outline-offset:4px}
.yuhang-gallery-viewer__main{
  display:block;
  width:auto!important;
  max-width:100%!important;
  height:auto!important;
  max-height:78vh;
  margin:0 auto;
  object-fit:contain!important;
  background:transparent;
}
.yuhang-gallery-viewer__caption{
  width:100%;
  margin:8px 0 0;
  font-size:12px;
  line-height:1.45;
  color:var(--muted);
  text-align:left;
}
.yuhang-gallery-viewer__thumbs{
  display:flex;
  width:100%;
  gap:6px;
  margin:12px 0 0;
  padding:0 0 3px;
  justify-content:center;
  overflow-x:auto;
  overscroll-behavior-x:contain;
  scrollbar-width:thin;
  touch-action:pan-x pan-y;
}
.yuhang-gallery-viewer__thumb{
  flex:0 0 clamp(70px,10vw,128px);
  height:clamp(48px,7vw,82px);
  margin:0;
  padding:0;
  border:0;
  background:#ececea;
  opacity:.28;
  filter:grayscale(1);
  cursor:pointer;
  transition:opacity .18s ease,filter .18s ease;
}
.yuhang-gallery-viewer__thumb:hover,
.yuhang-gallery-viewer__thumb:focus-visible{opacity:.62}
.yuhang-gallery-viewer__thumb.is-active{
  opacity:1;
  filter:none;
}
.yuhang-gallery-viewer__thumb img{
  display:block;
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
}
.entry-content .yuhang-gallery-source[hidden]{display:none!important}
.single-nav{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:30px;
  border-top:1px solid var(--line);
  margin-top:clamp(70px,9vw,140px);
  padding-top:16px;
  font-size:13px;
}
.single-nav .next{text-align:right}
.exhibition-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:clamp(48px,5vw,82px) clamp(14px,2vw,34px);
}
.exhibition-card__media{
  aspect-ratio:3/2;
  background:var(--soft);
  overflow:hidden;
}
.exhibition-card__media img{width:100%;height:100%;object-fit:cover}
.exhibition-card__caption{
  margin-top:7px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:18px;
  font-size:11px;
  line-height:1.35;
}
.project-card__free-caption{display:block;grid-column:1/-1}
.project-card__free-caption span{display:block}
.project-card__type{
  grid-column:1;
  color:var(--muted);
  font-size:11px;
  letter-spacing:.035em;
  text-transform:uppercase;
}
.project-card .archive-year{grid-column:2;grid-row:1}
.project-overview{
  display:grid;
  grid-template-columns:minmax(180px,.75fr) minmax(280px,1fr) minmax(320px,2.15fr);
  gap:clamp(28px,4vw,76px);
  align-items:start;
  margin:10px 0 clamp(54px,7vw,100px);
}
.project-overview--no-intro{
  grid-template-columns:minmax(220px,.8fr) minmax(300px,1fr);
  justify-content:start;
}
.eyebrow{
  display:block;
  margin:0 0 8px;
  font-size:10px;
  line-height:1.2;
  letter-spacing:.055em;
  text-transform:uppercase;
  color:var(--muted);
}
.project-title{
  margin:0;
  font-size:clamp(20px,2vw,34px);
  line-height:1.08;
  font-weight:500;
  letter-spacing:-.025em;
}
.project-info-lines{
  font-size:14px;
  line-height:1.42;
  font-weight:500;
}
.project-poster{margin-top:12px}
.project-poster img{width:100%;height:auto}
.project-intro-text{
  font-size:clamp(15px,1.2vw,20px);
  line-height:1.48;
  font-weight:500;
}
.project-intro-text p:first-child{margin-top:0}
.project-intro-text p:last-child{margin-bottom:0}
.project-content{border-top:1px solid var(--line);padding-top:clamp(46px,6vw,90px)}
.section-heading{
  margin:26px 0 58px;
  font-size:12px;
  letter-spacing:.05em;
  font-weight:500;
}
.archive-feed{
  width:min(100%,var(--work-content-max));
  border-top:1px solid var(--line);
}
.archive-entry{
  border-bottom:1px solid var(--line);
  padding:clamp(22px,3.2vw,48px) 0;
}
.archive-entry__meta{
  display:flex;
  flex-wrap:wrap;
  gap:5px 18px;
  margin-bottom:8px;
  color:var(--muted);
  font-size:10px;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.archive-entry__title{
  margin:0;
  font-size:clamp(15px,1.25vw,19px);
  line-height:1.35;
  font-weight:500;
}
.archive-entry__title a{transition:opacity .2s ease}
.archive-entry__title a:hover{opacity:.5}
.archive-entry__content{margin-top:22px}
.archive-entry__content.entry-content > *{width:100%;max-width:100%;margin-left:0;margin-right:0}
.archive-entry__content.entry-content > p{max-width:760px}
.archive-entry__content .wp-block-embed,
.archive-entry__content .wp-block-video{width:100%!important;max-width:100%!important}
.prose-page{
  max-width:920px;
  margin:55px 0 0;
}
.prose-page .entry-content > *{margin-left:0;margin-right:0}
.prose-page .entry-content > p{max-width:760px}
.site-footer{
  padding:44px var(--page-pad) 34px;
  display:flex;
  justify-content:space-between;
  gap:30px;
  font-size:11px;
  color:var(--muted);
}
.site-footer a:hover{color:var(--text)}
@media (max-width:900px){
  :root{--header-h:60px}
  .site-nav{
    display:none;
    position:fixed;
    inset:var(--header-h) 0 0 0;
    background:#fff;
    padding:28px var(--page-pad) 50px;
    flex-direction:column;
    align-items:flex-start;
    gap:22px;
    font-size:18px;
    line-height:1.2;
    letter-spacing:0;
    text-transform:none;
  }
  body.menu-open{overflow:hidden}
  body.menu-open .site-nav{display:flex}
  .menu-toggle{display:block}
  .language-switch{padding-top:10px;font-size:14px}
  .site-main{padding-top:20px}
  .home-feed{width:100%}
  .work-card__caption{font-size:11px}
  .page-header,.single-header{
    grid-template-columns:1fr;
    gap:28px;
    margin:25px 0 36px;
  }
  .single-title,.page-title{font-size:clamp(34px,11vw,58px)}
  .single-hero img{max-height:none}
  .exhibition-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:48px 14px}
  .project-overview,
  .project-overview--no-intro{
    grid-template-columns:1fr;
    min-height:0;
    gap:38px;
    margin-top:16px;
  }
  .project-overview__info{max-width:620px}
  .project-overview__intro{max-width:760px}
}
@media (max-width:560px){
  :root{--page-pad:18px;--gap-home:58px}
  body{font-size:14px}
  .site-main{padding-bottom:68px}
  .work-card__caption{margin-top:5px}
  .entry-content{font-size:15px}
  .meta-row{grid-template-columns:78px 1fr}
  .exhibition-grid{gap:38px 10px}
  .exhibition-card__caption{font-size:10px;gap:8px}
  .project-card__type{font-size:9px}
  .entry-content > .yuhang-media-portrait:not(.alignleft):not(.alignright) img{max-height:78svh}
  .archive-entry{padding:24px 0}
  .site-footer{padding-top:26px}
  .yuhang-gallery-viewer__main{max-height:72vh}
  .yuhang-gallery-viewer__thumbs{
    justify-content:flex-start;
    gap:5px;
    margin-top:9px;
  }
  .yuhang-gallery-viewer__thumb{
    flex-basis:72px;
    height:50px;
  }
  .single-opening .yuhang-opening-banner{
    width:100vw;
    margin-left:calc(50% - 50vw);
    margin-right:calc(50% - 50vw);
  }
  .entry-content .alignfull{
    width:100vw;
    margin-left:calc(50% - 50vw);
    margin-right:calc(50% - 50vw);
  }
}
@media (max-width:782px){body.admin-bar .site-header{top:46px}}
