/*
COLOR PALETTE
Light beige oklch(0.922 0.0263 82.38)
Very light beige oklch(0.972 0.0263 82.38)
Dark beige oklch(0.802 0.0263 82.38)
Very dark beige oklch(0.472 0.0263 82.38)
Black / beige oklch(0.252 0.0263 82.38)
Accent green oklch(0.5688 0.0862 132.87)
accent green light oklch(0.7688 0.0862 132.87)
accent green dark oklch(0.3788 0.0862 132.87)


/* GLOBAL STYLES 
------------------------------------*/

html {
    box-sizing: border-box;
    font-size: 1rem;
   
}
*, *:before, *:after {
    box-sizing: inherit;
}
html, body {
    block-size: 100%;
}

/* starting to try mobile first style */

body {
    background: oklch(0.972 0.0263 82.38); 
    margin: 0;
    font-family: "Spinnaker", sans-serif;
    font-size: 1rem;
    line-height: 1.4;
}

h1, h2, h3 {
     font-family: "Oswald", sans-serif;
     font-weight: 400;
     margin: 0;
}

h1 {
    font-size: 2rem;
    line-height: 1.1;
    font-weight: 700;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.5rem;
}


/* links */
a {
    color:  oklch(0.5688 0.0862 132.87);
}
a:hover {
    color: oklch(0.3788 0.0862 132.87);
    text-decoration: none;
}
footer a {
    color: oklch(0.5688 0.0862 132.87);
}
footer a:hover {
    color:  oklch(0.3788 0.0862 132.87);
}
.btn {
    background:   oklch(0.5688 0.0862 132.87);
    color: oklch(0.922 0.0263 82.38);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 1rem;
    display: inline-block;
    padding-block: 0.438rem;
    letter-spacing: 0.1em;
    line-height: 1;
    border-radius: 0.25rem;
}

.content-wrapper {
    margin: auto;
    padding: 0.625rem;
    max-inline-size: 56.25rem;
}

/* NAV BAR ---------*/ 
.logo {
  max-width: 6.188rem;
 }

.navWrap {
  position: sticky;/*  ** note the menu will not be sticky until we add more page content */
  top: 0;
  z-index: 99;
  height: 3rem;
  inline-size: 100%;
  background-color: oklch(0.472 0.0263 82.38);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

input#navToggle {
  display: none;
}

input#navToggle ~ label {
  position: relative;
  padding: 0.25rem;
  inline-size: 2rem;
  height: 1.25rem;
  height: 2rem;
}

input#navToggle ~ label > span,
input#navToggle ~ label > span::before,
input#navToggle ~ label > span::after {
  content: "";
  display: block;
  position: absolute;
  top: .75rem;
  height: 0.125rem;
  width: 1.75rem;
  opacity: 1;
  background: oklch(0.922 0.0263 82.38);
  transition: 0.14s ease-in-out;
}

input#navToggle ~ label > span::before {
  top: -0.5rem;
}

input#navToggle ~ label > span::after {
  top: 0.5rem;
}

#navToggle:checked ~ label > span {
  width: 0;
  background: rgba(18, 18, 18, 0);
}

#navToggle:checked ~ label > span::before {
  transform: rotateZ(45deg);
  top: 0;
}

#navToggle:checked ~ label > span::after {
  transform: rotateZ(-45deg);
  top: 0;
}

#navToggle:checked ~ nav {
  left: 0;
}

nav {
  position: absolute;
  z-index: -1;
  top: 3.0rem;
  left: -110%;
  width: 100%;
  transition: 0.22s ease-in-out;
}

nav::after {
  content: "";
  position: absolute;
  top: 0;
  z-index: -1;
  height: 50vh;
  width: 100vw;
  background-color: oklch(0.472 0.0263 82.38);
  background-size: cover;
}

nav ul {
    list-style-type: none;
}

