* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-bg: #000000;
  --secondary-bg: #ffffff;
  --accent-primary: #ff0000;
  --accent-hover: #cc0000;
  --text-primary: #ffffff;
  --text-secondary: #e0e0e0;
  --text-dark: #333333;
  --border-color: #333333;
  --card-bg: #1a1a1a;
  --gradient-start: #ff0000;
  --gradient-end: #cc0000;
}

html {
  scroll-behavior: smooth;
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--primary-bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

/* Added width constraints to prevent horizontal scroll */

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  padding: 15px 20px;
  border-bottom: 2px solid var(--accent-primary);
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(255, 0, 0, 0.1);
  overflow-x: hidden;
}

/* Changed width to 100% and added left/right instead of just width */

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 10px;
  width: 100%;
}

/* Added width 100% to ensure proper centering */

.logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.logo-icon {
  font-size: 18px;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 25px;
}

nav a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: color 0.3s ease;
  white-space: nowrap;
}

nav a:hover,
nav a.active {
  color: var(--accent-primary);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  z-index: 1001;
}

.mobile-menu-toggle span {
  width: 22px;
  height: 3px;
  background: var(--accent-primary);
  transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

nav.active {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.99);
  display: flex !important;
  flex-direction: column;
  z-index: 999;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
}

/* Changed from absolute to fixed, added width 100%, and proper overflow handling */

nav.active ul {
  flex-direction: column;
  gap: 0;
  width: 100%;
}

nav.active a {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-color);
  display: block;
  width: 100%;
}

