/**
 * TechChang Homepage — Minimal & Clean (Figma / Linear / Vercel 계열)
 * 대문 전용 스타일. 전역 premium.css와 충돌하지 않도록 모든 클래스에 tc- 접두사 사용.
 *
 * 원칙:
 * - 뉴트럴 팔레트 + 단일 인디고 포인트
 * - 넉넉한 여백, 1px 보더, 은은한 그림자
 * - 회전 그라디언트/비비드 효과 제거, 정제된 타이포그래피
 */

.tc-home {
    /* ── 디자인 토큰 (대문 스코프 한정) ── */
    --tc-bg:        #ffffff;
    --tc-bg-soft:   #fafafa;
    --tc-bg-mute:   #f4f4f5;
    --tc-ink:       #18181b;   /* 헤드라인 */
    --tc-ink-2:     #3f3f46;   /* 본문 */
    --tc-ink-3:     #71717a;   /* 보조 */
    --tc-ink-4:     #a1a1aa;   /* 흐린 라벨 */
    --tc-line:      #e4e4e7;   /* 기본 보더 */
    --tc-line-soft: #f0f0f1;
    --tc-accent:    #4f46e5;   /* 단일 포인트 (인디고) */
    --tc-accent-2:  #6366f1;
    --tc-accent-wash:#eef2ff;

    --tc-shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.04);
    --tc-shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
    --tc-shadow-md: 0 4px 12px rgba(16, 24, 40, 0.06), 0 2px 4px rgba(16, 24, 40, 0.04);
    --tc-shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.08), 0 4px 8px rgba(16, 24, 40, 0.04);

    --tc-r-sm: 8px;
    --tc-r-md: 12px;
    --tc-r-lg: 16px;
    --tc-r-xl: 20px;

    --tc-maxw: 1120px;

    background: var(--tc-bg);
    color: var(--tc-ink-2);
    font-feature-settings: "cv11", "ss01";
    -webkit-font-smoothing: antialiased;
}

.tc-home a { text-decoration: none; }

/* ============================================
   Hero
   ============================================ */
.tc-hero {
    position: relative;
    max-width: var(--tc-maxw);
    margin: 0 auto;
    padding: clamp(4rem, 9vw, 7rem) 1.5rem clamp(2.5rem, 5vw, 4rem);
    text-align: center;
    overflow: hidden;
}

/* 은은한 도트 그리드 배경 (Figma 캔버스 느낌) */
.tc-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at center, var(--tc-line) 1px, transparent 1px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 0%, transparent 75%);
            mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 0%, transparent 75%);
    opacity: 0.55;
    z-index: 0;
    pointer-events: none;
}

.tc-hero > * { position: relative; z-index: 1; }

.tc-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.125rem;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--tc-ink-2);
    background: var(--tc-bg);
    border: 1px solid var(--tc-line);
    border-radius: 999px;
    box-shadow: var(--tc-shadow-xs);
}
.tc-eyebrow .tc-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--tc-accent);
    box-shadow: 0 0 0 3px var(--tc-accent-wash);
}

.tc-hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.035em;
    color: var(--tc-ink);
    margin: 0 0 1.25rem;
}
.tc-hero-title .tc-accent-text { color: var(--tc-accent); }

.tc-hero-sub {
    max-width: 640px;
    margin: 0 auto 2.25rem;
    font-size: clamp(1rem, 2.2vw, 1.1875rem);
    line-height: 1.65;
    color: var(--tc-ink-3);
    word-break: keep-all;
}

.tc-hero-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3.5rem;
}

/* ── 버튼 ── */
.tc-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.375rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--tc-r-md);
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
    line-height: 1;
}
.tc-btn-primary {
    background: var(--tc-ink);
    color: #fff;
    box-shadow: var(--tc-shadow-sm);
}
.tc-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--tc-shadow-md);
    background: #000;
}
.tc-btn-ghost {
    background: var(--tc-bg);
    color: var(--tc-ink-2);
    border-color: var(--tc-line);
    box-shadow: var(--tc-shadow-xs);
}
.tc-btn-ghost:hover {
    transform: translateY(-1px);
    border-color: var(--tc-ink-4);
    box-shadow: var(--tc-shadow-sm);
}
.tc-btn-admin {
    background: var(--tc-accent);
    color: #fff;
}
.tc-btn-admin:hover { transform: translateY(-1px); background: var(--tc-accent-2); }

