/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #030303;
  --bg2: #080808;
  --card-bg: rgba(255, 255, 255, 0.02);
  --card-border: rgba(255, 255, 255, 0.06);
  --card-border-hover: rgba(220, 38, 38, 0.4);
  --red: #e11d48;
  --red-glow: #fb7185;
  --dark-red: #9f1239;
  --text: #fafafa;
  --muted: #a1a1aa;
  --gradient: linear-gradient(135deg, var(--red), #ff4d4d);
  --silver-grad: linear-gradient(135deg, #ffffff 0%, #a1a1aa 100%);
  --glow: 0 0 40px rgba(225, 29, 72, 0.15);
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

html { scroll-behavior: smooth; background: var(--bg); color: var(--text); }
body {
  font-family: var(--font-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ===== UTILITIES ===== */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
.silver-gradient {
  background: var(--silver-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
.mono-sub {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: -0.02em;
}
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-md { max-width: 32rem; }

/* ===== NAV PILL ===== */
.nav-wrapper {
  position: fixed; top: 24px; left: 0; right: 0;
  z-index: 100;
  display: flex; justify-content: center;
  padding: 0 1rem;
  pointer-events: none; /* Let clicks pass through outside the nav */
}
#noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}
#navbar {
  pointer-events: auto;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  padding: 0.5rem 1rem 0.5rem 1.5rem;
  border-radius: 999px; /* Pill shape */
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
#navbar.scrolled {
  background: rgba(10, 10, 10, 0.85);
  border-color: rgba(255, 255, 255, 0.1);
}
.nav-inner {
  display: flex; align-items: center; gap: 3rem;
}
.nav-logo-container { display: flex; align-items: center; gap: 0.8rem; }
.nav-logo-img { height: 32px; width: auto; }
.nav-logo {
  font-family: var(--font-mono);
  font-size: 1rem; font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
}
.nav-links { display: flex; gap: 1.5rem; list-style: none; }
.nav-links a { 
  color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 500;
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--text); }

/* ===== BUTTONS ===== */
.magnetic {
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
  /* Will be handled by JS, but set basic transitions */
  transform: translate(0,0);
  transition: transform 0.1s linear, background 0.3s, box-shadow 0.3s;
}
.magnetic .btn-text {
  pointer-events: none; /* Let the wrapper handle physics */
  display: inline-flex; align-items: center; gap: 0.5rem;
  transition: transform 0.1s linear;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  padding: 0.8rem 1.8rem;
  border-radius: 999px;
  font-weight: 600; font-size: 0.95rem;
  text-decoration: none;
}
.btn-primary:hover {
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--card-border);
  padding: 0.8rem 1.8rem;
  border-radius: 999px;
  font-weight: 500; font-size: 0.95rem;
  text-decoration: none;
  backdrop-filter: blur(10px);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-nav {
  background: var(--text); color: var(--bg);
  padding: 0.5rem 1.2rem; border-radius: 999px;
  font-size: 0.85rem; font-weight: 600; text-decoration: none;
}

/* ===== HERO ===== */
#hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
#aurora-canvas {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  filter: blur(80px); /* Extreme blur for 21st.dev volumetric feel */
}
/* Subtle vignette over canvas */
#hero::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at center, transparent 0%, var(--bg) 100%);
  pointer-events: none; z-index: 0;
}
.hero-content {
  position: relative; z-index: 1;
  text-align: center; padding: 0 1.5rem;
  max-width: 900px;
}
.badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  color: var(--text); padding: 0.4rem 1rem;
  border-radius: 999px; font-size: 0.85rem; font-family: var(--font-mono);
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
}
.badge-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
}
.hero-content h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800; line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
}
.hero-desc {
  color: var(--muted); font-size: clamp(1rem, 2vw, 1.25rem); line-height: 1.6;
  margin-bottom: 2.5rem;
  max-width: 600px; margin-left: auto; margin-right: auto;
}

