:root {
  --bg-color: #050505;
  --neon-green: #00FF41;
  --neon-glow: rgba(0, 255, 65, 0.4);
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --text-primary: #FFFFFF;
  --text-secondary: #A0A0A0;
  --panel-radius: 24px;
}

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

html {
  scroll-behavior: smooth;
  width: 100%;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  width: 100%;
  position: relative;
  margin: 0;
  padding: 0;
}

/* Mouse Follower / Softness Effect */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--neon-glow) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  transform: translate3d(-50%, -50%, 0);
  mix-blend-mode: screen;
  filter: blur(20px);
  opacity: 0;
  transition: opacity 0.5s ease;
  will-change: transform, opacity;
}

/* Background Blobs */
.background-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: float 15s infinite ease-in-out;
  will-change: transform;
  transform: translateZ(0);
  /* Force GPU */
}

.blob-1 {
  top: -10%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: var(--neon-glow);
}

.blob-2 {
  top: 40%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: rgba(0, 200, 255, 0.1);
}

.blob-3 {
  bottom: -10%;
  left: 10%;
  width: 700px;
  height: 700px;
  background: var(--neon-glow);
  animation-delay: -5s;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(50px, -80px) scale(1.1);
  }

  66% {
    transform: translate(-30px, 40px) scale(0.9);
  }
}

/* Enhanced Glass System */
.glass-panel {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--panel-radius);
  box-shadow: 0 12px 64px 0 rgba(0, 0, 0, 0.6);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
  overflow: hidden;
  will-change: transform, box-shadow;
  transform: translateZ(0);
  /* Hardware accelerate glass filter computations */
}

.glass-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.glass-panel:hover {
  border-color: rgba(0, 255, 65, 0.4);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-2px);
}

.text-neon {
  color: var(--neon-green);
  text-shadow: 0 0 15px var(--neon-glow);
  background: linear-gradient(90deg, var(--neon-green), #fff, var(--neon-green));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shine 5s linear infinite;
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

/* Typography & Buttons */
h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  word-break: break-word;
  overflow-wrap: break-word;
}

h2 {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.text-center {
  text-align: center !important;
}

.btn {
  padding: 14px 32px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: inline-block;
  font-size: 1rem;
}

.btn-sm {
  padding: 8px 20px;
  font-size: 0.9rem;
  border-radius: 10px;
}

.btn:active {
  transform: scale(0.95) !important;
}

.btn-primary {
  background: var(--neon-green);
  color: #000;
  box-shadow: 0 0 20px var(--neon-glow);
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 0 35px var(--neon-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-outline {
  border: 1px solid var(--neon-green);
  color: var(--neon-green);
}

/* Navigation */
.glass-nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  max-width: 1100px;
  height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  z-index: 1000;
  background: rgba(5, 5, 5, 0.6);
  backdrop-filter: blur(25px);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
}

.logo span {
  color: var(--neon-green);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 40px;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  opacity: 0.7;
  transition: 0.3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--neon-green);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.nav-links a:hover {
  opacity: 1;
  color: var(--neon-green);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-menu-btn {
  display: none;
  font-size: 1.5rem;
  color: var(--text-primary);
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  transition: 0.3s;
}

.mobile-menu-btn:hover {
  color: var(--neon-green);
}

.mobile-only {
  display: none;
}

/* Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px) scale(0.98);
  transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
  will-change: opacity, transform;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  padding: 16px 24px;
  background: rgba(20, 20, 20, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  color: #fff;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transform: translateX(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.success {
  border-left: 4px solid var(--neon-green);
}

.toast.error {
  border-left: 4px solid #ff4b2b;
}

.toast i {
  font-size: 1.2rem;
}

.toast.success i {
  color: var(--neon-green);
}

.toast.error i {
  color: #ff4b2b;
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1.2em;
  background-color: var(--neon-green);
  margin-left: 5px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* Hero Section Combined & Modernized */
.hero {
  min-height: 85vh;
  /* Reduced from 100vh to minimize gap */
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1300px;
  margin: 0 auto;
  padding: 140px 24px 60px;
  /* Increased top padding to prevent collision with fixed nav */
}

.hero-main {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 64px;
  /* Increased gap for better white-space balance */
  padding: 80px;
  /* More generous padding inside panel */
  width: 100%;
  overflow: hidden;
}

.hero-content {
  padding: 0;
  /* Removed internal padding as it's now in hero-main */
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin-bottom: 2.5rem;
}

.hero-cta {
  display: flex;
  gap: 20px;
}

/* Image Frame Alignment */
.hero-image-container {
  display: flex;
  justify-content: flex-end;
  height: 100%;
}

.image-wrapper {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1/1;
  /* Modern square/circle frame look often works better in a single panel */
  border-radius: 40px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.image-wrapper:hover .hero-image {
  transform: scale(1.1) rotate(2deg);
}

.image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 5, 5, 0.8), transparent 40%);
  pointer-events: none;
}

/* Magnetic Button Feel */
.glow-btn {
  position: relative;
  z-index: 1;
}

.glow-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 140%;
  height: 140%;
  background: var(--neon-glow);
  transform: translate(-50%, -50%) scale(0);
  border-radius: 50%;
  z-index: -1;
  transition: 0.5s;
  filter: blur(20px);
}

.glow-btn:hover::before {
  transform: translate(-50%, -50%) scale(1);
}

/* About Section Alignment & UI/UX */
section {
  padding: 80px 24px;
  max-width: 1300px;
  margin: 0 auto;
}

.section-container {
  padding: 72px 80px;
}

.section-title {
  font-size: 3rem;
  margin-bottom: 56px;
  font-weight: 800;
  letter-spacing: -1px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 64px;
  align-items: center;
}

.about-text p {
  color: var(--text-secondary);
  font-size: 1.15rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.about-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-size: 2rem;
  font-weight: 800;
  display: block;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Redesigned Skill Cards Grid */
.about-skills {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.skill-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 16px 24px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: 0.3s;
  cursor: default;
}

.skill-card i {
  font-size: 1.5rem;
  width: 32px;
  text-align: center;
  filter: drop-shadow(0 0 8px var(--neon-glow));
}

.skill-card span {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-primary);
  opacity: 0.8;
  transition: 0.3s;
}

.skill-card:hover {
  border-color: var(--neon-green);
  background: rgba(0, 255, 65, 0.03);
  transform: translateX(10px);
}

.skill-card:hover span {
  opacity: 1;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.service-card {
  padding: 48px 32px;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
}

.service-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 24px 48px rgba(0, 255, 65, 0.15);
  border-color: rgba(0, 255, 65, 0.4);
}

.service-icon {
  font-size: 3rem;
  margin-bottom: 24px;
  display: block;
}

/* Portfolio */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.project-card {
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 255, 65, 0.1);
  border-color: rgba(0, 255, 65, 0.3);
}

