/* ==========================================================================
   Human × AI Community — Main Stylesheet
   구조: 0.변수 1.리셋 2.타이포그래피 3.레이아웃 4.헤더 5.히어로
        6.카드/그리드 7.싱글포스트 8.콜라보레이션 로그 9.프로필
        10.검색 11.댓글 12.푸터 13.유틸 14.반응형
   ========================================================================== */

/* 0. 디자인 토큰 ----------------------------------------------------------- */
:root{
  --color-accent:      #5457F5;   /* 포인트 컬러 (Customizer에서 변경 가능) */
  --color-accent-ink:  #ffffff;   /* 포인트 컬러 위 텍스트 */
  --color-bg:          #ffffff;
  --color-bg-soft:     #F7F7F9;   /* 라이트 그레이 */
  --color-bg-card:     #ffffff;
  --color-border:      #E7E7EC;
  --color-text:        #16161A;
  --color-text-soft:   #63636F;
  --color-text-faint:  #9A9AA5;

  --font-base: -apple-system, BlinkMacSystemFont, "Pretendard Variable", Pretendard,
               "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-card: 0 1px 2px rgba(20,20,30,.04), 0 8px 24px rgba(20,20,30,.05);
  --shadow-hover: 0 4px 10px rgba(20,20,30,.06), 0 16px 32px rgba(20,20,30,.08);

  --container: 1160px;
  --gap: 24px;
}

/* 1. 리셋 ------------------------------------------------------------------ */
*, *::before, *::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
body{
  margin:0;
  background:var(--color-bg);
  color:var(--color-text);
  font-family:var(--font-base);
  font-size:16px;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
}
img{ max-width:100%; height:auto; display:block; }
a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; cursor:pointer; }
ul{ list-style:none; margin:0; padding:0; }
h1,h2,h3,h4{ line-height:1.25; margin:0 0 .5em; font-weight:700; letter-spacing:-0.02em; }
p{ margin:0 0 1em; }
:focus-visible{ outline:2px solid var(--color-accent); outline-offset:2px; }

/* 2. 타이포그래피 ----------------------------------------------------------- */
.eyebrow{
  display:inline-block;
  font-size:12px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--color-accent);
}
.text-soft{ color:var(--color-text-soft); }
.text-faint{ color:var(--color-text-faint); font-size:13px; }

/* 3. 레이아웃 --------------------------------------------------------------- */
.wrap{
  max-width:var(--container);
  margin:0 auto;
  padding:0 24px;
}
.site-main{ padding:48px 0 96px; }
.skip-link{
  position:absolute; left:-9999px; top:auto;
  background:var(--color-text); color:#fff; padding:12px 20px;
  border-radius:var(--radius-sm); z-index:999;
}
.skip-link:focus{ left:16px; top:16px; }

/* 4. 헤더 ------------------------------------------------------------------- */
.site-header{
  position:sticky; top:0; z-index:50;
  background:rgba(255,255,255,.85);
  backdrop-filter:saturate(180%) blur(12px);
  border-bottom:1px solid var(--color-border);
}
.header-inner{
  display:flex; align-items:center; gap:28px;
  height:72px;
}
.site-branding{ display:flex; align-items:center; gap:10px; margin-right:auto; }
.site-branding .logo-mark{
  font-weight:800; font-size:17px; letter-spacing:-0.02em;
  display:flex; align-items:baseline; gap:2px;
}
.site-branding .logo-mark span{ color:var(--color-accent); }
.site-branding .logo-sub{
  font-size:12px; color:var(--color-text-faint);
  border-left:1px solid var(--color-border);
  padding-left:10px; display:none;
}
@media(min-width:640px){ .site-branding .logo-sub{ display:inline; } }

