/* Styles for twinkling star animation */
.star {
  position: fixed;
  background-color: #fff;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  animation: twinkle 5s infinite;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.5);
  }
  50% {
    opacity: 0.8;
    transform: scale(1);
  }
}

/* Styling for h3 elements */
h3 {
  display: block;
  color: rgb(121, 71, 109);
  font-size: 1.17em;
  margin-block-start: 1em;
  margin-block-end: -0.5em;
  margin-inline-start: 0px;
  margin-inline-end: 0px;
  font-weight: bold;
  unicode-bidi: isolate;
}

/* General body styling */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  line-height: 1.6;
  background-color: rgb(50, 48, 48);
  color: #333;
  will-change: background-color;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
}

/* Header styling with animated gradient background */
header {
  background: linear-gradient(-45deg, #1e1e1e, #722750, #997e8f, #601a1a);
  background-size: 400% 400%;
  animation: gradientFlow 15s ease infinite;
  color: white;
  padding: 1.5em;
}

@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 30% 50%;
  }
}

/* Container for header content */
.header-container {
  display: flex;
  align-items: center;
  gap: 1.5em;
  max-width: 1000px;
  margin: auto;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
}

.header-main {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 2.5em;
  max-width: 1100px;
  margin: auto;
  justify-content: center;
  position: relative;
  padding: 1em 0;
}

.header-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2em;
  min-width: 180px;
  max-width: 220px;
  flex-shrink: 0;
  border-right: 2px solid rgba(255, 255, 255, 0.12);
  padding-right: 2em;
}

.header-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.2em;
  flex: 1;
  min-width: 250px;
  padding-left: 2em;
}

/* Profile picture styling */
.profile-pic {
  width: 120px;
  height: 120px;
  border-radius: 30%;
  object-fit: cover;
  border: 3px solid #970099;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Navigation link styling */
nav a {
  color: white;
  margin: 0.2em 0.2em;
  text-decoration: none;
  font-weight: bold;
  padding: 0.4em 0.9em;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  transition: all 0.3s ease;
  display: inline-block;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  background-color: rgba(151, 69, 118, 0.3);
  backdrop-filter: blur(5px);
  position: relative;
  z-index: 2;
}

nav a:hover {
  background-color: rgba(151, 69, 118, 0.7);
  color: white;
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  border-color: white;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.7);
}

/* Section styling */
section {
  padding: 2em;
  max-width: 800px;
  margin: 1em auto;
  background: rgb(175, 125, 156);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Styling for h2 elements */
h2 {
  color: #1e1e1e;
  border-bottom: 2px solid rgb(50, 48, 48);
  padding-bottom: 0.3em;
}

/* Project card styling */
.project {
  margin-bottom: 1.5em;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding: 1em;
  border-radius: 8px;
  color: rgb(175, 125, 156);
  background-color: rgb(50, 48, 48);
  position: relative; /* Ensure the logo is positioned relative to the card */
  size: 1.1em;
}

.project:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  opacity: 0.9;
}

