@import url("https://fonts.googleapis.com/css2?family=Noto+Serif+KR:wght@400;500;600&display=swap");

* {
  box-sizing: border-box;
}

:root {
  --bg: #efefef;
  --text: #2f2f2f;
  --topbar-bg: #efefef;
  --logo: #1f1f1f;
  --menu: #474747;
  --menu-hover: #111111;
  --title: #171717;
  --heading: #1f1f1f;
  --footer-line: #cdcdcd;
  --copyright: #5f5f5f;
  --btn-border: #b5b5b5;
  --btn-text: #3f3f3f;
  --btn-hover-text: #111111;
  --youtube: #2f2f2f;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
}

html {
  font-size: 110%;
}

body,
body * {
  font-family: "Noto Serif KR", "Times New Roman", serif;
}

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

.site-header {
  width: 100%;
  margin: 0 0 141px;
  padding: 18px 52px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  background: var(--topbar-bg);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  color: var(--logo);
  display: inline-block;
  justify-self: start;
  white-space: nowrap;
  font-size: clamp(1.1rem, 1.45vw, 1.38rem);
  font-weight: 500;
  letter-spacing: 0.18em;
}

.main-nav {
  display: flex;
  justify-self: center;
  gap: 34px;
}

.main-nav a {
  color: var(--menu);
  font-size: 0.95rem;
}

.main-nav a:hover {
  color: var(--menu-hover);
}

.header-space {
  justify-self: end;
}

.menu-toggle,
.mobile-menu {
  display: none;
}

.content {
  width: min(700px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 52px;
}

.intro-title {
  margin: 0;
  font-size: clamp(1.45rem, 2vw, 1.8rem);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--title);
}

.section {
  font-size: clamp(0.92rem, 1vw, 1.06rem);
  line-height: 1.85;
  letter-spacing: -0.015em;
  color: var(--text);
}

.section p {
  margin: 0 0 20px;
}

.signature {
  display: inline-block;
  margin-bottom: 28px;
}

.intro-disclaimer {
  margin-top: 34px;
  margin-bottom: 0;
  font-size: 0.84rem;
  line-height: 1.7;
  color: #777;
}

.page-section h1,
.subscription h1,
.subscription h2 {
  margin: 0;
  color: var(--heading);
  font-family: inherit;
  letter-spacing: -0.01em;
}

.page-section h1,
.subscription h1 {
  font-size: clamp(1.45rem, 2vw, 1.8rem);
  line-height: 1.55;
  font-weight: 500;
}

.subscription h2 {
  margin-top: 34px;
  font-size: clamp(1.02rem, 1.2vw, 1.16rem);
  line-height: 1.35;
  font-weight: 600;
}

.page-section h1 + p,
.subscription h1 + p {
  margin-top: 31px;
}

.author-page {
  gap: 34px;
}

.author-profile {
  width: 168px;
  height: 168px;
  margin: 0 auto 51px;
  border-radius: 50%;
  overflow: hidden;
  background: #ddd;
}

.author-profile img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 54% 24%;
}

.author-intro p:last-child {
  margin-bottom: 0;
}

.books-page {
  width: min(700px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  column-gap: 72px;
  row-gap: 72px;
  text-align: center;
}

.book-item {
  min-width: 0;
}

.book-cover {
  width: min(260px, 70vw);
  height: auto;
  display: block;
  margin: 0 auto 42px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
}

.book-item h1 {
  margin: 0;
  color: var(--heading);
  font-size: clamp(1.18rem, 1.55vw, 1.42rem);
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.book-item p {
  margin: 9px 0 0;
  color: #7a7a7a;
  font-size: 0.78rem;
  line-height: 1.6;
}

.subscription ul {
  margin: 18px 0 0;
  padding: 0 0 0 1.1rem;
}

.subscription li {
  margin-top: 8px;
  line-height: 1.85;
}

.subscription {
  display: block;
  font-size: clamp(0.92rem, 1vw, 1.06rem);
  letter-spacing: -0.015em;
}

.subscription p {
  margin: 0 0 20px;
  line-height: 1.85;
}

.subscription .gap {
  margin-top: 0;
}

.subscription h1 + p {
  margin-top: 31px;
}

.subscription h2 + ul {
  margin-top: 16px;
}

.subscription-visual {
  margin: 42px 0 0;
}

.subscription-visual a {
  display: block;
}

.subscription-visual img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
}

.site-footer {
  width: 100%;
  margin-top: 270px;
  padding: 0 24px 80px;
  color: var(--copyright);
  text-align: center;
}

.site-footer::before {
  content: "";
  width: 100%;
  height: 1px;
  display: block;
  background: var(--footer-line);
}

.social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  padding: 22px 0 18px;
}

.social-links a {
  width: 28px;
  height: 28px;
  color: var(--youtube);
  display: inline-flex;
}

.social-links a:nth-child(2) {
  width: 20px;
  height: 20px;
}

.social-links a:nth-child(3) {
  width: 24px;
  height: 24px;
}

.social-links svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.policy-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 0 12px;
  font-size: 0.88rem;
  color: var(--copyright);
}

.site-footer p {
  margin: 0;
  color: var(--copyright);
  font-size: 0.88rem;
  letter-spacing: 0.01em;
}

@media (max-width: 760px) {
  body {
    padding: 0 16px 60px;
  }

  .site-header {
    margin-bottom: 83px;
    padding: 16px 0;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
  }

  .brand {
    font-size: clamp(1.1rem, 6.5vw, 1.38rem);
  }

  .main-nav {
    display: none;
  }

  .menu-toggle {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--btn-text);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
  }

  .menu-toggle span {
    width: 16px;
    height: 1.8px;
    border-radius: 999px;
    background: currentColor;
    transform-origin: center;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(5.8px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-5.8px) rotate(-45deg);
  }

  .mobile-menu {
    width: 100%;
    grid-column: 1 / -1;
    border: 1px solid var(--btn-border);
    border-radius: 14px;
    padding: 12px 14px;
    background: var(--bg);
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.16);
  }

  .mobile-menu:not([hidden]) {
    display: block;
  }

  .mobile-menu a {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid color-mix(in srgb, var(--btn-border) 60%, transparent);
    color: var(--text);
    font-size: 1rem;
  }

  .mobile-menu a:last-child {
    border-bottom: 0;
  }

  .content {
    width: min(700px, 100%);
    gap: 52px;
  }

  .author-page {
    gap: 30px;
  }

  .author-profile {
    width: 138px;
    height: 138px;
    margin-bottom: 42px;
  }

  .book-cover {
    width: min(230px, 68vw);
    margin-bottom: 36px;
  }

  .books-page {
    grid-template-columns: 1fr;
    row-gap: 72px;
  }

  .site-footer {
    margin-top: 192px;
    padding: 0 0 0;
  }
}
