/* ============================================================
   AIVISION BLOG — cosmic theme (independent from corporate site)
   ============================================================ */
:root {
  --ink:        #0e1116;
  --ink-soft:   #2b3242;
  --muted:      #6b7480;
  --line:       #e7e9ee;
  --line-soft:  #f3f5f9;
  --brand:      #0B3D91;
  --brand-soft: rgba(11,61,145,.08);
  --accent:     #FFC43D;
  --space:      #0a1d44;
  --space-2:    #050f25;
  --radius:     14px;
  --radius-sm:  10px;
  --shadow-sm:  0 1px 2px rgba(15,23,42,.05);
  --shadow-md:  0 8px 28px rgba(15,23,42,.10);
  --shadow-lg:  0 20px 52px rgba(15,23,42,.14);
  --container:  1320px;
}
* { box-sizing: border-box; }
html, body { margin:0; padding:0; }
.blog-body {
  font-family: Pretendard, 'Apple SD Gothic Neo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #fafbfd;
  color: var(--ink);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a   { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
.blog-container { max-width: var(--container); margin: 0 auto; padding: 0 28px; }

/* ============================================================
   COSMIC HERO (listing page only)
   ============================================================ */
.blog-cosmic {
  position: relative;
  min-height: 620px;
  color: #fff;
  overflow: hidden;
  padding-bottom: 56px;
}
.blog-cosmic-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
}
.blog-cosmic-top {
  position: relative; z-index: 3;
  padding-top: 22px;
  display: flex; align-items: center; justify-content: space-between;
}
.blog-brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800;
}
.blog-brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent) 0%, #ffd86b 100%);
  color: var(--brand);
  font-weight: 900; font-size: 17px; letter-spacing: -.02em;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(255,196,61,.4);
}
.blog-brand-text {
  font-size: 16px; letter-spacing: -.01em;
  color: rgba(255,255,255,.92);
}
.blog-mini-header .blog-brand-text,
.blog-mini-header .blog-brand-mark { color: var(--brand); }
.blog-mini-header .blog-brand-mark { background: var(--brand); color: #fff; box-shadow: none; }
.blog-top-nav {
  display: flex; gap: 22px;
  font-size: 13.5px; font-weight: 600;
}
.blog-top-nav a {
  color: rgba(255,255,255,.78);
  transition: color .15s;
}
.blog-top-nav a:hover { color: #fff; }
.blog-mini-header .blog-top-nav a { color: var(--muted); }
.blog-mini-header .blog-top-nav a:hover { color: var(--brand); }

.blog-cosmic-inner {
  position: relative; z-index: 2;
  padding: 56px 28px 0;
  text-align: center;
}
.blog-cosmic-title {
  font-size: clamp(48px, 7vw, 92px);
  font-weight: 900; line-height: 1.05;
  letter-spacing: -.04em;
  margin: 0 0 16px;
  color: #fff;
  text-shadow: 0 6px 28px rgba(0,0,0,.45);
}
.blog-cosmic-title span { color: var(--accent); }
.blog-cosmic-sub {
  font-size: clamp(15px, 1.5vw, 18px);
  color: rgba(255,255,255,.82);
  margin: 0 0 32px;
  font-weight: 500;
}

/* Language pills */
.blog-cosmic-langs {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 10px; margin-bottom: 32px;
  max-width: 880px; margin-left: auto; margin-right: auto;
}
.blog-lang-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 18px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  letter-spacing: .04em;
  color: rgba(255,255,255,.78);
  backdrop-filter: blur(8px);
  transition: all .15s;
}
.blog-lang-pill strong {
  font-weight: 800; color: #fff;
  background: rgba(255,255,255,.14);
  padding: 2px 8px; border-radius: 6px;
  font-size: 11px;
}
.blog-lang-pill:hover {
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.32);
  color: #fff;
  transform: translateY(-1px);
}
.blog-lang-pill.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--brand);
  box-shadow: 0 4px 14px rgba(255,196,61,.45);
}
.blog-lang-pill.is-active strong {
  background: var(--brand); color: var(--accent);
}

