* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Ubuntu", sans-serif;
    line-height: 1.6;
    /* 
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -o-user-select: none;
    user-select: none; */
}

p {
    margin: 0.2rem 0;
}

h5 {
    font-size: 0.9rem;
}

code {
    font-family: Consolas, "courier new";
    color: tomato;
    background-color: #f1f1f1;
    padding: 2px;
    font-size: 105%;
}

.wrapper {
    height: 100dvh;
    overflow-x: hidden;
    perspective: 1px;
    background: rgb(52, 61, 76);
}

.container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        "about teaching"
        "contact teaching"
        "research research";
    gap: calc(1.5vw + 1.5vh);
    padding: calc(1.5vw + 1.5vh);
}

#about-me-section {
    grid-area: about;
}

#teaching-section {
    grid-area: teaching;
}

#contact-section {
    grid-area: contact;
}

#research-section {
    grid-area: research;
}

header {
    position: sticky;
    top: 0;
    display: flex;
    transform-style: preserve-3d;
    z-index: 20;
    width: 100%;
    background: rgba(51, 51, 51, 0.8);
    color: #fff;
    padding: 10px;
}

#language-toggle {
    position: absolute;
    right: 1rem;
    top: 1rem;
    background: #fff;
    color: #333;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 5px;
    margin-right: 1rem;
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    object-fit: cover;
    z-index: -1;
    content: url("./background.jpg?v=6ad52a");
    transform: translateZ(-12px) scale(13);
}

.footer-line {
    position: relative;
    text-align: center;
    margin: 0;
}

.footer-bug-note {
    font-size: 0.8rem;
    opacity: 0.75;
    position: absolute;
    right: 4%;
    top: 50%;
    transform: translateY(-50%);
}

/* Portrait orientation */
@media (orientation: portrait) {
    header {
        position: relative;
    }

    .container {
        grid-template-columns: 1fr;
        grid-template-areas:
            "about"
            "teaching"
            "contact"
            "research";
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .footer-line {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.2rem;
    }

    .footer-bug-note {
        position: static;
        transform: none;
        font-size: 0.7rem;
        width: 100%;
        text-align: right;
        padding-right: 4%;
    }

    .background {
        content: url("./background-compact.jpg?v=ff7adf");
        transform: translateZ(-20px) scale(25);
    }
}

section {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

footer {
    text-align: center;
    padding: 1rem 0;
    background: rgba(51, 51, 51, 0.8);
    color: #fff;
    position: relative;
    width: 100%;
    bottom: 0;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    padding: 2rem;
    border-radius: 6px;
    position: relative;
    max-width: 100dvw;
    max-height: 100dvh;
    overflow-y: auto;
}

.modal-content #close-modal {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    font-size: larger;
    cursor: pointer;
    font-weight: bold;
    transform: scaleX(1.3) scale(1.5);
    color: palevioletred;
}

.modal-content #close-modal:hover {
    color: red;
}

.dialog-window-button {
    text-decoration: underline;
    color: #4b0082;
    cursor: pointer;
}

.dialog-window-button:hover {
    color: #800080;
}

.hidden,
.hidden *,
.hiddenf,
.hiddenf * {
    display: none;
}

.lang-loading .en {
    display: none;
}

.definition {
    margin-top: 10px;
    padding: 10px 12px;
    border-left: 4px solid #1a8a80;
    background-color: #ecfbfd;
    border-radius: 4px;
}

.equation {
    text-align: center;
    margin: 8px 0;
}

.step {
    margin-top: 20px;
    padding: 10px;
    border: 1px solid #2bc0b4;
    border-radius: 5px;
    background-color: #f5feff;
}

.step.adv {
    border-color: #c0392b;
    background-color: #fff5f5;
}

.step.cld {
    border-color: #492bc0;
    background-color: #f5f8ff;
}

.data {
    margin-top: 15px;
    padding-left: 10px;
    border-left: 3px solid #333;
}

tr td {
    border: 1px solid #ddd;
    padding: 8px;
}

hr {
    border: none;
    border-top: 5px dashed #000;
    margin: 20px 0;
}
