/* - - - - */
/* colours */
/* - - - - */

html[theme="light"] {
  /* subtle page gradient background  */
  --bg-start: #FBFBFB;
  --bg-end: #EBEDEE;

  --button-primary: #2196F3;
  --button-primary-text: #FFF;

  /* scroll to top button  */
  --fab: #000;
  --fab-icon: #FFF;

  --nav: #FFF;
  --surface: #FFF;
  --shadow: #E0E0E0;
  --footer: #E0E0E0;

  --text: #212121;
  --text-light: #9E9E9E;
  --link: #2196F3;
}

/* dark mode colours */
html[theme="dark"] {
  --bg-start: #151515;
  --bg-end: #0E0E0E;
  
  --button-primary: #42A5F5;
  --button-primary-text: #000;
  --fab: #4A4A4A;
  --fab-icon: #FFF;

  /* nav is lighter than surface in dark mode to show elevation (no shadows) */
  --nav: #353535;
  --surface: #242424;
  --shadow: none;
  --footer: #000;

  --text: #E0E0E0;
  --text-light: #616161;
  --link: #42A5F5;
}

html {
  scroll-behavior: smooth;
  background-image: linear-gradient(120deg, var(--bg-start) 30%, var(--bg-end) 100%);
}

/* some transitions when switching themes */
/* html.transition,
html.transition *,
html.transition *:before,
html.transition *:after {
  transition: all 500ms !important;
  transition-delay: 0 !important;
} */

body {
  margin: 0px;
  overflow-x: hidden;
  font-family: 'Nunito', sans-serif;
  /* prevents the text pointer when hovering over text */
  cursor: default;
}

/* - - - - - - */
/* typography  */
/* - - - - - - */

h1 {
  font-family: 'Inter', sans-serif;
  font-size: 64px;
  font-weight: 700;
  line-height: 90px;
  margin-bottom: 40px;
  color: var(--text);
}

/* used for the project sections  */
h2 {
  font-family: 'Inter', sans-serif;
  font-size: 40px;
  font-weight: 700;

  color: var(--text);
  margin-top: 40px;
  margin-bottom: 40px;
}

/* used for the project card titles */
h3 {
  font-family: 'Inter', sans-serif;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
}

/* used for the subtitle text on the home page  */
h4 {
  font-size: 24px;
  font-weight: 300;
  color: var(--text);
}

p, li {
  font-size: 20px;
  font-weight: 300;
  color: var(--text);
}

a, a:hover {
  color: var(--link);
  font-weight: 500;
}

ul {
  list-style-type: disc;
  margin-left: 80px;
}

/* - - - - */
/* buttons */
/* - - - - */

.button {
  border-radius: 24px;
  padding: 10px 20px;
  margin-right: 20px;

  text-decoration: none;
  border: none;
  font-size: 20px;

  min-width: 200px;
  /* max-width: fit-content; */
}

.button-primary, .button-primary:hover, .button-primary:active {
  background: var(--button-primary);
  color: var(--button-primary-text);
}

.button-secondary, .button-secondary:hover, .button-secondary:active {
  background-color: transparent;
  color: var(--text);
  border: 1px var(--text);
  border-style: solid;
}

.scroll-to-top, .scroll-to-top:hover {
  /* fix it to the bottom right of the browser */
  position: fixed;
  bottom: 50px;
  right: 50px;
  z-index: 1;

  display: flex;
  justify-content: center;
  align-items: center;

  background-color: var(--fab);
  color: var(--fab-icon);

  text-decoration: none;
  /* box-shadow: 2px 2px 6px var(--shadow); */
  border-radius: 50%;
  height: 60px;
  width: 60px;

  /* hide by default */
  pointer-events: none;
  transition: all 0.2s;
  opacity: 0;
}

.scroll-to-top.active {
  /* only show when triggered by scroll, done in JS */
  pointer-events: auto;
  opacity: 1;
}

/* - - - - */
/* nav bar */
/* - - - - */

header {
  background-color: transparent;
  display: flex;
  /* push everthing to the right of the container */
  justify-content: flex-end;
  align-items: center;
  padding: 15px 30px;
  /* place on top of other content  */
  position: fixed;

  width: 100vw;
  z-index: 1;
}

.logo {
  /* push the logo to the left of the container */
  margin-right: auto;
}

.logo img {
  height: 40px;
}

/* dark mode switcher icon */
#theme-icon {
  color: var(--text);
  cursor: pointer;
}

/* remove the default styling from the switcher icon  */
.nav-button {
  position: relative;
  background: none;
  border: none;
}

/* - - - - - */
/* home page */
/* - - - - - */

#intro {
  margin-top: 20vh;
  text-align: center;
}

#emoji {
  padding-right: 5px;
  animation: cursor 1s infinite ease-in-out;
}

/* animate the border to look like a cursor  */
@keyframes cursor {
  from{
    border-right: 2px solid transparent;
  }
  to{
    border-right: 2px solid var(--text);
  }
}

/* - - - - -*/
/* projects */
/* - - - - -*/

/* round the project preview images to match the card radius */
#project-preview{
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}

.project {
  /* makes sure that each project card is the same height */
  min-height: 450px;
  transition: .2s;
}

.project:hover {
  transform: translateY(-10px);
  box-shadow: 0px 8px 10px var(--shadow);
}

.project .card-content {
  padding-top: 10px;
}

.project-image {
  margin-top: 40px;
  width: 100%;
  border-radius: 4px;
}

/* project images that need margins on the bottom because they aren't followed by a title  */
.with-text-below {
  margin-bottom: 40px;
}

.project-cover {
  margin-top: 40px;
  margin-bottom: 20px;
  border-radius: 20px;
}

/* scale the emoji in a project h2 heading down */
#heading-emoji {
  font-size: 48px;
}

/* "hint" articles in a project  */
#hint {
  margin-top: 20px;
}

/* - - - - - - - */
/* about section */
/* - - - - - - - */

#profile-picture {
  border-radius: 50%;
  height: 275px;
  padding: 10px 10px 10px 10px;
}

.socials a, .socials a:hover {
  font-size: 40px;
  padding: 0px;
  color: var(--text);
}

#about-card {
  padding: 30px;
}

/* - - - - */
/* footer */
/* - - - - */

#footer {
  margin-top: 60px;
  background-color: var(--footer);
}

.footer p {
  font-size: 18px;
  color: var(--text-light);
}

.footer-link {
  font-weight: 300;
  font-size: 18px;
  color: var(--text-light);
  /* add a border to look like a styled hyperlink */
  border-bottom: .5px solid;
}

/* - - - - - - - - */
/* Bulma overrides */
/* - - - - - - - - */

.card {
  border-radius: 20px;
  box-shadow: none;
  background-color: var(--surface);
  color: var(--text);
  box-shadow: 1px 1px 6px var(--shadow);
}

.message-body {
  background-color: var(--surface);
  color: var(--text);
  border-color: var(--link);
}

/* - - -*/
/* SWUP */
/* - - -*/
.transition-fade {
  opacity: 1;
  transition: .4s;
  /* transform: translateX(0); */
  /* transform-origin: left; */
}

html.is-animating .transition-fade {
  opacity: 0;
  /* transform: translateX(100%); */
}

html.is-leaving .transition-fade {
  opacity: 0;
  /* transform: translateX(0); */
}