@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css");

:root {
  --bg: #fffdf8;
  --fg: #171411;
  --muted: #6e665d;
  --faint: #a89f93;
  --line: #d8ccbd;
  --line-strong: #171411;
  --accent: #723ec3;
  --surface: #f5edde;
  --font-sans: Pretendard, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: Pretendard, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  letter-spacing: 0;
}

body {
  margin: 0;
  min-width: 320px;
}

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

.wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 28px;
}

.site-logo {
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.top-nav {
  align-items: center;
  display: flex;
  gap: 24px;
  font-size: 15px;
}

.top-nav a {
  color: var(--muted);
}

.top-nav a:hover,
.top-nav a[aria-current="page"] {
  color: var(--fg);
}

.home-page,
.blog-index,
.post-page {
  flex: 1;
  margin: 0 auto;
  max-width: 1160px;
  width: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  #main {
    animation: page-enter 260ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-page {
  padding: 64px 28px 104px;
}

.home-hero {
  max-width: 680px;
}

.home-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.04;
  margin: 0;
}

.home-intro {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
  margin: 22px 0 0;
  max-width: 560px;
}

.home-actions {
  margin-top: 30px;
}

.text-link {
  border-bottom: 1px solid var(--fg);
  display: inline-block;
  font-size: 16px;
  padding-bottom: 4px;
}

.home-index {
  border-top: 1px solid var(--line-strong);
  margin-top: 76px;
}

.home-index a {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 28px;
  grid-template-columns: 180px minmax(0, 1fr);
  padding: 28px 0;
}

.home-index span {
  color: var(--muted);
  font-size: 15px;
}

.home-index strong {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 400;
  line-height: 1.05;
}

.blog-index {
  padding: 42px 28px 104px;
}

.page-heading {
  margin-bottom: 82px;
  max-width: 920px;
}

.eyebrow {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 18px;
}

.page-heading h1 {
  font-family: var(--font-serif);
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.04;
  margin: 0;
  max-width: 680px;
}

.post-group {
  border-top: 1px solid var(--line-strong);
}

.post-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-group li {
  border-bottom: 1px solid var(--line);
}

.post-item-link {
  display: grid;
  gap: 28px;
  grid-template-columns: 180px minmax(0, 1fr);
  min-height: 92px;
  padding: 22px 0;
}

.post-item-link:hover .post-title {
  color: var(--accent);
}

.desktop-time,
.mobile-time,
.publish-metadata,
.back-link {
  color: var(--muted);
  font-size: 15px;
}

.desktop-time {
  padding-top: 5px;
}

.mobile-time {
  display: none;
}

.post-info {
  min-width: 0;
}

.post-title {
  font-family: var(--font-serif);
  font-size: clamp(19px, 2.3vw, 28px);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.08;
  margin: 0;
  transition: color 140ms ease;
}

.post-info p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
  margin: 8px 0 0;
  max-width: 620px;
}

.post-page {
  max-width: 980px;
  padding: 64px 28px 104px;
}

.post-page.has-toc {
  display: grid;
  gap: 56px;
  grid-template-columns: 190px minmax(0, 700px);
}

.post-page.no-toc {
  max-width: 700px;
}

.left-toc {
  align-self: start;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.35;
  position: sticky;
  top: 28px;
}

.left-toc ol {
  border-left: 1px solid var(--line);
  list-style: none;
  margin: 0;
  padding: 2px 0 2px 14px;
}

.left-toc li + li {
  margin-top: 9px;
}

.left-toc a {
  display: block;
}

.left-toc a:hover {
  color: var(--fg);
}

.left-toc .toc-depth-1 {
  color: var(--fg);
}

.left-toc .toc-depth-3 {
  padding-left: 12px;
}

.post-content {
  color: var(--fg);
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.62;
  min-width: 0;
}

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

.post-content p {
  margin: 0 0 1.35em;
}

.post-content h2 {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  margin: 2.4em 0 0.7em;
}

.post-content ul,
.post-content ol {
  margin: 0 0 1.35em;
  padding-left: 1.2em;
}

.post-content li + li {
  margin-top: 0.35em;
}

.post-content code {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.82em;
  padding: 0.08em 0.24em;
}

.post-content pre {
  background: #171411;
  border: 1px solid #171411;
  border-radius: 6px;
  color: #f7efe2;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.55;
  margin: 1.8em 0;
  overflow-x: auto;
  padding: 16px 18px;
}

.post-content pre code {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: inherit;
  display: block;
  font-size: inherit;
  padding: 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  font-size: 14px;
  justify-content: space-between;
  margin-top: auto;
  padding: 28px;
}

@media (max-width: 760px) {
  .site-header {
    min-height: 62px;
    padding: 0 20px;
  }

  .blog-index,
  .home-page,
  .post-page {
    padding: 38px 20px 76px;
  }

  .page-heading {
    margin-bottom: 58px;
  }

  .page-heading h1 {
    font-size: clamp(32px, 9vw, 46px);
  }

  .home-hero h1 {
    font-size: clamp(32px, 9vw, 48px);
  }

  .home-intro {
    font-size: 16px;
  }

  .home-index {
    margin-top: 72px;
  }

  .home-index a {
    display: block;
    padding: 24px 0;
  }

  .home-index strong {
    display: block;
    font-size: clamp(30px, 9vw, 42px);
    margin-top: 10px;
  }

  .post-item-link {
    display: block;
    min-height: 0;
    padding: 20px 0;
  }

  .desktop-time {
    display: none;
  }

  .mobile-time {
    display: block;
    margin-top: 16px;
  }

  .post-title {
    font-size: clamp(21px, 6vw, 28px);
  }

  .post-info p {
    font-size: 16px;
  }

  .post-content {
    font-size: 15px;
    line-height: 1.58;
  }

  .post-page.has-toc {
    display: block;
  }

  .left-toc {
    font-size: 13px;
    margin-bottom: 34px;
    position: static;
  }

  .site-footer {
    padding: 24px 20px;
  }
}
