/* Loader Styles */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #121212;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.6s ease-out;
}

.custom-loader {    
    --r1: 154%;
    --r2: 68.5%;
    width: 60px;
    height: 60px;
    border-radius: 50%; 
    background:
        radial-gradient(var(--r1) var(--r2) at top, #0000 79.5%, #00BCD4 80%),
        radial-gradient(var(--r1) var(--r2) at bottom, #00BCD4 79.5%, #0000 80%),
        radial-gradient(var(--r1) var(--r2) at top, #0000 79.5%, #00BCD4 80%),
        #213547;
    background-size: 50.5% 220%;
    background-position: -100% 0%, 0% 0%, 100% 0%;
    background-repeat: no-repeat;
    animation: p9 2s infinite linear;
}

@keyframes p9 {
    33%  {background-position: 0% 33%, 100% 33%, 200% 33%}
    66%  {background-position: -100% 66%, 0% 66%, 100% 66%}
    100% {background-position: 0% 100%, 100% 100%, 200% 100%}
}

.loader-text {
    margin-top: 20px;
    font-family: Arial, sans-serif;
    color: #213547;
}

/* Content Styles */
.page-content {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.page-content.visible {
    opacity: 1;
    transform: translateY(0);
}

:root {
  --primary-color: #00bcd4;
  --primary-hover: #00acc1;
  --text-color: #213547;
  --bg-color: #ffffff;
  --card-bg: #f9f9f9;
  --nav-bg: rgba(255, 255, 255, 0.9);
  --transition: all 0.3s ease;
}

.dark-mode {
  --primary-color: #00bcd4;
  --primary-hover: #00acc1;
  --text-color: rgba(255, 255, 255, 0.87);
  --bg-color: #121212;
  --card-bg: #1e1e1e;
  --nav-bg: rgba(18, 18, 18, 0.9);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  transition: var(--transition);
  margin-top: 20px; /* Space for sticky nav */;
  overflow-x: hidden; /* Prevent horizontal scroll */
  position: relative; /* For absolute positioning of loader */
}

html {
  scroll-behavior: smooth;
}

/* Add these new animation keyframes at the top of your CSS */
@keyframes slideDownFadeIn {
  0% {
      opacity: 0;
      transform: translateY(-30px);
  }
  100% {
      opacity: 1;
      transform: translateY(0);
  }
}

@keyframes slideInFromLeft {
  0% {
      opacity: 0;
      transform: translateX(-50px);
  }
  100% {
      opacity: 1;
      transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  0% {
      opacity: 0;
      transform: translateX(50px);
  }
  100% {
      opacity: 1;
      transform: translateX(0);
  }
}

/* Animation Keyframes */
@keyframes slideDownFadeIn {
  0% { opacity: 0; transform: translateY(-30px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes slideInFromLeft {
  0% { opacity: 0; transform: translateX(-50px); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes slideInFromRight {
  0% { opacity: 0; transform: translateX(50px); }
  100% { opacity: 1; transform: translateX(0); }
}

/* Animation Classes */
.animate-title {
  animation: slideDownFadeIn 0.8s ease-out forwards;
}

.animate-left {
  animation: slideInFromLeft 0.8s ease-out forwards;
}

.animate-right {
  animation: slideInFromRight 0.8s ease-out forwards;
}

/* Initial State */
.section-title,
.skill-card,
.project-card,
.about-text,
.about-image,
.contact-info,
.contact-form {
  opacity: 0;
}

/* For Skills and Projects (fade only) */
.skill-card,
.project-card {
    animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.vscode {
  filter: sepia(1) hue-rotate(170deg) saturate(4);
}

.vscode:hover {
  color: white;
}

/* Add transition for exit animations */
.about-content > div,
.skills-tabs,
.skills-grid,
.projects-grid,
.contact-content > div {
  transition: all 0.8s ease;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation */
nav {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 0;
  background-color: var(--nav-bg);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transform: none;
}

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

.logo {
  color: #213547; /*Light Mode*/
  font-size: 1.5rem;
  font-weight: 700;
}

body.dark-mode .logo {
  color: #f9f9f9; /*Dark Mode*/
}

.logo:hover {
  color: var(--primary-hover);
  text-decoration: none;
}

body.dark-mode .logo:hover {
  color: var(--primary-hover);
  text-decoration: none;
}

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

.nav-links a {
  font-weight: 500;
  position: relative;
}

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

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

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.dark-mode-toggle {
  cursor: pointer;
  font-size: 1.2rem;
}

.burger-menu {
  display: none;
  cursor: pointer;
  font-size: 1.5rem;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 0 50px;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
}

.hero-text {
  flex: 1;
}

.hero-text h1 {
  font-size: 3rem;
  margin-bottom: 10px;
  line-height: 1.2;
}

.hero-text p {
  font-size: 1.2rem;
  margin-bottom: 15px;
  opacity: 0.9;
}

.contact-btn {
  position: relative;
  display: inline-block;
  padding: 12px 30px;
  border-radius: 5px;
  font-weight: 500;
  background-color: var(--primary-color);
  color: white;
  overflow: hidden;
  box-shadow: 0 0 0 0 transparent;
  -webkit-transition: all 0.2s ease-in;
  -moz-transition: all 0.2s ease-in;
  transition: all 0.2s ease-in;
}

.contact-btn:hover {
  font-weight: bold;
  color: #213547;
  background-color: var(--primary-hover);
  box-shadow: 0 5px 15px rgba(0, 188, 212, 0.3);
  -webkit-transition: all 0.2s ease-out;
  -moz-transition: all 0.2s ease-out;
  transition: all 0.2s ease-out;
}

.contact-btn:hover::before {
  -webkit-animation: sh02 0.5s 0s linear;
  -moz-animation: sh02 0.5s 0s linear;
  animation: sh02 0.5s 0s linear;
}

.contact-btn::before {
  content: '';
  display: block;
  width: 0px;
  height: 86%;
  position: absolute;
  top: 7%;
  left: 0%;
  opacity: 0;
  background: #fff;
  box-shadow: 0 0 50px 30px #fff;
  -webkit-transform: skewX(-20deg);
  -moz-transform: skewX(-20deg);
  -ms-transform: skewX(-20deg);
  -o-transform: skewX(-20deg);
  transform: skewX(-20deg);
}

@keyframes sh02 {
  from {
    opacity: 0;
    left: 0%;
  }

  50% {
    opacity: 1;
  }

  to {
    opacity: 0;
    left: 100%;
  }
}

.contact-btn:active {
  box-shadow: 0 0 0 0 transparent;
  -webkit-transition: box-shadow 0.2s ease-in;
  -moz-transition: box-shadow 0.2s ease-in;
  transition: box-shadow 0.2s ease-in;
}


.message-btn {
  position: relative;
  display: inline-block;
  padding: 12px 30px;
  border-radius: 5px;
  border-style: none;
  font-weight: 500;
  background-color: var(--primary-color);
  color: white;
  overflow: hidden;
  box-shadow: 0 0 0 0 transparent;
  -webkit-transition: all 0.2s ease-in;
  -moz-transition: all 0.2s ease-in;
  transition: all 0.2s ease-in;
}

.message-btn:hover {
  font-weight: 500;
  color: #213547;
  background-color: var(--primary-hover);
  box-shadow: 0 5px 15px rgba(0, 188, 212, 0.3);
  -webkit-transition: all 0.2s ease-out;
  -moz-transition: all 0.2s ease-out;
  transition: all 0.2s ease-out;
}

.message-btn:hover::before {
  -webkit-animation: sh02 0.5s 0s linear;
  -moz-animation: sh02 0.5s 0s linear;
  animation: sh02 0.5s 0s linear;
}

.message-btn::before {
  content: '';
  display: block;
  width: 0px;
  height: 86%;
  position: absolute;
  top: 7%;
  left: 0%;
  opacity: 0;
  background: #fff;
  box-shadow: 0 0 50px 30px #fff;
  -webkit-transform: skewX(-20deg);
  -moz-transform: skewX(-20deg);
  -ms-transform: skewX(-20deg);
  -o-transform: skewX(-20deg);
  transform: skewX(-20deg);
}

@keyframes sh02 {
  from {
    opacity: 0;
    left: 0%;
  }

  50% {
    opacity: 1;
  }

  to {
    opacity: 0;
    left: 100%;
  }
}

.message-btn:active {
  box-shadow: 0 0 0 0 transparent;
  -webkit-transition: box-shadow 0.2s ease-in;
  -moz-transition: box-shadow 0.2s ease-in;
  transition: box-shadow 0.2s ease-in;
}


.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
}

.profile-pic {
  width: 350px;
  height: 350px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--primary-color);
  box-shadow: 0 10px 30px rgba(0, 188, 212, 0.3);
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
      transform: translateY(0);
  }
  50% {
      transform: translateY(-20px);
  }
}

/* Sections */
section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
  font-size: 2.5rem;
}

/* About Section */
.about-content {
  display: flex;
  gap: 50px;
  align-items: center;
}

.about-text {
  flex: 1;
}

.about-text h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.about-text p {
  margin-bottom: 15px;
}

.about-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 30px;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-item i {
  color: var(--primary-color);
  font-size: 1.2rem;
}

.about-image {
  flex: 1;
  display: flex;
  justify-content: center;
}

.about-image img {
  width: 100%;
  max-width: 400px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Skills Section */
.skills-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
  gap: 10px;
}

/* From Uiverse.io by JaydipPrajapati1910 */ 
.tab-btn {
  background: transparent;
  position: relative;
  padding: 10px 20px;
  display: inline-block;
  align-items: center;
  font-size: 17px;
  cursor: pointer;
  font-weight: 400;
  border: 1px solid var(--primary-color);
  border-radius: 5px;
  outline: none;
  overflow: hidden;
  color: var(--primary-color);
  transition: var(--transition);
  text-align: center;
}

.tab-btn::before {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  content: '';
  border-radius: 50%;
  display: inline-block;
  width: 17.3em;
  height: 17.5em;
  left: -5em;
  text-align: center;
  transition: box-shadow 0.5s ease-out;
  z-index: -1;
}

.tab-btn:hover {
  color: #fff;
}

.tab-btn:hover::before {
  box-shadow: inset 0 0 0 10em #00BCD4;
}

.tab-btn.active {
  background-color: var(--primary-color);
  color: black;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

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

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.tools-grid .skill-card {
  padding: 20px;
}

.skill-card {
  background-color: var(--card-bg);
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  transition: var(--transition);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.skill-card:hover {
  background-color: var(--primary-color);
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 188, 212, 0.2);
}

.skill-card:hover i,
.skill-card:hover h3 {
  color: white;
}

.skill-card i {
  font-size: 3rem;
  margin-bottom: 15px;
  color: var(--primary-color);
  transition: var(--transition);
}

.skilll-card:hover .vercel {
  mix-blend-mode: multiply;
  color: white;
}

.icon-style {
      font-size: 48px;
      text-align: center;
      display: inline-block;
      padding-bottom: 5px;
      color: #09c4d9;
      transition: color 0.3s ease;
}

.icon-style:hover {
      color: white;
}

/* Desktop layout for skills */
@media (min-width: 769px) {
  .skills-grid {
      grid-template-columns: repeat(3, 1fr);
      max-width: 600px;
      margin: 0 auto;
  }
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 300px;
  }
  .tools-grid .skill-card {
    padding: 30px;
  }
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.project-card {
  background-color: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.project-image {
  height: 200px;
  overflow: hidden;
}

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

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

.project-info {
  padding: 20px;
}

.project-info h3 {
  margin-bottom: 10px;
}

.project-info p {
  margin-bottom: 15px;
  opacity: 0.9;
}

.project-links {
  display: flex;
  gap: 15px;
}

.project-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.9rem;
}

/* Contact Section */
.contact-content {
  display: flex;
  gap: 50px;
}

.contact-info {
  flex: 1;
}

.contact-info h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.contact-info p {
  margin-bottom: 30px;
  opacity: 0.9;
}

.social-links {
  display: flex;
  gap: 20px;
  margin-top: 30px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background-color: var(--card-bg);
  border-radius: 50%;
  font-size: 1.5rem;
  transition: var(--transition);
}

.social-links a:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-5px);
}

.contact-form {
  flex: 1;
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.contact-form:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 188, 212, 0.3);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: var(--transition);
}

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

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(0, 188, 212, 0.2);
}

/* Typing animation styles */
.typing-name::after,
.typing-desc::after {
  content: '|';
  animation: blink 1s infinite;
}

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

/* Footer */
footer {
  text-align: center;
  padding: 30px 0;
  background-color: var(--card-bg);
}

/* Mobile Styles */
@media (max-width: 768px) {
  .nav-links {
      position: fixed;
      top: 80px;
      left: -100%;
      width: 100%;
      height: calc(100vh - 80px);
      background-color: var(--bg-color);
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 30px;
      transition: left 0.3s ease;
  }

  .nav-links.active {
      left: 0;
  }

  .burger-menu {
      display: block;
  }

  .hero-content {
      flex-direction: column;
      text-align: center;
  }

  .hero-text h1 {
      font-size: 2.5rem;
  }

  .profile-pic {
      width: 250px;
      height: 250px;
  }

  .about-content {
      flex-direction: column;
  }

  .about-details {
      grid-template-columns: 1fr;
  }

  .contact-content {
      flex-direction: column;
  }

  .section-title {
      font-size: 2rem;
  }
}

/* Dark mode transition */
body {
  transition: background-color 0.5s ease, color 0.5s ease;
}