/* ── Stats (구분선으로 나눈 미니멀 인라인) ── */
.tc-stats {
    display: inline-flex;
    align-items: stretch;
    gap: 0;
    padding: 0.25rem 0;
    border: 1px solid var(--tc-line);
    border-radius: var(--tc-r-lg);
    background: var(--tc-bg);
    box-shadow: var(--tc-shadow-sm);
    overflow: hidden;
}
.tc-stat {
    padding: 1.125rem 2rem;
    text-align: center;
    position: relative;
}
.tc-stat + .tc-stat::before {
    content: "";
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    height: 56%;
    width: 1px;
    background: var(--tc-line);
}
.tc-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--tc-ink);
    line-height: 1.1;
}
.tc-stat-label {
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--tc-ink-4);
}

/* ============================================
   Section frame
   ============================================ */
.tc-section {
    max-width: var(--tc-maxw);
    margin: 0 auto;
    padding: clamp(2.5rem, 5vw, 4rem) 1.5rem;
}
.tc-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
}
.tc-section-title {
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--tc-ink);
    margin: 0;
}
.tc-section-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--tc-ink-3);
    transition: color 0.15s ease;
}
.tc-section-link:hover { color: var(--tc-accent); }

/* ── Category pills (고스트 → 인디고 액티브) ── */
.tc-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
}
.tc-pill {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 999px;
    background: var(--tc-bg);
    color: var(--tc-ink-3);
    border: 1px solid var(--tc-line);
    transition: all 0.15s ease;
}
.tc-pill:hover {
    color: var(--tc-ink);
    border-color: var(--tc-ink-4);
    background: var(--tc-bg-soft);
}
.tc-pill.is-active {
    background: var(--tc-ink);
    color: #fff;
    border-color: var(--tc-ink);
}

/* ============================================
   Post grid — clean cards
   ============================================ */
.tc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 1rem;
}
.tc-card {
    display: flex;
    flex-direction: column;
    background: var(--tc-bg);
    border: 1px solid var(--tc-line);
    border-radius: var(--tc-r-lg);
    padding: 1.375rem;
    box-shadow: var(--tc-shadow-xs);
    transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    min-height: 152px;
}
.tc-card:hover {
    transform: translateY(-3px);
    border-color: #d4d4d8;
    box-shadow: var(--tc-shadow-md);
}
.tc-card-badge {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    margin-bottom: 0.875rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    border-radius: 6px;
}
.tc-card-badge::before {
    content: "";
    width: 6px; height: 6px; border-radius: 50%;
    background: currentColor;
}
.tc-card-title {
    font-size: 1.0625rem;
    font-weight: 650;
    line-height: 1.45;
    letter-spacing: -0.01em;
    color: var(--tc-ink);
    margin: 0 0 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tc-card:hover .tc-card-title { color: var(--tc-accent); }
.tc-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
    padding-top: 0.875rem;
    border-top: 1px solid var(--tc-line-soft);
    font-size: 0.8125rem;
    color: var(--tc-ink-4);
}
.tc-card-meta span { display: inline-flex; align-items: center; gap: 0.3125rem; }
.tc-card-meta .tc-date { margin-left: auto; }

/* ── 카테고리별 배지 색 (뮤트 톤) ── */
.tc-badge-hrd        { background: #eef2ff; color: #4f46e5; }
.tc-badge-data       { background: #fff7ed; color: #ea580c; }
.tc-badge-programming{ background: #ecfdf5; color: #059669; }
.tc-badge-notice     { background: #fef2f2; color: #dc2626; }
.tc-badge-free       { background: #f4f4f5; color: #52525b; }

/* ── Empty state ── */
.tc-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 1.5rem;
    color: var(--tc-ink-4);
    border: 1px dashed var(--tc-line);
    border-radius: var(--tc-r-lg);
    background: var(--tc-bg-soft);
}
.tc-empty i { font-size: 1.75rem; margin-bottom: 0.75rem; display: block; color: var(--tc-line); }

/* ============================================
   Pagination — minimal
   ============================================ */
.tc-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.375rem;
    margin-top: 2.5rem;
}
.tc-pagination a,
.tc-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 0.625rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--tc-r-sm);
    background: var(--tc-bg);
    color: var(--tc-ink-3);
    border: 1px solid var(--tc-line);
    transition: all 0.15s ease;
}
.tc-pagination a:hover {
    color: var(--tc-ink);
    border-color: var(--tc-ink-4);
}
.tc-pagination .is-current {
    background: var(--tc-ink);
    color: #fff;
    border-color: var(--tc-ink);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .tc-stats { width: 100%; }
    .tc-stat { flex: 1; padding: 1rem 0.75rem; }
    .tc-grid { grid-template-columns: 1fr; }
    .tc-section-head { align-items: center; }
}

@media (max-width: 420px) {
    .tc-hero-actions { flex-direction: column; }
    .tc-hero-actions .tc-btn { width: 100%; justify-content: center; }
}
