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

:root {
    --bg-top: #0f172a;
    --bg-bottom: #1e1b4b;
    --card-bg: rgba(255, 255, 255, 0.06);
    --card-border: rgba(255, 255, 255, 0.12);
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #818cf8;
    --accent-hover: #a5b4fc;
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
    --radius: 1.25rem;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "DM Sans", system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: linear-gradient(160deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
    background-attachment: fixed;
    line-height: 1.65;
}

.page {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1.25rem 3rem;
}

.page-stack {
    width: 100%;
    max-width: 80rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.columns-two {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 768px) {
    .page {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .columns-two {
        grid-template-columns: 1fr 1fr;
        align-items: start;
        gap: 1.5rem;
    }

    .columns-two .card {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.card {
    width: 100%;
    padding: 2rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    text-align: center;
}

.card--main {
    max-width: 34rem;
    margin: 0 auto;
    width: 100%;
}

.card--latin .box-title,
.card--latin .about {
    font-family: "Noto Serif", "Times New Roman", serif;
}

.card--russian .box-title,
.card--russian .about {
    font-family: "DM Sans", system-ui, sans-serif;
}

.columns-two .about,
.columns-two .rich-content {
    text-align: left;
    font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    line-height: 1.45;
}

.columns-two .rich-content p,
.columns-two .rich-content li {
    margin: 0 0 0.75rem;
    text-align: left;
}

.columns-two .rich-content p:last-child,
.columns-two .rich-content li:last-child {
    margin-bottom: 0;
}

.columns-two .rich-content p:empty,
.columns-two .rich-content p:has(> br:only-child) {
    margin: 0;
    line-height: 0;
}

.columns-two .preserve-lines {
    white-space: pre-wrap;
    text-align: left;
    word-break: break-word;
}

.rich-content img {
    max-width: 100%;
    height: auto;
    vertical-align: -0.12em;
}

.rich-content img[width] {
    display: inline;
    width: auto;
    max-height: 1.25em;
    margin: 0 0.05em;
    border-radius: 0;
}

.rich-content img:not([width]) {
    display: block;
    margin: 1.25rem auto;
    border-radius: 0.75rem;
}

.rich-content a:has(> img:not([width])) {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 1.25rem auto;
    text-decoration: none;
    cursor: pointer;
}

.rich-content a:has(> img:not([width])) img {
    margin: 0;
}

.rich-content a:has(> img[width]) {
    display: inline;
    text-decoration: none;
}

.rich-content a:has(> img):hover img {
    opacity: 0.92;
}

.rich-content a:not(:has(> img)) {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.rich-content a:not(:has(> img)):hover {
    color: var(--accent-hover);
}

.rich-content p:last-child {
    margin-bottom: 0;
}

.box-title {
    margin: 0 0 1.25rem;
    font-size: clamp(1.35rem, 4vw, 1.75rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--accent);
    white-space: pre-wrap;
}

.photo-wrap {
    margin-bottom: 1.75rem;
    width: 100%;
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
}

.photo {
    display: block;
    width: 100%;
    max-width: 28rem;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 0.75rem;
    border: 3px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.intro {
    margin-bottom: 1.5rem;
}

.name {
    margin: 0 0 0.35rem;
    font-size: clamp(1.75rem, 5vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    white-space: pre-wrap;
}

.tagline {
    margin: 0;
    font-size: 1.05rem;
    color: var(--accent);
    font-weight: 500;
    white-space: pre-wrap;
}

.about {
    text-align: left;
    margin-bottom: 0;
}

.card--main .about {
    margin-bottom: 1.75rem;
}

.about p {
    margin: 0 0 1rem;
    color: var(--text-muted);
    font-size: 1rem;
    white-space: pre-wrap;
}

.about p:last-child {
    margin-bottom: 0;
}

.contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--card-border);
}

.contact-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.15s ease;
}

.contact-link:hover {
    color: var(--accent-hover);
}

.contact-link--primary {
    color: var(--accent);
    font-weight: 500;
}

.links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.25rem;
}

@media (min-width: 480px) {
    .card {
        padding: 2.25rem 2rem;
    }

    .card--main {
        padding: 3rem 2.5rem;
    }
}
