body {
    margin: 0;
    padding: 0 0 80px 0;
    background-color: white;
    font-family: sans-serif;
    font-size: 16px;
    line-height: 1.4;
    color: #333;
}

a {
    color: #1a6fbd;
}

/* Layout */
.container {
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}
@media (min-width: 992px) {
    .container {
        width: 970px;
    }
}
.row {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
}

/* Header */
#dhead {
    margin-top: 20px;
}
#dpic {
    grid-column: span 6;
    text-align: right;
}
#ddesc {
    padding-top: 40px;
    padding-left: 20px;
    grid-column: span 6;
}
@media (max-width: 991px) {
    #dpic {
        grid-column: span 12;
        text-align: center;
    }
    #ddesc {
        grid-column: span 12;
        padding-top: 20px;
        text-align: center;
    }
}
#dpic img {
    width: 240px;
    height: 240px;
    border-radius: 120px;
    object-fit: cover;
}
h1 {
    font-size: 34px;
    font-weight: normal;
    padding: 0;
    margin: 0;
}
h2 {
    font-weight: normal;
    font-style: italic;
    color: #999;
    font-size: 18px;
    padding: 0;
    margin: 5px 0 10px 0;
}
@media (min-width: 992px) {
    h2 {
        max-width: 340px;
    }
}
#dico {
    margin-top: 12px;
}
#dico a,
#dico span {
    display: inline-block;
    margin-right: 6px;
    vertical-align: middle;
}
.iico {
    width: 34px;
    height: 34px;
    fill: #555;
    transition: fill 0.2s;
}
.iico:hover {
    fill: #1a6fbd;
}
#iemail {
    cursor: pointer;
}
#demail {
    margin-top: 10px;
    color: #555;
    opacity: 0;
    transition: opacity 0.7s;
}

/* Language switch. Both languages ship in the DOM; only one is shown.
   Class-based, not [lang=...], so the selectors can't match <html lang> itself
   and blank the whole page. `revert` restores each element's natural display. */
.l-ru {
    display: none;
}
html.lang-ru .l-en {
    display: none;
}
html.lang-ru .l-ru {
    display: revert;
}
#lang {
    margin-top: 12px;
    font-size: 13px;
}
#lang button {
    background: none;
    border: 0;
    font: inherit;
    font-size: 13px;
    letter-spacing: 0.06em;
    color: #bbb;
    padding: 4px 6px;
    cursor: pointer;
}
#lang button:hover {
    color: #1a6fbd;
}
#lang button.active {
    color: #333;
    font-weight: bold;
}
.lang-sep {
    color: #ddd;
}

hr {
    height: 1px;
    background-image: linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0));
    padding: 0;
    margin: 20px 0;
    border: 0;
}

/* Timeline */
.ico {
    grid-column: span 1;
    vertical-align: top;
    border-left: 2px solid #cfcfcf;
    position: relative;
}
.ico img {
    border-radius: 5px;
    width: 100%;
    max-width: 80px;
    margin-left: 10px;
}
.entry-dot {
    position: absolute;
    top: 0;
    left: -8px;
    width: 10px;
    height: 10px;
    border-radius: 7px;
    background-color: #cfcfcf;
    border: 2px solid white;
}
.timespan {
    grid-column: span 2;
    font-size: 14px;
    text-align: right;
    padding-right: 5px;
    color: #bbb;
}
.desc {
    grid-column: span 9;
    vertical-align: top;
    font-size: 17px;
    padding-left: 20px;
    padding-bottom: 20px;
}

/* Grid children default to min-width:auto and refuse to shrink below their
   longest unbreakable string, which blows the 12-col grid out on narrow screens. */
.row > * {
    min-width: 0;
}
.desc {
    overflow-wrap: break-word;
}
.desc p,
#bio p {
    margin: 0 0 12px 0;
}
.desc p:last-child,
#bio p:last-child {
    margin-bottom: 0;
}

/* Phones: the 12-column timeline squeezes text into a ~265px gutter, so each
   entry becomes a [logo][date] header with the prose full-bleed underneath. */
@media (max-width: 600px) {
    .entry.row {
        grid-template-columns: auto 1fr;
    }
    .ico {
        grid-column: 1;
        grid-row: 1;
        border-left: 0;
    }
    .ico img {
        max-width: 46px;
        margin-left: 0;
    }
    .entry-dot {
        display: none;
    }
    .timespan {
        grid-column: 2;
        grid-row: 1;
        align-self: center;
        text-align: left;
        padding: 0 0 0 12px;
    }
    .desc {
        grid-column: 1 / -1;
        grid-row: 2;
        font-size: 16px;
        padding-left: 0;
        padding-top: 10px;
        padding-bottom: 26px;
    }

    #dpic img {
        width: 180px;
        height: 180px;
        border-radius: 90px;
    }
    h1 {
        font-size: 30px;
    }
    h2 {
        font-size: 17px;
    }
    .ctitle {
        font-size: 30px;
        margin-top: 32px;
    }
    .pub {
        font-size: 13px;
    }

    /* 36px glyph + 4px padding = 44px tap target, the accessible minimum. */
    #dico a,
    #dico span {
        padding: 4px;
        margin-right: 2px;
    }
    .iico {
        width: 36px;
        height: 36px;
    }
}


.ctitle {
    font-size: 36px;
    margin-bottom: 20px;
    margin-top: 40px;
}

/* Publications */
.pub {
    font-size: 14px;
    border-left: 4px solid #aaa;
    padding: 2px 0px 2px 10px;
    margin-bottom: 10px;
}
.pub-title {
    display: inline;
    color: #333;
}
.pub-venue {
    display: inline;
    color: #090;
}
.pub-authors {
    display: block;
    color: #333;
}
