:root {
    --orange: rgb(212, 76, 80);
    --orange-dark:  #600;
    --orange-light: rgb(255, 180, 200);
    --white: white;
    --grey:  #afafaf;
    --grey-dark: #2a2722;
    --blue: rgb(45, 158, 240);
    --blue-dark: #124f7aff;
    --blue-light: rgb(188, 232, 255);
    --black: oklch(18% 0.003 17.5);
    --bright_grey: oklch(47% 0.005 17.3);
    --brighter_grey: oklch(0.6068 0.005 17.3);
    --bright_white: oklch(94.75% 0.04 73);
    --dark-white: oklch(0.8027 0.04 73);

    --background: var(--bright_white);
    --background-dark:var(--grey);
    --accent: var(--orange);
    --accent-light:var(--dark-white);
    --secondary: var(--bright_grey);
    --secondary-light: var(--brighter_grey);
    --text: var(--black);
    width: 100vw;
}


*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
}

body {
    background-color: var(--background);
    color: var(--text);
}

main {
    min-height: 60vh;
}

.content-width {
    max-width: 1440px;
    padding-inline: 11px;
    margin: 0 auto;
    @media only screen and (min-width: 800px) {
        padding-inline: 44px;
    }
}

.main-nav {
    height: 10%;
    padding-top: 2%;

    h1 {
        margin: 0;
        display: inline;
        text-transform: uppercase;
        font-size: clamp(1rem, 8vw, 2.5rem);
    }

    a {
        padding: 1%;
        padding-inline: 2.5%;
        font-size: 1.2rem;
        color: var(--text) !important
    }

    .nav-links {
        font-size: 1.5rem;
    }

    #square {
        display: inline;
        vertical-align: middle;
    }

    @media screen and (min-width: 930px) {
        max-width: 900px;
        margin: auto
    }
}

.breadcrumb {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    font-family: "FiraCode";
    font-size: 0.8rem;
    color: var(--secondary);
}

.breadcrumb a {
    color: var(--accent) !important;
    text-decoration: none;
    font-size: 0.8rem;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    font-size: 0.8rem;
}

.breadcrumb span:not(:has(a)) {
    color: var(--text);
}

.svg {
    width: 5px;
    height: 5px;
    fill: var(--secondary);
    display: inline;
    vertical-align: 5px;
}

.flex-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.flex-column {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.flex-left {
    justify-content: left;
    align-items: flex-start;
}

.mondia-thin {
    font-family: MondiaThin, "garamond";
}

.width-full {
    width: 100%;
}

.padding-10{
    padding: 1%;
}

.bar::before {
    display: block;
    flex: 0.25;
    align-self: flex-start;
    height: 1em;
    content: "";
    background-color: currentColor;
}

.bar::after {
    display: block;
    flex: 0.75;
    align-self: flex-start;
    height: 1em;
    content: "";
    background-color: currentColor;
}

.bar
{
    display: flex;
    column-gap: .1em;
    align-items: center;
    max-width: unset;
    height: min-content;
}

.bar-right {
    display: flex;
    column-gap: .5em;
    align-items: center;
    width: 100%;
    height: min-content;
}

.bar-right::after {
    display: block;
    flex: 1;
    height: 0.5em;
    content: "";
    transform:translateY(-0.1em);
    background-color: currentColor;
}

.round {
    border-radius: 0.5rem;
}

.card {
    padding: 2rem;
    position: relative;
    margin: 1rem 0 1rem 0;
    border: 2px solid var(--accent-light);

    h2{
        margin-top: 0;
    }

    @media only screen and (min-width: 800px){
        margin: 1rem;
    }
}

.no-list{
    list-style: none;
    padding-left: 0px;
}

.clickable {
    display: grid;
    gap: 1rem;
    grid-template-rows: auto 1fr auto auto;
    border: none;
}

.card-title{
    max-width: 100%;
}

.card-title::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  cursor: pointer;
  border: 2px solid var(--accent-light);
  border-radius: 0.5rem;
  transition: border-color 200ms;
}

.card-title:hover::before,
.card-title:focus-visible::before {
    border: 3px solid var(--accent);
    border-radius: 1rem;
}

.secondary {
    color: var(--secondary);
    &:hover{
        color: var(--secondary);
    }
}


.accent {
    color: var(--accent);
    &:hover{
        color: var(--accent);
    }
}

.secondary-bg {
    background-color: var(--secondary);
}


.accent-bg {
    background-color: var(--accent);
    color: var(--background);
    border: none;

    &::before{
        position: absolute;
        inset: 0.5rem;
        display: block;
        content: "";
        user-select: none;
        pointer-events: none;
        border: 1px solid var(--background);
    }
}

.inverted {
    background-color: var(--text);
    color: var(--background);
    pointer-events: none;
    border: none;

    &::before{
        position: absolute;
        inset: 3px;
        display: block;
        content: "";
        border: 2px solid var(--background);
    }
}

