/* ========== Modern Reset ========== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ========== Custom Properties ========== */
:root {
  --color-primary: #1a1a1a;
  --color-secondary: #555;
  --color-accent: #3498db;
  --color-light: #f8f9fa;
  --color-dark: #212529;
  --font-primary: 'Montserrat', sans-serif;
  --font-secondary: 'Playfair Display', serif;
  --transition: all 0.3s ease;
  --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* ========== Global Body ========== */
body {
  font-family: var(--font-primary);
  color: var(--color-dark);
  min-height: 100vh;
  background-color: var(--color-light);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ========== Home Page Background ========== */
body.home-page {
  background-image: url("line-art-bg.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-attachment: fixed;
  position: relative;
}

body.home-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.5) 100%);
  z-index: -1;
}

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

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
}

h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.5rem;
  height: 3px;
  width: 50%;
  background: var(--color-accent);
}

p {
  margin-bottom: 1.5rem;
}

/* ========== Header & Navigation ========== */
header {
  position: sticky;
  top: 0;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(10px);
  z-index: 100;
  box-shadow: var(--shadow-light);
  transition: var(--transition);
}

header.scroll {
  padding: 0.8rem 1.5rem;
}

nav {
  max-width: 1200px;
  margin: 0 auto;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

nav li {
  margin-left: 2rem;
}

nav a {
  text-decoration: none;
  color: var(--color-dark);
  font-weight: 600;
  padding: 0.5rem;
  position: relative;
  transition: var(--transition);
}

nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: var(--transition);
}

nav a:hover {
  color: var(--color-accent);
}

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

nav a.active {
  color: var(--color-accent);
}

/* ========== Hero Section (Home Page) ========== */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem;
  text-align: center;
  min-height: 90vh;
  position: relative;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 5rem);
  margin-bottom: 1.5rem;
  transform: translateY(20px);
  opacity: 0;
  animation: fadeUp 1s 0.3s forwards;
}

.tagline {
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  color: var(--color-secondary);
  position: relative;
  transform: translateY(20px);
  opacity: 0;
  animation: fadeUp 1s 0.6s forwards;
}

.tagline::before,
.tagline::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 50px;
  height: 1px;
  background-color: var(--color-secondary);
}

.tagline::before {
  left: -70px;
}

.tagline::after {
  right: -70px;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== Container ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ========== Page Section (About, Projects, Contact) ========== */
.page-section {
  padding: 6rem 0;
}

/* ========== Projects Grid ========== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.project-item {
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: var(--transition);
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.project-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.project-image {
  width: 100%;
  height: 200px;
  background-color: #eee;
  position: relative;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.project-item:hover .project-image img {
  transform: scale(1.05);
}

.project-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-item h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.project-item p {
  color: var(--color-secondary);
  margin-bottom: 1.5rem;
}

.project-item a {
  display: inline-block;
  margin-top: auto;
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: none;
  padding: 0.5rem 0;
  position: relative;
}

.project-item a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: var(--transition);
}

.project-item a:hover::after {
  width: 100%;
}

/* ========== About Section ========== */
.about-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-medium);
}

.about-image img {
  width: 100%;
  height: auto;
  display: block;
}

.about-content h2 {
  margin-bottom: 1.5rem;
}

.about-content p {
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

/* ========== Forms ========== */
form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 600px;
  margin: 0 auto;
  background-color: #fff;
  padding: 2.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow-light);
}

.form-group {
  position: relative;
}

label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-secondary);
  margin-bottom: 0.5rem;
  display: block;
}

input, textarea {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  transition: var(--transition);
  font-family: var(--font-primary);
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

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

button[type="submit"] {
  padding: 1rem 2rem;
  background-color: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  align-self: flex-start;
}

button[type="submit"]:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
  box-shadow: var(--shadow-light);
}

/* ========== Footer ========== */
footer {
  background-color: var(--color-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 3rem 0;
  text-align: center;
}

footer p {
  margin-bottom: 0;
}

/* ========== Media Queries ========== */
@media (max-width: 768px) {
  nav ul {
    justify-content: center;
  }
  
  nav li {
    margin: 0 1rem;
  }
  
  .about-section {
    grid-template-columns: 1fr;
  }
  
  .about-image {
    margin-bottom: 2rem;
    order: -1;
  }
  
  .tagline::before,
  .tagline::after {
    display: none;
  }
}

@media (max-width: 480px) {
  form {
    padding: 1.5rem;
  }
  
  nav li {
    margin: 0 0.5rem;
  }
}
/* ========== Add these to the style.css file ========== */

/* ========== Hero Buttons ========== */
.hero-cta {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  animation: fadeUp 1s 0.9s forwards;
  opacity: 0;
  transform: translateY(20px);
}

.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--color-accent);
  color: white;
  box-shadow: 0 4px 6px rgba(52, 152, 219, 0.2);
}

