/* Root Variables */
:root {
  --primary-color: #e91e63; /* Pinkish red */
  --primary-color-light: #f48fb1; /* Lighter shade of primary color */
  --secondary-color: #ffffff; /* White */
  --background-color: #181818; /* Dark background */
  --card-background: #1e1e1e; /* Slightly lighter dark */
  --text-color: #bbbbbb; /* Light gray */
  --text-highlight: #ffffff; /* Highlighted text color */
  --font-family: "Arial", sans-serif;
  --transition-speed: 0.3s;
}

/* Basic Reset and Global Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: all var(--transition-speed) ease;
}

body {
  margin: 0;
  font-family: var(--font-family);
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--background-color);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color-light);
}

/* Header Styles */
header {
  background-color: var(--background-color);
  color: var(--secondary-color);
  text-align: center;
  padding: 2rem 0 1rem;
  position: relative;
}

header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  color: var(--text-highlight);
  animation: fadeIn 1s ease-in-out;
}

header p {
  margin: 0.5rem 0 1rem;
  font-size: clamp(1rem, 3vw, 1.2rem);
  animation: fadeIn 1.2s ease-in-out;
}

/* Navigation and Social Links */
.parallel-navbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--background-color);
  padding: 0.5rem 1rem;
  width: 100%;
}

/* Social Media Navbar */
.social-navbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
  width: 100%;
  animation: fadeIn 1.4s ease-in-out;
}

.social-navbar a {
  color: var(--secondary-color);
  text-decoration: none;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: bold;
  padding: 0.5rem;
  border-radius: 4px;
}

.social-navbar a:hover {
  color: var(--primary-color);
  transform: translateY(-3px);
  background-color: rgba(255, 255, 255, 0.05);
}

.social-navbar a svg {
  fill: var(--secondary-color);
  width: 20px;
  height: 20px;
  transition: fill var(--transition-speed);
}

.social-navbar a:hover svg {
  fill: var(--primary-color);
}

/* Main Navigation */
nav {
  background-color: var(--card-background);
  padding: 0.8rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border: 2px solid var(--primary-color);
  border-radius: 5px;
  width: 95%;
  max-width: 1200px;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  animation: slideInFromTop 0.8s ease-in-out;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

nav ul li {
  display: inline;
}

nav ul li a {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  padding: 0.5rem 0.8rem;
  border-radius: 4px;
  position: relative;
}

nav ul li a:hover {
  color: var(--primary-color);
}

nav ul li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--primary-color);
  visibility: hidden;
  transition: all 0.3s ease;
}

nav ul li a:hover::after {
  visibility: visible;
  width: 100%;
}

.active {
  color: var(--primary-color) !important;
}

/* Main Content */
.container {
  max-width: 1200px;
  width: 95%;
  margin: 2rem auto;
  padding: 0.5rem;
}

section {
  margin-bottom: 3rem;
  position: relative;
  animation: fadeInUp 1s ease-in-out;
}

h2 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  border-bottom: 2px solid var(--primary-color);
  display: inline-block;
  padding-bottom: 0.3rem;
}

/* Card Grid Layout */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--card-background);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background-color: var(--primary-color);
  transition: height 0.4s ease;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2);
}

.card:hover::before {
  height: 100%;
}

.card h3 {
  margin-top: 0;
  color: var(--secondary-color);
  font-size: 1.3rem;
}

.card p {
  margin: 0.5rem 0;
}

.card a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  margin-top: auto;
  display: inline-block;
  padding: 0.3rem 0;
  position: relative;
}

.card a:hover {
  color: var(--primary-color-light);
}

.card a::after {
  content: '→';
  opacity: 0;
  margin-left: 0;
  transition: all 0.3s ease;
}

.card a:hover::after {
  opacity: 1;
  margin-left: 8px;
}

/* About Me Section */
.about-me {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.profile-image {
  flex-shrink: 0;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--primary-color);
  position: relative;
  box-shadow: 0 6px 15px rgba(233, 30, 99, 0.3);
  animation: pulse 3s infinite;
}

.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.profile-image:hover img {
  transform: scale(1.05);
}

/* Lists and Typography */
ul {
  padding-left: 1.5rem;
}

ul li {
  margin: 0.5rem 0;
  position: relative;
}

#skills ul li {
  list-style: none;
  padding-left: 1.5rem;
}

#skills ul li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--primary-color);
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--background-color);
  color: var(--text-color);
  position: relative;
}

footer section {
  margin-bottom: 2rem;
}

footer a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: var(--primary-color-light);
  text-decoration: underline;
}

hr {
  border: none;
  height: 1px;
  background-color: var(--primary-color);
  opacity: 0.4;
  margin: 2rem auto;
  width: 80%;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 99;
  display: none;
  width: 45px;
  height: 45px;
  text-align: center;
  line-height: 45px;
  background: var(--primary-color);
  color: var(--secondary-color);
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.back-to-top:hover {
  background: var(--primary-color-light);
  transform: translateY(-5px);
}

.back-to-top.show {
  display: block;
  animation: fadeIn 0.3s;
}

/* Loading Animation */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--background-color);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 5px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Certifications Section */
#certifications .card ul {
  padding-left: 0;
}

#certifications .card ul li {
  list-style: none;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#certifications .card ul li:last-child {
  border-bottom: none;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromTop {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(233, 30, 99, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(233, 30, 99, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(233, 30, 99, 0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Mobile Responsiveness */
@media (max-width: 968px) {
  .container {
    padding: 0 1rem;
  }
  
  nav {
    width: 90%;
  }
  
  nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  header h1 {
    font-size: 1.8rem;
  }

  header p {
    font-size: 1rem;
  }

  nav {
    padding: 0.5rem 0;
  }

  nav ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  nav ul li {
    margin: 0.3rem;
  }

  nav ul li a {
    font-size: 0.9rem;
    padding: 0.4rem 0.6rem;
  }

  .about-me {
    flex-direction: column;
    text-align: center;
  }

  .profile-image {
    margin: 0 auto 1.5rem;
    width: 150px;
    height: 150px;
  }
  
  .social-navbar {
    gap: 0.5rem;
  }
  
  .social-navbar a {
    font-size: 0.8rem;
    padding: 0.3rem;
  }
}

@media (max-width: 480px) {
  .grid {
    grid-template-columns: 1fr;
  }
  
  .social-navbar {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .social-navbar a {
    margin: 0.2rem;
  }
  
  .back-to-top {
    right: 15px;
    bottom: 15px;
    width: 40px;
    height: 40px;
    line-height: 40px;
  }
  
  section {
    margin-bottom: 2rem;
  }
}

/* Reveal Animations for Sections */
.reveal {
  position: relative;
  opacity: 0;
  transform: translateY(30px);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.5s ease;
}

/* Skill Bars Animation */
.skill-bar {
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: var(--primary-color);
  border-radius: 5px;
  width: 0;
  transition: width 1.5s ease-in-out;
}

/* Theme Toggle */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card-background);
  border: 2px solid var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: var(--primary-color);
}