/* Footer styling */
footer {
  text-align: center;
  padding: 1.5em;
  color: white;
  margin-top: 2em;
  background: linear-gradient(-45deg, #1e1e1e, #722750, #997e8f, #601a1a);
  background-size: 400% 400%;
  animation: gradientFlow 15s ease infinite;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

/* Truncatable content styling */
.truncatable {
  max-height: 4.5em;
  overflow: hidden;
  position: relative;
  transition: max-height 0.3s ease;
}

.truncatable.expanded {
  max-height: 1000px;
}

.toggle-btn {
  color: white;
  padding: 10px 18px;
  font-size: 0.95rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 12px;
  transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s;
  box-shadow: 0 3px 6px rgba(99, 102, 241, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.toggle-btn:hover {
  background-color: #4f46e5;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(79, 70, 229, 0.25);
}

.toggle-btn:active {
  background-color: #4338ca;
  transform: scale(0.98);
}

/* Source link styling */
.source-link {
  display: block;
  margin-top: 0.5em;
  color: #974579;
  font-weight: bold;
  text-decoration: none;
}

.source-link:hover {
  text-decoration: underline;
}

/* Smooth scrolling behavior */
html {
  scroll-behavior: smooth;
}

/* Contact section styling */
#contact {
  padding: 2em;
  max-width: 800px;
  margin: 1em auto;
  background: rgb(175, 125, 156);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 1em;
  gap: 15px;
}

.contact-card a {
  color: #974579;
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-item a:hover,
.source-link:hover,
.contact-card a:hover {
  color: #722750;
  text-decoration: underline;
}

.contact-item i {
  font-size: 1.5em;
  color: #974579;
  width: 30px;
  text-align: center;
}

.contact-item a {
  color: #974579;
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-item a:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* Cursor trail effect */
.cursor-trail {
  position: fixed;
  width: 20px;
  height: 20px;
  background-color: rgba(255, 0, 208, 0.3);
  border-radius: 60%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  transition: transform 0.1s ease, opacity 0.5s ease;
}

/* Profile image container styling */
.profile-img-container {
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.profile-img-container:hover {
  transform: scale(1.05);
}

.profile-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(151, 69, 118, 0.7);
  border-radius: 30%;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.profile-img-container:hover .profile-overlay {
  opacity: 1;
}

.profile-overlay span {
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
}

/* Header content styling */
.header-content {
  display: flex;
  flex-direction: column;
  gap: 0.3em; /* Reduced from 1em to 0.3em */
  font-weight: bold;
  color: rgb(50, 48, 48);
}

.header-content h1,
.header-content .typewriter-long {
  margin-bottom: 0;
  margin-top: 0;
}

.header-nav {
  margin-top: 1em;
}

/* Typewriter effect styling for gaming terminal */
.typewriter {
  display: inline-block;
  overflow: hidden;
  border-right: 2px solid #974579;
  white-space: nowrap;
  animation: typing 3.5s steps(40, end) forwards,
    blink-caret 0.75s step-end infinite;
  width: 0;
  max-width: 100%;
  font-weight: bold;
  color: rgb(50, 48, 48);
  font-size: 1.1em;
  margin: 0;
}

/* New Typewriter for index.html */
.typewriter-long {
  display: inline-block;
  overflow: hidden;
  border-right: 2px solid #974579; /* Keep same cursor style */
  white-space: nowrap;
  animation: typing-long 6s steps(70, end) forwards,
    /* Longer duration & more steps */ blink-caret 0.75s step-end infinite; /* Same cursor blink */
  width: 0;
  max-width: 100%;
  font-weight: bold;
  color: rgb(50, 48, 48);
  font-size: 1.1em;
  margin: 0;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

/* New keyframes for index.html */
@keyframes typing-long {
  from {
    width: 0;
  }
  to {
    width: 92%;
  }
}

@keyframes blink-caret {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: rgb(50, 48, 48);
  }
}

/* Navigation link hover effect */
.nav-link {
  transition: all 0.3s ease;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: white;
  transition: width 0.3s ease;
}

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

/* Contact grid styling */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  justify-content: center;
}

.contact-card {
  background: rgb(50, 48, 48);
  padding: 1.5em;
  color: white;
  border-radius: 10px;
  display: flex;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  border: 1px solid #eee;
  margin-bottom: 10px;
  align-items: center;
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(151, 69, 118, 0.2);
  border-color: #974579;
}

.contact-card i {
  font-size: 5em;
  color: #974579;
  text-align: center;
}

.contact-card p {
  margin: 0;
  color: #974579;
  margin-left: 20px;
}

.contact-card p a {
  color: #974579;
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-card p a:hover {
  color: #722750;
  text-decoration: underline;
  font-weight: bold;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.contact-card[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  padding: 0.5em 1em;
  border-radius: 5px;
  font-size: 0.8em;
  white-space: nowrap;
  margin-bottom: 10px;
}

/* Contact form styling */
.contact-form {
  color: rgb(255, 255, 255);
  background: rgb(50, 48, 48);
  padding: 2em;
  margin-top: em;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 1.5em;
}

.form-group input,
.form-group textarea {
  width: 90%;
  padding: 0.8em;
  border: 1px solid #ddd;
  margin-top: 0.4em;
  border-radius: 5px;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #974579;
  outline: none;
}

/* Submit button styling */
.submit-btn {
  background: linear-gradient(to right, #974579, #722750);
  color: white;
  border: none;
  padding: 1em 2em;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(151, 69, 118, 0.4);
}

/* Social links styling */
.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 1em;
}

.social-icon {
  color: white;
  font-size: 1.5em;
  transition: transform 0.3s ease;
}

.social-icon:hover {
  transform: translateY(-5px) scale(1.2);
  color: #ffcc00;
}

/* Back-to-top button styling */
.back-to-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: #974579;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  justify-content: center;
  align-items: center;
  font-size: 1.2em;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  z-index: 99;
}

.back-to-top-btn:hover {
  background: #722750;
  transform: translateY(-3px);
}

/* Spinner animation */
.fa-spinner {
  margin-right: 8px;
}

@keyframes fa-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(359deg);
  }
}

.fa-spin {
  animation: fa-spin 1s infinite linear;
}

/* Skills section styling */
#skills {
  padding: 2em;
  max-width: 800px;
  margin: 1em auto;
  background: rgb(175, 125, 156);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.skills-category {
  margin-bottom: 2em;
}

.skills-category h3 {
  color: rgb(50, 48, 48);
  margin-bottom: 0.8em;
  font-size: 1.3em;
  border-bottom: 1px solid rgba(50, 48, 48, 0.3);
  padding-bottom: 0.3em;
}

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

.skill-card {
  background: rgb(50, 48, 48);
  color: white;
  padding: 1em 0.5em;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  text-align: center;
  min-height: 80px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(151, 69, 118, 0.3);
  border-color: #974579;
}

.skill-card i {
  font-size: 1.8em;
  margin-bottom: 0.5em;
  color: #974579;
}

.skill-card span {
  font-size: 0.8em;
  font-weight: 500;
}

@media (max-width: 768px) {
  .skills-container {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }

  .skill-card {
    padding: 0.8em 0.3em;
    min-height: 70px;
  }

  .skill-card i {
    font-size: 1.5em;
  }

  .skill-card span {
    font-size: 0.7em;
  }
}

/* About section styling */
#about {
  padding: 2em;
  max-width: 1000px;
  margin: 2em auto;
  background: linear-gradient(
    135deg,
    rgba(175, 125, 156, 0.9),
    rgba(151, 69, 118, 0.9)
  );
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(151, 69, 118, 0.3);
}

.about-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2em;
  align-items: center;
}

.about-content {
  flex: 1;
  min-width: 300px;
}

.about-image {
  flex: 1;
  min-width: 300px;
  display: flex;
  justify-content: center;
}

.image-frame {
  border: 5px solid white;
  border-radius: 15px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  max-width: 350px;
}

.about-img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.about-img:hover {
  transform: scale(1.05);
}

.about-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1em;
  margin-bottom: 1.5em;
}

.about-highlight {
  display: flex;
  align-items: center;
  gap: 15px;
  background: rgba(255, 255, 255, 0.1);
  padding: 1em;
  border-radius: 10px;
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
  min-height: 80px;
}

.about-highlight:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(5px);
}

