html {
    scroll-behavior: smooth;
    /* https://www.matuzo.at/blog/2022/100daysof-day25/ */
    scrollbar-gutter: stable;
}

/* https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavior */
@media (prefers-reduced-motion: reduce) {
    html {
      scroll-behavior: auto;
    }
}

/* https://www.paulirish.com/2012/box-sizing-border-box-ftw/ */
/* apply a natural box layout model to all elements, but allowing components to change */
/*
html {
    box-sizing: border-box;
}
*, *:before, *:after {
    box-sizing: inherit;
}
*/

html,
body {
    height: 100%;
    min-height: 250px;
    width: 100%;
    min-width: 275px;
    margin: 0px;
    padding: 0px;

    /*
    https://stackoverflow.com/a/58890319
    scroll-padding-top: 80px;
    */
}

/*
body {
    position: relative;

    background-color: black !important;
    color: rgb(240, 240, 240) !important;
}
*/

nav {
    width: 100%;
    height: auto;

    padding: 0px;
    margin: 0px;

    position: absolute;
    top: -1px;

    font-family: Helvetica, "Helvetica Neue", sans-serif;
    font-size:18px;
}

main {
    font-family: Helvetica, "Helvetica Neue", sans-serif;
    margin: auto;

    position: relative;
    background-color: #0d1117;

    padding-bottom: 30px;
}

#main-hide {
    /* Only purpose is to hide scrolling code */
    max-width: 1500px;
    margin: 0px auto;
}

hr {
    background-color: white;
}

ul {
    margin-bottom: 0px !important;
}

footer {
    width: 100%;
    min-height: 128.5px; /* For when AdGuard blocks social icons */
    height: auto;
    font-family: Helvetica, "Helvetica Neue", sans-serif;

    background-color: rgb(26, 26, 26);
    bottom: 0px;
    position: relative
}

/* https://webplatform.news/issues/2020-05-26 */
.skip-link {
    color: transparent;
    position: absolute;
    left: -9999em;
}

  .skip-link:focus {
    left: 0;
    z-index: 1; /* or larger if necessary */
}

/* Remove this when Safari supports scroll-padding-top (in html,body) */
/* https://stackoverflow.com/a/28824157 */
/*
.topic-outer[id]:before {
    display: block;
    content: "";
    margin-top: -71px;
    height: 71px;
    visibility: hidden;
}
*/

/*
:target::before {
    display: block;
    content: "";
    margin-top: -71px;
    height: 71px;
    visibility: hidden;
}
*/

.akd-tooltip {
    position: relative;
    display: inline-block;
}

.akd-tooltip .akd-tooltip-text {
    visibility: hidden;
    width: 80px;
    background-color: black;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 2px 0;
    position: absolute;
    z-index: 1038;
    bottom: 130%;
    left: 50%;
    margin-left: -40px;

    font-size: 14px;
    transition: opacity 1s;
}

.akd-tooltip .akd-tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: black transparent transparent transparent;
}

.akd-tooltip:hover .akd-tooltip-text {
    visibility: visible;
}

.navbar {
    min-width: 275px;

    background-color: rgb(26, 26, 26);
    /* background-color: transparent; */

    -webkit-transition: background 0.3s linear;
    -moz-transition: background 0.3s linear;
    -ms-transition: background 0.3s linear;
    -o-transition: background 0.3s linear;
    transition: background 0.3s linear;

    justify-content: center !important;
}

.navbar-brand {
    position: absolute;
    top: 1px;
    left: 7px;
}

.navbar-brand img {
    height: 45px;
    width: 45px;
    aspect-ratio: 1;
}

.navbar-brand-title {
    /* display: inline-block; */
    padding-left: 11px;
    margin: 0px auto;
    display: none;

    font-family: "Arca Majora 3", sans-serif;
}

.nav-link {
    padding-left: 1rem !important;
    padding-right: 1rem !important;

    text-align: center;
}

.nav-link.active {
    background-color: #008163 !important;
    color: rgb(240, 240, 240) !important;
}

.navbar-collapse {
    flex-grow: 0 !important;
}

.dropdown-toggle {
    background-color: transparent !important;
}

.nav-link {
    color: rgba(255, 255, 255, 0.75) !important;
}

.nav-link:hover {
    color: rgb(240, 240, 240) !important;
}

.dropdown-menu {
    background-color: rgb(26, 26, 26) !important;
}

.dropdown-menu ul {
    padding-left: 0px;
    list-style-type: none;
}

.dropdown-item.nav-link {
    color: rgba(255, 255, 255, 0.75);
    text-align: center !important;

    background-color: transparent !important;
}

