/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}
body {
  line-height: 1;
}
ol,
ul {
  list-style: none;
}
blockquote,
q {
  quotes: none;
}
blockquote:before,
blockquote:after,
q:before,
q:after {
  content: "";
  content: none;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}
* {
  box-sizing: border-box;
}
/*-----------------RESET ENDS HERE---------------------*/

/*-----------------MY STYLE RULES---------------------*/

/*-----------------LAYOUT---------------------*/
body {
  background-color: #f5efe0;
  color: #000000; /*font colour*/
  font-family: "Quicksand", Arial, Helvetica, sans-serif;
  font-weight: 350;
  overflow-x: hidden; /*to prevent horizontal scrolling*/
}
/*--------------------HEADER---------------*/
header {
  position: fixed;
  width: 100%; /* Ensures the header spans the full width */
  padding-bottom: 1rem;
  z-index: 1000; /*bring header forward*/
  background-color: #f5efe0ea;
}

header nav ul {
  display: flex;
  justify-content: center; /* Center items horizontally */
}

header nav li {
  padding: 0.2rem; /* Add spacing between items */
  margin: 0.2rem 0.8rem; /*creates space between items*/
  font-size: 0.8em;
  font-weight: 350;
}

/*-----------------MAIN & SECTIONS-------------------*/

#introduction h1,
#project1 h1,
#project2 h1 {
  position: absolute;
  left: -9999px; /*hides it visually but is still avaliable for screen readers*/
}

/*INTRODUCTION*/
/*start animation*/
#introduction {
  min-height: 90vh;
  opacity: 0;
  transform: translateY(50px); /* Start position */
  animation: slideUp 1s ease-out forwards;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/*end animation*/

#introduction img {
  display: block;
  width: 280px;
  height: auto;
  margin: 0 auto;
  padding-top: 15rem;
}

#introduction h2 {
  font-family: "Source Serif 4", serif;
  display: flex;
  justify-content: center;
  padding-top: 1rem;
  font-weight: 350;
  font-style: italic;
  font-size: 0.8em;
}

/*ABOUT*/

#about {
  min-height: 90vh;
  padding-top: 2rem;
  line-height: 1.6;
  margin-left: 1rem;
  display: flex;
  flex-direction: column;
}

.highlight {
  font-size: 1.5em;
  font-weight: 400;
}

#about p {
  font-size: 1.5em;
  font-weight: 100;
}

#about a {
  display: flex;
  justify-content: right;
  padding: 0.5rem 2rem 2rem 2rem;
  font-size: 1.1em;
}

/*MY STORY*/

#story {
  min-height: 100vh;
  padding-top: 4rem;
  font-size: 1.2em;
  line-height: 1.8;
  margin-left: 1rem;
}

#story p {
  padding: 0.5rem 0;
}

#story h3 {
  font-size: 1.5em;
  font-weight: 400;
  padding-bottom: 0.5rem;
}

#story ul li {
  padding-bottom: 1rem;
}

/*PROJECTS*/

#projects {
  min-height: 100vh;
  padding-top: 3rem;
  margin-bottom: 3rem;
  line-height: 1.6;
  margin-left: 1rem;
  display: flex;
  flex-direction: column;
}

#projects h2 {
  font-size: 1.5rem;
  font-weight: 400;
  padding-top: 0.5rem;
}

#projects a,
.case1,
.case2 {
  font-size: 1em;
}

.case1,
.case2 {
  display: flex;
  justify-content: right;
  padding: 1rem;
}

#projects p {
  font-size: 1.2em;
  font-weight: 100;
}

/*CASE STUDY*/
#project1,
#project2 {
  padding-top: 3rem;
  min-height: 100vh;
  margin-left: 1rem;
  display: flex;
  flex-direction: column;
}
#project1 p,
#project2 p,
#project1 ul li,
#project2 ul li {
  font-size: 1.2em;
  font-weight: 350;
  line-height: 1.8;
}

#project1 li,
#project2 li {
  line-height: 1.6;
  padding: 1rem 0;
}

#project1 h2,
#project2 h2,
#story h1,
#story h2 {
  font-size: 2em;
  font-weight: 500;
  line-height: 1.6;
  padding: 0.5rem 0;
}

/*-----------------FOOTER------------------*/

footer {
  bottom: 0;
  padding-top: 1rem;
  min-height: 20vh;
  background-color: #59735b;
  color: #fff;
  margin-top: auto;
}

footer p {
  bottom: 0;
  font-size: 0.8em;
  text-transform: uppercase;
  display: flex;
  justify-content: center;
  font-weight: 200;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 0.6rem;
  margin-bottom: 1.2rem;
  border: none;
  background: none;
}

.social-icons img {
  width: 2.5rem;
  transition: transform 0.5s ease-in-out;
}

.social-icons img:hover {
  transform: scale(1.2);
}

/*----------------------LINKS-------------------*/
a {
  color: #000000;
}
nav li a:link,
nav li a:visited,
footer a:link,
footer a:visited,
main a:hover,
main a:focus {
  text-decoration: none;
}

main a:link,
main a:visited,
main a:active,
footer a:hover,
footer a:active,
nav li a:hover,
nav li a:focus,
nav li a:active {
  text-decoration: underline;
  color: #59735b; /*font colour*/
}

@supports (animation-timeline: view()) {
  @keyframes rise {
    from {
      bottom: -2.6rem;
    }
    to {
      bottom: 2.4rem;
    }
  }
  #back-to-top {
    animation: rise auto linear both;
    animation-timeline: scroll();
    animation-range: 300px 1200px;
  }
}

/*-----------------BUTTON STYLING------------------*/
#back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #59735b;
  padding: 0.5em;
  border-radius: 1em;
  font-size: 1em;
}

#back-to-top a {
  display: none;
}

#back-to-top:hover a {
  display: contents;
  transition: display 1s ease-in-out;
  color: #000000;
}

/****************MEDIA QUERIES********************/

@media (min-width: 360px) {
  header nav ul li {
    font-size: 1em;
  }

  #introduction img {
    width: 350px;
  }

  #introduction h2 {
    font-size: 1em;
  }
}

@media (min-width: 400px) {
  .highlight,
  #about {
    font-size: 1.5em;
  }

  #about a {
    font-size: 1.4em;
  }
}

@media (min-width: 500px) {
  #introduction img {
    width: 400px;
  }
}

@media (min-width: 600px) {
  #introduction img {
    width: 500px;
  }
}

@media (min-width: 800px) {
  #introduction img {
    width: 600px;
  }
}
