/* CSS Variables for better maintainability */
:root {
  --primary-color: #00c896;
  --primary-hover: #00b085;
  --bg-dark: #0f0e0e;
  --bg-secondary: #191919;
  --text-light: antiquewhite;
  --text-secondary: #ccc;
  --text-white: #fff;
  --border-color: #555;
  --gradient-primary: linear-gradient(90deg,
      #00c896,
      #00fff0,
      #00c896,
      #00fff0);
  --shadow-glow: 0 10px 25px rgba(0, 200, 150, 0.25);
  --transition-fast: 0.3s ease;
  --transition-slow: 0.5s ease;
  --border-radius: 12px;
  --border-radius-lg: 15px;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;
}

#loader {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  z-index: 9999;
  transition: opacity 0.5s ease;
}

/* Rotating logo */
.logo {
  width: 50px;
  height: 50px;
  margin-bottom: 25px;
  animation: spin 2s linear infinite;
  filter: drop-shadow(0 0 10px #ffcc00);
}

@keyframes spin {
  0% {
    transform: rotate(0deg) scale(1);
  }

  50% {
    transform: rotate(180deg) scale(1.1);
  }

  100% {
    transform: rotate(360deg) scale(1);
  }
}

.message {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

/* Percentage text */
.percentage {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 15px;
  color: var(--primary-color);
}

/* Progress bar container */
.progress-container {
  width: 220px;
  height: 10px;
  background: #333;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: var(--shadow-glow);
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: var(--gradient-primary);
  transition: width 0.2s ease;
}

/* Hide loader after done */
#loader.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Reset and Base Styles */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-dark);
  color: var(--text-secondary);
  line-height: 1.6;
}


/* Navigation */
.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 30px 80px 0 80px;
}

.hamburger {
  display: none;
  cursor: pointer;
  color: var(--text-light);
  font-size: 1.5rem;
}

.nav-home {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  background: rgba(25, 25, 25, 0.6);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px;
  gap: 55px;
  z-index: 1000;
}

.nav-home i {
  font-size: 20px;
  color: var(--text-light);
  margin-right: 8px;
}

.nav-home a {
  text-decoration: none;
  color: azure;
  font-size: 19px;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.nav-home a:hover {
  color: var(--primary-color);
}

#mobile-img {
  display: none;
}

/* Hero Section */
.hero {
  margin: 100px auto 0;
  display: flex;
  align-items: center;
  flex-direction: column;
  border: 1px dashed var(--border-color);
  border-radius: 50px;
  width: 350px;
  padding: 23px;
  max-width: 90%;
}

.hero img {
  margin-top: -88px;
  width: 250px;
  border-radius: 50%;
  margin-bottom: 12px;
  max-width: 80%;
}

.hero h1 {
  color: var(--text-light);
  text-align: center;
  margin-bottom: var(--spacing-sm);
}

.hero p {
  color: var(--text-light);
  margin: 12px 0;
  font-size: 16px;
  font-weight: 550;
}

.hero a {
  text-decoration: none;
  color: var(--text-white);
  transition: color var(--transition-fast);
}

.hero i {
  margin-right: 8px;
  color: var(--text-light);
}

.hero-links {
  display: flex;
  gap: 20px;
  margin-top: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.hero-links a {
  padding: 8px 12px;
  border: 1px solid var(--text-light);
  border-radius: 5px;
  transition: color var(--transition-fast);
}

.hero-links a:hover {
  color: var(--primary-color);
}

/* Intro Section */
.intro {
  margin: 40px auto;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  padding: 0 20px;
}

.intro h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--primary-color);
  font-weight: 700;
  margin: 0;
}

.intro h1 span {
  padding: 4px 8px;
  background-color: rgba(0, 200, 150, 0.15);
  border-radius: 4px;
  color: var(--text-white);
}

.typing {
  background: var(--gradient-primary);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientMove 3s linear infinite;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 4px;
}

@keyframes gradientMove {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

.intro h1 span.typing {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  top: 20px;
  animation: typing 3s steps(20, end), blink 0.75s step-end infinite;
}

@keyframes typing {
  from {
    width: 0ch;
  }

  to {
    width: 19ch;
  }
}

@keyframes blink {
  50% {
    border-right-style: transparent;
  }
}

.intro p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.7;
  max-width: 600px;
}

/* Experience Section */
.Experience {
  padding: var(--spacing-lg);
  margin: 0 auto;
  max-width: 1200px;
}

