/*
Theme Name: Hwansang
Theme URI: https://hwansang.blog
Author: Hwansang
Description: A minimal, zen journal theme for interior and architectural design, with a built-in English / Korean language switch and dedicated ad areas.
Version: 1.1.2
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hwansang
Tags: blog, one-column, two-columns, right-sidebar, custom-menu, featured-images, translation-ready, threaded-comments
*/

:root {
  --hw-bg: #f7f5f0;
  --hw-fg: #2a2724;
  --hw-muted-bg: #efece5;
  --hw-muted-fg: #6f6a63;
  --hw-accent: #5b6e57;
  --hw-border: #e3dfd6;
  --hw-sans: "Inter", "Noto Sans KR", ui-sans-serif, system-ui, sans-serif;
  --hw-serif: "Cormorant Garamond", ui-serif, Georgia, serif;
  --hw-max: 72rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--hw-bg);
  color: var(--hw-fg);
  font-family: var(--hw-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

html[lang="ko"] body,
html[lang="ko-KR"] body {
  word-break: keep-all;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--hw-accent);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

p {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.skip-link:focus {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  width: auto;
  height: auto;
  clip: auto;
  padding: 0.5rem 1rem;
  background: var(--hw-fg);
  color: var(--hw-bg);
}

.hw-container {
  max-width: var(--hw-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hw-eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--hw-muted-fg);
}

.hw-eyebrow--accent {
  color: var(--hw-accent);
}

.hw-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--hw-muted-fg);
}

.hw-wordmark {
  font-family: var(--hw-serif);
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* Header */
.hw-header {
  border-bottom: 1px solid var(--hw-border);
}

.hw-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.hw-header__brand {
  font-size: 1.875rem;
  line-height: 1;
}

.hw-nav ul {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.hw-nav a {
  font-size: 0.875rem;
  color: var(--hw-muted-fg);
  transition: color 0.2s ease;
}

.hw-nav a:hover,
.hw-nav .current-menu-item > a,
.hw-nav .current-cat > a {
  color: var(--hw-fg);
}

.hw-header__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hw-menu-toggle {
  display: none;
  padding: 0.25rem;
  background: none;
  border: 0;
  color: var(--hw-fg);
  cursor: pointer;
}

.hw-mobile-nav {
  display: none;
  border-top: 1px solid var(--hw-border);
}

.hw-mobile-nav.is-open {
  display: block;
}

.hw-mobile-nav ul {
  padding: 1rem 1.5rem;
}

.hw-mobile-nav a {
  display: block;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: var(--hw-muted-fg);
}

@media (max-width: 767px) {
  .hw-nav {
    display: none;
  }
  .hw-menu-toggle {
    display: inline-flex;
  }
}

/* Language switch */
.hw-lang {
  display: flex;
  align-items: center;
  padding: 2px;
  border: 1px solid var(--hw-border);
  border-radius: 999px;
}

.hw-lang button,
.hw-lang a {
  padding: 0.25rem 0.75rem;
  border: 0;
  border-radius: 999px;
  background: none;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--hw-muted-fg);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.hw-lang button:hover,
.hw-lang a:hover {
  color: var(--hw-fg);
}

.hw-lang [aria-pressed="true"],
.hw-lang .is-current {
  background: var(--hw-fg);
  color: var(--hw-bg);
}

.hw-lang [aria-pressed="true"]:hover,
.hw-lang .is-current:hover {
  color: var(--hw-bg);
}

/* Intro */
.hw-intro {
  padding-top: 4rem;
  padding-bottom: 3rem;
}

.hw-intro__title {
  font-size: 4.5rem;
  line-height: 1;
  letter-spacing: -0.025em;
}

.hw-intro__tagline {
  max-width: 36rem;
  margin-top: 1.5rem;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--hw-muted-fg);
}

@media (min-width: 768px) {
  .hw-intro {
    padding-top: 6rem;
  }
  .hw-intro__title {
    font-size: 8rem;
  }
}

/* Ads */
.hw-ad-row {
  display: flex;
  justify-content: center;
  padding-bottom: 4rem;
}

.hw-ad {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.hw-ad__label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--hw-muted-fg);
}

.hw-ad__body {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  overflow: hidden;
}

.hw-ad--leaderboard .hw-ad__body {
  max-width: 728px;
  min-height: 90px;
}

.hw-ad--rectangle .hw-ad__body {
  max-width: 300px;
  min-height: 250px;
}

.hw-ad--infeed .hw-ad__body {
  min-height: 8rem;
}

.hw-ad__placeholder {
  border: 1px dashed var(--hw-border);
  border-radius: 2px;
  background: rgba(239, 236, 229, 0.6);
  font-size: 0.75rem;
  color: var(--hw-muted-fg);
  text-align: center;
  padding: 0.5rem;
}

.hw-ad .widget {
  width: 100%;
}

/* Featured */
.hw-featured {
  display: grid;
  gap: 2.5rem;
  padding-bottom: 5rem;
}

.hw-featured__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 2px;
  background: var(--hw-muted-bg);
}

