/* =========================================================
   HONGJU LIM — Portfolio
   Faithful static rebuild of the original Wix site
   ========================================================= */

:root {
  --bg:        #1c1a18;   /* warm dark charcoal */
  --bg-soft:   #242220;   /* slightly lighter panels */
  --ink:       #d3cdc3;   /* primary light text (name / titles) */
  --ink-dim:   #a8a299;   /* secondary text / nav */
  --ink-faint: #8a847b;   /* footer / captions */
  --accent:    #d18a3e;   /* the orange tagline / headings accent */
  --line:      rgba(255,255,255,0.14);
  --line-soft: rgba(255,255,255,0.08);
  --btn-bg:    #efece5;
  --btn-ink:   #1c1a18;

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans:  "Raleway", "Helvetica Neue", Arial, sans-serif;
  /* Titles: real Futura where installed (e.g. macOS / the owner's PC),
     otherwise Jost — a free, near-identical geometric sans modelled on Futura. */
  --display: "Futura", "Futura PT", "Jost", "Century Gothic", "Trebuchet MS", sans-serif;
  /* Tagline: Tahoma (a Windows system font); Verdana is its near-twin and is a
     system font on both Windows and macOS, so no webfont is needed. */
  --tahoma: "Tahoma", "Verdana", "DejaVu Sans", "Geneva", sans-serif;

  --maxw: 1360px;   /* content width — fits the full-width Transpiration image (~1355px) */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-dim);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ---------- Header / Brand ---------- */
.site-header {
  padding: 3.4rem 1.25rem 0;
  text-align: center;
}

.brand-name {
  margin: 0;
  font-family: var(--display);
  font-weight: 300;
  color: var(--ink);
  font-size: clamp(2rem, 4.8vw, 2.8rem);
  letter-spacing: 0.28em;
  text-indent: 0.28em;       /* balance the trailing letter-spacing */
}

