/* Base */
:root {
  --bg-0: #0b0b14;
  --bg-1: #0e0f1f;
  --text: #e6e6f0;
  --muted: #a7a7be;
  --accent-1: #7c3aed; /* purple */
  --accent-2: #2563eb; /* blue */
  --card: rgba(255,255,255,0.06);
  --card-border: rgba(255,255,255,0.08);
  --chip: rgba(255,255,255,0.08);
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }
html, body {
  height: 100%;
  background: var(--bg-0);
  color: var(--text);
}
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.65;
  overflow-x: hidden;
}

/* Fluid animated background */
.bg { position: fixed; inset: 0; z-index: -2; }
.bg-gradient {
  position: absolute; inset: 0; z-index: -2;
  background: radial-gradient(1200px 800px at 30% 85%, rgba(124,58,237,0.35), transparent 60%),
              radial-gradient(900px 700px at 75% 90%, rgba(37,99,235,0.35), transparent 60%),
              radial-gradient(1000px 900px at 50% 100%, rgba(99,102,241,0.28), transparent 60%),
              linear-gradient(180deg, var(--bg-1), var(--bg-0));
  filter: saturate(1.15);
  animation: float-bg 18s ease-in-out infinite alternate;
}

@keyframes float-bg {
  0%   { filter: hue-rotate(0deg) saturate(1.1); transform: translateY(0) scale(1); }
  100% { filter: hue-rotate(10deg) saturate(1.2); transform: translateY(2%) scale(1.02); }
}

/* Subtle noise for texture */
.bg-noise { position: absolute; inset: 0; z-index: -1; opacity: .08; mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.35'/></svg>");
}

/* Optional canvas bubbles */
#bg-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* Layout */
.container { width: min(1100px, 92vw); margin: 0 auto; padding: 24px; }
.site-header { position: sticky; top: 0; backdrop-filter: blur(8px); background: linear-gradient(to bottom, rgba(11,11,20,0.75), transparent); z-index: 10; }
.site-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid rgba(255,255,255,0.06); }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); text-decoration: none; letter-spacing: .2px; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--accent-1), var(--accent-2)); box-shadow: var(--shadow); }
.brand-name { font-size: 16px; opacity: .95; }

.nav { display: flex; gap: 8px; }
.nav-link { color: var(--muted); text-decoration: none; padding: 10px 14px; border-radius: 10px; transition: color .2s ease, background .2s ease; }
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.nav-link.active { color: var(--text); background: rgba(255,255,255,0.08); }

.hero { display: grid; gap: 28px; padding-top: 36px; padding-bottom: 36px; }
.intro .eyebrow { color: var(--muted); font-weight: 600; letter-spacing: .2em; text-transform: uppercase; font-size: 12px; margin: 8px 0; }
.title { font-size: clamp(36px, 6vw, 56px); line-height: 1.1; margin: 6px 0 10px; letter-spacing: -0.02em; }
.accent { color: #a78bfa; }
.subtitle { color: #cfd1ff; max-width: 70ch; }
.actions { display: flex; gap: 12px; margin-top: 16px; }

.btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--card-border); background: var(--card); color: var(--text); text-decoration: none; font-weight: 600; box-shadow: var(--shadow); transition: transform .15s ease, background .2s ease, border-color .2s ease; }
.btn:hover { transform: translateY(-1px); background: rgba(255,255,255,0.09); border-color: rgba(255,255,255,0.14); }
.btn.primary { background: linear-gradient(135deg, rgba(124,58,237,0.9), rgba(37,99,235,0.9)); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; border-color: rgba(255,255,255,0.12); }

.card { background: var(--card); border: 1px solid var(--card-border); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }

.about .skills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--chip); border: 1px solid rgba(255,255,255,0.1); color: #eaeaff; font-size: 13px; }

.highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.highlight h3 { margin-top: 0; }

.page-header { padding-top: 36px; padding-bottom: 8px; }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; padding-bottom: 36px; }
.project h3 { margin: 0 0 8px; }
.project .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.site-footer { padding: 24px; border-top: 1px solid rgba(255,255,255,0.06); color: var(--muted); font-size: 14px; }

/* Subtle card hover */
.card { transition: transform .18s ease, border-color .2s ease, background .2s ease; }
.card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.16); background: rgba(255,255,255,0.08); }

/* Announcement bar */
.announcement-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  padding: 10px 16px;
  text-align: center;
  background: linear-gradient(135deg, rgba(124,58,237,0.9), rgba(37,99,235,0.9));
  color: #fff;
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  box-shadow: var(--shadow);
}

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

@media (max-width: 620px) {
  .nav { gap: 4px; }
  .nav-link { padding: 8px 10px; }
  .actions { flex-wrap: wrap; }
}
