/* -------- ROOT VARIABLES ----------- */
:root {
  --color-primary: #2b1055;
  --color-secondary: #7597de;
  --color-accent: #41f1b5;
  --color-white: #ffffff;
  --color-danger: #ff7782;
  --color-success: #41f1b5;
  --color-dark: #1c0522;
  --color-light: rgba(255, 255, 255, 0.7);
  --color-background: linear-gradient(#2b1055, #7597de);

  --border-radius-1: 0.4rem;
  --border-radius-2: 0.8rem;
  --border-radius-3: 1.2rem;

  --card-padding: 1.8rem;
  --padding-1: 1.2rem;

  --box-shadow: 0 2rem 3rem rgba(0, 0, 0, 0.2);
  --box-shadow-light: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1);

  --transition-speed: 0.3s;

  /* Mobile viewport height */
  --vh: 1vh;
}

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--color-background);
  overflow-x: hidden;
  width: 100%;
  color: var(--color-white);
  line-height: 1.6;
}

/* SCROLL TO TOP BUTTON */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--color-white);
  color: var(--color-primary);
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.25rem;
  box-shadow: var(--box-shadow);
  opacity: 0;
  transform: translateY(100px);
  transition: all var(--transition-speed) ease;
  z-index: 9999;
}

.scroll-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background: var(--color-accent);
  color: var(--color-white);
  transform: translateY(-5px);
}

/* HEADER STYLES - Enhanced */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 30px 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10000;
  transition: all var(--transition-speed) ease;
  background: transparent;
}

header.scrolled {
  padding: 15px 100px;
  background: var(--color-primary);
  box-shadow: var(--box-shadow-light);
}

header .logo {
  color: var(--color-white);
  font-weight: 700;
  text-decoration: none;
  font-size: 2.5rem;
  letter-spacing: 2px;
  transition: font-size 0.3s ease;
  display: flex;
  align-items: center;
  text-transform: lowercase;
}

header .logo .logo-icon {
  height: 40px;
  width: auto;
  max-width: 40px;
  margin-right: 15px;
  border-radius: 50%;
  object-fit: contain;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

header .logo .logo-text {
  font-size: 2.5rem;
  text-transform: lowercase;
}

header ul {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

header ul li {
  list-style: none;
  margin-left: 15px;
  margin-right: 5px;
}

header ul li a {
  text-decoration: none;
  padding: 8px 15px;
  color: var(--color-white);
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all var(--transition-speed) ease;
  position: relative;
  overflow: hidden;
}

header ul li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--color-white);
  transition: all var(--transition-speed) ease;
  transform: translateX(-50%);
}

header ul li a:hover::after,
header ul li a.active::after {
  width: 80%;
}

header ul li a:hover,
header ul li a.active {
  background: var(--color-white);
  color: var(--color-primary);
  transform: translateY(-3px);
}

/* Mobile menu button - initially hidden */
.mobile-menu-btn {
  display: none;
  color: var(--color-white);
  font-size: 2rem;
  cursor: pointer;
  z-index: 10001;
}

/* Conteudo Principal */
section {
  position: relative;
  width: 100%;
  height: 100vh;
  padding: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

section::before {
  content: "";
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 100px;
  background: linear-gradient(to top, var(--color-dark), transparent);
  z-index: 1000;
}

section img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

section img#moon {
  mix-blend-mode: screen;
  z-index: 0;
  will-change: transform, filter, opacity;
  transform-origin: center;
  transition: filter 0.1s ease;
  /* Making sure moon is initially crisp */
  filter: blur(0px);
}

section img#mountains_front {
  z-index: 10;
}

/* Add a container for the text animation to control overflow and add fade effects */
#text-container {
  position: fixed;
  width: 100%;
  top: 250px;
  overflow: hidden;
  z-index: 9;
  transition: transform 0.3s ease;
}

#text-container.scrolled {
  position: absolute;
  transform: translateY(calc(var(--scroll) * 1px));
}

#text-container::before,
#text-container::after {
  content: "";
  position: absolute;
  top: 0;
  width: 15%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

#text-container::before {
  left: 0;
  background: linear-gradient(to right, transparent);
}

#text-container::after {
  right: 0;
  background: linear-gradient(to left, transparent);
}

#text {
  position: relative;
  color: var(--color-white);
  font-size: 6.5vw;
  font-weight: 700;
  text-align: center;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  z-index: 9;
  white-space: nowrap;
  animation: glowText 2s ease-in-out infinite alternate;
}

@keyframes glowText {
  from {
    text-shadow: 0 0 10px rgb(255, 255, 255),
      0 0 20px rgb(255, 255, 255), 0 0 30px rgb(253, 243, 243);
  }
  to {
    text-shadow: 0 0 20px rgba(10, 1, 1, 0.8),
      0 0 30px rgba(10, 0, 0, 0.6), 0 0 40px rgba(7, 0, 0, 0.4);
  }
}

