:root {
  --primary: #00ff9c;
  --primary-dim: #00ff9c20;
  --secondary: #00aaff;
  --tertiary: #ff00ec;
  --dark: #0a0a0f;
  --darker: #050508;
  --panel: #0d1117;
  --text: #e6fff5;
  --text-dim: #a0d8c0;
  --grid: rgba(0, 255, 156, 0.03);
  --font-mono: 'JetBrains Mono', monospace;
  --font-sans: 'Space Grotesk', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--dark);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.7;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background layers */
.bg-grid {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -2;
  background-size: 60px 60px;
  background-image: 
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  animation: gridMove 40s linear infinite;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(60px, 60px); }
}

.bg-scan {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 156, 0.02) 2px,
    rgba(0, 255, 156, 0.02) 3px
  );
  animation: scanLine 12s linear infinite;
}

@keyframes scanLine {
  0% { background-position: 0 0; }
  100% { background-position: 0 100vh; }
}

/* Matrix canvas */
#matrix {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -3;
  pointer-events: none;
}

/* Particles */
.particles {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1;
  pointer-events: none;
}

.particle {
  position: absolute;
  background: var(--primary);
  border-radius: 50%;
  animation: float 20s infinite linear;
  opacity: 0;
}

@keyframes float {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 0.7; }
  90% { opacity: 0.3; }
  100% { transform: translateY(-10vh) rotate(360deg); opacity: 0; }
}

/* Cursor */
.cursor {
  position: fixed;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease;
  mix-blend-mode: difference;
}

.cursor.active {
  transform: translate(-50%, -50%) scale(4);
  opacity: 0.4;
}

/* Original scroll-fx */
.scroll-fx {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.scroll-fx.active {
  opacity: 0.15;
}

.scroll-fx::before,
.scroll-fx::after {
  content: '';
  position: absolute;
  background: var(--primary-dim);
  border-radius: 4px;
  animation: flakeFall 1.2s linear infinite;
}

.scroll-fx::before {
  width: 80px; height: 120px;
  top: 0; left: 20%;
  animation-delay: 0s;
}

.scroll-fx::after {
  width: 60px; height: 100px;
  top: 0; right: 15%;
  animation-delay: 0.4s;
}

@keyframes flakeFall {
  0% { transform: translateY(-100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.3; }
  100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

/* Navbar styling (keeping some original) */
.navbar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 70px;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 255, 156, 0.2);
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  height: 56px;
  box-shadow: 0 8px 32px rgba(0, 255, 156, 0.1);
}

.logo {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-svg {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  transition: filter 0.3s ease, transform 0.3s ease;
}

.logo:hover .logo-svg {
  filter: drop-shadow(0 0 15px var(--primary)) drop-shadow(0 0 30px var(--tertiary));
  transform: scale(1.1);
}

.logo-text {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--primary);
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.logo:hover .logo-text {
  text-shadow: 0 0 15px var(--primary), 0 0 30px var(--tertiary);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--primary);
  text-shadow: 0 0 10px var(--primary);
}

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

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1.4rem;
  cursor: pointer;
  font-family: var(--font-mono);
}

/* Hero, About, Skills, Projects, Contact sections styling */
.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero-content {
  z-index: 2;
  max-width: 900px;
  padding: 0 2rem;
}

.avatar-wrap {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto 2rem;
}

.avatar-ring {
  position: absolute;
  inset: -15px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  animation: rotate 16s linear infinite;
  opacity: 0.6;
}

.avatar-visual {
  position: relative;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
  box-shadow: 
    0 0 40px var(--primary),
    inset 0 0 40px rgba(0, 255, 156, 0.2);
  position: relative;
  z-index: 1;
}

.hero-visual svg {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

.hero-eyes {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 10px;
  z-index: 2;
}

.eye {
  width: 24px; height: 24px;
  background: linear-gradient(135deg, var(--primary), var(--tertiary));
  border-radius: 50%;
  animation: eyeBlink 4s infinite;
  box-shadow: 0 0 15px var(--primary);
  position: relative;
  overflow: hidden;
}

.eye::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  animation: eyeScan 2s infinite;
}