.Experience h1 {
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: var(--spacing-xs);
  margin: 0 auto var(--spacing-lg) auto;
  font-size: 2rem;
  text-align: center;
  width: fit-content;
}

.exp1 {
  margin-top: 3rem;
}

.exp1 h2 {
  color: var(--text-light);
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
  text-align: center;
}

#backend-work-title {
  color: var(--text-secondary);
  font-weight: 550;
  display: block;
  text-align: center;
  margin-bottom: var(--spacing-md);
  font-size: 1.1rem;
}

/* Open Source Contributions */
.merged-work {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
  padding: 0 var(--spacing-sm);
}

.merged-work a {
  display: block;
  padding: var(--spacing-md);
  border: 1px solid var(--primary-color);
  border-radius: var(--border-radius);
  text-decoration: none;
  color: #ddd;
  font-weight: 500;
  background: rgba(0, 200, 150, 0.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all var(--transition-fast);
  text-align: left;
  position: relative;
  overflow: hidden;
}

.merged-work a::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg,
      transparent,
      var(--primary-color),
      transparent);
  transition: left var(--transition-slow);
}

.merged-work a:hover::before {
  left: 100%;
}

.merged-work a:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 200, 150, 0.3);
  background: rgba(0, 200, 150, 0.1);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.merged-work i {
  margin-right: 0.8rem;
  color: var(--primary-color);
  font-size: 1.1rem;
}

#pr-desc {
  margin-top: 2px;
  display: inline-block;
  margin-left: 1.9rem;
}

/* Personal Projects */
.merged-work.personal-projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-md);
  padding: 0 var(--spacing-sm);
  grid-auto-rows: 1fr;
}

.merged-work.personal-projects a {
  height: 100%;
  display: flex;
}

.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

.merged-work.personal-projects a::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(45deg,
      rgba(0, 200, 150, 0.1),
      rgba(0, 200, 150, 0.05));
  transition: width 0.4s ease;
  z-index: -1;
}

.merged-work.personal-projects a:hover::after {
  width: 100%;
}

.merged-work.personal-projects a:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 200, 150, 0.4);
  background: rgba(0, 200, 150, 0.08);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.project-card h3 {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin: 0 0 var(--spacing-sm) 0;
  color: var(--primary-color);
  font-size: 1.4rem;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.project-title {
  font-weight: bold;
  flex: 1;
  min-width: 150px;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tech-stack img {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  position: relative;
  top: -22px;
  right: -60px;
  transition: transform 0.2s ease;
}

.tech-tools {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-white);
  border: 1px solid var(--primary-color);
  border-radius: 4px;
  padding: 3px 5px;
  position: relative;
  right: -55px;
  top: -22px;
  background: rgba(0, 200, 150, 0.2);
}

.tech-stack-logo img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #0f0e0e;
  transition: transform 0.2s ease;
}

.tech-stack img:hover,
.tech-stack-logo img:hover {
  transform: scale(1.2);
}

.project-card p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  text-align: left;
  margin: 0;
}

/* Skills Section */
.skills-section {
  padding: var(--spacing-lg) var(--spacing-sm);
  margin: var(--spacing-lg) auto;
  max-width: 1000px;
  text-align: center;
}

.skills-section h1 {
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: var(--spacing-xs);
  margin: 0 auto var(--spacing-lg) auto;
  font-size: 2rem;
  text-align: center;
  width: fit-content;
}

.skills-section #edu-desc {
  color: var(--text-light);
  font-weight: bold;
  font-size: large;
  margin-bottom: var(--spacing-md);
  display: block;
  text-align: center;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
}

.skill-card {
  border-radius: var(--border-radius-lg);
  background: linear-gradient(145deg,
      rgba(0, 200, 150, 0.05),
      rgba(0, 200, 150, 0.1));
  padding: var(--spacing-sm);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-fast);
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 200, 150, 0.15);
  border: 1px solid rgba(0, 200, 150, 0.3);
}

.skill-card img {
  width: 32px;
  height: 32px;
  margin-bottom: var(--spacing-xs);
  transition: transform var(--transition-fast);
}

.skill-info h3 {
  color: var(--primary-color);
  font-size: 1rem;
  margin-bottom: 0.3rem;
  font-weight: 600;
}