/* Search bar */
.blog-cosmic-search {
  display: flex; align-items: center; gap: 12px;
  max-width: 720px; margin: 0 auto;
  padding: 6px 20px 6px 22px;
  background: rgba(255,255,255,.97);
  border-radius: 999px;
  box-shadow: 0 14px 38px rgba(0,0,0,.3), 0 0 0 1px rgba(255,255,255,.1);
  transition: box-shadow .2s;
}
.blog-cosmic-search:focus-within {
  box-shadow: 0 14px 38px rgba(0,0,0,.35), 0 0 0 3px rgba(255,196,61,.4);
}
.blog-cosmic-search svg { flex: none; opacity: .6; }
.blog-cosmic-search input {
  flex: 1; border: 0; background: transparent;
  font-size: 16px; padding: 14px 0;
  outline: none; font-family: inherit; color: var(--ink);
}
.blog-cosmic-search input::placeholder { color: #94a0b3; }

/* Category tabs floating below hero */
.blog-tabs-wrap {
  position: relative; z-index: 3;
  margin-top: 56px;
}
.blog-tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 14px 14px;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  justify-content: center;
}
.blog-tab {
  padding: 9px 16px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: all .15s;
}
.blog-tab:hover { background: var(--line-soft); color: var(--ink); }
.blog-tab.is-active { background: var(--brand); color: #fff; }

/* ============================================================
   MINI HEADER (single post page)
   ============================================================ */
.blog-mini-header {
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.blog-mini-header .blog-container {
  display: flex; align-items: center; justify-content: space-between;
}

/* ============================================================
   MAIN GRID + RIGHT SIDEBAR
   ============================================================ */
.blog-grid-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  padding-top: 48px; padding-bottom: 80px;
}
@media (max-width: 1024px) {
  .blog-grid-wrap { grid-template-columns: 1fr; }
}
.blog-main-col { min-width: 0; }

/* Featured top row (2-col) */
.blog-featured-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 20px; margin-bottom: 40px;
}
@media (max-width: 720px) { .blog-featured-row { grid-template-columns: 1fr; } }
.blog-feat-card {
  background: #fff; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s;
  border: 1px solid var(--line);
}
.blog-feat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.blog-feat-link { display: block; }
.blog-feat-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--line-soft);
  background-size: cover; background-position: center;
}
.blog-feat-cat {
  position: absolute; top: 14px; left: 14px;
  padding: 5px 12px; background: rgba(255,255,255,.95);
  color: var(--brand); border-radius: 999px;
  font-size: 12px; font-weight: 700;
}
.blog-feat-body { padding: 22px 24px 24px; }
.blog-feat-title {
  font-size: 20px; font-weight: 800; line-height: 1.35;
  letter-spacing: -.02em; margin: 0 0 10px;
  color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: keep-all;
}
.blog-feat-excerpt {
  font-size: 14.5px; line-height: 1.6; color: var(--muted);
  margin: 0 0 14px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; word-break: keep-all;
}
.blog-feat-meta {
  font-size: 12.5px; color: var(--muted);
  display: flex; gap: 6px;
}

.blog-listing-head { margin-bottom: 22px; }
.blog-listing-head h2 {
  font-size: 22px; font-weight: 800;
  letter-spacing: -.02em; margin: 0;
}
.blog-count { font-size: 14px; color: var(--muted); margin-left: 6px; }
.blog-cat-desc {
  margin: 10px 0 0; padding: 12px 16px;
  background: var(--brand-soft); border-radius: var(--radius-sm);
  font-size: 14px; color: var(--brand);
}

/* Standard card grid (2 columns inside main col) */
.blog-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(2, 1fr);
  list-style: none; margin: 0; padding: 0;
}
@media (max-width: 640px) { .blog-grid { grid-template-columns: 1fr; } }

