/* Modern Tech Showcase Design - World Class Standards */

/* ===== DESIGN SYSTEM VARIABLES ===== */
:root {
  /* Color System */
  --tech-primary: #00d4ff;
  --tech-primary-dark: #0099cc;
  --tech-secondary: #667eea;
  --tech-accent: #ff6b6b;
  --tech-success: #51cf66;
  
  /* Glassmorphism */
  --tech-glass-bg: rgba(255, 255, 255, 0.08);
  --tech-glass-border: rgba(255, 255, 255, 0.15);
  --tech-glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  --tech-glass-blur: blur(20px);
  
  /* Typography */
  --tech-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --tech-font-size-xs: 0.75rem;
  --tech-font-size-sm: 0.875rem;
  --tech-font-size-base: 1rem;
  --tech-font-size-lg: 1.125rem;
  --tech-font-size-xl: 1.25rem;
  --tech-font-weight-normal: 400;
  --tech-font-weight-medium: 500;
  --tech-font-weight-semibold: 600;
  --tech-font-weight-bold: 700;
  
  /* Spacing */
  --tech-space-xs: 0.5rem;
  --tech-space-sm: 0.75rem;
  --tech-space-md: 1rem;
  --tech-space-lg: 1.5rem;
  --tech-space-xl: 2rem;
  --tech-space-2xl: 3rem;
  
  /* Border Radius */
  --tech-radius-sm: 0.5rem;
  --tech-radius-md: 0.75rem;
  --tech-radius-lg: 1rem;
  --tech-radius-xl: 1.5rem;
  --tech-radius-pill: 2rem;
  
  /* Transitions */
  --tech-transition-fast: 150ms ease;
  --tech-transition-normal: 250ms ease;
  --tech-transition-slow: 350ms ease;
  --tech-transition-bounce: 450ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* Shadows */
  --tech-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --tech-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
  --tech-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
  --tech-shadow-neon: 0 0 20px rgba(0, 212, 255, 0.4);
  --tech-shadow-hover: 0 12px 40px rgba(0, 212, 255, 0.5);
  
  /* Tech-specific Colors */
  --tech-react: #61dafb;
  --tech-node: #339933;
  --tech-database: #ff6b6b;
  --tech-security: #ffd43b;
  --tech-python: #3776ab;
  --tech-aws: #ff9900;
  --tech-javascript: #f7df1e;
  --tech-typescript: #3178c6;
  --tech-docker: #2496ed;
  --tech-git: #f05032;
}

/* ===== BASE TECH SHOWCASE STYLES ===== */
.hero-tech-showcase {
  background: var(--tech-glass-bg);
  backdrop-filter: var(--tech-glass-blur);
  border: 1px solid var(--tech-glass-border);
  border-radius: var(--tech-radius-xl);
  padding: var(--tech-space-lg);
  margin-top: var(--tech-space-xl);
  box-shadow: var(--tech-shadow-lg);
  position: relative;
  overflow: hidden;
  transition: var(--tech-transition-normal);
  max-width: 100%;
}

.hero-tech-showcase::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(0, 212, 255, 0.1), transparent);
  transform: rotate(45deg);
  animation: techShine 8s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes techShine {
  0%, 100% { opacity: 0; transform: rotate(45deg) translateX(-100%); }
  50% { opacity: 1; transform: rotate(45deg) translateX(100%); }
}

/* ===== TITLE STYLES ===== */
.tech-showcase-title {
  font-size: var(--tech-font-size-sm);
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--tech-space-md);
  font-weight: var(--tech-font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: var(--tech-space-xs);
  position: relative;
  margin-left: 60px; /* Adjusted from 400px for better positioning */
  justify-content: flex-start;
}

.tech-showcase-title::before {
  content: '';
  width: 16px;
  min-width: 16px; /* Added minimum width */
  height: 2px;
  background: linear-gradient(90deg, var(--tech-primary), var(--tech-secondary));
  border-radius: 1px;
  margin-right: var(--tech-space-xs);
  flex-shrink: 0; /* Prevent shrinking */
}

.tech-showcase-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), transparent);
  margin-left: var(--tech-space-xs);
}

/* ===== ICONS CONTAINER ===== */
.tech-showcase-icons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--tech-space-md);
  align-items: stretch;
  justify-content: flex-start; /* Changed from center to move items left */
  justify-items: center;
  margin-left: -20px; /* Move entire grid slightly left */
}