.center-aligned {
    text-align: center;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

input,
button,
textarea,
select {
    font: inherit;
}

a {
    color: var(--secondary);
    border-radius: 2px;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    box-decoration-break: clone;
    transition: 0.1s ease-in-out;

    &:hover {
        text-underline-offset: 3px;
        text-decoration-thickness: 2px;
        color: var(--secondary);
        transition: 0.1s ease-in-out;
    }
}

.animated-links{
    a {
        color: var(--secondary);
        border-radius: 2px;
        transition-property: color,background-size;
        text-decoration: none;
        text-wrap: balance;
        background-image: linear-gradient(currentColor, currentColor);
        background-repeat: no-repeat;
        background-position: 0 calc(100% - 1px);
        background-size: 0 1px;
        paint-order: stroke fill;
        justify-self:start;

    &:hover {
        background-size:100% 1px
    }
    }

}

a.button {
    padding: 5px;
    text-decoration: none;
    font-family: Karrik;
    position: relative;
    justify-content: center;

    &:hover {
        scale: 1.05;
        transition:
            --magic-rainbow-color-0 2000ms linear,
            --magic-rainbow-color-1 2000ms linear,
            --magic-rainbow-color-2 2000ms linear;
    }

    .forward-arrow {
        position: absolute;
        top: 0.6rem;
        right: 0.5rem;
    }
}

p, li {
    line-height: 1.6;
    font-size: 1rem;
    -webkit-font-smoothing: antialiased;
    @media only screen and (min-width: 800px) {
        font-size: 1.1rem;
    }
    font-family: "FiraCode";
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 30px;
    margin-bottom: 10px;
    font-family: BasalteFond;
    color: var(--text);
    overflow-wrap: break-word;
}

h1 {
    font-size: 2.5em;
    letter-spacing: 0.1rem;
}

h2 {
    font-size: 1.5em;
    letter-spacing: 0.1rem;
    font-weight: normal;
}

h3 {
    font-size: 1.25em;
    font-weight: normal;
}

li {
    list-style-position: outside;
    padding-left: 1em;
}

ul {
    padding-left: 1em;
}

footer {
    margin-top: 15vh;
    margin: 2.5vh;
    p {
        line-height: 3;
        font-size: 0.9rem;
    }

    .footer-list {
        text-align: center;
    }
}

canvas {
    width: 100%;
    height: 100dvh;
    position: absolute;
    left: 0;
    right: 0;
    z-index: -1;
    overflow: hidden;
    background-color: transparent;
}

button {
    display: block;
    margin: 0;
    margin-left: 0px;
    padding: 5px;
    border: none;
    border-radius: 2px;
    background: var(--accent);
    cursor: pointer;
    text-align: left;
    font: inherit;
    font-size: inherit;
    color: inherit;
    position: relative;
}

.magic:hover {
    color: var(--background);
}

#root,
#__next {
    isolation: isolate;
}

.head-image {
    width: 100%;
    height: auto;
    padding: 1%;
    border: 0.2rem solid var(--text);
    margin-bottom: 1rem;
}

@keyframes slide {
    from {
        transform: translateY(-100%);
    }

    50% {
        opacity: 1;
    }

    to {
        transform: translateY(100%);
    }
}

.down-arrow {
    display: inline;
    animation: slide 1500ms;
    animation-iteration-count: infinite;
    animation-timing-function: cubic-bezier(0, 0.75, 1, 0.25);
    opacity: 1;
}

.back-arrow {
    display: inline;
    animation: slide 1500ms;
    animation-iteration-count: infinite;
    animation-timing-function: cubic-bezier(0, 0.75, 1, 0.25);
    opacity: 1;
    rotate: 90deg;
}

.forward-arrow {
    display: inline;
    animation: slide 1500ms;
    animation-iteration-count: infinite;
    animation-timing-function: cubic-bezier(0, 0.75, 1, 0.25);
    opacity: 1;
    rotate: -90deg;
}


textarea,
input[type="text"] {
    /* input fix defaults */

    resize: none;
    overflow: hidden;
    width: 90%;
    background-color: var(--background);
    color: var(--secondary);
    font-family: "FiraCode", "Courier New", Courier, monospace;
    margin: 5px;
    padding: 5px;

    border-style: solid;
    border-width: 2px;

    &:focus {
        outline: none;
    }
}


.magic {
    background: linear-gradient(
        170deg,
        hsl(358deg 61% 56%),
        hsl(343deg 67% 58%)
    );

    color: white;
    font-family: "Fira Code", monospace;
    transition: scale 0.2s ease-in-out;
    outline: none;
    border: none;
}

@media (prefers-reduced-motion: no-preference) {
    .magic {
        --magic-rainbow-color-0: hsl(358deg 61% 56%);
        --magic-rainbow-color-1: hsl(343deg 67% 58%);
        --magic-rainbow-color-2: hsl(328deg 62% 59%);

        background: linear-gradient(
            170deg,
            var(--magic-rainbow-color-0),
            var(--magic-rainbow-color-1),
            var(--magic-rainbow-color-2)
        );

        transition:
            --magic-rainbow-color-0 2000ms linear,
            --magic-rainbow-color-1 2000ms linear,
            --magic-rainbow-color-2 2000ms linear;

        /* just testing colour values */
        --e: hsl(270deg, 100%, 40%);
        --e: hsl(19, 100%, 35%);
        --e: hsl(24, 97%, 45%);
        --e: hsl(230deg, 100%, 35%);
        --e: hsl(240deg, 100%, 45%);
        --e: hsl(260deg, 100%, 55%);
    }
}