@keyframes eyeBlink {
  0%, 95%, 100% { transform: scaleY(1); }
  97% { transform: scaleY(0.1); }
}

@keyframes eyeScan {
  0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) translateY(-8px); }
  50% { opacity: 1; transform: translate(-50%, -50%) translateY(8px); }
}

.hero-tagline {
  font-family: var(--font-mono);
  color: var(--secondary);
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.hero-title {
  font-family: var(--font-mono);
  font-size: 4rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -2px;
  text-shadow: 0 0 30px rgba(0, 255, 156, 0.5);
  animation: titlePulse 3s ease-in-out infinite alternate;
}

@keyframes titlePulse {
  0% { filter: drop-shadow(0 0 20px rgba(0, 255, 156, 0.3)); }
  100% { filter: drop-shadow(0 0 40px rgba(0, 255, 156, 0.7)); }
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
  max-width: 600px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 3rem;
  justify-items: center;
}

.stat {
  padding: 1rem;
  background: rgba(0, 255, 156, 0.05);
  border: 1px solid rgba(0, 255, 156, 0.2);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.stat:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 255, 156, 0.2);
  border-color: var(--primary);
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
  margin-bottom: 0.3rem;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.cta-btn {
  padding: 0.9rem 2rem;
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 1px;
  border-radius: 8px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 5px 30px rgba(0, 255, 156, 0.4);
  transition: all 0.3s ease;
}

.cta-btn:hover {
  background: rgba(0, 255, 156, 0.1);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 50px rgba(0, 255, 156, 0.6);
}

.cta-btn:active {
  transform: translateY(1px);
}

/* Sections styling (general) */
section {
  padding: 7rem 2rem;
  position: relative;
  opacity: 1;
  transform: translateY(0);
  transition: all 1s ease;
}

section.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-header {
  text-align: center;
  margin-bottom: 5rem;
}

.section-title {
  font-family: var(--font-mono);
  font-size: 3rem;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -12px; left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  border-radius: 2px;
}

.section-sub {
  color: var(--text-dim);
  font-size: 1rem;
  margin-bottom: 1rem;
}

/* About section styling */
.about-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: start;
}

.about-visual {
  position: relative;
  width: 100%;
  height: 180px;
  background: rgba(0, 255, 156, 0.05);
  border: 1px solid rgba(0, 255, 156, 0.2);
  border-radius: 12px;
  overflow: hidden;
}

