/*
Colors used:
Background (whipped cream): #fdf9f4;
Text/ headings (espresso): #5c4630;
Accent/ Buttons(lemon zest): #f7d488;
Hover state/ Icons (Mint Leaf): #a0db5d;
Subtle Highlights (Berry Glaze): #d7a9b9;
*/

html {
  scroll-behavior: smooth;
  scroll-padding-top: 220px;
}

* {
  box-sizing: border-box;
}

main {
  padding-top: 150px;
}

.has-hero main {
  padding-top: 120px;
}

#about-page main {
  padding-top: 150px;
}

/* Typography */ 
body{
   font-family: "DM Serif Display", serif; 
   font-weight:400;
   font-style: normal;
   line-height: 1.6;
   font-size: 16px;
   background-color: #fdf9f4;
} 

html, body {
  margin: 0;
  padding: 0;
}

h1 {
  font-size: 2em;
  margin-bottom: 0.5em;
}

h2 {
  font-size: 1.6em;
  margin-top: 2.5em;
  margin-bottom: 1.2em;
}

h3 {
  font-size: 1.3em;
  margin-top: 1.8em;
  margin-bottom: 1em;
}

p {
  font-family: "Work Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  margin-bottom: 1em;
  line-height: 1.8;
}

#hero {
  background-color: #f7d488;
  padding: 0;
  display: inline-block;
  width: 100%;
}

#hero h1 {
  text-align: center;
  margin-top: 0;
}

header,
#hero {
  width: 100vw; 
  margin-left: calc(-1 * (100vw - 100%) / 2); 
}

nav a, .button, .footer-call, .footer-email {
  font-family: "Work Sans", sans-serif;
}
/*setting images to full with*/

float-text img{
  float: left;
  margin: 0 0.625em 0.625em 0;
}

ul {
    font-size: 18px;
    padding-left: 20px;
    margin-bottom: 1em;
    font-family: "DM Serif Display", serif; 
    font-weight:400;
    font-style: normal;
    line-height: 1.3;
}

li {
    margin-bottom: 0.5em;
}

h1, h2, h3, p, ul, li {
    color: #5c4630;        
}

img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.project-main picture {
  margin-top: 100px;
  margin: 80px 0;
}
 /* css code for links*/

a {
  color: #5c4630;
  text-decoration: underline; /* underlining */
}

a:hover {
  color: #a0db5d;
  text-decoration: underline; /* Underlining when hovering over a link */
}

a:visited { /* visited link */
  color: #5c4630;
}


a:active { /* selected link */
  color: #f7d488;
}

/*pseudo class for accessibility*/
a:hover
a:focus {
  color:#a0db5d;
  text-decoration: underline;
}

