/* CHA HYUN JU — static rebuild of chahyunju.wixsite.com/sculpture
   Measurements are taken from the original at desktop size (980px Wix grid). */
:root {
  --c15: #414141;           /* Wix color_15: main text */
  --c14: #636363;           /* Wix color_14: menu, footer, CV list */
  --serif: "Times New Roman", Times, serif;
  --sans: "Josefin Sans", sans-serif;   /* Brandon Grotesque Light stand-in; Korean falls back to the OS sans-serif exactly like the original */
  --ko: "Nanum Gothic", sans-serif;                      /* original: nanumgothic-regular */
  --grid: 980px;
  --col-left: 310px;        /* gallery/essay offset inside the grid */
  --col-w: 669px;
  --gap: 23px;
}
.page-1995 { --col-left: 300px; --col-w: 680px; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--c15);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.4;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

/* Fixed full-screen representative image (Wix page background) */
.bg { position: fixed; inset: 0; z-index: -1; background: #fff var(--bg) center / cover no-repeat; }

/* Pinned title + vertical menu */
.site-title {
  position: fixed; top: 47px; left: 64px; z-index: 20;
  margin: 0;
  font: 37px/1.1 var(--serif);
  color: var(--c15);
}
.menu { position: fixed; top: 182px; left: 64px; width: 141px; z-index: 20; }
.menu a { display: block; font-size: 15px; line-height: 33px; color: var(--c14); transition: color .2s; }
.menu a:hover, .menu a[aria-current="page"] { color: var(--c15); }
.nav-toggle, .nav-button { display: none; }

/* Content grid */
.wrap { width: var(--grid); margin: 0 auto; padding-top: 129px; }
.gallery { margin-left: var(--col-left); width: var(--col-w); }
.gallery figure { margin: 0 0 var(--gap); }
.gallery figure:last-child { margin-bottom: 0; }
.gallery img { width: 100%; }
/* Hover overlay + caption, as on the original Wix gallery: rgba(65,65,65,.6), centered 15px/18px white text, 30px padding, no fade */
.gallery figure { position: relative; }
.gallery figure::after { content: ""; position: absolute; inset: 0; background: rgba(65, 65, 65, .6); opacity: 0; pointer-events: none; }
.gallery figcaption {
  position: absolute; inset: 0; z-index: 1; padding: 30px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; line-height: 18px; color: #fff; text-align: center;
  opacity: 0; pointer-events: none;
}
.gallery figure:hover::after, .gallery figure:hover figcaption,
.gallery figure:focus-within::after, .gallery figure:focus-within figcaption { opacity: 1; }
@media (hover: none) { .gallery figure:hover::after, .gallery figure:hover figcaption { opacity: 0; } }
.essay {
  margin: 107px 0 0 var(--col-left);
  width: var(--col-w);
  background: rgba(255, 255, 255, .8);
}
.page-2020 .essay { background: rgba(255, 255, 255, .4); }   /* 2020 only: lighter box so the pale background shows through */

/* Rich text (Wix font_N classes) */
.rt p, .rt h1, .rt h2, .rt h3, .rt h4, .rt h5, .rt h6 { margin: 0; font-weight: 400; overflow-wrap: break-word; }
.rt { word-spacing: -0.09em; }   /* Josefin Sans spaces are ~1.35px wider than Brandon Grotesque at 15px */
.rt .ko { word-spacing: normal; }
.rt .f4 { font: 29px/1.4 var(--serif); }
.rt .f6 { font: 300 15px/1.4 var(--sans); color: var(--c14); }
.rt .f7 { font: italic 16px/1.4 var(--serif); }
.rt .f8 { font: 300 15px/1.4 var(--sans); color: var(--c15); }
.rt .f9 { font: 300 14px/1.4 var(--sans); color: var(--c14); }
.rt .c14 { color: var(--c14); }
.rt .c15 { color: var(--c15); }
.rt .ko { font-family: var(--ko); vertical-align: top; } /* keeps mixed Korean/Latin lines at the original line height */
.rt .en { font-family: var(--sans); }
.rt .barlow { font-family: Barlow, var(--sans); }
.rt [style*="font-weight:bold"] { font-weight: 700; }
.rt .en[style*="font-weight:bold"], .rt [style*="font-weight:bold"] .en { font-weight: 600; }
.rt a { text-decoration: underline; text-underline-offset: 2px; }

/* CV */
.page-cv .wrap { padding-top: 184px; }
.cv-name { margin-left: 490px; width: 443px; }
.cv-name h1 { font-size: 18px; color: var(--c14); }
.cv-body { margin: 51px 0 0 490px; width: 483px; }
.cv-contact { margin: 69px 0 0 18px; width: 670px; }
.cv-email { margin-top: 20px; width: 200px; }
.cv-insta { margin-top: 9px; width: 270px; }
.cv-contact a { text-decoration: none; }

/* Footer */
.site-footer { height: 91px; padding-top: 35px; text-align: center; }
.site-footer p { margin: 0; font-size: 14px; color: var(--c14); }
.home-main { height: 100vh; height: 100svh; }

/* Tablet: keep pinned sidebar, let the column flex */
@media (max-width: 1000px) {
  .site-title { left: 32px; top: 40px; }
  .menu { left: 32px; top: 175px; }
  .wrap { width: auto; margin: 0 24px 0 250px; }
  .gallery, .essay { margin-left: 0; width: auto; }
  .cv-name, .cv-body, .cv-contact { margin-left: 0; width: auto; }
}

/* Mobile: title on top, hamburger menu (CSS only) */
@media (max-width: 700px) {
  .site-header { position: absolute; top: 0; left: 0; right: 0; height: 110px; z-index: 30; }
  .site-title { position: absolute; top: 27px; left: 20px; font-size: 21px; z-index: 32; }
  .nav-toggle { display: block; position: absolute; top: 34px; right: 14px; width: 44px; height: 44px; margin: 0; opacity: 0; z-index: 33; cursor: pointer; }
  .nav-button { display: block; position: absolute; top: 34px; right: 14px; width: 44px; height: 44px; z-index: 32; pointer-events: none; }
  .nav-button span, .nav-button::before, .nav-button::after {
    content: ""; position: absolute; right: 10px; height: 2px; background: #111; transition: transform .25s, opacity .25s;
  }
  .nav-button::before { top: 12px; width: 16px; }
  .nav-button span { top: 21px; width: 24px; }
  .nav-button::after { top: 30px; width: 24px; }
  .nav-toggle:checked + .nav-button::before { width: 24px; transform: translateY(9px) rotate(45deg); }
  .nav-toggle:checked + .nav-button span { opacity: 0; }
  .nav-toggle:checked + .nav-button::after { transform: translateY(-9px) rotate(-45deg); }
  .nav-toggle:focus-visible + .nav-button { outline: 2px solid var(--c15); outline-offset: 2px; }
  .menu {
    position: fixed; inset: 0; width: auto; z-index: 31;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: #fff;
    visibility: hidden; opacity: 0; transition: opacity .25s, visibility .25s;
  }
  .nav-toggle:checked ~ .menu { visibility: visible; opacity: 1; }
  .menu a { font: 16px/45px var(--serif); }
  /* year pages: lighter 1200px background on phones (home keeps the 2000px full-screen image) */
  .page-year .bg { background-image: var(--bg-sm); }
  .wrap, .page-cv .wrap { margin: 0 20px; padding-top: 148px; }
  .gallery figure { margin-bottom: 20px; }
  .essay { margin-top: 60px; padding: 0 10px; }
  .page-cv .wrap { padding-top: 130px; }
  .cv-body { margin-top: 32px; }
  .cv-contact { margin-top: 48px; }
  .rt h1 span[style*="font-size"] { white-space: normal; }
}
