/* ============================================================
   FONTS
   ============================================================ */

@font-face {
  font-family: 'Rauschen A';
  src: url('../fonts/Rauschen-A-Regular.woff2') format('woff2'),
       url('../fonts/Rauschen-A-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E;
}

@font-face {
  font-family: 'Apple SD Gothic Neo';
  font-weight: 500;
  src: url('https://cdn.jsdelivr.net/gh/fonts-archive/AppleSDGothicNeo/AppleSDGothicNeo-Medium.woff2') format('woff2');
}

/* Pretendard loaded via CDN <link> in HTML */

/* ============================================================
   TYPE SCALE
   Base: html { font-size: 12px }  →  1em = 12px = Caption

   Caption  12pt  → 1em      (tags, year, nav links, table)
   Body     13.5pt → 1.125em  (nav logo, project title, description)
   Title    16pt  → 1.333em  (about center, project title)

   All pt values from a 1920 × 1080 design frame.
   ============================================================ */

html {
  font-size: 12px;   /* Caption anchor — 1em = 12px everywhere */
}

/* ============================================================
   CUSTOM PROPERTIES
   ============================================================ */

:root {
  --font-body: 'Rauschen A', 'Apple SD Gothic Neo', 'Pretendard', sans-serif;

  /* — Three font sizes — */
  --fs-caption: 1em;       /* 12pt / 12px  */
  --fs-body:    1.125em;   /* 13.5pt / 13.5px */
  --fs-title:   1.333em;   /* 16pt / 16px  */

  /* Line heights */
  --lh:         1.35;
  --lh-text:    1.35;   /* body copy, description */

  /* — Colour —
     Only one grey in the entire design:
     "& FORM TO FILL Prints" in the nav logo.
     Everything else — including tags, year, table labels — is #000. */
  --color-text:   #000;
  --color-prints: rgba(0, 0, 0, 0.40);   /* ← sole grey in the design */
  --color-bg:     #fff;

  /* — Border —
     Pure black hairline. At 1920 px / retina it reads as a very
     fine line, matching the subtle separators in the reference. */
  --border: 1px solid #000;

  /* — Layout — */
  --nav-h:    36px;    /* fits 1.125em text + ~10 px padding */
  --pad-x:    14px;    /* horizontal padding throughout */
  --cap-y:     8px;    /* caption top / bottom padding */
  --info-pad: 14px;    /* info-panel inner padding */
}

/* ============================================================
   RESET
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  height: 100vh;
  overflow: hidden;
  font-family: var(--font-body);
  font-size: var(--fs-caption);   /* default body text = caption size */
  line-height: var(--lh);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  word-break: keep-all;  /* prevent breaking Korean text */
  font-weight: 500;
}

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

/* All images are fluid; height follows the image's own aspect ratio */
img {
  display: block;
  width: 100%;
  height: auto;
}

/* ============================================================
   NAV
   ============================================================ */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px var(--pad-x);
  background: var(--color-bg);
}

/* Logo */
.nav-logo { font-size: var(--fs-body); }

.nav-logo a {
  display: inline-flex;
  align-items: baseline;
}

.logo-main   { color: var(--color-text); }
.logo-prints { color: var(--color-prints); }   /* ← only grey text */

/* Nav links */
.nav-links {
  display: flex;
  gap: 14px;
}

.nav-links a {
  font-size: var(--fs-body);
  color: var(--color-text);
}

.nav-links a.active {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.nav {
  transition: transform 0.28s ease, opacity 0.28s ease;
  will-change: transform, opacity;
}

.nav--hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.nav--hidden + .gallery-wrapper,
.nav--hidden ~ .gallery-wrapper {
  top: 0;
}

/* ============================================================
   GALLERY LAYOUT
   ============================================================ */

.gallery-wrapper {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0; bottom: 0;
  display: flex;
  padding: 0 16px 0px 16px;        /* 16 px breathing room from every viewport edge */
  gap: 16px;            /* 16 px between columns                          */
  transition: top 0.28s ease;
}

.gallery-loading {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-caption);
  color: var(--color-text);
}

/* ── Columns — each scrolls independently ── */