/* button class*/ 
.button {
  display: inline-block; /* since the <a> tag is inline by default, we need to change this to inline-block, but more on this in the next exercise */
  background-color: #d7a9b9;
  color: #58432E; /* needed to override the default link color */
  font-size: 18px;
  font-weight: 500;
  text-decoration: none;
  padding: 0.75em 1.5em;
  border-radius: 30px;/*rounded corners */
  border-bottom: 2px solid #5c4630;
  transition-duration: 0.2s;
  transition-property: opacity;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.button:hover {
  background-color: #a0db5d;
  color: #ffffff;
  transform: translateY(-2px);
  text-decoration: none;
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
}

.button:active {
  opacity: 0.8;
  text-decoration: none;
}

.button.contact {
  background-color: transparent;
  color: #5c4630;
  text-transform: uppercase;
  border: 2px solid #5c4630;
  margin-top: 15px; 
  transition: background-color 0.3s ease, color 0.3s ease;
}

.button.contact:hover {
  background-color: #d7a9b9;
  color: #ffffff;
}

.button.contact:active {
  background-color: #a0db5d ;
  color: #ffffff;
}

/* style the <header elements*/

header {
background-color:#f7d488;
width: 100%;
padding: 10px 0;
border-bottom: 1px solid #f7d488;
position: fixed;
z-index: 10;
}

.logo {
  max-width: 150px;
  margin: 10px;
  text-align: center;
}

/*navigation styling*/

nav > ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

nav > ul > li {
  margin: 10px 0;
}

nav > ul > li > a {
 color: #5c4630;
 font-weight: 700;
 text-transform: uppercase;
 padding: 0 15px;
 transition: color 0.3s ease, transform 0.2s ease;
}

nav > ul > li > a:visited {
  color: #5c4630;
}

nav > ul > li > a:hover,
nav > ul > li > a:focus {
   text-decoration: none;
   color: #d7a9b9;
   transform: scale(1.05)
}

nav > ul > li > a:active {
  color: #5c4630;
}

.navtoggle li:not(:last-child) {
  display: none;
}

 /* style the hamburger icon */

nav {
  height: auto;
  padding: 0;
  margin-bottom: 0;
  margin-top: 4px;
  animation: nav-slide-in;
  animation-duration: 0.8s;
  animation-timing-function: ease-out;
}

.topnav {
  position:relative;
  display:flex;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  background-color: #f7d488;
 }

.navtoggle {
  position: relative;
  display:flex;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  background-color: #f7d488;
}

.navtoggle li:not(:last-child) {
  display: none;
}

.navtoggle.responsive li {
  display: block;
  padding: 10px 0;
  border-top: 1px solid #ebebe4;
}

.navtoggle.responsive nav {
  text-align: center;
}

.navtoggle.responsive li:last-child  {
  padding: 0 0 10px;
}

.navtoggle li:last-child a.icon {
  position: absolute;
  right: 0;
  top: 2px;
  font-size: 20px;
  padding-right: 0;
}

.main-image {
  float: left;
  height: auto;
  width: 30%;
  margin: 0 1em 1em 0;
  border-radius: 1.25em;/*rounded corners */
}

.baking {
  width: 100%;
  max-width: 100%;
  height: auto;
}

.custom-footer {
  background-color: #f7d488;
  padding: 60px 30px;
  border-top: 2px solid #d7a9b9;
  text-align: center;
  color: #5c4630;
  font-family: 'Work Sans', sans-serif;
}

.footer-message h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.6em;
  margin-bottom: 0.4em;
}

.footer-message p {
  max-width: 600px;
  margin: 0 auto 1em;
  font-size: 1em;
  line-height: 1.8;
}

.footer-location {
  font-style: italic;
  margin-bottom: 1.5em;
}

.highlight {
  color: #5c4630;
  font-weight: 600;
}

.footer-buttons {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 1.5em;
  flex-wrap: wrap;
}

.footer-call,
.footer-email {
  padding: 10px 20px;
  border: 2px solid #5c4630;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  color: #5c4630;
  transition: background-color 0.3s ease;
}

.footer-call:hover,
.footer-email:hover {
  background-color: #e6f2d7;
}

.footer-social-icons a {
  font-size: 1.5em;
  margin: 0 10px;
  color: #5c4630;
  text-decoration: none;
}

.footer-social-icons a:hover {
  color: #a0db5d;
}

.footer-bottom-note {
  margin-top: 30px;
  font-size: 0.9em;
  color: #7a6a58;
}

/* Layout styling */

.resume-button-wrapper{
  clear: both;
  margin-top: 1em;
}
/* layout styling*/

.container {
  padding: 20px 20px;
  margin: auto;
  max-width: 1200px;
}

.container h2 {
  color: #5c4630;
  text-decoration: none;
}

.container h3{
  margin-bottom: 0;
}

.container p{
  margin: 4px;
}

#table-of-contents {
  display: none;
  position: fixed;
  bottom: 5.5rem;
  right: 1rem;
  left: auto;
  width: min(92vw, 340px);
  background: #fdf9f4;
  z-index: 1000;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  text-align: left;
  max-height: 70vh;
  overflow: auto;
  scroll-behavior: smooth;
}