.main-navigation{ display:none; }
.main-navigation ul{ display:flex; gap:4px; }
.main-navigation a{
  display:inline-block;
  padding:8px 14px;
  font-size:14px; font-weight:600;
  color:var(--color-text-soft);
  border-radius:999px;
  transition:background .15s ease, color .15s ease;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a{
  background:var(--color-bg-soft);
  color:var(--color-text);
}
@media(min-width:960px){ .main-navigation{ display:block; } }

.header-actions{ display:flex; align-items:center; gap:10px; }
.header-search-toggle,
.menu-toggle{
  width:38px; height:38px; border-radius:999px;
  border:1px solid var(--color-border); background:#fff;
  display:flex; align-items:center; justify-content:center;
}
.header-search-toggle:hover, .menu-toggle:hover{ background:var(--color-bg-soft); }
@media(min-width:960px){ .menu-toggle{ display:none; } }

.btn{
  -webkit-appearance:none; appearance:none;
  display:inline-flex; align-items:center; justify-content:center;
  padding:9px 18px; border-radius:999px;
  font-size:14px; font-weight:700;
  border:1px solid var(--color-border);
  background:#fff; color:var(--color-text);
  transition:transform .12s ease, box-shadow .12s ease, background .12s ease;
  white-space:nowrap;
  cursor:pointer;
  opacity:1;
  text-decoration:none;
}
.btn:hover{ background:var(--color-bg-soft); }
.btn-primary{
  background:var(--color-accent); border-color:var(--color-accent); color:var(--color-accent-ink);
  opacity:1;
  /* 포인트 컬러를 흰색/아주 밝은 색으로 바꿔도 배경과 완전히 섞여 사라지지 않도록,
     색상과 무관하게 항상 옅은 테두리+그림자를 깔아둡니다. */
  box-shadow: 0 0 0 1px rgba(22,22,26,.10), 0 1px 3px rgba(22,22,26,.10);
}
.btn-primary:hover{ box-shadow:var(--shadow-hover); transform:translateY(-1px); background:var(--color-accent); }
.btn-ghost{ border-color:transparent; background:transparent; }
.btn-ghost:hover{ background:var(--color-bg-soft); }
.btn-sm{ padding:6px 14px; font-size:13px; }

/* input[type=submit]도 .btn 스타일을 그대로 따르도록 (댓글 폼 제출 버튼 등) */
input[type="submit"].btn,
#submit.btn{
  -webkit-appearance:none; appearance:none;
  box-shadow:none;
  font-family:inherit;
}

.header-search-panel{
  display:none; border-top:1px solid var(--color-border);
  padding:16px 0;
}
.header-search-panel.is-open{ display:block; }

.mobile-nav{
  display:none;
  border-top:1px solid var(--color-border);
  padding:8px 0 18px;
}
.mobile-nav.is-open{ display:block; }
.mobile-nav a{
  display:block; padding:12px 4px; font-weight:600;
  border-bottom:1px solid var(--color-border);
}
@media(min-width:960px){ .mobile-nav{ display:none !important; } }

/* 5. 히어로 ------------------------------------------------------------------ */
.hero{
  padding:72px 0 56px;
  text-align:center;
  background:
    radial-gradient(60% 100% at 50% 0%, color-mix(in srgb, var(--color-accent) 7%, transparent), transparent 70%),
    var(--color-bg);
}
.hero-title{
  font-size:clamp(34px, 6vw, 64px);
  margin:0 0 18px;
}
.hero-title .cross{ color:var(--color-accent); }
.hero-lede{
  max-width:560px; margin:0 auto 8px;
  font-size:18px; color:var(--color-text-soft);
}
.hero-tagline{
  font-size:15px; color:var(--color-text-faint);
  margin-bottom:32px;
}
.hero-cta{ display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }
.hero-cta .btn{ padding:13px 26px; font-size:15px; }

.hero-video-slider{ max-width:var(--container); margin:0 auto 32px; }
.hero-video-track{
  position:relative;
  width:100%;
  aspect-ratio:16/9;
  border-radius:var(--radius-lg);
  overflow:hidden;
  box-shadow:var(--shadow-card);
  background:var(--color-bg-soft);
}
.hero-video-slide{
  position:absolute;
  inset:0;
  opacity:0;
  visibility:hidden;
  transition:opacity .4s ease;
  pointer-events:none;
}
.hero-video-slide.is-active{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  z-index:1;
}
.hero-video-embed,
.hero-video-embed iframe{
  display:block;
  width:100%;
  height:100%;
  border:0;
}
.hero-video-caption{ margin-top:10px; font-size:13px; text-align:center; }
.hero-video-caption a:hover{ color:var(--color-accent); }
.hero-video-dots{
  display:flex;
  justify-content:center;
  gap:8px;
  margin-top:14px;
}
.hero-video-dot{
  width:8px; height:8px; border-radius:999px;
  border:none; padding:0;
  background:var(--color-border);
  cursor:pointer;
  transition:background .15s ease, transform .15s ease;
}
.hero-video-dot:hover{ background:var(--color-text-faint); }
.hero-video-dot.is-active{ background:var(--color-accent); transform:scale(1.2); }