.dropdown-item.nav-link:hover {
    /* background-color: #008163 !important; */
    color: rgba(255, 255, 255, 1) !important;
}

.dropdown-item.nav-link svg {
    float: right;
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.topic-outer {
    padding-top: 71px;

    /*
    background-size: cover;
    background-color: white;
    background-blend-mode: luminosity;
    */
}

.topic-header-line {
    width: 100px;
}

.column-topic-group {
    width: 100%;
    padding: 0px;
    margin: 30px 0px 0px 0px;

    display: flex;
    flex-flow: row wrap;
    justify-content: space-around;
}

.topic-header {
    font-size: 38px;
    text-align: center;
    margin: 0px;

    font-family: "Arca Majora 3", sans-serif;
}

.topic {
    height: auto;
    margin: 30px 30px 0px 30px;

    display: flex;
    flex-flow: row nowrap;
    justify-content: space-around;
    align-items: stretch;
    align-content: stretch;
}

.column-topic {
    width: 50%;
    /* min-width: 360px; */
    height: auto;
    margin: 15px 0px;

    display: flex;
    flex-flow: row wrap;
    align-items: stretch;
    align-content: space-around;
}

.topic-box {
    width: 100%;
    margin: 10px 50px;

    display: flex;
    flex-flow: column nowrap;
}

.column-topic-box {
    /* flex: 1 0 175px; */
    width: 50%;
    height: 100%;

    display: flex;
    flex-flow: column nowrap;
    justify-content: initial;
    align-items: center;
    align-content: initial;
}

.topic-box-main {
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-start;
    /* align-items: center; */
    align-items: flex-start;
    align-content: stretch;
}

.column-topic-box-main {
    display: flex;
    flex-flow: column nowrap;
    justify-content: initial;
    align-items: center;
    align-content: initial;
}

.topic-box-icon {
    height: 100px;
    width: 100px;
    margin: 0px 15px 0px 0px;

    display: flex;
    justify-content: center;

    position: relative;
}

.column-topic-box-icon {
    height: 100px;
    width: 100px;

    display: flex;
    justify-content: center;
}

.topic-box-icon img,
.column-topic-box-icon img{
    border-radius: 50%;
    aspect-ratio: 1;
    height: 100%;
}

.topic-box-text {
    width: auto;
    height: 100%;

    display: block;
}

.column-topic-box-text {
    margin-bottom: 5px;
}

.topic-box-title {
    font-size: 28px;
    margin: 0px;
}

.column-topic-box-title {
    font-size: 28px;
    margin: 0px;
    text-align: center;
}

.topic-box-subtitle {
    font-size: 18px;
    margin: 0px;
}

.topic-box-subtitle-small {
    font-size: 14px;
    margin: 0px;
    color: gray;
}

.topic-box-description {
    width: 100%;
    margin: 10px 30px 5px 5px;

    font-size: 16px;
}

.column-topic-box-description {
    width: 100%;
    font-size: 16px;
    text-align: center;
}

.column-topic-box-description ul {
    list-style: none;
    padding-left: 0px;
}

.topic-box-description ul {
    list-style: outside;
    margin-bottom: 5px;
    padding-left: 20px;
}

.topic-box-links {
    margin-top: 10px;

    display: flex;
    flex-flow: row wrap;
    /* justify-content: space-evenly; */
    justify-content: center;
}

.topic-box-links > .btn + .btn {
    margin-left: 40px;
}

.carousel-slide-outer {
    display: flex;
    align-items: flex-end;

    flex-grow: 1;
    transition: 0.2s;
}

.carousel-slide-outer:hover {
    transform: scale(1.01);
}

.carousel.slide {
    width: 90%;
    min-width: 300px;
    max-width: 600px;
    /* margin: 30px auto 50px auto; */
    margin: 20px auto;
}

.carousel-item img {
    aspect-ratio: 5/3;
}

.carousel-control-prev-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23ccc' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M5.25 0l-4 4 4 4 1.5-1.5L4.25 4l2.5-2.5L5.25 0z'/%3e%3c/svg%3e") !important;
}

.carousel-control-next-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23ccc' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M2.75 0l-1.5 1.5L3.75 4l-2.5 2.5L2.75 8l4-4-4-4z'/%3e%3c/svg%3e") !important;
}

#entrance-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    user-select: none;
    /*
    transition-duration: 300s;
    transition-timing-function: linear;
    */
}

#entrance-background > pre > code {
    /* In case code styling doesn't load */
    color: #c9d1d9;
}