#table-of-contents h2 {
  text-decoration: underline;
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1rem;
  text-align: center;
  margin: 0 0 0.5rem;
}

#table-of-contents ul {
  padding: 0;
  margin: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  column-count: 1;
  column-gap: 0;
}

#table-of-contents li {
  margin-bottom: 0.6rem;
  text-align: left;
  margin: 0;
  display: block;
  width: 100%;
}

#table-of-contents a {
  font-size: 0.95rem;
  color: #5c4630;
  text-decoration: none;
  display: block;
  padding: 10px 12px;
  line-height: 1.3;
  letter-spacing: 0.02em;
  border-radius: 10px;
  width: 100%;
}

#table-of-contents a:hover {
  color: #a0db5d;
  text-decoration: underline;
}

#table-of-contents li + li a {
  border-top: 1px solid rgba(92,70,48,0.12);
}

#table-of-contents a:hover {
  background: rgba(215,169,185,0.12);
  text-decoration: none;
}

.row {
  margin: 25px 0; /* 25px top and bottom, 0 left and right */
}

.toc-toggle {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 1001;
  background-color: #fff;
  border: 2px solid #d7a9b9;
  width:56px;
  height: 56px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  cursor: pointer;
  font-size: 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#work .row { 
  padding-bottom: 25px; 
  border-bottom: 1px solid #4a4a4a;
} 

.page-title {
  font-size: 2.2em;
  margin: 40px 0 20px;
  text-align: center;
  color: #5c4630;
}

.content-wrapper {
  display: flex;
  flex-direction: row;
  gap: 2rem;
}

.hamburger-icon {
  display: inline-block;
  width: 24px;
  height: 20px;
  position: relative;
}

.hamburger-icon span {
  background-color: #5c4630;
  position: absolute;
  height: 3px;
  width: 100%;
  border-radius: 3px;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-icon span:nth-child(1) {
  top: 0;
}

.hamburger-icon span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.hamburger-icon span:nth-child(3) {
  bottom: 0;
}

body.toc-open .hamburger-icon span:nth-child(1) {
  top: 50%;
  transform: rotate(45deg);
}

body.toc-open .hamburger-icon span:nth-child(2) {
  opacity: 0;
}

body.toc-open .hamburger-icon span:nth-child(3) {
  bottom: auto;
  top: 50%;
  transform: rotate(-45deg);
}

body.toc-open #table-of-contents {
  display: block;
}

body.toc-open { 
  overflow: hidden;
}


/* Media */
@media only screen and (min-width: 640px) {
  header {
    text-align: unset;
    padding: 10px 0 10px;
  }

  .logo {
    min-width: 150px;
  }

  nav {
    width: auto;
    float: right;
    margin-top: 4px;
  }

  nav > ul {
    margin: 1em 0;
  }

  nav > ul > li {
    display: inline-block;
  }

  .navtoggle li:not(:last-child) {
    display: inline-block;
  }

  .navtoggle li:last-child {
    display: none;
  } 

  .topnav nav {
    display: inline-block;
  };

  main {
    padding-top: 150px;
  }
   
   body{
    font-size: 18px;
    padding: 0;
   }
   
   #hero{
    text-align: center;
   }
   
   #hero span {
    display: block;
   }
   .col-md-6 {
    width: 50%;
   }

   [class*="col-"] {
    float: left;
    padding: 0 10px;
   }
  .row::after {
     content: "";
     clear: both;
     display: table;
   }
   #about-page h3 { 
    margin-top: 0;
   }

   .page-title {
    margin-top: 20px;
   }

  #table-of-contents {
    width: min(92vw, 360px);
  }
}  
/* Medium screen mobile.tablet*/


