@font-face {
  font-family: "KakaoBigSans";
  src: url("assets/fonts/KakaoBigSans-Regular.woff2") format("woff2"),
       url("assets/fonts/KakaoBigSans-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "KakaoBigSans";
  src: url("assets/fonts/KakaoBigSans-Bold.woff2") format("woff2"),
       url("assets/fonts/KakaoBigSans-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "KakaoBigSans";
  src: url("assets/fonts/KakaoBigSans-ExtraBold.woff2") format("woff2"),
       url("assets/fonts/KakaoBigSans-ExtraBold.woff") format("woff");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

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

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

body {
  font-family: "KakaoBigSans", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  color: #111;
  background: #dbdbdb;
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
}

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

/* Header */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 40px;
  z-index: 20;
}

.site-title {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  gap: 28px;
  font-size: 15px;
}

.site-nav a {
  color: #aaa;
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: #111;
}

.site-nav a.active {
  color: #111;
  font-weight: 400;
}

/* Main / carousel */
main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 40px;
}

.carousel {
  position: relative;
  width: 100%;
  max-width: 920px;
}

.carousel-viewport {
  width: 100%;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}

.project-slide {
  flex: 0 0 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.project-thumb {
  display: block;
  width: 100%;
  text-align: center;
  cursor: pointer;
}

.project-thumb img {
  display: inline-block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 70vh;
  vertical-align: middle;
  transition: transform 0.4s ease;
}

.project-thumb:hover img {
  transform: scale(1.02);
}

.project-caption {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 11px;
  color: #555;
  white-space: nowrap;
}

.project-index {
  font-weight: 600;
  color: #111;
}

.project-title {
  font-weight: 600;
  color: #111;
}

.project-desc {
  color: #777;
}

/* Slide click zones (invisible) */
.carousel-arrow {
  position: fixed;
  top: 0;
  height: 100%;
  width: 28%;
  min-width: 140px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
}

.carousel-arrow.prev {
  left: 0;
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18"><path d="M13 3L3 9l10 6z" fill="%23FF006F"/></svg>') 9 9, w-resize;
}

.carousel-arrow.next {
  right: 0;
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18"><path d="M5 3l10 6-10 6z" fill="%23FF006F"/></svg>') 9 9, e-resize;
}

/* Detail overlay */
.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(255, 255, 255, 0.65);
  opacity: 0;
  visibility: hidden;
  overflow-y: auto;
  padding: 32px 5vw 80px;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.detail-overlay.open {
  opacity: 1;
  visibility: visible;
}

.detail-panel {
  max-width: 1120px;
  margin: 0 auto;
  background: transparent;
  border: 1px solid #111;
}

.detail-topbar {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
  font-size: 13px;
}

.detail-topbar::after {
  content: '';
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 0;
  border-bottom: 1px solid #111;
}

.detail-close {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  color: #111;
  letter-spacing: 0.02em;
}

.detail-close:hover {
  color: #ff006f;
}

.detail-metabar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  padding: 14px 32px;
  font-size: 12px;
  color: #777;
}

.detail-metabar::after {
  content: '';
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 0;
  border-bottom: 1px solid #111;
}

/* Image area (left) and body area (right) run as a grid, one grid row per
   .detail-row — so a body-area note lines up exactly beside the image row
   it was attached to. Row 1's body-area cell is always the title/description
   header block. */
.detail-body {
  display: grid;
  grid-template-columns: 1fr 280px;
  column-gap: 48px;
  row-gap: 6px;
  align-items: start;
  padding: 40px 32px 80px;
}

.detail-header-block h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 18px;
}

.detail-desc {
  font-size: 13px;
  line-height: 1.8;
  color: #444;
  margin-bottom: 24px;
}

.detail-info-list {
  list-style: none;
  font-size: 12px;
  color: #777;
  line-height: 2;
}

.detail-note {
  color: #444;
}

.detail-images > img {
  width: 100%;
  height: auto;
  display: block;
}

.detail-row {
  display: flex;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
}

.detail-cell {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
}

.detail-cell-image {
  min-width: 0;
  /* Never stretch a natural-ratio frame to match a taller sibling —
     aspect-ratio already fixes cropped frames' height on its own. */
  align-items: flex-start;
}

.detail-frame-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.detail-frame {
  display: block;
  overflow: hidden;
  min-width: 0;
}

/* Cropped (non-original) ratio: fill the frame without ever stretching —
   object-fit: cover scales the image and crops, it never distorts it. */
.detail-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* "원본" ratio: no crop frame, image keeps its natural proportions. */
.detail-frame.is-natural {
  height: auto;
}

.detail-frame.is-natural img {
  height: auto;
  object-fit: unset;
}

.detail-image-caption {
  margin: 10px 0 22px;
  line-height: 1.6;
}

.detail-cell-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.detail-text-block {
  margin: 0;
  line-height: 1.6;
}

.detail-note {
  line-height: 1.6;
}

.text-weight-regular {
  font-weight: 400;
}

.text-weight-bold {
  font-weight: 700;
}

.text-color-black {
  color: #111;
}

.text-color-gray {
  color: #888;
}

@media (max-width: 780px) {
  .detail-body {
    grid-template-columns: 1fr;
    row-gap: 32px;
    padding: 32px 20px 60px;
  }

  /* Keep the title/description first regardless of which image row its
     grid cell happens to be paired with on desktop. */
  .detail-header-block {
    order: -1;
  }

  .detail-topbar,
  .detail-metabar {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 20px 20px;
  }

  main {
    padding: 16px 20px 40px;
  }

  .carousel-arrow {
    width: 30%;
  }
}