.skill-info p {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.skill-card:hover {
  transform: translateY(-6px) scale(1.05);
  background: linear-gradient(145deg,
      rgba(0, 200, 150, 0.08),
      rgba(0, 200, 150, 0.15));
  box-shadow: var(--shadow-glow);
  border-color: var(--primary-color);
}

.skill-card:hover img {
  transform: scale(1.3) rotate(5deg);
}

/* Education Section */
.education {
  padding: var(--spacing-lg) var(--spacing-sm);
  margin: var(--spacing-lg) auto;
  max-width: 1000px;
  text-align: center;
}

.education h1 {
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: var(--spacing-xs);
  margin: 0 auto var(--spacing-lg) auto;
  font-size: 2rem;
  text-align: center;
  width: fit-content;
}

.education-details {
  border-radius: var(--border-radius-lg);
  background: linear-gradient(145deg,
      rgba(0, 200, 150, 0.05),
      rgba(0, 200, 150, 0.1));
  padding: var(--spacing-lg);
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 200, 150, 0.15);
  border: 1px solid rgba(0, 200, 150, 0.3);
  margin-bottom: 23px;
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  justify-content: flex-start;
  transition: all var(--transition-fast);
  position: relative;
}

.education-details:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
  background: linear-gradient(145deg,
      rgba(0, 200, 150, 0.08),
      rgba(0, 200, 150, 0.15));
  border-color: var(--primary-color);
}

.edu-img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--text-white);
  border: 2px solid var(--primary-color);
  flex-shrink: 0;
}

.edu-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
}

.institute-name {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.2rem;
}

.stream {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 400;
}

#edu-desc {
  display: block;
  color: var(--text-light);
  font-weight: bold;
  font-size: large;
  margin-bottom: var(--spacing-md);
}

.stream-date,
.next {
  color: var(--text-secondary);
  font-weight: 300;
  font-size: 1rem;
  position: absolute;
  right: var(--spacing-lg);
  top: 50%;
  transform: translateY(-50%);
}

/* Blogs Section */
.Blogs {
  margin: var(--spacing-xl) auto;
  max-width: 1200px;
  padding: 0 var(--spacing-lg);
}

.Blogs h1 {
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: var(--spacing-xs);
  margin: 0 auto 3rem auto;
  font-size: 2rem;
  text-align: center;
  width: fit-content;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  justify-items: center;
}

.recent-blogs {
  border: 1px solid var(--primary-color);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
  max-width: 450px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(0, 200, 150, 0.03);
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.recent-blogs::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(45deg,
      var(--primary-color),
      transparent,
      var(--primary-color));
  border-radius: var(--border-radius-lg);
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.recent-blogs:hover::before {
  opacity: 1;
}

.recent-blogs:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 200, 150, 0.2);
  background: rgba(0, 200, 150, 0.08);
}

.recent-blogs h2 {
  color: var(--primary-color);
  margin-bottom: var(--spacing-md);
  line-height: 1.4;
  font-size: 1.3rem;
}

.recent-blogs p {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: var(--spacing-md);
  flex-grow: 1;
}

.recent-blogs a {
  text-decoration: none;
  padding: 10px 16px;
  color: var(--text-white);
  background: rgba(0, 200, 150, 0.2);
  border: 1px solid var(--primary-color);
  border-radius: 8px;
  transition: all var(--transition-fast);
  align-self: flex-start;
  font-weight: 500;
}

.recent-blogs a:hover {
  background: rgba(0, 200, 150, 0.3);
  color: var(--primary-color);
  transform: translateX(5px);
}

/* Contact Section */
.contact {
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-lg);
  max-width: 600px;
  margin: 0 auto;
}

.contact h1 {
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: var(--spacing-xs);
  margin: 0 auto var(--spacing-lg) auto;
  font-size: 2rem;
  width: fit-content;
}

.email-us {
  display: flex;
  margin: var(--spacing-lg) auto;
  align-items: center;
  border: 1px solid var(--primary-color);
  border-radius: var(--border-radius);
  padding: 8px;
  max-width: 450px;
  width: 100%;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  background: rgba(0, 200, 150, 0.05);
}

.email-us input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 16px;
  border-radius: 8px 0 0 8px;
  color: var(--text-secondary);
  background: transparent;
  font-size: 16px;
}

.email-us button {
  background: var(--primary-color);
  color: var(--text-white);
  border: none;
  font-weight: bold;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 16px;
}

.email-us button:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
}

/* Footer */
footer {
  text-align: center;
  padding: var(--spacing-lg);
  border-top: 1px solid #333;
  margin-top: var(--spacing-xl);
}

footer p {
  color: var(--text-secondary);
  font-weight: 300;
}

footer span {
  color: var(--primary-color);
  font-weight: bold;
}