/* Base Styles and Variables */
:root {
  --primary-color: #ff3e3e;
  --primary-dark: #cc0000;
  --secondary-color: #333;
  --dark-bg: #121212;
  --darker-bg: #0a0a0a;
  --light-text: #f4f4f4;
  --gray-text: #aaa;
  --transition: all 0.3s ease;
  --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--light-text);
  background-color: var(--dark-bg);
  overflow-x: hidden;
}

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

section {
  padding: 100px 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.2;
}

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

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

.section-title::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--primary-color);
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  outline: none;
}

.btn.primary {
  background-color: var(--primary-color);
  color: var(--light-text);
}

.btn.primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: var(--box-shadow);
}

.btn.secondary {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--light-text);
}

.btn.secondary:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: var(--box-shadow);
}

/* Header and Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(10px);
  transition: var(--transition);
  padding: 20px 0;
}

header.scrolled {
  padding: 15px 0;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

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

.logo {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  cursor: pointer;
}

.nav-links {
  display: flex;
  gap: 30px;
}

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

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

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

.hamburger {
  display: none;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--light-text);
  margin: 5px 0;
  transition: var(--transition);
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background-color: var(--darker-bg);
  position: relative;
  overflow: hidden;
}

.particles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-content {
  z-index: 1;
  position: relative;
}

.profile-image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 30px;
  border: 5px solid var(--primary-color);
  animation: pulse 2s infinite;
}

.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero h1 {
  font-size: 4.5rem;
  margin-bottom: 20px;
  letter-spacing: 2px;
}

.hero h1 span {
  color: var(--primary-color);
}

.subtitle {
  font-size: 1.5rem;
  margin-bottom: 40px;
  color: var(--gray-text);
}

.cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.scroll-indicator {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0.7;
}

.mouse {
  width: 30px;
  height: 50px;
  border: 2px solid var(--light-text);
  border-radius: 20px;
  position: relative;
}

.mouse::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background-color: var(--light-text);
  border-radius: 50%;
  animation: scrollDown 2s infinite;
}

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

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

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

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

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

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

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-30px);
  }
  60% {
    transform: translateY(-15px);
  }
}

.animate-text {
  animation: fadeIn 1.5s ease-out;
}

.animate-fade-in {
  opacity: 0;
  animation: fadeIn 1s ease-out forwards;
}

.animate-slide-left {
  opacity: 0;
  animation: slideInLeft 1s ease-out forwards;
}

.animate-slide-right {
  opacity: 0;
  animation: slideInRight 1s ease-out forwards;
}

.animate-slide-up {
  opacity: 0;
  animation: slideInUp 1s ease-out forwards;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

.animate-rotate {
  animation: rotate 10s linear infinite;
}

.animate-bounce {
  animation: bounce 2s infinite;
}

.delay-200 {
  animation-delay: 0.2s;
}
.delay-400 {
  animation-delay: 0.4s;
}
.delay-600 {
  animation-delay: 0.6s;
}
.delay-800 {
  animation-delay: 0.8s;
}
.delay-1000 {
  animation-delay: 1s;
}

/* About Section */
.about {
  background-color: var(--dark-bg);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.about-text p {
  margin-bottom: 20px;
  color: var(--gray-text);
  font-size: 1.1rem;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.stat h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.progress {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 10px;
  transition: width 1.5s ease-in-out;
}

/* Skills Section */
.skills {
  background-color: var(--darker-bg);
}

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

.skill-card {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transform: translateY(50px);
  opacity: 0;
}

.skill-card.animate {
  animation: slideInUp 0.8s forwards;
}

.skill-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  display: inline-block;
}

.skill-card:hover .skill-icon {
  animation: bounce 2s infinite;
}

/* Portfolio Section */
.portfolio {
  background-color: var(--dark-bg);
}

.portfolio-filter {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 20px;
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--light-text);
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.portfolio-item {
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  transition: var(--transition);
  box-shadow: var(--box-shadow);
  opacity: 0;
  transform: translateY(30px);
}

.portfolio-item.animate {
  animation: fadeIn 0.8s forwards;
}

.portfolio-img {
  position: relative;
  overflow: hidden;
}

.portfolio-img::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 62, 62, 0.2);
  opacity: 0;
  transition: var(--transition);
  z-index: 1;
}

.portfolio-img img {
  transition: var(--transition);
}

.portfolio-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  transform: translateY(100%);
  transition: var(--transition);
  z-index: 2;
}

.portfolio-item:hover .portfolio-info {
  transform: translateY(0);
}

.portfolio-item:hover .portfolio-img::before {
  opacity: 1;
}

.portfolio-item:hover .portfolio-img img {
  transform: scale(1.1);
}

.portfolio-info h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.portfolio-info p {
  color: var(--gray-text);
  margin-bottom: 15px;
}

.portfolio-link {
  color: var(--primary-color);
  font-weight: 600;
}

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

/* Contact Section */
.contact {
  background-color: var(--darker-bg);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 50px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

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

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

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

.social-link {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

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

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  position: relative;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  color: var(--light-text);
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-color);
  outline: none;
}

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

/* Footer */
footer {
  background-color: var(--darker-bg);
  padding: 30px 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Experience/Timeline Section */
.experience {
  background-color: var(--dark-bg);
  position: relative;
  overflow: hidden;
}

.timeline {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: var(--primary-color);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 60px;
  width: 100%;
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-left: auto;
  margin-right: 50px;
  text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-left: 50px;
  margin-right: auto;
}

.timeline-dot {
  position: absolute;
  top: 20px;
  left: 50%;
  width: 20px;
  height: 20px;
  background: var(--primary-color);
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.timeline-content {
  position: relative;
  width: calc(50% - 50px);
  padding: 30px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.timeline-content:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
}

.timeline-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 15px;
  border: 3px solid var(--primary-color);
}

.timeline-item:nth-child(odd) .timeline-img {
  margin-left: auto;
}

.timeline-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.timeline-content h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: var(--light-text);
}

.timeline-content .date {
  display: inline-block;
  padding: 5px 15px;
  background-color: var(--primary-color);
  color: var(--light-text);
  border-radius: 20px;
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.timeline-content p {
  color: var(--gray-text);
}

/* Responsive Design */
@media (max-width: 992px) {
  .timeline::before {
    left: 30px;
  }

  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    width: calc(100% - 80px);
    margin-left: 80px;
    margin-right: 0;
    text-align: left;
  }

  .timeline-dot {
    left: 30px;
  }

  .timeline-item:nth-child(odd) .timeline-img {
    margin-left: 0;
  }

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

  .hero h1 {
    font-size: 3.5rem;
  }

  .portfolio-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background-color: var(--darker-bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
  }

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

  .hamburger {
    display: block;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }

  .hero h1 {
    font-size: 3rem;
  }

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

  .cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
}

@media (max-width: 576px) {
  section {
    padding: 70px 0;
  }

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

  .subtitle {
    font-size: 1.2rem;
  }

  .portfolio-filter {
    gap: 10px;
  }

  .filter-btn {
    padding: 6px 15px;
    font-size: 0.9rem;
  }
}

