/* ============================
   SKELETON LOADER
   ============================ */
.skel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.skel-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  overflow: hidden;
}
.skel-line {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: skelShimmer 1.5s ease-in-out infinite;
  margin-bottom: 10px;
}
.skel-line.w60 { width: 60%; }
.skel-line.w80 { width: 80%; }
.skel-line.w40 { width: 40%; }
.skel-line.h20 { height: 20px; }
.skel-circle {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: skelShimmer 1.5s ease-in-out infinite;
  margin-bottom: 16px;
}
@keyframes skelShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Hide skeleton when content loaded */
.skel-loaded .skel-grid { display: none; }

/* ============================
   HERO
   ============================ */
.hc-hero {
  position: relative;
  min-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 140px 40px 80px;
}

.hc-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hc-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,229,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 70%);
}

.hc-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
}
.hc-glow-1 {
  width: 500px; height: 500px;
  background: var(--cyan);
  top: -150px; left: 20%;
  opacity: 0.12;
  animation: hcGlowPulse 8s ease-in-out infinite;
}
.hc-glow-2 {
  width: 400px; height: 400px;
  background: var(--purple);
  bottom: -100px; right: 15%;
  opacity: 0.1;
  animation: hcGlowPulse 10s ease-in-out infinite reverse;
}

@keyframes hcGlowPulse {
  0%, 100% { opacity: 0.1; transform: scale(1); }
  50% { opacity: 0.2; transform: scale(1.15); }
}

/* Floating icons */
.hc-floating-icons {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hc-float-icon {
  position: absolute;
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(8px);
  opacity: 0;
  animation: hcFloatIn 0.8s ease forwards, hcFloatDrift var(--dur) ease-in-out infinite alternate;
  animation-delay: var(--d), calc(var(--d) + 0.8s);
}

@keyframes hcFloatIn {
  to { opacity: 0.5; }
}
@keyframes hcFloatDrift {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(var(--drift, -12px)) rotate(var(--rot, 5deg)); }
}

/* Hero content */
.hc-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
}

.hc-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(0,229,255,0.08);
  border: 1px solid rgba(0,229,255,0.15);
  color: var(--cyan);
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}

.hc-hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
}
.hc-accent {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hc-hero-sub {
  color: var(--text2);
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 40px;
}

/* Search box */
.hc-search-wrap {
  position: relative;
  max-width: 560px;
  margin: 0 auto 24px;
}

.hc-search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 16px 20px;
  transition: all 0.3s ease;
}
.hc-search-box:focus-within {
  border-color: var(--cyan);
  background: rgba(0,229,255,0.04);
  box-shadow: 0 0 0 4px rgba(0,229,255,0.08), 0 20px 60px rgba(0,0,0,0.3);
}

.hc-search-icon { color: var(--text2); flex-shrink: 0; }

.hc-search-box input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-size: 16px;
  font-family: inherit;
}
.hc-search-box input::placeholder { color: var(--text2); }

.hc-kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text2);
  white-space: nowrap;
}

/* Search results dropdown */
.hc-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: rgba(17, 24, 39, 0.98);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  max-height: 400px;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 100;
}
.hc-search-results.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hc-sr-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 20px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.hc-sr-item:last-child { border-bottom: none; }
.hc-sr-item:hover { background: rgba(255,255,255,0.04); }

.hc-sr-cat-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-top: 7px;
  flex-shrink: 0;
}
.hc-sr-text h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 3px;
}
.hc-sr-text p {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.4;
}
.hc-sr-type {
  margin-left: auto;
  font-size: 11px;
  color: var(--text2);
  background: rgba(255,255,255,0.05);
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 3px;
}
.hc-sr-empty {
  padding: 32px 20px;
  text-align: center;
  color: var(--text2);
  font-size: 14px;
}

/* Popular tags */
.hc-popular {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.hc-pop-label {
  font-size: 13px;
  color: var(--text2);
}
.hc-pop-tag {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 6px 14px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}
.hc-pop-tag:hover {
  background: rgba(0,229,255,0.08);
  border-color: rgba(0,229,255,0.2);
  color: var(--cyan);
}

/* ============================
   CATEGORIES GRID
   ============================ */
.hc-categories {
  padding: 60px 0 80px;
}
.hc-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.hc-cat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  cursor: pointer;
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}
.hc-cat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--cat-color, var(--cyan));
  opacity: 0;
  transition: opacity 0.3s;
}
.hc-cat-card:hover {
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.hc-cat-card:hover::before { opacity: 1; }

.hc-cat-icon-wrap {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--cat-color, var(--cyan));
  margin-bottom: 20px;
}

.hc-cat-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.hc-cat-card p {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.5;
  margin-bottom: 16px;
}
.hc-cat-count {
  font-size: 13px;
  color: var(--cat-color, var(--cyan));
  font-weight: 600;
}

/* ============================
   ARTICLES
   ============================ */
.hc-articles {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.hc-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 48px;
  flex-wrap: wrap;
  gap: 16px;
}
.hc-section-header h2 {
  font-size: 32px;
  font-weight: 800;
}

