/* ==========================================================================
   Kweon Jimin — Product Design Portfolio
   Base system: editorial, image-led, quiet type. Two-column feed layout.
   ========================================================================== */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.css');

:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #7a7a7a;
  --line: #e6e6e6;
  --sidebar-w: 300px;
  --gap: 28px;
  --pad: 40px;
  --photo-w: 820px;
  font-size: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
}

body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Malgun Gothic', sans-serif;
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.link {
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: opacity 0.2s ease;
}
.link:hover { opacity: 0.5; }

.link--quiet {
  color: var(--muted);
}

/* -------------------------------------------------------------------------
   Layout shell
   ------------------------------------------------------------------------- */

.shell {
  display: flex;
  align-items: flex-start;
  min-height: 100vh;
  width: 100%;
}

/* Sidebar ------------------------------------------------------------- */

.sidebar {
  position: sticky;
  top: 0;
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  height: 100vh;
  padding: var(--pad) 32px var(--pad) var(--pad);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar__intro {
  max-width: 230px;
  color: var(--fg);
}

.sidebar__intro p {
  margin: 0 0 18px 0;
}

.sidebar__name {
  font-weight: 500;
  letter-spacing: -0.01em;
}

.sidebar__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 4px;
}

.sidebar__nav a {
  color: var(--muted);
}
.sidebar__nav a:hover { color: var(--fg); }

.sidebar__meta {
  display: none;
}

.sidebar__footer {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.01em;
}

.sidebar__footer p { margin: 0 0 6px 0; }

/* Content column -------------------------------------------------------- */

.content {
  flex: 1;
  min-width: 0;
  padding: var(--pad) var(--pad) 120px 0;
}

/* -------------------------------------------------------------------------
   Project header (top of a detail page)
   ------------------------------------------------------------------------- */

.project-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}

.project-header__title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.project-header__title .idx {
  color: var(--muted);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.project-header__title .date {
  color: var(--muted);
  font-weight: 400;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  margin-left: 4px;
}

.project-header__tags {
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 10px;
}

/* -------------------------------------------------------------------------
   Feed items (image only — captions live in the Plates block below)
   ------------------------------------------------------------------------- */

.feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 64px;
}

.feed-item {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.feed-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.feed-item__frame {
  background: #f4f4f4;
  overflow: hidden;
  max-width: min(70%, var(--photo-w));
  margin-left: auto;
}

.feed-item__frame img {
  width: 100%;
}

/* Per-image caption — desktop already shows this data in the Plates
   list below, so it stays hidden here and only appears inline on
   mobile (see responsive block), Cargo-feed style. */
.feed-item__caption {
  display: none;
}

/* -------------------------------------------------------------------------
   Details / write-up block
   ------------------------------------------------------------------------- */

.project-meta {
  display: flex;
  flex-direction: column;
  gap: 48px;
  max-width: 900px;
  margin-left: auto;
  margin-top: 72px;
}

.project-meta__row {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 60px;
}

.project-meta h3 {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  margin: 0 0 16px 0;
}

.plates-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.plates-list li {
  display: flex;
  gap: 14px;
  font-size: 12px;
  line-height: 1.6;
}

.plates-list .idx {
  flex: 0 0 auto;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.plates-list .label {
  flex: 0 0 auto;
  color: var(--fg);
  font-weight: 600;
  min-width: 84px;
}

.plates-list .desc {
  flex: 1 1 auto;
  color: var(--muted);
}

.meta-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.meta-list dt {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 2px;
}

.meta-list dd {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.project-meta__body {
  font-size: 14px;
  line-height: 1.65;
  color: var(--fg);
}

.project-meta__body p { margin: 0; }

/* -------------------------------------------------------------------------
   Index (homepage — list of all projects)
   ------------------------------------------------------------------------- */

.index-list {
  display: flex;
  flex-direction: column;
  max-width: 900px;
  margin-left: auto;
  margin-top: 8px;
}

.index-item {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  transition: opacity 0.2s ease;
}

.index-list a.index-item:hover { opacity: 0.55; }

.index-item:last-child {
  border-bottom: 1px solid var(--line);
}

.index-item__thumb {
  flex: 0 0 auto;
  width: 96px;
  height: 68px;
  background: #f4f4f4;
  overflow: hidden;
}

.index-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.index-item__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.index-item__title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.index-item__title .idx {
  color: var(--muted);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.index-item__tags {
  color: var(--muted);
  font-size: 11px;
}

.index-item__date {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.index-empty {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}

@media (max-width: 860px) {
  .index-list { max-width: none; margin-left: 0; }
  .index-item { gap: 16px; }
  .index-item__thumb { width: 64px; height: 46px; }
  .index-item__date { display: none; }
}

/* -------------------------------------------------------------------------
   Footer nav (return to index)
   ------------------------------------------------------------------------- */

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 72px;
  color: var(--muted);
  font-size: 12px;
}

.project-footer__next {
  text-align: right;
}

.project-footer__next .idx {
  color: var(--muted);
  margin-right: 6px;
}

/* -------------------------------------------------------------------------
   Custom cursor — a trailing ring that inverts over imagery and grows
   on links / photos. JS-driven; native cursor stays put until it's ready.
   ------------------------------------------------------------------------- */

html.has-custom-cursor,
html.has-custom-cursor a,
html.has-custom-cursor .feed-item__frame {
  cursor: none;
}

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
  margin: 0;
  border-radius: 50%;
  background: #ffffff;
  mix-blend-mode: difference;
  pointer-events: none;
  z-index: 999;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: width 0.25s ease, height 0.25s ease, opacity 0.2s ease;
}

.cursor.is-visible { opacity: 1; }

.cursor.is-hover {
  width: 52px;
  height: 52px;
}

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */

@media (max-width: 860px) {
  :root { --pad: 20px; --gap: 20px; --photo-w: 100%; }

  .shell { flex-direction: column; }

  /* Sidebar collapses into a slim sticky top bar — name on the left,
     nav on the right — like a Cargo feed template header, instead of
     sitting as a full block above the content. */
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }

  .sidebar__intro {
    max-width: none;
    min-width: 0;
    overflow: hidden;
  }

  .sidebar__name {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sidebar__name-sub { display: none; }

  .sidebar__nav {
    flex: 0 0 auto;
    margin-top: 0;
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
  }

  .sidebar__footer { display: none; }

  .content { padding: 20px 20px 72px; }

  .project-header {
    flex-wrap: wrap;
    gap: 6px 12px;
  }

  /* Feed bleeds full-width past .content's side padding; captions pull
     that padding back in on their own so text still lines up with the
     rest of the page. */
  .feed {
    gap: 0;
    margin-top: 20px;
    margin-left: -20px;
    margin-right: -20px;
  }

  .feed-item { margin-bottom: 28px; }
  .feed-item:last-child { margin-bottom: 0; }

  .feed-item__frame { max-width: none; margin-left: 0; }

  .feed-item__caption {
    display: block;
    padding: 12px 20px 0;
    font-size: 12px;
    line-height: 1.6;
  }

  .feed-item__caption .idx {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    margin-right: 8px;
  }

  .feed-item__caption .label {
    color: var(--fg);
    font-weight: 600;
    margin-right: 8px;
  }

  .feed-item__caption .desc { color: var(--muted); }

  /* Plates duplicate the per-image captions now shown inline in the
     feed above, so they're redundant on mobile — Details stays. */
  .plates-block { display: none; }

  .project-meta {
    max-width: none;
    margin-left: 0;
    margin-top: 56px;
    gap: 40px;
  }

  .project-meta__row {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .feed-grid { grid-template-columns: 1fr; }
}
