/* Liquid Glass Theme for Nerot Platform */

html[data-theme="dark"] {
  --bg: #06060c;
  --bg-soft: #0a0a14;
  --surface-fallback: rgba(15, 15, 25, 0.85);
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.06);
  --surface-border: rgba(255, 255, 255, 0.08);
  --surface-top: rgba(255, 255, 255, 0.12);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #8b5cf6;
  --accent-glow: #a855f7;
  --success: #10b981;
  --danger: #ef4444;
  --card-radius: 20px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

html[data-theme="light"] {
  --bg: #f6f8ff;
  --bg-soft: #eef2ff;
  --surface-fallback: rgba(255, 255, 255, 0.94);
  --surface: rgba(255, 255, 255, 0.66);
  --surface-strong: rgba(255, 255, 255, 0.82);
  --surface-border: rgba(15, 23, 42, 0.12);
  --surface-top: rgba(255, 255, 255, 0.9);
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --accent: #7c3aed;
  --accent-glow: #9333ea;
  --success: #059669;
  --danger: #dc2626;
  --card-radius: 20px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body.liquid-bg {
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px;
  color: var(--text-primary);
}

body.home-vapor::before {
  display: none;
}

body.home-vapor::after {
  display: none;
}

body.home-vapor .app-shell {
  position: relative;
  z-index: 1;
}

.home-hero {
  position: relative;
}

.home-projects {
  position: relative;
  margin-top: -40px;
  padding-top: 1.25rem;
  background: transparent;
}

.home-projects::before,
.home-projects::after {
  display: none;
}

.home-hero > *,
.home-projects > * {
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .home-projects {
    margin-top: -28px;
    padding-top: 1rem;
  }
}

html[data-theme="light"] body.liquid-bg {
  background-image:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(139, 92, 246, 0.14), transparent 70%),
    radial-gradient(circle at 80% 100%, rgba(99, 102, 241, 0.1), transparent 55%),
    linear-gradient(rgba(15, 23, 42, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.06) 1px, transparent 1px);
}

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

.floating-orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(2px);
  opacity: 0.05;
  will-change: transform;
  animation: float 24s ease-in-out infinite;
}

.floating-orb.orb-1 {
  width: 300px;
  height: 300px;
  left: -80px;
  top: 12%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.28), transparent 70%);
}

.floating-orb.orb-2 {
  width: 240px;
  height: 240px;
  right: 8%;
  top: 52%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.24), transparent 72%);
  animation-delay: -8s;
}

.floating-orb.orb-3 {
  width: 220px;
  height: 220px;
  right: 28%;
  bottom: -40px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.18), transparent 72%);
  animation-delay: -14s;
}

.app-shell {
  position: relative;
  z-index: 1;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.glass-card,
.glass-navbar,
.glass-chip,
.glass-button,
.flash-msg {
  background: var(--surface-fallback);
  border: 1px solid var(--surface-border);
}

@supports (backdrop-filter: blur(1px)) {
  .glass-card,
  .glass-chip,
  .glass-button,
  .flash-msg {
    background: var(--surface);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
  }

  .glass-navbar {
    background: rgba(6, 6, 12, 0.7);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
  }

  html[data-theme="light"] .glass-navbar {
    background: rgba(248, 250, 255, 0.96);
  }
}

.glass-card,
.flash-msg {
  border-radius: var(--card-radius);
  border-top: 1px solid var(--surface-top);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: translateZ(0);
}

.glass-navbar {
  position: sticky;
  overflow: visible;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.glass-navbar::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% - 4px);
  width: min(920px, 92vw);
  height: 124px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse 52% 74% at 50% 0%, rgba(168, 85, 247, 0.24), rgba(124, 58, 237, 0.14) 30%, rgba(6, 6, 12, 0) 74%);
  filter: blur(19px);
  opacity: 1;
  pointer-events: none;
  z-index: -1;
}

html[data-theme="light"] .glass-navbar {
  background: rgba(248, 250, 255, 0.96);
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .glass-navbar::after {
  background: radial-gradient(ellipse 52% 74% at 50% 0%, rgba(139, 92, 246, 0.16), rgba(168, 85, 247, 0.08) 30%, rgba(248, 250, 255, 0) 74%);
  opacity: 0.88;
}

.glass-navbar.is-scrolled {
  background: rgba(6, 6, 12, 0.88);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
}

html[data-theme="light"] .glass-navbar.is-scrolled {
  background: rgba(248, 250, 255, 0.92);
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.14);
}

.brand-gradient {
  background: linear-gradient(120deg, #f8fafc 0%, #c4b5fd 35%, #a855f7 65%, #f8fafc 100%);
  background-size: 200% 100%;
  display: inline-block;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: gradient-shift 8s linear infinite;
}

.hero-nerot-gradient {
  background: linear-gradient(110deg, #8b5cf6 0%, #ec4899 45%, #a855f7 100%);
  background-size: 200% 200%;
  display: inline-block;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: gradient-shift 7s linear infinite;
}

.hero-glow {
  display: none;
  position: absolute;
  left: 50%;
  bottom: -140px;
  width: min(980px, 92vw);
  height: 360px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(139, 92, 246, 0.16), transparent 72%);
  filter: blur(18px) saturate(1.25);
  opacity: 0.96;
  pointer-events: none;
}

.home-seam-fix {
  position: relative;
}

.home-seam-fix > * {
  position: relative;
  z-index: 1;
}

.glass-button {
  border-radius: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease), background-color 0.4s var(--ease);
}