#btn {
  text-decoration: none;
  display: inline-block;
  padding: 8px 30px;
  border-radius: var(--border-radius-3);
  background: var(--color-white);
  color: var(--color-primary);
  font-size: 1.5em;
  z-index: 9;
  transform: translateY(100px);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

#btn:hover {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.sec,
.resume-section,
.projects-section,
.blogs-section,
.contact-section {
  position: relative;
  padding: 100px;
  background: #1c0522;
  background-image: url("../images/stars.png");
  z-index: 5;
  box-shadow: 0 -50px 50px 0px rgba(28, 5, 34, 0.9);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  position: relative;
  overflow: hidden;
  transition: background-color 0.5s ease;
}

.sec h2,
.resume-section h2,
.projects-section h2,
.blogs-section h2,
.contact-section h2 {
  position: relative;
  display: inline-block;
  margin-bottom: 40px;
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  padding-bottom: 10px;
}

.sec h2::after,
.resume-section h2::after,
.projects-section h2::after,
.blogs-section h2::after,
.contact-section h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(
    to right,
    transparent,
    var(--color-accent),
    transparent
  );
  animation: shimmer 2s infinite linear;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Section titles animation */
.sec h2,
.resume-section h2,
.projects-section h2,
.blogs-section h2,
.contact-section h2 {
  animation: fadeInTitle 1.5s ease-out forwards;
}

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

.sec p {
  font-size: 1.2em;
  color: var(--color-white);
  line-height: 1.8;
  max-width: 900px;
  margin: 0 auto;
}

/* About Section Styling */
.about-container {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.05);
  padding: 40px;
  border-radius: var(--border-radius-3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3),
    inset 0 0 15px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.about-container::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 50%
  );
  transform: rotate(30deg);
  pointer-events: none;
  z-index: 0;
}

.about-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4),
    inset 0 0 15px rgba(255, 255, 255, 0.1);
}

.about-image {
  flex: 0 0 300px;
  position: relative;
}

.about-image::before {
  content: "";
  position: absolute;
  top: -10px;
  left: -10px;
  width: calc(100% + 20px);
  height: calc(100% + 20px);
  border: 2px solid var(--color-accent);
  border-radius: var(--border-radius-3);
  z-index: -1;
  opacity: 0.5;
}

.about-image img {
  width: 100%;
  border-radius: var(--border-radius-2);
  box-shadow: var(--box-shadow-light);
  transition: all var(--transition-speed) ease;
}

.about-image img:hover {
  transform: scale(1.03) translateY(-5px);
  box-shadow: var(--box-shadow);
}

.about-text {
  flex: 1;
  overflow: hidden;
  min-width: 0;
}

.about-text p {
  margin: 0;
  text-align: left;
  color: var(--color-light);
  font-size: 1.1em;
  line-height: 1.8;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Media Queries for About Section */
@media (max-width: 992px) {
  .about-container {
    gap: 30px;
  }

  .about-image {
    flex: 0 0 250px;
  }
}

@media (max-width: 768px) {
  .about-container {
    flex-direction: column;
    align-items: center;
    gap: 25px;
  }

  .about-image {
    flex: 0 0 auto;
    width: 60%;
    max-width: 300px;
    margin-bottom: 20px;
  }

  .about-text p {
    text-align: center;
  }
}

@media (max-width: 576px) {
  .about-image {
    width: 80%;
  }
}

/* Media Queries for Responsive Design */

/* Large Screens */
@media (max-width: 1200px) {
  header {
    padding: 20px 50px;
  }

  #text-container {
    top: 220px;
  }

  #text {
    font-size: 8vw;
    animation-duration: 22s;
  }
}

/* Tablets and small laptops */
@media (max-width: 992px) {
  header {
    padding: 15px 40px;
  }

  header .logo {
    font-size: 2rem;
  }

  header .logo .logo-icon {
    height: 35px;
    max-width: 35px;
    margin-right: 10px;
  }

  header .logo .logo-text {
    font-size: 2rem;
  }

  section {
    padding: 50px;
  }

  .sec {
    padding: 70px 50px;
  }

  .sec h2 {
    font-size: 2.8em;
  }
}

/* Tablets and large phones */
@media (max-width: 768px) {
  header {
    padding: 15px 30px;
  }

  header ul li {
    margin-left: 8px;
    margin-right: 3px;
  }

  header ul li a {
    padding: 5px 8px;
    font-size: 0.85rem;
  }

  #text-container {
    top: 200px;
  }

  #text {
    font-size: 10vw;
    animation-duration: 18s;
  }

  #btn {
    font-size: 1.2em;
    padding: 7px 20px;
  }

  .sec {
    padding: 50px 30px;
  }

  .sec h2 {
    font-size: 2.2em;
  }

  .sec p {
    font-size: 1em;
  }

  header .logo .logo-icon {
    height: 30px;
    max-width: 30px;
    margin-right: 8px;
  }

  header .logo .logo-text {
    font-size: 1.7rem;
  }
}