/* Hero Section */
.hero {
  margin-top: 70px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: var(--primary-bg);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 50%, rgba(255, 0, 0, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 30px;
  align-items: center;
  max-width: 1400px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.hero-left,
.hero-right {
  display: flex;
  justify-content: center;
}

/* <CHANGE> Hero section mobile ordering - right photo first, then title, then video */
@media (max-width: 768px) {
  .hero-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .hero-left {
    order: 2;
  }

  .hero-center {
    order: 1;
  }

  .hero-right {
    order: 3;
  }
}

@media (max-width: 480px) {
  .hero-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }

  .hero-left {
    order: 2;
  }

  .hero-center {
    order: 1;
  }

  .hero-right {
    order: 3;
  }
}

.hero-image-box {
  position: relative;
  width: 100%;
  max-width: 400px;
  border-radius: 23px;
  overflow: hidden;
  box-shadow: 0 11px 42px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.hero-image-box img {
  width: 100%;
  height: auto;
  display: block;
}


.play-button-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hero-image-box:hover .play-button-overlay {
  opacity: 1;
}

.play-icon {
  width: 60px;
  height: 60px;
  background: var(--accent-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
}

.hero-center {
  text-align: center;
}

.hero-title {
  font-size: 50px;
  font-weight: 800;
  margin-bottom: 15px;
  line-height: 1.1;
}

.gradient-text {
  color: var(--accent-primary);
}

.hero-subtitle {
  font-size: 22px;
  color: var(--accent-primary);
  font-weight: 600;
  margin-bottom: 12px;
}

.hero-description {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 35px;
}

.hero-cta {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--accent-primary);
  border: 2px solid var(--accent-primary);
}

.btn-secondary:hover {
  background: var(--accent-primary);
  color: white;
}

.hero-video {
  width: 80%;
  height: 90%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

/* .hero-image-box {
  position: relative;
  overflow: hidden;
} */

.hero-image-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* .hero-image-box img {
  display: none;
} */

/* About Section */
.about {
  padding: 80px 20px;
  background: var(--secondary-bg);
}

/* <CHANGE> Added styling for the name heading to be visible and beautiful */
.about-name {
  font-size: 30px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 5px;
  line-height: 1.2;
  background: black;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* <CHANGE> Added styling for the intro paragraph - red and bold */
.about-intro {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-primary);
  line-height: 1.8;
  margin: 0;
}

.section-title {
  font-size: 42px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 50px;
  color: rgb(2, 2, 2);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.about-text p {
  font-size: 15px;
  color: var(--text-dark);
  margin-bottom: 15px;
  line-height: 1.8;
}

.about-image {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
}

.about-image img {
  width: 100%;
  height: auto;
  display: block;
}

.about-cta {
  margin-top: 25px;
}

/* Skills Section */
.skills {
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
  color: white;
  padding: 80px 20px;
  position: relative;
}

.skills-content {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.skills-heading {
  font-size: 24px;
  font-weight: 1000;
  margin-bottom: 25px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.skills-list {
  list-style: none;
  font-size: 15px;
  font-style: initial;
  line-height: 2.2;
  font-weight: 600;
}

.tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  margin: left-right;
  gap: 10px;
}

.tool-box {
  background: rgb(59, 2, 77);
  padding: 12px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 14px;
  transition: all 0.3s ease;
  text-align: center;
  margin-right: 90px;
}

.tool-box:hover {
  background: rgb(69, 1, 75);
  transform: translateY(-3px);
}

/* Projects Section */
.projects {
  padding: 80px 20px;
  background: var(--primary-bg);
}

.projects .section-title {
  color: var(--text-primary);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  max-width: 1400px;
  margin: 0 auto;
}

.project-card {
  background: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid var(--border-color);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-primary);
  box-shadow: 0 10px 30px rgba(255, 0, 0, 0.25);
}

.project-image {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #2a2a2a;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.1);
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 55px;
  height: 55px;
  background: rgba(255, 0, 0, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  opacity: 0;
  transition: all 0.3s ease;
}

.project-card:hover .play-button {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

.project-info {
  padding: 22px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-info h3 {
  font-size: 18px;
  color: var(--text-primary);
  margin-bottom: 10px;
  font-weight: 700;
  line-height: 1.3;
}

.project-info p {
  font-size: 13px;
  color: #bbb;
  line-height: 1.5;
  margin: 0;
}

/* Video Modal */
.video-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.video-modal.active {
  display: flex;
}

.video-modal-content {
  position: relative;
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16 / 9;
  margin: auto;
}

.modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: var(--accent-primary);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  z-index: 2001;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: var(--accent-hover);
  transform: scale(1.1);
}

/* Added video player controls and proper sizing */
.video-player-container {
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

#videoPlayer {
  width: 100%;
  height: 100%;
  display: block;
  max-height: 85vh;
}

/* Added video control buttons styling */
.video-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.8);
  padding: 15px 20px;
  gap: 10px;
  flex-wrap: wrap;
}

.video-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.video-btn {
  background: var(--accent-primary);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.video-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.video-btn.disabled {
  background: #666;
  cursor: not-allowed;
  opacity: 0.6;
}

.video-info {
  font-size: 12px;
  color: var(--text-secondary);
  flex: 1;
  text-align: center;
  min-width: 100px;
}

/* Testimonials */
.testimonials {
  padding: 80px 20px;
  background: var(--primary-bg);
}

.testimonials .section-title {
  color: var(--text-primary);
}

.testimonial-container {
  max-width: 850px;
  margin: 0 auto;
}

.testimonials-slider {
  position: relative;
  width: 100%;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
  min-height: 250px;
}

.testimonial-card {
  position: absolute;
  width: 100%;
  opacity: 0;
  pointer-events: none;
  transition: all 0.5s ease;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  padding: 30px;
  border-radius: 12px;
  border-left: 4px solid var(--accent-primary);
}

.testimonial-card.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: all;
  position: relative;
}

.testimonial-card:not(.active) {
  transform: translateX(100px);
}

.testimonial-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 12px;
}

.testimonial-avatar {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  border: 3px solid var(--accent-primary);
  object-fit: cover;
  flex-shrink: 0;
}

.testimonial-info {
  display: flex;
  flex-direction: column;
}

.testimonial-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.testimonial-role {
  font-size: 12px;
  color: var(--accent-primary);
  font-weight: 600;
  margin: 0;
}

.testimonial-rating {
  display: flex;
  gap: 3px;
  color: var(--accent-primary);
  font-size: 12px;
  margin-bottom: 8px;
}

.testimonial-text {
  font-size: 14px;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.6;
  margin: 0;
}

.testimonial-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
}

.testimonial-btn {
  background: var(--accent-primary);
  color: white;
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.testimonial-btn:hover {
  transform: scale(1.15);
  background: var(--accent-hover);
}

.testimonial-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #333;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background: var(--accent-primary);
  width: 25px;
  border-radius: 5px;
}

/* Contact Section */
.contact {
  padding: 80px 20px;
  background: var(--secondary-bg);
}

.contact .section-title {
  color: var(--text-dark);
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  max-width: 1200px;
  margin: 0 auto;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-dark);
  font-family: inherit;
  transition: all 0.3s ease;
  background: var(--secondary-bg);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 8px rgba(255, 0, 0, 0.3);
}

.error-message {
  font-size: 12px;
  color: #d32f2f;
  margin-top: 4px;
  display: none;
}

.error-message.show {
  display: block;
}

.success-message {
  background: #e8f5e9;
  border-left: 4px solid #4caf50;
  padding: 18px;
  border-radius: 6px;
  color: #2e7d32;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  font-size: 14px;
  display: none;
}

.success-message.show {
  display: flex;
}

.contact-info {
  display: flex;
  flex-direction: column;
  padding-top: 30px;
  gap: 25px;
}

.info-item {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.info-item i {
  font-size: 22px;
  color: var(--accent-primary);
  margin-top: 3px;
  flex-shrink: 0;
}

.info-item h4 {
  font-size: 15px;
  color: var(--text-dark);
  margin-bottom: 3px;
  font-weight: 700;
}

.info-item p {
  font-size: 13px;
  color: #666;
  margin: 0;
}

/* Footer */
.footer {
  background: #0a0a0a;
  color: var(--text-primary);
  border-top: 2px solid var(--accent-primary);
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--accent-primary), transparent);
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 20px 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-column {
  display: flex;
  flex-direction: column;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
  font-weight: 700;
  font-size: 18px;
}

.footer-logo-icon {
  color: var(--accent-primary);
  font-size: 16px;
}

.footer-brand {
  color: var(--accent-primary);
}

.footer-description {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}

.footer-social {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 0, 0, 0.15);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 16px;
  text-decoration: none;
}

