* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    max-height: 100vh;
    
    font-family: josefin-sans;
}

:root {
    --bg-color: white;
    --text-color: black;
    --border-color: black;
    --shadow-color: black;
}

body.dark-mode {
    --bg-color: black;
    --text-color: white;
    --border-color: white;
    --shadow-color: white;
}

main {
    display: flex;
    flex-direction: column;
    justify-self: center;
    align-self: center;

    gap: 1.8rem;
    margin: 2.5em 0;
    width: 35vw;

    flex: 1;
}

header {
    display: flex;
    justify-content: space-between;

    padding: .25rem 1rem .25rem 1rem;
    line-height: 1.7rem;
    border-bottom: solid 1px var(--border-color);

    font-size: 1.1rem;
}

footer {
    display: flex;
    justify-content: center;

    padding: .5rem 0;
}

/*NAVIGATION*/
nav > ul {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

nav li:hover {
    text-decoration: underline;
}

nav ul li {
    position: relative;
    cursor: pointer;
}

nav ul li ul {
    background: var(--bg-color);
    border: solid 1px var(--border-color);
    box-shadow: .35rem .35rem var(--shadow-color);
    min-width: 5rem;
    width: max-content;
    position: absolute;

    top: 100%;

    padding: .5em;  
    line-height: 1.5em;
    height: auto;

    visibility: hidden;
    display: none;
    opacity: 0;

    list-style: none;
}

nav ul li ul li {       /*the list items inside the dropdown*/
    cursor: pointer;
}

nav > ul > li:last-child {
    /* margin-left: 2rem; */
    text-decoration: none;
}

nav ul li:last-child > ul {
    right: 0;
}

nav ul li:hover > ul{
    visibility: visible;
    display: block;
    opacity: 1;
}

header a {
    text-decoration: none;
    color: var(--text-color);
}

header a:hover {
    text-decoration: underline;
}

/*ITEM WRAPPER*/
.flex-wrapper {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.flex-wrapper.unequal {
    flex-wrap: nowrap;
}

.flex-item {
    flex: 1 1 15rem;;
}

.flex-item.unequal {
    flex: 1 1 fit-content;
}

/*BOX*/
.box {
    border: solid 1px var(--border-color);
    box-shadow: .35rem .35rem var(--shadow-color);
}

.box > h1 {
    border-bottom: solid 1px var(--border-color);
    padding: .8rem;
    font-size: 1.4em;
} 

.box > p {
    padding: .8rem;
    font-size: 1.1rem;
}

.box > img {
    border-bottom: solid 1px var(--border-color);
    width: 100%;
}

.music-widget {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

#track-art {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: solid 1px;
}

.track-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.track-info .status {
    font-size: 0.8rem;
    color: #1db954; /* Spotify Green! */
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.track-info .title {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-info .artist {
  font-size: 0.9rem;
  margin: 0;
}

/*MEDIA RULES*/
@media (max-width: 800px) {
  main {
    width: auto;
    margin: 2.5em 1em;
  }

  .flex-wrapper {
    flex-direction: column;
  }

  .flex-item {
    flex: 1 1 fit-content;
  }
}

@font-face {
  font-family: 'josefin-sans';
  src: url('../assets/fonts/JosefinSans-VariableFont_wght.ttf');
  font-style: normal;
}

@font-face {
  font-family: 'josefin-sans';
  src: url('../assets/fonts/JosefinSans-Italic-VariableFont_wght.ttf');
  font-style: italic;
}
