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

:root {
  --bg: #0a0612;
  --text: #f8f4ff;
  --muted: rgba(248, 244, 255, 0.55);
  --accent: #a78bfa;
  --accent-bright: #f0abfc;
  --accent-cyan: #67e8f9;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-highlight: rgba(255, 255, 255, 0.35);
  --radius: 18px;
  --card-radius: 20px;
  --max-width: 720px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Outfit", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Aurora mesh background ── */

.aurora {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  contain: layout paint;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  mix-blend-mode: screen;
  opacity: 0.7;
  will-change: transform;
}

.orb-1 {
  width: 55vw;
  height: 55vw;
  max-width: 600px;
  max-height: 600px;
  background: radial-gradient(circle, rgba(108, 76, 241, 0.55) 0%, transparent 70%);
  top: -15%;
  left: -10%;
  animation: float1 14s ease-in-out infinite;
}

.orb-2 {
  width: 45vw;
  height: 45vw;
  max-width: 500px;
  max-height: 500px;
  background: radial-gradient(circle, rgba(239, 93, 168, 0.45) 0%, transparent 70%);
  top: 20%;
  right: -15%;
  animation: float2 11s ease-in-out infinite;
}

.orb-3 {
  width: 40vw;
  height: 40vw;
  max-width: 450px;
  max-height: 450px;
  background: radial-gradient(circle, rgba(103, 232, 249, 0.35) 0%, transparent 70%);
  bottom: 10%;
  left: 25%;
  animation: float3 13s ease-in-out infinite;
}

.orb-4 {
  width: 35vw;
  height: 35vw;
  max-width: 380px;
  max-height: 380px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.4) 0%, transparent 70%);
  bottom: -10%;
  right: 20%;
  animation: float4 16s ease-in-out infinite;
}

.orb-5 {
  width: 30vw;
  height: 30vw;
  max-width: 320px;
  max-height: 320px;
  background: radial-gradient(circle, rgba(255, 209, 102, 0.2) 0%, transparent 70%);
  top: 45%;
  left: 50%;
  animation: float5 9s ease-in-out infinite;
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.08); }
}

@keyframes float2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-35px, 25px) scale(1.05); }
}

@keyframes float3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(25px, -30px) scale(1.1); }
}

@keyframes float4 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-20px, -25px) scale(1.06); }
}

@keyframes float5 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(calc(-50% + 20px), calc(-50% - 20px)) scale(1.12); }
}

/* ── Cursor glow ── */

.cursor-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(167, 139, 250, 0.12) 0%,
    rgba(239, 93, 168, 0.06) 35%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
}

body.cursor-active .cursor-glow {
  opacity: 1;
}

/* ── Grain overlay ── */

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 2;
}

.content {
  position: relative;
  z-index: 3;
}

/* ── Hero ── */

.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 5rem 1.5rem 3rem;
  animation: fadeUp 0.7s ease both;
}

.hero-label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.8rem, 8vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-shadow: 0 0 60px rgba(167, 139, 250, 0.25);
}

.hero-tagline {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 300;
  max-width: 42ch;
}

.hero-link {
  display: inline-block;
  margin-top: 1.75rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.hero-link:hover {
  color: var(--accent-cyan);
}

/* ── Tabs ── */

.tabs {
  display: flex;
  gap: 0.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
  animation: fadeUp 0.7s 0.1s ease both;
}

.tab {
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.tab:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 20px rgba(167, 139, 250, 0.15);
}

.tab.active {
  color: #1a0a2e;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent-cyan));
  border-color: transparent;
  box-shadow: 0 4px 24px rgba(167, 139, 250, 0.35);
}

/* ── Project cards (liquid glass / trading card base) ── */

.projects {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 280px;
  perspective: 1200px;
}

.card {
  --rx: 0deg;
  --ry: 0deg;
  --shine-x: 50%;
  --shine-y: 50%;

  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
  border-radius: var(--card-radius);
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0.05) 40%,
    rgba(167, 139, 250, 0.25) 100%
  );
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out, box-shadow 0.25s ease;
  animation: fadeUp 0.5s ease both;
  will-change: transform;
}

.card:hover {
  box-shadow:
    0 20px 50px rgba(108, 76, 241, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

.card-shine {
  position: absolute;
  inset: 0;
  border-radius: var(--card-radius);
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(
    circle at var(--shine-x) var(--shine-y),
    rgba(255, 255, 255, 0.25) 0%,
    rgba(167, 139, 250, 0.12) 25%,
    rgba(103, 232, 249, 0.08) 45%,
    transparent 65%
  );
}

.card:hover .card-shine {
  opacity: 1;
}

.card-inner {
  position: relative;
  border-radius: calc(var(--card-radius) - 1px);
  padding: 1.35rem 1.5rem;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  overflow: hidden;
}

.card-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.12) 0%,
    transparent 40%
  );
  pointer-events: none;
}

.card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 500;
}

.card-arrow {
  color: var(--accent-cyan);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s, transform 0.2s;
  flex-shrink: 0;
}

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

.card-desc {
  margin-top: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 300;
  position: relative;
}

.card-tag {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  background: rgba(103, 232, 249, 0.1);
  border: 1px solid rgba(103, 232, 249, 0.2);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  position: relative;
}

.empty {
  color: var(--muted);
  font-weight: 300;
  padding: 2rem 0;
  text-align: center;
}

.footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer p {
  font-size: 0.8rem;
  color: var(--muted);
}

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

/* ── Reduced motion ── */

@media (prefers-reduced-motion: reduce) {
  .orb {
    animation: none;
  }

  .card {
    transition: box-shadow 0.25s ease;
  }

  .cursor-glow {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-top: 3.5rem;
  }

  .tabs {
    flex-wrap: wrap;
  }

  .cursor-glow {
    display: none;
  }
}
