/* ==========================================================================
   최송현 포트폴리오 — Google Arts & Culture 스타일
   흰 캔버스 · 작은 타이포 · 넓은 여백 · 작품이 주인공
   ========================================================================== */

:root {
  --ink: #202124;
  --ink-soft: #5f6368;
  --ink-faint: #9aa0a6;
  --paper: #fff;
  --wash: #f8f9fa;
  --line: #e8eaed;
  --accent: #1a73e8;
  --shadow: 0 1px 2px rgba(60, 64, 67, .1), 0 4px 16px rgba(60, 64, 67, .08);
  --shadow-lift: 0 2px 6px rgba(60, 64, 67, .12), 0 12px 32px rgba(60, 64, 67, .16);
  --header-h: 64px;
  --max: 1240px;
  /* 좌우 최소 여백을 확보하면서, 넓은 화면에서는 내용을 가운데로 모은다 */
  --pad: max(clamp(20px, 5vw, 56px), calc((100% - var(--max)) / 2));
  --ease: cubic-bezier(.2, 0, 0, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: .1px;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--ink); color: #fff; }

/* --------------------------------------------------------------- header */

.site-header {
  position: fixed;
  z-index: 50;
  inset: 0 0 auto;
  height: var(--header-h);
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}

.site-header.scrolled { border-bottom-color: var(--line); }

.brand {
  text-decoration: none;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: .04em;
  white-space: nowrap;
}

.brand b { font-weight: 600; }

.site-header nav { display: flex; align-items: center; gap: 4px; }

.site-header nav a {
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  color: var(--ink-soft);
  transition: background .2s var(--ease), color .2s var(--ease);
}

.site-header nav a:hover { background: var(--wash); color: var(--ink); }

.menu-toggle {
  display: none;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  font: inherit;
  font-size: 12px;
  color: var(--ink-soft);
  cursor: pointer;
}

/* ----------------------------------------------------------------- hero */

.hero {
  position: relative;
  margin-top: var(--header-h);
  display: grid;
  grid-template-columns: minmax(260px, 32%) 1fr;
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(40px, 7vw, 96px) var(--pad);
  background: var(--wash);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.hero h1 {
  margin: 0 0 18px;
  font-family: 'Gowun Batang', Georgia, serif;
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 400;
  line-height: 1.34;
  letter-spacing: -.01em;
}

.hero h1 i { font-style: italic; color: var(--ink-soft); }

.hero .intro {
  margin: 0 0 28px;
  max-width: 32ch;
  line-height: 1.85;
  color: var(--ink-soft);
}

.round-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  transition: background .25s var(--ease), color .25s var(--ease);
}

.round-link:hover { background: var(--ink); color: #fff; }
.round-link span { transition: transform .25s var(--ease); }
.round-link:hover span { transform: translateY(2px); }

.hero-art { position: relative; }

.hero-art > img {
  width: 100%;
  max-height: min(60vh, 460px);
  object-fit: contain;
  filter: drop-shadow(0 18px 44px rgba(60, 64, 67, .22));
}

/* 손글씨 낙서 장식은 정돈된 톤과 맞지 않아 감춘다 */
.scribble, .vertical-note { display: none; }

.hero-caption {
  margin-top: 18px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-faint);
}

.hero-caption b {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero-caption span { color: var(--ink); font-size: 13px; }

/* ------------------------------------------------------------ manifesto */

.manifesto {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: clamp(20px, 3vw, 48px);
  align-items: start;
  padding: clamp(48px, 7vw, 96px) var(--pad);
  border-bottom: 1px solid var(--line);
}

.manifesto > p {
  margin: 0;
  font-family: 'Gowun Batang', Georgia, serif;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.6;
}

.manifesto em { font-style: italic; color: var(--accent); }

.manifesto > div {
  padding-top: 8px;
  border-top: 1px solid var(--ink);
  font-size: 13px;
  color: var(--ink-soft);
}

.manifesto > div span {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--ink-faint);
}

/* ---------------------------------------------------------- works / grid */

.works-section { padding: clamp(48px, 7vw, 96px) var(--pad) clamp(56px, 8vw, 112px); }

.section-title {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  margin-bottom: clamp(24px, 3vw, 40px);
  border-bottom: 1px solid var(--line);
}

.section-title h2 {
  margin: 0;
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 500;
  letter-spacing: -.01em;
}

.section-title > p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* 구글 아트 앤 컬쳐식 타일 그리드 — 균일한 행 높이, 일부 카드만 크게 */
.art-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 250px;
  gap: 16px;
}

/* 리듬을 주기 위해 일정 간격의 카드를 두 행 높이로 키운다 */
.art-card:nth-child(7n + 3) { grid-row: span 2; }

.art-card {
  position: relative;
  min-width: 0;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}

.art-card.visible { opacity: 1; transform: none; }

.art-open {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--wash);
  cursor: zoom-in;
  box-shadow: var(--shadow);
  transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}

.art-open:hover,
.art-open:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  outline: none;
}

/* 타일을 꽉 채워 갤러리 벽처럼 정렬한다 */
.art-open img,
.art-open video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}

/*
 * 작품 이미지 보호
 *
 * 드래그해서 끌어내기, iOS 길게 누르기 메뉴, 선택을 막는다.
 * pointer-events 를 꺼도 감싸는 버튼은 그대로 눌려 라이트박스는 열린다.
 */
.art-open img,
.art-open video,
.hero-art img,
.lightbox img {
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
}