nav ul li a {
  display: inline-block;
  text-decoration: none;
  width: 100%;
  padding: .75rem 1rem;
  color: oklch(0.922 0.0263 82.38);
  border-bottom: solid 0.063rem oklch(0.922 0.0263 82.38);
  transition: 0.14s ease-in-out;
}

nav ul li a:hover {
  color: oklch(0.7688 0.0862 132.87);

}

nav ul li:last-of-type::before {
  content: "";
  display: block;
  padding: .5rem;
  }

nav .btn {
  background: oklch(0.802 0.0263 82.38);
  border-bottom: none;
  border-radius: 0.25rem;
  color: oklch(0.472 0.0263 82.38);
  width: 40%;
  padding: 0.25rem .6rem;
  letter-spacing: 0.063rem;
  display: flex;
  justify-content: center;
  margin: auto;
}

nav .btn:hover {
  background-color: oklch(0.5688 0.0862 132.87);
  color: oklch(0.972 0.0263 82.38);
}

/* POPOVER STYLING */ 
.popover {
  display: none; /* hidden by default */
  position: fixed;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  transform: translate(-50%, -50%);
  background-color: oklch(0.7688 0.0862 132.87);
  border-radius: 0.625rem;
  z-index: 100;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  inline-size: 90vw;       /* default width for small screens */
  max-inline-size: 500px;  /* medium/large max */
  max-block-size: 90vh;
  overflow-y: auto;
}

/* Show popover when targeted */
#contact-popover:target {
  display: block;
}


/* Close button */
.close-btn {
  position: absolute;
  inset-block-start: 0.5rem;
  inset-inline-end: 0.5rem;
  font-size: 2rem;
  text-decoration: none;
  color: oklch(0.252 0.0263 82.38);
}

/* Popover content default: grid layout */
.popover-content {
  display: grid;
  gap: 1rem;
  inline-size: 100%;
  align-items: start;
}

/* Image and text default */
.popover-img {
  inline-size: 9.375rem;
  block-size: auto;
  border-radius: 0.625rem;
}

.popover-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#overlay {
  display: none;
  position: fixed;
  inset: 0; /* top:0; right:0; bottom:0; left:0; */
  background: rgba(0, 0, 0, 0.55);
  z-index: 90; /* below popover (100) */
}


/* Show overlay when popover is active */
#contact-popover:target + #overlay {
  display: block;
}


/* Small screens: stacked */
@media (max-width: 35.938rem) {
  .popover {
    inline-size: 100vw;
    block-size: 100vh;
    border-radius: 0;
  }

  .popover-content {
    display: flex;          /* flex layout for stacking */
    flex-direction: column; /* stack vertically */
    align-items: center;    /* center horizontally */
    text-align: center;
    gap: 1rem;              /* spacing between items */
  }

  .popover-img {
    inline-size: 80%;             /* image takes most of the width */
    margin-block-end: 1rem;
  }

  .popover-text {
    inline-size: 100%;
  }

  .bio {
    display: none;          /* hide biography on small screens */
  }
}


/* Medium screens: two columns without bio */
@media (min-width: 36rem) and (max-width: 43.75rem) {
  .popover {
    inline-size: 25rem;
  }

  .popover-content {
    display: grid;
    grid-template-columns: 9.375rem 1fr;
    gap: 1rem;
  }

  .popover-img {
    inline-size: 9.375rem;
    min-inline-size: 9.375rem;
  }

  .bio {
    display: none;
  }
}



/* Large screens: two columns with bio, max 1/3 viewport width */
@media (min-width: 43.813rem) {
  .popover {
    inline-size: 33vw;
    min-inline-size: 25rem;
  }

  .popover-content {
    display: grid;
    grid-template-columns: 9.375rem 1fr;
    gap: 1rem;
  }

  .popover-img {
    inline-size: 9.375rem;
  }

  .bio {
    display: block;
  }
}
/* ANIMATION PAGE -------------------*/


