/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #000;
  --secondary-color: #333;
  --text-light: #666;
  --bg-color: #fff;
  --bg-light: #f8f8f8;
  --accent-color: #007bff;
  --transition: all 0.3s ease;

html {
  scroll-behavior: smooth;
}

}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: var(--primary-color);
  background-color: var(--bg-color);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Loading Screen */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  transition: opacity 0.5s ease;
}

#loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader {
  width: 40px;
  height: 40px;
  border: 3px solid var(--bg-light);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: var(--transition);
  padding: 20px 0;
}

.navbar.scrolled {
  padding: 15px 0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-decoration: none;
  color: var(--primary-color);
}

.nav-menu {
  display: flex;
  gap: 40px;
}

.nav-link {
  text-decoration: none;
  color: var(--secondary-color);
  font-weight: 400;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
}

.nav-link:after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.nav-link:hover:after,
.nav-link.active:after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.bar {
  width: 25px;
  height: 2px;
  background: var(--primary-color);
  margin: 3px 0;
  transition: var(--transition);
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  background: var(--bg-light);
}

.hero-background-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  position: absolute;
  top: 0;
  left: 0;
}

.hero-content {
  text-align: center;
  animation: fadeInUp 1s ease;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 300;
  letter-spacing: 0.5rem;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 40px;
  font-weight: 300;
}

.hero-button {
  display: inline-block;
  padding: 12px 30px;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  transition: var(--transition);
  font-weight: 500;
}

.hero-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: bounce 2s infinite;
  z-index: 1;
}

.hero-scroll span {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-light);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: var(--text-light);
  position: relative;
  overflow: hidden;
}

.scroll-line:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-color);
  animation: scrollLine 2s infinite;
}

@keyframes scrollLine {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Video Gallery */
.video-gallery {
  padding: 80px 0;
  background: var(--bg-color);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.video-item {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  background: var(--bg-light);
  transition: var(--transition);
}

.video-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.video-thumbnail {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  overflow: hidden;
}

.video-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.video-item:hover .video-thumbnail img {
  transform: scale(1.05);
}

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition);
}

.play-overlay i {
  color: white;
  font-size: 20px;
  margin-left: 3px;
}

.video-item:hover .play-overlay {
  background: rgba(0, 0, 0, 0.9);
  transform: translate(-50%, -50%) scale(1.1);
}

.placeholder .video-thumbnail {
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--bg-light);
  height: 200px;
  padding-bottom: 0;
}

.placeholder-content {
  text-align: center;
  color: var(--text-light);
}

.placeholder-content i {
  font-size: 2rem;
  margin-bottom: 10px;
}

/* About Section */
.about {
  padding: 100px 0;
  background: var(--bg-light);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-image img {
  width: 100%;
  max-width: 400px;
  border-radius: 10px;
}

.about-text h2 {
  font-size: 3rem;
  font-weight: 300;
  margin-bottom: 30px;
  letter-spacing: -1px;
}

.about-text p {
  color: var(--text-light);
  margin-bottom: 20px;
  line-height: 1.8;
}

.about-skills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px;
  background: white;
  border-radius: 8px;
  transition: var(--transition);
}

.skill-item:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.skill-item i {
  font-size: 1.5rem;
  color: var(--accent-color);
}

/* Work Section */
.work {
  padding: 100px 0;
  background: var(--bg-color);
  position: relative;
  overflow: hidden;
}

.work-background-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.work-bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 2s ease;
  position: absolute;
  top: 0;
  left: 0;
}

.work-bg-video.active {
  opacity: 0.15;
}

/* When video is paused, it acts as a static background image */
.work-bg-video.paused {
  opacity: 0.15;
}

.work .container {
  position: relative;
  z-index: 1;
}

.work h2 {
  text-align: center;
  font-size: 3rem;
  font-weight: 300;
  margin-bottom: 60px;
  letter-spacing: -1px;
}

.work-grid {
  display: grid;
  gap: 60px;
  margin-bottom: 60px;
}

.work-item {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  align-items: center;
}

.work-item:nth-child(even) {
  grid-template-columns: 1fr 1.5fr;
}

.work-item:nth-child(even) .work-video {
  order: 2;
}

.work-video iframe {
  width: 100%;
  height: 400px;
  border: none;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.work-info h3 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  font-weight: 400;
}

.work-info p {
  color: var(--text-light);
  line-height: 1.8;
}

.work-cta {
  text-align: center;
}

.work-cta p {
  color: var(--text-light);
  margin-bottom: 20px;
}

.youtube-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  padding: 10px 20px;
  border: 1px solid var(--primary-color);
  border-radius: 5px;
}

.youtube-link:hover {
  background: var(--primary-color);
  color: white;
}

/* Contact Section */
.contact {
  padding: 100px 0;
  background: var(--bg-light);
  text-align: center;
}

.contact h2 {
  font-size: 3rem;
  font-weight: 300;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.contact-subtitle {
  color: var(--text-light);
  margin-bottom: 40px;
  font-size: 1.1rem;
}

.contact-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 40px;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  font-size: 1.1rem;
  transition: var(--transition);
  margin-bottom: 40px;
}

.contact-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 30px;
}

.social-links a {
  width: 50px;
  height: 50px;
  border: 1px solid var(--primary-color);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--primary-color);
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