.hw-featured__media img,
.hw-row__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hw-featured__body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hw-featured__title {
  font-size: 1.875rem;
  line-height: 1.2;
  text-wrap: balance;
}

.hw-featured__title a:hover,
.hw-row__title a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hw-excerpt {
  line-height: 1.7;
  color: var(--hw-muted-fg);
  text-wrap: pretty;
}

.hw-readmore {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.hw-readmore svg {
  transition: transform 0.2s ease;
}

.hw-readmore:hover svg {
  transform: translateX(4px);
}

@media (min-width: 768px) {
  .hw-featured {
    grid-template-columns: 3fr 2fr;
    align-items: center;
  }
  .hw-featured__title {
    font-size: 2.25rem;
  }
}

/* Business guide */
.hw-guide {
  border-top: 1px solid var(--hw-border);
  border-bottom: 1px solid var(--hw-border);
  background: rgba(239, 236, 229, 0.5);
}

.hw-guide__inner {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.hw-guide__head {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 36rem;
  margin-bottom: 3rem;
}

.hw-guide__title {
  font-size: 1.875rem;
}

.hw-guide__steps {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--hw-border);
  border-radius: 2px;
  background: var(--hw-border);
}

.hw-guide__step {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--hw-bg);
}

.hw-guide__num {
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--hw-accent);
}

.hw-guide__step h3 {
  font-size: 1rem;
  line-height: 1.4;
}

.hw-guide__step p {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--hw-muted-fg);
}

@media (min-width: 640px) {
  .hw-guide__steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .hw-guide__steps {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* Content + sidebar layout */
.hw-layout {
  display: grid;
  gap: 4rem;
  padding-top: 5rem;
  padding-bottom: 5rem;
}

@media (min-width: 1024px) {
  .hw-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

/* Post list */
.hw-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.hw-list__items > li {
  padding: 2rem 0;
  border-top: 1px solid var(--hw-border);
}

.hw-list__items > li:first-child {
  padding-top: 0;
  border-top: 0;
}

.hw-row {
  display: grid;
  gap: 1.5rem;
}

.hw-row__media {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 2px;
  background: var(--hw-muted-bg);
}

.hw-row__body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hw-row__title {
  font-size: 1.25rem;
  line-height: 1.35;
}

.hw-row .hw-excerpt {
  font-size: 0.875rem;
}

@media (min-width: 640px) {
  .hw-row {
    grid-template-columns: 200px 1fr;
    align-items: start;
  }
  .hw-row--no-media {
    grid-template-columns: 1fr;
  }
}

.hw-pagination {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--hw-border);
  font-size: 0.875rem;
}

.hw-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hw-pagination .page-numbers {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  color: var(--hw-muted-fg);
}

.hw-pagination .page-numbers.current {
  background: var(--hw-fg);
  color: var(--hw-bg);
}

/* Sidebar */
.hw-sidebar {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.hw-sidebar section,
.hw-sidebar .widget {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hw-sidebar .widget-title,
.hw-sidebar h2 {
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--hw-muted-fg);
}

.hw-sidebar__about {
  font-size: 0.875rem;
  line-height: 1.7;
  color: rgba(42, 39, 36, 0.8);
}

.hw-topics li {
  border-bottom: 1px solid var(--hw-border);
}

.hw-topics li:last-child {
  border-bottom: 0;
}

.hw-topics a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  font-size: 0.875rem;
  color: rgba(42, 39, 36, 0.8);
}

.hw-topics a:hover {
  color: var(--hw-fg);
}

.hw-topics span {
  font-size: 0.75rem;
  color: var(--hw-muted-fg);
}

.hw-newsletter {
  padding: 1.5rem;
  border-radius: 2px;
  background: var(--hw-muted-bg);
}

.hw-sidebar .hw-newsletter h2 {
  font-size: 1rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--hw-fg);
}

.hw-newsletter p {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--hw-muted-fg);
}

.hw-newsletter input[type="email"],
.hw-search input[type="search"] {
  width: 100%;
  height: 2.5rem;
  padding: 0 0.75rem;
  border: 1px solid var(--hw-border);
  border-radius: 2px;
  background: var(--hw-bg);
  font: inherit;
  font-size: 0.875rem;
  color: var(--hw-fg);
}

.hw-newsletter button,
.hw-newsletter input[type="submit"],
.hw-newsletter .wp-block-button__link,
.hw-search button {
  width: 100%;
  height: 2.5rem;
  margin-top: 0.5rem;
  border: 0;
  border-radius: 2px;
  background: var(--hw-fg);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--hw-bg);
  cursor: pointer;
}

/* Subscribe form: Jetpack adds its own sizing, so force the field and button to match. */
.hw-newsletter form,
.hw-newsletter .wp-block-jetpack-subscriptions__container,
.hw-newsletter .wp-block-jetpack-subscriptions__form-elements {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  margin: 0;
  padding: 0;
}

