/* ── AMBIENT BACKGROUND ── */
.ambient {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0; overflow: hidden;
}
.ambient::before {
  content: '';
  position: absolute; top: -30%; left: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255,0,127,0.07) 0%, transparent 70%);
  border-radius: 50%;
  animation: drift1 18s ease-in-out infinite alternate;
}
.ambient::after {
  content: '';
  position: absolute; bottom: -20%; right: -10%;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(0,238,252,0.06) 0%, transparent 70%);
  border-radius: 50%;
  animation: drift2 22s ease-in-out infinite alternate;
}
@keyframes drift1 { from { transform: translate(0,0); } to { transform: translate(80px, 60px); } }
@keyframes drift2 { from { transform: translate(0,0); } to { transform: translate(-60px, -80px); } }

/* ── MAIN ── */
main {
  position: relative; z-index: 1;
  max-width: 1280px; margin: 0 auto;
  padding: 120px 2rem 5rem;
}

/* ── HERO ── */
.hero {
  display: grid;
  grid-template-columns: 1fr minmax(0, 400px);
  gap: 3rem;
  align-items: center;
  margin-bottom: 4rem;
}

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 900; font-size: clamp(3.5rem, 10vw, 7rem);
  text-transform: uppercase; letter-spacing: -0.03em;
  line-height: 0.95; margin-bottom: 1.25rem;
}

.hero h1 .word-1 {
  color: var(--on-surface); display: block;
  animation: slideUp 0.7s cubic-bezier(0.16,1,0.3,1) 0.1s both;
}

.hero h1 .word-2 {
  display: block;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(255,0,127,0.3));
  animation: slideUp 0.7s cubic-bezier(0.16,1,0.3,1) 0.2s both;
}

.hero-sub {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--on-surface-variant);
  animation: slideUp 0.6s cubic-bezier(0.16,1,0.3,1) 0.4s both;
}

/* ── HERO NEWS PANEL ── */
.hero-news {
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  aspect-ratio: 16/9;
  border: 1px solid rgba(255,0,127,0.2);
  box-shadow: 0 0 50px rgba(255,0,127,0.07), 0 0 0 1px rgba(255,255,255,0.03);
  animation: slideUp 0.7s cubic-bezier(0.16,1,0.3,1) 0.3s both;
  background: rgba(20,20,26,0.8);
  transition: border-color 0.5s ease, box-shadow 0.5s ease;
}
.hero-news:hover {
  border-color: rgba(255,0,127,0.7);
  box-shadow: 0 0 40px rgba(255,0,127,0.35), 0 0 80px rgba(255,0,127,0.15), 0 0 120px rgba(255,0,127,0.07);
}

/* Top bar */
.hn-topbar {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1.1rem;
  background: linear-gradient(to bottom, rgba(10,10,16,0.85), transparent);
  z-index: 3;
  transition: opacity 0.4s ease;
}
.hero-news:hover .hn-topbar { opacity: 0; }
.hn-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.58rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--primary);
  display: flex; align-items: center; gap: 0.4rem;
}
.hn-label::before {
  content: '';
  display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 6px rgba(255,0,127,0.8);
  animation: pulse 2s ease-in-out infinite;
}
.hn-view-all {
  display: flex; align-items: center; gap: 0.2rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.58rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.5); text-decoration: none;
  transition: color 0.2s;
}
.hn-view-all:hover { color: var(--secondary); }
.hn-view-all .material-symbols-outlined { font-size: 0.8rem; }

/* Slides */
.hn-slide {
  position: absolute; inset: 0;
  text-decoration: none;
  opacity: 0; transition: opacity 0.6s ease;
  pointer-events: none;
}
.hn-slide.active { opacity: 1; pointer-events: auto; }

.hn-slide-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0.55; transition: opacity 0.5s ease, transform 8s ease;
}
.hn-slide.active .hn-slide-img { transform: scale(1.04); }
.hero-news:hover .hn-slide.active .hn-slide-img {
  transform: scale(1.09);
  opacity: 0.75;
  transition: opacity 0.5s ease, transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hn-slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,8,14,0.97) 0%, rgba(8,8,14,0.4) 55%, transparent 100%);
  transition: opacity 0.5s ease;
}
.hero-news:hover .hn-slide-overlay { opacity: 0; }

