:root{
--text-colour: #1a1c20;
    --link-color: #4a76ee;
    --background-color: #eeeff1;
}
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html{
    scroll-behavior: smooth;
}

body{
    font-family: 'Poppins', sans-serif; 
    background-color: var(--background-colour);
}

a{
    color: var(--link-color);
    text-decoration: none;
}

.h1{
    text-align: center;
    margin: 1%
}

.para{
text-align: center;
  margin-bottom: 5px;
}

.med-para{
  text-align: center;
  margin-bottom: 5px;
  margin-left: 5%;
  margin-right: 5%;
  font-size: 20px;
}

.big{
  font-size: 50px;
  margin-bottom: 2%;
}

.small{
  font-size: 30px;
  font-weight: 400;
}


/* NAVBAR */
nav{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px;
    height: 80px;
}

nav .left a{
    color: var(--text-color);
    font-size: 30px;
    font-weight: 600;
}

nav .right a{
    color: var(--text-color);
margin: 0 10px;
}

nav .left a:last-child{
    color: var(--background colour);
    background-color: var(--text-color);
    padding: 5px 15px;
    border-radius: 5px;
}

nav .right a span {
    margin-left: 5px;
}

.project-item a{
      display: block;
    position: relative;
}

/* SECTION 1: Freelance Videographer */

.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.youtube-text {
  text-align: center;
  margin-top: 8px;
  font-size: 1rem;
}

.top-image-container {
  padding: 0 40px 40px;
  max-width: 1200px;
  margin: 0 auto 5%;
}

.bottom-images-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2%;
  margin: 0 2% 5%;
}

.project-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}


.instagram-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* max 4 per row */
  gap: 20px;
  max-width: 1827px;
  margin: auto;
  padding: 20px;
  margin-bottom: 5%;
}

.embed-wrapper {
  width: 100%;
}

.freelance-photography img{
    width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 0 40px;
  margin-bottom: 5%;
}

.project-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.project-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.photo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.photo-item img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

/* Base styling for video items */
.video-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    position: relative;
}

.video-item iframe {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 4px; /* Optional rounding */
}

/* --- 1440x1080 (4:3) Layout --- */
.video-grid-landscape {
    grid-template-columns: repeat(2, 1fr);
}

/* Force the video container to be 4:3 */
.video-item iframe {
    aspect-ratio: 4 / 3;
}

/* --- 9x16 Vertical Layout --- */
.video-grid-portrait {
    grid-template-columns: repeat(3, 1fr);
    /* Restrict width so vertical videos aren't too massive on desktop */
    margin-left: auto; 
    margin-right: auto;
}

/* Force the vertical video container to be 9:16 */
.video-item.vertical iframe {
    aspect-ratio: 9 / 16;
}

/* --- Mobile Responsiveness --- */
/* When screen is 768px or smaller (Tablets/Phones) */
@media (max-width: 768px) {
    /* Changes both video grids to 1 column */
    .video-grid-landscape,
    .video-grid-portrait,
    .projects-grid {
        grid-template-columns: 1fr;
        padding: 0 20px; /* Slightly smaller side padding for mobile */
    }
}

@media (max-width: 1400px) {
  .instagram-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1200px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .photo-item:nth-child(3) {
    grid-column: 1 / -1;
    justify-self: center;
    width: 100%;
    max-width: 500px;
  }

  .project-item:nth-child(3) {
    grid-column: 1 / -1;
    justify-self: center;
    width: 100%;
    max-width: 500px;
  }
   
     .bottom-images-container {
    grid-template-columns: 1fr; /* ONE COLUMN layout */
}
}

@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: 1fr;
    padding: 0 40px;
  }

  .photo-item {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
  }

  .photo-item:nth-child(3) {
    max-width: 600px; /* match image width above */
    margin: 0 auto;
  }

  .photo-item img {
    width: 100%;
    height: auto;
  }

  .bottom-images-container {
    grid-template-columns: 1fr;
    margin-left: 8%;
    margin-right: 8%;
  }
  
  .para{
font-size: 13px;
}

.big{
  font-size: 25px;
  margin-bottom: 2%;
}

.small{
  font-size: 18px;
  font-weight: 400;
}
   
}

@media (max-width: 860px) {
  
   nav .right a {
       font-size: 22px;
    }
    
    nav .right a:last-child{
        color: var(--text-color);
        background-color: transparent;
        padding: 0;
    }
    
    nav .right a span{
        display: none;
    }  
  
  .med-para{
    font-size: 13px;
  }
  
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .video-grid-landscape,
    .video-grid-portrait,
    .projects-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }
    
    /* On mobile, allow the vertical grid to take full width again */
    .video-grid-portrait {
        max-width: 100%;
    }
}

@media (max-width: 700px) {
  .instagram-grid {
    grid-template-columns: 1fr;
  }
  
}

@media (max-width: 650px) {
    
        nav .left a {
       font-size: 15px;
    }
  
  nav .right a{
    font-size: 15px
  }
    }

@media (max-width: 480px) {
  
        nav .left a {
       font-size: 12px;
       margin-right: auto;
    }
  
  nav .right a{
  margin-left: auto;
  }
  
    }
