/* CSS Custom Properties */
:root {
  /* Colors */
  --primary-red: #c62828;
  --primary-red-hover: #d32f2f;
  --text-primary: #e5e5e5;
  --text-secondary: #f2efe6;
  --bg-primary: #0a0a0a;
  --bg-secondary: #0f0f0f;
  --bg-card: #1a1a1a;
  --bg-card-secondary: #1f1f1f;
  --border-primary: rgba(197, 40, 40, 0.1);
  --border-hover: rgba(197, 40, 40, 0.2);

  /* Gradients */
  --gradient-primary: radial-gradient(circle at 25% 25%, rgba(197, 40, 40, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(242, 239, 230, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(197, 40, 40, 0.03) 0%, transparent 70%),
    linear-gradient(
      135deg,
      var(--bg-primary) 0%,
      var(--bg-secondary) 25%,
      var(--bg-primary) 50%,
      var(--bg-secondary) 75%,
      var(--bg-primary) 100%
    );

  --gradient-section: radial-gradient(circle at 30% 30%, rgba(197, 40, 40, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(242, 239, 230, 0.05) 0%, transparent 50%),
    linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-secondary) 50%, var(--bg-card) 100%);

  /* Spacing */
  --section-padding: 80px 0;
  --container-padding: 0 20px;
  --border-radius: 20px;
  --border-radius-small: 15px;
  --border-radius-button: 50px;

  /* Shadows */
  --shadow-primary: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.6);
  --shadow-button: 0 4px 15px rgba(197, 40, 40, 0.3);
  --shadow-button-hover: 0 6px 20px rgba(197, 40, 40, 0.5);

  /* Transitions */
  --transition-primary: all 0.3s ease;
  --transition-fast: all 0.2s ease;
  --transition-slow: all 0.5s ease;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--gradient-primary);
  background-size: 400% 400%, 300% 300%, 200% 200%, 100% 100%;
  animation: gradientShift 20s ease infinite;
  min-height: 100vh;
  position: relative;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--container-padding);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

h1 {
  font-size: 3.5rem;
}
h2 {
  font-size: 2.5rem;
}
h3 {
  font-size: 1.8rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

/* Common Section Styles */
.section {
  padding: var(--section-padding);
  background: var(--gradient-section);
  margin: 20px 0;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-primary);
  border: 1px solid var(--border-primary);
  position: relative;
  overflow: hidden;
  transition: var(--transition-primary);
  animation: fadeInUp 0.8s ease-out;
}

.section:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-hover);
}

.section:nth-child(odd) {
  animation: slideInFromLeft 0.8s ease-out;
}
.section:nth-child(even) {
  animation: slideInFromRight 0.8s ease-out;
}

.section-title {
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 50px;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--primary-red);
  border-radius: 2px;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-primary);
  background: radial-gradient(circle at 20% 80%, rgba(197, 40, 40, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(242, 239, 230, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(197, 40, 40, 0.08) 0%, transparent 50%),
    linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-card) 50%, var(--bg-secondary) 100%);
  background-size: 400% 400%, 300% 300%, 200% 200%, 100% 100%;
  animation: gradientShift 15s ease infinite;
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  margin: 20px 0;
  box-shadow: var(--shadow-primary);
  border: 1px solid var(--border-primary);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(197, 40, 40, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(242, 239, 230, 0.05) 0%, transparent 50%),
    linear-gradient(45deg, transparent 30%, rgba(197, 40, 40, 0.03) 50%, transparent 70%);
  animation: float 6s ease-in-out infinite;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.profile-image {
  margin-bottom: 30px;
}

.logo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-red);
  box-shadow: 0 0 30px rgba(197, 40, 40, 0.3);
  transition: var(--transition-primary);
}

.logo:hover {
  transform: scale(1.05);
  box-shadow: 0 0 35px rgba(197, 40, 40, 0.4);
  border-color: var(--primary-red-hover);
}

.name {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  color: var(--text-primary);
}

.title {
  font-size: 1.5rem;
  margin-bottom: 20px;
  opacity: 0.9;
  font-weight: 300;
  color: var(--text-secondary);
}

.description {
  font-size: 1.2rem;
  margin: 20px auto 40px;
  padding: 0 30px;
  opacity: 0.8;
  max-width: 600px;
  color: var(--text-primary);
  line-height: 1.6;
}

/* Button Styles - Preserving All Animations */
.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 15px 30px;
  border-radius: var(--border-radius-button);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-primary);
  display: inline-block;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--primary-red);
  color: var(--text-primary);
  box-shadow: var(--shadow-button);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: var(--shadow-button-hover);
  background: var(--primary-red-hover);
  animation: glow 1s ease-in-out infinite;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--primary-red);
}