/* FLOATING ICONS HERO COMPONENT */
.hero-title-wrapper {
  position: relative;
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 0 auto 1.5rem auto;
  z-index: 2;
}
.hero-title-wrapper h1 { margin-bottom: 0; }
.floating-icon {
  position: absolute;
  width: 56px; height: 56px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  --rot: 0deg;
  animation: float-icon ease-in-out infinite alternate;
  z-index: 0;
}
.floating-icon.icon-1 { top: 15%; left: 15%; animation-duration: 4.2s; --rot: -12deg; color: #5865F2; }
.floating-icon.icon-2 { top: 25%; right: 12%; animation-duration: 5s; animation-delay: 1s; --rot: 18deg; color: #0284c7; }
.floating-icon.icon-3 { bottom: 20%; left: 10%; animation-duration: 4.5s; animation-delay: 0.5s; --rot: 8deg; }
.floating-icon.icon-4 { bottom: 25%; right: 20%; animation-duration: 5.5s; animation-delay: 1.5s; --rot: -6deg; color: #22c55e; }

@keyframes float-icon {
  0% { transform: translateY(0px) rotate(var(--rot)); }
  100% { transform: translateY(-15px) rotate(var(--rot)); }
}

.hero-btns {
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
}
.scroll-hint {
  position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%);
  z-index: 1;
}
.mouse {
  width: 24px; height: 36px;
  border: 2px solid var(--muted); border-radius: 12px;
  position: relative;
}
.mouse::before {
  content: ''; position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; background: var(--text); border-radius: 50%;
  animation: mouseScroll 2s infinite cubic-bezier(0.15, 0.41, 0.69, 0.94);
}

/* ===== SECTIONS ===== */
section { padding: 8rem 1.5rem; position: relative; z-index: 10; }
.container { max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800; letter-spacing: -0.03em;
  margin-bottom: 1rem;
}
.section-subtitle {
  color: var(--muted); font-size: 1.1rem;
}

/* ===== MARQUEE ===== */
.marquee-wrapper {
  width: 100%; overflow: hidden;
  padding: 2rem 0; border-top: 1px solid var(--card-border); border-bottom: 1px solid var(--card-border);
  background: rgba(255,255,255,0.01);
  margin-top: -3rem; /* Pull up slightly */
  margin-bottom: 3rem;
  position: relative; z-index: 10;
}
.marquee-container {
  display: flex; width: fit-content;
  animation: marquee 30s linear infinite;
}
.marquee-content {
  display: flex; gap: 3rem; white-space: nowrap; padding-right: 3rem;
}
.marquee-content span {
  font-family: var(--font-mono); font-size: 1rem; font-weight: 700;
  color: var(--text); letter-spacing: 0.1em;
  opacity: 0.8;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); } /* Scrolls exactly half the width (one set of spans) */
}

/* ===== LOGOS3 CAROUSEL (Skills) ===== */
.logos3-wrapper {
  margin-top: 2rem;
  overflow: hidden;
  position: relative;
  /* Mask edges to create a fading effect like ShadcnBlocks logos3 */
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}
.logos3-container {
  display: flex;
  width: fit-content;
  animation: scroll-logos 25s linear infinite;
}
.logos3-container:hover {
  animation-play-state: paused;
}
.logos3-track {
  display: flex;
  align-items: center;
  gap: 4rem;
  padding-right: 4rem;
}
.logo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  color: var(--muted);
  opacity: 0.6;
  transition: opacity 0.3s, color 0.3s, transform 0.3s;
  cursor: default;
}
.logo-item:hover {
  opacity: 1;
  color: var(--text);
  transform: translateY(-2px);
}
.logo-item span {
  font-size: 0.85rem;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.05em;
}

@keyframes scroll-logos {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); } /* Half width, just like the marquee */
}

/* ===== BENTO GRID SYSTEM ===== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
  grid-auto-rows: minmax(180px, auto);
}

/* SPOTLIGHT CARD */
.bento-card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid var(--card-border);
  box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.08), 0 10px 30px -10px rgba(0,0,0,0.5);
  border-radius: 24px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color 0.4s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s;
}
.bento-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(255,255,255,0.12);
  box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.15), 0 20px 40px -10px rgba(0,0,0,0.7);
}

/* The Spotlight pseudo-element */
.bento-spotlight {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  opacity: 0; transition: opacity 0.5s;
  background: radial-gradient(
    600px circle at var(--x, 50%) var(--y, 50%),
    rgba(225, 29, 72, 0.1),
    transparent 40%
  );
}
.bento-card:hover .bento-spotlight { opacity: 1; }

.bento-content {
  position: relative; z-index: 1;
  padding: 2rem;
  height: 100%; display: flex; flex-direction: column;
}

/* Specific Bento Placements */
.bento-profile { grid-column: span 8; grid-row: span 2; }
.bento-stats { grid-column: span 4; grid-row: span 1; justify-content: center; }
.bento-skill { grid-column: span 4; grid-row: span 1; }
.bento-wide { grid-column: span 8; grid-row: span 1; }