.highlight-icon {
  font-size: 1.2em;
  color: #974579;
  background: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.value-proposition {
  padding: 1.5em;
  background: rgba(50, 48, 48, 0.8);
  color: white;
  border-radius: 10px;
  font-size: 1.1em;
  line-height: 1.6;
  margin-top: 1em;
}

@media (max-width: 768px) {
  .about-container {
    flex-direction: column;
  }

  .about-image {
    order: -1;
    margin-bottom: 2em;
  }

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

@media (max-width: 480px) {
  .about-highlight {
    flex-direction: column;
    text-align: center;
  }

  .highlight-icon {
    margin-bottom: 0.5em;
  }
}

/* Responsive styles for smaller screens */
@media (max-width: 1024px) {
  .header-container {
    flex-direction: column;
    gap: 1em;
  }

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

  .header-content {
    text-align: center;
  }

  nav a {
    padding: 0.3em 0.7em;
    font-size: 0.9em;
  }

  .about-container {
    flex-direction: column;
    gap: 2em;
  }

  .about-image {
    margin-bottom: 1em;
  }

  .skills-container {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }

  .skill-card {
    padding: 0.8em 0.3em;
    min-height: 70px;
  }

  .skill-card i {
    font-size: 1.5em;
  }

  .skill-card span {
    font-size: 0.7em;
  }

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

  .contact-card {
    flex-direction: column;
    text-align: center;
  }

  .highlight-icon {
    margin-bottom: 0.5em;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 1em;
  }

  .about-highlight {
    flex-direction: column;
    text-align: center;
  }

  .project {
    padding: 1em;
  }

  .project h3 {
    font-size: 1.2em;
  }

  .project ul {
    font-size: 0.9em;
  }

  .contact-form {
    padding: 1em;
  }

  .form-group input,
  .form-group textarea {
    font-size: 0.9em;
  }

  .submit-btn {
    font-size: 0.9em;
    padding: 0.8em 1.5em;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.5em;
  }

  .typewriter-long {
    font-size: 0.9em;
  }

  nav a {
    font-size: 0.8em;
    padding: 0.2em 0.5em;
  }

  /* Use padding-bottom instead of margin-bottom for footer */
  footer {
    padding-bottom: 80px;
  }
}

/* Custom scrollbar styling */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: rgb(50, 48, 48);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(#974579, #722750);
  border-radius: 10px;
  border: 2px solid rgb(50, 48, 48);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(#722750, #974579); /* Reverse gradient on hover */
}

html {
  scrollbar-width: thin;
  scrollbar-color: #974579 rgb(50, 48, 48);
}

/* Glowing text outline effect */
.text-outline {
  text-shadow: 0 0 5px rgba(9, 0, 10, 0.8);
  color: rgb(255, 255, 255);
  font-weight: bold;
}

/* Experience logo positioning */
.experience-logo {
  width: 50px;
  height: auto;
  position: absolute;
  border-radius: 5px; /* Optional: Add rounded corners */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Optional: Add shadow for better visibility */
}

.top-right {
  top: 10px;
  right: 10px;
}

.education-logo {
  width: min(50vw, 300px);
  max-width: 400px; /* More reasonable maximum size */
  height: auto;
  display: block;
  margin: 1 auto;
  object-fit: contain; /* Maintain aspect ratio */
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .education-logo {
    max-width: 200px;
  }
}

@media (max-width: 480px) {
  .education-logo {
    max-width: 150px;
  }
}

/* Explosion effect styles */
#explosion-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle,
    rgba(255, 0, 0, 0.8) 0%,
    rgba(255, 69, 0, 0.9) 100%
  );
  z-index: 999;
  display: none;
  pointer-events: none;
  animation: explosionPulse 1s ease-out;
}

#game-over-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 5rem;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 0 20px #000;
  z-index: 1000;
  display: none;
  animation: textShake 0.5s linear infinite;
}