.social-link:hover {
  background: var(--accent-primary);
  color: white;
  transform: translateY(-3px);
}

.footer-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent-primary);
  padding-left: 5px;
}

.footer-contact-info {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.footer-contact-info p {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.footer-contact-info strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 4px;
}

.footer-contact-info a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-contact-info a:hover {
  color: var(--accent-hover);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
}

.footer-copyright {
  font-size: 15px;
  color: #e2c1c1;
}

.footer-legal {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-legal a {
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-legal a:hover {
  color: var(--accent-primary);
}

/* Responsive Design */

/* Tablets (1024px and below) */
@media (max-width: 1024px) {
  .mobile-menu-toggle {
    display: flex;
  }

  nav {
    display: none;
  }

  /* Changed to single column with centered items */
  .hero-content {
    grid-template-columns: 1fr;
    gap: 30px;
    justify-items: center;
  }

  .hero-left {
    order: 1;
    width: 100%;
    max-width: 500px;
  }

  .hero-center {
    order: 2;
    width: 100%;
  }

  .hero-right {
    order: 3;
    width: 100%;
    max-width: 500px;
  }

  .hero-image-box {
    max-width: 100%;
    width: 100%;
  }

  .hero-title {
    font-size: 40px;
  }

  .hero-subtitle {
    font-size: 18px;
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .project-image {
    height: 200px;
  }

  .project-info {
    padding: 18px;
  }

  .project-info h3 {
    font-size: 16px;
  }

  .project-info p {
    font-size: 12px;
  }

  .skills-content {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .section-title {
    font-size: 36px;
  }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
  header {
    padding: 12px 15px;
    width: 100%;
    left: 0;
    right: 0;
  }

  .header-container {
    /* This was the incomplete block */
  }

  /* <CHANGE> Fixed hero mobile ordering - Photo first, Title second, Video third */
@media (max-width: 1024px) {
  .hero-left {
    order: 1;
  }

  .hero-center {
    order: 2;
  }

  .hero-video {
    order: 3;
  }
}

  /* <CHANGE> Hero video autoplay styling */

}
