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

:root {
  --primary: #ff3366;
  --secondary: #6c5ce7;
  --dark: #0a0e27;
  --light: #f8f9fa;
  --accent: #ffd93d;
}

body {
  font-family: "Syne", sans-serif;
  background: var(--dark);
  color: var(--light);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Animated Background */
.bg-gradient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0a0e27 100%);
}

.bg-gradient::before {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(255, 51, 102, 0.15) 0%,
    transparent 70%
  );
  top: -200px;
  right: -200px;
  animation: float 20s ease-in-out infinite;
}

.bg-gradient::after {
  content: "";
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(108, 92, 231, 0.15) 0%,
    transparent 70%
  );
  bottom: -150px;
  left: -150px;
  animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(30px, -30px) rotate(120deg);
  }
  66% {
    transform: translate(-20px, 20px) rotate(240deg);
  }
}

/* Grid Pattern Overlay */
.grid-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: -1;
  animation: gridSlide 20s linear infinite;
}

@keyframes gridSlide {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(50px, 50px);
  }
}

/* Header */
.header {
  padding: 8rem 2rem 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.header h1 {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(4rem, 12vw, 9rem);
  letter-spacing: 0.05em;
  background: linear-gradient(
    135deg,
    var(--primary),
    var(--secondary),
    var(--accent)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  animation: slideDown 1s ease-out;
  line-height: 1;
}

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

.header p {
  font-size: 1.25rem;
  color: rgba(248, 249, 250, 0.7);
  max-width: 600px;
  margin: 0 auto;
  animation: fadeIn 1s ease-out 0.3s backwards;
}

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

.decorative-line {
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  margin: 2rem auto;
  animation: expand 1s ease-out 0.6s backwards;
}

@keyframes expand {
  from {
    width: 0;
  }
  to {
    width: 100px;
  }
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2.5rem;
  margin-top: 4rem;
}

/* =========================
   Project Card
========================= */

.project-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  border-radius: 24px;
  padding: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);

  position: relative;
  overflow: hidden;

  animation: cardSlideUp 0.6s ease-out backwards;

  /* 3D tilt driven by JS via custom properties */
  --rx: 0deg;
  --ry: 0deg;
  --mx: 50%;
  --my: 50%;

  transform-style: preserve-3d;
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(0) scale(1);
  transition:
    transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 0.5s ease,
    border-color 0.4s ease;
  will-change: transform;
}

/* Snappier tilt tracking while actively hovering */
.project-card.is-hovering {
  transition: transform 0.05s linear, box-shadow 0.3s ease;
}

/* Animation Delay */

.project-card:nth-child(1) {
  animation-delay: 0.1s;
}

.project-card:nth-child(2) {
  animation-delay: 0.2s;
}

.project-card:nth-child(3) {
  animation-delay: 0.3s;
}

/* Slide Up Animation */

@keyframes cardSlideUp {
  from {
    opacity: 0;
    transform: translateY(60px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Cursor-tracking glow overlay */

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;

  background: radial-gradient(
    500px circle at var(--mx) var(--my),
    rgba(255, 51, 102, 0.18),
    transparent 60%
  );

  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

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

/* Gradient Border */

.project-card::after {
  content: "";

  position: absolute;
  inset: -2px;

  background: linear-gradient(
    135deg,
    var(--primary),
    var(--secondary),
    var(--accent)
  );

  border-radius: 24px;
  z-index: -1;

  opacity: 0;
  transition: opacity 0.4s ease;
}

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

/* Moving Glare */

.project-card .glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}

.project-card .glare::before {
  content: "";

  position: absolute;
  top: -150%;
  left: -70%;

  width: 45%;
  height: 400%;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.45),
    transparent
  );

  transform: rotate(25deg) translateX(-350%);
  transition: transform 0.8s ease;
}

.project-card:hover .glare::before {
  transform: rotate(25deg) translateX(550%);
}

/* Hover Effect (shadow + border only — tilt handled by --rx/--ry) */

.project-card:hover {
  border-color: transparent;

  box-shadow:
    0 25px 50px -12px rgba(255, 51, 102, 0.35),
    0 0 35px rgba(255, 51, 102, 0.15);
}

.project-number {
  font-family: "Bebas Neue", sans-serif;
  font-size: 5rem;
  position: absolute;
  top: -20px;
  right: 20px;
  opacity: 0.1;
  color: var(--primary);
  line-height: 1;
  transition: all 0.4s ease;
}

.project-card:hover .project-number {
  opacity: 0.2;
  transform: scale(1.2);
}

.project-card h2 {
  font-family: "Bebas Neue", sans-serif;
  font-size: 2.25rem;
  letter-spacing: 0.03em;
  margin-bottom: 1rem;
  color: var(--light);
  position: relative;
  z-index: 1;
  line-height: 1.2;
}

.project-meta {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.tech-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
  cursor: pointer;
}

