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

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --accent-coffee: #6f4e37;
  --accent-gallery: #e74c3c;
  --accent-vht: #3498db;
  --accent-visualis: #2ecc71;
  --border-radius: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
    "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-image: radial-gradient(
      circle at 20% 50%,
      rgba(111, 78, 55, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(46, 204, 113, 0.1) 0%,
      transparent 50%
    );
}

.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 60px;
  animation: fadeInDown 0.6s ease-out;
}

.title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  background: linear-gradient(135deg, #fff, #a0a0a0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
  letter-spacing: -2px;
}

.subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  font-weight: 400;
}

/* Grid Layout */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

/* Card Styles */
.card {
  position: relative;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  padding: 40px 32px;
  text-decoration: none;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  animation: fadeInUp 0.6s ease-out backwards;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.05));
  opacity: 0;
  transition: var(--transition);
}

.card:nth-child(1) {
  animation-delay: 0.1s;
}
.card:nth-child(2) {
  animation-delay: 0.2s;
}
.card:nth-child(3) {
  animation-delay: 0.3s;
}
.card:nth-child(4) {
  animation-delay: 0.4s;
}

.card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

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

/* Project-specific colors */
.card[data-project="coffee"]:hover {
  border-color: var(--accent-coffee);
  box-shadow: 0 20px 40px rgba(111, 78, 55, 0.3);
}

.card[data-project="gallery"]:hover {
  border-color: var(--accent-gallery);
  box-shadow: 0 20px 40px rgba(231, 76, 60, 0.3);
}

.card[data-project="vht"]:hover {
  border-color: var(--accent-vht);
  box-shadow: 0 20px 40px rgba(52, 152, 219, 0.3);
}

.card[data-project="visualis"]:hover {
  border-color: var(--accent-visualis);
  box-shadow: 0 20px 40px rgba(46, 204, 113, 0.3);
}

/* Card Content */
.card-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  transition: var(--transition);
}

.card:hover .card-icon {
  transform: scale(1.1);
}

.card-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -1px;
}

.card-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 20px;
  line-height: 1.5;
}

.card-arrow {
  font-size: 1.5rem;
  opacity: 0;
  transform: translateX(-10px);
  transition: var(--transition);
}

.card:hover .card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* Footer */
.footer {
  text-align: center;
  padding: 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  animation: fadeIn 0.6s ease-out 0.5s backwards;
}

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

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .header {
    margin-bottom: 40px;
  }

  .card {
    padding: 32px 24px;
  }
}

/* Loading Animation */
.card.loading {
  pointer-events: none;
  opacity: 0.6;
}

.card.loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}