@keyframes explosionPulse {
  0% {
    opacity: 0;
    transform: scale(0.1);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.8;
    transform: scale(1);
  }
}

@keyframes textShake {
  0%,
  100% {
    transform: translate(-50%, -50%) rotate(-2deg);
  }
  25% {
    transform: translate(-50%, -50%) rotate(2deg);
  }
  50% {
    transform: translate(-50%, -50%) rotate(-3deg);
  }
  75% {
    transform: translate(-50%, -50%) rotate(3deg);
  }
}

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    text-align: center;
    padding: 1em;
  }

  .profile-img-container {
    margin-right: 0;
    margin-bottom: 1em;
  }

  .header-nav {
    margin-top: 1em;
  }

  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5em;
  }

  nav a {
    margin: 0.2em;
    font-size: 0.9em;
    padding: 0.3em 0.7em;
  }

  .typewriter-long {
    font-size: 1em;
    white-space: normal;
    border-right: none;
    animation: none;
    width: 100%;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.8em;
  }

  .typewriter-long {
    font-size: 0.9em;
  }

  nav a {
    font-size: 0.8em;
    padding: 0.2em 0.5em;
  }

  /* Add extra bottom margin to footer to prevent overlap with back-to-top button */
  footer {
    padding-bottom: 80px;
  }
}

