:root {
    --bg: #fcfcfa;
    --fg: #0c0c0c;
    --accent: #ff5500;
    --dot: rgba(0, 0, 0, .07);
    --border: 1px solid var(--fg);
    font-size: 24px
}

#glyph{
  width:90px;height:90px;background:var(--fg);border-radius:50%;
  display:flex;align-items:center;justify-content:center;cursor:pointer;
  transition:transform .15s;
}
#glyph:active{transform:scale(.92);}
.screen{
  font-size:3rem;line-height:1;color:var(--bg);user-select:none;
  -webkit-mask-image:radial-gradient(circle,#000 50%,transparent 41%);
          mask-image:radial-gradient(circle,#000 50%,transparent 41%);
  -webkit-mask-size:9px 9px;
          mask-size:9px 9px;
  -webkit-mask-repeat:repeat;mask-repeat:repeat;
}

body.dark {
    --bg: #0c0c0c;
    --fg: #fcfcfa;
    --dot: rgba(255, 255, 255, .1)
}

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

html {
    scroll-behavior: smooth
}

body {
    background: var(--bg);
    color: var(--fg);
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    transition: .3s
}

body.modern::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -3;
    background-image: radial-gradient(circle, var(--dot)1px, transparent 1px);
    background-size: 24px 24px;
    animation: grid 45s linear infinite
}

body.modern.hideBg::before {
    display: none
}

@keyframes grid {
    to {
        background-position: 300px 300px
    }
}

.mesh {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -2;
    stroke: var(--fg);
    stroke-opacity: .12;
    stroke-width: 1;
    fill: none;
    animation: float 25s linear infinite alternate
}

.mesh text {
    fill: var(--fg);
    fill-opacity: .35;
    font-size: 10px;
    font-family: monospace
}

.mesh circle {
    cursor: pointer;
    transition: transform 0.3s ease
}

.mesh line {
    transition: stroke-opacity 0.3s ease
}

@keyframes float {
    0% {
        transform: translate(-53%, -52%)
    }

    100% {
        transform: translate(-47%, -48%)
    }
}

body.classic .mesh {
    display: none
}

body.hideBg .mesh {
    display: none
}

nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    padding: 1rem 2rem;
    border-bottom: var(--border);
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 10;
}

nav h3 {
    font-size: 1rem;
    font-weight: 700;
    text-transform: lowercase;
    text-align: center
}

nav ul {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center
}

nav a {
    font-family: 'IBM Plex Mono', monospace;
    font-size: .85rem;
    text-transform: lowercase;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    color: inherit;
    text-align: center
}

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

.dropdown {
    position: relative
}

.dropdown-content {
    display: none;
    position: absolute;
    background: var(--bg);
    border: var(--border);
    min-width: 120px;
    top: 100%;
    left: 0;
    z-index: 20
}

.dropdown:hover .dropdown-content {
    display: block
}

.dropdown-content a {
    display: block;
    padding: .5rem 1rem;
    border-bottom: none
}

.dropdown-content a:hover {
    background: var(--accent);
    color: #fff
}

@media(max-width:640px) {
    nav {
        flex-direction: column;
        text-align: center
    }

    nav ul {
        justify-content: center;
        margin-left: 0
    }
}

section {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 1rem;
    display: none
}

section.active {
    display: block;
}

section h2 {
    font-size: 1.7rem;
    font-weight: 700;
    text-transform: lowercase;
    margin-bottom: 2rem;
    border-left: 4px solid var(--accent);
    padding-left: 1rem
}

.quoteblock {
    text-transform: lowercase;
    margin-bottom: 2rem;
    border-left: 4px solid var(--accent);
    padding-left: 1rem
}

.hero {
    display: flex;
    flex-direction: column-reverse;
    gap: 2rem
}

@media(min-width:700px) {
    .hero {
        flex-direction: row
    }
}

.hero-text h1 {
    font-size: clamp(1.5rem, 5.3vw, 2.5rem);
    text-transform: lowercase
}