.hw-newsletter input[type="email"],
.hw-newsletter input[type="text"],
.hw-newsletter button,
.hw-newsletter input[type="submit"],
.hw-newsletter .wp-block-button,
.hw-newsletter .wp-block-button__link {
  box-sizing: border-box !important;
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: 2.5rem !important;
  min-height: 2.5rem;
  margin: 0 !important;
  padding: 0 0.75rem !important;
  line-height: 2.5rem;
  text-align: center;
}

.hw-newsletter input[type="email"],
.hw-newsletter input[type="text"] {
  text-align: left;
}

.hw-newsletter .wp-block-button {
  padding: 0 !important;
}

.hw-newsletter .wp-block-button__link {
  line-height: 2.5rem;
  border-radius: 2px;
}

@media (min-width: 1024px) {
  .hw-sidebar__sticky {
    position: sticky;
    top: 2rem;
  }
}

/* Single post / page */
.hw-article {
  max-width: 44rem;
}

.hw-article__header {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.hw-article__title {
  font-size: 2.25rem;
  line-height: 1.15;
  text-wrap: balance;
}

@media (min-width: 768px) {
  .hw-article__title {
    font-size: 3rem;
  }
}

.hw-article__thumb {
  margin-bottom: 2.5rem;
  overflow: hidden;
  border-radius: 2px;
  background: var(--hw-muted-bg);
}

.hw-content {
  font-size: 1.0625rem;
  line-height: 1.85;
}

.hw-content > * + * {
  margin-top: 1.5em;
}

.hw-content h2 {
  margin-top: 2.5em;
  font-size: 1.625rem;
}

.hw-content h3 {
  margin-top: 2em;
  font-size: 1.25rem;
}

.hw-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--hw-accent);
}

.hw-content ul {
  list-style: disc;
  padding-left: 1.25rem;
}

.hw-content ol {
  list-style: decimal;
  padding-left: 1.25rem;
}

/* Bullets and numbers in post content (also shown inside the WordPress editor). */
ul.wp-block-list,
.hw-content ul {
  list-style: disc;
  padding-left: 1.25rem;
}

ol.wp-block-list,
.hw-content ol {
  list-style: decimal;
  padding-left: 1.25rem;
}

ul.wp-block-list li,
ol.wp-block-list li,
.hw-content li {
  margin-bottom: 0.4rem;
}

.hw-content blockquote {
  margin-left: 0;
  margin-right: 0;
  padding-left: 1.5rem;
  border-left: 2px solid var(--hw-accent);
  font-family: var(--hw-serif);
  font-size: 1.5rem;
  line-height: 1.5;
}

.hw-content figure {
  margin-left: 0;
  margin-right: 0;
}

.hw-content figcaption,
.wp-caption-text {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: var(--hw-muted-fg);
}

.hw-content hr {
  border: 0;
  border-top: 1px solid var(--hw-border);
}

.hw-content pre,
.hw-content code {
  background: var(--hw-muted-bg);
  border-radius: 2px;
  font-size: 0.875em;
}

.hw-content pre {
  padding: 1rem;
  overflow-x: auto;
}

.alignwide,
.alignfull {
  max-width: 100%;
}

.aligncenter {
  margin-left: auto;
  margin-right: auto;
}

.hw-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 3rem;
}

.hw-tags a {
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--hw-border);
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--hw-muted-fg);
}

.hw-post-ad {
  margin-top: 3rem;
}

.hw-post-nav {
  display: grid;
  gap: 1.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--hw-border);
}

.hw-post-nav a {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-weight: 500;
}

@media (min-width: 640px) {
  .hw-post-nav {
    grid-template-columns: 1fr 1fr;
  }
  .hw-post-nav .nav-next {
    text-align: right;
  }
}

/* Archive header */
.hw-archive-head {
  padding-top: 4rem;
  padding-bottom: 1rem;
}

.hw-archive-head h1 {
  margin-top: 0.75rem;
  font-size: 2.5rem;
}

.hw-archive-head p {
  max-width: 36rem;
  margin-top: 1rem;
  color: var(--hw-muted-fg);
}

/* Comments */
.hw-comments {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--hw-border);
}

.hw-comments .comment-list li {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--hw-border);
}

.hw-comments .children {
  padding-left: 1.5rem;
}

.hw-comments textarea,
.hw-comments input[type="text"],
.hw-comments input[type="email"],
.hw-comments input[type="url"] {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--hw-border);
  border-radius: 2px;
  background: var(--hw-bg);
  font: inherit;
}

.hw-comments input[type="submit"] {
  padding: 0.625rem 1.25rem;
  border: 0;
  border-radius: 2px;
  background: var(--hw-fg);
  color: var(--hw-bg);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

/* Footer */
.hw-footer {
  border-top: 1px solid var(--hw-border);
}

.hw-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.hw-footer__brand {
  font-size: 1.5rem;
}

.hw-footer__note,
.hw-footer__copy {
  font-size: 0.875rem;
  color: var(--hw-muted-fg);
}

.hw-footer__copy {
  font-size: 0.75rem;
}

@media (min-width: 768px) {
  .hw-footer__inner {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