#entrance-background-hide {
    max-width: 1500px;
}

#entrance-background {
    min-width: 800px;
    /* For some reason, this doesn't work on Safari */
    /* animation: marquee 400s linear infinite; */
}

@keyframes marquee {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(0, -100%); }
}

#entrance {
    width: 100%;
    height: 100%;

    display: flex;
    flex-flow: column nowrap;
    justify-content: center;
    align-items: center;

    text-align: center;
    font-family: "Arca Majora 3", sans-serif;

    position: relative;
    background-image: linear-gradient(#0d111733 60%, #0d111733 60%, #0d1117 100%);
}

#entrance-image {
    margin-bottom: 10px;
    width: 20%;
    min-width: 140px;
    max-width: 190px;
}

#entrance-image img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1;

    /* border: 4px solid white; */
    /* border-radius: 50%; */
}

#entrance-title {
    font-size: 40px;
    margin: 0px;

    text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000;
}

#entrance-subtitle {
    font-size: 18px;
    margin: 0px;

    text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000;
}

#entrance hr {
    background-image: -moz-linear-gradient(left, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6));
    background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6));
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6));
    height: 1px;
    border: 0;
    width: 225px;
    margin: 0 0 5px 0;
}

#entrance-scroll {
    max-width: 35px;
    max-height: 90px;

    position: absolute;
    bottom: 0;

    cursor: pointer;
    transition: 0.2s;
}

#entrance-scroll:hover {
    transform: scale(1.1);
}

#entrance-scroll svg {
    width: 100%;
    min-width: 28px;
    height: 100%;
    max-height: 100px;

    fill: white;

    -moz-animation: entrance-arrow-bounce 4s infinite;
	-webkit-animation: entrance-arrow-bounce 4s infinite;
	animation: entrance-arrow-bounce 4s infinite;
}

@media (prefers-reduced-motion: reduce) {
    #entrance-scroll svg {
        -moz-animation: none;
        -webkit-animation: none;
	    animation: none;
    }
}

@-moz-keyframes entrance-arrow-bounce {
    0%, 50%, 100% {
      -moz-transform: translateY(0);
      transform: translateY(0);
    }
    25%, 75% {
      -moz-transform: translateY(-15px);
      transform: translateY(-15px);
    }
}
@-webkit-keyframes entrance-arrow-bounce {
    0%, 50%, 100% {
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
    25%, 75% {
        -webkit-transform: translateY(-15px);
        transform: translateY(-15px);
    }
}
@keyframes entrance-arrow-bounce {
    0%, 50%, 100% {
      -moz-transform: translateY(0);
      -ms-transform: translateY(0);
      -webkit-transform: translateY(0);
      transform: translateY(0);
    }
    25%, 75% {
      -moz-transform: translateY(-15px);
      -ms-transform: translateY(-15px);
      -webkit-transform: translateY(-15px);
      transform: translateY(-15px);
    }
}

#ro .topic-box-icon,
#via .topic-box-icon,
#privacy .topic-box-icon {
    height: 90px;
    margin-top: 5px;
    margin-bottom: 5px;
}

#other-skills .column-topic-box-icon {
    width: 90px;
    height: 90px;
    margin-top: 5px;
    margin-bottom: 5px;
}

#webdev .column-topic-box-icon {
    width: 82px;
    height: 82px;
    margin-top: 9px;
    margin-bottom: 9px;
}

#placesign .topic-box-icon img,
#cal-hacks .topic-box-icon img,
#cortical .topic-box-icon img,
#privacy .topic-box-icon img,
#via .topic-box-icon img,
#ccic .topic-box-icon img,
#webdev .column-topic-box-icon img,
#other-skills .column-topic-box-icon img {
    border-radius: initial;
}

#gavilan .topic-box-subtitle {
    display: inline-block;
}

#footer-main {
    display: inline-block;
    width: 100%;
    height: 100%;
    padding: 10px 25px 0px 25px;
    text-align: center;
}

#socials {
    padding-bottom: 5px;

    display: inline-block;
}

.socials-group {
    display: inline-block;
    margin-top: 5px;
}

#socials a {
    display: inline-block;
    margin: 0px 5px;
}

#socials svg {
    width: 35px;
    height: 30px;

    fill: rgb(242, 241, 239);
}

#socials svg.icon-mastodon {
    height: 25px;
}

#socials svg.icon-gamepad {
    height: 45px;
    padding-bottom: 5px;
}

#socials svg.icon-music {
    height: 27px;
}

#socials svg:hover {
    fill: #fff;
}

#mastodon-tooltip {
    bottom: 145%;
}

