/*
COLOR PALETTE

Dark green    #3c8453
Sandy beige   #bcaa96
Dark gray     #222222
Light gray    #d3d4d6
Off-white     #f6f6f6
*/

/* GLOBAL STYLES 
------------------------------------*/

@import url("variables.css");
@import url("global.css");
@import url("projects.css");
@import url("home.css");
@import url("animations2.css");
@import url("animations1.css");

/* button contact */
  #my-popover {
  display: none;
 
  width: 33%;
  padding: 1rem 1.5rem;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  font-family: 'Ubuntu', sans-serif;
  
   container-type: inline-size;
  container-name: popover-container;
}


#my-popover:popover-open {
  display: grid;
  grid-template-columns: 1fr; /* stacked by default (small) */
  max-width: 100vw; /* default to full width for small */
  padding: 1rem;
}

#my-popover:popover-open::backdrop {
  background-color: rgba(0, 0, 0, 0.45);
}

/* CLOSE BUTTON */
.popover-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--grey-9);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  user-select: none;
  transition: color 0.3s ease;
}
.popover-close:hover,
.popover-close:focus {
  color: var(--accent-green);
  outline: none;
}

/* CONTAINER GRID: Image + Text */
.popover-container {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

/* PHOTO */
.popover-photo {
  width: 100%;
  max-width: 220px;
  border-radius: 0.5rem;
  justify-self: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  object-fit: cover;
  aspect-ratio: 3 / 4;
}

/* TEXT CONTAINER */
.popover-text {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.popover-text h3 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--accent-green);
  margin: 0;
}

.popover-text p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--grey-9);
}

.popover-text a {
  color: var(--accent-green);
  text-decoration: underline;
  transition: color 0.3s ease;
}
.popover-text a:hover,
.popover-text a:focus {
  color: var(--accent-beige);
  text-decoration: none;
  outline: none;
}
 

/* BIO paragraph */
.bio {
  margin-block-start: 0.5rem;
  color: var(--grey-7);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.4;
}
.popover-container {
  display: grid;
  gap: 1.5rem;
  align-items: center;    
}


html {
    box-sizing: border-box;
}
*, *::before, *::after {
    box-sizing: inherit;
}
html, body {
    height: 100%;
}
body {
    background: var(--grey-2);
    color: var(--grey-9);
    margin: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1rem;
}

h1, h2, h3 {
    font-family:  var(--font-heading);
    font-weight: 400;
    margin: 0;
}

h1 {
    font-size: 3rem;
    line-height: 1;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.5rem;
}
/*logotype*/
@keyframes logoPop {
  0% {
    opacity: 0;
    transform: scale(0.5) rotate(-10deg);
  }
  60% {
    opacity: 1;
    transform: scale(1.1) rotate(5deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

.logotype {
  display: inline-block;
  font-weight: 700;
  color: var(--accent-green);
  text-decoration: none;
  animation: logoPop 1.2s ease-out forwards;
}

/* Link styles */
a {
    color: var(--accent-green);;
}
a:hover {
    color: var(--accent-beige);
    text-decoration: none;
}
footer a {
    color: var(--accent-beige);
}
footer a:hover {
    color: var(--accent-green);
}

.btn {
    background: var(--accent-green);
    color: var(--grey-1);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 1rem;
    display: inline-block;
    padding: .5rem;
    letter-spacing: .1em;
    line-height: 1;
    border-radius: 2.5rem;
    transition: all 0.3s ease;
    
}

.btn:hover,
.btn:focus {
  background: var(--accent-beige);
  color: var(--grey-9);
  transform: scale(1.05);
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.2);
}

.content-wrapper {
    margin: 0 auto;
    padding: 1rem; /* Default for mobile */
    max-width: 56rem;
}

.content-bg {
    background: var(--grey-3);
    padding: 1.25rem; /* Mobile-first default */
}

/* ############ 3. Navigation ############ */
.logo {
  max-width: 90px;
}

.navWrap {
  position: sticky; 
  top: 0;
  z-index: 9999;
  height: 48px;
  width: 100%;
  background-color: var(--grey-7);
  border-bottom: 1px solid #e0e5eb;
  box-shadow: 0 0.0625rem 0.5rem var(--grey-8);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-body);

}

input#navToggle {
  display: none;
}

input#navToggle ~ label {
  position: relative;
  padding: 0.25rem;
  width: 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: 0.75rem;
  height: 0.125rem;
  width: 1.75rem;
  opacity: 1;
  background: #fff;
  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: 3rem;
  left: -110%;
  width: 100%;
  transition: 0.22s ease-in-out;
}

nav::after {
  content: "";
  position: absolute;
  top: 0;
  z-index: -1;
  height: 100vh;
  width: 100%;
  background-color:var(--grey-5);
  background-size: cover;
}

nav ul {
  list-style-type: none;
}

nav ul li a {
  display: inline-block;
  text-decoration: none;
  width: 100%;
  padding: 0.75rem 1rem;
  color: #fff;
  border-bottom: solid 1px rgba(255, 255, 255, 0.5);
  transition: 0.14s ease-in-out;
   position: relative;
  transition: color 0.3s ease;
}

