/* =========================================
   CRIS DEL NINNO — Custom Styles 2026
   ========================================= */

:root {
  --neon: #00d4ff;
  --neon-dim: rgba(0, 212, 255, 0.08);
  --neon-mid: rgba(0, 212, 255, 0.3);
  --neon-glow: 0 0 20px rgba(0, 212, 255, 0.6), 0 0 40px rgba(0, 212, 255, 0.3);
  --neon-glow-sm: 0 0 10px rgba(0, 212, 255, 0.5), 0 0 20px rgba(0, 212, 255, 0.2);
  --card-glow: 0 0 30px rgba(0, 212, 255, 0.15), 0 25px 50px rgba(0,0,0,0.8);
  --bg: #080808;
  --surface: #0f0f0f;
  --border: rgba(255, 255, 255, 0.06);
  --text: #f0f0f0;
  --muted: #6b7280;
  --font-display: 'Space Grotesk', sans-serif;
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Mono', monospace;
  overflow-x: hidden;
  cursor: none;
}

/* ---- Custom Cursor ---- */
#cursor {
  position: fixed;
  width: 12px; height: 12px;
  background: var(--neon);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
  box-shadow: var(--neon-glow);
  mix-blend-mode: screen;
}
#cursor-trail {
  position: fixed;
  width: 36px; height: 36px;
  border: 1px solid var(--neon-mid);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.12s var(--ease-out), width 0.3s, height 0.3s, border-color 0.3s;
}
body:has(a:hover) #cursor,
body:has(button:hover) #cursor {
  width: 20px; height: 20px;
  background: transparent;
  border: 2px solid var(--neon);
  box-shadow: var(--neon-glow);
}
body:has(a:hover) #cursor-trail,
body:has(button:hover) #cursor-trail {
  width: 56px; height: 56px;
  border-color: var(--neon);
}
a, button { cursor: none; }

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

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--neon-mid); border-radius: 2px; }

/* ---- Navbar ---- */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 3rem;
  transition: background 0.4s, backdrop-filter 0.4s;
}
#navbar.scrolled {
  background: rgba(8, 8, 8, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.nav-logo span { color: var(--neon); }
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--neon);
  box-shadow: var(--neon-glow-sm);
  transition: width 0.3s var(--ease-out);
}
.nav-links a:hover { color: white; }
.nav-links a:hover::after { width: 100%; }

/* ---- Hero ---- */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(2rem, 5vw, 6rem);
  overflow: hidden;
}
.hero-bg-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(0,212,255,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 80% at center, black 30%, transparent 80%);
}
.hero-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--neon);
  margin-bottom: 1.5rem;
  opacity: 0;
}
.hero-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(3.5rem, 13vw, 11rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: white;
  text-shadow: 0 0 80px rgba(0,212,255,0.15);
  margin-bottom: 2rem;
  opacity: 0;
}
.hero-name .accent { color: var(--neon); }
.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 3rem;
  opacity: 0;
}
.hero-pill {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.5rem 1.25rem;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 100px;
  color: var(--muted);
  background: transparent;
  transition: all 0.3s var(--ease-out);
  cursor: none;
}
.hero-pill:hover {
  border-color: var(--neon);
  color: var(--neon);
  box-shadow: var(--neon-glow-sm), inset 0 0 20px rgba(0,212,255,0.05);
}
.explore-btn {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.875rem 2.5rem;
  border: 1px solid var(--neon-mid);
  border-radius: 100px;
  color: white;
  background: rgba(0,212,255,0.05);
  transition: all 0.4s var(--ease-out);
  animation: pulse-btn 3s ease-in-out infinite;
  opacity: 0;
}
.explore-btn:hover {
  background: rgba(0,212,255,0.12);
  border-color: var(--neon);
  box-shadow: var(--neon-glow);
  transform: translateY(-2px);
}
@keyframes pulse-btn {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,212,255,0); }
  50% { box-shadow: 0 0 0 8px rgba(0,212,255,0.08); }
}
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0;
}
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--neon), transparent);
  animation: scroll-line 2s ease-in-out infinite;
}
@keyframes scroll-line {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  50.01% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---- Filter Bar ---- */
#work {
  padding: clamp(5rem, 8vw, 10rem) clamp(1rem, 5vw, 4rem);
  max-width: 1400px;
  margin: 0 auto;
}
.section-label {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--neon);
  margin-bottom: 1rem;
  opacity: 0;
}
.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: white;
  margin-bottom: 3rem;
  opacity: 0;
}
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 4rem;
  opacity: 0;
}
.filter-btn {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.6rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--muted);
  background: transparent;
  transition: all 0.3s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.filter-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--neon);
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: inherit;
}
.filter-btn:hover { color: white; border-color: var(--neon-mid); }
.filter-btn.active {
  color: var(--bg);
  border-color: var(--neon);
  background: var(--neon);
  box-shadow: var(--neon-glow-sm);
}
.filter-btn.active::before { opacity: 1; }
.filter-btn.active span { position: relative; z-index: 1; }