/* Add this to your style.css file */
.button-group {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
  align-items: center; /* Changed from stretch to center */
}

.toggle-btn,
.source-btn,
.demo-btn {
  padding: 10px 18px;
  font-size: 0.95rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease, transform 0.1s ease, box-shadow 0.2s;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center; /* Center content horizontally */
  gap: 6px;
  text-decoration: none;
  height: 40px; /* Fixed height */
  box-sizing: border-box;
  line-height: 1;
  vertical-align: middle; /* Ensure vertical alignment */
}

/* Specific button styles */
.toggle-btn {
  background-color: #974579;
  color: white;
}

.source-btn {
  background-color: #974579;
  color: white;
}

.demo-btn {
  background-color: #974579;
  color: white;
}

/* Hover states */
.toggle-btn:hover {
  background-color: #4f46e5;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(79, 70, 229, 0.25);
}

.source-btn:hover {
  background-color: #444;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

.demo-btn:hover {
  background-color: #722750;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(151, 69, 118, 0.25);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .button-group {
    gap: 8px;
  }

  .toggle-btn,
  .source-btn,
  .demo-btn {
    padding: 8px 12px;
    font-size: 0.85rem;
    height: 36px; /* Slightly smaller on mobile */
  }
}

@media (max-width: 480px) {
  .button-group {
    gap: 6px;
  }

  .toggle-btn,
  .source-btn,
  .demo-btn {
    padding: 6px 10px;
    font-size: 0.8rem;
    height: 34px; /* Even smaller on very small screens */
  }
}

.button-group > * {
  vertical-align: middle;
  margin: 0;
}

/* Social icons in header */
.social-header {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 15px;
  z-index: 10;
}

.social-icon-header {
  color: white;
  font-size: 1.5em;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.1);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-decoration: none;
}

.social-icon-header:hover {
  color: #ffcc00;
  transform: scale(1.2);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
}

@media (max-width: 900px) {
  .header-main {
    flex-direction: column;
    align-items: center;
    gap: 1.5em;
    padding: 0.5em 0;
  }
  .header-left {
    border-right: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.12);
    padding-right: 0;
    padding-bottom: 1em;
    max-width: none;
    width: 100%;
    flex-direction: row;
    justify-content: center;
    gap: 2em;
  }
  .header-right {
    padding-left: 0;
    min-width: 0;
    width: 100%;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .header-main {
    flex-direction: column;
    gap: 1em;
    padding: 0.2em 0;
  }
  .header-left {
    flex-direction: column;
    gap: 1em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 0.5em;
  }
  .header-right {
    padding-left: 0;
    align-items: center;
    text-align: center;
  }
}

.social-header {
  position: static;
  display: flex;
  flex-direction: row;
  gap: 15px;
  margin-top: 0.5em;
  justify-content: center;
  width: 100%;
  z-index: 10;
}

/* Profile section with resume button */
.profile-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: 20px;
  gap: 15px;
}

/* Resume Button Styles */
.resume-button-container {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
}

