body {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 4vh 2%;
    box-sizing: border-box;
    background-image: url('../asset/bg.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
}

.center {
    margin: auto;
    width: min(1100px, 96vw);
}

.window-body-flex {
    display: flex;
    align-items: stretch;
}

.sidebar {
    width: 26%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-self: stretch;
}

#clippy-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    box-sizing: border-box;
    height: 116px;
    background: transparent;
    overflow: hidden;
}

#clippy-container .clippy-agent {
    position: static !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    margin: 0 !important;
}

.clippy-message {
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    flex: 0 0 78px;
    max-height: 76px;
    overflow: visible;
    white-space: normal;
    overflow-wrap: break-word;
    padding: 4px 6px;
    border: 1px solid #000;
    border-radius: 4px;
    background: #ffc;
    color: #000;
    font-size: 10px;
    line-height: 1.2;
}

.clippy-message a {
    color: #00f;
    font-weight: 700;
    text-decoration: underline;
}

.clippy-message a:focus {
    outline: 1px dotted #000;
}

.clippy-message::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    border-width: 6px 0 6px 8px;
    border-style: solid;
    border-color: transparent transparent transparent #ffc;
    z-index: 2;
}

.clippy-message::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    border-width: 7px 0 7px 9px;
    border-style: solid;
    border-color: transparent transparent transparent #000;
    z-index: 1;
}

.sidebar > .status-bar {
    flex-shrink: 0;
}

.clippy-status-bar {
    margin: 5px 5px;
}

.sidebar-footer-status {
    margin: 0 5px 5px;
}

.clippy-status-bar,
.sidebar-footer-status,
.clippy-status-bar .status-bar-field,
.sidebar-footer-status .status-bar-field {
    border-radius: 4px;
}

.main-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.block {
    box-shadow: none;
    background: #fff;
    border: 1px solid #d0d0bf;
    border-radius: 4px;
    margin-left: 5px;
    margin-right: 5px;
}

.block #content {
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: 10px;
}

.profile-photo-wrap {
    display: flex;
    justify-content: center;
    padding-top: 10px;
    margin-bottom: 18px;
}

.tab-content {
    height: 500px;
    overflow-y: auto;
    padding-top: 5px;
    padding-right: 4px;
}

.tab-content > :first-child {
    margin-top: 0;
}

.main-content > [role="tabpanel"]:not([hidden]) {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
}

hr.gradient {
    margin-top: 10px;
    margin-bottom: 10px;
    height: 3px;
    border: none;
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(13, 8, 96, 1) 0%, rgba(9, 9, 121, 1) 21%, rgba(6, 84, 170, 1) 51%, rgba(0, 255, 113, 1) 100%);
}

li i {
    padding-bottom: 5px;
    padding-right: 10px;
}

ul.tree-view a {
    color: blue;
}

.no_indent_ul ul {
    list-style-position: inside;
    padding-left: 0;
}

.timeline {
    --timeline-title-width: 20%;
    --timeline-title-padding: 8px;
    --timeline-line-width: 4px;
    --timeline-line-half-width: 2px;
    width: 100%;
    max-width: 800px;
    padding-top: 15px;
    position: relative;
}

.timeline:before {
    content: "";
    position: absolute;
    top: 0;
    left: calc(var(--timeline-title-width) + var(--timeline-title-padding) - var(--timeline-line-half-width));
    bottom: 0;
    width: var(--timeline-line-width);
    background: #ddd;
}

.timeline:after {
    content: "";
    display: table;
    clear: both;
}

.entry {
    clear: both;
    text-align: left;
    position: relative;
}

.entry .title {
    margin-bottom: 0.5em;
    float: left;
    width: var(--timeline-title-width);
    padding-right: var(--timeline-title-padding);
    text-align: left;
    position: relative;
}

.entry .title:before {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    border: 4px solid #0831d9;
    background-color: #fff;
    border-radius: 100%;
    top: 15%;
    right: -8px;
    z-index: 99;
}

.entry .title h3 {
    margin: 0;
    font-size: 105%;
}

.entry .title p {
    margin: 0;
    font-size: 100%;
}

.entry .body {
    margin: 0 0 1.5em;
    float: right;
    width: 75%;
}

.entry .body p {
    line-height: 1em;
}

.entry .body p:first-child {
    margin-top: 0;
    font-weight: 400;
}

.entry .body ul {
    padding-left: 0;
    list-style-type: none;
}

.entry .body ul li:before {
    content: "–";
    margin-right: 0.5em;
}

@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .center {
        width: 100vw;
    }

    .window-body-flex {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .clippy-status-bar {
        display: none;
    }

    .sidebar-footer-status {
        margin-top: 5px;
    }

    .tab-content {
        height: auto;
        min-height: unset;
        max-height: 55vh;
    }

    .tab-content * {
        overflow-wrap: break-word;
        word-break: break-word;
        max-width: 100%;
    }

    [role=tabpanel] {
        padding-top: 6px;
    }

    .timeline:before {
        left: 12px;
    }

    .entry .title {
        float: none;
        width: 100%;
        box-sizing: border-box;
        padding-left: 30px;
        padding-right: 0;
        padding-bottom: 2px;
    }

    .entry .title:before {
        left: 14px;
        right: auto;
        top: 4px;
        transform: translateX(-50%);
    }

    .entry .body {
        float: none;
        width: 100%;
        box-sizing: border-box;
        padding-left: 30px;
        margin-bottom: 1em;
    }
    
    menu[role="tablist"] {
        flex-wrap: wrap;
    }

    menu[role="tablist"] button {
        white-space: nowrap;
        padding-left: 6px;
        padding-right: 6px;
        font-size: 90%;
    }

    menu[role="tablist"] button[aria-selected="true"] {
        margin-top: 0;
        margin-bottom: 0;
    }

    .main-content {
        margin-top: 5px;
        padding-left: 5px;
        padding-right: 5px;
    }
}