.project-card:hover .tech-tag {
  background: rgba(255, 51, 102, 0.2);
  transform: translateY(-2px);
}

.project-card p {
  color: rgba(248, 249, 250, 0.8);
  line-height: 1.7;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.project-link::after {
  content: "→";
  transition: transform 0.3s ease;
}

.project-link:hover {
  gap: 1rem;
  color: var(--light);
}

.project-link:hover::after {
  transform: translateX(5px);
}

/* Footer */
.footer {
  text-align: center;
  padding: 4rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 4rem;
  position: relative;
}

.footer p {
  color: rgba(248, 249, 250, 0.5);
  font-size: 0.95rem;
}

.footer-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* Scroll Reveal Animation */
@keyframes revealOnScroll {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .header {
    padding: 6rem 1.5rem 4rem;
  }

  .header h1 {
    font-size: 4rem;
  }

  .project-card {
    padding: 2rem;
  }

  .project-number {
    font-size: 4rem;
  }
}

/* Cursor Trail Effect */
.cursor-trail {
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary), transparent);
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#searchBar {
  position: fixed;
  align-items: center;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 350px;
  padding: 0.75rem 1rem;
  border-radius: 30px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--light);
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
}

.app-container {
  display: flex;
  gap: 20px;
  padding: 15px;
  border-radius: 20px;

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

/* App icons */
.app-icon {
  width: 30px;
  height: 30px;
  border-radius: 15px;
  cursor: pointer;

  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

/* Hover effect */
.app-icon:hover {
  transform: scale(1.15);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

/* Portfolio refresh */
:root {
  --primary: #b7ff6a;
  --secondary: #8f80ff;
  --dark: #090b10;
  --light: #f4f4f1;
  --accent: #c9ff8d;
  --muted: #9b9ca8;
  --surface: #11141c;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body {
  background: var(--dark);
  color: var(--light);
  font-family: "Syne", sans-serif;
}

.bg-gradient {
  background:
    radial-gradient(ellipse at 50% -20%, rgba(143, 128, 255, 0.16), transparent 50%),
    linear-gradient(180deg, #0b0d14, #090b10 70%);
}

.bg-gradient::before {
  background: radial-gradient(circle, rgba(183, 255, 106, 0.12), transparent 70%);
}

.bg-gradient::after {
  background: radial-gradient(circle, rgba(143, 128, 255, 0.13), transparent 70%);
}

.grid-pattern {
  opacity: 0.45;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.site-nav {
  max-width: 1320px;
  min-height: 82px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand,
.nav-link {
  color: var(--light);
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.brand img {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
}

.brand-dot {
  color: var(--primary);
}

.nav-link {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  color: #c8c8d0;
  font-size: 0.87rem;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--primary);
}

.header {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(5.5rem, 11vw, 9rem) 2rem 6rem;
  overflow: visible;
  text-align: left;
}

.header .eyebrow,
.section-kicker {
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.header .eyebrow {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.8rem;
  animation: fadeIn 0.7s ease-out backwards;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 14px rgba(183, 255, 106, 0.7);
}

.header h1 {
  margin: 0;
  color: var(--light);
  font-family: "Syne", sans-serif;
  font-size: clamp(3.8rem, 9vw, 7.5rem);
  font-weight: 700;
  letter-spacing: -0.09em;
  line-height: 0.99;
  -webkit-text-fill-color: initial;
  animation: slideDown 0.75s ease-out;
}

.header h1 span {
  color: transparent;
  background: linear-gradient(90deg, var(--primary), #e0ffa8 65%, #fff);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header .hero-copy {
  max-width: 590px;
  margin: 1.65rem 0 0;
  color: #a3a5b0;
  font-size: clamp(1rem, 2vw, 1.13rem);
  line-height: 1.8;
  animation: fadeIn 0.8s ease-out 0.2s backwards;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding: 0.9rem 1.2rem;
  border: 1px solid rgba(183, 255, 106, 0.35);
  border-radius: 8px;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.hero-cta:hover {
  transform: translateY(-2px);
  background: var(--primary);
  color: #10130d;
}

.container {
  max-width: 1320px;
  padding: 0 2rem 5rem;
}

.project-section {
  padding-top: 1rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-kicker {
  margin-bottom: 0.65rem;
  color: #8e90a0;
  font-size: 0.68rem;
}

.section-heading h2 {
  color: var(--light);
  font-size: clamp(1.8rem, 4vw, 2.65rem);
  letter-spacing: -0.07em;
  line-height: 1.1;
}

.project-count {
  padding-bottom: 0.3rem;
  color: #888b98;
  font-size: 0.85rem;
  white-space: nowrap;
}

.project-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.1rem;
  margin-bottom: 2rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(17, 20, 28, 0.76);
  backdrop-filter: blur(16px);
}

.search-wrap {
  display: flex;
  min-width: min(100%, 270px);
  flex: 1 1 280px;
  align-items: center;
  gap: 0.75rem;
  padding: 0.15rem 0.5rem;
  color: #888b98;
}

.search-icon {
  color: var(--primary);
  font-size: 1.5rem;
  line-height: 1;
}

#searchBar {
  position: static;
  width: 100%;
  min-width: 0;
  padding: 0.55rem 0;
  transform: none;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  color: var(--light);
  font-family: inherit;
  font-size: 0.9rem;
}

#searchBar::placeholder {
  color: #777a87;
}

#searchBar:focus-visible {
  box-shadow: none;
}

.search-wrap:focus-within {
  color: var(--primary);
}

kbd {
  flex: none;
  padding: 0.2rem 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  color: #888b98;
  font-family: inherit;
  font-size: 0.7rem;
}

.filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.filter-button,
.reset-button {
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #9b9ca8;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.filter-button {
  padding: 0.6rem 0.78rem;
}

.filter-button:hover {
  color: var(--light);
}

.filter-button.is-active {
  border-color: rgba(183, 255, 106, 0.18);
  background: rgba(183, 255, 106, 0.1);
  color: var(--primary);
}

.projects-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.1rem;
  margin-top: 0;
}

.project-card {
  display: flex;
  min-height: 320px;
  flex-direction: column;
  padding: 1.8rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(20, 23, 32, 0.97), rgba(14, 16, 23, 0.95));
  backdrop-filter: blur(10px);
  transform: none;
  will-change: auto;
  animation: cardSlideUp 0.55s ease-out backwards;
}

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

.project-card::before {
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(183, 255, 106, 0.09), transparent 65%);
}

.project-card::after {
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(183, 255, 106, 0.45), rgba(143, 128, 255, 0.18), transparent 75%);
  pointer-events: none;
}

.project-card:hover {
  border-color: rgba(183, 255, 106, 0.34);
  box-shadow: 0 22px 50px -25px rgba(0, 0, 0, 0.95), 0 0 28px rgba(183, 255, 106, 0.07);
}

.project-number {
  top: 1rem;
  right: 1.4rem;
  color: var(--primary);
  font-size: 3.4rem;
}

.project-card h2 {
  max-width: 85%;
  margin-bottom: 1rem;
  font-family: "Syne", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.045em;
}

.project-meta {
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.tech-tag {
  padding: 0.34rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #b8bac4;
  cursor: pointer;
  font-size: 0.65rem;
  letter-spacing: 0.035em;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.tech-tag:hover,
.tech-tag:focus-visible {
  outline: none;
  background: rgba(183, 255, 106, 0.12);
  color: var(--primary);
}

.project-card:hover .tech-tag {
  background: rgba(255, 255, 255, 0.04);
  transform: none;
}

.project-card:hover .tech-tag:hover {
  background: rgba(183, 255, 106, 0.12);
  transform: translateY(-2px);
}

.project-card p {
  margin-bottom: 1.5rem;
  color: #a3a5b0;
  font-size: 0.87rem;
  line-height: 1.75;
}

.project-link {
  width: fit-content;
  margin-top: auto;
  color: var(--primary);
  font-size: 0.85rem;
}

.project-link:hover {
  color: #eaffd0;
}

.empty-state {
  padding: 4rem 1rem;
  text-align: center;
}

.empty-state > span {
  color: var(--primary);
  font-size: 2rem;
}

.empty-state h3 {
  margin: 0.8rem 0 0.5rem;
  font-size: 1.3rem;
}

.empty-state p {
  color: var(--muted);
  font-size: 0.9rem;
}

.reset-button {
  margin-top: 1.2rem;
  padding: 0.7rem 1rem;
  background: rgba(183, 255, 106, 0.1);
  color: var(--primary);
}

.reset-button:hover {
  background: var(--primary);
  color: #10130d;
}

.footer {
  margin-top: 1rem;
  padding: 1.5rem 2rem;
  border-top-color: rgba(255, 255, 255, 0.08);
}

.footer-content {
  display: flex;
  max-width: 1320px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 auto;
}

.footer p span {
  padding: 0 0.35rem;
  color: var(--primary);
}

.app-container {
  gap: 0.5rem;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.app-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
}

.app-icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.app-icon:hover {
  transform: translateY(-2px);
  border-color: rgba(183, 255, 106, 0.35);
  box-shadow: none;
}

a:focus-visible,
button:focus-visible,
.app-icon:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}

@media (max-width: 768px) {
  .site-nav {
    min-height: 68px;
    padding: 0 1.25rem;
  }

  .header {
    padding: 5rem 1.25rem 4.5rem;
  }

  .header h1 {
    font-size: clamp(3rem, 10vw, 5rem);
  }

  .container {
    padding: 0 1.25rem 3rem;
  }

  .project-tools {
    align-items: stretch;
  }

  .filter-list {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.15rem;
  }

  .filter-button {
    flex: none;
  }

  .projects-grid {
    gap: 0.85rem;
  }

  .project-card {
    min-height: 0;
  }

  .footer-content {
    flex-direction: column-reverse;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}