/**
 * SUPERMIX COMPONENTS
 * Ultra-Premium UI Components for Coding UI Theme
 */

/* ============================================
   NAVBAR
   ============================================ */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  background: rgba(10, 15, 28, 0.6);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--glass-border);
  transition: all var(--transition-base);
}

.navbar.scrolled {
  background: rgba(10, 15, 28, 0.85);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
  border-bottom-color: var(--accent-primary);
}

[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.7);
  border-bottom-color: rgba(0,0,0,0.05);
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-lg);
  max-width: 1400px;
  margin: 0 auto;
  height: 80px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  font-family: var(--font-mono);
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.navbar-brand span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  list-style: none;
}

.navbar-link {
  position: relative;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: color var(--transition-fast);
  text-transform: uppercase;
}

.navbar-link:hover,
.navbar-link.active {
  color: var(--accent-primary);
  text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

.navbar-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  transition: width var(--transition-base);
  box-shadow: 0 0 10px var(--accent-primary);
}

.navbar-link:hover::after,
.navbar-link.active::after {
  width: 100%;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.875rem 1.75rem;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: none;
  border-radius: 4px; /* Tech look */
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* Primary Button - Neon Glow */
.btn-primary {
  background: rgba(0, 243, 255, 0.1);
  color: var(--accent-primary);
  border: 1px solid var(--accent-primary);
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}

.btn-primary:hover {
  background: var(--accent-primary);
  color: #000;
  box-shadow: 0 0 30px rgba(0, 243, 255, 0.6);
  transform: translateY(-2px);
}

.btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.8), transparent);
  transform: skewX(-25deg);
  transition: 0.5s;
  z-index: -1;
}

.btn-primary:hover .btn-shine {
  left: 150%;
  transition: 0.7s;
}

/* Secondary/Glass Button */
.btn-glass {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-primary);
  transform: translateY(-2px);
}

.btn-link {
  padding: 0;
  background: none;
  border: none;
  color: var(--accent-primary);
  font-family: var(--font-mono);
  box-shadow: none;
}

.btn-link:hover {
  color: var(--accent-glow);
  text-decoration: underline;
  transform: none;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-medium);
    color: var(--text-muted);
}
.btn-outline:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

/* ============================================
   CARDS
   ============================================ */

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all 0.4s ease;
  position: relative;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-primary);
  box-shadow: 0 10px 30px -10px rgba(0, 243, 255, 0.15);
}

.card-title {
  font-family: var(--font-primary);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  transition: color 0.3s;
}

.card:hover .card-title a {
  color: var(--accent-primary);
}

.tag-glass {
  background: rgba(0, 243, 255, 0.1);
  color: var(--accent-primary);
  border: 1px solid rgba(0, 243, 255, 0.2);
  padding: 4px 12px;
  font-size: 11px;
  font-family: var(--font-mono);
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  backdrop-filter: blur(4px);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  border-top: 1px solid var(--border-soft);
  background: rgba(13, 17, 23, 0.8);
  backdrop-filter: blur(10px);
  margin-top: 0;
  padding: var(--space-4xl) 0 var(--space-xl);
}

.footer-section h4 {
  font-family: var(--font-mono);
  color: var(--text-primary);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-lg);
}

.footer-links a {
  transition: 0.3s;
}

.footer-links a:hover {
  padding-left: 5px;
  color: var(--accent-primary);
}

/* ============================================
   FORMS
   ============================================ */

.form-input, .form-textarea {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-soft);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  width: 100%;
}

.form-input:focus, .form-textarea:focus {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-primary);
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.1);
  outline: none;
}

/* ============================================
   ANIMATIONS & UTILS
   ============================================ */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.glitch-text {
  position: relative;
}

/* Simple pulse animation for status dots */
.pulse {
  animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
  0% { box-shadow: 0 0 0 0 rgba(0, 255, 157, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(0, 255, 157, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 255, 157, 0); }
}

/* ============================================
   BENTO GRID SYSTEM (NEW v2)
   ============================================ */

.hero-section {
  padding-top: 140px; /* Space for fixed navbar */
  min-height: auto;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: minmax(300px, auto) 200px;
  gap: var(--space-lg);
}

.bento-card {
  border: 1px solid var(--border-soft);
  border-radius: 24px;
  background: rgba(13, 17, 23, 0.6);
  backdrop-filter: blur(20px);
  overflow: hidden;
  transition: all 0.4s ease;
}

.bento-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5);
}

.bento-card.span-2 {
  grid-column: span 2;
  background: radial-gradient(circle at top left, rgba(255,255,255,0.03), transparent 70%), 
              rgba(13, 17, 23, 0.6);
}

.intro-card {
  padding: 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-card {
  grid-row: span 2;
  position: relative;
  background: #000;
}

.featured-card:hover .overlay-gradient {
  opacity: 0.8;
}

.overlay-gradient {
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  transition: opacity 0.5s;
}

.bg-pattern-grid {
  position: absolute;
  top: 0; right: 0;
  width: 100%; height: 100%;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
  linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at top right, black, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 100px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.dot {
  width: 6px; height: 6px;
  background: var(--accent-secondary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-secondary);
}

.text-stroke {
  -webkit-text-stroke: 1px rgba(255,255,255,0.3);
  color: transparent;
}

/* ============================================
   MAGAZINE BLOG LAYOUT
   ============================================ */

.hover-lift {
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent-primary);
}

.article-row {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
}

.row-image {
  flex-shrink: 0;
  width: 240px;
  height: 160px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-tertiary);
}

.row-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.article-row:hover .row-image img {
  transform: scale(1.05);
}

.row-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.row-title a {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  transition: color 0.2s;
}

.row-title a:hover {
  color: var(--accent-primary);
}

/* Sidebar Widgets */
.sidebar-widget {
  border: 1px solid var(--border-soft);
  border-radius: 16px;
}

.widget-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.topic-item {
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-soft);
  font-size: 0.95rem;
  color: var(--text-secondary);
  transition: 0.2s;
}

.topic-item:last-child {
  border-bottom: none;
}

.count-badge {
  background: var(--bg-elevated);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.read-more-link {
  font-size: 13px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.read-more-link .arrow {
  transition: transform 0.2s;
}

.read-more-link:hover .arrow {
  transform: translateX(4px);
}

/* ============================================
   RESPONSIVE OVERRIDES
   ============================================ */

@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  
  .intro-card {
    grid-column: span 2;
    padding: 3rem;
  }
  
  .featured-card {
    grid-column: span 2;
    height: 400px;
  }
}

@media (max-width: 768px) {
  .bento-grid {
    display: flex;
    flex-direction: column;
  }
  
  .intro-card {
    padding: 2rem;
  }
  
  .article-row {
    flex-direction: column;
  }
  
  .row-image {
    width: 100%;
    height: 200px;
  }
}