.card-grid2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 1rem;
}

.card-item2 {
  position: relative;
  overflow: hidden;
  text-align: centre;
  background: oklch(0.802 0.0263 82.38);
  border-radius: 1rem;
  padding: 1rem;
  block-size: 200px; /* reserve space for the animation */
}

/* CARD 1: clip-path shape */
.card1::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  inline-size: 100%;
  block-size: 100%;
  background: linear-gradient(110deg, oklch(0.472 0.0263 82.38), oklch(0.7688 0.0862 132.87));
  clip-path: circle(20% at 10% 10%);
  animation: clipAnim 9s infinite alternate ease-in-out;
}

@keyframes clipAnim {
  0% { clip-path: circle(20% at 10% 10%); }
  50% { clip-path: circle(35% at 50% 50%); }
  100% { clip-path: circle(25% at 80% 80%); }
}

/* CARD 2: filter animation */
.card2::before {
 content: "";
 position: absolute;
 inset: 0;
 background: linear-gradient(110deg, oklch(0.7688 0.0862 132.87), oklch(0.472 0.0263 82.38), oklch(0.7688 0.0862 132.87));
background-size: 200% 200%;
animation: slideAnim 9s infinite linear;
}

@keyframes slideAnim {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; } 
  100% { background-position: 0% 50%; }
}

/* CARD 3: */

.card3 h3{ 
  font-size: 6rem;
  font-weight: bold;
  margin-block-start: 10px;
  text-align: center;
  color: oklch(0.7688 0.0862 132.87);
  animation: colourChange 5s infinite alternate;
}

@keyframes colourChange {
  0% { color: oklch(0.7688 0.0862 132.87); }
  25% { color: oklch(0.5688 0.0862 132.87); }
  50% { color: oklch(0.3788 0.0862 132.87); }
  75% { color: oklch(0.7688 0.0862 132.87); }
  100% { color: oklch(0.5688 0.0862 132.87); }
}

/*
COLOR PALETTE
Light beige oklch(0.922 0.0263 82.38)
Very light beige oklch(0.972 0.0263 82.38)
Dark beige oklch(0.802 0.0263 82.38)
Very dark beige oklch(0.472 0.0263 82.38)
Black / beige oklch(0.252 0.0263 82.38)
Accent green oklch(0.5688 0.0862 132.87)
accent green light oklch(0.7688 0.0862 132.87)
accent green dark oklch(0.3788 0.0862 132.87)
*/



/* Responsive: 1 column on small screens */
@media screen and (max-width: 550px) {
  .card-grid2 {
    grid-template-columns: 1fr;
  }
}




/* ANIMATIONS -----------------------*/
.logo {
  animation: slideInLeft 2s ease-out forwards;
}