.hn-slide-content {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 1.1rem 1.2rem 3rem;
  z-index: 2;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.hero-news:hover .hn-slide-content {
  opacity: 0;
  transform: translateY(6px);
}
.hn-cat {
  display: inline-block;
  padding: 0.18rem 0.6rem; border-radius: 9999px; margin-bottom: 0.5rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.56rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  backdrop-filter: blur(12px);
}
.hn-cat-pink  { background: rgba(255,0,127,0.14); border: 1px solid rgba(255,0,127,0.5);  color: var(--primary); }
.hn-cat-cyan  { background: rgba(0,238,252,0.14);  border: 1px solid rgba(0,238,252,0.5);  color: var(--secondary); }
.hn-cat-green { background: rgba(34,197,94,0.14);  border: 1px solid rgba(34,197,94,0.5);  color: #22c55e; }

.hn-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(0.82rem, 1.4vw, 1.05rem);
  font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.02em; line-height: 1.2;
  color: #fff; margin-bottom: 0.45rem;
}
.hn-meta {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.6rem; font-weight: 600;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 0.55rem;
}
.hn-read {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.6rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--primary);
}
.hn-read .material-symbols-outlined { font-size: 0.8rem; transition: transform 0.2s; }
.hn-slide:hover .hn-read .material-symbols-outlined { transform: translateX(4px); }

/* Nav dots */
.hn-nav {
  position: absolute; bottom: 0.9rem; left: 0; right: 0;
  display: flex; justify-content: center; gap: 0.45rem; z-index: 4;
}
.hn-dot {
  width: 22px; height: 3px; border-radius: 9999px;
  background: rgba(255,255,255,0.2); border: none; cursor: pointer;
  padding: 0; transition: background 0.3s, width 0.3s, box-shadow 0.3s;
}
.hn-dot.active {
  background: var(--primary); width: 36px;
  box-shadow: 0 0 8px rgba(255,0,127,0.6);
}

/* Responsive */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; }
  .hero-news { aspect-ratio: 16/9; }
}
@media (max-width: 580px) {
  .hero-news { aspect-ratio: 16/10; border-radius: 1rem; }
}

.code-var { color: #79c0ff; }
.code-op  { color: rgba(248,245,253,0.4); }
.code-bracket { color: rgba(248,245,253,0.6); }
.code-str { color: #a5d6ff; }
.code-punct { color: rgba(248,245,253,0.4); margin-right: 0.3em; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── FILTERS ── */
.filters-row {
  display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center;
  margin-bottom: 3rem;
  animation: slideUp 0.6s cubic-bezier(0.16,1,0.3,1) 0.5s both;
}

.filter-btn {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 0.5rem 1.25rem; border-radius: 0.5rem;
  border: 1px solid transparent;
  background: var(--surface-container-high);
  color: var(--on-surface-variant);
  cursor: pointer; white-space: nowrap;
  transition: all 0.2s;
}
.filter-btn:hover { background: var(--surface-container-highest); color: var(--secondary); border-color: rgba(0,238,252,0.3); }
.filter-btn.active { background: var(--primary); color: var(--on-primary); border-color: transparent; box-shadow: 0 0 16px rgba(255,0,127,0.3); }

.search-wrap { position: relative; flex: 1; min-width: 220px; max-width: 320px; }
.search-wrap .material-symbols-outlined {
  position: absolute; left: 0.75rem; top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem; color: var(--secondary);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: rgba(25,25,31,0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0,238,252,0.35);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem 0.5rem 2.5rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--on-surface);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 10px rgba(0,238,252,0.08);
}
.search-input::placeholder { color: rgba(172,170,177,0.5); }
.search-input:focus { border-color: rgba(0,238,252,0.8); box-shadow: 0 0 20px rgba(0,238,252,0.15); }

/* ── RESULTS COUNT ── */
.results-meta {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--on-surface-variant);
  margin-bottom: 1.5rem; min-height: 1.2em;
  transition: opacity 0.2s;
}

/* ── GRID ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
@media (max-width: 900px) { .projects-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .projects-grid { grid-template-columns: 1fr; } }

/* ── CARD ── */
.card {
  display: flex; flex-direction: column;
  background: rgba(37,37,44,0.4);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: 1rem; overflow: hidden;
  border: 1px solid rgba(248,245,253,0.05);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s;
  animation: cardIn 0.5s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.card.cyan-card { border-color: rgba(0,238,252,0.15); box-shadow: inset 0 0 20px rgba(0,238,252,0.03); }
.card.pink-card { border-color: rgba(255,0,127,0.15); box-shadow: inset 0 0 20px rgba(255,0,127,0.03); }
.card.green-card { border-color: rgba(34,197,94,0.15); box-shadow: inset 0 0 20px rgba(34,197,94,0.03); }

.card.cyan-card:hover { transform: translateY(-6px) scale(1.015); border-color: rgba(0,238,252,0.5); box-shadow: 0 0 30px rgba(0,238,252,0.12), 0 20px 40px rgba(0,0,0,0.4); }
.card.pink-card:hover { transform: translateY(-6px) scale(1.015); border-color: rgba(255,0,127,0.5); box-shadow: 0 0 30px rgba(255,0,127,0.12), 0 20px 40px rgba(0,0,0,0.4); }
.card.green-card:hover { transform: translateY(-6px) scale(1.015); border-color: rgba(34,197,94,0.5); box-shadow: 0 0 30px rgba(34,197,94,0.12), 0 20px 40px rgba(0,0,0,0.4); }

.card-hidden { display: none !important; }

.card-thumb { position: relative; aspect-ratio: 16/9; background: var(--surface-container); overflow: hidden; cursor: pointer; display: block; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0.65; transition: opacity 0.4s, transform 0.5s; }
.card:hover .card-thumb img { opacity: 0.88; transform: scale(1.08); }

.card-thumb-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 0.75rem; opacity: 0.5;
}
.card-thumb-fallback .material-symbols-outlined { font-size: 2.5rem; }
.card-thumb-fallback span.label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
}

