/* hacktheplanet — 2019 edition, rebuilt */

@font-face {
    font-family: "D-DIN Condensed";
    src: url("fonts/D-DINCondensed.otf") format("opentype");
    font-display: swap;
}

@font-face {
    font-family: "D-DIN";
    src: url("fonts/D-DIN.otf") format("opentype");
    font-display: swap;
}

:root {
    --panel: #212121;
    --text: #fff;
    --hover: #ffccff;
    --accent: #f26452;
    --accent-2: #5db7de;
    --gutter: 16px;
    --content-width: 900px;
    --cursor: url("img/hvcur2.gif"), auto;
    --cursor-link: url("img/hvcur2.gif"), pointer;
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0 var(--gutter) var(--gutter);
    background: #111 url("img/bg_cat.png") repeat fixed;
    color: var(--text);
    font: 1.1875rem/1.45 "D-DIN", system-ui, sans-serif;
    cursor: var(--cursor);
}

a {
    color: var(--text);
    text-decoration: none;
    cursor: var(--cursor-link);
}

a:hover {
    color: var(--hover);
}

a:active {
    color: #000;
}

a:focus-visible {
    outline: 2px dashed var(--accent-2);
    outline-offset: 3px;
}

h1,
.site-nav {
    font-family: "D-DIN Condensed", "D-DIN", sans-serif;
    font-style: oblique;
    font-weight: normal;
    letter-spacing: -2px;
}

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

img,
video,
iframe {
    max-width: 100%;
}

/* ---------- skip link ---------- */

.skip-link {
    position: absolute;
    left: var(--gutter);
    top: -100px;
    padding: 6px 10px;
    background: var(--panel);
    z-index: 10;
}

.skip-link:focus {
    top: var(--gutter);
}

/* ---------- header / nav ---------- */

.site-header {
    position: sticky;
    top: -80px;
    z-index: 5;
    margin: 0 calc(var(--gutter) * -1);
    padding: 70px var(--gutter) 10px;
    background: url("img/header.jpg") no-repeat -50px -500px fixed;
}

.site-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 2.33rem;
    line-height: 1.2;
    text-transform: uppercase;
}

.site-nav a {
    text-shadow: 0 0 1px #fff;
}

.site-nav li:first-child a {
    color: var(--accent);
    text-shadow: 0 0 1px var(--accent);
}

.site-nav a[aria-current="page"] {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.site-nav li:not(:last-child)::after {
    content: " //";
    color: var(--accent-2);
}

/* ---------- main content ---------- */

main {
    max-width: var(--content-width);
    margin-top: 10px;
    padding: 2px 16px 16px;
    background: var(--panel);
}

.date {
    margin: -0.6em 0 1em;
    font-size: 0.8rem;
    font-weight: bold;
}

.portrait {
    display: block;
    width: auto;
    max-height: 400px;
    height: auto;
}

.media-list {
    display: grid;
    gap: 16px;
}

.media-list video {
    display: block;
    width: auto;
    max-height: 315px;
    background: #000;
}

.embed {
    width: 100%;
    max-width: 560px;
    aspect-ratio: 16 / 9;
    border: 0;
    display: block;
}

.embed--soundcloud {
    max-width: 600px;
    aspect-ratio: auto;
    height: 450px;
}

.file-list {
    padding-left: 1.2em;
}

.file-list li {
    margin: 0.15em 0;
}

/* ---------- footer ---------- */

.site-footer {
    display: inline-block;
    margin-top: 50px;
    padding: 4px 8px;
    background: var(--panel);
}

/* ---------- etc. ---------- */

@keyframes floater {
    0%   { top: -1px; }
    50%  { top: 4px; }
    100% { top: -1px; }
}

.downarrow {
    position: relative;
    color: var(--accent-2);
    animation: floater 0.75s ease-in-out infinite;
}

@media (max-width: 600px) {
    h1,
    .site-nav ul {
        font-size: 2rem;
    }

    .site-header {
        background-position: center -500px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .downarrow {
        animation: none;
    }
}