/* Mobile phones */
@media (max-width: 576px) {
  header {
    padding: 10px 20px;
  }

  header .logo {
    font-size: 1.5rem;
  }

  header .logo .logo-icon {
    height: 25px;
    max-width: 25px;
    margin-right: 5px;
  }

  header .logo .logo-text {
    font-size: 1.5rem;
  }

  header ul {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    height: 100vh;
    background: rgba(43, 16, 85, 0.95);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    transition: 0.5s;
    padding-top: 70px;
    padding-left: 20px;
    z-index: 9999;
  }

  header ul.active {
    left: 0;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  }

  header ul li {
    margin: 12px 0;
    width: 100%;
  }

  header ul li a {
    display: block;
    width: calc(100% - 20px);
    font-size: 1rem;
  }

  .mobile-menu-btn {
    display: block;
  }

  section {
    padding: 40px 20px;
    height: calc(100 * var(--vh));
  }

  #text-container {
    top: 150px;
  }

  #text {
    font-size: 12vw;
    animation-duration: 15s;
  }

  #btn {
    font-size: 1em;
    padding: 5px 15px;
  }

  .sec {
    padding: 40px 20px;
  }

  .sec h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
  }

  .sec p {
    font-size: 0.9em;
    line-height: 1.7;
  }

  .resume-actions {
    flex-direction: column;
    gap: 15px;
  }

  .view-btn,
  .download-btn {
    width: 100%;
    padding: 12px 20px;
    font-size: 1em;
  }
}

/* Small mobile phones */
@media (max-width: 375px) {
  #text-container {
    top: 140px;
  }

  #text {
    font-size: 14vw;
    animation-duration: 12s;
  }

  header .logo {
    font-size: 1.2rem;
  }
}

/* Resume Section */
.resume-section {
  position: relative;
  padding: 100px;
  background: #1c0522;
  background-image: url("../images/stars.png");
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.resume-container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3),
    inset 0 0 15px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.resume-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4),
    inset 0 0 15px rgba(255, 255, 255, 0.1);
}

.resume-frame {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  margin-bottom: 30px;
}

.resume-frame iframe {
  border: none;
  display: block;
  background-color: rgba(255, 255, 255, 0.9);
}

.resume-download {
  margin-top: 20px;
  text-align: center;
}

.download-btn {
  display: inline-block;
  background: var(--color-white);
  color: var(--color-primary);
  padding: 15px 30px;
  font-size: 1.2em;
  font-weight: 600;
  border-radius: var(--border-radius-3);
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.download-btn:hover {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.4);
  transform: translateY(-5px);
}

.download-btn i {
  margin-right: 10px;
}

.resume-actions {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  justify-content: center;
  flex-wrap: wrap;
}

.view-btn {
  display: inline-block;
  background: var(--color-white);
  color: var(--color-primary);
  padding: 15px 30px;
  font-size: 1.2em;
  font-weight: 600;
  border-radius: var(--border-radius-3);
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
  border: none;
  cursor: pointer;
}

.view-btn:hover {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.4);
  transform: translateY(-5px);
}

.view-btn i {
  margin-right: 10px;
}

/* Media Queries for Resume Section */
@media (max-width: 992px) {
  .resume-section {
    padding: 70px 50px;
  }

  .resume-section h2 {
    font-size: 2.8em;
  }

  .resume-frame iframe {
    height: 500px;
  }
}

@media (max-width: 768px) {
  .resume-section {
    padding: 50px 30px;
  }

  .resume-section h2 {
    font-size: 2.2em;
  }

  .resume-frame iframe {
    height: 450px;
  }

  .download-btn {
    padding: 12px 25px;
    font-size: 1.1em;
  }
}

@media (max-width: 576px) {
  .resume-section {
    padding: 40px 20px;
  }

  .resume-section h2 {
    font-size: 1.8em;
  }

  .resume-frame iframe {
    height: 400px;
  }

  .download-btn {
    padding: 10px 20px;
    font-size: 1em;
  }
}

/* Projects Section */
.projects-section {
  position: relative;
  padding: 100px;
  background: #1c0522;
  background-image: url("../images/stars.png");
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.projects-section h2 {
  position: relative;
  display: inline-block;
  margin-bottom: 40px;
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.projects-section h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(
    to right,
    transparent,
    var(--color-accent),
    transparent
  );
}

.github-btn {
  position: relative;
  margin: 0 auto 40px auto;
  display: block;
  max-width: 220px;
  background: var(--color-white);
  color: var(--color-primary);
  padding: 12px 25px;
  font-size: 1.1em;
  font-weight: 600;
  border-radius: var(--border-radius-3);
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
  text-align: center;
}

.github-btn:hover {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.4);
  transform: translateY(-5px);
}

.github-btn i {
  margin-right: 10px;
  font-size: 1.2em;
}