.hero-text h2 {
    font-size: 1.1rem;
    margin: .9rem 0;
    text-transform: lowercase
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 1.3rem 0
}

.tag {
    font-size: .8rem;
    font-family: 'IBM Plex Mono', monospace;
    text-transform: lowercase;
    padding: .25rem .8rem;
    border: var(--border);
    border-radius: 2rem
}

.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .8rem
}

.gallery img {
    width: 100%;
    max-width: 300px;
    border: var(--border);
    object-fit: cover;
    filter: grayscale(1);
    transition: .3s
}

body.modern .gallery img:hover {
    filter: none;
    transform: scale(1.03)
}

body.classic .gallery img {
    filter: none;
    transition: none
}

details {
    margin: 2rem 0;
    border: var(--border);
    padding: 1rem;
    background: var(--bg);
    max-width: 20vw
}

details summary {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1rem;
    text-transform: lowercase;
    cursor: pointer;
    list-style: none
}

details summary::after {
    content: '+';
    float: right
}

details[open] summary::after {
    content: '−'
}

details p,
details ul {
    margin-top: 1rem;
    font-size: .8rem
}

details ul {
    list-style: disc;
    padding-left: 1.5rem
}

@media(max-width:640px) {
    details {
        max-width: 100vw
    }
}

.paper-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem
}

.paper-item {
    border: var(--border);
    padding: 1.5rem;
    border-radius: 8px;
    background: var(--bg)
}

.paper-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem
}

.paper-year {
    font-family: 'IBM Plex Mono', monospace;
    font-size: .78rem;
    padding: .2rem .5rem;
    background: var(--accent);
    color: #fff;
    text-transform: uppercase;
    border-radius: 3px
}

.paper-title {
    font-weight: 600;
    text-transform: lowercase;
    font-size: 1.1rem
}

.paper-abstract {
    margin: 1rem 0;
    font-size: .9rem;
    color: #666
}

.paper-keywords {
    margin: 1rem 0
}

.keyword {
    font-size: .7rem;
    font-family: 'IBM Plex Mono', monospace;
    text-transform: lowercase;
    padding: .15rem .5rem;
    background: #f0f0f0;
    border-radius: 12px;
    margin-right: .5rem;
    margin-bottom: .5rem;
    display: inline-block
}

.paper-links a {
    font-family: 'IBM Plex Mono', monospace;
    font-size: .8rem;
    border-bottom: 1px solid var(--fg);
    margin-right: .6rem
}

.paper-links a:hover {
    color: var(--accent);
    border-color: var(--accent)
}

.external-links {
    margin-top: 2rem;
    text-align: center
}

.external-links h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    text-transform: lowercase
}

.external-links a {
    display: inline-block;
    margin: 0.5rem 1rem;
    padding: .5rem 1rem;
    border: var(--border);
    border-radius: 20px;
    text-decoration: none;
    font-family: 'IBM Plex Mono', monospace;
    font-size: .85rem;
    transition: .3s
}

.external-links a:hover {
    background: var(--accent);
    color: #fff
}

.logo {
    width: 44px;
    height: auto;
    object-fit: contain;
    border: var(--border);
    background: #fff;
    padding: 2px
}

.lor-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem
}

.lor-item {
    display: flex;
    align-items: center;
    gap: .8rem;
    border-bottom: var(--border);
    padding-bottom: .8rem;
    font-size: .95rem
}

.lor-item a {
    font-family: 'IBM Plex Mono', monospace;
    font-size: .8rem;
    border-bottom: 1px solid var(--fg)
}

.lor-item a:hover {
    color: var(--accent);
    border-color: var(--accent)
}

footer {
    text-align: center;
    font-size: .75rem;
    padding: 2rem 1rem;
    border-top: var(--border);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem
}

a {
    color: black;
    text-decoration: none;
}

.footer-controls {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-bottom: 1rem
}

