/* Glassmorphism Theme - Variables */
:root {
  --primary-color: #6366f1;
  --secondary-color: #8b5cf6;
  --accent-color: #06b6d4;
  --text-primary: #ffffff;
  --text-secondary: #e2e8f0;
  --text-light: #cbd5e1;
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  --backdrop-blur: blur(20px);
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  --gradient-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--gradient-bg);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(120, 219, 255, 0.3) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.1rem; }

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Random Project Button */
.btn-random {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 2.5rem;
  border: none;
  border-radius: 1.5rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-size: 1.1rem;
  backdrop-filter: var(--backdrop-blur);
  position: relative;
  overflow: hidden;
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--glass-shadow);
  border: 1px solid rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

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

.btn-random:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow:
    var(--glass-shadow),
    0 0 40px rgba(99, 102, 241, 0.6),
    0 0 80px rgba(139, 92, 246, 0.3);
}

.btn-random:active {
  transform: translateY(-2px) scale(1.02);
}

.btn-random i {
  font-size: 1.2rem;
  animation: spin 2s linear infinite;
}

.btn-random:hover i {
  animation-duration: 0.5s;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 2rem 0;
  position: relative;
}

.hero-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 600px;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  font-size: 0.9rem;
  margin-bottom: 2rem;
  color: var(--text-primary);
  font-weight: 500;
  box-shadow: var(--glass-shadow);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-title {
  margin-bottom: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-description {
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
  color: var(--text-secondary);
  line-height: 1.6;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* Projects Showcase */
.projects-showcase {
  position: relative;
}

.showcase-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: repeat(3, 1fr);
  gap: 1.5rem;
  height: 70vh;
  min-height: 500px;
}

.project-card {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  transition: all 0.4s ease;
  transform-style: preserve-3d;
}

.project-card.featured {
  grid-row: 1 / -1;
}

.project-preview {
  width: 100%;
  height: 100%;
  background: var(--glass-bg);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--glass-border);
  border-radius: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
  box-shadow: var(--glass-shadow);
  padding: 2rem;
}

.project-preview::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}

.project-card:hover .project-preview::before {
  opacity: 0.1;
}

.project-icon {
  width: 80px;
  height: 80px;
  border-radius: 1rem;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 2;
  transition: all 0.4s ease;
}

.project-card.featured .project-icon {
  width: 100px;
  height: 100px;
}

.project-icon i {
  font-size: 2rem;
  color: white;
}

.project-card.featured .project-icon i {
  font-size: 2.5rem;
}

.project-info {
  text-align: center;
  position: relative;
  z-index: 2;
}

.project-info h3,
.project-info h4 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.project-info p {
  color: var(--text-light);
  margin-bottom: 1rem;
  font-size: 0.9rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.project-tech {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.project-tech span {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.3rem 0.8rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: all 0.3s ease;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.project-tech span:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Hover Effects */
.project-card {
  cursor: pointer;
  position: relative;
}

.project-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--gradient-primary);
  border-radius: 1.7rem;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
  animation: borderGlow 2s ease-in-out infinite alternate;
}

.project-card:hover::before {
  opacity: 0.6;
}


.project-card:hover {
  transform: translateY(-15px) rotateX(8deg) scale(1.02);
  z-index: 5;
}

.project-card:hover .project-icon {
  transform: scale(1.2) rotateY(15deg);
  box-shadow:
    0 0 30px rgba(99, 102, 241, 0.6),
    0 0 60px rgba(139, 92, 246, 0.4),
    inset 0 0 20px rgba(255, 255, 255, 0.2);
}

.project-card:hover .project-preview {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.15);
  box-shadow:
    var(--glass-shadow),
    0 0 50px rgba(99, 102, 241, 0.5),
    0 0 100px rgba(139, 92, 246, 0.3),
    0 20px 40px rgba(0, 0, 0, 0.3);
}

.project-card:hover .project-preview::before {
  opacity: 0.15;
}

/* Enhanced hover for featured card */
.project-card.featured:hover {
  transform: translateY(-20px) rotateX(10deg) scale(1.03);
}

.project-card.featured:hover .project-preview {
  box-shadow:
    var(--glass-shadow),
    0 0 60px rgba(99, 102, 241, 0.6),
    0 0 120px rgba(139, 92, 246, 0.4),
    0 25px 50px rgba(0, 0, 0, 0.4);
}

