@import url("https://fonts.googleapis.com/css2?family=Gowun+Dodum&family=IBM+Plex+Sans+KR:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: light;
  --bg: #f7f4ed;
  --paper: #fffdf7;
  --surface: rgba(255, 253, 247, 0.86);
  --surface-strong: #ffffff;
  --text: #172033;
  --muted: #667085;
  --border: rgba(23, 32, 51, 0.1);
  --accent: #1769ff;
  --accent-2: #0c2346;
  --lime: #b8f255;
  --coral: #ff7d55;
  --shadow: 0 24px 70px rgba(23, 32, 51, 0.12);
  --content-width: 1180px;
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 18px;
  font-family: "IBM Plex Sans KR", "Gowun Dodum", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 125, 85, 0.18), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(23, 105, 255, 0.16), transparent 34%),
    linear-gradient(180deg, #fffaf0 0%, #eef5ff 100%);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.page-grid { position: relative; z-index: 1; }
.page-bg {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  filter: blur(20px);
  opacity: 0.88;
}
.page-bg--a {
  top: -150px;
  left: -120px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 242, 85, 0.36), rgba(184, 242, 85, 0));
}
.page-bg--b {
  right: -130px;
  top: 160px;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(23, 105, 255, 0.18), rgba(23, 105, 255, 0));
}

.layout,
.topbar,
.site-footer {
  width: min(calc(100% - 32px), var(--content-width));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 20px;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 15px;
}
.brand__mark {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  background: conic-gradient(from 210deg, var(--accent-2), var(--accent), var(--lime), var(--accent-2));
  box-shadow: 0 16px 36px rgba(23, 105, 255, 0.28);
  position: relative;
}
.brand__mark::before,
.brand__mark::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: #fff;
}
.brand__mark::before { width: 19px; height: 19px; left: 9px; top: 10px; }
.brand__mark::after { width: 14px; height: 14px; right: 10px; bottom: 10px; opacity: .88; }
.brand__text { display: grid; gap: 2px; }
.brand__text strong { font-size: 1.08rem; letter-spacing: -0.03em; }
.brand__text span { color: var(--muted); font-size: 0.92rem; }

.topnav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 32, 51, 0.08);
  backdrop-filter: blur(18px);
}
.topnav a {
  padding: 10px 15px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
}
.topnav a.is-active,
.topnav a:hover {
  color: white;
  background: var(--accent-2);
}

.layout { padding: 8px 0 46px; }
.section__eyebrow {
  margin: 0;
  display: inline-flex;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
  font-size: .78rem;
}

.feed-hero,
.story-rail,
.feed-section,
.article,
.error-page__box,
.site-footer {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.feed-hero {
  border-radius: 40px;
  padding: clamp(28px, 5vw, 54px);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, .55fr);
  gap: 28px;
  overflow: hidden;
  position: relative;
}
.feed-hero::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 32px;
  border: 1px solid rgba(23, 32, 51, 0.07);
  pointer-events: none;
}
.feed-hero h1 {
  margin: 14px 0 14px;
  max-width: 760px;
  font-size: clamp(2.45rem, 5vw, 5.2rem);
  line-height: .98;
  letter-spacing: -0.075em;
}
.feed-hero p:not(.section__eyebrow) {
  margin: 0;
  max-width: 720px;
  color: #526173;
  line-height: 1.78;
  font-size: 1.06rem;
}
.feed-hero__stats {
  display: grid;
  align-content: end;
  gap: 12px;
}
.feed-hero__stats span {
  min-height: 74px;
  padding: 17px 18px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(23, 32, 51, .08);
  color: var(--muted);
  font-weight: 700;
}
.feed-hero__stats strong {
  color: var(--text);
  font-size: 1.55rem;
  letter-spacing: -0.05em;
}

