:root {
  --bg: #08080f;
  --fg: #f2f2f7;
  --muted: #9a9aab;
  --glass-bg: rgba(255, 255, 255, 0.055);
  --glass-bg-hover: rgba(255, 255, 255, 0.09);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-hover: rgba(255, 255, 255, 0.22);
  --accent-1: #7c5cff;
  --accent-2: #22d3ee;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  overflow-x: hidden;
  position: relative;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  will-change: transform;
}

.orb-a {
  width: 42vw;
  height: 42vw;
  top: -10vw;
  left: -8vw;
  background: radial-gradient(circle at 30% 30%, var(--accent-1), transparent 70%);
  animation: float-a 22s ease-in-out infinite;
}

.orb-b {
  width: 38vw;
  height: 38vw;
  bottom: -12vw;
  right: -10vw;
  background: radial-gradient(circle at 60% 60%, var(--accent-2), transparent 70%);
  animation: float-b 26s ease-in-out infinite;
}

.orb-c {
  width: 26vw;
  height: 26vw;
  top: 40%;
  left: 55%;
  background: radial-gradient(circle, #ff5cad, transparent 70%);
  opacity: 0.28;
  animation: float-c 30s ease-in-out infinite;
}

@keyframes float-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vw, 8vw) scale(1.1); }
}

@keyframes float-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-5vw, -7vw) scale(1.08); }
}

@keyframes float-c {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-8vw, 5vw) scale(0.9); }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 40%, transparent 90%);
}

/* inline SVG fractal-noise filter used as a subtle grain texture */
.noise {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.spotlight {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(600px circle at var(--x, 50%) var(--y, 30%), rgba(124, 92, 255, 0.12), transparent 60%);
  transition: background 0.1s ease-out;
}

main {
  position: relative;
  z-index: 2;
}

.hero {
  position: relative; /* containing block for the absolutely-positioned .scroll-cue */
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6vh 24px;
  gap: 10px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0 0 8px;
}

.name {
  margin: 0;
  font-size: clamp(3.2rem, 12vw, 7.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  background: linear-gradient(120deg, #ffffff 20%, var(--accent-1) 55%, var(--accent-2) 85%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sheen 8s ease-in-out infinite, fade-up 0.9s cubic-bezier(.16,1,.3,1) both;
}

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

.tagline {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
}

.socials {
  display: flex;
  gap: 14px;
  margin-top: 34px;
  flex-wrap: wrap;
  justify-content: center;
}

.social-btn {
  position: relative;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  color: var(--fg);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.35s cubic-bezier(.16,1,.3,1), background 0.35s, border-color 0.35s, box-shadow 0.35s;
}

.social-btn svg {
  width: 20px;
  height: 20px;
}

.social-btn:hover,
.social-btn:focus-visible {
  transform: translateY(-5px) scale(1.06);
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  box-shadow: 0 12px 34px rgba(124, 92, 255, 0.35);
}

.tooltip {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  font-size: 0.7rem;
  color: var(--muted);
  background: rgba(15, 15, 22, 0.9);
  border: 1px solid var(--glass-border);
  padding: 3px 8px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}

.social-btn:hover .tooltip,
.social-btn:focus-visible .tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.scroll-cue {
  position: absolute;
  bottom: 40px;
  left: 0;
  right: 0;
  width: fit-content;
  margin: 0 auto; /* centers a dynamic-width element without touching transform, which .reveal already uses */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s;
}

.scroll-cue:hover,
.scroll-cue:focus-visible {
  color: var(--fg);
}

.scroll-cue-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
}

.scroll-cue-arrow {
  width: 18px;
  height: 18px;
  animation: scroll-cue-bounce 1.8s ease-in-out infinite;
}

@keyframes scroll-cue-bounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(6px); opacity: 0.5; }
}

.projects {
  max-width: 980px;
  margin: 0 auto;
  padding: 8vh 24px 14vh;
}

.section-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--muted);
  text-align: center;
  margin: 0 0 40px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--shadow);
  overflow: hidden;
  color: var(--fg);
  transition: transform 0.45s cubic-bezier(.16,1,.3,1), border-color 0.45s, box-shadow 0.45s;
  transform-style: preserve-3d;
  will-change: transform;
}

.card:hover {
  border-color: var(--glass-border-hover);
  box-shadow: 0 20px 60px rgba(124, 92, 255, 0.28);
}

.card-thumb {
  height: 180px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 30% 20%, rgba(124, 92, 255, 0.55), transparent 60%),
              radial-gradient(circle at 80% 80%, rgba(34, 211, 238, 0.5), transparent 60%),
              #12121c;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(.16,1,.3,1);
}

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

.card-body {
  padding: 22px 24px 26px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 700;
}

.card-body p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-2);
  text-decoration: none;
}

.card-link svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s ease;
}

.card-link:hover svg,
.card-link:focus-visible svg {
  transform: translate(2px, -2px);
}

.footer {
  text-align: center;
  padding: 32px 24px 48px;
  color: var(--muted);
  font-size: 0.8rem;
}

.footer-link {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--glass-border-hover);
  transition: color 0.25s;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--accent-2);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(.16,1,.3,1), transform 0.8s cubic-bezier(.16,1,.3,1);
  transition-delay: var(--delay, 0s);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orb, .name, .scroll-cue-arrow { animation: none !important; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .spotlight { display: none; }
}

@media (max-width: 560px) {
  .social-btn { width: 46px; height: 46px; }
  .socials { gap: 10px; }
}
