* {
    font-family: monospace, serif;
}

body {
    margin: 0;
    min-height: 100vh;
    padding: 0 30px;
    display: flex;
    flex-direction: column;
}

header {
    max-width: 2000px;
    width: 100%;
    margin: 20px auto 10px auto;
    display: flex;
}

header a {
    color: #000;
    margin-bottom: 15px;
    text-decoration: none;
}

#name {
    margin-left: 10px;
}

#name .text {
    overflow: hidden;
    display: inline-block;
    vertical-align: top;
    animation: typing 3s steps(10, end);
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

.blink {
    animation: cursor 1s step-end infinite;
}

@keyframes cursor {
  from, to { opacity: 0; }
  50% { opacity: 1; }
}

footer {
    margin: 30px 0;
    font-family: Georgia;
    text-align: center;
}

main {
    flex-grow: 1;
}

main ul {
    padding: 0;
    max-width: 2000px;
    margin: 0 auto;
    columns: auto 3;
    gap: 1px;
    line-height: 0;
}

main li {
    list-style: none;
}

main .cat {
    position: relative;
}

main .cat p {
    position: absolute;
    bottom: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    text-align: center;
    pointer-events: none;
}

main .cat img {
    opacity: 0.5;
}

main h1 {
    font-size: 1em;
    text-align: center;
}

.photo {
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    break-inside: avoid;
    width: 100%;
    margin: 1px 0;
    box-sizing: border-box;
    overflow: hidden;
    transition: 200ms;
}

.photo img {
    width: 100%;
    pointer-events: none;
    transition: 200ms linear;
}

.photo:hover {
    cursor: pointer;
}

#modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.5);
    padding: 10px;
    box-sizing: border-box;
    transition: 500ms ease;
}

#modal img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#modal button {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);

    color: #fff;
    background: #000;
    padding: 5px 10px;
    border: 2px solid #fff;
    border-radius: 20px;
}

@media (max-width: 600px) {
    body {
        padding: 0;
    }
    main ul {
        columns: auto 2;
    }
    .photo img {
        transition: 1000s ease;
    }
    header {
        padding: 0 10px;
    }
}

@media (prefers-color-scheme: dark) {
    body {
        color: #eee;
        background: #111;
    }

    header a {
        color: #eee;
    }
}
