/* CSS Reset and Basic Box Sizing */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Modern Color Palette & Font Variables */
:root {
  --primary-color: #1A1A2E; /* Dark Blue/Purple */
  --secondary-color: #16213E; /* Slightly Lighter Dark Blue */
  --accent-color: #E94560;  /* Vibrant Pink/Red */
  --highlight-color: #0F3460; /* Deeper Blue for accents/shadows */
  --text-color: #EAEAEA;    /* Light Gray/White for dark backgrounds */
  --muted-text-color: #a0a0c0; /* Lighter text for less emphasis */
  --font-family: 'Poppins', sans-serif; /* Chosen Google Font */
}

html {
    scroll-behavior: smooth; /* Enable smooth scrolling for anchor links */
}

body {
  font-family: var(--font-family);
  line-height: 1.7;
  background-color: var(--secondary-color);
  color: var(--text-color);
  overflow-x: hidden;
  padding-top: 100px; 
}

/* Header Styles */
header {
  background: rgba(26, 26, 46, 0.5); /* Transparent background */
  color: var(--text-color);
  position: fixed;   /* Fixed positioning */
  width: 100%;      /* Full width */
  top: 0;           /* *** ADD THIS LINE: Pin to the top edge *** */
  left: 0;          /* *** ADD THIS LINE (Good practice): Pin to left edge *** */
  z-index: 1000;    /* Ensure it's above other content */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px); /* Optional blur effect */
  -webkit-backdrop-filter: blur(10px); /* Safari support for blur */
}

.banner {
  padding: 0.8rem 1rem;
  text-align: center;
}

.banner h1 {
  font-weight: 600;
}

nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  padding-bottom: 0.8rem;
}

nav a {
  color: var(--muted-text-color);
  text-decoration: none;
  padding: 0.5rem 1rem;
  margin: 0 0.5rem;
  font-weight: 400;
  position: relative; /* For underline effect */
  transition: color 0.3s ease;
}

nav a::after { /* Underline effect */
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: var(--accent-color);
  transition: all 0.3s ease-out;
  transform: translateX(-50%);
}

nav a:hover,
nav a.active { /* Class 'active' might be added by JS later */
  color: var(--text-color);
}

nav a:hover::after,
nav a.active::after {
  width: 60%; /* Control underline width on hover/active */
}


/* Container */
.container {
  max-width: 1100px; /* Slightly narrower for better readability */
  margin: 0 auto;
  padding: 1rem 2rem; /* Standard padding */
}

/* Section Base Styles */
section {
  padding: 6rem 0; /* More vertical padding */
  overflow: hidden; /* Contain elements animated from outside */
}

/* Add top padding to body/main to offset fixed header */
body {
    padding-top: 90px; /* Adjust this value based on your header's actual height */
}

/* ===== START: Hero Section with Video Background Styling ===== */
.hero {
  min-height: calc(100vh - 90px); /* Full viewport height minus header */
  display: flex; /* Keep flexbox for centering content */
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-color);
  position: relative; /* Essential for absolute positioning children */
  overflow: hidden; /* Hide parts of video outside the section */
  /* REMOVED background, background-size, background-attachment */
}

/* Container for Video and Overlay */
.video-background-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2; /* Place behind content */
}

/* The Video Element */
.video-background-container video {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Cover the container, allows cropping */
}

/* The Overlay - Applied over the video */
.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(26, 26, 46, 0.8), rgba(22, 33, 62, 0.9)); /* Your gradient */
  z-index: -1; /* Place overlay between video and content */
}

/* Ensure Hero content is above video/overlay */
.hero .container {
  position: relative; /* Allows z-index to work */
  z-index: 1; /* Ensure content is above the video/overlay */
}

/* ===== END: Hero Section with Video Background Styling ===== */


.hero h2 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: var(--muted-text-color);
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 0.8rem 2.5rem;
  background: var(--accent-color);
  color: var(--text-color);
  font-weight: 600;
  text-decoration: none;
  border-radius: 50px; /* Pill shape */
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(233, 69, 96, 0.4); /* Direct color value for alpha */
  background-color: #ff5875; /* Slightly lighter accent */
  color: white;
}

/* Section Specific Backgrounds & Text */
#about {
  background: var(--primary-color);
}

#portfolio {
  background: var(--secondary-color);
}

#contact {
    background: var(--primary-color);
    text-align: center;
}

/* Section Heading Styles */
section h2 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 3rem;
  color: var(--text-color);
  position: relative;
}

/* Underline effect for section titles */
section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent-color);
    margin: 10px auto 0; /* Center the underline */
}


/* About Section Text Styling */
#about p {
    max-width: 800px; /* Control line length */
    margin: 0 auto; /* Center the text block */
    line-height: 1.8;
    color: var(--muted-text-color);
}

/* Portfolio Section */
.portfolio-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem; /* Space before the note */
}

.portfolio-item {
  background: var(--primary-color);
  padding: 2rem 1.5rem;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

.portfolio-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.portfolio-item p {
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--text-color);
}

.portfolio-item a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.3em 0.6em; /* Make link easier to click */
    border: 1px solid transparent; /* Prepare for hover border */
    border-radius: 4px;
}

.portfolio-item a:hover {
    color: #ff5875; /* Lighter accent */
    border-color: var(--accent-color); /* Add border on hover */
}


/* Note styling in portfolio */
#portfolio h6 {
    text-align: center;
    color: var(--muted-text-color);
    font-style: italic;
    font-weight: 300;
    margin-top: 2rem;
}


/* Contact Section Styling */
#contact p {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}
#contact strong {
    color: var(--text-color);
    margin-right: 0.5em;
}
#contact a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}
#contact a:hover {
    color: #ff5875; /* Lighter accent */
    text-decoration: underline;
}

/* Footer */
footer {
  background: var(--primary-color);
  color: var(--muted-text-color); /* Muted text */
  text-align: center;
  padding: 1.5rem;
  font-size: 0.9rem;
  margin-top: 3rem; /* Space before footer */
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--accent-color);
  color: var(--text-color);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.5rem; /* Make arrow bigger */
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(233, 69, 96, 0.3); /* Direct color value for alpha */
  border: none;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 6px 15px rgba(233, 69, 96, 0.5); /* Direct color value for alpha */
  background-color: #ff5875; /* Lighter accent */
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    body {
        padding-top: 80px; /* Adjust if header height changes significantly */
    }

    nav ul {
        flex-direction: column; /* Stack nav items */
        align-items: center;
        padding-bottom: 1rem;
    }

    nav a {
        padding: 0.8rem 1rem; /* Larger tap area */
        margin: 0.2rem 0;
    }

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

    .hero p {
        font-size: 1rem;
    }

    section {
        padding: 4rem 0;
    }

     section h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .portfolio-items {
       grid-template-columns: 1fr; /* Single column on smaller screens */
    }

    .back-to-top {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
        bottom: 1rem;
        right: 1rem;
    }

    /* Ensure video covers well on mobile */
    .video-background-container video {
       /* You might need adjustments here depending on video aspect ratio vs screen */
       /* Example: Might need to force width/height or adjust object-position */
    }
}