.gallery-column {
  flex: 1;
  min-height: 0;        /* lets a flex child scroll instead of overflow    */
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;            /* 16 px between project cards inside a column     */
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 80px;  
}

.gallery-column::-webkit-scrollbar { display: none; }
.gallery-column:last-child          { border-right: none; }

/* ============================================================
   PROJECT CARD
   ============================================================ */

.project-card { border: var(--border); }

/* ── Media area ──
   No overflow:hidden, no fixed height.
   Width:100% + height:auto on the <img> makes the area
   exactly as tall as the image's natural aspect ratio demands. */

.project-media {
  position: relative;
  /* manipulation: reliable tap/swipe in Chrome; vertical scroll still handled by column */
  touch-action: manipulation;
  /* Prevent blue drag-selection highlight on image and info panel */
  user-select: none;
  -webkit-user-select: none;
}

/* Off-screen slide preloads (Chrome needs slides in DOM to fetch lazy/eager media) */
.project-media .carousel-slide--preload {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  visibility: hidden;
  pointer-events: none;
}

.project-media img,
.project-media video {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

/* ── Info panel ── */

.project-info-panel {
  display: none;
  padding: var(--info-pad);
  user-select: none;    /* prevents text highlight when clicking prev/next */
  -webkit-user-select: none;
  padding-top: 4px;
  /* min-height locked by JS from recorded image height;
     cleared when returning to carousel (hideInfoPanel).     */
}

.project-info-panel.is-visible { display: block; }

.info-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
}

.info-table tr { border-bottom: var(--border); }

.info-table td {
  padding: 5px 0;
  font-size: var(--fs-body);
  line-height: var(--lh);
  vertical-align: top;
  color: var(--color-text);      /* black — same for label and value */
}

.info-table td:first-child {
  width: 25%;
  padding-right: 8px;
}

.info-description {
  font-size: var(--fs-body);
  line-height: var(--lh-text);
  color: var(--color-text);
}

/* ── Caption ── */

.project-caption {
  padding: var(--cap-y) var(--pad-x);
  border-top: var(--border);
}

.project-caption.last-carousel {
  border-color: #fff;
}

.project-title {
  display: block;
  font-size: var(--fs-title);    /* 16pt — largest text in gallery */
  color: var(--color-text);
  line-height: var(--lh);
  margin-bottom: 4px;
}

.project-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
}

.project-tags {
  font-size: var(--fs-caption);   /* 12pt */
  color: var(--color-text);       /* black, not grey */
  flex: 1;
}

.project-year {
  font-size: var(--fs-caption);   /* 12pt */
  color: var(--color-text);       /* black, not grey */
  white-space: nowrap;
  flex-shrink: 0;
}

/* ============================================================
   CUSTOM CURSOR
   ============================================================ */

.custom-cursor {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  font-family: var(--font-body);
  font-size: var(--fs-caption);
  /* White source + mix-blend-mode: difference = full channel invert.
     Cursor text is always legible regardless of image brightness.  */
  color: #fff;
  mix-blend-mode: difference;
  line-height: 1;
  display: none;
  transform: translate(0, -50%);
  white-space: nowrap;
}

@media (min-width: 768px) {
  .project-media,
  .project-info-panel.is-visible {
    cursor: none;
  }
}

/* ============================================================
   LANGUAGE TOGGLE
   ============================================================ */

.lang-toggle {
  position: fixed;
  bottom: 10px;
  right: 10px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: var(--border);
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: var(--fs-caption);
  color: var(--color-text);
  cursor: pointer;
  z-index: 300;
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.15s, color 0.15s;
}

.lang-toggle:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */

body.about-page { overflow: hidden; }

.about-content {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
}

/* Vertically + horizontally centred studio name */
.about-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px var(--pad-x);
}

.about-title {
  font-size: var(--fs-title);     /* 16pt — largest text on about page */
  color: var(--color-text);
  text-align: center;
  line-height: var(--lh);
}

/* Three-column footer */
.about-footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

.about-footer-col {
  padding: 10px 0;
  font-size: var(--fs-body);      /* 13.5pt for the descriptions */
  line-height: var(--lh-text);
  color: var(--color-text);
  margin: 0 var(--pad-x);
}