.blog-card {
  background: #fff; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s;
  border: 1px solid var(--line);
}
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: transparent; }
.blog-card-link { display: block; height: 100%; }
.blog-card-thumb {
  aspect-ratio: 16/9;
  background: var(--line-soft);
  background-size: cover; background-position: center;
}
.blog-card-body { padding: 18px 20px 20px; }
.blog-card-cat {
  display: inline-block; font-size: 12.5px; font-weight: 700;
  color: var(--brand); margin-bottom: 8px;
}
.blog-card-title {
  font-size: 17px; font-weight: 800; line-height: 1.4;
  margin: 0 0 8px; letter-spacing: -.015em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: keep-all;
}
.blog-card-excerpt {
  font-size: 13.5px; line-height: 1.6; color: var(--muted);
  margin: 0 0 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: keep-all;
}
.blog-card-meta {
  font-size: 12px; color: var(--muted);
  display: flex; gap: 6px;
}

.blog-empty {
  padding: 80px 20px; text-align: center;
  color: var(--muted);
  background: #fff; border-radius: var(--radius);
  border: 1px dashed var(--line);
}

/* ============================================================
   RIGHT SIDEBAR
   ============================================================ */
.blog-side-col {
  position: sticky; top: 20px; align-self: start;
  display: flex; flex-direction: column; gap: 20px;
}
@media (max-width: 1024px) { .blog-side-col { position: static; } }
.blog-side-card {
  background: #fff; border-radius: var(--radius);
  padding: 22px 22px 18px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}
.blog-side-title {
  font-size: 15px; font-weight: 800;
  margin: 0 0 16px; color: var(--ink);
  letter-spacing: -.01em;
}
.blog-side-cats { list-style: none; margin: 0; padding: 0; }
.blog-side-cats li + li { margin-top: 2px; }
.blog-side-cats a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-radius: 10px;
  font-size: 14px; font-weight: 600; color: var(--ink-soft);
  transition: all .15s;
}
.blog-side-cats a:hover { background: var(--line-soft); }
.blog-side-cats a.is-active { background: var(--brand-soft); color: var(--brand); }
.blog-side-cat-count {
  font-size: 12px; font-weight: 700;
  padding: 2px 9px; border-radius: 999px;
  background: var(--line-soft); color: var(--muted);
}
.blog-side-cats a.is-active .blog-side-cat-count {
  background: var(--brand); color: #fff;
}

.blog-side-recent { list-style: none; margin: 0; padding: 0; }
.blog-side-recent li + li { margin-top: 4px; border-top: 1px solid var(--line-soft); padding-top: 12px; }
.blog-side-recent a { display: block; padding: 4px 0; }
.blog-side-recent-title {
  font-size: 14px; font-weight: 600;
  margin: 0 0 4px; line-height: 1.5; color: var(--ink-soft);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: keep-all;
}
.blog-side-recent a:hover .blog-side-recent-title { color: var(--brand); }
.blog-side-recent-date { font-size: 12px; color: var(--muted); margin: 0; }

/* ============================================================
   PAGER
   ============================================================ */
.blog-pager {
  display: flex; gap: 6px; justify-content: center;
  margin-top: 48px;
}
.blog-pager a {
  padding: 8px 14px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 14px; font-weight: 600;
  color: var(--ink-soft); transition: all .15s;
  background: #fff;
}
.blog-pager a:hover { border-color: var(--brand); color: var(--brand); }
.blog-pager a.is-current { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ============================================================
   POST (single)
   ============================================================ */
.blog-post-head {
  padding: 56px 0 28px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.blog-crumbs { font-size: 13.5px; color: var(--muted); margin-bottom: 16px; }
.blog-crumbs .sep { margin: 0 8px; }
.blog-crumbs a:hover { color: var(--brand); }
.blog-post-cat {
  display: inline-block; padding: 5px 14px;
  background: var(--brand-soft); color: var(--brand);
  border-radius: 999px; font-size: 13px; font-weight: 700;
  margin-bottom: 14px;
}
.blog-post-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800; line-height: 1.3;
  letter-spacing: -.025em; margin: 0 0 16px;
  max-width: 880px; word-break: keep-all;
}
.blog-post-lead {
  font-size: 18px; line-height: 1.7; color: var(--ink-soft);
  margin: 0 0 20px; max-width: 820px; word-break: keep-all;
}
.blog-post-meta {
  display: flex; gap: 8px; flex-wrap: wrap;
  font-size: 14px; color: var(--muted);
}
.blog-post-meta .sep { color: var(--line); }
.blog-post-author { font-weight: 700; color: var(--ink-soft); }

.blog-post-cover {
  max-width: var(--container); margin: 36px auto 48px; padding: 0 28px;
}
.blog-post-cover img {
  width: 100%; max-height: 580px; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow-md);
}

