/* =====================
  THEME VARIABLES
    ====================== */
/* https://www.wada-sanzo-colors.com/combinations/321 */
:root {
  --paper: #f3f1ed; /* paper white */
  --yellow: #f5ecc2; /* sulpher-yellow */
  --velvet: #121013; /* near-black canvas */
  --olive: #253122; /* deep slate olive */
  --pink: #b59392; /* light brown drab */
  --blue: #97acc8; /* salvia blue */
  --shadow: rgba(0, 0, 0, 0.35);
  --ink: #eaeaea; /* light ink */
  --saffron: #e2a53a; /* warm accent yellow/orange */
  --accent: var(--saffron);
  --text: #1b1b1b;
  --bg: var(--paper);
  --card: #fffaf1;
  --muted: #4a4743;
  --bg-accent: rgb(0 0 0 / 5%);
}

/* Dark / Velvet mode */
body.dark-mode {
  --text: var(--ink);
  --bg: var(--velvet);
  --card: #1a171a;
  --muted: #b9b0a1;
  --accent: var(--saffron);
  --bg-accent: #f3f1ed10;

  ::-webkit-scrollbar-thumb {
    background: var(--pink);
  }

  main {
    border: 1px solid var(--pink);
    box-shadow: 10px 10px 0px var(#b5939226);
  }

  .light-toggle {
    display: block;
  }

  .dark-toggle {
    display: none;
  }

  .toggle-button {
    svg {
  fill: var(--ink);

  &:hover {
    fill: var(--blue);
  }
    }
  }

  header {
    h1 {
  color: var(--pink);

  &:hover {
    color: var(--blue);
  }
    }
  }

  .content {
    background-color: var(--card);
  }

  .sidebar {
    background-color: var(--pink);
    color: var(--velvet);
  }

  nav {
    a {
  color: var(--velvet);
  border-bottom: 1px solid var(--card);

  &:not(:last-of-type):hover{
    background-color: var(--card);
    color: var(--text);
  }
    }
  }
}

/* =====================
  GLOBAL
    ====================== */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  display: grid;
  place-items: center; /* centers both ways */
  height: 100vh;
  margin: 0;
  background:
  /* grain */ radial-gradient(var(--bg-accent) 1px, transparent 1px) 0 0/3px 3px,
  linear-gradient(0deg, rgba(0, 0, 0, 0.06), rgba(255, 255, 255, 0.06)),
  var(--bg);
  color: var(--text);
  font-family: Open Sans, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;

  &:not(.dark-mode) {
    .light-toggle {
  display: none;
    }

    .dark-toggle {
  display: block;
    }
  }
}

a,
p {
  transition: color 0.3s ease, background-color 0.3s ease;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  opacity: 0;
  animation: fadeIn 0.3s ease-in-out forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Customize the track (the area behind the thumb) */
::-webkit-scrollbar {
  width: 10px;
}

/* Customize the thumb (the draggable part) */
::-webkit-scrollbar-thumb {
  background: var(--olive);
}

main {
  position: relative;
  display: flex;
  width: 800px;
  height: 500px;
  z-index: 100;
  border: 1px solid var(--olive);
  border-radius: 2px;
  box-shadow: 10px 10px 0px #2531221f;
}

.toggle-button-container {
  position: absolute;
  top: -30px;
  left: 0;
  font-size: 14px;
  cursor: pointer;

  svg {
    transition: fill 0.3s ease, display 0.3s ease;

    &:hover {
  fill: var(--pink);
    }
  }
}

h1.site-title {
  position: absolute;
  right: 10px;
  top: -15%;
  z-index: 101;
  font-family: "Jacquard 24 Charted", system-ui;
  font-weight: 400;
  font-style: normal;
  font-size: 65px;
  color: var(--olive);
  margin: 0;
  &:hover {
    color: var(--pink);
  }
}

.index-body .sidebar nav a:nth-of-type(1) {
  background-color: var(--paper);
    color: var(--text);
}

.sidebar {
  width: 170px;
  background-color: var(--olive);
  color: #424242;

  nav {
    display: flex;
    flex-direction: column;
    height: 100%;

    a {
    display: inline-flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    border-bottom: 1px solid var(--paper);
    flex-basis: content;
    font-family: "Playfair", serif;
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--paper);
    line-height: 45px;
    padding: 5px 10px;
    text-decoration: none;
    text-transform: uppercase;

    &:last-of-type {
      border-bottom: none;
    }
  }

  .nav-img {
  margin-top: auto;
  padding: 10px;

  img {
    max-height: 200px;
    margin: auto;
  }
    }
  }
}

.content {
  flex: 1;
  background-color: var(--paper);
  padding: 20px;
  overflow-y: auto;
  border-bottom-right-radius: 2px;
  border-top-right-radius: 2px;
}

h2 {}

.nav-link.active {
  background-color: var(--paper);
  color: var(--text);
}

body.dark-mode {
  .nav-link.active {
    background-color: var(--card) !important;
    color: var(--text);
  }
}

/* =====================
  HOME SPECIFIC STYLES
====================== */
body.index-body {}

/* =====================
  BLOG SPECIFIC STYLES
    ====================== */
body.blog-body {}

/* =====================
  ABOUT SPECIFIC STYLES
    ====================== */
body.about-body {}

/* =====================
  LISTS SPECIFIC STYLES
    ====================== */
body.lists-body {}

/* =====================
  PROJECTS SPECIFIC STYLES
    ====================== */
body.projects-body {
  #tabs {
    font-size: 14px;
    padding: 10px 20px;
    p {
      color: black;
    }
  
    li {
      a {
        text-decoration: none;
        font-family: "Playfair", serif;
        font-size: 15px;
      }
      padding: 10px 10px 10px 0;
      border-right: 1px solid var(--text);
      &.ui-state-active {
        font-weight: bold;
      }
      &:hover {
        color: var(--pink);
        cursor: pointer;
      }
    }
  
    ul {
      list-style: none;
      padding: 0 10px;
      display: flex;
      gap: 10px;
      margin-top: 5px;
      margin-bottom: 20px;
      background: #2531221f;
      border: 1px solid var(--olive);
      border-radius: 2px;
    }
  }
}

/* RESPONSIVE TWEAKS */
@media (max-width: 768px) {
  body {
    display: flex;
    align-items: start;
    justify-content: center;

  }
  main {
    flex-direction: column;
    height: auto;
    width: 90vw;
    box-shadow: none;
  }
  .toggle-button-container {
    top: 20px;
    left: 30px;
    z-index: 102;
  }
  h1.site-title {
    position: static;
    text-align: center;
    font-size: 40px;
  }
  .sidebar {
    width: 100%;
    nav {
      flex-direction: row;
      a {
        border-bottom: none;
        font-size: 10px;
      }
      .nav-img {
        display: none;
      }
    }
  }
  .container.content {
    h2 {
      font-size: 20px;
    }
  }
}

@media (max-width: 375px) {
  main {
    width: 100vw;
  }
  .toggle-button-container {
    left: 15px;
  }
  body.dark-mode {
    & nav {
        a {
            border-bottom: none;
        }
    }
  }
  .sidebar {
    nav {
      justify-content: space-evenly;
        a {
        border-bottom: none;
        padding: 2px 5px;
      }
    }
  }
}