/* =============================================================
   home.css — 블로그 목록 페이지 전용 스타일
   base.css 이후 로드
============================================================= */

/* Layout: article 페이지와 동일한 780px */
.wrap { max-width: 780px; }

/* -------------------------------------------------------
   Hero section
------------------------------------------------------- */
.hero {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  background:
    radial-gradient(900px 260px at 15% 0%, rgba(124,92,255,.22), transparent 60%),
    radial-gradient(760px 260px at 85% 0%, rgba(50,211,255,.16), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  box-shadow: var(--shadow);
  padding: 22px 22px 18px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: -2px;
  background:
    radial-gradient(500px 200px at 30% 20%, rgba(124,92,255,.10), transparent 60%),
    radial-gradient(500px 200px at 80% 30%, rgba(50,211,255,.08), transparent 55%);
  pointer-events: none;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.pill {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(124,92,255,.30);
  background: rgba(124,92,255,.10);
  color: var(--text);
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 0 4px rgba(124,92,255,.12);
}

.hero h2 {
  margin: 0 0 6px;
  font-size: 28px;
  letter-spacing: -0.4px;
  line-height: 1.18;
  position: relative;
  z-index: 1;
}
.hero .sub {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  position: relative;
  z-index: 1;
  max-width: 78ch;
}

/* -------------------------------------------------------
   Controls (search / sort bar inside hero)
------------------------------------------------------- */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  position: relative;
  z-index: 1;
}
.left, .right {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, .14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  min-width: 260px;
  transition: border-color .18s var(--ease), transform .18s var(--ease);
}
[data-theme="light"] .field { background: rgba(255,255,255,.75); }
.field:focus-within {
  border-color: rgba(124,92,255,.45);
  transform: translateY(-1px);
}
.field svg { width: 16px; height: 16px; opacity: .75; }
.field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-family: var(--font);
}
.field input::placeholder { color: var(--faint); }

.meta {
  color: var(--muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* -------------------------------------------------------
   Article Grid / Cards
------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  box-shadow: var(--shadow2);
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: transform .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
  position: relative;
  overflow: hidden;
}
[data-theme="light"] .card {
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.80));
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(650px 120px at 15% 0%, rgba(124,92,255,.16), transparent 60%),
    radial-gradient(520px 120px at 85% 0%, rgba(50,211,255,.10), transparent 55%);
  opacity: 0;
  transition: opacity .25s var(--ease);
  pointer-events: none;
}
.card:hover {
  transform: translateY(-2px);
  border-color: rgba(124,92,255,.28);
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
}
.card:hover::before { opacity: 1; }
.card:focus-within {
  border-color: rgba(50,211,255,.40);
  transform: translateY(-2px);
}

/* Badge (article number) */
.badge {
  flex: 0 0 auto;
  width: 32px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding-top: 2px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2px;
  position: relative;
  z-index: 1;
  transition: color .18s var(--ease);
  user-select: none;
}
.card:hover .badge { color: var(--accent); }

/* Card content */
.content {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.title a {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  line-height: 1.35;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.title a span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 78ch;
}
.title a:hover { text-decoration: underline; text-decoration-color: rgba(124,92,255,.55); }
.title a:focus { outline: none; }

.arrow { width: 14px; height: 14px; opacity: .65; transform: translateY(1px); }

.desc {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  color: var(--faint);
  font-size: 12px;
}
.row .sep {
  width: 4px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255,255,255,.14);
}
[data-theme="light"] .row .sep { background: rgba(14,18,35,.18); }

/* Empty state */
.empty {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 26px 18px;
  text-align: center;
  color: var(--muted);
  background: rgba(255,255,255,.03);
  margin-top: 10px;
}

/* -------------------------------------------------------
   Pagination
------------------------------------------------------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.pg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  transition: border-color .16s var(--ease), color .16s var(--ease),
              background .16s var(--ease), transform .14s var(--ease);
  user-select: none;
}
.pg-btn:hover:not(:disabled) {
  border-color: rgba(124,92,255,.38);
  color: var(--text);
  transform: translateY(-1px);
}
.pg-btn.active {
  border-color: rgba(124,92,255,.55);
  background: rgba(124,92,255,.12);
  color: var(--accent);
  font-weight: 700;
  pointer-events: none;
}
.pg-btn:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}
.pg-btn.arrow {
  border-color: transparent;
}
.pg-btn.arrow:hover:not(:disabled) {
  border-color: transparent;
}
.pg-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--faint);
  font-size: 13px;
  user-select: none;
}

/* Footer override for home */
footer { margin-top: 18px; }

/* Hint (footer left) */
.hint {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* -------------------------------------------------------
   Responsive
------------------------------------------------------- */
@media (max-width: 720px) {
  .hero h2       { font-size: 22px; }
  .title a span  { max-width: 46ch; }
}