.resume-btn {
  background: linear-gradient(to right, #974579, #722750);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  width: 100%;
  justify-content: center;
}

.resume-btn:hover {
  background: linear-gradient(to right, #722750, #974579);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(151, 69, 118, 0.3);
}

.resume-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: rgb(50, 48, 48);
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  padding: 10px 0;
  z-index: 100;
  display: none;
  border: 1px solid #974579;
  width: 100%;
}

.resume-button-container:hover .resume-dropdown {
  display: block;
}

.resume-option {
  display: block;
  padding: 8px 15px;
  color: white;
  text-decoration: none;
  transition: all 0.2s ease;
  text-align: center;
  font-size: 0.9rem;
}

.resume-option:hover {
  background-color: #974579;
  color: white;
}

/* Form status messages */
.form-success,
.form-error {
  padding: 1em;
  margin-top: 1em;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadeIn 0.3s ease;
}

.form-success {
  background-color: rgba(40, 167, 69, 0.2);
  color: #28a745;
  border: 1px solid #28a745;
}

.form-error {
  background-color: rgba(220, 53, 69, 0.2);
  color: #dc3545;
  border: 1px solid #dc3545;
}

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

.form-success {
  background-color: rgba(40, 167, 69, 0.2);
  color: #28a745;
  border: 1px solid #28a745;
}

.form-error {
  background-color: rgba(220, 53, 69, 0.2);
  color: #dc3545;
  border: 1px solid #dc3545;
}

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

/* Styles for blog button */
.blog-btn {
  position: relative;
  z-index: 3;
  border: 2.5px solid #ffcc00;
  color: #ffcc00 !important;
  background: #1e1e1e;
  font-weight: bold;
  box-shadow: 0 0 12px #ffcc0088;
  overflow: hidden;
  padding: 0.4em 0.9em;   /* Match nav a padding */
  border-radius: 8px;     /* Match nav a border-radius */
  vertical-align: middle; /* Align with other nav buttons */
  display: inline-block;  /* Ensure inline alignment */
  line-height: 1.2;       /* Match nav a line-height */
  height: auto;           /* Remove fixed height */
}

.blog-btn::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 10px; /* Match nav a border-radius */
  border: 2.5px solid transparent;
  border-top: 2.5px solid #ffcc00;
  border-right: 2.5px solid #ffcc00;
  border-bottom: 2.5px solid #ffcc00;
  border-left: 2.5px solid transparent;
  animation: blog-btn-spin 1.2s linear infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes blog-btn-spin {
  0% {
    transform: rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: rotate(360deg);
    opacity: 1;
  }
}

.blog-btn:hover,
.blog-btn:focus {
  background: #ffcc00;
  color: #1e1e1e !important;
  border-color: #ffcc00;
  box-shadow: 0 0 20px #ffcc00cc;
}

.blog-btn:hover::before,
.blog-btn:focus::before {
  border-top: 4px solid #1e1e1e;
  border-right: 2.5px solid transparent;
  border-bottom: 4px solid #1e1e1e;
  border-left: 2.5px solid transparent;
}

/* Voltage Button Styles - From Uiverse.io by Pradeepsaranbishnoi */
.voltage-button {
  position: relative;
}

.voltage-button button {
  color: white;
  background: #580f58;
  padding: 1rem 3rem 1rem 3rem;
  border-radius: 5rem;
  border: 5px solid #5978f3;
  font-size: 1.2rem;
  line-height: 1em;
  letter-spacing: 0.075em;
  transition: background 0.3s;
}

.voltage-button button:hover {
  cursor: pointer;
  background: #7a1375;
}

/* Always show SVG and dots (animation always runs) */
.voltage-button svg {
  display: block;
  position: absolute;
  top: -0.75em;
  left: -0.25em;
  width: calc(100% + 0.5em);
  height: calc(100% + 1.5em);
  pointer-events: none;
  opacity: 1; /* Always visible */
  transition: opacity 0.4s;
  transition-delay: 0.1s;
}

.voltage-button .dots {
  opacity: 1; /* Always visible */
  transition: opacity 0.3s;
  transition-delay: 0.4s;
}

.voltage-button svg path {
  stroke-dasharray: 100;
  filter: url("#glow");
}

.voltage-button svg path.line-1 {
  stroke: #eae353;
  stroke-dashoffset: 0;
  animation: spark-1 3s linear infinite;
}

.voltage-button svg path.line-2 {
  stroke: #6bfeff;
  stroke-dashoffset: 500;
  animation: spark-2 3s linear infinite;
}

.voltage-button .dots .dot {
  width: 1rem;
  height: 1rem;
  background: white;
  border-radius: 100%;
  position: absolute;
  opacity: 0;
}

.voltage-button .dots .dot-1 {
  top: 0;
  left: 20%;
  animation: fly-up 3s linear infinite;
}

.voltage-button .dots .dot-2 {
  top: 0;
  left: 55%;
  animation: fly-up 3s linear infinite;
  animation-delay: 0.5s;
}

.voltage-button .dots .dot-3 {
  top: 0;
  left: 80%;
  animation: fly-up 3s linear infinite;
  animation-delay: 1s;
}

.voltage-button .dots .dot-4 {
  bottom: 0;
  left: 30%;
  animation: fly-down 3s linear infinite;
  animation-delay: 2.5s;
}

.voltage-button .dots .dot-5 {
  bottom: 0;
  left: 65%;
  animation: fly-down 3s linear infinite;
  animation-delay: 1.5s;
}

@keyframes spark-1 {
  to {
    stroke-dashoffset: -1000;
  }
}

@keyframes spark-2 {
  to {
    stroke-dashoffset: -500;
  }
}

@keyframes fly-up {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.2);
  }

  5% {
    opacity: 1;
    transform: translateY(-1.5rem) scale(0.4);
  }

  10%,
  100% {
    opacity: 0;
    transform: translateY(-3rem) scale(0.2);
  }
}