.project-img-wrapper {
  width: 100%;
  height: 300px;
  overflow: hidden;
  position: relative;
}

.project-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.5s;
}

.project-card:hover img {
  transform: scale(1.1);
}

.project-info {
  padding: 24px;
}

/* Contact Section Unified & Beautiful */
.contact-main {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  padding: 80px;
  width: 100%;
}

.contact-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-info p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 32px;
  line-height: 1.7;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 1.1rem;
}

.contact-item i {
  font-size: 1.25rem;
  width: 24px;
  text-align: center;
}

.social-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 0;
  height: 100%;
  justify-content: center;
}

.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.form-status,
.form-security {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  opacity: 0.8;
}

.form-status i {
  font-size: 1rem;
}

.form-security i {
  color: #555;
}

.input-group input,
.input-group textarea {
  width: 100%;
  padding: 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: #fff;
  outline: none;
  font-family: inherit;
  transition: all 0.3s ease;
}

.input-group input:focus,
.input-group textarea:focus {
  border-color: var(--neon-green);
  background: rgba(0, 255, 65, 0.02);
  box-shadow: 0 0 15px rgba(0, 255, 65, 0.1);
}

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 32px;
}

.social-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  color: #fff;
  text-decoration: none;
  font-size: 1.25rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-icon:hover {
  background: var(--neon-glow);
  color: #fff;
  border-color: var(--neon-green);
  transform: translateY(-8px) scale(1.1);
  box-shadow: 0 0 20px var(--neon-glow);
}

footer {
  text-align: center;
  padding: 80px 20px;
  opacity: 1;
  /* Made visible for socials */
  font-size: 0.9rem;
  border-top: 1px solid var(--glass-border);
  margin-top: 40px;
}

/* Responsive */
@media (max-width: 1000px) {

  .hero-main,
  .contact-main,
  .section-container {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 32px 16px;
  }

  .hero-image-container,
  .contact-info {
    justify-content: center;
  }

  .contact-info {
    order: 2;
    /* Form on top on mobile */
  }

  .contact-details,
  .social-links {
    align-items: center;
    justify-content: center;
  }

  .hero-image-container {
    order: -1;
  }

  .image-wrapper {
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
    aspect-ratio: 1/1;
  }

  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero p,
  .contact-info p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta,
  .social-links {
    justify-content: center;
  }

  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: block;
    margin-top: 10px;
  }

  .nav-links {
    position: absolute;
    top: 80px;
    left: 5%;
    width: 90%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    flex-direction: column;
    padding: 30px;
    gap: 20px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-20px);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  }

  .nav-links.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
  }

  .nav-links li {
    text-align: center;
  }

  .nav-links a {
    font-size: 1.2rem;
    padding: 10px;
    display: block;
  }
}

@media (max-width: 500px) {
  h1 {
    font-size: 2.5rem;
  }

  section {
    padding: 60px 16px;
  }

  .hero {
    padding-top: 120px;
  }

  .hero-main,
  .contact-main {
    padding: 40px 16px;
    gap: 32px;
  }

  .section-container {
    padding: 32px 16px;
  }

  .glass-nav {
    padding: 0 12px 0 20px;
    width: 96%;
    top: 10px;
  }

  .nav-actions {
    gap: 8px;
  }

  #resume-nav-btn {
    padding: 6px 14px;
    font-size: 0.8rem;
  }

  .services-grid,
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .hero-cta .btn {
    width: 100%;
    text-align: center;
  }

  .footer-socials {
    gap: 12px;
  }

  .social-icon {
    width: 40px;
    height: 40px;
  }
}