.projects-container-wrapper {
  width: 100%;
  max-width: 1200px;
  height: 70vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
  border-radius: var(--border-radius-3);
}

/* Scrollbar styling for projects container */
.projects-container-wrapper::-webkit-scrollbar {
  width: 8px;
}

.projects-container-wrapper::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-3);
}

.projects-container-wrapper::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: 4px;
  transition: background 0.3s ease;
}

.projects-container-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--color-secondary);
}

.projects-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 50px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3),
    inset 0 0 15px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-card {
  background: rgba(255, 255, 255, 0.07);
  border-radius: var(--border-radius-3);
  overflow: hidden;
  display: flex;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: left 0.7s ease;
  pointer-events: none;
  z-index: 1;
}

.project-card:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  border-color: var(--color-accent);
}

.project-card:hover::before {
  left: 100%;
}

.project-image {
  width: 40%;
  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.05);
}

.project-info {
  width: 60%;
  padding: 30px;
  display: flex;
  flex-direction: column;
}

.project-info h3 {
  color: var(--color-white);
  font-size: 1.8em;
  margin-bottom: 15px;
  font-weight: 600;
}

.project-info p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1em;
  line-height: 1.6;
  margin-bottom: 25px;
  flex-grow: 1;
}

.project-info ul {
  list-style-position: inside;
  margin-bottom: 20px;
  padding-left: 10px;
}

.project-info li {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
  line-height: 1.5;
  position: relative;
}

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

.project-link {
  display: inline-block;
  padding: 8px 15px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
  border-radius: var(--border-radius-1);
  text-decoration: none;
  font-size: 0.9em;
  transition: all 0.3s ease;
}

.project-link:hover {
  background: var(--color-white);
  color: var(--color-primary);
}

.project-link i {
  margin-right: 5px;
}

/* Media Queries for Projects Section */
@media (max-width: 992px) {
  .projects-section {
    padding: 70px 50px;
  }

  .projects-section h2 {
    font-size: 2.8em;
    margin-bottom: 40px;
  }

  .github-btn {
    margin-bottom: 30px;
  }

  .projects-container-wrapper {
    height: 65vh;
  }

  .project-card {
    flex-direction: column;
  }

  .project-image,
  .project-info {
    width: 100%;
  }

  .project-image {
    height: 250px;
  }
}

@media (max-width: 768px) {
  .projects-section {
    padding: 50px 30px;
  }

  .projects-section h2 {
    font-size: 2.2em;
    margin-bottom: 30px;
  }

  .github-btn {
    margin-bottom: 30px;
  }

  .projects-container-wrapper {
    height: 60vh;
  }
}

@media (max-width: 576px) {
  .projects-section {
    padding: 40px 20px;
  }

  .projects-section h2 {
    font-size: 1.8em;
  }

  .github-btn {
    width: 100%;
    max-width: 100%;
    text-align: center;
  }

  .projects-container-wrapper {
    height: 55vh;
  }

  .project-info {
    padding: 20px;
  }

  .project-info h3 {
    font-size: 1.5em;
  }

  .project-info p {
    font-size: 0.9em;
  }

  .project-info ul {
    padding-left: 0;
  }

  .project-links {
    flex-direction: column;
    gap: 10px;
  }

  .project-link {
    text-align: center;
  }
}

/* Blogs Section */
.blogs-section {
  position: relative;
  padding: 100px;
  background: #1c0522;
  background-image: url("../images/stars.png");
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.blogs-section h2 {
  position: relative;
  display: inline-block;
  margin-bottom: 40px;
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.blogs-section h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(
    to right,
    transparent,
    var(--color-accent),
    transparent
  );
}

.medium-btn {
  position: relative;
  margin: 0 auto 40px auto;
  display: block;
  max-width: 220px;
  background: var(--color-white);
  color: var(--color-primary);
  padding: 12px 25px;
  font-size: 1.1em;
  font-weight: 600;
  border-radius: var(--border-radius-3);
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
  text-align: center;
}

.medium-btn:hover {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.4);
  transform: translateY(-5px);
}

.medium-btn i {
  margin-right: 10px;
  font-size: 1.2em;
}

.blogs-container-wrapper {
  width: 100%;
  max-width: 1000px;
  height: 70vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
  border-radius: var(--border-radius-3);
}

/* Scrollbar styling for blogs container */
.blogs-container-wrapper::-webkit-scrollbar {
  width: 8px;
}

.blogs-container-wrapper::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-3);
}

.blogs-container-wrapper::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: 4px;
  transition: background 0.3s ease;
}

.blogs-container-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--color-secondary);
}

.blogs-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3),
    inset 0 0 15px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-card {
  background: rgba(255, 255, 255, 0.07);
  border-radius: var(--border-radius-3);
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(8px);
  border-left: 5px solid var(--color-white);
  position: relative;
}

.blog-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: left 0.7s ease;
  pointer-events: none;
}

.blog-card:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  border-left: 5px solid var(--color-accent);
}

