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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #0a0a1a;
  color: #e0e0e0;
  min-height: 100vh;
  overflow-x: hidden;
}

#bgCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

header {
  text-align: center;
  margin-bottom: 40px;
  animation: fadeDown 0.8s ease;
}

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

.avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 8px 40px rgba(102, 126, 234, 0.35);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s;
  user-select: none;
}

.avatar:hover {
  box-shadow: 0 12px 50px rgba(102, 126, 234, 0.5);
}

.avatar-inner {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  transform-style: preserve-3d;
}

.avatar.flipped .avatar-inner {
  transform: rotateY(180deg);
}

.avatar-letters,
.avatar-photo {
  position: absolute;
  backface-visibility: hidden;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.avatar-letters {
  font-size: 36px;
  font-weight: 700;
  color: #fff;
}

.avatar-photo {
  transform: rotateY(180deg);
  object-fit: cover;
  display: block;
}

h1 {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea, #f093fb, #ff6b9d);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradShift 4s ease infinite;
}

@keyframes gradShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.subtitle {
  margin-top: 8px;
  color: #7777aa;
  font-size: 1.1rem;
  letter-spacing: 0.3px;
}

.search-box {
  margin-top: 24px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

#searchInput {
  width: 100%;
  padding: 12px 20px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: #e0e0e0;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: all 0.3s;
  backdrop-filter: blur(4px);
}

#searchInput::placeholder {
  color: #666699;
}

#searchInput:focus {
  border-color: rgba(102, 126, 234, 0.5);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 30px rgba(102, 126, 234, 0.15);
}

#searchInput:focus::placeholder {
  color: transparent;
}

.stats {
  text-align: center;
  margin-bottom: 32px;
  animation: fadeUp 0.6s ease 0.3s both;
}

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

.stat-item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 14px 32px;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: #667eea;
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #8888aa;
  margin-top: 2px;
}

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.project-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  padding: 28px 24px;
  text-decoration: none;
  color: inherit;
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(6px);
  animation: cardIn 0.5s ease both;
  display: flex;
  flex-direction: column;
}

.project-card:nth-child(1) { animation-delay: 0.05s; }
.project-card:nth-child(2) { animation-delay: 0.15s; }
.project-card:nth-child(3) { animation-delay: 0.25s; }
.project-card:nth-child(4) { animation-delay: 0.35s; }
.project-card:nth-child(5) { animation-delay: 0.45s; }

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

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
  background-size: 200% 100%;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  opacity: 0;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(102, 126, 234, 0.08), transparent 60%);
  transition: opacity 0.3s;
  pointer-events: none;
}

.project-card:hover::before {
  transform: scaleX(1);
}

.project-card:hover::after {
  opacity: 1;
}

.project-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(102, 126, 234, 0.25);
  transform: translateY(-5px);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5);
}

.project-card.hidden {
  display: none;
}

.project-card-locked {
  cursor: not-allowed !important;
  opacity: 0.55;
  filter: grayscale(0.3);
}

.project-card-locked:hover {
  transform: none !important;
  box-shadow: none !important;
  border-color: rgba(255, 255, 255, 0.07) !important;
  background: rgba(255, 255, 255, 0.03) !important;
}

.card-lock {
  font-size: 1.3rem;
  animation: lockPulse 2s ease-in-out infinite;
}

@keyframes lockPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.card-lock-msg {
  margin-top: 10px;
  padding: 6px 14px;
  background: rgba(255, 150, 50, 0.1);
  border: 1px solid rgba(255, 150, 50, 0.25);
  border-radius: 10px;
  color: #ff9632;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.3px;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.card-icon {
  font-size: 2.2rem;
  line-height: 1;
  transition: transform 0.3s;
}

.project-card:hover .card-icon {
  transform: scale(1.15) rotate(-5deg);
}

.card-arrow {
  font-size: 1.2rem;
  color: #555577;
  transition: all 0.3s;
}

.project-card:hover .card-arrow {
  color: #667eea;
  transform: translateX(4px);
}

.project-card h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}

.project-card p {
  font-size: 0.88rem;
  color: #8888bb;
  line-height: 1.6;
  flex: 1;
}

.card-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tag-html {
  background: rgba(102, 126, 234, 0.15);
  color: #667eea;
}

.tag-js {
  background: rgba(240, 219, 79, 0.15);
  color: #f0db4f;
}

.tag-css {
  background: rgba(102, 198, 234, 0.15);
  color: #66c6ea;
}

.tag-threejs {
  background: rgba(255, 68, 68, 0.15);
  color: #ff6b6b;
}

.tag-ai {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
}

.tag-survival {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.tag-firebase {
  background: rgba(255, 168, 0, 0.15);
  color: #ffa800;
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #666699;
  font-size: 1.1rem;
}

.linktree-section {
  text-align: center;
  margin-top: 28px;
  animation: fadeUp 0.6s ease 0.5s both;
}

.linktree-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #666699;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.25s ease;
}

.linktree-link:hover {
  color: #43e97b;
  border-color: rgba(67, 233, 123, 0.2);
  background: rgba(67, 233, 123, 0.05);
}

.linktree-icon {
  font-size: 0.9rem;
}

.linktree-arrow {
  font-size: 0.75rem;
  opacity: 0.5;
  transition: transform 0.2s;
}

.linktree-link:hover .linktree-arrow {
  transform: translate(2px, -2px);
  opacity: 1;
}

footer {
  text-align: center;
  margin-top: 60px;
  color: #444466;
  font-size: 0.82rem;
  letter-spacing: 0.3px;
}

/* ═══════════════════════════════════════════
   NO RESULTS
   ═══════════════════════════════════════════ */