nav ul li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--accent-green);
  transition: width 0.3s ease;
}

nav ul li a:hover {
  color: var(--accent-green);
  background: #e0e5eb;
}

nav ul li a:hover::after {
  width: 100%;
}

nav ul li:last-of-type::before {
  content: "";
  display: block;
  padding: 0.5rem;
}

nav .btn {
  background: #fff;
  border-bottom: none;
  border-radius: 4px;
  box-shadow: inset 0 0 5px #eeb80c;
  color: var(--accent-green);
  width: 40%;
  padding: 0.25rem 0.6rem;
  letter-spacing: 1px;
  text-shadow: 0 0 1px var(--accent-green);
  display: flex;
  justify-content: center;
  margin:auto;
}

nav .btn:hover {
  background-color: var(--accent-green);
  box-shadow: inset 0 0 5px var(--accent-beige);
  color: #fff;
}






/* FOOTER
------------------------------------*/
footer {
    background: var(--grey-9);
    color: var(--grey-3);
    text-align: center;
    padding: 1rem;
}

.socials {
    list-style-type: none;
    padding: 0;
}
.socials li {
    display: inline-block;
    margin-inline-start: 1rem;
}
.socials img {
    width: 2rem;
}
.socials img:hover {
    opacity: 0.5;
}

/* ------------------------------------ */
/* MEDIA QUERIES (converted to min-width) */
/* ------------------------------------ */

@media screen and (min-width: 40.625rem) { /* originally 650px */
    .home .content-wrapper {
        padding: 2rem;
    }
    .content-bg {
        padding: 2rem;
    }
}

@media screen and (min-width: 75rem) {
    .download-link {
        position: absolute;
    }
}

@media screen and (min-width: 31.25rem) {
    .resume header::before {
        height: 15rem;
    }
    h1 {
        font-size: 3rem;
    }
    h2 {
        font-size: 1.5rem;
    }
}

@media screen and (min-width: 50rem) {
    .project-item {
        display: flow-root;
    }
    .project-item img {
        width: 19rem;
        float: inline-start;
        margin-inline-end: 1.5rem;
    }

    .work-item {
        display: grid;
        grid-template-columns: 19rem 1fr;
        column-gap: 2rem;
    }
    .work-summary p:first-child {
        margin-top: 0;
    }
}

@media screen and (min-width: 40rem) and (max-width: 53.75rem) {
     .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  /* ######### 10a-ii. Navigation, Large screen rules ######### */
  .navWrap {
    display: grid;
    grid-template-columns: 100px minmax(auto, 1100px);
    justify-content: center;
    height: 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 {
    width: auto;
    background: var(--accent-green);
    color: #fff;
    letter-spacing: normal;
    text-shadow: none;
    box-shadow: none;
  }

  nav.btn:hover {
    box-shadow: inset 0 0 5px var(--accent-green);
    background-color: #223054;
  }
}


@media screen and (min-width: 53.75rem) {
    footer {
        display: flex;
        justify-content: space-between;
        padding: 0 2rem;
        text-align: unset;
    }
    .project-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  /* ######### 10a-ii. Navigation, Large screen rules ######### */
  .navWrap {
    display: grid;
    grid-template-columns: 100px minmax(auto, 1100px);
    justify-content: center;
    height: 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 {
    width: auto;
    background: var(--accent-green);
    color: #fff;
    letter-spacing: normal;
    text-shadow: none;
    box-shadow: none;
  }

  nav.btn:hover {
    box-shadow: inset 0 0 5px var(--accent-beige);
    background-color: #223054;
  }

}



/* LARGE: Two columns, max 1/3 viewport width */
@container popover-container (min-width: 480px) {
  #my-popover {
    max-width: 33.33vw;  /* max 1/3 viewport width */
    width: auto;
    padding-block: 1.5rem;
    padding-inline: 2rem;
  }
  .popover-container {
    grid-template-columns: auto 1fr; /* side by side */
    gap: 2rem;
  }
  .bio {
    display: block;
  }
}

/* MEDIUM: Two columns without bio */
@container popover-container (min-width: 320px) and (max-width: 479px) {
  #my-popover {
    max-width: 26rem;
    width: auto;
    padding-block: 1.25rem;
    padding-inline: 1.5rem;
  }
  .popover-container {
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
  }
  .bio {
    display: none;
  }
}

/* SMALL: stacked, full viewport width */
@container popover-container (max-width: 319px) {
  #my-popover {
    max-width: 100vw;
    width: 100vw;
    border-radius: 0;
    padding-block: 1rem;
    padding-inline: 1rem;
  }
  .popover-container {
    grid-template-columns: 1fr; /* stacked */
    gap: 1rem;
  }
  .popover-photo {
    max-width: 100%;
    aspect-ratio: auto;
    border-radius: 0.25rem;
    justify-self: center;
  }
  .bio {
    display: none;
  }
}


