/*
Theme Name: 효성집수리 블로그
Theme URI: https://hsmwk.kr
Author: 효성집수리
Author URI: https://hyosungmwk.github.io/hyozipsuri/
Description: 왼쪽 프로필과 오른쪽 글 카드로 구성된 효성집수리 전용 블로그 테마. 전기·목공 시공 후기용.
Version: 1.0.2
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: hyosung-blog
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, two-columns, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

:root {
  --ink: #1c1612;
  --muted: #6b5d52;
  --wood: #8b5e3c;
  --wood-dark: #3d2a1c;
  --cream: #f6efe6;
  --paper: #fffbf6;
  --line: rgba(61, 42, 28, 0.12);
  --copper: #c4784a;
  --sage: #4f5d4e;
  --shadow: 0 16px 40px rgba(28, 22, 18, 0.08);
  --radius: 22px;
  --sidebar: 268px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 480px at 10% -10%, rgba(196, 120, 74, 0.08), transparent 60%),
    var(--cream);
  line-height: 1.7;
  letter-spacing: -0.02em;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--wood);
}

a:hover {
  color: var(--copper);
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 40;
  background: #fff;
  padding: 8px 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 28px;
  padding-top: max(12px, env(safe-area-inset-top));
  background: rgba(246, 239, 230, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--wood-dark);
}

.header-brand img,
.header-brand .header-icon {
  height: 42px;
  width: 42px;
  object-fit: cover;
  border-radius: 12px;
  background: #fff;
}

.header-brand span {
  font-weight: 800;
  font-size: 1.12rem;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-toggle,
.menu-toggle {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 12px;
  cursor: pointer;
  color: var(--wood-dark);
}

.header-search {
  display: none;
}

.site-header.search-open .header-search {
  display: block;
  position: absolute;
  left: 16px;
  right: 16px;
  top: 100%;
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0 0 16px 16px;
  box-shadow: var(--shadow);
}

.search-form {
  display: flex;
  gap: 8px;
}

.search-form input[type="search"] {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  background: var(--cream);
}

.search-form button {
  border: 0;
  background: var(--wood-dark);
  color: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

.menu-toggle {
  display: none;
}

.shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  gap: 28px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 64px;
}

.profile {
  position: sticky;
  top: 86px;
  align-self: start;
}

.profile-card {
  background: var(--paper);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 22px 18px 18px;
  border: 1px solid var(--line);
}

.profile-photo {
  width: 148px;
  height: 148px;
  margin: 0 auto 14px;
  border-radius: 22px;
  overflow: hidden;
  background: #ead9c4;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-kicker {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.profile-name {
  margin: 2px 0 8px;
  text-align: center;
  font-size: 1.28rem;
  color: var(--wood-dark);
}

.profile-intro {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.88rem;
  white-space: pre-wrap;
}

.profile-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.profile-nav a {
  display: block;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 10px 12px;
  border-radius: 12px;
}

.profile-nav .current-menu-item > a,
.profile-nav a:hover {
  background: var(--wood-dark);
  color: #fff;
}

.profile-meta {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
  color: var(--muted);
}

.profile-meta a {
  color: var(--wood-dark);
  font-weight: 800;
  text-decoration: none;
}

.profile-actions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.widget {
  margin-top: 14px;
  padding: 12px;
  box-shadow: none;
}

.post-grid:empty {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 800;
  font-size: 0.9rem;
}

.btn-primary {
  background: var(--wood-dark);
  color: #fff;
}

.btn-ghost {
  background: var(--cream);
  color: var(--wood-dark);
  border: 1px solid var(--line);
}

.content h1,
.content h2 {
  color: var(--wood-dark);
  letter-spacing: -0.03em;
}

.page-title {
  margin: 0 0 18px;
  font-size: 1.5rem;
}

.hero-card,
.hero-slider,
.post-card,
.entry,
.widget {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-slider {
  position: relative;
  overflow: hidden;
  margin-bottom: 22px;
  background: #3d2a1c;
}

.hero-track {
  position: relative;
  aspect-ratio: 16 / 9;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.hero-slide a {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.hero-slide .thumb {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #d7c0a6, #8b5e3c);
}

.hero-slide .thumb img,
.post-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px 64px 48px;
  background: linear-gradient(180deg, transparent 28%, rgba(28, 22, 18, 0.78) 100%);
  color: #fff;
}

.hero-overlay .meta,
.hero-overlay .excerpt {
  color: rgba(255, 251, 246, 0.86);
}

.hero-overlay h2 {
  margin: 8px 0;
  color: #fff;
  font-size: clamp(1.2rem, 2.4vw, 1.85rem);
  line-height: 1.35;
}

.hero-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: rgba(255, 251, 246, 0.92);
  color: var(--wood-dark);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.hero-nav.prev {
  left: 14px;
}

.hero-nav.next {
  right: 14px;
}

.hero-slider.is-single .hero-nav,
.hero-slider.is-single .hero-dots {
  display: none;
}

.hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.hero-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 251, 246, 0.45);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 22px;
  background: #fff;
}

.hero-body,
.entry {
  padding: 22px;
}

.profile-close,
.profile-backdrop {
  display: none;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.hero-body h2,
.post-card h2 {
  margin: 8px 0 8px;
  font-size: 1.35rem;
  line-height: 1.35;
}

.excerpt {
  margin: 0;
  color: var(--muted);
}

.post-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.post-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.post-card a {
  text-decoration: none;
  color: inherit;
}

.post-card .thumb {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #d7c0a6, #c4784a);
}

.post-card .body {
  padding: 14px 14px 16px;
}

.post-card h2 {
  font-size: 1.05rem;
}

.pagination {
  margin-top: 28px;
}

.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  min-width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
}

.pagination .current {
  background: var(--wood-dark);
  color: #fff;
}

.entry-cover {
  border-radius: 22px 22px 0 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #ead9c4;
}

.entry-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.entry-content {
  font-size: 1.02rem;
}

.entry-content p {
  margin: 0 0 1em;
}

.entry-content img {
  border-radius: 16px;
}

.entry-content h2,
.entry-content h3 {
  margin: 1.4em 0 0.5em;
}

.entry-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.post-nav a {
  display: block;
  padding: 14px;
  background: var(--cream);
  border-radius: 16px;
  text-decoration: none;
  color: var(--wood-dark);
  font-weight: 700;
}

.comments {
  margin-top: 22px;
  padding: 22px;
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comment {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--cream);
}

.site-footer {
  text-align: center;
  padding: 28px 16px 40px;
  color: var(--muted);
  font-size: 0.86rem;
}

.empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 900px) {
  .menu-toggle,
  .profile-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .shell {
    grid-template-columns: 1fr;
    padding: 12px 12px 48px;
  }

  html,
  body {
    overflow-x: hidden;
  }

  .profile-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    border: 0;
    background: rgba(28, 22, 18, 0.46);
  }

  body.profile-open {
    overflow: hidden;
  }

  body.profile-open .profile-backdrop {
    display: block;
  }

  .profile {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 45;
    width: min(320px, 88vw);
    padding: 16px 12px 24px;
    overflow: auto;
    background: var(--cream);
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    visibility: hidden;
    pointer-events: none;
  }

  body.profile-open .profile {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .profile-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: var(--wood-dark);
    font-size: 1.6rem;
    cursor: pointer;
  }

  .profile-nav {
    display: flex;
  }

  .hero-overlay {
    padding: 20px 52px 36px;
  }

  .hero-nav {
    width: 38px;
    height: 38px;
    font-size: 1.35rem;
  }

  .hero-nav.prev {
    left: 8px;
  }

  .hero-nav.next {
    right: 8px;
  }

  .post-grid,
  .post-nav {
    grid-template-columns: 1fr;
  }

  .site-header {
    padding-left: 14px;
    padding-right: 14px;
  }
}
