/* ==========================================================
   JIYOUNG K — portfolio
   ========================================================== */

:root {
  --bg: #ffffff;
  --fg: #000000;
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --placeholder: #f1f1f1;
  --gutter: 28px;
  --fs: 14px;
  --fs-small: 13px;
  --font: "Helvetica Neue", Helvetica, Arial, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--fs);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover, .is-active { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: left; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

.upper { text-transform: uppercase; }

/* ---------- Header ---------- */

.header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 22px var(--gutter);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header nav { display: flex; gap: 26px; text-transform: uppercase; font-size: var(--fs); }
.header nav.right { justify-content: flex-end; }

.wordmark {
  font-size: 34px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}
.wordmark:hover { text-decoration: none; }

/* ---------- Shop-style list layout ---------- */

.shop {
  display: grid;
  grid-template-columns: 220px 1fr 180px;
  gap: 48px;
  padding: 40px var(--gutter) 80px;
}

.side { font-size: var(--fs); position: sticky; top: 100px; align-self: start; max-height: calc(100vh - 120px); overflow: auto; }
.side h3 { font-size: var(--fs); font-weight: 500; text-transform: uppercase; margin-bottom: 8px; }
.side section + section { margin-top: 34px; }
.side li { line-height: 20px; }
.side .filter-list button:hover { text-decoration: underline; text-underline-offset: 3px; }


.search {
  width: 100%;
  margin: 4px 0 20px;
  padding: 10px 18px;
  border: 0;
  background: #f7f7f7;
  font: inherit;
  font-size: var(--fs-small);
  outline: none;
}
.search::placeholder { color: #aaa; }

/* ---------- Grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 16px;
  row-gap: 44px;
  align-content: start;
}

.card { display: block; }
.card:hover { text-decoration: none; }
.card .media { position: relative; aspect-ratio: 7 / 10; background: var(--placeholder); overflow: hidden; }
.card .media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .25s ease; }
.card .media img.alt { opacity: 0; }
.card:hover .media img.alt { opacity: 1; }
.card .info { margin-top: 14px; font-size: var(--fs); line-height: 20px; }
.card .info .brand { text-transform: uppercase; }
.card:hover .info .title { text-decoration: underline; text-underline-offset: 3px; }

.placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b5b5b5;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.empty { grid-column: 1 / -1; color: var(--muted); padding: 60px 0; }

.filter-toggle { display: none; }

/* ---------- Project detail ---------- */

.project {
  display: grid;
  grid-template-columns: 280px 1fr 180px;
  gap: 48px;
  padding: 40px var(--gutter) 100px;
}

.project .meta { position: sticky; top: 100px; align-self: start; }
.project .meta .brand { text-transform: uppercase; }
.project .meta h1 { font-size: var(--fs); font-weight: 400; }
.project .meta .year { margin-bottom: 28px; }
.project .meta p { margin-bottom: 28px; max-width: 34ch; }
.project .meta ul li::before { content: "– "; }

.project .gallery { display: flex; flex-direction: column; gap: 16px; max-width: 760px; margin: 0 auto; width: 100%; }
.project .gallery .frame { position: relative; aspect-ratio: 7 / 10; background: var(--placeholder); }
.project .gallery img { width: 100%; height: auto; }

.project .pager { position: sticky; top: 100px; align-self: start; display: flex; flex-direction: column; gap: 6px; text-transform: uppercase; }

/* ---------- About ---------- */

.about {
  display: grid;
  grid-template-columns: 220px 1fr 180px;
  gap: 48px;
  padding: 40px var(--gutter) 100px;
  min-height: 70vh;
}
.about .body { max-width: 560px; font-size: 18px; line-height: 1.5; }
.about .body p + p { margin-top: 1em; }
.about h3 { font-size: var(--fs); font-weight: 500; text-transform: uppercase; margin-bottom: 8px; }
.about .contact li { line-height: 20px; }

/* ---------- Footer ---------- */

.footer {
  display: flex;
  justify-content: space-between;
  padding: 24px var(--gutter);
  font-size: var(--fs-small);
  color: var(--muted);
}

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

@media (max-width: 1200px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .shop, .about { grid-template-columns: 190px 1fr 150px; gap: 32px; }
  .project { grid-template-columns: 240px 1fr 120px; gap: 32px; }
}

@media (max-width: 900px) {
  :root { --gutter: 16px; }

  .header { grid-template-columns: 1fr; justify-items: center; gap: 14px; padding: 18px var(--gutter); }
  .header .wordmark { order: -1; font-size: 28px; }
  .header nav, .header nav.right { justify-content: center; gap: 18px; font-size: var(--fs-small); }

  .shop { grid-template-columns: 1fr; gap: 0; padding-top: 12px; }
  .filter-toggle {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 12px 0;
    margin-bottom: 16px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    text-transform: uppercase;
  }
  .side { display: none; position: static; max-height: none; margin-bottom: 28px; }
  .shop.filters-open .side { display: block; }
  .shop .side.right { order: -1; }
  .shop .filter-toggle { order: -2; }
  .grid { grid-template-columns: repeat(2, 1fr); column-gap: 10px; row-gap: 32px; }

  .project, .about { grid-template-columns: 1fr; gap: 28px; padding-top: 16px; }
  .project .meta, .project .pager { position: static; }
  .project .pager { flex-direction: row; justify-content: space-between; }
  .about .body { font-size: 16px; }
}
