@import "font.css";
@import "color.css";

:root {
    --h1-font-size: 2rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1rem;
    --font-size: 16px;
}

:root {
    --slow-animation: 0.5s cubic-bezier(0, 0, .2, 1);
    --fast-animation: 0.2s cubic-bezier(0, 0, .2, 1);
}

:root {
    font-size: var(--font-size);
}

h1 {
    font-size: var(--h1-font-size);
}

h2 {
    font-size: var(--h2-font-size);
}

h3 {
    font-size: var(--h3-font-size);
}

h1 {
    font-family: "LiberationSerif";
    font-weight: bold;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

body {
    background-color: var(--mantle);
    color: var(--text);
    font-family: "LiberationSans";
    display: flex;
    flex-direction: column;
    margin: 0;
    min-height: 100dvh;
}

content {
    display: flex;
    flex-direction: column;
}

textarea {
    max-width: 100%;
}

content {
    padding: 0.5rem;
    background-color: var(--base);
    border-radius: 0.5rem;
    flex: 1 1 auto;
}

content > * {
    margin-bottom: 0.5rem;
}

pre:has(code) {
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

span.inline-code {
    background-color: var(--mantle);
    border-radius: 4px;
    padding: 0.2rem;
    box-shadow: 0px 0.2rem 0.3rem color-mix(in srgb, var(--mantle) 70%, #7f000000);
}

code {
    font-family: "Iosevka";
}

a {
    color: var(--blue);
    text-decoration: underline;
    text-decoration-color: transparent;
}

a:hover {
    text-decoration: underline;
}

a:visited {
    color: var(--lavender);
}

page-header {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    display: flex;
    background-color: var(--mantle);
    flex-direction: row;
    align-items: center;
}

page-header a:has(h1) {
    flex: 1 0 auto;
}

select,
button {
    background-color: var(--surface0);
    border: 0;
    color: var(--text);
    padding: 0.5rem;
    border-radius: 0.25rem;
}

select:hover,
button:hover {
    background-color: var(--surface1);
}

select:hover,
button:active {
    background-color: var(--surface2);
}

textarea {
    background-color: var(--surface0);
    border: 0;
    color: var(--text);
    padding: 0.5rem;
    border-radius: 0.25rem;
    font-family: "Iosevka";
    resize: vertical;
}

.link-container {
    flex: 1 1 auto;
    grid-template-rows: repeat(2, 1fr);
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
}

.links {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.links:nth-child(0) {
    flex: 1 1 auto;
}

.links>* {
    margin-left: 0.25rem;
    margin-right: 0.25rem;
}

.links>a {
    font-size: 150%;
}

.project-link {
    align-content: center;
    text-align: center;
    filter: drop-shadow(0px 0px 0px var(--text));
    font-family: "Iosevka";
    transition: transform var(--slow-animation), font-size var(--slow-animation);
    font-style: italic;
}

.project-link:hover {
    transform: translateY(-2px);
    font-style: normal;
    font-weight: bold;
}

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

.icon {
    width: 2rem;
    height: 2rem;
    stroke: currentColor;
}

.icon-small {
    width: 1rem;
    height: 1rem;
    stroke: currentColor;
}

.icon-medium {
    width: 1.5rem;
    height: 1.5rem;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.socials {
    display: flex;
    align-items: center;
}

.socials>a {
    padding: 0.125rem;
}

.socials>a>svg {
    transition: transform var(--slow-animation);
}

.socials>a:hover>svg {
    transform: translateY(-2px);
}

a:hover:has(svg) {
    text-decoration: none;
}

#themeToggle {
    cursor: pointer;
}

:root {
    --shiki-foreground: #eeeeee;
    --shiki-background: #333333;
    --shiki-token-constant: #660000;
    --shiki-token-string: #770000;
    --shiki-token-comment: #880000;
    --shiki-token-keyword: #990000;
    --shiki-token-parameter: #aa0000;
    --shiki-token-function: #bb0000;
    --shiki-token-string-expression: #cc0000;
    --shiki-token-punctuation: #dd0000;
    --shiki-token-link: #ee0000;
}

.language-row {
    display: flex;
    flex-direction: row;
}

.language-row > :not(:last-child) {
    margin-right: 0.5rem;
}

#favorites {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
}

#favorites:not(:has(lang-button)) {
    display: none;
}

.language-row > :first-child {
    flex: 1 0 auto;
}

lang-button {
    display: flex;
    margin: 0;
}

lang-button > :first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    flex: 1 0 auto;
}

lang-button > :last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