.btn-secondary:hover {
  background: var(--primary-red);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* Skills Section */
.skills-rotator {
  max-width: 600px;
  margin: 0 auto 50px;
  position: relative;
  height: 120px;
  overflow: hidden;
}

.skills-carousel {
  position: relative;
  height: 100%;
  overflow: hidden;
}

.skills-slide {
  position: absolute;
  inset: 0 0 auto 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-around;
  align-items: center;
  opacity: 0;
  transform: translateX(100%);
  transition: var(--transition-slow);
}

.skills-slide.active {
  opacity: 1;
  transform: translateX(0);
}

.skills-slide.prev {
  transform: translateX(-100%);
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px;
  background: rgba(26, 26, 26, 0.8);
  border-radius: var(--border-radius-small);
  border: 1px solid var(--border-hover);
  min-width: 120px;
  transition: var(--transition-slow);
  animation: fadeInUp 0.6s ease-out;
  animation-delay: calc(var(--animation-order) * 0.1s);
}

.skill-item:hover {
  border-color: var(--primary-red);
}

.skill-icon {
  font-size: 2.5rem;
  margin-bottom: 5px;
  color: var(--text-primary);
  transition: var(--transition-slow);
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.skill-item:hover .skill-icon {
  color: var(--primary-red);
  filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%)
    contrast(97%);
}

.skill-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  transition: var(--transition-slow);
}

.skill-item:hover .skill-name {
  color: var(--primary-red);
}

.skills-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(197, 40, 40, 0.3);
  cursor: pointer;
  transition: var(--transition-primary);
}

.dot.active {
  background: var(--primary-red);
  transform: scale(1.2);
  animation: pulse 2s ease-in-out infinite;
}

/* Contact Section */
.contact-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 50px;
  align-items: start;
  padding: 0 30px;
}

.contact-info h3 {
  color: var(--text-primary);
  margin-bottom: 20px;
  font-size: 1.8rem;
}

.contact-info p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 30px;
  color: var(--text-primary);
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: rgba(26, 26, 26, 0.8);
  border-radius: var(--border-radius-small);
  border: 1px solid var(--border-hover);
  transition: var(--transition-primary);
  animation: fadeInUp 0.6s ease-out;
  animation-delay: calc(var(--animation-order) * 0.2s);
  cursor: pointer;
}

.contact-method span {
  cursor: pointer;
  transition: var(--transition-primary);
}

.contact-method:hover span {
  color: var(--primary-red);
  text-shadow: 0 0 10px rgba(197, 40, 40, 0.3);
}

.contact-method span::after {
  content: " (Click to copy)";
  font-size: 0.8em;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: var(--primary-red);
}

.contact-method:hover span::after {
  opacity: 1;
}

.contact-method:hover {
  border-color: var(--primary-red);
  background: rgba(26, 26, 26, 0.9);
}

.contact-icon {
  font-size: 1.2rem;
  color: var(--primary-red);
  width: 20px;
  text-align: center;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  background: rgba(26, 26, 26, 0.5);
  border-radius: var(--border-radius-small);
  border: 1px solid var(--border-hover);
}

.social-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  background: linear-gradient(135deg, var(--primary-red), rgba(197, 40, 40, 0.8));
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
  transition: var(--transition-fast);
}

.social-link:hover {
  transform: translateY(-2px) scale(1.05);
  background: linear-gradient(135deg, var(--primary-red-hover), var(--primary-red));
  animation: glow 1.5s ease-in-out infinite;
}

.social-link i {
  font-size: 1.1rem;
}

/* Footer */
.footer {
  text-align: center;
  padding: 40px 0;
  color: var(--text-primary);
  background: radial-gradient(circle at 50% 50%, rgba(197, 40, 40, 0.05) 0%, transparent 70%), rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  margin: 20px 0;
  border: 1px solid var(--border-primary);
  animation: fadeInUp 1s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }
  .name {
    font-size: 2.5rem;
  }
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  .contact-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .section {
    padding: 60px 0;
    margin: 15px 0;
  }
  .skills-slide {
    justify-content: space-around;
    gap: 10px;
    padding: 0 10px;
  }
  .skill-item {
    min-width: 80px;
    max-width: 90px;
    padding: 15px 10px;
  }
  .skill-icon {
    font-size: 1.8rem;
    width: 1.8rem;
    height: 1.8rem;
  }
  .skill-name {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .name {
    font-size: 2rem;
  }
  .title {
    font-size: 1.2rem;
  }
  .description {
    font-size: 1rem;
  }
  .section-title {
    font-size: 2rem;
  }
  .skills-slide {
    gap: 8px;
    padding: 0 5px;
  }
  .skill-item {
    min-width: 70px;
    max-width: 80px;
    padding: 12px 8px;
  }
  .skill-icon {
    font-size: 1.5rem;
    width: 1.5rem;
    height: 1.5rem;
  }
  .skill-name {
    font-size: 0.7rem;
  }
}

/* Animations - All Preserved */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

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

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

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(197, 40, 40, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(197, 40, 40, 0.6);
  }
}
