@font-face {
    src: url("assets/jetbrains-mono.ttf");
    font-family: "Jetbrains Mono";
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-gutter: stable both-edges;
    user-select: none;
}

*:not(a, button, input, a > strong) {
    cursor: default !important;
}

input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0px 1000px var(--bg-light) inset !important; 
    -webkit-text-fill-color: var(--text-secondary) !important; 
    caret-color: white !important;
}


a[href] {
    color: var(--accent);
}

:root {
    --accent: #9f7aea;
    --accent-light: #d6bcfa;
    --bg-dark: #0f0f12;
    --bg-light: #1a1a1f;
    --text-primary: #e8e8ed;
    --text-secondary: #b0b0b8;
}

body {
    font-family: "JetBrains Mono", monospace;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.6;
    overflow-x: hidden;
}

.nav {
    /* CSS Blur: https://www.joshwcomeau.com/css/backdrop-filter/ */
    mask-image: linear-gradient(to bottom, black 0% 80%, transparent 100%);
    background: linear-gradient(to bottom, var(--bg-dark) 0%, transparent 100%);
    top: 0;
    left: 0;
    z-index: 100;
    position: fixed;
    display: flex;
    justify-content: center;
    padding-top: 1.3rem;
    gap: 2rem;
    backdrop-filter: blur(16px);
    width: 100%;
    outline: 1px solid var(--bg-dark);
    outline-offset: -4rem;
}

.nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav a:hover {
    color: var(--accent-light);
}

.container {
    padding-top: 4rem !important;
    text-align: center;
    padding: 2rem;
}

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.title {
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 500;
    color: var(--accent);
    white-space: nowrap;
    min-height: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.typing {
    display: inline;
}

.cursor {
    display: inline-block;
    animation: blink 1s infinite;
    color: var(--accent);
    margin-left: 0.1em;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

.tagline {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    margin: 0;
}

button {
    background-color: var(--accent);
    color: var(--bg-dark);
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-family: "JetBrains Mono", monospace;
    font-weight: 500;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(159, 122, 234, 0.2);
}

button:hover {
    background-color: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(159, 122, 234, 0.3);
}

button:active {
    transform: translateY(0);
}

.accordion {
    background-color: var(--bg-light);
    border: none;
    border-left: 3px solid var(--accent);
    padding: 1rem 1.5rem;
    border-radius: 0.375rem;
    transition: all 0.25s ease;
    cursor: pointer;
}

.accordion:hover {
    background-color: rgba(159, 122, 234, 0.08);
    transform: translateX(4px);
}

.accordion .header {
    font-size: 1rem;
    font-weight: 500;
    color: var(--accent);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion .content {
    color: var(--text-secondary);
    font-size: 0.9rem;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition:
        max-height 0.35s ease,
        opacity 0.25s ease,
        margin 0.25s ease;
}

.accordion.open .content {
    max-height: 300px;
    opacity: 1;
    margin-top: 1rem;
}

.accordion .header::after {
    content: "▼";
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.accordion.open .header::after {
    transform: rotate(180deg);
}

.dir {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.entry {
    display: grid;
    grid-template-columns: 1fr 120px 150px;
    padding: 0.7rem 1rem;
    background: var(--bg-light);
    border: none;
    border-left: 3px solid var(--accent);
    border-radius: 0.3rem;
    transition: all 0.2s ease;
}

.entry:hover {
    background: rgba(159, 122, 234, 0.08);
}

.entry a {
    text-decoration: none;
    color: var(--accent);
    text-align: left;
}

.entry span {
    color: var(--text-secondary);
    text-align: right;
}

.breadcrumbs {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    justify-content: center;
}

.breadcrumbs a {
    color: var(--text-primary);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.search_dir {
    color: white;
    margin-bottom: 10px;
    font-family: "Jetbrains Mono", monospace;
}

.search_dir:focus {
    outline: none !important;
}

.search_back{
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .nav {
        top: 0;
        gap: 1rem;
    }

    .nav a {
        font-size: 0.8rem;
    }

    .container {
        padding: 1rem;
    }

    .title {
        font-size: clamp(2rem, 7vw, 3rem);
        white-space: normal;
        text-align: center;
        margin-bottom: 0.5rem;
    }

    .breadcrumbs {
        font-size: 0.75rem;
        gap: 0.15rem;
        justify-content: center;
        margin-bottom: 0.75rem;
    }

    .dir {
        margin-top: 1rem;
        gap: 0.5rem;
    }

    .entry {
        grid-template-columns: 1fr 90px 120px;
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }

    .entry span {
        font-size: 0.8rem;
    }

    button {
        padding: 0.5rem 1.2rem;
        font-size: 0.9rem;
    }
}
