/* topsolution.lab — Journal
   메인 사이트(index.html)의 토큰·타이포를 공유합니다. */

:root {
  --bg: #ffffff;
  --text: #0f0f0f;
  --muted: #6b6b6b;
  --line: #eaeaea;
  --card: #ffffff;
  --brand: #ff6b3d;
  --radius: 26px;
  --maxW: 760px;
  --gutter: 24px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0c;
    --text: #ffffff;
    --muted: #b5b5b5;
    --line: #2a2a2a;
    --card: #141416;
  }
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
}
a {
  color: inherit;
}

/* ===== Top bar ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.brand-logo {
  width: 26px;
  height: 26px;
}
.brand em {
  font-style: normal;
  color: var(--brand);
}
.topbar nav {
  display: flex;
  gap: 18px;
  font-size: 0.9rem;
  font-weight: 600;
}
.topbar nav a {
  text-decoration: none;
  color: var(--muted);
}
.topbar nav a:hover,
.topbar nav a[aria-current] {
  color: var(--text);
}

/* ===== Shared layout ===== */
.wrap {
  max-width: var(--maxW);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
}

/* ===== Journal index ===== */
.jhead {
  padding: 72px 0 40px;
}
.jhead h1 {
  margin: 12px 0 14px;
  font-size: clamp(2.2rem, 5vw + 1rem, 3.4rem);
  font-weight: 800;
  letter-spacing: -1.4px;
  line-height: 1.1;
}
.jhead p {
  margin: 0;
  color: var(--muted);
  max-width: 56ch;
}
.post-list {
  list-style: none;
  margin: 0;
  padding: 0 0 80px;
}
.post-list li {
  border-top: 1px solid var(--line);
}
.post-list a {
  display: block;
  padding: 28px 0;
  text-decoration: none;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
  font-feature-settings: "tnum" 1;
}
.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  font-weight: 600;
  color: var(--brand);
}
.post-list h2 {
  margin: 10px 0 8px;
  font-size: clamp(1.25rem, 1.6vw + 0.9rem, 1.6rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.35;
}
.post-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.97rem;
}
.post-list a:hover h2 {
  color: var(--brand);
}
.jempty {
  padding: 40px 0 80px;
  color: var(--muted);
}

/* ===== Article ===== */
.article {
  padding: 60px 0 40px;
}
.article h1 {
  margin: 14px 0 18px;
  font-size: clamp(1.9rem, 4vw + 1rem, 3rem);
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1.2;
}
.lead {
  margin: 0 0 8px;
  font-size: 1.12rem;
  color: var(--muted);
  line-height: 1.75;
}
.article-body {
  padding-bottom: 20px;
}
.article-body h2 {
  margin: 56px 0 14px;
  font-size: clamp(1.3rem, 1.8vw + 0.9rem, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.35;
}
.article-body h3 {
  margin: 36px 0 10px;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.2px;
}
.article-body p {
  margin: 0 0 20px;
}
.article-body ul,
.article-body ol {
  margin: 0 0 20px;
  padding-left: 1.2em;
}
.article-body li {
  margin-bottom: 8px;
}
.article-body strong {
  font-weight: 700;
}
.article-body a {
  color: var(--brand);
  text-underline-offset: 3px;
}
.article-body blockquote {
  margin: 28px 0;
  padding: 2px 0 2px 20px;
  border-left: 3px solid var(--brand);
  color: var(--text);
  font-size: 1.06rem;
  font-weight: 600;
  line-height: 1.7;
}
.article-body blockquote p:last-child {
  margin-bottom: 0;
}
.article-body hr {
  margin: 48px 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.note {
  margin: 28px 0;
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  font-size: 0.97rem;
}
.note p:last-child {
  margin-bottom: 0;
}
.note b {
  display: block;
  margin-bottom: 6px;
  color: var(--brand);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
figure {
  margin: 32px 0;
}
figure img {
  width: 100%;
  border-radius: 18px;
  display: block;
  border: 1px solid var(--line);
}
figcaption {
  margin-top: 10px;
  font-size: 0.86rem;
  color: var(--muted);
}

/* ===== Article footer ===== */
.article-end {
  margin: 48px 0 0;
  padding: 32px 0 0;
  border-top: 1px solid var(--line);
}
.article-end p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.97rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--brand);
  color: #111;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
}
.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ===== Site footer ===== */
.jfooter {
  margin-top: 72px;
  padding: 28px var(--gutter) 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}
.jfooter .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: space-between;
  padding: 0;
}
.jfooter a {
  color: var(--muted);
  text-decoration: none;
}
.jfooter a:hover {
  color: var(--text);
}