.about-visual svg {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

.about-content {
  background: rgba(13, 17, 17, 0.6);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(0, 255, 156, 0.2);
  border-radius: 16px;
  padding: 2.5rem;
  position: relative;
  transition: all 0.3s ease;
}

.about-content h3 {
  font-family: var(--font-mono);
  color: var(--primary);
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.about-content h3::before {
  content: "▮";
  font-size: 1.5rem;
  animation: rotate 16s linear;
}

.about-content p {
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.highlight {
  color: var(--primary);
  font-weight: 600;
  position: relative;
}

.highlight::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary);
  animation: highlightPulse 2s infinite;
}

@keyframes highlightPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.stat-card {
  background: rgba(0, 255, 156, 0.05);
  border: 1px solid rgba(0, 255, 156, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 15px 40px rgba(0, 255, 156, 0.2);
  border-color: var(--primary);
}

.stat-icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.stat-number {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
  margin-bottom: 0.4rem;
}

.stat-caption {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Skills section styling */
.skills-wrapper {
  max-width: 1200px;
  margin: 0 auto;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.skill-category {
  background: rgba(13, 17, 17, 0.6);
  border: 1px solid rgba(0, 255, 156, 0.2);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.skill-category:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 255, 156, 0.2);
  border-color: var(--primary);
}

.skill-category h3 {
  font-family: var(--font-mono);
  color: var(--secondary);
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.skill-enhance {
  stroke: var(--primary);
  stroke-width: 0.5;
}

.skill-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skill-item {
  padding: 0.8rem 1rem;
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.skill-item:hover {
  transform: translateX(5px);
  box-shadow: 0 10px 30px rgba(0, 255, 156, 0.2);
  background: rgba(0, 255, 156, 0.08);
}

.skill-name {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  display: block;
}

.skill-level {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.level-label {
  font-family: var(--font-mono);
  color: var(--text-dim);
  min-width: 40px;
}

.level-bar {
  flex: 1;
  height: 6px;
  background: rgba(0, 255, 156, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.level-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--tertiary));
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  transition: width 1.5s ease;
}

.level-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 20px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
  animation: levelShine 2s infinite;
}

@keyframes levelShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

/* Projects section styling */
.projects-container {
  max-width: 1400px;
  margin: 0 auto;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem;
  margin-top: 2rem;
}

.project-card {
  background: rgba(13, 17, 17, 0.6);
  border: 1px solid rgba(0, 255, 156, 0.2);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.project-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 25px 50px rgba(0, 255, 156, 0.2);
  border-color: var(--primary);
}

.project-image {
  height: 160px;
  background: linear-gradient(45deg, #0a0a12, #1a002a);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
}

.project-content {
  padding: 1.2rem;
}

.project-title {
  font-family: var(--font-mono);
  color: var(--primary);
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.project-title::before {
  content: "▮";
  color: var(--secondary);
  animation: rotate 8s infinite;
}

.project-tags {
  display: flex;
  gap: 0.6rem;
  margin: 0.8rem 0;
  flex-wrap: wrap;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--secondary);
  background: rgba(0, 170, 255, 0.1);
  border: 1px solid var(--secondary);
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  transition: all 0.2s ease;
}

.project-tag:hover {
  background: rgba(0, 170, 255, 0.2);
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(0, 170, 255, 0.4);
}

.project-desc {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin: 0.8rem 0;
}

.project-links {
  display: flex;
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.project-link {
  color: var(--secondary);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  transition: all 0.2s ease;
  padding: 0.3rem 0.6rem;
  border-radius: 5px;
}

.project-link:hover {
  color: var(--primary);
  text-shadow: 0 0 10px var(--primary);
}

/* Contact section styling */
.contact-container {
  max-width: 1100px;
  margin: 0 auto;
}

.contact-wrapper {
  background: rgba(13, 17, 17, 0.6);
  border: 1px solid rgba(0, 255, 156, 0.2);
  border-radius: 12px;
  padding: 2rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.contact-card {
  background: rgba(0, 255, 156, 0.05);
  border: 1px solid rgba(0, 255, 156, 0.2);
  border-radius: 10px;
  padding: 1.2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 255, 156, 0.2);
  border-color: var(--primary);
}

.contact-icon {
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
  display: block;
  color: var(--primary);
}

.contact-title {
  font-family: var(--font-mono);
  color: var(--primary);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.contact-info a {
  color: var(--text-dim);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.contact-info a:hover {
  color: var(--primary);
  text-shadow: 0 0 10px var(--primary);
}

/* Footer styling */
footer {
  background: var(--darker);
  border-top: 1px solid rgba(0, 255, 156, 0.2);
  padding: 2rem 0 1rem;
  margin-top: 4rem;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-section h3 {
  font-family: var(--font-mono);
  color: var(--primary);
  font-size: 1rem;
  margin-bottom: 0.6rem;
}

.footer-links {
  list-style: none;
}

.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.footer-links a:hover {
  color: var(--primary);
  text-shadow: 0 0 10px var(--primary);
}

.copyright {
  font-family: var(--font-mono);
  color: var(--text-dim);
  font-size: 0.8rem;
  text-align: center;
  margin-top: 1rem;
}

/* Media queries */
@media (max-width: 900px) {
  .hero-title {
    font-size: 2.8rem;
  }
  .section-title {
    font-size: 2.3rem;
  }
  .section-sub {
    font-size: 0.9rem;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-container {
    grid-template-columns: 1fr;
  }
  .project-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 500px) {
  .logo-text {
    display: none;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .section-title {
    font-size: 1.8rem;
  }
}