.story-rail {
  margin-top: 18px;
  border-radius: 28px;
  padding: 16px;
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.story-chip {
  flex: 0 0 auto;
  width: 86px;
  display: grid;
  gap: 8px;
  justify-items: center;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 800;
}
.story-chip img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--coral), var(--accent), var(--lime));
  object-fit: cover;
  box-shadow: 0 10px 26px rgba(23, 32, 51, .12);
}

.feed-section {
  margin-top: 18px;
  border-radius: 40px;
  padding: clamp(18px, 3vw, 30px);
}
.feed-section__head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 18px;
}
.feed-section__head h2 {
  margin: 8px 0 0;
  font-size: clamp(1.6rem, 3vw, 2.55rem);
  letter-spacing: -0.06em;
}
.feed-section__note {
  color: var(--muted);
  font-weight: 700;
  font-size: .92rem;
}

.feed-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.feed-card {
  min-width: 0;
  border-radius: 30px;
  overflow: hidden;
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(23, 32, 51, .08);
  box-shadow: 0 16px 36px rgba(23, 32, 51, .075);
  transition: transform .18s ease, box-shadow .18s ease;
}
.feed-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 54px rgba(23, 32, 51, .13);
}
.feed-card--featured {
  grid-column: span 2;
}
.feed-card__media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #0c2346;
}
.feed-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .28s ease;
}
.feed-card:hover .feed-card__media img {
  transform: scale(1.04);
}
.feed-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 35, 70, 0) 48%, rgba(12, 35, 70, .54) 100%);
}
.feed-card__overlay {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.feed-card__overlay span {
  max-width: 100%;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  color: #10213a;
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .16);
}
.feed-card__body {
  padding: 18px 18px 20px;
  display: grid;
  gap: 10px;
}
.feed-card__meta,
.post-card__meta,
.article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 700;
}
.feed-card h2,
.post-card__title {
  margin: 0;
  font-size: clamp(1.05rem, 1.6vw, 1.24rem);
  line-height: 1.42;
  letter-spacing: -0.045em;
}
.feed-card h2 a:hover { color: var(--accent); }
.feed-card p {
  margin: 0;
  color: #647084;
  line-height: 1.62;
  font-size: .96rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
}
.button--primary {
  color: white;
  background: var(--accent-2);
  box-shadow: 0 16px 32px rgba(23, 105, 255, .22);
}
.button--ghost {
  border: 1px solid rgba(23, 32, 51, .12);
  background: rgba(255,255,255,.86);
}

.hero,
.section,
.cta-box,
.post-card,
.related-card {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
}
.hero {
  padding: 38px;
  display: grid;
  gap: 24px;
}
.hero h1,
.section h1,
.article h1 {
  margin: 14px 0 12px;
  font-size: clamp(2.2rem, 4.3vw, 4.3rem);
  line-height: 1.06;
  letter-spacing: -0.06em;
}
.hero p,
.article__lede,
.cta-box p,
.site-footer p,
.error-page__box p {
  color: var(--muted);
  line-height: 1.78;
  font-size: 1.02rem;
}
.keyword-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.keyword-cloud span {
  padding: 10px 13px;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(23,32,51,.08);
  color: var(--muted);
  font-weight: 800;
}
.section {
  padding: 28px;
  margin-top: 24px;
}
.section__head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 18px;
}
.section__head h2 {
  margin: 8px 0 0;
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  letter-spacing: -0.045em;
}

.post-grid,
.posts-grid,
.archive-grid,
.related-grid {
  display: grid;
  gap: 18px;
}
.post-grid,
.posts-grid,
.related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.post-card,
.related-card {
  overflow: hidden;
  background: rgba(255, 255, 255, .9);
}
.post-card__media {
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--accent-2);
}
.post-card__media img,
.related-card img,
.article__hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-card__body {
  padding: 18px 18px 20px;
  display: grid;
  gap: 12px;
}
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(23,105,255,.1);
  color: var(--accent-2);
  font-weight: 800;
}
.post-card__excerpt {
  margin: 0;
  color: var(--muted);
  line-height: 1.68;
}
.post-card__footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: .92rem;
}
.post-card__footer a { color: var(--accent); font-weight: 800; }
.post-card--hero {
  grid-column: span 2;
  display: grid;
  grid-template-columns: minmax(280px, .95fr) minmax(0, 1fr);
}
.post-card--hero .post-card__media { aspect-ratio: auto; min-height: 320px; }
.post-card--hero .post-card__body { padding: 30px; align-content: center; }
.post-card--hero .post-card__title { font-size: clamp(1.8rem, 2.6vw, 2.7rem); }