/* ===== TECH ICON ITEMS ===== */
.tech-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--tech-space-sm);
  background: rgba(255, 255, 255, 0.06);
  padding: var(--tech-space-lg);
  border-radius: var(--tech-radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: var(--tech-transition-bounce);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  min-height: 120px;
  min-width: 120px;
  text-decoration: none;
  color: inherit;
  text-align: center;
}

.tech-icon-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: var(--tech-transition-normal);
  opacity: 0;
}

.tech-icon-item:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--tech-shadow-hover);
  border-color: rgba(0, 212, 255, 0.3);
}

.tech-icon-item:hover::before {
  left: 100%;
  opacity: 1;
}

.tech-icon-item:active {
  transform: translateY(-1px) scale(1);
  transition: var(--tech-transition-fast);
}

/* Tech-specific background colors */
.tech-icon-item[data-tech="React"] {
  background: rgba(97, 218, 251, 0.1);
  border-color: rgba(97, 218, 251, 0.2);
}

.tech-icon-item[data-tech="Node.js"] {
  background: rgba(51, 153, 51, 0.1);
  border-color: rgba(51, 153, 51, 0.2);
}

.tech-icon-item[data-tech="Database"] {
  background: rgba(255, 107, 107, 0.1);
  border-color: rgba(255, 107, 107, 0.2);
}

.tech-icon-item[data-tech="Security"] {
  background: rgba(255, 212, 59, 0.1);
  border-color: rgba(255, 212, 59, 0.2);
}

.tech-icon-item[data-tech="Python"] {
  background: rgba(55, 118, 171, 0.1);
  border-color: rgba(55, 118, 171, 0.2);
}

.tech-icon-item[data-tech="AWS"] {
  background: rgba(255, 153, 0, 0.1);
  border-color: rgba(255, 153, 0, 0.2);
}

/* ===== TECH ICONS ===== */
.tech-icon {
  font-size: 2rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--tech-transition-bounce);
  position: relative;
  z-index: 2;
}

/* Tech-specific icon colors */
.tech-icon-item[data-tech="React"] .tech-icon {
  color: var(--tech-react);
  background: rgba(97, 218, 251, 0.15);
  box-shadow: 0 4px 20px rgba(97, 218, 251, 0.3);
}

.tech-icon-item[data-tech="Node.js"] .tech-icon {
  color: var(--tech-node);
  background: rgba(51, 153, 51, 0.15);
  box-shadow: 0 4px 20px rgba(51, 153, 51, 0.3);
}

.tech-icon-item[data-tech="Database"] .tech-icon {
  color: var(--tech-database);
  background: rgba(255, 107, 107, 0.15);
  box-shadow: 0 4px 20px rgba(255, 107, 107, 0.3);
}

.tech-icon-item[data-tech="Security"] .tech-icon {
  color: var(--tech-security);
  background: rgba(255, 212, 59, 0.15);
  box-shadow: 0 4px 20px rgba(255, 212, 59, 0.3);
}

.tech-icon-item[data-tech="Python"] .tech-icon {
  color: var(--tech-python);
  background: rgba(55, 118, 171, 0.15);
  box-shadow: 0 4px 20px rgba(55, 118, 171, 0.3);
}

.tech-icon-item[data-tech="AWS"] .tech-icon {
  color: var(--tech-aws);
  background: rgba(255, 153, 0, 0.15);
  box-shadow: 0 4px 20px rgba(255, 153, 0, 0.3);
}

.tech-icon-item:hover .tech-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 8px 32px rgba(0, 212, 255, 0.4);
}

/* ===== TECH LABELS ===== */
.tech-icon-item span {
  font-size: var(--tech-font-size-sm);
  color: rgba(255, 255, 255, 0.9);
  font-weight: var(--tech-font-weight-medium);
  transition: var(--tech-transition-normal);
  position: relative;
  z-index: 2;
  text-align: center;
  line-height: 1.3;
}

.tech-icon-item:hover span {
  color: #fff;
  transform: translateY(1px);
}

/* Tech-specific label colors */
.tech-icon-item[data-tech="React"] span {
  color: var(--tech-react);
}

.tech-icon-item[data-tech="Node.js"] span {
  color: var(--tech-node);
}

.tech-icon-item[data-tech="Database"] span {
  color: var(--tech-database);
}

.tech-icon-item[data-tech="Security"] span {
  color: var(--tech-security);
}

.tech-icon-item[data-tech="Python"] span {
  color: var(--tech-python);
}

