@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --bg-primary: #0a0b10;
  --bg-secondary: #11131e;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --accent-primary: #6366f1;
  --accent-secondary: #a855f7;
  --accent-pink: #ec4899;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --card-bg: rgba(17, 19, 30, 0.45);
  --card-border: rgba(255, 255, 255, 0.07);
  --card-hover-border: rgba(99, 102, 241, 0.4);
  --glass-bg: rgba(17, 19, 30, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Background Gradients/Mesh */
body::before {
  content: '';
  position: absolute;
  top: -10%;
  left: -10%;
  width: 50%;
  height: 60%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  z-index: -1;
  filter: blur(80px);
}

body::after {
  content: '';
  position: absolute;
  bottom: 10%;
  right: -10%;
  width: 50%;
  height: 60%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.12) 0%, transparent 70%);
  z-index: -1;
  filter: blur(80px);
}

/* Header Section */
header {
  max-width: 1400px;
  margin: 0 auto;
  padding: 4rem 2rem 2rem 2rem;
  text-align: center;
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.logo-dot {
  width: 12px;
  height: 12px;
  background: var(--accent-gradient);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--accent-primary);
  animation: pulse 2s infinite alternate;
}

header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

header p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Search and Filters Section */
.controls-container {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

.search-wrapper {
  position: relative;
  width: 100%;
  max-width: 500px;
}

.search-wrapper input {
  width: 100%;
  padding: 1rem 1.5rem 1rem 3rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 9999px;
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  outline: none;
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-wrapper input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.search-wrapper i {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
  pointer-events: none;
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  max-width: 1000px;
}

.filter-btn {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btn:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-main);
  transform: translateY(-1px);
}

.filter-btn.active {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

/* Portfolio Grid */
.portfolio-grid {
  max-width: 1400px;
  margin: 2rem auto 6rem auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 2rem;
}

/* Card Styling */
.portfolio-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  backdrop-filter: blur(12px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  height: 100%;
}

.portfolio-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Card Hover */
.portfolio-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--card-hover-border);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 
              0 0 30px rgba(99, 102, 241, 0.1);
}

.portfolio-card:hover .card-img img {
  transform: scale(1.06);
}

.portfolio-card:hover .visit-indicator {
  transform: translateX(4px);
  color: var(--accent-pink);
}

.portfolio-card:hover .card-img::after {
  opacity: 0.1;
}

/* Card Image Area */
.card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #151824;
}

.card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Card Body */
.card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-tags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.card-tag {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.1);
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  letter-spacing: 0.05em;
}

.card-body h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.card-body p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1rem;
}

.card-url {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70%;
}

.visit-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent-primary);
  font-size: 0.875rem;
  font-weight: 600;
}

.visit-indicator {
  transition: transform 0.3s ease;
}

/* Footer Section */
footer {
  text-align: center;
  padding: 4rem 2rem;
  background: #07080d;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 0.9rem;
}

footer p {
  margin-bottom: 0.5rem;
}

/* Animations */
@keyframes pulse {
  0% {
    transform: scale(0.9);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
  }
  100% {
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.8);
  }
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
  header h1 {
    font-size: 2.25rem;
  }
  .portfolio-grid {
    grid-template-columns: 1fr;
    padding: 0 1.25rem;
  }
}