/* Filter bar */
.hc-filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.hc-filter {
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text2);
  cursor: pointer;
  transition: all 0.2s;
}
.hc-filter:hover { color: #fff; border-color: rgba(255,255,255,0.15); }
.hc-filter.active {
  background: rgba(0,229,255,0.1);
  border-color: rgba(0,229,255,0.25);
  color: var(--cyan);
}

/* Articles grid */
.hc-articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.hc-article-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(20px);
  animation: hcCardIn 0.5s ease forwards;
}
.hc-article-card:hover {
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

@keyframes hcCardIn {
  to { opacity: 1; transform: translateY(0); }
}

.hc-art-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.hc-art-cat {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(0,0,0,0.3);
  color: var(--cat-color, var(--cyan));
  border: 1px solid rgba(255,255,255,0.05);
}
.hc-art-time {
  font-size: 12px;
  color: var(--text2);
  margin-left: auto;
}

.hc-article-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.35;
}
.hc-article-card p {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.55;
  flex: 1;
}
.hc-art-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.hc-art-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--cyan);
  transition: opacity 0.2s;
}
.hc-article-card:hover .hc-art-link { opacity: 0.8; }

/* ============================
   FAQ
   ============================ */
.hc-faq {
  padding: 100px 0;
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.hc-faq::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(124,77,255,0.06), transparent 70%);
  pointer-events: none;
}

.hc-faq-sub {
  color: var(--text2);
  font-size: 16px;
  margin-top: 8px;
}
.hc-faq .hc-section-header {
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 56px;
}
.hc-faq .hc-section-header h2 {
  font-size: 36px;
}

.hc-faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hc-faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
}
.hc-faq-item:hover {
  border-color: rgba(255,255,255,0.1);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.hc-faq-item.open {
  border-color: rgba(124,77,255,0.25);
  box-shadow: 0 8px 32px rgba(124,77,255,0.08);
}

.hc-faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  background: none;
  border: none;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  gap: 16px;
  transition: color 0.2s;
}
.hc-faq-item.open .hc-faq-q {
  color: var(--purple);
}
.hc-faq-q span { flex: 1; }

.hc-faq-chevron-wrap {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
}
.hc-faq-item.open .hc-faq-chevron-wrap {
  background: rgba(124,77,255,0.1);
  border-color: rgba(124,77,255,0.2);
}
.hc-faq-chevron {
  flex-shrink: 0;
  transition: transform 0.3s ease;
  color: var(--text2);
}
.hc-faq-item.open .hc-faq-chevron {
  transform: rotate(180deg);
  color: var(--purple);
}

.hc-faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.4s ease;
}
.hc-faq-item.open .hc-faq-a {
  max-height: 400px;
  padding: 0 28px 24px;
}
.hc-faq-a-inner {
  padding-top: 4px;
  padding-left: 18px;
  border-left: 3px solid rgba(124,77,255,0.2);
}
.hc-faq-a p {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.75;
}

/* ============================
   CONTACT
   ============================ */
.hc-contact {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}
.hc-contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.hc-contact-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px;
  text-align: center;
  transition: all 0.3s ease;
}
.hc-contact-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.1);
  box-shadow: 0 16px 50px rgba(0,0,0,0.25);
}

.hc-ct-icon {
  width: 64px; height: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--ct-color, var(--cyan));
  margin: 0 auto 20px;
}
.hc-contact-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}
.hc-contact-card p {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.55;
  margin-bottom: 24px;
}
.hc-ct-btn {
  padding: 12px 28px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: var(--ct-color, var(--cyan));
  transition: all 0.25s;
}
.hc-ct-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--ct-color, var(--cyan));
  box-shadow: 0 0 20px rgba(0,229,255,0.15);
}

/* ============================
   REVEAL ANIMATION
   ============================ */
.reveal-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================
   NAV SCROLL BEHAVIOR
   ============================ */
#nav.hidden { transform: translateY(-100%); }

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 900px) {
  .hc-cat-grid,
  .hc-articles-grid,
  .hc-contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hc-hero {
    padding: 100px 20px 60px;
    min-height: auto;
  }
  .hc-hero-content { max-width: 100%; }
  .hc-hero-sub { font-size: 15px; }
  .hc-float-icon { display: none !important; }
  .hc-glow-1, .hc-glow-2 { display: none; }
  .hc-search-results { max-height: 60vh; }
  .hc-kbd { display: none; }

  .hc-categories { padding: 40px 0 60px; }
  .hc-cat-card { padding: 24px; }
  .hc-cat-card h3 { font-size: 16px; }

  .hc-articles { padding: 60px 0; }
  .hc-section-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .hc-section-header h2 { font-size: 26px; }
  .hc-filter { padding: 6px 14px; font-size: 12px; }

  .hc-faq { padding: 60px 0; }
  .hc-faq .hc-section-header h2 { font-size: 28px; }
  .hc-faq-q { padding: 18px 20px; font-size: 15px; }
  .hc-faq-item.open .hc-faq-a { padding: 0 20px 20px; }

  .hc-contact { padding: 60px 0; }
  .hc-contact-card { padding: 28px; }
  .hc-contact-card h3 { font-size: 18px; }
}

@media (max-width: 600px) {
  .hc-cat-grid,
  .hc-articles-grid,
  .hc-contact-grid {
    grid-template-columns: 1fr;
  }
  .hc-hero { padding: 90px 16px 50px; }
  .hc-hero h1 { font-size: 28px; }
  .hc-section-header { flex-direction: column; align-items: flex-start; }
  .hc-search-box { padding: 12px 16px; }
  .hc-search-box input { font-size: 14px; }
  .hc-pop-tag { padding: 5px 10px; font-size: 12px; }
}

@media (max-width: 480px) {
  .hc-hero h1 { font-size: 24px; }
  .hc-faq-q { font-size: 14px; padding: 16px; }
  .hc-faq-a p { font-size: 13px; }
  .hc-contact-card { padding: 20px; }
}
