@import "./vars.css";

* {
    font-family: "Consolas", monospace;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    user-select: none;
    scroll-behavior: smooth;
}

a {
    color: #5eb3ff;
    text-decoration: none;

    &:hover {
        color: var(--accent);
        text-decoration: underline;
    }
}

::selection {
    color: var(--bg);
    background: var(--accent);
}


header {
    background: var(--titlebar-active);
    color: white;
    padding: 0 12px;
    height: 32px;
    display: flex;
    align-items: center;
    font-size: 12px;
}

main {
    overflow-y: auto;
    background: var(--bg);
    color: #ccc;
    height: calc(100vh - 32px - 24px);
}

.content {
    padding: 20px 24px;
    height: calc(100% - 52px);
    overflow-y: auto;
    cursor: text;

    section {
        font-size: 14px;

        .cmd_line {
            margin-bottom: 4px;
        }

        .cmd_title {
            background: var(--titlebar);
            color: #fff;
            padding: 3px 10px;
            display: inline-block;
            margin-bottom: 12px;
            font-weight: 700;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            font-size: 14px;
        }

        &:not(:last-child) {
            margin-bottom: 12px;
        }

        .muted {
            color: var(--dim);
        }

        table {
            margin-top: .5rem;


            td:first-child {
                width: 16ch;
            }
        }
    }

    .body_hidden {
        display: none;
    }
}

.first_block {
    .title {
        white-space: pre;
        line-height: 0.59;
        text-align: left;
        margin-left: -16ch;
        font-size: clamp(0.5rem, 0.3375rem + 0.8125vw, 1.3125rem);
    }

    .subtitle {
        color: var(--accent);
        width: clamp(17.5rem, 11.725rem + 28.875vw, 46.375rem);
        text-align: center;
        font-weight: bold;
        font-style: italic;
    }

    .muted {
        color: var(--dim);

        span {
            color: var(--accent);
        }
    }
}

.help_block {
    table {
        font-size: 14px;

        tr {
            td:first-child {
                color: var(--accent);
                width: 16ch;
            }
        }
    }
}

.about_block {
    p {
        span {
            color: var(--accent);
        }
    }

    table {
        tr {
            td:first-child {
                color: var(--dim);
                width: 16ch;
            }

            td:last-child {
                margin-left: 1rem;
            }
        }
    }
}

.projects_block {
    .projects_list {
        display: flex;
        flex-direction: column;
        gap: .5rem;
        margin: .25rem 0;

        .project {
            width: 100%;
            border: 1px solid var(--border);
            padding: 12px 1rem;
            cursor: pointer;
            transition: all .3s ease-in-out;
            position: relative;
            overflow: hidden;

            &:after {
                content: "";
                width: 60px;
                height: 60px;
                transform: rotate(45deg);
                border: 1px solid var(--border);
                position: absolute;
                right: -20px;
                top: -20px;
                transition: all .3s ease-in-out;
            }

            &:hover {
                border-color: var(--accent);
                transform: translateX(5px);
                background: linear-gradient(15deg, var(--accent-dim) 0%, rgb(0 0 0 / 0) 35%);

                &:after {
                    border-color: var(--accent);
                    background: var(--accent-dim);
                }
            }

            .title {
                color: var(--accent);
                font-size: 14px;
                font-weight: normal;
                margin-bottom: 4px;
            }

            .description {
                margin-bottom: 6px;
            }

            .tags {
                display: flex;
                gap: .5rem;
                margin-top: .5rem;


                .tag {
                    font-size: 11px;
                    color: var(--dim);
                    border: 1px solid var(--border-hi);
                    padding: 2px 8px;
                    cursor: pointer;
                    transition: all .15s;
                    background: #161616;
                }
            }
        }
    }
}

.contact_block {
    table {
        tr {
            td:first-child {
                width: 16ch;
            }
        }
    }

    .footer {
        margin-top: 4ch;

        p:first-child {
            color: var(--accent);
        }

        p:last-child {
            margin-left: 2ch;

            span {
                color: var(--accent);
            }
        }
    }
}

.msg_block {
    .msg_status {
        margin-top: 1ch;
        display: none;

        span {
            font-weight: 600;
        }

        &.msg_ok {
            span {
                color: var(--accent);
            }
        }

        &.msg_error {
            span {
                color: #ff6b6b;
            }
        }

        &.active {
            display: block;
        }
    }
}

.skills_block {
    table {
        border-spacing: 0 .45rem;
        tr {
            .bar {
                position: relative;
                z-index: 1;
                background: #000;
                border: 1px solid var(--border-hi);
                height: 14px;
                width: 92%;
                padding: 0 1px;

                &:before {
                    position: absolute;
                    content: "";
                    inset: 0;
                    background: repeating-linear-gradient(90deg, transparent 0 8px, rgba(0, 0, 0, 0.3) 8px 10px);
                    z-index: 2;
                    pointer-events: none;
                }

                .progress {
                    background: var(--accent);
                    height: 103%;
                    position: relative;
                    z-index: 1;
                    animation: line .8s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
                }
            }
            td:last-child {
                width: 6ch;
                padding-left: 2ch;
            }
        }
    }
}

.experience_block {
    .dates {
        display: flex;
        flex-direction: column-reverse;

        .date {
            position: relative;
            padding-left: 1rem;
            border-left: 2px solid var(--border-hi);
            margin-left: 4px;
            display: flex;
            flex-direction: column;
            gap: 4px;

            &:before {
                content: "";
                position: absolute;
                width: 10px;
                height: 10px;
                background: var(--accent);
                left: -6px;
                top: 3px;
            }

            &:not(:first-child) {
                padding-bottom: 14px;
            }

            .time {
                color: var(--accent);
                font-weight: 700;
            }
            .action {
                font-weight: 700;
            }
        }
    }
}


.error_block {
    .error {
        color: #ff6b6b;
    }
}

.line {
    display: flex;
    width: 100vw;
    padding: 8px 20px 24px;
    border-top: 1px solid var(--border);
    align-items: center;

    .dir {
        margin-right: .5rem;
        font-size: clamp(0.75rem, 0.6rem + 0.3333vw, 1rem);
    }

    input {
        background: none;
        border: none;
        color: var(--text);
        flex-grow: .99;
        outline: none;
        caret-color: var(--accent);
    }

    .commands {
        margin-left: auto;
        display: flex;
        gap: 6px;
        margin-right: .5rem;

        .command {
            font-size: 11px;
            color: var(--dim);
            border: 1px solid var(--border-hi);
            padding: 2px 8px;
            cursor: pointer;
            transition: all .15s;
            background: #161616;

            &:hover {
                color: #000;
                background: var(--accent);
                border-color: var(--accent);
            }
        }
    }
}

footer {
    display: flex;
    justify-content: space-between;
    padding: 4px 16px;
    background: var(--panel);
    color: var(--dim);
    border-top: 1px solid var(--border);
    font-size: 11px;

    div {
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .status {
        display: flex;
        align-items: center;
        gap: 6px;

        span:first-child {
            animation: fade 3s ease-in-out infinite forwards;
        }

        &.on {
            color: var(--accent);
        }

        &.off {
            color: #ff6b6b;
        }
    }

    .visits {
        margin-top: -2px;
    }
}

@keyframes fade {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .25;
    }
}
@keyframes line {
 from {
     width: 0;
 }
}
@media screen and (max-width: 720px) {
    .line {
        .dir {
            span {
                display: none;
            }
        }
    }

}

@media screen and (max-width: 480px) {
    .line {
        .commands {
            display: none;
        }
    }

}