/* 그리드와 히어로에서는 이미지 자체를 클릭 대상에서 제외한다.
   라이트박스 이미지는 제외하지 않는다. 여기서 빼면 이미지를 눌렀을 때
   뒤의 배경이 눌린 것으로 처리되어 창이 닫혀 버린다. */
.art-open img,
.art-open video,
.hero-art img { pointer-events: none; }

/* 캡션 가독성을 위한 하단 그라데이션 */
.art-open::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(to top, rgba(0, 0, 0, .62), rgba(0, 0, 0, .18) 45%, transparent);
  opacity: .95;
  pointer-events: none;
}

.art-open:hover img,
.art-open:hover video { transform: scale(1.03); }

.play {
  position: absolute;
  left: 12px;
  bottom: 12px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(32, 33, 36, .78);
  color: #fff;
  font-size: 11px;
}

/* 이미지 위에 겹쳐 얹는 캡션. 클릭은 아래 버튼으로 통과시킨다 */
.art-meta {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  color: #fff;
  pointer-events: none;
}

.art-meta > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.art-meta span {
  font-size: 10px;
  letter-spacing: .1em;
  color: rgba(255, 255, 255, .7);
  font-variant-numeric: tabular-nums;
}

.art-meta h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

.art-meta time {
  font-size: 11px;
  color: rgba(255, 255, 255, .7);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.archive-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: clamp(20px, 3vw, 36px);
  padding: 11px 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  transition: background .25s var(--ease), border-color .25s var(--ease);
}

.archive-link:hover { background: var(--wash); border-color: var(--ink); }
.archive-link span { transition: transform .25s var(--ease); }
.archive-link:hover span { transform: translate(2px, -2px); }

/* ---------------------------------------------------------------- about */

.about {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 1.4fr minmax(180px, .7fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
  padding: clamp(48px, 7vw, 96px) var(--pad);
  background: var(--wash);
  border-block: 1px solid var(--line);
}

.about-heading h2 {
  margin: 0;
  font-family: 'Gowun Batang', Georgia, serif;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 400;
  line-height: 1.45;
}

.about-copy p {
  margin: 0 0 16px;
  line-height: 1.95;
  color: var(--ink-soft);
}

.portrait-placeholder {
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
}

.portrait-placeholder span {
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--ink-faint);
}

.portrait-placeholder b {
  font-size: clamp(16px, 1.8vw, 21px);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -.01em;
}

/* ---------------------------------------------------------------- tools */

.tools { padding: clamp(40px, 6vw, 72px) 0; overflow: hidden; }
.tools > .eyebrow { padding: 0 var(--pad); }

.tool-marquee { display: flex; margin-top: 8px; }

.tool-marquee > div {
  display: flex;
  align-items: center;
  gap: 26px;
  padding-left: var(--pad);
  white-space: nowrap;
  animation: marquee 34s linear infinite;
}

.tool-marquee span { font-size: clamp(16px, 1.9vw, 22px); }
.tool-marquee i { font-style: normal; font-size: 11px; color: var(--ink-faint); }

@keyframes marquee { to { transform: translateX(-50%); } }

/* -------------------------------------------------------- archive page */

.archive-hero {
  margin-top: var(--header-h);
  padding: clamp(48px, 8vw, 104px) var(--pad) clamp(28px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
}

.archive-hero h1 {
  margin: 0 0 10px;
  font-family: 'Gowun Batang', Georgia, serif;
  font-size: clamp(26px, 3.6vw, 40px);
  font-weight: 400;
  letter-spacing: -.01em;
}

.archive-hero p:last-child { margin: 0; font-size: 13px; color: var(--ink-soft); }

.works-section.archive { padding-top: clamp(32px, 4vw, 56px); }

/* --------------------------------------------------------------- footer */

footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 32px var(--pad);
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-faint);
}

footer > p { margin: 0; }
footer div { display: flex; align-items: baseline; gap: 10px; }
footer div b { font-size: 13px; font-weight: 500; color: var(--ink); }

/* ------------------------------------------------------------ lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: clamp(24px, 6vw, 72px);
  background: rgba(32, 33, 36, .96);
}

.lightbox.open { display: grid; animation: fade .25s var(--ease); }

.lightbox img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 2px;
}

.lightbox p {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  margin: 0;
  text-align: center;
  font-size: 12px;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .78);
}

.lightbox > button {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s var(--ease);
}

.lightbox > button:hover { background: rgba(255, 255, 255, .24); }

@keyframes fade { from { opacity: 0; } }

/* ----------------------------------------------------------- responsive */

@media (max-width: 900px) {
  .art-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 220px; }
  .hero { grid-template-columns: 1fr; }
  .manifesto { grid-template-columns: 1fr 1fr; }
  .manifesto > p { grid-column: 1 / -1; }
  .about { grid-template-columns: 1fr; }
  .portrait-placeholder { max-width: 240px; }
}

@media (max-width: 720px) {
  .menu-toggle { display: block; }
  .site-header nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    right: var(--pad);
    min-width: 160px;
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--paper);
    box-shadow: var(--shadow-lift);
  }
  .site-header.menu-open nav { display: flex; }
}

@media (max-width: 520px) {
  .manifesto { grid-template-columns: 1fr; }
  .art-grid { grid-template-columns: 1fr; grid-auto-rows: 260px; }
  .art-card:nth-child(7n + 3) { grid-row: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .art-card { opacity: 1; transform: none; }
}
