/*************************************************************/
/************************* Utilities *************************/
/*************************************************************/

.blind {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.ellipsis {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  word-break: normal;
}

/*************************************************************/
/**************************** Core ***************************/
/*************************************************************/

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  font-size: 18px;
  color: #37322e;
  background-color: #faf8f5;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: #c4623a;
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: #a8532e;
  text-decoration: underline;
}

a:active {
  color: #8f4726;
}

::selection {
  background: #f0dfd0;
  color: #37322e;
}

.root {
  position: relative;
  max-width: 720px;
  padding: 48px 24px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .root {
    padding: 40px 20px;
  }
}

@media (max-width: 480px) {
  .root {
    padding: 32px 16px;
  }
}

/*************************************************************/
/*************************** Header **************************/
/*************************************************************/

.header {
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1;
}

.header__picture {
  flex-shrink: 0;
}

.header__picture a {
  display: block;
}

.header__picture img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  transition: opacity 0.15s ease;
}

.header__picture a:hover img {
  opacity: 0.8;
}

.header__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header__title a {
  color: #2a2523;
  text-decoration: none;
}

.header__title a:hover {
  text-decoration: none;
}

.header__subtitle {
  font-size: 0.85rem;
  color: #847a6f;
  margin: 4px 0 0;
}

.header__media {
  margin-top: 8px;
}

@media (max-width: 480px) {
  .header__picture img {
    width: 38px;
    height: 38px;
  }

  .header__title {
    font-size: 0.95rem;
  }

  .header__subtitle {
    font-size: 0.8rem;
  }
}

/*************************************************************/
/*************************** Home ****************************/
/*************************************************************/

.home {
  margin-top: 64px;
}

.home__navigation {
  margin-top: 56px;
}

@media (max-width: 480px) {
  .home {
    margin-top: 48px;
  }

  .home__navigation {
    margin-top: 40px;
  }
}

/*************************************************************/
/*************************** Posts ***************************/
/*************************************************************/

.posts__classify {
  font-size: 0.95rem;
  text-align: center;
  color: #847a6f;
  margin-top: -16px;
  margin-bottom: 48px;
}

.posts__classify strong {
  color: #c4623a;
  font-weight: 600;
}

.posts__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.posts__item {
  margin-top: 48px;
}

.posts__item:first-child {
  margin-top: 0;
}

.posts__item.has-picture .posts__body {
  padding-right: 180px;
  min-height: 112px;
}