/* 6. 카드 / 그리드 ------------------------------------------------------------ */
.section-head{
  display:flex; align-items:baseline; justify-content:space-between;
  gap:16px; margin-bottom:20px; flex-wrap:wrap;
}
.section-head h2{ font-size:22px; margin:0; }

.card-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(260px, 1fr));
  gap:var(--gap);
}
.card-grid.masonry{
  columns:1;
  column-gap:var(--gap);
}
@media(min-width:640px){ .card-grid.masonry{ columns:2; } }
@media(min-width:960px){ .card-grid.masonry{ columns:3; } }
.card-grid.masonry .post-card{ break-inside:avoid; margin-bottom:var(--gap); }

.post-card{
  display:flex; flex-direction:column;
  background:var(--color-bg-card);
  border:1px solid var(--color-border);
  border-radius:var(--radius-lg);
  overflow:hidden;
  transition:box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.post-card:hover{
  box-shadow:var(--shadow-hover);
  transform:translateY(-2px);
  border-color:transparent;
}
.post-card-thumb{
  aspect-ratio:16/10; overflow:hidden; background:var(--color-bg-soft);
  position:relative;
}
.post-card-thumb img{ width:100%; height:100%; object-fit:cover; }
.post-card-thumb .no-thumb{
  width:100%; height:100%; display:flex; align-items:center; justify-content:center;
  color:var(--color-text-faint); font-size:13px;
}
.post-card-body{ padding:18px 18px 16px; display:flex; flex-direction:column; gap:10px; flex:1; }
.post-card-meta-top{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.tag-pill{
  display:inline-flex; align-items:center; gap:5px;
  font-size:11px; font-weight:700; letter-spacing:.03em; text-transform:uppercase;
  padding:4px 9px; border-radius:999px;
  background:var(--color-bg-soft); color:var(--color-text-soft);
}
.tag-pill.tool{ background:color-mix(in srgb, var(--color-accent) 12%, white); color:var(--color-accent); }
.post-card-title{ font-size:17px; margin:0; }
.post-card-title a:hover{ color:var(--color-accent); }
.post-card-excerpt{ font-size:14px; color:var(--color-text-soft); margin:0; }
.post-card-foot{
  margin-top:auto; padding-top:10px;
  display:flex; align-items:center; justify-content:space-between;
  font-size:13px; color:var(--color-text-faint);
}
.post-card-author{ display:flex; align-items:center; gap:8px; }
.post-card-author img{ width:22px; height:22px; border-radius:999px; }
.post-card-stats{ display:flex; gap:12px; }
.post-card-stats span{ display:inline-flex; align-items:center; gap:4px; }

.load-more-wrap{ text-align:center; margin-top:40px; }

/* 7. 싱글 포스트 -------------------------------------------------------------- */
.single-post{ max-width:760px; margin:0 auto; }
.single-post-header{ margin-bottom:28px; }
.single-post-meta{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  margin-bottom:16px;
}
.single-post-title{ font-size:clamp(26px, 4vw, 38px); }
.single-post-byline{
  display:flex; align-items:center; gap:10px;
  padding:16px 0; margin:16px 0 28px;
  border-top:1px solid var(--color-border);
  border-bottom:1px solid var(--color-border);
}
.single-post-byline img{ width:40px; height:40px; border-radius:999px; }
.single-post-thumb{
  margin-bottom:32px; border-radius:var(--radius-lg); overflow:hidden;
  background:var(--color-bg-soft);
}
.entry-content{ font-size:17px; }
.entry-content h2{ font-size:24px; margin-top:1.6em; }
.entry-content h3{ font-size:20px; margin-top:1.4em; }
.entry-content p{ margin-bottom:1.2em; }
.entry-content img, .entry-content video, .entry-content audio, .entry-content iframe{
  border-radius:var(--radius-md); margin:1.4em 0;
}
.entry-content blockquote{
  margin:1.6em 0; padding:4px 0 4px 20px;
  border-left:3px solid var(--color-accent);
  color:var(--color-text-soft); font-style:italic;
}
.entry-content pre{
  background:var(--color-bg-soft); padding:18px; border-radius:var(--radius-md);
  overflow:auto; font-family:var(--font-mono); font-size:14px;
}
.entry-content code{ font-family:var(--font-mono); font-size:.92em; }

.single-post-footer{
  display:flex; align-items:center; justify-content:space-between;
  margin-top:36px; padding-top:20px; border-top:1px solid var(--color-border);
  flex-wrap:wrap; gap:12px;
}
.post-tags{ display:flex; gap:8px; flex-wrap:wrap; }

.related-projects{ margin-top:56px; }

/* 8. AI Collaboration Log --------------------------------------------------- */
.collab-log{
  margin:40px 0; padding:28px;
  background:var(--color-bg-soft); border-radius:var(--radius-lg);
}
.collab-log-title{ font-size:16px; margin-bottom:24px; display:flex; align-items:center; gap:8px; }
.collab-timeline{ position:relative; padding-left:28px; }
.collab-timeline::before{
  content:""; position:absolute; left:9px; top:6px; bottom:6px; width:2px;
  background:var(--color-border);
}
.collab-step{ position:relative; padding-bottom:26px; }
.collab-step:last-child{ padding-bottom:0; }
.collab-step::before{
  content:""; position:absolute; left:-28px; top:2px;
  width:20px; height:20px; border-radius:999px; border:3px solid var(--color-bg-soft);
  background:var(--color-text-faint);
}
.collab-step.is-human::before{ background:var(--color-accent); }
.collab-step.is-ai::before{ background:var(--color-text); }
.collab-step.is-result::before{ background:#16A34A; }
.collab-step-label{
  font-size:11px; font-weight:800; letter-spacing:.06em; text-transform:uppercase;
  color:var(--color-text-faint); margin-bottom:4px;
}
.collab-step.is-human .collab-step-label{ color:var(--color-accent); }
.collab-step-body{ font-size:14.5px; }

/* 9. 프로필 ------------------------------------------------------------------ */
.profile-header{
  display:flex; align-items:center; gap:24px; flex-wrap:wrap;
  padding:36px 0; border-bottom:1px solid var(--color-border); margin-bottom:36px;
}
.profile-avatar img{ width:96px; height:96px; border-radius:999px; }
.profile-name{ font-size:26px; margin-bottom:4px; }
.profile-bio{ color:var(--color-text-soft); max-width:520px; }
.profile-stats{ display:flex; gap:22px; margin-top:14px; }
.profile-stats div{ font-size:13px; color:var(--color-text-faint); }
.profile-stats strong{ display:block; font-size:18px; color:var(--color-text); }
.profile-tools{ display:flex; gap:8px; flex-wrap:wrap; margin-top:14px; }
.profile-tabs{ display:flex; gap:6px; margin-bottom:24px; border-bottom:1px solid var(--color-border); }
.profile-tabs a{
  padding:10px 4px; margin-right:18px; font-weight:600; font-size:14px;
  color:var(--color-text-faint); border-bottom:2px solid transparent;
}
.profile-tabs a.is-active{ color:var(--color-text); border-color:var(--color-accent); }

/* 10. 검색 -------------------------------------------------------------------- */
.search-form{ display:flex; gap:8px; }
.search-form input[type="search"]{
  flex:1; padding:11px 16px; border:1px solid var(--color-border);
  border-radius:999px; font-size:14px; background:var(--color-bg-soft);
}
.search-form input[type="search"]:focus{ background:#fff; }
.search-results-summary{ margin-bottom:24px; color:var(--color-text-soft); }

/* 11. 댓글 -------------------------------------------------------------------- */
.comments-area{ margin-top:56px; }
.comments-title{ font-size:19px; margin-bottom:20px; }
.comment-list{ display:flex; flex-direction:column; gap:20px; }
.comments-title.is-empty,
.comment-list.is-empty{ display:none; }
.comment-list .comment-item.is-new{ animation: hai-comment-in .4s ease; }
@keyframes hai-comment-in{
	from{ opacity:0; transform: translateY(6px); }
	to{ opacity:1; transform: translateY(0); }
}
.comment-form-feedback{ font-size:14px; margin:8px 0; min-height:1.4em; }
.comment-form-feedback.is-sending{ color:#8A8A93; }
.comment-form-feedback.is-success{ color:#2E9E5B; }
.comment-form-feedback.is-pending{ color:#B98900; }
.comment-form-feedback.is-error{ color:#D64545; }
#hai-commentform #submit:disabled{ opacity:.6; cursor:default; }
.comment-body{ display:flex; gap:12px; }
.comment-body img{ width:36px; height:36px; border-radius:999px; flex-shrink:0; }
.comment-meta b{ font-size:14px; }
.comment-meta time{ font-size:12px; color:var(--color-text-faint); margin-left:8px; }
.comment-content{ font-size:14.5px; margin-top:4px; }
.comment-respond{
  margin-top:32px; padding:22px; background:var(--color-bg-soft); border-radius:var(--radius-lg);
}
.comment-form input:not([type="submit"]), .comment-form textarea, .comment-form select{
  width:100%; padding:11px 14px; border:1px solid var(--color-border);
  border-radius:var(--radius-sm); font-family:inherit; font-size:14px; margin-bottom:10px;
  background:#fff;
}
.comment-form textarea{ min-height:110px; resize:vertical; }
.comment-form-persona{
  background:var(--color-bg-card);
  border:1px dashed var(--color-border);
  border-radius:var(--radius-sm);
  padding:12px 14px;
  margin-bottom:14px;
}
.comment-form-persona label{ display:block; font-size:13px; font-weight:600; margin-bottom:6px; }
.comment-form-persona select{ margin-bottom:0; }

/* 11-b. 로그인 · 회원가입 (HUMAN × AI 브랜드 화면) --------------------------- */
.hai-auth-wrap{ max-width:420px; margin:0 auto; padding:48px 0 64px; }
.hai-auth-tabs{
  display:flex; justify-content:center; gap:4px;
  margin:24px 0 20px;
  background:var(--color-bg-soft);
  border-radius:999px; padding:4px;
}
.hai-auth-tabs a{
  flex:1; text-align:center;
  padding:9px 0; border-radius:999px;
  font-size:14px; font-weight:700;
  color:var(--color-text-soft);
}
.hai-auth-tabs a.is-active{ background:#fff; color:var(--color-text); box-shadow:var(--shadow-card); }
.hai-auth-card{
  background:var(--color-bg-card);
  border:1px solid var(--color-border);
  border-radius:var(--radius-lg);
  padding:28px;
}
.hai-auth-form p{ margin-bottom:14px; }
.hai-auth-form label{ display:block; font-size:13px; font-weight:600; margin-bottom:6px; color:var(--color-text-soft); }
.hai-auth-form input[type="text"],
.hai-auth-form input[type="email"],
.hai-auth-form input[type="password"]{
  width:100%; padding:11px 14px;
  border:1px solid var(--color-border); border-radius:10px;
  font-family:inherit; font-size:14px;
  background:#fff;
}
.hai-auth-form input:focus{ outline:2px solid var(--color-accent); outline-offset:1px; }

/* 12. 푸터 -------------------------------------------------------------------- */
.site-footer{
  border-top:1px solid var(--color-border);
  padding:48px 0; margin-top:64px;
  background:var(--color-bg-soft);
}
.footer-inner{ display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:16px; }
.footer-tagline{ font-size:13px; color:var(--color-text-faint); }
.footer-widgets{ display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:24px; margin-bottom:32px; }

/* 13. 유틸 -------------------------------------------------------------------- */
.empty-state{ text-align:center; padding:80px 20px; color:var(--color-text-soft); }
.pagination{ display:flex; justify-content:center; margin-top:44px; }
.pagination .nav-links{
  display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:6px; width:100%;
}
.pagination a, .pagination span{
  min-width:36px; height:36px; display:inline-flex; align-items:center; justify-content:center;
  border-radius:999px; border:1px solid var(--color-border); font-size:13px; font-weight:600;
}
.pagination .current{ background:var(--color-accent); border-color:var(--color-accent); color:#fff; }
.alignwide{ max-width:960px; margin-left:auto; margin-right:auto; }
.alignfull{ width:100%; max-width:none; }
.screen-reader-text{
  position:absolute !important; clip:rect(1px,1px,1px,1px);
  width:1px; height:1px; overflow:hidden;
}

/* 14. 반응형 ------------------------------------------------------------------ */
@media(max-width:639px){
  .wrap{ padding:0 18px; }
  .hero{ padding:52px 0 40px; }
  .site-main{ padding:32px 0 64px; }
  .profile-header{ flex-direction:column; align-items:flex-start; text-align:left; }
}