/* ---- Projects Grid ---- */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1200px) {
  .projects-grid { grid-template-columns: repeat(3, 1fr); }
}

.project-card {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color 0.4s;
  opacity: 0;
  transform: translateY(30px);
}
.project-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--card-glow);
  border-color: rgba(0,212,255,0.2);
}
.project-card.hidden { display: none; }
.project-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out), filter 0.4s;
  filter: saturate(0.8) brightness(0.9);
}
.project-card:hover .project-img {
  transform: scale(1.05);
  filter: saturate(1) brightness(0.5);
}
.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}
.project-card:hover .project-overlay { opacity: 1; }
.project-cat {
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--neon);
  margin-bottom: 0.4rem;
}
.project-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: white;
  margin-bottom: 0.4rem;
}
.project-desc {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
  margin-bottom: 1rem;
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--neon);
  text-decoration: none;
  transition: gap 0.3s;
}
.project-link:hover { gap: 0.75rem; }
/* Bottom-always tag */
.project-tag {
  position: absolute;
  top: 1rem; right: 1rem;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  background: rgba(0,0,0,0.7);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--muted);
  backdrop-filter: blur(10px);
  transition: border-color 0.3s, color 0.3s;
}
.project-card:hover .project-tag {
  border-color: var(--neon-mid);
  color: var(--neon);
}

/* ---- About ---- */
#about {
  padding: clamp(6rem, 10vw, 12rem) clamp(1rem, 5vw, 4rem);
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
}
@media (min-width: 900px) {
  #about { grid-template-columns: 1fr 1fr; align-items: center; }
}
.about-left .section-label { margin-bottom: 1.5rem; }
.about-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: white;
  margin-bottom: 2rem;
  opacity: 0;
}
.about-name em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.25);
}
.about-bio {
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.6);
  margin-bottom: 2.5rem;
  opacity: 0;
}
.about-bio strong { color: white; }
.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  opacity: 0;
}
.about-tag {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface);
}
.about-right {
  position: relative;
  opacity: 0;
}
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.stat-card {
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.stat-card:hover {
  border-color: var(--neon-mid);
  box-shadow: 0 0 20px rgba(0,212,255,0.08);
}
.stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--neon);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.5rem;
  text-shadow: var(--neon-glow-sm);
}
.stat-label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- Contact / Footer ---- */
#contact {
  padding: clamp(4rem, 8vw, 8rem) clamp(1rem, 5vw, 4rem);
  text-align: center;
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
#contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 80% at 50% 100%, rgba(0,212,255,0.04) 0%, transparent 70%);
  pointer-events: none;
}
.contact-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: white;
  margin-bottom: 1rem;
  opacity: 0;
}
.contact-sub {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 3rem;
  opacity: 0;
}
.contact-email {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1rem, 3vw, 1.75rem);
  font-weight: 600;
  color: var(--neon);
  text-decoration: none;
  letter-spacing: -0.02em;
  margin-bottom: 4rem;
  position: relative;
  opacity: 0;
}
.contact-email::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--neon);
  box-shadow: var(--neon-glow-sm);
  transition: width 0.4s var(--ease-out);
}
.contact-email:hover::after { width: 100%; }
.social-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 4rem;
  opacity: 0;
}
.social-link {
  width: 48px; height: 48px;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.3s var(--ease-out);
  font-size: 1.1rem;
}
.social-link:hover {
  border-color: var(--neon);
  color: var(--neon);
  box-shadow: var(--neon-glow-sm);
  transform: translateY(-3px);
}
.footer-copy {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.15);
}
.footer-copy span { color: var(--neon); }

/* ---- Divider ---- */
.section-divider {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--neon-mid), transparent);
  margin: 0 auto;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .scroll-line { animation: none; }
  .explore-btn { animation: none; }
  #cursor, #cursor-trail { display: none; }
  body { cursor: auto; }
  a, button { cursor: pointer; }
}

/* ---- Mobile Nav ---- */
@media (max-width: 640px) {
  #navbar { padding: 1.25rem 1.5rem; }
  .nav-links { gap: 1.25rem; }
}