.blog-card:hover::before {
  left: 100%;
}

.blog-info {
  padding: 30px;
}

.blog-info h3 {
  color: var(--color-white);
  font-size: 1.6em;
  margin-bottom: 15px;
  font-weight: 600;
}

.blog-info p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1em;
  line-height: 1.6;
  margin-bottom: 25px;
}

.read-more-btn {
  display: inline-block;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
  border-radius: var(--border-radius-2);
  text-decoration: none;
  font-size: 1em;
  transition: all 0.3s ease;
}

.read-more-btn:hover {
  background: var(--color-white);
  color: var(--color-primary);
}

.read-more-btn i {
  margin-right: 8px;
}

/* Media Queries for Blogs Section */
@media (max-width: 992px) {
  .blogs-section {
    padding: 70px 50px;
  }

  .blogs-section h2 {
    font-size: 2.8em;
    margin-bottom: 40px;
  }

  .medium-btn {
    margin-bottom: 30px;
  }

  .blogs-container-wrapper {
    height: 65vh;
  }
}

@media (max-width: 768px) {
  .blogs-section {
    padding: 50px 30px;
  }

  .blogs-section h2 {
    font-size: 2.2em;
    margin-bottom: 30px;
  }

  .medium-btn {
    margin-bottom: 30px;
  }

  .blogs-container-wrapper {
    height: 60vh;
  }

  .blog-info h3 {
    font-size: 1.4em;
  }
}

@media (max-width: 576px) {
  .blogs-section {
    padding: 40px 20px;
  }

  .blogs-section h2 {
    font-size: 1.8em;
  }

  .medium-btn {
    width: 100%;
    max-width: 100%;
    text-align: center;
  }

  .blogs-container-wrapper {
    height: 55vh;
  }

  .blog-info {
    padding: 20px;
  }

  .blog-info h3 {
    font-size: 1.3em;
  }

  .blog-info p {
    font-size: 0.9em;
  }

  .read-more-btn {
    width: 100%;
    text-align: center;
  }
}

/* Contact Section */
.contact-section {
  position: relative;
  padding: 100px;
  background: #1c0522;
  background-image: url("../images/stars.png");
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-section h2 {
  position: relative;
  display: inline-block;
  margin-bottom: 40px;
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.contact-section h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(
    to right,
    transparent,
    var(--color-accent),
    transparent
  );
}

.contact-container {
  width: 100%;
  max-width: 1200px;
  display: flex;
  gap: 50px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3),
    inset 0 0 15px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-form {
  flex: 1;
  background: rgba(255, 255, 255, 0.07);
  padding: 40px;
  border-radius: var(--border-radius-3);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.contact-form::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 50%
  );
  transform: rotate(30deg);
  pointer-events: none;
}

.contact-form:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  border-color: var(--color-accent);
}

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

.form-group label {
  display: block;
  color: var(--color-white);
  margin-bottom: 8px;
  font-size: 1em;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  background: rgba(43, 16, 85, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius-2);
  color: var(--color-white);
  font-size: 1em;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  background: rgba(43, 16, 85, 0.5);
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1), 0 0 0 2px rgba(65, 241, 181, 0.3);
}

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

.submit-btn {
  display: inline-block;
  background: var(--color-white);
  color: var(--color-primary);
  padding: 12px 25px;
  font-size: 1.1em;
  font-weight: 600;
  border-radius: var(--border-radius-3);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.submit-btn:hover {
  background: var(--color-success);
  color: var(--color-white);
  box-shadow: 0 0 25px rgba(65, 241, 181, 0.4);
  transform: translateY(-5px);
}

.submit-btn i {
  margin-right: 8px;
  font-size: 0.9rem;
}

.submit-btn.sent {
  background: var(--color-success);
  color: var(--color-white);
  box-shadow: 0 0 15px rgba(65, 241, 181, 0.4);
}

.submit-btn.error {
  background: var(--color-danger);
  color: var(--color-white);
  box-shadow: 0 0 15px rgba(255, 119, 130, 0.4);
}

.contact-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 40px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: var(--border-radius-3);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.contact-info::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 50%
  );
  transform: rotate(30deg);
  pointer-events: none;
}

.contact-info:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  border-color: var(--color-accent);
}

.contact-info h3 {
  color: var(--color-white);
  font-size: 2em;
  margin-bottom: 20px;
}

.contact-info p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1em;
  line-height: 1.6;
  margin-bottom: 30px;
}

