/*
Theme Name: Soonseong Modern
Theme URI: https://blog.soonseong.work
Author: Codex
Description: A calm, modern reading-focused theme for migrated Naver blog posts.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.1
Text Domain: soonseong-modern
*/

:root {
  --ss-bg: #f6f7f9;
  --ss-surface: #ffffff;
  --ss-surface-soft: #eef4f1;
  --ss-ink: #17202a;
  --ss-muted: #65717f;
  --ss-line: #dce2e8;
  --ss-accent: #2f7d68;
  --ss-accent-strong: #205f50;
  --ss-warm: #d95f49;
  --ss-shadow: 0 18px 42px rgb(25 36 48 / 8%);
  --ss-radius: 8px;
  --ss-content: 760px;
  --ss-wide: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgb(246 247 249 / 96%), rgb(246 247 249 / 100%)),
    radial-gradient(circle at 18% 0%, rgb(47 125 104 / 10%), transparent 34%);
  color: var(--ss-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.72;
  letter-spacing: 0;
  word-break: keep-all;
  overflow-wrap: anywhere;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-color: rgb(47 125 104 / 42%);
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}

a:hover {
  color: var(--ss-accent-strong);
  text-decoration-color: currentColor;
}

img,
video,
iframe {
  max-width: 100%;
}

img {
  height: auto;
}

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

.site-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgb(246 247 249 / 86%);
  border-bottom: 1px solid rgb(220 226 232 / 80%);
  backdrop-filter: blur(16px);
}

.admin-bar .site-header {
  top: 32px;
}

.header-inner,
.site-main,
.site-footer-inner {
  width: min(calc(100% - 40px), var(--ss-wide));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--ss-ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid rgb(47 125 104 / 28%);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, var(--ss-surface-soft));
  color: var(--ss-accent-strong);
  font-weight: 800;
  line-height: 1;
}

.brand-text {
  min-width: 0;
}

.site-title {
  display: block;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.24;
}

.site-description {
  display: block;
  margin-top: 2px;
  color: var(--ss-muted);
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #334151;
  font-size: 14px;
  font-weight: 700;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ss-accent-strong);
}

.site-main {
  padding: 56px 0 72px;
}

.archive-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 40px;
  align-items: end;
  margin-bottom: 40px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--ss-accent-strong);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--ss-warm);
}

.archive-title,
.entry-title {
  margin: 0;
  font-family: "New York", "Iowan Old Style", Georgia, "Apple SD Gothic Neo", serif;
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: .98;
}

.archive-description {
  max-width: 660px;
  margin: 20px 0 0;
  color: #425061;
  font-size: 18px;
  line-height: 1.72;
}

.archive-aside {
  padding: 18px 0 0;
  border-top: 2px solid var(--ss-ink);
  color: var(--ss-muted);
  font-size: 15px;
}

.archive-aside strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ss-ink);
  font-size: 16px;
}

.post-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 22px 24px;
  border: 1px solid var(--ss-line);
  border-radius: var(--ss-radius);
  background: var(--ss-surface);
  box-shadow: 0 1px 0 rgb(23 32 42 / 4%);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  border-color: rgb(47 125 104 / 34%);
  box-shadow: var(--ss-shadow);
}

.post-card-title {
  margin: 0;
  font-size: clamp(20px, 2vw, 27px);
  font-weight: 800;
  line-height: 1.34;
}

.post-card-title a {
  text-decoration: none;
}

.post-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 10px;
  color: var(--ss-muted);
  font-size: 13px;
  line-height: 1.4;
}

.post-card-excerpt {
  max-width: 760px;
  margin: 12px 0 0;
  color: #4d5a68;
  font-size: 15px;
  line-height: 1.72;
}

.post-card-arrow {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ss-surface-soft);
  color: var(--ss-accent-strong);
  font-size: 20px;
  transition: transform .18s ease, background .18s ease;
}

