* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  
  background: #1a1a1a;  /* Dark Grey Background */
  color: #f0f0f0;       /* Light Text */
  
  line-height: 1.6;
}

/* Container */
.projects {
  max-width: 1340px;
  margin: 4rem auto;
  padding: 0 1.5rem;
}

.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

/* Project card */
.project {
  display: flex;
  gap: 4.0rem;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  
  border: none;
  border-bottom: 1px solid #333;
}

.project:last-child {
  border-bottom: none;
}

.project img {
  width: 300px;
  min-width: 300px;
  aspect-ratio: 16 / 9;
  height: auto;
  align-self: center;
  
  border-radius: 8px;
  object-fit: cover;
  background: #222;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.project-content h2 {
  font-size: 1.75rem;
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.description {
  font-size: 1.05rem;
  color: #bbb;          /* Light Grey (was dark grey) */
  margin-bottom: 1rem;
}

.tech {
  margin-bottom: 0; 
  background: transparent !important;
}

.tech span {
  background: #333;     
  color: #ddd;
  
  padding: 4px 12px;
  border-radius: 5px;
  font-size: 0.85rem;
  font-weight: 500;
}

.links {
  margin-top: 0;
  justify-content: flex-end; /* Ensures buttons stick to the right */
}

/* Update this block in style.css */
.links a {
  /* 👇 Flexbox aligns the icon and text vertically */
  display: inline-flex;  
  align-items: center;
  gap: 8px;              /* Space between icon and text */
  
  padding: 8px 16px;
  border-radius: 50px;
  border: 1px solid #444;
  
  color: #ddd;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  
  transition: all 0.2s ease;
}

/* Ensure the icon inherits the text color */
.links a svg {
  fill: currentColor;
}

/* Hover effect (Same as before) */
.links a:hover {
  background: #eee;
  color: #111;
  border-color: #eee;
  transform: translateY(-2px);
}

/* Responsive */
@media (prefers-color-scheme: dark) {
  .project {
    border-bottom-color: #333;
  }
  
  .description {
    color: #bbb;
  }

  .tech {
    color: #ccc;
  }
}

@media (max-width: 768px) {
  .project-footer {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .project img {
    width: 100%;
  }
}

.carousel {
  position: relative;
  width: 350px;
  min-width: 350px;
  aspect-ratio: 16 / 9;
  align-self: center;
}

.carousel-images {
  width: 100%;
  height: 100%;
  position: relative;
  
  /* Moved styling here so images stay inside a rounded frame */
  border-radius: 5px;
  background: #222;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  overflow: hidden; 
}

.carousel img {
  position: absolute;  /* Stack images on top of each other */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  
  opacity: 0;          /* Hidden by default */
  transition: opacity 0.5s ease-in-out; /* The Animation */
  z-index: 1;
  cursor: zoom-in;
}
.carousel img.active {
  opacity: 1;          /* Visible */
  z-index: 2;          /* Sits on top */
}

/* Navigation Buttons */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  cursor: pointer;
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 4px;
  transition: background 0.2s;
  user-select: none;
  z-index: 2;
}

.carousel-btn:hover {
  background-color: rgba(78, 78, 78, 0.8);
}

.prev { left: -45px; }
.next { right: -45px; }

/* Mobile Responsive update */
@media (max-width: 768px) {
  .carousel {
    width: 100%;
    min-width: 100%;
  }
  
  /* On mobile, bring buttons back inside so they don't get cut off */
  .prev { left: 10px; }
  .next { right: 10px; }
}

@keyframes fadeEffect {
  from {opacity: 0.6;}
  to {opacity: 1;}
}

.navbar {
  background-color: #222;      /* Slightly lighter than main background */
  border-bottom: 1px solid #333;
  position: sticky;            /* Sticks to top on scroll */
  top: 0;
  z-index: 1000;               /* Ensures it floats above other elements */
  padding: 1rem 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.nav-container {
  max-width: 1100px;           /* Matches your .projects max-width */
  margin: 0 auto;              /* Centers the content */
  padding: 0 1.5rem;           /* Matches your .projects padding */
  
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: #bbb;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #fff;
}

/* Responsive adjustment for Navbar */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 1rem;
  }
}

.fullscreen-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  
  /* Centers the image */
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Zoom Hint Text */
.zoom-hint {
  position: absolute;
  bottom: -28px;     /* Push it below the carousel */
  left: 0;
  width: 100%;       /* Center it relative to the carousel width */
  
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  
  font-size: 0.9rem;
  color: #777;       /* Subtle grey */
  pointer-events: none; /* Allows clicks to pass through if needed */
  user-select: none;
}

/* Ensure the icon matches the text color */
.zoom-hint svg {
  opacity: 0.8;
}

/* Optional: Slight hover effect when hovering the whole carousel */
.carousel:hover .zoom-hint {
  color: #e4e4e4;
}

.fs-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 4rem; /* Made slightly larger for easier clicking */
  cursor: pointer;
  padding: 20px;
  user-select: none;
  transition: all 0.2s ease;
  z-index: 10001;
  
  /* 👇 KEY CHANGE: Absolute positioning locks them to the screen edges */
  position: absolute;
  top: 50%;
  transform: translateY(-50%); /* Centers them vertically */
}

.fs-btn:hover {
  color: white;
  transform: translateY(-50%) scale(1.1); /* Slight pop effect on hover */
}

/* Close Button (Top Right) */
.close-btn {
  position: absolute;
  top: 20px;
  right: 40px;
  color: #fff;
  font-size: 3rem;
  cursor: pointer;
  z-index: 10002;
}

/* Ensure buttons and image are aligned properly */
.fullscreen-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  
  /* Flexbox for centering */
  display: flex; /* IMPORTANT: Keep as flex but hidden by JS */
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.fullscreen-overlay {
  /* Fixed positioning covering the screen */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  
  /* Flexbox centering */
  display: flex;
  justify-content: center;
  align-items: center;

  /* 👇 Animation States (Default: Hidden) */
  opacity: 0;
  visibility: hidden;       /* Hides it from screen readers/clicks */
  pointer-events: none;     /* Clicks pass through when hidden */
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

@media (max-width: 768px) {
  .fs-btn {
    font-size: 2.5rem;
    padding: 10px;
  }
  #fs-prev { left: 10px; }
  #fs-next { right: 10px; }
}

#fs-prev {
  left: 30px; /* Distance from left edge */
}

#fs-next {
  right: 30px; /* Distance from right edge */
}

.fullscreen-overlay img {
  max-width: 75vw;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  
  /* 👇 Subtle Zoom Animation */
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.fullscreen-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;     /* Re-enable clicks */
}

.fullscreen-overlay.active img {
  transform: scale(1);
}