.btn-primary:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(52, 152, 219, 0.3);
}

.btn-outline {
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
  background-color: transparent;
}

.btn-outline:hover {
  background-color: var(--color-accent);
  color: white;
  transform: translateY(-2px);
}

/* ========== Footer Styles ========== */
footer {
  background-color: var(--color-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 3rem 0;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

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

.social-links a:hover {
  background-color: var(--color-accent);
  transform: translateY(-3px);
}

/* ========== Project Tags ========== */
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.project-tags span {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  background-color: rgba(52, 152, 219, 0.1);
  color: var(--color-accent);
  border-radius: 4px;
  font-weight: 500;
}

/* ========== Projects Filter ========== */
.projects-filter {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: 0.5rem 1.5rem;
  background-color: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
  color: var(--color-secondary);
}

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

/* ========== Skills Section ========== */
.skills-container {
  margin-top: 2.5rem;
}

.skills-container h3 {
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.skill-category h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: var(--color-accent);
}

.skill-category ul {
  list-style: none;
}

.skill-category li {
  padding: 0.5rem 0;
  position: relative;
  padding-left: 1.2rem;
}

.skill-category li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--color-accent);
}

/* ========== Experience Box ========== */
.experience-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 1rem;
  background-color: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow-light);
  margin-top: 2rem;
}

.experience-item {
  text-align: center;
}

.experience-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.experience-label {
  font-size: 0.9rem;
  color: var(--color-secondary);
}

/* ========== Testimonials Section ========== */
.testimonials-section {
  background-color: var(--color-light);
  padding: 6rem 0;
  position: relative;
}

.testimonials-section h2 {
  text-align: center;
  margin-bottom: 3rem;
}

.testimonials-slider {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.testimonial-item {
  display: none;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.testimonial-content {
  background-color: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow-light);
  margin-bottom: 1.5rem;
  position: relative;
}

.testimonial-content::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 30px;
  width: 20px;
  height: 20px;
  background-color: white;
  transform: rotate(45deg);
  box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.05);
}

.testimonial-content p {
  font-size: 1.1rem;
  font-style: italic;
  margin-bottom: 0;
  position: relative;
}

.testimonial-content p::before {
  content: '"';
  font-size: 4rem;
  position: absolute;
  top: -1.5rem;
  left: -1rem;
  color: rgba(52, 152, 219, 0.1);
  font-family: var(--font-secondary);
}

.testimonial-author {
  padding-left: 2rem;
}

.testimonial-author h4 {
  margin-bottom: 0.25rem;
}

.testimonial-author p {
  color: var(--color-secondary);
  font-size: 0.9rem;
  margin-bottom: 0;
}

.slider-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
}

.prev-btn,
.next-btn {
  background-color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-light);
  transition: var(--transition);
}

.prev-btn:hover,
.next-btn:hover {
  background-color: var(--color-accent);
  color: white;
}

.slider-dots {
  display: flex;
  gap: 0.5rem;
  margin: 0 1rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: var(--transition);
}

.dot.active {
  background-color: var(--color-accent);
}

/* ========== Contact Grid ========== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-info h2 {
  margin-bottom: 1rem;
}

.contact-info p {
  font-size: 1.1rem;
  max-width: 400px;
}

.contact-details {
  margin-top: 3rem;
}

.contact-item {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background-color: rgba(52, 152, 219, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--color-accent);
}

.contact-text h4 {
  margin-bottom: 0.25rem;
}

.contact-text p {
  margin-bottom: 0;
}

.contact-text a {
  color: var(--color-dark);
  text-decoration: none;
  transition: var(--transition);
}

.contact-text a:hover {
  color: var(--color-accent);
}

.contact-social {
  display: flex;
  gap: 1rem;
}

.contact-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--color-light);
  color: var(--color-dark);
  transition: var(--transition);
}

.contact-social a:hover {
  background-color: var(--color-accent);
  color: white;
}

.contact-form-container {
  position: relative;
}

.contact-form-container h3 {
  margin-bottom: 1.5rem;
}

.map-section {
  margin-top: 4rem;
}

.map-container {
  width: 100%;
  height: 400px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-light);
}

.map-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f0f0f0;
}

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

/* ========== Media Queries ========== */
@media (max-width: 992px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .contact-form-container {
    order: -1;
  }
}