.about-footer-col:last-child { border-right: none; }

.about-footer-col a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ============================================================
   RESPONSIVE — MOBILE  < 768 px
   ============================================================ */

@media (max-width: 767px) {
  .custom-cursor {
    display: none !important;
  }

  body,
  body.about-page {
    overflow: auto;
    height: auto;
  }

  .gallery-wrapper {
    position: relative;
    top: var(--nav-h);
    bottom: auto;
    flex-direction: column;
    /* keep padding + gap from root rule */
  }

  .gallery-column {
    overflow-y: visible;
    border-right: none;
    border-bottom: var(--border);
  }
  .gallery-column:last-child { border-bottom: none; }

  .about-content {
    position: relative;
    top: var(--nav-h);
    min-height: calc(100vh - var(--nav-h));
  }

  .about-footer {
    grid-template-columns: 1fr;
  }

  .about-footer-col {
    border-right: none;
    border-bottom: var(--border);
  }
  .about-footer-col:last-child { border-bottom: none; }
}

/* ============================================================
   RECRUIT POPUP
   ============================================================ */
.recruit-popup {
  position: fixed;
  z-index: 400;
  /* width is set dynamically in JS as 80% of one column card */
  background: var(--color-bg);
  border: var(--border);
  /* Prevent any text selection inside the popup */
  user-select: none;
  -webkit-user-select: none;
  padding: 0px 12px;
  cursor: grab;
}

.recruit-popup:active {
  cursor: grabbing;
}

.recruit-page {
  position: static;
  margin: auto auto;
  max-width: 600px;
  box-sizing: border-box;
  cursor: default;
}

.recruit-article {
  background: var(--color-bg);
}

.recruit-article-header {
  margin-bottom: 24px;
}

.recruit-page .recruit-bar-label {
  display: none;
}

.recruit-page .recruit-bar {
  cursor: default;
}

.recruit-page .recruit-toggle {
  cursor: pointer;
}

.recruit-page .recruit-display {
  border-bottom: none;
  padding: 0px 0px 10px;
  margin-top: -40px;
}


@media (max-width: 767px) {
.recruit-page {
  margin-top: 40px;
  padding-bottom: 40px;
}
}


/* ── Collapsible body ── */

.recruit-body {
  overflow: hidden;
  /* height is driven entirely by JS for smooth transition */
  transition: height 0.25s ease;
}

/* ── Intro paragraph ── */

.recruit-intro {
  padding: 10px 0px;
  font-size: var(--fs-body);
  line-height: var(--lh-text);
  color: var(--color-text);
  border-bottom: var(--border);
}

/* ── Table ── */

.recruit-table {
  width: 100%;
  border-collapse: collapse;
}

/* Column widths */
.recruit-table .rcol-cat { width: 18%; }
.recruit-table .rcol-sub { width: 15%; }
.recruit-table .rcol-val { /* auto */ }

.recruit-table td {
  padding: 3px 0px;
  font-size: var(--fs-body);
  line-height: var(--lh-text);
  vertical-align: top;
  border-bottom: var(--border);
  color: var(--color-text);
}

/* Category cell — right border separates it from the rest */
.recruit-cat {
  white-space: nowrap;
}

/* Sub-label cell — right border separates it from value */
.recruit-sub {
  white-space: nowrap;
}

/* ── Display title  (Summer Internship / 하계 인턴십) ── */

.recruit-display {
  padding: 40px 0px 10px;
  border-bottom: var(--border);  /* separator — collapses with body, never doubles */
}

.recruit-display-en,
.recruit-display-kr {
  display: block;
  font-size: 2.667em;
  line-height: 1.20;
  color: var(--color-text);
}

/* ── Bar — always at bottom, no top border (separator is on body above) ── */

.recruit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0px;
  height: 34px;
  cursor: grab;
}

/* Remove the is-collapsed rule — no longer needed */

.recruit-bar:active { cursor: grabbing; }

.recruit-bar-label {
  font-size: var(--fs-body);
  color: var(--color-text);
}

.recruit-toggle {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  color: var(--color-text);
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
}

