/* Theme Variables */
:root {
  --bg: #0a0f14;
  --bg-card: #111820;
  --text: #e8fff5;
  --text-muted: #6b8f7a;
  --primary: #22c55e;
  --primary-dim: #166534;
  --border: #1e3a28;
  --glow: 0 0 20px rgba(34, 197, 94, 0.4);
  --glow-intense: 0 0 40px rgba(34, 197, 94, 0.6);
}

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

body {
  font-family: 'JetBrains Mono', monospace;
  background: linear-gradient(180deg, var(--bg) 0%, #050809 100%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Background Grid */
.background-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 197, 94, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 197, 94, 0.08) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(10, 15, 20, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-content {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

/* Back Button */
.back-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.back-btn:hover {
  background: var(--bg-card);
  border-color: var(--primary);
  box-shadow: var(--glow);
}

/* Main Layout */
.main {
  position: relative;
  z-index: 10;
  max-width: 72rem;
  margin: 0 auto;
  padding: 6rem 1rem 3rem;
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Bento Card */
.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
  animation: fadeInUp 0.5s ease-out backwards;
}

.bento-card:nth-child(1) { animation-delay: 0s; }
.bento-card:nth-child(2) { animation-delay: 0.05s; }
.bento-card:nth-child(3) { animation-delay: 0.1s; }
.bento-card:nth-child(4) { animation-delay: 0.15s; }
.bento-card:nth-child(5) { animation-delay: 0.2s; }
.bento-card:nth-child(6) { animation-delay: 0.25s; }
.bento-card:nth-child(7) { animation-delay: 0.3s; }
.bento-card:nth-child(8) { animation-delay: 0.35s; }

.bento-card:hover {
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: var(--glow);
}

.bento-card-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

/* Card Elements */
.card-icon-circle {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.card-icon-circle svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--primary);
}

/* Avatar Icon */
.avatar-icon {
  position: relative;
  width: 4rem;
  height: 4rem;
}

.avatar-icon .avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--primary);
  box-shadow: var(--glow);
}

.avatar-icon .cat-overlay {
  position: absolute;
  top: -8px;
  right: -6px;
  width: 5rem;
  height: auto;
  z-index: 2;
  pointer-events: none;
  animation: catFloat 2.5s ease-in-out infinite;
}

/* Emoji Card */
.card-emoji {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
  box-shadow: inset 0 0 0 rgba(34,197,94,0);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.bento-card:hover .card-emoji {
  transform: scale(1.1);
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(34,197,94,0.35);
}

/* Card Text */
.card-subtitle {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

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

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title-row .arrow {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.bento-card-link:hover .arrow {
  color: var(--primary);
  transform: translateX(4px);
}

.card-description {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Skill Icons */
.skill-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.skill-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--primary);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.skill-icon:hover {
  transform: scale(1.12);
  box-shadow: var(--glow);
}

/* Footer */
.footer {
  text-align: center;
  grid-column: 1 / -1;
  padding: 3rem 0;
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.highlight {
  color: var(--primary);
}

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