.tech-icon-item[data-tech="AWS"] span {
  color: var(--tech-aws);
}

/* ===== TOOLTIP EFFECTS ===== */
.tech-icon-item::after {
  content: attr(data-tech);
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: var(--tech-space-xs) var(--tech-space-sm);
  border-radius: var(--tech-radius-sm);
  font-size: var(--tech-font-size-xs);
  font-weight: var(--tech-font-weight-medium);
  opacity: 0;
  transition: var(--tech-transition-normal);
  pointer-events: none;
  white-space: nowrap;
  z-index: 1000;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tech-icon-item:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-5px);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.6);
  }
}

/* Staggered entrance animation */
.tech-icon-item {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

.tech-icon-item:nth-child(1) { animation-delay: 0.1s; }
.tech-icon-item:nth-child(2) { animation-delay: 0.2s; }
.tech-icon-item:nth-child(3) { animation-delay: 0.3s; }
.tech-icon-item:nth-child(4) { animation-delay: 0.4s; }
.tech-icon-item:nth-child(5) { animation-delay: 0.5s; }
.tech-icon-item:nth-child(6) { animation-delay: 0.6s; }

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
  .tech-showcase-icons {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: var(--tech-space-sm);
  }
  
  .tech-icon-item {
    padding: var(--tech-space-md);
    min-height: 100px;
    min-width: 110px;
    gap: var(--tech-space-xs);
    text-align: left;
  }
  
  .tech-icon {
    font-size: 1.75rem;
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 768px) {
  .hero-tech-showcase {
    padding: var(--tech-space-md);
    border-radius: var(--tech-radius-lg);
    margin-top: var(--tech-space-lg);
  }
  
  .tech-showcase-icons {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--tech-space-sm);
  }
  
  .tech-icon-item {
    padding: var(--tech-space-sm);
    min-height: 90px;
    min-width: auto;
    gap: var(--tech-space-xs);
    align-items: flex-start;   /* ⬅️ kiri (jika flex column) */
  justify-content: flex-start;
  }
  
  .tech-icon {
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
  }
  
  .tech-icon-item span {
    font-size: var(--tech-font-size-xs);
  }
}

@media (max-width: 480px) {
  .hero-tech-showcase {
    padding: var(--tech-space-sm);
    border-radius: var(--tech-radius-md);
    margin-top: var(--tech-space-md);
  }
  
  .tech-showcase-icons {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--tech-space-sm);
  }
  
  .tech-icon-item {
    padding: var(--tech-space-sm);
    min-height: 80px;
    min-width: auto;
    gap: var(--tech-space-xs);
  }
  
  .tech-icon {
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
  }
  
  .tech-icon-item span {
    font-size: var(--tech-font-size-xs);
    line-height: 1.2;
  }
  
  .tech-showcase-title {
    font-size: var(--tech-font-size-xs);
    margin-bottom: var(--tech-space-sm);
  }
}

/* ===== ACCESSIBILITY ===== */
.tech-icon-item:focus-visible {
  outline: 2px solid var(--tech-primary);
  outline-offset: 2px;
  transform: translateY(-10000px);
}

.tech-icon-item:focus-visible .tech-icon {
  transform: scale(1.1);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .hero-tech-showcase,
  .tech-icon-item,
  .tech-icon,
  .tech-icon-item span {
    transition: none;
    animation: none;
  }
  
  .hero-tech-showcase::before,
  .tech-icon-item::before {
    animation: none;
    display: none;
  }
  
  .tech-icon-item {
    opacity: 1;
    transform: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .hero-tech-showcase {
    background: #000;
    border: 2px solid #fff;
  }
  
  .tech-icon-item {
    background: #000;
    border: 2px solid #fff;
  }
  
  .tech-icon {
    background: #000 !important;
    border: 2px solid #fff;
  }
  
  .tech-showcase-title {
    color: #fff;
  }
  
  .tech-showcase-title::before,
  .tech-showcase-title::after {
    background: #fff;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .tech-icon-item::after {
    display: none;
  }
  
  .tech-icon-item:active {
    transform: scale(0.98);
  }
  
  .tech-icon-item:hover {
    transform: none;
  }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.hero-tech-showcase,
.tech-icon-item,
.tech-icon {
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Hardware acceleration */
.tech-icon-item:hover {
  transform: translateY(-4px) scale(1.02) translateZ(0);
}

.tech-icon-item:hover .tech-icon {
  transform: scale(1.1) rotate(5deg) translateZ(0);
}