@media (max-width: 768px) {
  .testimonial-content p::before {
    font-size: 3rem;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }
  
  .experience-box {
    grid-template-columns: 1fr;
  }
  
  .projects-filter {
    flex-wrap: wrap;
  }
}
/* ===== ADDITIONAL VIDEO BACKGROUND OPTIMIZATIONS ===== */
/* Add these to your style.css file if desired */

/* Enhance hero content for video background */
.video-background + header + main .hero h1 {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.video-background + header + main .hero .tagline {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Optimize video performance on high-pixel-density devices */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { 
  .video-background video {
    /* Reduce resolution for high DPI screens to improve performance */
    transform: translate(-50%, -50%) translateZ(0) scale(0.5);
    transform-origin: center center;
  }
}

/* Enhance responsive behavior */
@media (max-width: 1024px) {
  .video-background video {
    /* Adjust positioning for better framing on medium screens */
    object-position: center center;
  }
}

@media (max-width: 768px) {
  /* Make overlay stronger on mobile for better readability */
  .video-overlay {
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.6) 100%);
  }
  
  /* Adjust video scaling for mobile performance */
  .video-background video {
    transform: translate(-50%, -50%) scale(1.2);
  }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .video-background video {
    /* Pause the video for users who prefer reduced motion */
    animation-play-state: paused !important;
  }
  
  /* Show a static frame instead */
  .video-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('video-poster.jpg');
    background-size: cover;
    background-position: center center;
    z-index: 0;
  }
}

/* Dark mode considerations */
@media (prefers-color-scheme: dark) {
  .video-overlay {
    /* Darker overlay for dark mode */
    background: linear-gradient(135deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.2) 100%);
  }
  
  header {
    /* Darker header for dark mode */
    background-color: rgba(33, 37, 41, 0.85);
  }
  
  .hero h1, 
  .hero .tagline {
    /* Better visibility in dark mode */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }
}
/* ===== CSS FIXES FOR PROJECT CARD DISPLAY ISSUES ===== */

/* Add these styles to your style.css file or include them in a <style> tag in the head of your projects.html page */

/* Fix for project cards not displaying properly */
.project-card {
  display: flex;
  flex-direction: column;
  background-color: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}

/* Ensure images display properly */
.project-image {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

/* Stats section styling fix */
.project-stats {
  display: flex;
  justify-content: space-around;
  padding: 1rem;
  border-bottom: 1px solid #f0f0f0;
  background-color: #f8f9fa;
}

.stat-box {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #3498db;
  display: block;
  line-height: 1;
}

.stat-label {
  font-size: 0.9rem;
  color: #777;
  margin-top: 0.25rem;
}

/* Content section fix */
.project-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* Fix for projects grid layout */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Fix for Recently Added tag */
.recently-added {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background-color: #3498db;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 2;
}

/* Fix for project tags */
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.project-tag {
  background-color: rgba(52, 152, 219, 0.1);
  color: #3498db;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Project link fixes */
.project-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  color: #3498db;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.project-link i {
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
}

.project-link:hover {
  color: #2980b9;
}

.project-link:hover i {
  transform: translateX(5px);
}

/* Responsive fixes */
@media (max-width: 992px) {
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }
  
  .project-card {
    max-width: 100%;
  }
}

/* Fix for missing images (temporary placeholder) */
.project-image img[src="images/movie-boom.jpg"]:not([complete]),
.project-image img[src="images/octo-project.jpg"]:not([complete]),
.project-image img[src="images/hammell-house.jpg"]:not([complete]) {
  background-color: #e0e0e0;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.project-image img[src="images/movie-boom.jpg"]:not([complete])::after,
.project-image img[src="images/octo-project.jpg"]:not([complete])::after,
.project-image img[src="images/hammell-house.jpg"]:not([complete])::after {
  content: attr(alt);
  position: absolute;
  color: #777;
  font-size: 1rem;
  text-align: center;
}
.project-detail-image {
  height: fit-content; /* This makes the container only as tall as its content */
  margin-bottom: 0; /* Remove any bottom margin */
  display: flex; /* Ensure proper alignment */
  flex-direction: column;
}

.project-detail-image video {
  max-height: 100%; /* Ensure video stays within its container */
  object-fit: contain; /* Maintain aspect ratio */
}

.project-intro {
  align-items: flex-start; /* Align items to the top */
}