.bg-toggle {
    padding: .4rem .8rem;
    border: var(--border);
    background: var(--bg);
    cursor: pointer;
    border-radius: 20px;
    font-size: .8rem;
    font-family: 'IBM Plex Mono', monospace;
    transition: .3s
}

.bg-toggle:hover {
    background: var(--accent);
    color: #fff
}

/* fidget corner */
#fidgetCorner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .8rem;
    border: var(--border);
    border-radius: 8px;
    background: var(--bg);
    font-family: 'IBM Plex Mono', monospace;
    font-size: .7rem
}

/* Uiverse switch */
.switch-container {
    width: 192px;
    aspect-ratio: 16/9;
    border-radius: 12px;
    background: #ebe6ef;
    border: 4px solid #121331;
    transition: background .3s;
}

.switch-container.checked {
    background: #3a3347
}

.switch-inner {
    display: flex;
    height: 100%;
    width: 100%;
    padding: 0 8px;
    align-items: center;
    gap: 8px
}

.switch-dot {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 4px solid #121331
}

.switch-label {
    width: 100%;
    height: 40px;
    border: 4px solid #121331;
    border-radius: 4px;
    cursor: pointer;
    transform-origin: center;
}

.switch-label.checked {
    transform: scaleX(-1)
}

.switch-input {
    display: none
}

.switch-bg {
    width: 100%;
    height: 100%;
    background: #f24c00;
    position: relative
}

.switch-arrow {
    width: 0;
    height: 0;
    z-index: 20;
    border-left: 24px solid transparent;
    border-right: 24px solid transparent;
    border-top: 20px solid #121331;
    position: relative
}

.switch-arrow::before {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-top: 15px solid #e44901;
    top: -20px;
    left: -18px
}

.switch-left {
    width: 24px;
    height: 36px;
    z-index: 10;
    position: absolute;
    top: 9px;
    left: 0;
    background: #f24c00;
    border-right: 2px solid #121331;
    border-bottom: 4px solid #121331;
    transform: skewY(39deg)
}

.switch-right {
    width: 25px;
    height: 36px;
    z-index: 10;
    position: absolute;
    top: 9px;
    left: 24px;
    background: #c44002;
    border-right: 4px solid #121331;
    border-left: 2px solid #121331;
    border-bottom: 4px solid #121331;
    transform: skewY(-39deg)
}

.switch-line {
    width: 24px;
    height: 4px;
    flex-shrink: 0;
    background: #121331;
    border-radius: 2px
}

#spinner {
    width: 48px;
    height: 48px;
    cursor: pointer;
    transform: scale(1.2)
}

.fidget-spin {
    animation: spin 2s linear
}

@keyframes spin {
    from {
        transform: scale(1.2) rotate(0deg)
    }

    to {
        transform: scale(1.2) rotate(360deg)
    }
}

.cardDoor {
    width: 68px;
    height: 98px;
    border: var(--border);
    border-radius: 5px;
    background: linear-gradient(135deg, #bbb, #e6e6e6);
    cursor: pointer;
    position: relative;
    transform-origin: bottom left;
    transition: transform .4s;
    perspective: 1000px
}

.cardDoor.open {
    transform: rotateY(-25deg)
}

.cardDoor::before {
    content: "♠A";
    position: absolute;
    top: 4px;
    left: 6px;
    font-size: .9rem;
    font-family: 'IBM Plex Mono', monospace;
    color: #121212
}

.cardDoor::after {
    content: "A♠";
    position: absolute;
    bottom: 4px;
    right: 6px;
    font-size: .9rem;
    font-family: 'IBM Plex Mono', monospace;
    color: #121212;
    transform: rotate(180deg)
}

.cardDoor .card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #d44, #a22);
    border-radius: 5px;
    transform: translateZ(-1px);
    opacity: 0;
    transition: opacity .4s
}

.cardDoor.open .card-back {
    opacity: 1
}

.small-label {
    opacity: .6;
    margin-right: 1rem
}