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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #0a0a0a;
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden;
}

.gradient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(120, 80, 200, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(60, 120, 200, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(100, 60, 180, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

header {
  text-align: center;
  padding: 80px 20px 40px;
  animation: fadeIn 0.8s ease-out;
}

header h1 {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, #a0a0a0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

header p {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: #888;
  font-weight: 300;
}

main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

#preview {
  position: relative;
  background: linear-gradient(145deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px;
  padding: 20px;
  margin-bottom: 60px;
  backdrop-filter: blur(10px);
  animation: fadeIn 0.8s ease-out 0.2s both;
}

#redirect {
  display: flex;
  align-items: center;
  gap: 8px;
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

#redirect:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

#redirect svg {
  opacity: 0.8;
}

#example {
  display: flex;
  justify-content: center;
  border-radius: 16px;
  overflow: hidden;
}

#example iframe {
  width: 100%;
  height: 60vh;
  min-height: 400px;
  max-height: 700px;
  border: none;
  border-radius: 16px;
  background: #1a1a1a;
  transition: opacity 0.3s ease;
}

.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: #fff;
}

.arrow:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-50%) scale(1.1);
}

.arrow:active {
  transform: translateY(-50%) scale(0.95);
}

#arrow1 {
  left: -25px;
}

#arrow2 {
  right: -25px;
}

#projects {
  animation: fadeIn 0.8s ease-out 0.4s both;
}

#projects h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  margin-bottom: 32px;
  color: #fff;
}

#list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.project {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  background: #1a1a1a;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.6) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
  pointer-events: none;
}

.project:hover {
  transform: translateY(-8px);
  box-shadow:
    0 20px 40px rgba(0,0,0,0.4),
    0 0 0 1px rgba(255,255,255,0.1);
}

.project:hover::before {
  opacity: 1;
}

.project img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project:hover img {
  transform: scale(1.05);
}

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

@media (max-width: 768px) {
  header {
    padding: 60px 20px 30px;
  }

  #preview {
    margin: 0 -10px 40px;
    border-radius: 16px;
    padding: 12px;
  }

  #redirect {
    top: 12px;
    right: 12px;
    padding: 8px 14px;
    font-size: 13px;
  }

  #example iframe {
    height: 50vh;
    min-height: 300px;
    border-radius: 12px;
  }

  .arrow {
    width: 40px;
    height: 40px;
  }

  #arrow1 {
    left: 10px;
  }

  #arrow2 {
    right: 10px;
  }

  #list {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  #redirect span {
    display: none;
  }

  #redirect {
    padding: 10px;
    border-radius: 50%;
  }
}
