/*
Theme Name: CHAN PARK Visual Storyteller
Theme URI: https://example.com/
Author: Chan Park
Description: 사진작가 박찬(Chan Park)의 포트폴리오·게시판 테마. 작품 게시판, 댓글, 한/영 전환, 사진 보호, 관리자 전용 방문 통계, DeepL 자동 번역.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: chanpark
*/

:root {
  --bg: #0e0e0e; --surface: #161616; --border: #2a2a2a;
  --text: #f2f2f2; --muted: #a8a8a8; --accent: #c8a96e;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; min-width: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  background: var(--bg); color: var(--text);
  font-family: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.75; letter-spacing: -0.01em; overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }
[data-lang="en"] { display: none; }
body.en [data-lang="en"] { display: revert; }
body.en [data-lang="ko"] { display: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.serif, h2, .hero h1 { font-family: 'Cormorant Garamond', Georgia, 'Noto Sans KR', serif; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(14,14,14,0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 5%; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.logo { font-size: 1.1rem; font-weight: 700; letter-spacing: 0.18em; white-space: nowrap; }
.logo small { display: block; font-size: 0.62rem; font-weight: 400; color: var(--accent); letter-spacing: 0.2em; }
.main-nav { display: flex; gap: 1.6rem; align-items: center; font-size: 0.85rem; letter-spacing: 0.08em; }
.main-nav a:hover { color: var(--accent); }
.lang-btn, .menu-btn, .mini {
  border: 1px solid var(--accent); color: var(--accent); background: transparent;
  min-height: 40px; padding: 0.3rem 0.8rem; cursor: pointer; font-size: 0.78rem; letter-spacing: 0.06em; font-family: inherit;
}
.lang-btn:hover, .mini:hover { background: var(--accent); color: #0e0e0e; }
.mini { border-color: #555; color: #ccc; min-height: 36px; display: inline-flex; align-items: center; }
.mini.danger { border-color: #8a3b3b; color: #e8a0a0; }
.menu-btn { display: none; }
@media (max-width: 760px) {
  .menu-btn { display: inline-block; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; background: #111; border-bottom: 1px solid var(--border); padding: 0.5rem 5% 1rem; gap: 0; }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 0.8rem 0; border-bottom: 1px solid var(--border); }
  .main-nav .lang-btn { margin-top: 0.8rem; align-self: flex-start; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 86vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  padding: 5rem 8% 4rem; overflow: hidden; border-bottom: 1px solid var(--border);
  background: radial-gradient(circle at 50% 38%, #2a241b 0%, #141210 45%, #0e0e0e 80%);
}
.hero-scene { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.85; pointer-events: none; }
.hero > *:not(svg) { position: relative; }
.hero-sub { color: var(--accent); font-size: 0.8rem; letter-spacing: 0.22em; margin-bottom: 1rem; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 300; letter-spacing: 0.14em; line-height: 1.1; margin-bottom: 1.3rem; text-wrap: balance; }
.hero p { max-width: 680px; color: #c9c9c9; font-size: 1.05rem; margin-bottom: 2.2rem; }
.badges { display: flex; gap: 1.2rem; flex-wrap: wrap; justify-content: center; font-size: 0.8rem; letter-spacing: 0.16em; border-top: 1px solid #3a3428; border-bottom: 1px solid #3a3428; padding: 0.85rem 2rem; background: rgba(14,14,14,0.4); }
.hero-cta { margin-top: 2.2rem; display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.btn { display: inline-flex; align-items: center; min-height: 46px; padding: 0 1.6rem; font-size: 0.85rem; letter-spacing: 0.1em; border: 1px solid var(--accent); background: none; color: inherit; cursor: pointer; font-family: inherit; }
.btn.solid { background: var(--accent); color: #0e0e0e; font-weight: 600; }
.btn:not(.solid):hover { background: rgba(200,169,110,0.12); }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-40px); } }
.mist { animation: drift 18s ease-in-out infinite alternate; }

/* ---------- sections ---------- */
.section { padding: 5.5rem 8%; border-bottom: 1px solid var(--border); max-width: 1280px; margin: 0 auto; }
.sec-label { color: var(--accent); font-size: 0.78rem; letter-spacing: 0.22em; margin-bottom: 0.5rem; }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); font-weight: 400; letter-spacing: 0.06em; margin-bottom: 2rem; line-height: 1.15; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 2rem; }
.card { display: block; background: var(--surface); border: 1px solid var(--border); padding: 2rem; transition: border-color 0.25s, transform 0.25s; }
.card:hover { border-color: var(--accent); transform: translateY(-3px); }
.card-img { width: 100%; height: 260px; margin-bottom: 1.3rem; overflow: hidden; background: #0a0a0a; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s; }
.card:hover .card-img img { transform: scale(1.04); }
.card h3 { font-size: 1.2rem; font-weight: 500; margin-bottom: 0.7rem; color: var(--accent); }
.card p { color: var(--muted); font-size: 0.95rem; }
.card .more { display: inline-block; margin-top: 0.9rem; font-size: 0.78rem; letter-spacing: 0.12em; color: var(--accent); }

.tour-intro { max-width: 820px; color: #ccc; margin-bottom: 2.4rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1.6rem; }
.tour { background: var(--surface); border: 1px solid var(--border); padding: 1.8rem; display: flex; flex-direction: column; gap: 0.8rem; }
.tour .where { color: var(--accent); font-size: 0.78rem; letter-spacing: 0.16em; }
.tour h3 { font-size: 1.15rem; font-weight: 500; line-height: 1.4; }
.tour p { color: var(--muted); font-size: 0.93rem; }
.includes { margin-top: 2.4rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.includes div { background: var(--bg); padding: 1.3rem 1.4rem; }
.includes strong { display: block; color: var(--accent); font-weight: 500; font-size: 0.95rem; margin-bottom: 0.3rem; }
.includes span { color: var(--muted); font-size: 0.88rem; }

.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 3rem; align-items: start; }
.portrait { margin: 0; background: #fff; padding: 14px 14px 0; border: 1px solid #3a3428; box-shadow: 0 24px 50px rgba(0,0,0,0.5); }
.portrait img { display: block; width: 100%; }
.portrait figcaption { color: #333; text-align: center; padding: 0.9rem 0 1rem; font-size: 0.78rem; letter-spacing: 0.2em; }
.about-text p { color: #cfcfcf; margin-bottom: 1.1rem; }
.quote { margin-top: 1.8rem; padding-left: 1.2rem; border-left: 2px solid var(--accent); font-family: 'Cormorant Garamond', Georgia, 'Noto Sans KR', serif; font-style: italic; font-size: 1.3rem; line-height: 1.5; color: #e4e4e4; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 1rem; margin-top: 2rem; }
.facts div { border-top: 1px solid var(--border); padding-top: 0.8rem; }
.facts strong { display: block; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 2rem; font-weight: 500; color: var(--accent); line-height: 1.1; }
.facts span { color: var(--muted); font-size: 0.85rem; }
.about-contact { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: 0.6rem 1.8rem; }
.about-contact a { white-space: nowrap; border-bottom: 1px solid #3a3428; }
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; } .portrait { max-width: 360px; } }

.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 3rem; }
.contact-info p { color: #cfcfcf; margin-bottom: 1.6rem; }
.info-row { border-top: 1px solid var(--border); padding: 1rem 0; }
.info-row small { display: block; color: var(--accent); font-size: 0.75rem; letter-spacing: 0.18em; }
.info-row a, .info-row span { white-space: nowrap; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- forms ---------- */
.form { display: grid; gap: 1rem; }
.row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 1rem; }
label { display: grid; gap: 0.35rem; font-size: 0.82rem; color: var(--muted); letter-spacing: 0.04em; }
input[type=text], input[type=email], input[type=url], input:not([type]), select, textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--border); color: var(--text);
  padding: 0.75rem 1rem; font-size: 16px; font-family: inherit; min-height: 46px;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
.submit-btn, input[type=submit] { background: var(--accent); color: #0e0e0e; border: none; min-height: 48px; padding: 0 1.6rem; font-weight: 600; letter-spacing: 0.08em; cursor: pointer; font-family: inherit; justify-self: start; }
.form-msg { border: 1px solid var(--accent); padding: 1rem 1.2rem; color: #e8e0cf; font-size: 0.93rem; }

/* ---------- board ---------- */
.board-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding-bottom: 1rem; margin-bottom: 2rem; }
.board-head h2 { margin-bottom: 0.4rem; }
.crumbs { font-size: 0.82rem; color: #999; }
.crumbs a:hover { color: var(--accent); }
.stats { display: inline-flex; flex-wrap: wrap; gap: 0.4rem 1rem; font-size: 0.82rem; color: #e8dcc0; border: 1px dashed var(--accent); padding: 0.35rem 0.8rem; }
.stats b { color: var(--accent); font-weight: 500; }
.work-row { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); gap: 2rem; align-items: center; padding: 2.4rem 0; border-top: 1px solid var(--border); }
.work-row:first-of-type { border-top: 0; }
.work-row.flip .pic { order: 2; }
.work-row .pic { background: #050505; display: flex; justify-content: center; }
.work-row .pic img { width: auto; max-width: 100%; max-height: 64vh; display: block; }
.work-row h3 { font-family: 'Cormorant Garamond', Georgia, 'Noto Sans KR', serif; font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 400; color: var(--accent); line-height: 1.2; margin-bottom: 0.8rem; }
.work-row p { color: #cfcfcf; margin-bottom: 0.8rem; }
.work-row .meta { font-size: 0.8rem; color: #888; margin-bottom: 1rem; }
.work-row.rep { border-top: 0; padding-top: 0; }
@media (max-width: 760px) { .work-row { grid-template-columns: 1fr; gap: 1.2rem; } .work-row.flip .pic { order: 0; } }
.empty { color: #999; padding: 1.4rem 0; }
.pagination { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 2rem; }
.pagination .page-numbers { border: 1px solid var(--border); min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0 0.6rem; }
.pagination .current { border-color: var(--accent); color: var(--accent); }

/* upload */
.uploader { margin-top: 2.4rem; }
.drop { border: 2px dashed var(--accent); background: rgba(200,169,110,0.06); padding: 2.2rem 1.4rem; text-align: center; cursor: pointer; display: grid; gap: 0.4rem; }
.drop strong { color: var(--accent); font-weight: 500; font-size: 1.05rem; }
.drop > span { color: #aaa; font-size: 0.85rem; }
.drop:hover, .drop.over { background: rgba(200,169,110,0.16); }
.stage { display: grid; gap: 1rem; margin-top: 1rem; }
.st-item { display: grid; grid-template-columns: 140px minmax(0,1fr); gap: 1rem; background: var(--surface); border: 1px solid var(--border); padding: 1rem; }
.st-item img { width: 140px; height: 105px; object-fit: cover; background: #000; }
.st-item .f { display: grid; gap: 0.5rem; }
.st-item input, .st-item textarea { min-height: 40px; padding: 0.55rem 0.8rem; }
.st-item .row { display: flex; justify-content: space-between; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.stt { font-size: 0.82rem; color: #aaa; }
.stt.err { color: #f0a0a0; }
.stage-bar { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-top: 1rem; }
.msg { color: #bbb; font-size: 0.88rem; }
@media (max-width: 600px) { .st-item { grid-template-columns: 1fr; } .st-item img { width: 100%; height: 180px; } }

/* ---------- single work ---------- */
.work-single { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(0,1fr); gap: 2.4rem; align-items: start; }
.work-single .pic { background: #050505; display: flex; justify-content: center; }
.work-single .pic img { width: auto; max-width: 100%; max-height: 82vh; display: block; }
.work-single h1 { font-family: 'Cormorant Garamond', Georgia, 'Noto Sans KR', serif; font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 400; color: var(--accent); line-height: 1.2; margin-bottom: 1.2rem; }
.descs { display: flex; flex-direction: column; }
.desc small { display: block; color: var(--accent); font-size: 0.72rem; letter-spacing: 0.2em; margin: 1.2rem 0 0.4rem; }
.desc .txt { color: #dcdcdc; }
.desc.en .txt { color: #a8a8a8; font-style: italic; }
body.en .desc.en { order: -1; }
.work-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; border-top: 1px solid var(--border); padding-top: 1rem; font-size: 0.88rem; }
.work-nav a:hover { color: var(--accent); }
.edit-tools { margin-top: 1.2rem; display: flex; gap: 0.6rem; flex-wrap: wrap; }
@media (max-width: 860px) { .work-single { grid-template-columns: 1fr; } .work-single .pic img { max-height: 70vh; } }

/* comments */
.comments { margin-top: 3rem; border-top: 1px solid var(--border); padding-top: 2rem; max-width: 860px; }
.comments h3 { font-size: 1.1rem; font-weight: 500; margin-bottom: 1rem; color: var(--accent); }
.comment-list { list-style: none; display: grid; gap: 0.9rem; margin-bottom: 2rem; }
.comment-list .children { list-style: none; margin: 0.9rem 0 0 1.6rem; display: grid; gap: 0.9rem; }
.comment-body { background: #141414; border: 1px solid var(--border); padding: 0.9rem 1.1rem; }
.comment-meta { font-size: 0.8rem; color: var(--accent); display: flex; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 0.3rem; }
.comment-meta a { color: #999; }
.comment-content { color: #ddd; font-size: 0.95rem; overflow-wrap: anywhere; }
.comment-content p + p { margin-top: 0.5rem; }
.reply a, .comment-edit-link { font-size: 0.78rem; color: #999; }
.comment-awaiting { font-size: 0.8rem; color: #e8c88a; }
.comment-respond { display: grid; gap: 0.8rem; }
.comment-form { display: grid; gap: 0.9rem; }
.comment-form p { display: grid; gap: 0.35rem; font-size: 0.85rem; color: var(--muted); }
.comment-form-cookies-consent { display: flex !important; gap: 0.5rem; align-items: center; }
.comment-reply-title small { margin-left: 0.8rem; font-size: 0.8rem; }

/* ---------- photo protection ---------- */
.protect { position: relative; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.protect img { -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; pointer-events: none; }
.protect::after { content: ""; position: absolute; inset: 0; z-index: 1; }
@media print { img, .protect { visibility: hidden !important; } }

.site-footer { text-align: center; padding: 3rem 5%; color: var(--muted); font-size: 0.84rem; }
.site-footer .f-logo { color: var(--text); letter-spacing: 0.2em; font-weight: 700; margin-bottom: 0.4rem; }
.tour ul { list-style: none; color: #cfcfcf; font-size: 0.88rem; border-top: 1px solid var(--border); padding-top: 0.8rem; margin-top: auto; }
.tour li::before { content: "— "; color: var(--accent); }
.comment-form label { display: block; }
#exhibition .grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