#dino-tooltip {
    bottom: 105%;
}

#footer-text {
    margin: 10px 0px;
    display: flex;
    justify-content: center;
    /* align-items: center; */
}

#footer-text > div {
    min-width: 180px;
}

#footer-text p {
    margin-bottom: 0;
}

#footer-text a {
    color: inherit;
}

#footer-text a.underline {
    text-decoration: underline;
}

#main-frame-error {
    padding-top: 10px;
    color: rgb(240, 240, 240);
    text-align: center;
    margin-bottom: 0;

    display: none;
}

#t #main-frame-error {
    display: inherit;
}

#dino-title {
    font-family: "Arca Majora 3", sans-serif;
    margin-bottom: 0px;
    font-size: 20px;
}

#dino-text {
    margin-bottom: 0px;
    font-size: 12px;
}

#oneko {
    /* Have cat go above navbar */
    z-index: 1037;
    transition: opacity 0.7s ease;

    pointer-events: none;
}

#oneko-toggle {
    position: absolute;
    top: 15px;
    right: 15px;

    background-color: inherit;
    border-width: 0;
    fill: rgba(255,255,255,.5);
    transition: fill 0.3s linear;
}

#oneko-toggle:hover {
    fill: rgb(240, 240, 240) !important;
}

#oneko-toggle svg {
    width: 25px;
    height: 25px;
}

/* MOBILE */
@media screen and (max-width: 1100px) {
    .topic-box {
        margin: 20px 10px;
    }

    .topic-box-description {
        margin: 10px 20px 0px 0px;
    }
}

@media screen and (max-width: 991.98px) {
    .navbar {
        justify-content: space-between !important;
    }

    .navbar-collapse {
        flex-grow: 1 !important;
    }

    .navbar-brand {
        position: initial;
        top: auto;
        left: auto;
        margin-right: 0px !important;
    }

    .navbar-brand-title {
        display: inline-block;
    }

    .dropdown-item.nav-link {
        white-space: pre;
    }

    .dropdown-item.nav-link svg {
        float: none;
    }

    #oneko-toggle {
        top: 23px;
        right: 87px;
    }
}

@media screen and (max-width: 900px) {
    .topic {
        flex-wrap: wrap;
    }

    .topic-box {
        width: 70%;
    }

    .carousel.slide {
        width: 90%;
    }

    .topic-box-main {
        flex-wrap: wrap;
    }

    .topic-box-icon {
        width: 100%;
        margin: 0px;
    }

    .topic-box-text {
        width: 100%;
        text-align: center;
        margin-top: 1rem;
    }

    .topic-box-description {
        margin: 10px 0px 0px 5px;
    }

    .topic-box-links {
        justify-content: space-evenly;
    }

    .topic-box-links a {
        margin-bottom: 10px;
        margin-left: 5px;
        margin-right: 5px;
    }

    .topic-box-links > .btn + .btn {
        margin-left: 0px;
    }
}

@media screen and (max-width:750px) {
    .column-topic {
        width: 100%;
    }
}

@media screen and (max-width:600px) {
    .topic-box {
        width: 90%;
    }
}

@media screen and (max-width:500px) {
    .topic {
        margin: 15px 0px;
    }
}

@media screen and (max-width:400px) {
    .column-topic {
        justify-content: center;
    }

    .column-topic-box {
        min-width: 200px;
        height: auto;
    }

    #footer-text {
        flex-wrap: wrap;
    }

    #webrings {
        width: 100%;

        padding-bottom: 10px;
        margin-bottom: 10px;
        border-bottom: 1px solid white;
    }
}

@media screen and (max-height: 500px) {
    #entrance-image {
        min-width: auto;
        max-width: 110px;
    }

    #entrance-scroll svg {
        max-height: 75px;
    }
}

/* PRINT */
.print-text {
    margin-top: 7rem;
}

.print-only {
    display: none;
}

@page {
    size: A4;
}

@media print {
    /* Classes to be hidden */
    #entrance-background,
    #entrance-scroll,
    #noscript-text,
    nav,
    .carousel-slide-outer,
    #uwu-less-link,
    #socials,
    .topic-box-links,
    footer {
        display: none !important;
    }

    .print-only {
        display: initial;
    }

    .topic-outer {
        page-break-inside: avoid;
        margin: 0px;
    }

    .topic-box {
        page-break-inside: avoid;
        margin: 10px 20px;
    }

    .column-topic-box {
        page-break-inside: avoid;
    }

    #entrance-title,
    #entrance-subtitle {
        text-shadow: none;
    }
}