/* Footer */
.footer {
  padding: 30px 0;
  background: var(--primary-color);
  color: white;
  text-align: center;
}

.footer p {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Video Modal */
.video-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  padding: 20px;
}

.modal-content {
  max-width: 1000px;
  margin: 50px auto;
  position: relative;
}

.close-modal {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 30px;
  cursor: pointer;
  transition: var(--transition);
}

.close-modal:hover {
  transform: scale(1.2);
}

.modal-video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}

.modal-video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: white;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    padding: 40px 0;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-title {
    letter-spacing: 0.2rem;
  }

  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-skills {
    grid-template-columns: 1fr;
  }

  .work-item,
  .work-item:nth-child(even) {
    grid-template-columns: 1fr;
  }

  .work-item:nth-child(even) .work-video {
    order: 1;
  }

  .work-video iframe {
    height: 250px;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }
}



/* Modals */
.modal {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 40px;
  width: 90%;
  max-width: 800px;
  border-radius: 10px;
  position: relative;
  animation: slideInModal 0.3s ease;
  max-height: 80vh;
  overflow-y: auto;
}

@keyframes slideInModal {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal .close-modal {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 28px;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
  transition: color 0.3s ease;
}

.modal .close-modal:hover {
  color: #000;
}

/* Skills Modal */
.skills-content h2 {
  font-size: 2.5rem;
  margin-bottom: 40px;
  text-align: center;
  font-weight: 300;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.skill-category {
  background: #f8f8f8;
  padding: 25px;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-category:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.skill-category h3 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 10px;
}

.skill-category h3 i {
  color: #007bff;
}

.skill-category ul {
  list-style: none;
}

.skill-category li {
  padding: 8px 0;
  color: #666;
  position: relative;
  padding-left: 20px;
}

.skill-category li:before {
  content: "▸";
  position: absolute;
  left: 0;
  color: #007bff;
}

/* Resume Modal */
.resume-content {
  max-width: 900px;
}

.resume-header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 2px solid #eee;
}

.resume-header h1 {
  font-size: 2.5rem;
  font-weight: 300;
  margin-bottom: 10px;
}

.resume-title {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 20px;
}

.resume-contact {
  display: flex;
  justify-content: center;
  gap: 30px;
  font-size: 0.95rem;
  color: #666;
}

.resume-contact i {
  margin-right: 5px;
  color: #007bff;
}

.resume-section {
  margin-bottom: 40px;
}

.resume-section h2 {
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: 20px;
  color: #333;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.resume-item {
  margin-bottom: 30px;
}

.resume-item h3 {
  font-size: 1.3rem;
  margin-bottom: 5px;
  color: #333;
}

.resume-meta {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.resume-item ul {
  list-style: none;
  padding-left: 0;
}

.resume-item li {
  padding: 5px 0;
  padding-left: 20px;
  position: relative;
  color: #666;
}

.resume-item li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: #007bff;
}

.resume-skills {
  display: grid;
  gap: 20px;
}

.skill-level {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  gap: 20px;
}

.skill-bar {
  background: #f0f0f0;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: linear-gradient(to right, #007bff, #0056b3);
  border-radius: 4px;
  transition: width 1s ease;
}

/* Responsive adjustments for modals */
@media (max-width: 768px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-content {
    margin: 10% auto;
    padding: 30px 20px;
    width: 95%;
  }
  
  .resume-contact {
    flex-direction: column;
    gap: 10px;
  }
  
  .skill-level {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  

  
  .work-bg-video.active {
    opacity: 0.1;
  }
}


/* Enhanced section animations for smooth scroll transitions */
section {
  position: relative;
  transform: translateY(60px);
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform, opacity;
}

section.in-view {
  transform: translateY(0);
  opacity: 1;
}

/* Special transition effect for about section */
.about {
  position: relative;
  overflow: hidden;
}

.about::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0,123,255,0.05) 0%, transparent 70%);
  transform: scale(0);
  transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 1;
}

.about.in-view::before {
  transform: scale(1);
}

.about-content {
  position: relative;
  z-index: 2;
  transform: translateX(-30px);
  opacity: 0;
  transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s;
}

.about.in-view .about-content {
  transform: translateX(0);
  opacity: 1;
}

/* Resume PDF Modal Styles */
.resume-actions {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.download-btn:hover {
  background: linear-gradient(135deg, #0056b3, #004494);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
}

.download-btn i {
  font-size: 16px;
}

.resume-pdf-container {
  margin-top: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: #f8f9fa;
}

.resume-pdf-container embed {
  display: block;
  border: none;
  background: white;
}

.pdf-fallback {
  display: none;
  text-align: center;
  padding: 40px 20px;
  background: #f8f9fa;
  border-radius: 8px;
  margin: 20px 0;
}

.pdf-fallback a {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
}

.pdf-fallback a:hover {
  text-decoration: underline;
}

/* Mobile responsive for resume modal */
@media (max-width: 768px) {
  .resume-pdf-container embed {
    height: 500px;
  }
  
  .resume-content {
    padding: 20px;
  }
  
  .download-btn {
    padding: 10px 20px;
    font-size: 14px;
  }
}

.resume-pdf-container img {
  display: block;
  width: 100%;
  height: auto;
  border: none;
  background: white;
}

