
/* let's make our nav prettier */
  nav {
    /* fix nav to top, home link on left, other links on right fixed height, keep on top of everything.*/
    position: fixed;
    top: 0;
    width: 100%;
    display: grid;
    /* 4 columns, 1left, 1 empty to fill space, rest on right / end */
    grid-template-columns: auto 1fr repeat(2, auto);
    align-items: center;
    gap: 1.44rem;
    padding: 0 1rem;
    height: 60px;
    background-color: rgb(16 16 16 / .8);
    z-index: 999;
    
  }

  /* target the first link to act as the 'Logo' */
  nav a:first-child {
    font-weight: bold;
    text-transform: uppercase;
    grid-column: 1; 
  }

  /* justify the "not-the-mommy" links to the right / end. */
  nav a:not(:first-child) {
    justify-self: end;
  }

/* anchor tag pseudo elements */
  a{
    font-family: 'Inter', sans-serif;
    /* to underline or not to underline, that is the question */
    text-decoration: none;
  }

  a:link,
  a:visited {
    color: rgba(151, 193, 234, 0.85);
    transition: color 0.5s;
  }

  a:hover,
  a:focus {
    color: rgba(236, 121, 66, 1);
    text-decoration: none;
    /*background-color: rgba(240, 240, 240, 0.15);*/
  }
  a:active {
    color: rgba(151, 193, 234, 0.85);
  }

/* let's beautify & animate the header */



  /* moved <h1> in the html to inside the header */
  header {
    display: grid;
    /* Define a single cell grid */
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    place-items: self-end; 
    width: 100%;
    overflow: hidden;
  }

  header img {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    
  }

  header h1 {
    grid-column: 1;
    grid-row: 1;
    z-index: 1; /* Sit on top of the image */
    width: 100%;
    transform: translateY(2rem);
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
    animation-delay: 0.6s; 

  }


/* add affordance with hover state on images */
  #gallery figure{
    overflow: hidden;
    cursor: pointer; /* 1 guess what this does... */
  }

  #gallery img{
    transition: transform 0.5s;
  }

  #gallery figure:hover img{
    transform: scale(1.2);
    
  }


/* animate the dialog box too?? */
  dialog {
    display: none;
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    border: none;
    margin: auto;
    padding: 0;
    transition: all 0.4s ease-out allow-discrete;
    place-items: center;
  }

  dialog[open] {
    display: grid;
    opacity: 1;
    transform: scale(1) translateY(0);
  }

  /* this is quite esoteric */
  @starting-style {
    dialog[open] {
      opacity: 0;
      transform: scale(0.9) translateY(20px);
    }
  }

  dialog::backdrop {
    background-color: rgb(0 0 0 / 0);
    transition: all 0.4s ease-out, display 0.4s allow-discrete, overlay 0.4s allow-discrete;
  }
  /* also a bit advanced */
  @starting-style {
    dialog[open]::backdrop {
      background-color: rgb(0 0 0 / 0);
    }
  }

  dialog[open]::backdrop {
    background-color: rgb(0 0 0 / 0.8);
  }


/* the default button is ugly */

  dialog button {
    /* jettison defaults*/
    background: none;
    border: 2px solid rgb(205 129 1);
    color: rgb(205 129 1);
    font-family: inherit;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    padding: 0.482rem;
  }

  dialog form{
    width: 100%;
    text-align: center;
    padding: 0 1.2rem 0.6rem;
  }

  dialog button:hover {
    background-color: rgb(205 129 1);
    color: white;
  }

  dialog button:active {
    transform: scale(0.95);
  }

  /* again a bit advanced to remove default blue*/ 
    dialog button:focus {
      outline: none; 
      /* box-shadow: 0 0 0 3px rgb(205 129 1 / 0.5); */
      border-color: rgb(205 129 1);
    }
  
/* other animations i.e. header h1 */

@keyframes fadeInUp {
  0%{
    opacity: 0;
    transform: translateY(2.44rem);
  }
  100%{
    opacity: 1;
    transform: translateY(0);
  }
  
}

/* need to work on placing h1 */
@media screen and (min-width: 550px) {
  header img{
    aspect-ratio: 16/6;
    object-fit: cover;
    object-position: center center;
  }
}