.glass-button:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.85), rgba(168, 85, 247, 0.85));
  border-color: rgba(168, 85, 247, 0.36);
  box-shadow: none;
}

.btn-primary:hover {
  box-shadow: none;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.12);
}

.nav-link {
  position: relative;
  color: #cbd5e1;
  transition: color 0.3s var(--ease);
}

html[data-theme="light"] .nav-link {
  color: #334155;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.85), transparent);
  transform: scaleX(0.25);
  opacity: 0;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.nav-link:hover {
  color: var(--text-primary);
}

html[data-theme="light"] .brand-gradient {
  background: linear-gradient(120deg, #1e293b 0%, #7c3aed 45%, #a855f7 70%, #334155 100%);
}

html[data-theme="light"] .glass-card,
html[data-theme="light"] .flash-msg {
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

html[data-theme="light"] .project-card {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] .btn-primary {
  color: #ffffff !important;
}

html[data-theme="light"] .btn-secondary {
  color: #0f172a !important;
}

html[data-theme="light"] .hero-glow {
  background: radial-gradient(circle, rgba(139, 92, 246, 0.2), transparent 72%);
}

html[data-theme="light"] .hero-nerot-gradient {
  background: linear-gradient(110deg, #7c3aed 0%, #db2777 45%, #9333ea 100%);
}

/* Brave/WebKit light-mode safety: keep text visible and avoid gradient rectangle artifacts. */
html[data-theme="light"] .brand-gradient,
html[data-theme="light"] .hero-nerot-gradient {
  -webkit-text-fill-color: currentColor !important;
  color: #6d28d9 !important;
  background: none !important;
  text-shadow: 0 0 10px rgba(124, 58, 237, 0.22);
}

html[data-theme="light"] .text-white,
html[data-theme="light"] .text-slate-100,
html[data-theme="light"] .text-slate-200 {
  color: #0f172a !important;
}

html[data-theme="light"] .text-slate-300,
html[data-theme="light"] .text-slate-400 {
  color: #334155 !important;
}

html[data-theme="light"] .btn-secondary {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.14);
}

html[data-theme="light"] .glass-chip {
  border-color: rgba(15, 23, 42, 0.1);
}

.nav-link:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.project-card {
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
  will-change: transform;
}

.project-card:hover {
  transform: translateY(-4px);
}

.project-card:hover .project-icon {
  transform: scale(1.08);
}

.project-icon {
  transition: transform 0.4s var(--ease);
}

.projects-grid .glass-card {
  contain: layout style paint;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 1.8s ease-out infinite;
}

.team-ring {
  position: relative;
  width: 112px;
  height: 112px;
  margin: 0 auto;
  border-radius: 9999px;
}

.team-ring::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: conic-gradient(from 0deg, #8b5cf6, #ec4899, #8b5cf6);
  animation: spin 12s linear infinite;
}

.team-ring > span {
  position: absolute;
  inset: 3px;
  display: grid;
  place-items: center;
  border-radius: inherit;
  background: #0b0b14;
  color: #fff;
  font-size: 1.75rem;
  font-weight: 700;
}

.glass-chip {
  border-radius: 999px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sparkles i {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 9999px;
  background: rgba(196, 181, 253, 0.75);
  box-shadow: 0 0 12px rgba(196, 181, 253, 0.75);
  animation: twinkle 8s ease-in-out infinite;
}

.sparkles i:nth-child(1) { top: 18%; left: 21%; animation-delay: 0s; }
.sparkles i:nth-child(2) { top: 32%; right: 18%; animation-delay: -2s; }
.sparkles i:nth-child(3) { top: 54%; left: 12%; animation-delay: -4s; }
.sparkles i:nth-child(4) { top: 20%; right: 34%; animation-delay: -6s; }

[data-reveal] {
  opacity: 1;
  transform: none;
}

.js-motion [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.js-motion [data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

.fade-in {
  animation: fadeIn 0.45s var(--ease);
}

.flash-msg {
  animation: slideDown 0.32s var(--ease);
  color: var(--text-primary);
}

input,
textarea,
select {
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.25s var(--ease);
}

*:focus-visible {
  outline: 2px solid rgba(139, 92, 246, 0.65);
  outline-offset: 2px;
}

::selection {
  background: rgba(139, 92, 246, 0.35);
  color: #fff;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.6);
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -24px, 0) scale(1.04); }
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.08); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

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

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50% { opacity: 0.9; transform: scale(1.3); }
}

@media (max-width: 768px) {
  .glass-card,
  .glass-chip,
  .glass-button,
  .flash-msg {
    backdrop-filter: blur(8px) saturate(1.2);
    -webkit-backdrop-filter: blur(8px) saturate(1.2);
  }

  .glass-navbar {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .floating-orb {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .floating-orb {
    display: none !important;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}