.posts__title {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.posts__title a {
  color: #2a2523;
  text-decoration: none;
  transition: color 0.15s ease;
}

.posts__title a:hover {
  color: #c4623a;
  text-decoration: none;
}

.posts__body {
  position: relative;
  margin-top: 12px;
}

.posts__picture {
  position: absolute;
  top: 0;
  right: 0;
  width: 160px;
  height: 106px;
  background-color: #f0ece5;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 8px;
}

.posts__desc {
  display: -webkit-box;
  margin-top: 8px;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #5f564e;
  font-size: 0.95rem;
  line-height: 1.6;
}

.posts__meta {
  margin-top: 12px;
}

@media (max-width: 768px) {
  .posts__item.has-picture .posts__body {
    padding-right: 140px;
  }

  .posts__picture {
    width: 120px;
    height: 80px;
  }
}

@media (max-width: 480px) {
  .posts__item {
    margin-top: 36px;
  }

  .posts__title {
    font-size: 1.55rem;
  }

  .posts__item.has-picture .posts__body {
    padding-right: 110px;
    min-height: 80px;
  }

  .posts__picture {
    width: 96px;
    height: 64px;
    border-radius: 6px;
  }

  .posts__desc {
    -webkit-line-clamp: 2;
    font-size: 0.875rem;
  }
}

/*************************************************************/
/*************************** Post ****************************/
/*************************************************************/

.post,
.post__navigation,
.post__comments {
  margin-top: 64px;
}

.post__meta {
  margin-top: 16px;
}

.post__title {
  margin: 0;
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.post__cover {
  position: relative;
  margin-left: -48px;
  margin-right: -48px;
  border-radius: 16px;
  overflow: hidden;
}

.post__cover img {
  display: block;
  width: 100%;
  min-height: 360px;
  max-height: 480px;
  object-fit: cover;
}

.post__cover-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px 48px;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
}

.post--has-cover .post__title {
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.post--has-cover .post__meta,
.post--has-cover .post__meta .meta,
.post--has-cover .post__meta .meta i,
.post--has-cover .post__meta .meta__categories a {
  color: rgba(255,255,255,0.8);
}

.post__cover + .post__tags {
  margin-top: 20px;
}

@media (max-width: 768px) {
  .post__cover {
    margin-left: -20px;
    margin-right: -20px;
    border-radius: 0;
    min-height: 300px;
  }

  .post__cover img {
    min-height: 300px;
  }

  .post__cover-overlay {
    padding: 32px 24px;
  }
}

@media (max-width: 480px) {
  .post__cover {
    margin-left: -16px;
    margin-right: -16px;
    min-height: 240px;
    max-height: 360px;
  }

  .post__cover img {
    min-height: 240px;
    max-height: 360px;
  }

  .post__cover-overlay {
    padding: 24px 20px;
  }

  .post--has-cover .post__title {
    font-size: 1.4rem;
  }
}

.post__toc {
  float: right;
  width: 240px;
  margin-right: -280px;
  position: sticky;
  top: 32px;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  font-size: 0.8rem;
  color: #847a6f;
}

.post__toc h2 {
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: #4a423b;
  letter-spacing: -0.01em;
}

.post__toc ol {
  list-style: none;
  margin: 0;
  padding-left: 16px;
}

.post__toc > ol {
  margin-top: 16px;
  padding-left: 0;
}

.post__toc a {
  color: #847a6f;
  transition: color 0.15s ease;
}

.post__toc a:hover {
  color: #c4623a;
  text-decoration: none;
}

.post__toc a.is-active {
  color: #c4623a;
  font-weight: 600;
}

.post__contents {
  margin-top: 48px;
  font-size: 1rem;
  line-height: 1.75;
}

.post__contents h2,
.post__contents h3,
.post__contents h4,
.post__contents h5,
.post__contents h6,
.post__contents p,
.post__contents figure,
.post__contents blockquote,
.post__contents > ul,
.post__contents > ol,
.post__contents iframe,
.post__contents [class*=language] {
  margin-top: 28px;
  margin-bottom: 0;
}

.post__contents h2 {
  margin-top: 56px;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0d8cc;
}

.post__contents h3 {
  margin-top: 40px;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.post__contents h4 {
  font-size: 1.15rem;
  font-weight: 600;
}

.post__contents h5 {
  font-size: 1rem;
  font-weight: 600;
}

.post__contents h6 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #847a6f;
}

.post__contents ul,
.post__contents ol {
  padding-left: 28px;
}

.post__contents li + li {
  margin-top: 4px;
}

.post__contents code {
  padding: 2px 6px;
  background: #f0ece5;
  border: 1px solid #e0d8cc;
  border-radius: 4px;
  font-size: 0.875em;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.post__contents pre[class*=language] {
  font-size: 0.875rem;
  line-height: 1.6;
  padding: 16px 20px;
  background: #f5f1eb;
  border: 1px solid #e0d8cc;
  border-radius: 8px;
  overflow-x: auto;
}

.post__contents pre[class*=language] code {
  background: transparent;
  border: 0;
  padding: 0;
  font-size: inherit;
}

.post__contents figure {
  margin-left: 0;
  margin-right: 0;
  text-align: center;
}

.post__contents figure > a {
  display: block;
}

.post__contents figure img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.post__contents figure figcaption {
  font-size: 0.85rem;
  color: #a89e91;
  padding-top: 8px;
}

.post__contents blockquote {
  margin-left: 0;
  margin-right: 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid #c4623a;
  color: #5f564e;
}

.post__contents blockquote p:first-child {
  margin-top: 0;
}

.post__contents blockquote a {
  color: #c4623a;
}

@media (max-width: 1249px) {
  .post__toc {
    position: static;
    float: none;
    margin-right: 0;
    width: 100%;
    max-height: none;
    overflow-y: visible;
    font-size: 0.9rem;
  }

  .post__toc h2 {
    margin-top: 48px;
    font-size: 1.85rem;
    font-weight: 700;
  }

  .post__toc > ol {
    margin-top: 24px;
  }
}

@media (max-width: 768px) {
  .post,
  .post__navigation,
  .post__comments {
    margin-top: 48px;
  }

  .post__title {
    font-size: 1.9rem;
  }

  .post__contents h2 {
    margin-top: 48px;
    font-size: 1.6rem;
  }

  .post__contents h3 {
    margin-top: 36px;
    font-size: 1.3rem;
  }

  .post__contents pre[class*=language] {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    margin-left: -20px;
    margin-right: -20px;
  }

  .post__contents > figure {
    margin-left: -20px;
    margin-right: -20px;
  }

  .post__contents figure img {
    border-radius: 0;
  }

  .post__contents figure figcaption {
    padding: 6px 20px 0;
  }
}

@media (max-width: 480px) {
  .post,
  .post__navigation,
  .post__comments {
    margin-top: 40px;
  }

  .post__meta {
    margin-top: 12px;
  }

  .post__title {
    font-size: 1.65rem;
  }

  .post__toc {
    font-size: 0.9rem;
  }

  .post__toc h2 {
    font-size: 1.45rem;
  }

  .post__contents {
    margin-top: 36px;
    font-size: 1rem;
  }

  .post__contents h2,
  .post__contents h3,
  .post__contents h4,
  .post__contents h5,
  .post__contents h6,
  .post__contents p,
  .post__contents figure,
  .post__contents blockquote,
  .post__contents > ul,
  .post__contents > ol,
  .post__contents iframe,
  .post__contents [class*=language] {
    margin-top: 22px;
  }

  .post__contents h2 {
    margin-top: 40px;
    font-size: 1.45rem;
  }

  .post__contents h3 {
    margin-top: 32px;
    font-size: 1.2rem;
  }

  .post__contents ul,
  .post__contents ol {
    padding-left: 24px;
  }

  .post__contents pre[class*=language] {
    font-size: 0.8rem;
    padding: 14px 16px;
    margin-left: -16px;
    margin-right: -16px;
  }

  .post__contents > figure {
    margin-left: -16px;
    margin-right: -16px;
  }

  .post__contents figure figcaption {
    padding: 6px 16px 0;
    font-size: 0.8rem;
  }
}

/*************************************************************/
/************************** Footer ***************************/
/*************************************************************/

.footer {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid #e0d8cc;
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  color: #a89e91;
  line-height: 1.5;
}

.footer a {
  color: #847a6f;
}

.footer a:hover {
  color: #c4623a;
}

.footer__copyright {
  flex: 1;
  text-align: right;
}

.footer__copyright br {
  display: none;
}

@media (max-width: 480px) {
  .footer {
    flex-direction: column;
    gap: 8px;
    margin-top: 56px;
    text-align: center;
    font-size: 0.8rem;
  }

  .footer__copyright {
    text-align: center;
  }

  .footer__copyright .void {
    display: none;
  }

  .footer__copyright br {
    display: block;
  }
}

/*************************************************************/
/*************************** Media ***************************/
/*************************************************************/

.media {
  display: flex;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.media__medium {
  font-size: 1rem;
}

.media__medium a {
  color: #a89e91;
  transition: color 0.15s ease;
}

.media__medium a:hover {
  color: #c4623a;
  text-decoration: none;
}

.media__medium a:active {
  color: #a8532e;
}

/*************************************************************/
/*************************** Meta ****************************/
/*************************************************************/

.meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #a89e91;
  font-size: 0.85rem;
  line-height: 1.3;
}

.meta__datetime,
.meta__categories {
  display: flex;
  align-items: center;
  gap: 5px;
}

.meta__categories {
  flex: 1;
  min-width: 0;
}

.meta i {
  font-size: 0.85rem;
  width: 14px;
  text-align: center;
}

.meta__categories a {
  color: #a89e91;
  transition: color 0.15s ease;
}

.meta__categories a:hover {
  color: #c4623a;
}

.meta__category-list {
  display: inline;
}

@media (max-width: 480px) {
  .meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 0.8rem;
  }

  .meta i {
    font-size: 0.8rem;
  }
}

/*************************************************************/
/*************************** Tags ****************************/
/*************************************************************/

.tags {
  margin-top: 4px;
}

.tags__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags__link {
  display: inline-block;
  font-size: 0.8rem;
  line-height: 1;
  padding: 5px 10px;
  background: #f0ece5;
  color: #5f564e;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}

.tags__link:hover {
  background: #f0dfd0;
  color: #c4623a;
  text-decoration: none;
}

@media (max-width: 480px) {
  .tags__link {
    font-size: 0.75rem;
    padding: 4px 8px;
  }
}

/*************************************************************/
/*************************** Alert ***************************/
/*************************************************************/

.alert {
  margin-top: 28px;
  padding: 16px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.alert--info {
  background: #faf3eb;
  border: 1px solid #dcc4a8;
  color: #8f4726;
}

.alert--info a {
  color: #c4623a;
  text-decoration: underline;
  text-decoration-color: #d4b59a;
}

.alert--info a:hover {
  text-decoration-color: #c4623a;
}

.alert__title {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
}

.alert p {
  padding: 0;
  margin-top: 8px;
}

.alert p:first-child {
  margin-top: 0;
}

.alert [class*=language] {
  margin-top: 8px;
}

@media (max-width: 768px) {
  .alert {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    margin-left: -20px;
    margin-right: -20px;
  }
}

@media (max-width: 480px) {
  .alert {
    margin-top: 22px;
    padding: 12px 16px;
    font-size: 0.85rem;
    margin-left: -16px;
    margin-right: -16px;
  }
}

/*************************************************************/
/************************** Table ****************************/
/*************************************************************/

.post__contents table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.92rem;
  line-height: 1.6;
}

.post__contents thead th {
  text-align: left;
  font-weight: 600;
  color: #2a2523;
  border-bottom: 2px solid #e0d8cc;
  padding: 10px 14px;
}

.post__contents tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid #e0d8cc;
  color: #37322e;
}

.post__contents tbody tr:last-child td {
  border-bottom: none;
}

.post__contents tbody tr:hover {
  background-color: #f5f1eb;
}

.post__contents td code,
.post__contents th code {
  background: #f0ece5;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

@media (max-width: 768px) {
  .post__contents table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .post__contents thead th,
  .post__contents tbody td {
    padding: 8px 10px;
    font-size: 0.85rem;
    white-space: nowrap;
  }
}

/*************************************************************/
/************************ Navigation *************************/
/*************************************************************/

.navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.navigation__guide {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #a89e91;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
}

.navigation__meta {
  margin-top: 8px;
}

.navigation__link {
  color: #2a2523;
  transition: color 0.15s ease;
}

.navigation__link:hover {
  color: #c4623a;
  text-decoration: none;
}

.navigation__title {
  margin: 12px 0 0;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.navigation__desc {
  margin: 12px 0 0;
  color: #847a6f;
  font-size: 0.9rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 768px) {
  .navigation .meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

@media (max-width: 768px) {
  .navigation {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .navigation__guide {
    font-size: 0.75rem;
  }

  .navigation__title {
    margin-top: 10px;
    font-size: 1.15rem;
  }

  .navigation__desc {
    font-size: 0.85rem;
  }
}

/*************************************************************/
/************************ Pagination *************************/
/*************************************************************/

.pagination {
  text-align: center;
}

.pagination__list {
  display: inline-flex;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pagination__pick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  color: #847a6f;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.pagination__pick:hover {
  background: #f0ece5;
  color: #2a2523;
  text-decoration: none;
}

.pagination__pick.on {
  background: #2a2523;
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
}

.pagination__pick.on:hover {
  background: #37322e;
}

.pagination__pick > span {
  line-height: 1;
}
