@font-face {
    font-family: 'Suez One';
    font-display: block;
    src: url('fonts/SuezOne-Regular.woff2');
}

:root {
    --bg: white;
    --fg: #0b486b;
    --max_media_height: 85vh;
    --media_width: 85%;
}

html {
    scroll-behavior: smooth;
    scroll-padding-block: 9rem 3rem;
}

body {
    font-family: Suez One, serif;
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    text-underline-position: under;
}

a:is(:hover, :focus-visible) {
    outline: transparent;
}

nav {
    background-color: var(--bg);
    color: var(--fg);
    inset-inline: 0;
    padding-bottom: 2px;
    position: fixed;
    top: 0;
    z-index: 99;
}

nav a {
    align-content: center;
    background-color: inherit;
    box-sizing: border-box;
    color: inherit;
    display: inline-block;
    font-size: min(1em, 4vw);
    height: 100%;
    padding-inline: .4em;
    padding-block: .4em;
    text-decoration: none;
    transition: all .3s;
    width: 100%;
}

nav a:is(:hover, :focus-visible), nav li:nth-last-child(-n + 1 of .current) a {
    color: var(--bg);
    background-color: var(--fg);
}

nav li {
    display: inline-block;
    border: solid 1.5px;
    flex-grow: 1;
    text-align: center;
}

nav ul {
    display: flex;
    flex-direction: row-reverse;
    flex-wrap: wrap-reverse;
    list-style: none;
    margin-block: 0;
    padding-inline-start: 0;
}

header:is(:hover, :focus-visible) ~ #about *, #about a:is(:hover, :focus-visible) ~ h1, #about a:is(:hover, :focus-visible) ~ h1 span, #about:active * {
    animation-play-state: running;
}

@keyframes rotate {
    100% { rotate: 1turn }
}

.dot1, .dot2 {
    animation: 3s linear infinite rotate paused;
    display: inline-block;
    width: 0;

    /* Fallback for Chrome issue: https://issues.chromium.org/issues/40858028 */
    color: #f003;
    mix-blend-mode: hue;
}

.dot1 {
    animation-direction: reverse;
    transform-origin: .3em .71em;
    translate: -0.255em .03em;
}

.dot2 {
    transform-origin: -.15em .92em;
    translate: -.025em -.62em;
}

#about {
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    margin-block: 3rem 5.5rem;
    min-height: 100svh;
}

@keyframes offset {
    100% { background-position-x: 100% }
}

#about h1 {
    animation: 3s linear infinite offset paused;
    -webkit-background-clip: text;
    background-clip: text;
    background-image: url('media/bg.jpg');
    background-repeat: round;
    background-size: contain;
    color: transparent;
    font-size: 20vw;
    font-weight: normal;
    margin-block: -.15em;
    -webkit-user-select: none;
    user-select: none;
}

#about a {
    color: var(--fg);
    font-size: min(2em, 8vw);
    margin-bottom: 5rem;
    order: 1;
    text-decoration-thickness: .1em;
}

#about a:is(:hover, :focus-visible) {
    text-shadow: -1px -1px pink, 1px 1px red;
}

.he {
    animation-direction: reverse !important;
}

h2 {
    margin-bottom: 0;
    text-align: center;

    /* from: https://codepen.io/t_afif/pen/zYWQmyo */
  --b: 5px;   /* control the border thickness */
  --w: 50vw; /* control the width of the line*/
  --h: 1.6em; /* control the height of the element */

  width: fit-content;
  padding-inline: calc(var(--h) * .8);
  line-height: var(--h);
  color: var(--bg);
  clip-path:
    polygon(
        calc(var(--h)/2)        100%,
        100vw                   100%,
        100vw                   calc(100% - var(--b)),
        100%                    calc(100% - var(--b)),
        calc(100% - var(--h)/2) 0,
        -100vw                  0,
        -100vw                  var(--b),
        0                       var(--b)
    );
  border-image: var(--_g,linear-gradient(var(--fg) 0 0)) fill 0//0 var(--w);
  margin-inline: auto;
}

h2 a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    font-style: italic;
    --images_container_height: min(var(--max_media_height), var(--max_height, var(--max_media_height)));
    margin-block: 10rem;
    margin-inline: auto;
    max-height: var(--images_container_height);
    object-fit: contain;
    white-space: pre-line;
    width: var(--media_width);
}

@media (max-width: 480px) {
    :root {
        --media_width: 100%;
    }
}