.site-footer {
  margin: 24px auto 40px;
  border-radius: 30px;
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}
.site-footer p { margin: 8px 0 0; max-width: 680px; }
.site-footer__links { display: flex; gap: 14px; flex-wrap: wrap; }
.site-footer__links a { color: var(--accent); font-weight: 800; }

.layout--article { max-width: 980px; }
.article {
  border-radius: var(--radius-xl);
  padding: 30px;
}
.article__hero {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
}
.article__hero-image {
  border-radius: 28px;
  overflow: hidden;
  background: var(--accent-2);
  aspect-ratio: 1 / 1;
}
.article__hero h1 {
  margin: 6px 0 0;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1.12;
  letter-spacing: -0.055em;
}
.article__content {
  display: grid;
  gap: 18px;
  font-size: 1.05rem;
  line-height: 1.88;
}
.article__content h2,
.article__content h3,
.article__content h4 {
  margin: 22px 0 4px;
  line-height: 1.28;
  letter-spacing: -0.04em;
}
.article__content p { margin: 0; color: #1e293b; }
.article__content blockquote {
  margin: 8px 0;
  padding: 18px 20px;
  border-left: 4px solid var(--accent);
  background: rgba(23,105,255,.06);
  border-radius: 18px;
  color: #1f2c45;
}
.article__content ul,
.article__content ol {
  margin: 0;
  padding-left: 1.35rem;
  color: #1e293b;
}
.article__cta {
  margin-top: 28px;
  padding: 24px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(12,35,70,.96), rgba(23,105,255,.92));
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.article__cta h2 { margin: 10px 0; letter-spacing: -0.04em; line-height: 1.18; }
.article__cta p { color: rgba(255,255,255,.82); max-width: 700px; }
.section--related {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  margin-top: 28px;
}
.related-card {
  display: grid;
  grid-template-rows: auto 1fr;
}
.related-card img { aspect-ratio: 1 / 1; }
.related-card__body { padding: 16px; }
.related-card__meta {
  color: var(--muted);
  font-size: .86rem;
  margin-bottom: 8px;
}
.related-card__title {
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: -0.035em;
}
.error-page { padding: 40px 0 8px; }
.error-page__box {
  border-radius: var(--radius-xl);
  padding: 40px;
}
.error-page__box h1 {
  margin: 12px 0 10px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -0.05em;
}

@media (max-width: 1080px) {
  .feed-hero,
  .post-card--hero,
  .cta-box,
  .article__cta {
    grid-template-columns: 1fr;
    display: grid;
  }
  .feed-card--featured { grid-column: span 1; }
  .feed-grid,
  .post-grid,
  .posts-grid,
  .archive-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .layout,
  .topbar,
  .site-footer {
    width: min(calc(100% - 20px), var(--content-width));
  }
  .topbar,
  .site-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .topnav { justify-content: space-between; }
  .feed-hero,
  .feed-section,
  .article,
  .section,
  .hero,
  .cta-box,
  .error-page__box,
  .site-footer {
    padding: 20px;
    border-radius: 26px;
  }
  .feed-grid,
  .post-grid,
  .posts-grid,
  .archive-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }
  .feed-card,
  .post-card,
  .related-card {
    border-radius: 24px;
  }
  .feed-card__overlay span { font-size: .78rem; padding: 7px 10px; }
  .story-rail { margin-left: -10px; margin-right: -10px; border-radius: 0; }
  .post-card--hero .post-card__body { padding: 20px; }
  .article__content { font-size: 1rem; }
}