.contact-links {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-link {
  display: flex;
  align-items: center;
  color: var(--color-white);
  text-decoration: none;
  font-size: 1.1em;
  transition: all 0.3s ease;
}

.contact-link:hover {
  color: var(--color-success);
  transform: translateX(10px);
}

.contact-link i {
  margin-right: 15px;
  font-size: 1.5em;
}

/* Media Queries for Contact Section */
@media (max-width: 992px) {
  .contact-section {
    padding: 70px 50px;
  }

  .contact-section h2 {
    font-size: 2.8em;
    margin-bottom: 40px;
  }
}

@media (max-width: 768px) {
  .contact-section {
    padding: 50px 30px;
  }

  .contact-section h2 {
    font-size: 2.2em;
    margin-bottom: 30px;
  }

  .contact-container {
    flex-direction: column-reverse;
  }

  .contact-form,
  .contact-info {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .contact-section {
    padding: 40px 20px;
  }

  .contact-section h2 {
    font-size: 1.8em;
  }

  .contact-form,
  .contact-info {
    padding: 25px 20px;
  }

  .contact-info h3 {
    font-size: 1.5em;
  }

  .contact-info p {
    font-size: 1em;
  }
}

/* FOOTER STYLES */
.footer {
  background: var(--color-dark);
  padding: 60px 0 30px;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    to right,
    var(--color-dark),
    var(--color-accent),
    var(--color-dark)
  );
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
}

.footer-logo-img {
  width: 40px;
  height: 40px;
  margin-right: 15px;
  border-radius: 50%;
}

.footer-logo span {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-white);
}

.footer-social {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--color-white);
  font-size: 1.2rem;
  transition: all var(--transition-speed) ease;
}

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

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

.footer-link {
  color: var(--color-light);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all var(--transition-speed) ease;
}

.footer-link:hover {
  color: var(--color-accent);
}

.footer-bottom {
  text-align: center;
  color: var(--color-light);
  font-size: 0.85rem;
}

.footer-bottom p {
  margin: 10px 0;
}

.footer-bottom i {
  color: var(--color-danger);
}

/* Animation related styles - modified to prevent flash effect */
.animate-element {
  opacity: 1;
  transform: translateY(0);
  transition: none;
}

.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.animated {
  animation: none;
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeInUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.success-message {
  background: rgba(65, 241, 181, 0.15);
  color: var(--color-white);
  padding: 15px 20px;
  border-radius: var(--border-radius-2);
  margin-top: 15px;
  display: flex;
  align-items: center;
  animation: fadeIn 0.1s ease;
}

.success-message i {
  font-size: 1.2rem;
  margin-right: 10px;
  color: var(--color-accent);
}

.fade-out {
  animation: none;
  opacity: 0;
}

@keyframes fadeIn {
  from {
    opacity: 1;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* SOCIAL SIDEBAR */
.social-sidebar {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  z-index: 9998;
}

.social-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 1.2rem;
  text-decoration: none;
  transition: all 0.3s ease;
  transform: translateX(10px);
  opacity: 0.7;
  box-shadow: var(--box-shadow-light);
}

.social-sidebar:hover .social-icon {
  transform: translateX(0);
  opacity: 1;
}

.social-icon:hover {
  transform: translateX(-10px) scale(1.1);
  background: var(--color-white);
  color: var(--color-primary);
  opacity: 1;
}

/* Different colors for different social platforms */
.social-icon:nth-child(1) {
  background: #0077b5; /* LinkedIn */
}
.social-icon:nth-child(2) {
  background: #333; /* GitHub */
}
.social-icon:nth-child(3) {
  background: #20beff; /* Kaggle */
}
.social-icon:nth-child(4) {
  background: #ff5a13; /* LeetCode */
}
.social-icon:nth-child(5) {
  background: #000000; /* X */
}
.social-icon:nth-child(6) {
  background: #e1306c; /* Instagram */
}
.social-icon:nth-child(7) {
  background: #ff0000; /* YouTube */
}

.social-icon:nth-child(1):hover {
  color: #0077b5;
}
.social-icon:nth-child(2):hover {
  color: #333;
}
.social-icon:nth-child(3):hover {
  color: #20beff;
}
.social-icon:nth-child(4):hover {
  color: #ff5a13;
}
.social-icon:nth-child(5):hover {
  color: #000000;
}
.social-icon:nth-child(6):hover {
  color: #e1306c;
}
.social-icon:nth-child(7):hover {
  color: #ff0000;
}

/* CONTACT SOCIAL GRID */
.contact-social-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 20px;
}

.contact-social {
  display: flex;
  align-items: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: var(--border-radius-2);
  color: var(--color-white);
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transform: translateZ(0);
}

.contact-social:hover {
  background: var(--color-white);
  color: var(--color-primary);
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.contact-social::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.contact-social:hover::before {
  transform: translateX(100%);
}

.contact-social i {
  font-size: 1.4em;
  margin-right: 10px;
  min-width: 25px;
  text-align: center;
}

.contact-social span {
  font-size: 0.9em;
}

/* Media queries for social sidebar and contact grid */
@media (max-width: 992px) {
  .social-sidebar {
    top: auto;
    bottom: 15px;
    right: 15px;
    flex-direction: row;
    transform: translateY(0);
    background: rgba(43, 16, 85, 0.7);
    border-radius: 30px;
    padding: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  }

  .social-icon {
    width: 35px;
    height: 35px;
    font-size: 1rem;
    transform: translateX(0);
    opacity: 1;
  }

  .social-icon:hover {
    transform: translateY(-5px);
  }
}

@media (max-width: 576px) {
  .contact-social-grid {
    grid-template-columns: 1fr;
  }
  .social-sidebar {
    width: 100%;
    right: 0;
    bottom: 0;
    justify-content: space-around;
    border-radius: 0;
    padding: 8px 20px;
    z-index: 9990;
  }
}

/* Fixed Background Container */
.fixed-bg-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  z-index: 0; /* Behind content but visible */
  pointer-events: none; /* Allow clicks to pass through */
}

#moon-fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: screen;
  will-change: transform, filter, opacity;
  transform-origin: center;
  z-index: 1;
}