@keyframes slideInLeft {
  0% {
    opacity: 0;
    transform: translateX(-150px) scale(0.8);
  }
  60% {
    opacity: 1;
    transform: translateX(20px) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}




/* HOME
------------------------------------*/
.home { 
    background: url(../images/botanist\ pattern\ \ copy.png) no-repeat;
    background-size: cover;
    background-color: oklch(0.922 0.0263 82.38);
    display: flex;
    flex-direction: column;
}

.home .content-wrapper {
    flex: 1 0 auto;
    padding: 0.625rem;
}
.content-bg {
    background: oklch(0.972 0.0263 82.38 / 0.9);
    padding: 1.25rem;
}

@media screen and (max-width: 40.625rem) {
    .home .content-wrapper {
        padding: 0.625rem;
    }
    .content-bg {
        padding: 1.25rem;
    }
}



/* RESUME
------------------------------------*/
.resume header::before {
    background: url(..//images/botanist\ pattern\ \ copy.png) center;
    background-size: cover;
    content: "";
    display: block;
    block-size: 12.5rem;
}

.resume-section {
    margin-block-end: 3.125rem;

}

.resume-section h2 {
    border-block-end: 0.125rem dashed oklch(0.5688 0.0862 132.87);
}


@media screen and (max-width: 31.25rem) {
    .resume header::before {
        block-size: 12.5rem;
    }
    h1 {
        font-size: 5rem;
    } 
    h2 {
        font-size: 2.6rem;
    }
}



/*  PROJECTS PAGE -------------------------*/


.card-grid {
    display: grid;
    padding: 0 0.625rem;

  }

  .card-item img {
     width: 100%;
     height: auto;
     border-radius:  0.5rem;
     margin-bottom: 0.625;
     object-fit: cover;
}

.card-item {
   display: grid;
  grid-template-rows: subgrid;
  grid-row: span 3; 
  background: oklch(0.802 0.0263 82.38);
  border-radius: 1rem;
  padding: 1rem;
  transition: transofrm 0.3s ease, box-shadow .55s ease;
  text-decoration: none;
  color: inherit;
}

.card-item:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 10px rgba(0, 0, 0, 0.20);
  z-index: 2;
}

@media screen and (min-width:34.375rem) and (max-width:93.75rem) {
    .card-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(15.625rem, 1fr));
        gap: 1.5rem;
        padding: 1rem;
    }
    .card-item img {
        inline-size: 100%;
         object-fit: cover;
    }
    
}



/* Work Experience
------------------------------------*/
.work-item {
    margin: 1.875rem 0;
}

.work-details p {
    margin: 0;
}

.work-summary p:first-child  {
    margin-block-start: 0;

}

@media screen and (min-width:53.75rem) {
    .work-item {
        display: grid;
        grid-template-columns: 18.75rem 1fr;
        column-gap: 1.25rem;
    }
    .work-summary p:first-child  {
    margin-block-start: 0;
    }

}




/* Education
------------------------------------*/
.education-item p {
    margin-inline: 0;
}

.education-item {
    margin-block: 1.875rem;
    margin-inline: 0;
}

 
 /* ######### 10a-ii. Navigation, Large screen rules ######### */

    
 @media (min-width: 34.313rem) {
 .navWrap {
    display: grid;
    grid-template-columns: 6.25rem minmax(auto, 68.75rem);
    justify-content: center;
    block-size: auto;
  }

  .navToggleLabel {
    display: none;
  }

  nav {
    position: initial;
  }

  nav ul {
    display: flex;
    justify-content: flex-end;
    align-items: center;
  }

  nav ul li a {
    border-bottom: none;;
  }

  nav ul li a:hover {
    background: transparent;
  }

  nav::after, nav ul li:last-of-type::before {
    display: none;
    padding: initial;
  }

  nav .btn {
    inline-size: auto;
    background: oklch(0.802 0.0263 82.38);
    color: oklch(0.472 0.0263 82.38);
    letter-spacing: normal;
    text-shadow: none;
    box-shadow: none;
  }

  nav.btn:hover {
    background-color: oklch(0.5688 0.0862 132.87);
  color: oklch(0.972 0.0263 82.38);
  }

  nav a.active {
  color: oklch(0.252 0.0263 82.38);
  border-radius: 0.313rem;
}

 }


/* FOOTER
------------------------------------*/
footer {
    background: oklch(0.802 0.0263 82.38);
    color: oklch(0.472 0.0263 82.38);
    text-align: centre;
    padding: 0.625rem;
}
.socials {
    list-style-type: none;
    padding: 0;
}
.socials li {
    display: inline-block;
    margin-inline-start: 0.625rem;
}
.socials img {
    inline-size: 2rem;
}
.socials img:hover {
    opacity: 0.5;
}

@media screen and (min-width: 53.75rem) {
        footer {
            display: flex;
            justify-content: space-between;
            padding: 0 1.25rem;
        }
}

@media screen and (max-width: 53.688rem) {
    footer {
        text-align: center;
        padding: 0.625rem;
    }
}
