@import url('https://fonts.googleapis.com/css2?family=Playwrite+HU:wght@100..400&family=Alegreya:ital,wght@0,400..900;1,400..900&display=swap');

:root {
    --color-main: #eba914;
    --color-text: #111;
    --background-color: #FFFFFF;
    --container-color: #FFFFFF;
}

html, body {
    margin: 0;
    padding: 0;
    font-size: 22px;
    line-height: 1.5;
    font-family: Alegreya, 'Georgia Pro', Georgia, serif;
    color: var(--color-text);
    background-color: var(--background-color);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
    background-color: var(--container-color);
    @media (max-width: 650px) {
        padding: 0 1rem;
    }
}

a {
    color: var(--color-text);
    transition: color 150ms ease-in-out;
    text-decoration: underline;
    &:hover {
        color: var(--color-main);
        text-decoration-thickness: 2px;
    }
}

h1, h2, h3, h4, h5, h6, p {
    margin-top: 0;
    margin-bottom: 1.5rem;
}
h1, h2, h3, h4, h5, h6 {
    font-weight: normal;
    line-height: 1.3;
}
h2 {
    font-size: 1.2rem;
}
p {
    &:last-child {
        margin-bottom: 0;
    }
}
ul, ol {
    margin: 1rem 0;
}

section, article, header {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

header {
    text-align: center;
    margin-bottom: 0.5rem;
    .site-title {
        margin-bottom: 0;
        font-size: 2.0rem;
        line-height: 1.5;
        font-family: "Playwrite HU", cursive;
        text-decoration-line: underline;
        text-decoration-color: var(--color-main);
        text-decoration-thickness: 5px;
        text-underline-offset: 10px;
        a {
            text-decoration: none;
            text-decoration-thickness: 0; /* required for iOS for some reason */
        }
    }
    h2 {
        margin-top: 1.5rem;
    }
    .return-link {
        display: block;
        margin-top: 1.5rem;
    }
    &.header--subpage {
        text-align: left;
        .site-title {
            font-size: 1.5rem;
        }
    }
}

article {
    .article-head {
        margin-bottom: 1.5rem;
        h1 {
            margin-bottom: 0.5rem;
        }
    }
}

embed {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 2rem 0;
    &.embed--a4 {
        aspect-ratio: 1 / 1.414;
    }
}

.avatar {
    margin: 0 auto;
    background-image: url(/images/profile.webp);
    background-size: cover;
    background-position: center center;
    width: 18rem;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 100%;
    &.avatar--small {
        width: 10rem;
    }
}

.socials {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

section {
    & > h2:first-child {
        font-size: 1.5rem;
        font-family: "Playwrite HU", cursive;
        margin-bottom: 0.7rem;
        padding-bottom: 0.3rem;
        border-bottom: 3px solid var(--color-main);
    }
    h3 {
        font-weight: bold;
        line-height: 1;
        text-decoration-line: underline;
        text-decoration-color: var(--color-main);
        text-decoration-thickness: 1.5px;
        margin-bottom: 0;
    }
}

.posts {
    .post {
        display: flex;
        gap: 1rem;
        margin-bottom: 0.1rem;
    }
}

.photos {
    overflow: hidden;
}

.gallery {
    display: flex;
    gap: 1rem;
    flex-wrap: nowrap;
    overflow: auto hidden;
    padding-bottom: 0.5rem;
    a {
        height: 13rem;
        width: 20rem;
        flex: 0 0 20rem;
        max-width: 80%;
        background-size: cover;
        background-position: center center;
    }
}

.works ul {
    list-style: none;
    text-indent: -2rem;
    word-wrap: break-word;
}

.photo-library {
    figure {
        margin: 2rem 0;
        img {
            max-width: 100%;
        }
    }
}

footer {
    margin-top: 4rem;
    margin-bottom: 2rem;
    font-size: 0.8rem;
    text-align: center;
}

/*
Bluesky flutter — https://flutterby.philhawksworth.dev/
SPDX-SnippetBegin
SPDX-License-Identifier: MIT
SPDX-SnippetCopyrightText: 2024 Phil Hawksworth
*/
.bluesky-flutter svg {
  transition: 200ms;
}

.bluesky-flutter .left {
  transform-origin: center;
}
.bluesky-flutter .right {
  transform-origin: center;
  transform: scale(-1, 1);
}
.bluesky-flutter:hover .left, .bluesky-flutter:focus .left {
   animation: flutter 430ms ease-in-out;
   --flip: 1;
}
.bluesky-flutter:hover .right, .bluesky-flutter:focus .right {
   animation: flutter 500ms ease-in-out;
   --flip: -1;
}
.bluesky-flutter:hover svg, .bluesky-flutter:focus svg {
  transform: rotate(-5deg);
  transition: 500ms;
}

@media (prefers-reduced-motion) {
  .bluesky-flutter:hover .left,
  .bluesky-flutter:focus .left,
  .bluesky-flutter:hover .right,
  .bluesky-flutter:focus .right {
    animation: none;
  }
}

@keyframes flutter {
  10% {
    transform: scale(calc(var(--flip)*1), 0.9);
  }
  20% {
    transform: scale(calc(var(--flip)*0.5), 1);
  }
  40% {
    transform: scale(calc(var(--flip)*0.9), 0.95);
  }
  60% {
    transform: scale(calc(var(--flip)*0.3), 1);
  }
  80% {
    transform: scale(calc(var(--flip)*0.9), 0.95);
  }
  100% {
    transform: scale(calc(var(--flip)*1), 1);
  }
}
/* SPDX-SnippetEnd */