/**
 * GLASS CSS — Glassmorphism Utilities
 * Frosted glass effects for cards, nav, overlays
 */

/* ============================================
   GLASS EFFECTS
   ============================================ */
.glass {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-strong {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.glass-subtle {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-dark {
  background: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ============================================
   GLOW EFFECTS
   ============================================ */
.glow-green {
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.4);
}

.glow-green-sm {
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.glow-green-lg {
  box-shadow: 0 0 50px rgba(16, 185, 129, 0.5);
}

.glow-line {
  position: relative;
  overflow: hidden;
}

.glow-line::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.glow-line:hover::after {
  opacity: 1;
}

/* ============================================
   CARD EFFECTS
   ============================================ */
.card-hover {
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
  will-change: transform;
}

.card-hover:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 25px 50px -12px rgba(16, 185, 129, 0.25);
}

.card-3d {
  transition: transform 0.4s var(--ease-out-expo);
  transform-style: preserve-3d;
  will-change: transform;
}

.card-3d:hover {
  transform: perspective(1000px) rotateX(2deg) rotateY(-2deg) translateZ(10px);
}

.card-border-glow {
  position: relative;
}

.card-border-glow::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--accent), transparent 50%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card-border-glow:hover::before {
  opacity: 1;
}

/* ============================================
   BUTTON EFFECTS
   ============================================ */
.btn-magnetic {
  transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s ease;
  will-change: transform;
}

.btn-magnetic:hover {
  transform: scale(1.05);
}

.btn-magnetic:active {
  transform: scale(0.98);
}

.btn-shine {
  position: relative;
  overflow: hidden;
}

.btn-shine::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.btn-shine:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-0);
  font-weight: 600;
  padding: 0.875rem 2rem;
  border-radius: 9999px;
  transition: background 0.3s ease, transform 0.3s var(--ease-out-expo), box-shadow 0.3s ease;
}

.btn-primary:hover {
  background: var(--accent-soft);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--bg-3);
  font-weight: 500;
  padding: 0.875rem 2rem;
  border-radius: 9999px;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.btn-secondary:hover {
  background: var(--bg-2);
  border-color: var(--accent);
}

/* ============================================
   FLOATING ELEMENTS
   ============================================ */
.floating-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  pointer-events: none;
  will-change: transform;
}

.blob-1 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, var(--accent), #0ea5e9);
  animation: blob 7s infinite;
}

.blob-2 {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  animation: blob 8s infinite 2s;
}

.blob-3 {
  width: 350px;
  height: 350px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  animation: blob 9s infinite 4s;
}

/* ============================================
   MARQUEE
   ============================================ */
.marquee-container {
  overflow: hidden;
  white-space: nowrap;
}

.marquee-content {
  display: inline-flex;
  animation: marquee 30s linear infinite;
}

.marquee-content:hover {
  animation-play-state: paused;
}

/* ============================================
   TECH ICONS
   ============================================ */
.tech-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s var(--ease-out-expo), color 0.3s ease;
}

.tech-icon:hover {
  transform: scale(1.2) translateY(-4px);
}

/* ============================================
   TOOLTIP
   ============================================ */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 0.375rem 0.75rem;
  background: var(--bg-2);
  color: var(--fg-1);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  border-radius: 6px;
  border: 1px solid var(--bg-3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  pointer-events: none;
  z-index: var(--z-tooltip);
}

[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   PROGRESS BAR
   ============================================ */
.progress-bar {
  height: 4px;
  background: var(--bg-2);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  border-radius: 2px;
  transition: width 1s var(--ease-out-expo);
}

/* ============================================
   SCROLL PROGRESS
   ============================================ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  z-index: var(--z-sticky);
  transition: width 0.1s linear;
}

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-2);
  border: 1px solid var(--bg-3);
  border-radius: 12px;
  color: var(--fg-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.3s ease, visibility 0.3s, transform 0.3s var(--ease-out-expo), background 0.3s ease, color 0.3s ease;
  z-index: var(--z-sticky);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent);
  color: var(--bg-0);
  border-color: var(--accent);
}

/* ============================================
   STATUS INDICATOR
   ============================================ */
.status-indicator {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  position: relative;
  width: 8px;
  height: 8px;
}

.status-dot::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  border-radius: 50%;
  animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.status-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  border-radius: 50%;
}

/* ============================================
   TIMELINE
   ============================================ */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-glow), transparent);
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -1.75rem;
  top: 0.375rem;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border: 3px solid var(--bg-0);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.timeline-dot.muted {
  background: var(--bg-3);
  box-shadow: none;
}

/* ============================================
   PILL / TAG
   ============================================ */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  background: var(--bg-2);
  color: var(--fg-3);
  border: 1px solid var(--bg-3);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.pill:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
}

.pill-accent {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================
   LINK UNDERLINE
   ============================================ */
.link-underline {
  position: relative;
}

.link-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease-out-expo);
}

.link-underline:hover::after {
  width: 100%;
}

/* ============================================
   SECTION
   ============================================ */
.section {
  padding: 5rem 0;
}

@media (min-width: 768px) {
  .section {
    padding: 8rem 0;
  }
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--accent-glow);
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 9999px;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .section-title {
    font-size: 2.5rem;
  }
}

@media (min-width: 768px) {
  .section-title {
    font-size: 3rem;
  }
}

.section-subtitle {
  color: var(--fg-3);
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}
