@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Jersey+10&display=swap');

:root {
  --light-bg: #ddd;
  --light-card: #ffffff28;
  --light-card-border: #ffffff60;
  --light-fg: #383838;
  --light-fg-bold: #141414;
  --light-accent: #8090ee;

  --dark-bg: #140c1f;
  --dark-card: #ffffff28;
  --dark-card-border: #ffffff60;
  --dark-fg: #ddd;
  --dark-fg-bold: #fff;
  --dark-accent: #a2bcf6;

  color-scheme: light dark;
}

body {
  margin: 0;
  padding: 2rem;
  box-sizing: border-box;
  background-color: light-dark(var(--light-bg), var(--dark-bg));
  color: light-dark(var(--light-fg), var(--dark-fg));
  font-family: 'Inter', sans-serif;

  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

/* card */
div.card {
    background-color: light-dark(var(--light-card), var(--dark-card));
    border: 1px solid light-dark(var(--light-card-border), var(--dark-card-border));
    padding: 3rem 1.5rem 1.5rem;
    z-index: 1;
    border-radius: 0 0 1em 1em;
    position: relative;

    >:first-child {
        margin-top: 0;
    }

    >:last-child {
        margin-bottom: 0;
    }
}
div.card::before {
    content: '';
    width: 100%;
    height: 2rem;
    position: absolute;
    top: 0;
    left: 0;
    background-image: url("/assets/stripe.svg");
    background-size: contain;
    background-position: -50%;
    z-index: -1;
}

.row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 1rem;
}

#logo {
    font-size: 7.5rem;
    transition: 100ms;
    >img {
        height: 1em;
        display: block;
    }
    z-index: 99;
}

/* nav */

ul.nav {
    display: flex;
    flex-direction: row;
    gap: 1em;
    list-style: none;
    padding: 0;
}

/* general */

:is(h1, h2) {
    font-family: 'Jersey 10', sans-serif;
    border-bottom: 2px solid light-dark(var(--light-fg-bold), var(--dark-fg-bold));
    font-weight: normal;
}

h1 {
    font-size: 2.5rem;
    margin: 0.4em 0 0.5em;
}

h2 {
    font-size: 2rem;
    margin: .5em 0;
}

span.small {
    font-size: .8em;
    opacity: 60%;
}

li {
    margin-bottom: 0.2em;
}
li:last-child { margin-bottom: 0; }

a {
    color: light-dark(var(--light-accent), var(--dark-accent));
    position: relative;
    transition: top 50ms;
    top: 0;
}

a:hover {
    color: light-dark(var(--light-fg-bold), var(--dark-fg-bold));
}

a:active {
    color: light-dark(var(--light-accent), var(--dark-accent));
}

/* media queries */
@media (prefers-color-scheme: light) {
    div.card::before {
        filter: brightness(0);
    }
}

/* small screens */
@media screen and (width <= 600px) {
    .card {
        width: 100%;
        box-sizing: border-box;
    }
    .row {
        width: 100%;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: no-preference) {
    #welcome-mat #pretty-girl:hover {
        transform: scale(1.1) rotate(5deg);
    }
    a:active {
        top: 0.1em;
    }
    #logo:hover {
        transform: scale(1.1) rotate(-5deg);
    }
    #logo:active {
        transform: scale(1.1) rotate(-5deg) translateY(.1rem);
    }
}

@media (prefers-reduced-transparency: reduce) {
    :root {
        --light-card: transparent;
        --light-card-border: var(--light-fg);
        --dark-card: transparent;
        --dark-card-border: var(--dark-fg);
    }
}