/* Ensure content sections create a proper overlay effect */
.sec::before,
.resume-section::before,
.projects-section::before,
.blogs-section::before,
.contact-section::before {
  content: "";
  position: absolute;
  top: -50px;
  left: 0;
  width: 100%;
  height: 50px;
  background: linear-gradient(to top, #1c0522, transparent);
  z-index: 1;
}

/* Make container sections semi-transparent to reveal moon */
.about-container,
.resume-container,
.projects-container,
.blogs-container,
.contact-container {
  background: rgba(28, 5, 34, 0.85);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

/* Add subtle particles effect to each section */
.sec::after,
.resume-section::after,
.projects-section::after,
.blogs-section::after,
.contact-section::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.15) 1px,
    transparent 1px
  );
  background-size: 30px 30px;
  pointer-events: none;
  z-index: -1;
}

/* Enhanced buttons */
.submit-btn,
.view-btn,
.download-btn,
.github-btn,
.medium-btn,
.read-more-btn,
.project-link {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.submit-btn::after,
.view-btn::after,
.download-btn::after,
.github-btn::after,
.medium-btn::after,
.read-more-btn::after,
.project-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, var(--color-accent), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.submit-btn:hover::after,
.view-btn:hover::after,
.download-btn:hover::after,
.github-btn:hover::after,
.medium-btn:hover::after,
.read-more-btn:hover::after,
.project-link:hover::after {
  opacity: 0.15;
}

/* Pulsing button effect */
@keyframes buttonPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(65, 241, 181, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(65, 241, 181, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(65, 241, 181, 0);
  }
}

.submit-btn:after,
.view-btn:after,
.download-btn:after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  background-image: radial-gradient(
    circle,
    var(--color-accent) 10%,
    transparent 10.01%
  );
  background-repeat: no-repeat;
  background-position: 50%;
  transform: scale(10, 10);
  opacity: 0;
  transition: transform 0.5s, opacity 1s;
}

.submit-btn:active:after,
.view-btn:active:after,
.download-btn:active:after {
  transform: scale(0, 0);
  opacity: 0.3;
  transition: 0s;
}

.tech-stack {
  margin-top: 30px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-2);
  padding: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.tech-stack:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(65, 241, 181, 0.25);
  border-color: var(--color-accent);
}

.tech-stack h3 {
  color: var(--color-white);
  font-size: 1.8em;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
  padding-bottom: 8px;
}

.tech-stack h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    to right,
    transparent,
    var(--color-accent),
    transparent
  );
}

/* Skills Carousel Styles */
.skills-carousel {
  width: 100%;
  overflow: hidden;
  margin-top: 20px;
  padding: 20px 0;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--border-radius-2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  position: relative;
  min-height: 120px;
}

.skills-carousel:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.skills-track {
  display: flex;
  gap: 20px;
  animation: scroll-left 50s linear infinite;
  width: fit-content;
  padding: 0 20px;
}

.skill-group {
  display: flex;
  align-items: center;
  gap: 15px;
  white-space: nowrap;
  flex-shrink: 0;
}

.skill-item-carousel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.skill-item-carousel i {
  font-size: 2em;
  color: var(--color-accent);
  transition: all 0.3s ease;
}

.skill-item-carousel:hover i {
  transform: scale(1.15) rotate(10deg);
  text-shadow: 0 0 10px rgba(65, 241, 181, 0.5);
}

.skill-tag {
  background: linear-gradient(135deg, rgba(65, 241, 181, 0.2), rgba(117, 151, 222, 0.2));
  color: var(--color-accent);
  padding: 6px 12px;
  border-radius: var(--border-radius-1);
  font-size: 0.85em;
  font-weight: 500;
  border: 1px solid rgba(65, 241, 181, 0.3);
  transition: all 0.3s ease;
  cursor: default;
}

.skill-tag:hover {
  background: linear-gradient(135deg, rgba(65, 241, 181, 0.4), rgba(117, 151, 222, 0.4));
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(65, 241, 181, 0.2);
  border-color: var(--color-accent);
}