.blog-post-body {
  max-width: 780px; padding: 8px 28px 60px;
  font-size: 17px; line-height: 1.85; color: var(--ink-soft);
  margin: 0 auto;
}
.blog-post-body h2 {
  font-size: 26px; font-weight: 800; line-height: 1.35;
  letter-spacing: -.02em; margin: 56px 0 18px; color: var(--ink);
}
.blog-post-body h3 {
  font-size: 20px; font-weight: 700; line-height: 1.4;
  margin: 40px 0 12px; color: var(--ink);
}
.blog-post-body p { margin: 0 0 20px; word-break: keep-all; }
.blog-post-body ul, .blog-post-body ol { margin: 0 0 24px; padding-left: 28px; }
.blog-post-body li { margin-bottom: 8px; }
.blog-post-body a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.blog-post-body blockquote {
  margin: 28px 0; padding: 20px 24px;
  background: var(--line-soft); border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.blog-post-body img {
  max-width: 100%; height: auto; border-radius: var(--radius-sm);
  margin: 28px 0; box-shadow: var(--shadow-sm);
}
.blog-post-body strong { color: var(--ink); font-weight: 700; }

.blog-post-tags {
  list-style: none; padding: 0;
  margin: 56px 0 0; display: flex; gap: 8px; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding-top: 24px;
}
.blog-post-tags li {
  padding: 6px 14px; background: var(--line-soft);
  border-radius: 999px; font-size: 13px; color: var(--ink-soft);
  font-weight: 600;
}

.blog-related { background: var(--line-soft); padding: 64px 0 80px; }
.blog-related-title {
  font-size: 22px; font-weight: 800;
  letter-spacing: -.02em; margin: 0 0 28px;
}
.blog-grid--compact { grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 720px) { .blog-grid--compact { grid-template-columns: 1fr; } }

/* ============================================================
   FOOTER
   ============================================================ */
.blog-footer {
  background: var(--ink); color: rgba(255,255,255,.7);
  padding: 48px 0 32px;
}
.blog-footer-grid {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 32px; flex-wrap: wrap; margin-bottom: 32px;
}
.blog-footer-name {
  font-size: 18px; font-weight: 800; color: #fff; margin: 0 0 6px;
}
.blog-footer-tag { font-size: 13.5px; margin: 0; }
.blog-footer-addr {
  font-size: 13px; margin: 10px 0 0; max-width: 360px;
  color: rgba(255,255,255,.55); line-height: 1.55;
  word-break: keep-all;
}
.blog-footer-links { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }
.blog-footer-links a { color: rgba(255,255,255,.7); transition: color .15s; }
.blog-footer-links a:hover { color: #fff; }
.blog-copy {
  text-align: center; font-size: 12.5px;
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px;
  margin: 0; color: rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: center;
  gap: 18px; flex-wrap: wrap;
}
.blog-admin-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  color: rgba(255,255,255,.7);
  transition: all .15s;
}
.blog-admin-link:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--brand);
}
.blog-admin-link svg { flex: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .blog-cosmic { min-height: 540px; padding-bottom: 48px; }
  .blog-cosmic-top { padding: 18px 28px 0; }
  .blog-cosmic-inner { padding-top: 36px; }
  .blog-cosmic-title { font-size: clamp(36px, 9vw, 56px); }
  .blog-cosmic-langs { gap: 6px; }
  .blog-lang-pill { padding: 8px 12px; font-size: 11px; }
  .blog-cosmic-search input { font-size: 14px; padding: 12px 0; }
  .blog-tabs { padding: 10px; gap: 4px; }
  .blog-tab { padding: 7px 12px; font-size: 12.5px; }
  .blog-grid-wrap { padding-top: 32px; gap: 28px; }
  .blog-container { padding: 0 20px; }
}
