@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,700;1,400&display=swap');

:root {
    --paper:  #ffffff;
    --ink:    #0f141e;
    --muted:  #6f7480;
    --accent: #a8201a;
    --jaw:    22vh;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding-top: calc(var(--jaw) + 1.5rem);
    padding-bottom: calc(var(--jaw) + 1.5rem);

    background-color: var(--paper);
    color: var(--ink);
    font: normal 19px/1.65 "Roboto", system-ui, sans-serif;
}

.jaw {
    position: fixed;
    left: 0;
    width: 100%;
    height: var(--jaw);
    z-index: 50;

    background-color: var(--paper);
    background-image: url("img/teeth.jpg");
    background-repeat: no-repeat;
    pointer-events: none;
}

.jaw--top {
    top: 0;
    background-position: center top;
    background-size: 100% 312%;
}

.jaw--bottom {
    bottom: 0;
    background-position: center bottom;
    background-size: 100% 302%;
}

.mouth__inner {
    max-width: 52rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--jaw);
    z-index: 100;

    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 1rem 0.7rem;
    pointer-events: none;
}

.menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 2.5rem;
    pointer-events: auto;
}

.menu a {
    color: var(--accent);
    font-weight: 700;
    font-size: 1.35rem;
    text-decoration: none;
}


.menu a[aria-current="page"] {
    color: var(--ink);
    text-underline-offset: 4px;
}

h1,
h2,
h3 {
    line-height: 1.15;
    margin: 0 0 0.7rem;
}

h1 {
    font-size: clamp(2.4rem, 6vw, 3.6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.75rem;
    font-weight: 700;
}

h3 {
    font-size: 1.3rem;
    font-weight: 500;
}

p {
    margin: 0 0 1em;
    max-width: 60ch;
}

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

a:hover {
    text-decoration: none;
}

a:focus-visible,
.skip:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.lead {
    font-size: 1.25rem;
}

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

.meta {
    color: var(--muted);
    font-size: 1rem;
    font-style: italic;
    margin: 0 0 0.6rem;
}

.section {
    margin-bottom: 3rem;
}

.section:last-of-type {
    margin-bottom: 0;
}

.section > h2 {
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--ink);
    margin-bottom: 1.2rem;
}

.list {
    margin: 0 0 1.2rem;
    padding-left: 1.3rem;
    max-width: 60ch;
}

.list li {
    margin-bottom: 0.45rem;
}

.list li::marker {
    color: var(--accent);
}

.cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 0 2.5rem;
}

.entry {
    margin-bottom: 2rem;
}

.entry:last-child {
    margin-bottom: 0;
}

.intro {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1.75rem;
    margin-bottom: 3rem;
}

.avatar {
    width: 210px;
    height: auto;
    flex-shrink: 0;
    border-radius: 28px;
    box-shadow: 4px 4px 14px rgba(0, 0, 0, 0.25);
}

.intro__text {
    flex: 1 1 20rem;
}

.intro__text > *:last-child {
    margin-bottom: 0;
}

.figure {
    margin: 0 0 3rem;
}

.figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.figure figcaption {
    margin-top: 0.6rem;
    color: var(--muted);
    font-size: 1rem;
}

.empty {
    border-radius: 12px;
    padding: 3rem 1.5rem;
    text-align: center;
}

.empty p {
    margin-left: auto;
    margin-right: auto;
}

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

.contacts {
    font-style: normal;
}

.contacts ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.contacts li {
    display: flex;
    flex-wrap: wrap;
    gap: 0 1rem;
    margin-bottom: 0.8rem;
    font-size: 1.15rem;
}

.contacts .kind {
    min-width: 8rem;
    color: var(--muted);
    font-size: 1rem;
}

.page-footer {
    margin-top: 3.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--muted);
    color: var(--muted);
    font-size: 1rem;
}

.page-footer p {
    margin: 0;
}

.skip {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    background: var(--paper);
    padding: 0.6em 1.2em;
}

.skip:focus {
    left: 1rem;
    top: 1rem;
}

@media (max-width: 700px), (max-height: 600px) {
    :root {
        --jaw: 15vh;
    }

    body {
        font-size: 17px;
    }

    .menu {
        gap: 0.2rem 1.3rem;
    }

    .menu a {
        font-size: 1.05rem;
    }
}

@media (max-width: 480px) {
    .avatar {
        width: 150px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}