.post-card:hover .post-card-arrow {
  transform: translateX(2px);
  background: rgb(47 125 104 / 14%);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--ss-line);
  border-radius: 8px;
  background: var(--ss-surface);
  color: var(--ss-ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.pagination .current {
  background: var(--ss-ink);
  color: #fff;
}

.article {
  width: min(100%, var(--ss-content));
  margin-inline: auto;
}

.article-header {
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--ss-line);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 18px;
  color: var(--ss-muted);
  font-size: 14px;
  font-weight: 700;
}

.article-meta a {
  color: var(--ss-accent-strong);
  text-decoration: none;
}

.article .entry-title {
  font-size: clamp(36px, 5.4vw, 58px);
  line-height: 1.08;
}

.article-content {
  color: #1f2a36;
  font-size: 18px;
  line-height: 1.86;
}

.article-content > *:first-child {
  margin-top: 0;
}

.article-content p,
.article-content li {
  line-height: 1.86;
}

.article-content h2,
.article-content h3,
.article-content h4 {
  margin: 2.2em 0 .7em;
  font-weight: 850;
  line-height: 1.28;
}

.article-content h2 {
  font-size: 30px;
}

.article-content h3 {
  font-size: 24px;
}

.article-content img {
  display: block;
  margin: 1.7em auto;
  border-radius: 8px;
}

.article-content figure {
  margin: 2em auto;
}

.article-content figcaption {
  margin-top: 8px;
  color: var(--ss-muted);
  font-size: 13px;
  text-align: center;
}

.article-content blockquote {
  margin: 2em 0;
  padding: 2px 0 2px 22px;
  border-left: 4px solid var(--ss-accent);
  color: #334151;
}

.article-content table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.article-content code {
  padding: .12em .32em;
  border-radius: 5px;
  background: #eef1f4;
  font-size: .92em;
}

.article-content pre {
  overflow-x: auto;
  padding: 18px;
  border-radius: 8px;
  background: #17202a;
  color: #f5f7fb;
}

.naver-imported-post {
  max-width: var(--ss-content);
  margin: 0 auto;
  color: #1f2a36;
  font-size: 18px;
  line-height: 1.86;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.naver-imported-post p,
.naver-imported-post span,
.naver-imported-post div,
.naver-imported-post li {
  font-size: 18px !important;
  line-height: 1.86 !important;
}

.naver-imported-post p {
  margin: 0 0 1.12em;
}

.naver-imported-post img {
  display: block;
  max-width: 100% !important;
  height: auto !important;
  margin: 1.7em auto;
  border-radius: 8px;
}

.naver-imported-post a {
  color: var(--ss-accent-strong);
}

.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: min(100%, var(--ss-content));
  margin: 48px auto 0;
}

.post-navigation a {
  display: block;
  min-height: 88px;
  padding: 16px;
  border: 1px solid var(--ss-line);
  border-radius: var(--ss-radius);
  background: var(--ss-surface);
  text-decoration: none;
}

.post-navigation span {
  display: block;
  color: var(--ss-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.post-navigation strong {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.45;
}

.site-footer {
  border-top: 1px solid var(--ss-line);
  background: #fff;
}

.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0;
  color: var(--ss-muted);
  font-size: 13px;
}

.empty-state {
  width: min(100%, 720px);
  padding: 32px;
  border: 1px solid var(--ss-line);
  border-radius: var(--ss-radius);
  background: var(--ss-surface);
}

@media (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  .header-inner,
  .site-main,
  .site-footer-inner {
    width: min(calc(100% - 28px), var(--ss-wide));
  }

  .header-inner {
    min-height: 66px;
  }

  .site-description,
  .site-nav {
    display: none;
  }

  .site-main {
    padding: 36px 0 56px;
  }

  .archive-hero {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .archive-title,
  .entry-title,
  .article .entry-title {
    font-size: clamp(30px, 8.8vw, 39px);
    line-height: 1.08;
  }

  .archive-description,
  .article-content,
  .naver-imported-post {
    font-size: 16px;
  }

  .naver-imported-post p,
  .naver-imported-post span,
  .naver-imported-post div,
  .naver-imported-post li {
    font-size: 16px !important;
    line-height: 1.78 !important;
  }

  .post-card {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 18px;
  }

  .post-card-arrow {
    display: none;
  }

  .post-navigation {
    grid-template-columns: 1fr;
  }

  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