.skill-separator {
  color: rgba(255, 255, 255, 0.3);
  font-size: 1.2em;
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Pause animation on hover and show grid */
.skills-carousel:hover .skills-track {
  animation-play-state: paused;
}

/* Hide track and show grid only on tech-stack hover */
.tech-stack:hover .skills-track {
  display: none;
}

.tech-stack:hover .skills-grid-container.hidden {
  display: grid !important;
  animation: fadeIn 0.3s ease-in-out;
}

/* Enhance entire tech-stack on carousel/grid hover */
.tech-stack:hover {
  background: rgba(65, 241, 181, 0.08);
  border-color: var(--color-accent);
  box-shadow: 0 12px 35px rgba(65, 241, 181, 0.25);
}

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

.hidden {
  display: none !important;
}

/* Skills Grid Container */
.skills-grid-container {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  padding: 20px;
  max-height: 400px;
  overflow-y: auto;
}

.skills-grid-container.visible {
  display: grid !important;
}

.skills-category {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(65, 241, 181, 0.2);
  border-radius: var(--border-radius-2);
  padding: 20px;
  transition: all 0.3s ease;
}

.skills-category:hover {
  background: rgba(65, 241, 181, 0.12);
  border-color: var(--color-accent);
  box-shadow: 0 5px 15px rgba(65, 241, 181, 0.15);
}

.skills-category h4 {
  color: var(--color-accent);
  font-size: 1.1em;
  margin-bottom: 15px;
  font-weight: 600;
  border-bottom: 2px solid rgba(65, 241, 181, 0.3);
  padding-bottom: 10px;
}

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

.skill-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-1);
  transition: all 0.3s ease;
  cursor: default;
}

.skill-card:hover {
  background: rgba(65, 241, 181, 0.15);
  border-color: var(--color-accent);
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 8px 20px rgba(65, 241, 181, 0.2);
}

.skill-card i {
  font-size: 2em;
  color: var(--color-accent);
  transition: all 0.3s ease;
}

.skill-card:hover i {
  transform: scale(1.2) rotate(10deg);
  text-shadow: 0 0 15px rgba(65, 241, 181, 0.5);
}

.skill-card span {
  font-size: 0.85em;
  color: var(--color-light);
  text-align: center;
  font-weight: 500;
}

/* Scrollbar for grid */
.skills-grid-container::-webkit-scrollbar {
  width: 6px;
}

.skills-grid-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-1);
}

.skills-grid-container::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: 3px;
}

.skills-grid-container::-webkit-scrollbar-thumb:hover {
  background: var(--color-secondary);
}

/* Responsive grid */
@media (max-width: 768px) {
  .skills-grid-container {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    max-height: 500px;
  }
  
  .skill-item-carousel {
    gap: 4px;
  }
  
  .skill-item-carousel i {
    font-size: 1.5em;
  }
  
  .skill-tag {
    font-size: 0.75em;
    padding: 4px 8px;
  }
}

.tech-category {
  margin-bottom: 25px;
}

.tech-category h4 {
  color: var(--color-white);
  font-size: 1.2em;
  margin-bottom: 15px;
  font-weight: 500;
}

.tech-category h4 i {
  color: var(--color-accent);
  margin-right: 8px;
}

.tech-items {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  padding: 12px;
  border-radius: var(--border-radius-1);
  min-width: 75px;
  transition: all 0.3s ease;
}

.tech-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.tech-item i {
  font-size: 1.8em;
  margin-bottom: 8px;
  color: var(--color-white);
}

.tech-item span {
  font-size: 0.85em;
  color: var(--color-light);
}

/* Custom colors for specific icons */
.tech-item .fa-file-excel {
  color: #1d6f42; /* Excel green */
}

.tech-item .fa-chart-pie {
  color: #f2c811; /* Power BI gold */
}

.tech-item .fa-chart-area {
  color: #e97627; /* Tableau orange */
}

.tech-item .fa-chart-line {
  color: #11557c; /* Matplotlib blue */
}

.tech-item .fa-chart-bar {
  color: #4eabd1; /* Seaborn blue */
}

.tech-item .fa-brain {
  color: #f89939; /* Scikit-learn orange */
}

/* Media queries for tech stack */
@media (max-width: 768px) {
  .tech-stack {
    padding: 20px;
  }

  .tech-stack h3 {
    font-size: 1.6em;
    margin-bottom: 15px;
  }

  .tech-category h4 {
    font-size: 1.1em;
  }

  .tech-items {
    gap: 10px;
  }

  .tech-item {
    padding: 12px;
    min-width: 70px;
  }

  .tech-item i {
    font-size: 1.5em;
  }
}

@media (max-width: 576px) {
  .tech-stack {
    padding: 15px;
  }

  .tech-stack h3 {
    font-size: 1.4em;
  }

  .tech-items {
    justify-content: center;
  }

  .tech-item {
    min-width: 65px;
    padding: 10px;
  }

  .tech-item i {
    font-size: 1.3em;
  }

  .tech-item span {
    font-size: 0.8em;
  }
}