.brand-tagline {
  margin: 0.75rem 0 0;
  color: var(--accent);
  font-family: var(--tahoma);
  font-size: clamp(0.6rem, 1.5vw, 0.74rem);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- Navigation ---------- */
.main-nav {
  margin: 1.8rem auto 0;
  max-width: 820px;
}

.nav-toggle {
  display: none;
  margin: 0 auto;
  background: none;
  border: 1px solid var(--line);
  color: var(--ink-dim);
  font-size: 1.2rem;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.nav-list > li {
  position: relative;
  border-right: 1px solid var(--line-soft);
}
.nav-list > li:first-child { border-left: 1px solid var(--line-soft); }

.nav-list > li > a {
  display: block;
  padding: 0.6rem 1.15rem;
  color: var(--ink-dim);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: color 0.2s ease;
}
.nav-list > li > a:hover,
.nav-list > li > a.active { color: var(--ink); }

/* Sub-menu (Motion Graphic Design/3D -> 3D, Ensemble) */
.has-sub > .sub {
  list-style: none;
  margin: 0;
  padding: 0.3rem 0;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-top: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 30;
}
.has-sub:hover > .sub,
.has-sub:focus-within > .sub {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.sub > li > a {
  display: block;
  padding: 0.5rem 1.15rem;
  color: var(--ink-dim);
  font-size: 0.76rem;
  white-space: nowrap;
}
.sub > li > a:hover { color: var(--ink); background: rgba(255,255,255,0.04); }

/* ---------- Main / sections ---------- */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 3.2rem 1.25rem 1rem;
}

.page-title {
  font-family: var(--display);
  font-weight: 300;
  color: var(--ink);
  text-align: center;
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  letter-spacing: 0.12em;
  margin: 0 0 0.4rem;
}
.page-subtitle {
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  margin: 0 0 2.4rem;
}
.section-accent {
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.08em;
}

/* ---------- Video (Vimeo) ---------- */
.video-wrap {
  max-width: 760px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background: #000;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.video-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Buttons ---------- */
.btn-row {
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 2rem 0;
}
.btn {
  display: inline-block;
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-family: var(--sans);   /* gothic / sans-serif */
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 0.6rem 1.5rem;
  border: 1px solid transparent;
  transition: background 0.2s ease, transform 0.15s ease;
}
.btn:hover { background: #fff; transform: translateY(-1px); }

/* ---------- Galleries ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 560px), 1fr));
  gap: 1.6rem 1.2rem;
  margin: 0 auto;
}
.gallery figure { margin: 0; }
.gallery img {
  width: 100%;
  cursor: zoom-in;
  background: var(--bg-soft);
  transition: opacity 0.2s ease;
}
.gallery img:hover { opacity: 0.9; }
.gallery figcaption {
  margin-top: 0.55rem;
  color: var(--ink-faint);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

/* Artwork page — explicit per-image sizing to match the original layout */
.art-full { max-width: 100%; margin: 1.8rem auto 0; }
.art-block { margin: 1.8rem auto 0; }          /* centered single; max-width set inline per image */
.art-full img, .art-block img {
  width: 100%;
  cursor: zoom-in;
  background: var(--bg-soft);
  transition: opacity 0.2s ease;
}
.art-full img:hover, .art-block img:hover { opacity: 0.9; }

.art-duo {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  align-items: flex-start;
  margin: 1.8rem auto 0;
}
.art-duo figure { margin: 0; }
.art-duo img {
  width: 100%;
  cursor: zoom-in;
  background: var(--bg-soft);
  transition: opacity 0.2s ease;
}
.art-duo img:hover { opacity: 0.9; }
.art-duo--even figure { flex: 1 1 280px; max-width: 600px; }
.art-duo--uneven .big   { flex: 2 1 320px; max-width: 644px; }
.art-duo--uneven .small { flex: 1 1 200px; max-width: 355px; }

/* Row: art-07 on the left, art-08 stacked over the animation on the right */
.art-row-vid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  align-items: flex-start;
  margin: 1.8rem auto 0;
}
.art-row-vid > .cell { flex: 1 1 280px; max-width: 600px; }
.art-row-vid figure { margin: 0; }
.art-row-vid img {
  width: 100%;
  cursor: zoom-in;
  background: var(--bg-soft);
  transition: opacity 0.2s ease;
}
.art-row-vid img:hover { opacity: 0.9; }
.art-col { display: flex; flex-direction: column; gap: 16px; }
.art-col-video video {
  width: 100%;
  max-width: 480px;
  display: block;
  margin: 0 auto;
  background: #000;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

/* Self-hosted animation (native <video>) — used elsewhere if needed */
.video-native { max-width: 480px; margin: 2.6rem auto 0; }

/* Two Vimeo motion-graphics pieces, side by side (16:9) */
.vimeo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin: 1.8rem auto 0;
  max-width: 1140px;
}
.vimeo-row .vimeo-embed {
  flex: 1 1 320px;
  max-width: 560px;
  aspect-ratio: 16 / 9;
  background: #000;
  box-shadow: 0 8px 30px rgba(0,0,0,0.45);
}
.vimeo-row iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-native video {
  width: 100%;
  height: auto;
  display: block;
  background: #000;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

/* Feature image (the ink-painting series) — centered, matches the original ~873px */
.feature { max-width: 880px; margin: 1.6rem auto 0; }
.feature img {
  width: 100%;
  cursor: zoom-in;
  background: var(--bg-soft);
  transition: opacity 0.2s ease;
}
.feature img:hover { opacity: 0.9; }

/* Tall scrolling pieces (comics / storyboards) */
.longform {
  max-width: 840px;
  margin: 2.4rem auto 0;
}
.longform figure { margin: 0 0 2.4rem; }
.longform figcaption {
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.78rem;
  margin-top: 0.6rem;
}

/* Project block (3D page) */
.project { margin-bottom: 3rem; }
.project h2 {
  font-family: var(--display);
  font-weight: 300;
  color: var(--accent);
  font-size: 1.25rem;
  letter-spacing: 0.1em;
  text-align: center;
  margin: 0 0 0.2rem;
}
.project .meta {
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.76rem;
  margin: 0 0 1.4rem;
}

/* ---------- About ---------- */
.about-body {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
  color: var(--ink-dim);
  font-size: 0.98rem;
}
.about-body p { margin: 0 0 1.4rem; }

/* ---------- Placeholder note (for assets to be re-added) ---------- */
.placeholder {
  border: 1px dashed var(--line);
  border-radius: 4px;
  padding: 1.6rem;
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.82rem;
  max-width: 620px;
  margin: 1.6rem auto 0;
  line-height: 1.6;
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 3.4rem 1.25rem 3rem;
  margin-top: 2rem;
}
.social {
  display: flex;
  gap: 1.1rem;
  justify-content: center;
  margin-bottom: 0.9rem;
}
.social a { line-height: 0; }
.social svg { width: 24px; height: 24px; fill: var(--ink-faint); transition: fill 0.2s ease; }
.social a:hover svg { fill: var(--ink); }
.footer-email {
  color: var(--ink-faint);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}
.footer-email:hover { color: var(--ink-dim); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 2rem;
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 95vw; max-height: 92vh; width: auto; cursor: default; }
.lightbox .lb-close {
  position: absolute;
  top: 1rem; right: 1.4rem;
  color: #fff; font-size: 2rem;
  background: none; border: none; cursor: pointer;
  line-height: 1;
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .site-header { padding-top: 2.4rem; }
  .nav-toggle { display: block; }
  .nav-list {
    display: none;
    flex-direction: column;
    border: 1px solid var(--line);
    margin-top: 0.8rem;
  }
  .nav-list.open { display: flex; }
  .nav-list > li,
  .nav-list > li:first-child { border: none; border-bottom: 1px solid var(--line-soft); }
  .nav-list > li:last-child { border-bottom: none; }
  .has-sub > .sub {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: none;
    background: rgba(0,0,0,0.25);
    padding-left: 1rem;
  }
}