/* Active/Click Effect */
.project-card:active {
  transform: translateY(-8px) rotateX(5deg) scale(0.98);
  transition: all 0.1s ease;
}

@keyframes borderGlow {
  0% {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
  }
  100% {
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.6);
  }
}

@keyframes iconBounce {
  0%, 100% {
    transform: scale(1.2) rotateY(15deg);
  }
  25% {
    transform: scale(1.25) rotateY(18deg) rotateZ(5deg);
  }
  50% {
    transform: scale(1.3) rotateY(15deg) rotateZ(0deg);
  }
  75% {
    transform: scale(1.25) rotateY(12deg) rotateZ(-5deg);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow:
      0 0 30px rgba(99, 102, 241, 0.6),
      0 0 60px rgba(139, 92, 246, 0.4),
      inset 0 0 20px rgba(255, 255, 255, 0.2);
  }
  50% {
    box-shadow:
      0 0 50px rgba(99, 102, 241, 0.8),
      0 0 100px rgba(139, 92, 246, 0.6),
      inset 0 0 30px rgba(255, 255, 255, 0.3);
  }
}


/* Footer */
.footer {
  background: var(--glass-bg);
  backdrop-filter: var(--backdrop-blur);
  border-top: 1px solid var(--glass-border);
  padding: 3rem 0 1rem;
  box-shadow: var(--glass-shadow);
  margin-top: 4rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
  align-items: start;
}

.footer-info h3 {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.footer-info p {
  color: var(--text-light);
  margin: 0;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--text-light);
}

.contact-item i {
  width: 20px;
  color: var(--primary-color);
}

.footer-social {
  display: flex;
  gap: 1rem;
  justify-self: end;
}

.footer-social a {
  width: 45px;
  height: 45px;
  background: var(--glass-bg);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: var(--glass-shadow);
}

.footer-social a:hover {
  background: var(--gradient-primary);
  color: white;
  transform: translateY(-3px);
  border-color: transparent;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--glass-border);
}

.footer-bottom p {
  color: var(--text-light);
  margin: 0;
  font-size: 0.9rem;
}

/* Mobile Touch Enhancements */
@media (hover: none) and (pointer: coarse) {
  .project-card:active {
    transform: translateY(-10px) scale(0.98);
    transition: all 0.2s ease;
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .showcase-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 2fr 1fr 1fr;
    height: auto;
    min-height: 600px;
  }

  .project-card.featured {
    grid-column: 1 / -1;
    grid-row: 1;
  }
}

@media (max-width: 768px) {
  .hero-container {
    padding: 0 1rem;
  }

  .hero-actions {
    justify-content: center;
    flex-direction: column;
    align-items: center;
  }

  .btn-random {
    width: 100%;
    max-width: 300px;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1rem;
  }

  .showcase-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    height: auto;
    min-height: 400px;
  }

  .project-card.featured {
    grid-column: 1;
    grid-row: 1;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-social {
    justify-self: center;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 1rem 0;
  }

  .hero-container {
    padding: 0 1rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .project-preview {
    padding: 1rem;
  }

  .project-icon {
    width: 60px;
    height: 60px;
  }

  .project-card.featured .project-icon {
    width: 80px;
    height: 80px;
  }

  .project-icon i {
    font-size: 1.5rem;
  }

  .project-card.featured .project-icon i {
    font-size: 2rem;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content > * {
  animation: fadeInUp 0.6s ease-out forwards;
}

.hero-badge { animation-delay: 0.1s; }
.hero-title { animation-delay: 0.2s; }
.hero-description { animation-delay: 0.3s; }
.hero-actions { animation-delay: 0.4s; }

.project-card {
  animation: fadeInUp 0.6s ease-out forwards;
}

.project-card:nth-child(1) { animation-delay: 0.5s; }
.project-card:nth-child(2) { animation-delay: 0.6s; }
.project-card:nth-child(3) { animation-delay: 0.7s; }
.project-card:nth-child(4) { animation-delay: 0.8s; }
.project-card:nth-child(5) { animation-delay: 0.9s; }
.project-card:nth-child(6) { animation-delay: 1s; }