.card-badge {
  position: absolute; top: 0.9rem; left: 0.9rem;
  padding: 0.2rem 0.75rem; border-radius: 9999px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  backdrop-filter: blur(12px);
}
.badge-cyan { background: rgba(0,238,252,0.12); border: 1px solid rgba(0,238,252,0.45); color: var(--secondary); box-shadow: 0 0 10px rgba(0,238,252,0.2); }
.badge-pink { background: rgba(255,0,127,0.12); border: 1px solid rgba(255,0,127,0.45); color: var(--primary); box-shadow: 0 0 10px rgba(255,0,127,0.2); }
.badge-green { background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.45); color: #22c55e; box-shadow: 0 0 10px rgba(34,197,94,0.2); }

.card-body { padding: 1.4rem; display: flex; flex-direction: column; flex: 1; }
.card-title { font-family: 'Space Grotesk', sans-serif; font-size: 1rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em; margin-bottom: 0.6rem; }
.card-title.cyan { color: var(--secondary); }
.card-title.pink { color: var(--primary); }
.card-title.green { color: #22c55e; }
.card-desc { font-size: 0.8rem; line-height: 1.55; color: var(--on-surface-variant); flex: 1; margin-bottom: 1.25rem; }

.card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.card-icons { display: flex; gap: 0.5rem; }
.card-icons .material-symbols-outlined { font-size: 1rem; }
.icon-cyan { color: var(--secondary); }
.icon-pink { color: var(--primary); }
.icon-green { color: #22c55e; }

.card-link {
  display: flex; align-items: center; gap: 0.4rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.65rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.08em;
  text-decoration: none; transition: color 0.2s;
}
.card-link.cyan { color: var(--secondary); }
.card-link.cyan:hover { color: #fff; }
.card-link.pink { color: var(--primary); }
.card-link.pink:hover { color: #fff; }
.card-link.green { color: #22c55e; }
.card-link.green:hover { color: #fff; }
.card-link .material-symbols-outlined { font-size: 0.9rem; transition: transform 0.2s; }
.card-link:hover .material-symbols-outlined { transform: translateX(4px); }

/* ── DATA PULSE ── */
.data-pulse {
  display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; background: var(--secondary);
  margin-left: 0.5rem;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,238,252,0.6); }
  50% { box-shadow: 0 0 0 6px rgba(0,238,252,0); }
}

/* ── EMPTY STATE ── */
.empty-state { grid-column: 1 / -1; text-align: center; padding: 5rem 2rem; display: none; }
.empty-state .material-symbols-outlined { font-size: 3rem; color: var(--outline-variant); margin-bottom: 1rem; }
.empty-state h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1.1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--on-surface-variant); margin-bottom: 0.5rem; }
.empty-state p { font-size: 0.85rem; color: var(--on-surface-variant); opacity: 0.6; }

/* ── SHOW MORE ── */
.card-collapsed { display: none !important; }

.show-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.show-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.75rem;
  background: rgba(25,25,31,0.6);
  border: 1px solid rgba(248,245,253,0.1);
  border-radius: 9999px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.show-more-btn .material-symbols-outlined { font-size: 1rem; }
.show-more-btn:hover {
  border-color: rgba(255,0,127,0.4);
  color: var(--on-surface);
  background: rgba(35,35,42,0.8);
}
