/* ====== Base Styling ====== */
:root { --carousel-gap: 16px; --carousel-max-width: 960px; }
*,
*::before,
*::after { box-sizing: border-box; }
.carousel-container { max-width: var(--carousel-max-width); }

  html {
  scroll-behavior: smooth;
  }

  body {
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f7fa; 
    color: #333;
    line-height: 1.6;
  }
  
  h1, h2 {
    color: #003366; 
  }
  
  a {
    text-decoration: none;
    color: #0066cc; 
    transition: color 0.3s ease;
  }
  
  a:hover {
    color: #004080;
  }
  
  /* ====== Navigation ====== */
  header {
    background-color: #003366;
    color: #f5f7fa;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
  }
  
  header h1 {
    margin: 0;
    font-size: 1.5rem;
  }
  
  nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
  }
  
  nav ul li a {
    color: #f5f7fa;
    font-weight: bold;
  }
  
  nav ul li a:hover {
    color: #66a3ff;
  }

  .logo img {
    height: 50px;
    width: 200px;
    object-fit: contain; 
    display: block;
  }

  /* ====== Other Sections ====== */
  #about {
    max-width: 1000px;
  }

  #skills {
    max-width: 1000px;
  }

  #gallery {
    max-width: 1000px;
  }

  #contact {
    max-width: 1000px;
  }
  
  /* ====== Hero Section ====== */
  #hero {
    position: relative;
    width: 100%;
    height: 100vh;
    background: url("images/BackgroundNoBoeing737.png") no-repeat center center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 5vw;
    overflow: hidden;
  }
  
  .hero-content {
    position: relative;
    z-index: 1; 
    max-width: 100%;
  }
  
  .hero-content h2 {
    font-size: 3.5rem;
    color: #f5f7fa;
    letter-spacing: 2px;
    max-width: 100px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
  }
  
  .hero-content p {
    font-size: 1.4rem;
    color: #f5f7fa;
    margin-top: 1rem;
    text-shadow: 1px 1px 6px rgba(0,0,0,0.5);
  }
  
  .hero-plane {
    position: absolute;
    right: 5%; 
    bottom: 20%;
    width: 70%;
    height: auto;
    z-index: 2;
    pointer-events: none;
    right: 5%;
    transition: transform 0.5s ease; 
  }
  
  .hero-plane.scrolled {
    transform: translateX(10px) translateY(5px) scale(0.95);
  }
  
  .cta {
    display: inline-block;
    background: #f5f7fa;
    color: #003366;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s ease, transform 0.2s ease;
  }
  
  .cta:hover {
    background: #66a3ff;
    color: #f5f7fa;
    transform: scale(1.05);
  }
  
  /* ====== Sections ====== */
  section {
    padding: 4rem 2rem;
    max-width: 100%;
    margin: auto;
  }

  /* ====== Carousel ====== */
  #carousel {
    display: flex;
    max-width: 1000px;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    background: #f5f7fa;
  }
  
  .carousel-container {
    width: 100%;
    max-width: var(--carousel-max-width);
    overflow: hidden;
    position: relative;
  }
  
  .carousel-track {
    display: flex;
    gap: var(--carousel-gap);
    transition: transform 0.6s ease-in-out;
    will-change: transform;
    justify-content: flex-start;
  }
  
  .carousel-track img {
    width: calc((100% - (var(--carousel-gap) * 2)) / 3);
    flex-shrink: 0;
    aspect-ratio: 1 / 1;   
    object-fit: cover;
    border-radius: 10px;
    display: block;
  }
  
  /* ====== Contact Form ====== */
  form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-width: 500px;
  }
  
  input, textarea, button {
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 5px;
  }
  
  button {
    background: #003366;
    color: #f5f7fa;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
  }
  
  button:hover {
    background: #0066cc;
  }
  
  /* ====== Footer ====== */
  footer {
    text-align: center;
    padding: 1.5rem;
    background: #003366;
    color: #f5f7fa;
    margin-top: 2rem;
  }
  
  /* ====== Animations ====== */
  @keyframes fadeSlideIn {
    from {
      opacity: 0;
      transform: translateX(-30px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
  
  section, #hero, footer, header, nav ul li {
    opacity: 0;
    animation: fadeSlideIn 1s ease forwards;
  }
  
  #hero { animation-delay: 0.2s; }
  #about { animation-delay: 0.4s; }
  #skills { animation-delay: 0.6s; }
  #gallery { animation-delay: 0.8s; }
  #contact { animation-delay: 1s; }
  footer { animation-delay: 1.2s; }
  
  /* ====== Responsive Fixes ====== */

/* Tablets and below */
@media (max-width: 1024px) {
  .hero-content {
    max-width: 60%;
  }

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

  .hero-content p {
    font-size: 1.2rem;
  }

  .carousel-track img {
    width: calc((100% - (var(--carousel-gap))) / 2);
  }
}

/* Mobile devices */
@media (max-width: 768px) {
  header {
    position: static;  
    width: 100%;
    transition: none;  
  }

  nav ul {
    flex-direction: column;
    gap: 1rem;
    background: #003366;
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    display: none; 
  }

  nav ul li {
    text-align: center;
    padding: 1rem 0;
  }

  #hero {
    height: 60%;
  }

  .hero-content {
    max-width: 100%;
    text-align: left;
    padding: 0 1rem;
  }

  .hero-content h2 {
    font-size: 2rem;
  }

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

  .hero-plane {
    display: block;
    width: 60%;  
    bottom: 30%; 
    right: 2%;    
  }

  .carousel-track img {
    width: 100%;
  }

  section {
    padding: 2rem 1rem;
  }

  .carousel-container {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .carousel-track {
    display: flex;
    gap: var(--carousel-gap);
    transform: none !important; 
    transition: none !important;
  }

  .carousel-track img {
    width: 100%; 
    flex-shrink: 0;
    scroll-snap-align: center;
  }
}