@media (max-width: 600px) {
  body {
    font-size: 16px;
  }
  .topbar nav {
    gap: 12px;
    font-size: 0.82rem;
  }
  .jhead {
    padding: 48px 0 28px;
  }
}

/* ===== Share ===== */
.share {
  margin: 48px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--line);
}
.share__label {
  display: block;
  margin-bottom: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.share__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.share__btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.share__btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.share__btn--main {
  background: var(--brand);
  border-color: var(--brand);
  color: #111;
}
.share__btn--main:hover {
  color: #111;
  opacity: 0.9;
}
.share__btn.is-done {
  border-color: var(--brand);
  color: var(--brand);
}
.share + .article-end {
  margin-top: 36px;
  padding-top: 28px;
}

/* 본문 안의 작은 안내 문단 */
.article-body .note {
  margin: 20px 0 0;
  padding: 14px 16px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ===== Mobile menu ===== */
.nav-toggle {
  position: relative;
  display: none;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  margin: -8px -10px -8px 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  cursor: pointer;
}
.nav-toggle .bar {
  position: absolute;
  left: 10px;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.18s ease;
}
.nav-toggle .bar-1 {
  top: 14px;
}
.nav-toggle .bar-2 {
  top: 20px;
}
.nav-toggle .bar-3 {
  top: 26px;
}
body.menu-open .nav-toggle .bar-1 {
  transform: translateY(6px) rotate(45deg);
}
body.menu-open .nav-toggle .bar-2 {
  opacity: 0;
}
body.menu-open .nav-toggle .bar-3 {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 96px var(--gutter) 40px;
  background: color-mix(in srgb, var(--bg) 97%, transparent);
  backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
body.menu-open .nav-drawer {
  opacity: 1;
  visibility: visible;
}
body.menu-open {
  overflow: hidden;
}
.nav-drawer a {
  display: block;
  padding: 13px 0;
  color: var(--text);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.6px;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transform: translateY(14px);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.45s ease, color 0.2s ease;
}
body.menu-open .nav-drawer a {
  transform: none;
  opacity: 1;
}
body.menu-open .nav-drawer a:nth-child(1) { transition-delay: 0.06s; }
body.menu-open .nav-drawer a:nth-child(2) { transition-delay: 0.1s; }
body.menu-open .nav-drawer a:nth-child(3) { transition-delay: 0.14s; }
body.menu-open .nav-drawer a:nth-child(4) { transition-delay: 0.18s; }
body.menu-open .nav-drawer a:nth-child(5) { transition-delay: 0.22s; }
.nav-drawer__mail {
  margin-top: 26px;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  color: var(--brand) !important;
  border-bottom: 0 !important;
  letter-spacing: 0 !important;
}

@media (max-width: 720px) {
  .topbar nav {
    display: none;
  }
  .nav-toggle {
    display: block;
  }
  /* keep the brand + close button above the drawer overlay */
  body.menu-open .topbar {
    z-index: 25;
  }
}
@media (min-width: 721px) {
  .nav-drawer {
    display: none;
  }
}
@media (max-height: 560px) {
  .nav-drawer {
    justify-content: flex-start;
    overflow-y: auto;
    padding-top: 84px;
  }
  .nav-drawer a {
    font-size: 1.3rem;
    padding: 10px 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .nav-drawer,
  .nav-drawer a,
  .nav-toggle .bar {
    transition-duration: 0.01ms;
    transition-delay: 0s;
  }
  body.menu-open .nav-drawer a {
    transition-delay: 0s;
  }
}