@media only screen and (min-width: 1024px) {
  .col-lg-7 {
    width: 60%;
  }

  .toc-toggle {
    display: none;
  }  

  #table-of-contents {
    display: block;
    position: sticky;
    top: 200px;
    max-width: 250px;
    max-height: calc(100vh - 220px);
    overflow: auto;
    overscroll-behavior: contain;
    background: none;
    box-shadow: none;
    padding: 1rem 1.5rem 1rem 0;
    padding-right: 0.5rem;
    float: left;
    align-self: flex-start;
    z-index: 5;
    text-align: left;
    border-right: 2px solid #d7a9b9;
    font-size: 0.75em;
  }

    /* nice, slim scrollbar (supported browsers) */
  #table-of-contents {
    scrollbar-width: thin;
    scrollbar-color: #d7a9b9 transparent;
  }
  #table-of-contents::-webkit-scrollbar {
    width: 8px;
  }
  #table-of-contents::-webkit-scrollbar-track {
    background: transparent;
  }
  #table-of-contents::-webkit-scrollbar-thumb {
    background: #d7a9b9;
    border-radius: 8px;
  }

  .col-lg-5 {
    width: 40%;
  }

  .container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  }


  body{
    font-size: 22px;
  }
  .main-image {
  width: 35%;
  }

  .logo {
  max-width: 300px;
  }

  nav {
  width: auto;
  float: right;
  margin-top: 4px;
   }

   .has-hero main {
  padding-top: 150px;
}

  .main {
    display: flex;
    gap: 2rem;
  }

  .main-content {
    flex: 1;
  }

  .main-container {
    padding-left: 1.5rem;
  }

  .float-text {
    padding-top: 100px;
  }

  #hero {
    margin-top: 50px;
  }

  #about {
    padding-top: 40px;
  }

  main > div:not(#table-of-contents) {
    flex: 1;
  }

  #table-of-contents h2 {
    font-size: 1em;
    text-align: left;
    margin-top: 0;
    margin-bottom: 10px;
    text-decoration: underline;
  }

  #table-of-contents ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
  }

  #table-of-contents li {
    margin-bottom: 10px;
    text-align: left;
  }

  #table-of-contents a {
    color: #5c4630;
    font-size: 0.75em;
    text-decoration: none;
    display: block;
    padding: 4px 0 4px 8px;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
  }

  #table-of-contents a:hover {
    color: #a0db5d;
    text-decoration: underline;
  }

  #table-of-contents a.active {
    border-left-color:#d7a9b9;
    font-weight: 600;
    color: #5c4630;
  }

  #table-of-contents {
    display: block;
  }

  #about-page main {
  padding-top: 200px;
  }
}

/* large screen tablet.laptop.desktop*/

@media only screen and (min-width: 1920px) {
} /* xtra large screen */

/* animations*/

/*upper bead animation*/
@keyframes color-change-bead {
  from {fill: #B81946;}
  to {fill: #02b58b;}
}

.upper-pearl {
  animation-duration: 4s;
  animation-name: color-change-bead ;
  animation-iteration-count: infinite;
  animation-direction: alternate;
  animation-timing-function: linear;
} /*long version for learning*/

/*inner flame animation*/
@keyframes color-change-flame {
  from {fill: #d98767;}
  to {fill: #de4108;}
}

.inner-candle {
  animation-duration: 4s;
  animation-name: color-change-flame ;
  animation-iteration-count: infinite;
  animation-direction: alternate;
  animation-timing-function: linear;
} /*long version for learning*/

@keyframes flame-move {
  from {transform: translateX(-2px);}
  to {transform: translateX(2px);}
}

.flame {
  animation-duration: 0.6s;
  animation-name: flame-move;
  animation-iteration-count: infinite;
  animation-direction: alternate;
  animation-timing-function: ease-in-out;
  transform-origin: center;
  display: inline-block;
}

@keyframes nav-slide-in {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
 }