@keyframes fly-down {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.2);
  }

  5% {
    opacity: 1;
    transform: translateY(1.5rem) scale(0.4);
  }

  10%,
  100% {
    opacity: 0;
    transform: translateY(3rem) scale(0.2);
  }
}

.blog-btn, .blog-btn::before, .blog-btn:hover, .blog-btn:focus, .blog-btn:hover::before, .blog-btn:focus::before {
  display: none !important;
}

/* Uiverse.io Send Button Styles (scoped to .uiverse-send-btn) */
.uiverse-send-btn {
  font-family: inherit;
  font-size: 20px;
  background: #722750;
  color: white;
  padding: 0.7em 1em;
  padding-left: 0.9em;
  display: flex;
  align-items: center;
  border: none;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
  min-width: 120px;
  justify-content: center;
  box-shadow: 0 3px 6px rgba(99, 102, 241, 0.2);
}

.uiverse-send-btn span {
  display: block;
  margin-left: 0.3em;
  transition: all 0.3s ease-in-out;
}

.uiverse-send-btn .svg-wrapper-1 {
  display: flex;
  align-items: center;
}

.uiverse-send-btn .svg-wrapper {
  display: block;
  transition: transform 0.3s ease-in-out;
}

.uiverse-send-btn svg {
  display: block;
  transform-origin: center center;
  transition: transform 0.3s ease-in-out;
}

.uiverse-send-btn:hover .svg-wrapper {
  animation: fly-1 0.6s ease-in-out infinite alternate;
}

.uiverse-send-btn:hover svg {
  transform: translateX(1.2em) rotate(45deg) scale(1.1);
}

.uiverse-send-btn:hover span {
  transform: translateX(5em);
}

.uiverse-send-btn:active {
  transform: scale(0.95);
}

@keyframes fly-1 {
  from {
    transform: translateY(0.1em);
  }
  to {
    transform: translateY(-0.1em);
  }
}