.profile-header { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 1.5rem; }
.about-avatar { position: relative; width: 80px; height: 80px; }
.avatar-ring {
  position: absolute; inset: -4px; border-radius: 50%;
  background: var(--gradient);
  animation: spin 6s linear infinite; opacity: 0.5;
}
.avatar-img-round {
  position: relative; z-index: 1;
  width: 80px; height: 80px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--bg2);
}
.profile-info h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.2rem; }
.bento-desc { color: var(--muted); line-height: 1.7; font-size: 1.05rem; margin-bottom: 1.5rem; }
.bento-desc strong { color: var(--text); }
.bento-desc-small { color: var(--muted); font-size: 0.9rem; line-height: 1.5; margin-bottom: 1.5rem; flex: 1; }

.tags { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text); padding: 0.4rem 0.8rem;
  border-radius: 999px; font-size: 0.8rem; font-weight: 500;
}

.stat-group { text-align: center; padding: 1rem 0; }
.stat-num { font-size: 3rem; font-weight: 800; font-family: var(--font-mono); color: var(--text); line-height: 1; }
.stat-label { color: var(--muted); font-size: 0.9rem; margin-top: 0.5rem; }

.skill-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.bento-skill h4 { font-size: 1.2rem; font-weight: 600; margin-bottom: 0.5rem; }
.skill-track {
  background: rgba(255,255,255,0.05); border-radius: 999px; height: 4px; width: 100%; overflow: hidden;
}
.skill-fill {
  height: 100%; width: 0; background: var(--text); border-radius: 999px;
  transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

.bento-flex { flex-direction: row; align-items: center; justify-content: space-between; gap: 2rem; }
.flex-info { flex: 1; }
.skill-track-vertical-container { display: flex; flex-direction: column; gap: 1rem; min-width: 150px; }
.mini-stat { display: flex; justify-content: space-between; font-size: 0.9rem; font-family: var(--font-mono); color: var(--muted); }
.mini-stat .pct { color: var(--text); }

/* GALLERY GRIDS */
.gallery-grid .bento-img { grid-column: span 4; padding: 0; aspect-ratio: auto; min-height: 300px; }
.gallery-grid .bento-col-span-2 { grid-column: span 8; }
.bento-img img { width: 100%; height: 100%; object-fit: cover; opacity: 0.6; transition: opacity 0.5s, transform 0.5s; }
.bento-img:hover img { opacity: 1; transform: scale(1.03); }

/* CONTACT */
.bento-contact { grid-column: span 12; padding: 4rem 2rem; }
.contact-links { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--card-border);
  padding: 4rem 2rem;
  background: var(--bg2);
}
.footer-content { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.footer-logo { display: flex; align-items: center; gap: 0.8rem; font-family: var(--font-mono); font-weight: 700; font-size: 1.1rem; }
.footer-logo img { height: 28px; filter: grayscale(1); opacity: 0.7; }
.footer-copy { color: var(--muted); font-size: 0.9rem; }
.btn-dmca {
  display: inline-flex; align-items: center; gap: 0.8rem;
  padding: 0.6rem 1.2rem;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--card-border);
  border-radius: 12px; text-decoration: none; color: var(--muted); font-size: 0.8rem; font-weight: 600;
  transition: all 0.3s ease;
}
.btn-dmca img { height: 20px; opacity: 0.5; filter: grayscale(1); transition: 0.3s; }
.btn-dmca:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); border-color: rgba(255,255,255,0.15); transform: translateY(-2px); }
.btn-dmca:hover img { opacity: 1; filter: grayscale(0); }

/* ===== ANIMATIONS ===== */
.blur-reveal {
  opacity: 0;
  filter: blur(12px);
  transform: translateY(30px) scale(0.96);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), 
              filter 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--delay, 0s);
  will-change: transform, opacity, filter;
}
.blur-reveal.visible { 
  opacity: 1; 
  filter: blur(0); 
  transform: translateY(0) scale(1); 
}

@keyframes mouseScroll {
  0% { top: 6px; opacity: 1; }
  100% { top: 20px; opacity: 0; }
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .bento-profile { grid-column: span 12; }
  .bento-stats { grid-column: span 12; display: flex; flex-direction: row; gap: 3rem; }
  .bento-skill { grid-column: span 6; }
  .bento-wide { grid-column: span 12; }
  .gallery-grid .bento-img, .gallery-grid .bento-col-span-2 { grid-column: span 12; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .bento-skill { grid-column: span 12; }
  .bento-flex { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
  .hero-content h1 { font-size: 2.5rem; }
}
