/* ═══════════════════════════════════════════════════════
   NexaLab Portfolio — Styles
   Premium dark theme with glassmorphism & neon accents
   ═══════════════════════════════════════════════════════ */

/* ── Reset & Base ──────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Core palette */
  --bg-primary: #06060e;
  --bg-secondary: #0c0c1d;
  --bg-card: rgba(15, 15, 35, 0.6);
  --bg-glass: rgba(15, 15, 35, 0.45);

  /* Text */
  --text-primary: #f0f0f5;
  --text-secondary: #8888aa;
  --text-muted: #555577;

  /* Accent gradient */
  --accent-1: #6366f1;
  --accent-2: #a855f7;
  --accent-3: #ec4899;
  --gradient-primary: linear-gradient(135deg, var(--accent-1), var(--accent-2), var(--accent-3));

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-accent: rgba(99, 102, 241, 0.3);

  /* Spacing */
  --section-padding: clamp(80px, 12vw, 140px);
  --container-max: 1200px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* ── Cursor Glow ──────────────────────────────────── */
.cursor-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
  will-change: left, top;
}

/* ── Container ────────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 40px);
}

/* ── Navbar ───────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 40px);
  background: transparent;
  transition: background 0.4s var(--ease-out), padding 0.4s var(--ease-out),
              backdrop-filter 0.4s var(--ease-out);
}

.navbar.scrolled {
  background: rgba(6, 6, 14, 0.85);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  padding: 12px clamp(20px, 5vw, 40px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-logo, .footer-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.5px;
}

.logo-icon {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.1rem;
}

.logo-accent {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.3s;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 1px;
  transition: width 0.3s var(--ease-out);
}

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

.nav-link:hover::after {
  width: 100%;
}

.nav-link--cta {
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  background: var(--gradient-primary);
  color: #fff !important;
  font-weight: 600;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s;
}

.nav-link--cta::after {
  display: none;
}

.nav-link--cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.35);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s var(--ease-out);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
  background: rgba(6, 6, 14, 0.97);
  backdrop-filter: blur(30px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-out);
}

.mobile-menu.active {
  opacity: 1;
  pointer-events: all;
}

.mobile-link {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.3s, transform 0.3s var(--ease-spring);
}

.mobile-link:hover {
  color: var(--text-primary);
  transform: translateX(8px);
}

/* ── Hero ─────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  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: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: float 8s ease-in-out infinite;
}

.gradient-orb--1 {
  width: 500px;
  height: 500px;
  background: rgba(99, 102, 241, 0.15);
  top: -10%;
  left: -5%;
  animation-delay: 0s;
}

.gradient-orb--2 {
  width: 400px;
  height: 400px;
  background: rgba(168, 85, 247, 0.1);
  top: 40%;
  right: -10%;
  animation-delay: -3s;
}

.gradient-orb--3 {
  width: 350px;
  height: 350px;
  background: rgba(236, 72, 153, 0.08);
  bottom: -10%;
  left: 30%;
  animation-delay: -5s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 820px;
  padding: 0 20px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 50px;
  background: var(--bg-glass);
  border: 1px solid var(--border-accent);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-1);
  margin-bottom: 28px;
  backdrop-filter: blur(10px);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  50% { opacity: 0.7; box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 24px;
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 60px;
  flex-wrap: wrap;
}

/* ── Buttons ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.3s var(--ease-spring);
}

.btn--primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 25px rgba(99, 102, 241, 0.3);
}

.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 40px rgba(99, 102, 241, 0.45);
}

.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-accent);
}

.btn--ghost:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--accent-1);
  transform: translateY(-2px);
}

.btn--full {
  width: 100%;
  justify-content: center;
}

/* ── Hero Stats ───────────────────────────────────── */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.stat {
  text-align: center;
}

.stat-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-plus {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border-subtle);
}

/* ── Scroll Indicator ─────────────────────────────── */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.scroll-mouse {
  width: 24px;
  height: 38px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  position: relative;
}

.scroll-wheel {
  width: 3px;
  height: 8px;
  background: var(--text-muted);
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll-anim 2s ease-in-out infinite;
}

@keyframes scroll-anim {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(14px); }
}

/* ── Sections ─────────────────────────────────────── */
.section {
  padding: var(--section-padding) 0;
  position: relative;
}

.section--dark {
  background: var(--bg-secondary);
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-1);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.15;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-top: 16px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ── About ────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-lead {
  font-size: 1.15rem;
  color: var(--text-primary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-text p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 28px;
}

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.highlight {
  display: flex;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  transition: border-color 0.3s, transform 0.3s var(--ease-spring);
}

.highlight:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

.highlight-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.highlight h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.highlight p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0 !important;
}

/* About Card (code snippet visual) */
.about-card {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  padding: 32px;
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.card-decoration {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.deco-line {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-muted);
}

.deco-line:nth-child(1) { background: #ef4444; }
.deco-line:nth-child(2) { background: #f59e0b; }
.deco-line:nth-child(3) { background: #22c55e; }

.card-code {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.9rem;
  line-height: 1.8;
}

.code-line {
  display: block;
}

.code-keyword { color: #c084fc; }
.code-var { color: #60a5fa; }
.code-prop { color: #f472b6; }
.code-string { color: #34d399; }

/* Floating glow behind card */
.about-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: var(--radius-lg);
  background: var(--gradient-primary);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.5s;
}

.about-card:hover::before {
  opacity: 0.15;
}

/* ── Skills ───────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.skill-category {
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(10px);
  transition: border-color 0.3s, transform 0.3s var(--ease-spring);
}

.skill-category:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
}

.skill-category-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.category-icon {
  font-size: 1.3rem;
}

.skill-items {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skill-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.skill-bar {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--gradient-primary);
  width: 0;
  transition: width 1.2s var(--ease-out);
}

/* ── Projects ─────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.project-card {
  border-radius: var(--radius-lg);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.4s var(--ease-spring);
}

.project-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-6px);
}

.project-image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-primary);
}

.project-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-placeholder svg {
  width: 100%;
  height: 100%;
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 14, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-view {
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  background: var(--gradient-primary);
  transform: translateY(10px);
  transition: transform 0.3s var(--ease-spring);
}

.project-card:hover .project-view {
  transform: translateY(0);
}

.project-info {
  padding: 24px;
}

.project-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.tag {
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-1);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.project-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Contact ──────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-card {
  display: flex;
  gap: 16px;
  padding: 22px;
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  transition: border-color 0.3s, transform 0.3s var(--ease-spring);
}

.info-card:hover {
  border-color: var(--border-accent);
  transform: translateX(6px);
}

.info-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.info-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.info-card p,
.info-card a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color 0.3s;
}

.info-card a:hover {
  color: var(--accent-1);
}

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.social-link {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.3s var(--ease-spring);
}

.social-link:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent-1);
  color: var(--accent-1);
  transform: translateY(-3px);
}

/* ── Footer ───────────────────────────────────────── */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border-subtle);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── Animations ───────────────────────────────────── */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

[data-animate="fade-right"] {
  transform: translateX(-30px);
}

[data-animate="fade-left"] {
  transform: translateX(30px);
}

[data-animate].visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* ── Toast notification ───────────────────────────── */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 16px 28px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  border: 1px solid var(--border-accent);
  backdrop-filter: blur(20px);
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9rem;
  z-index: 200;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 1024px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .mobile-menu {
    display: flex;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-stats {
    gap: 20px;
  }

  .stat-number {
    font-size: 1.7rem;
  }

  .footer-content {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    letter-spacing: -1px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}
