/* Shared layout, components and responsive/print rules. */
:root {
  --ink: #171717;
  --body: #404040;
  --muted: #737373;
  --line: #e5e5e5;
  --soft: #f9f9f9;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 28px;
}
body {
  margin: 0;
  padding: 40px 32px;
  background: #f5f5f5;
  color: var(--body);
  font:
    400 15px/1.8 Montserrat,
    Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
a:hover {
  color: #000;
}
a:focus-visible {
  outline: 2px solid #404040;
  outline-offset: 5px;
}
::selection {
  background: #e5e5e5;
}
.sheet {
  max-width: 1080px;
  margin: auto;
  background: white;
  border: 1px solid var(--line);
  padding: 64px 64px 35px;
}
.header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}
.identity {
  min-width: 0;
}
h1 {
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.08;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
}
.profession {
  font-weight: 500;
  text-transform: uppercase;
  margin: 18px 0 0;
  max-width: 560px;
}
.contacts {
  flex: 0 0 auto;
  display: grid;
  gap: 8px;
  text-align: right;
  line-height: 1.5;
}
.contacts a {
  text-decoration: none;
}
/* Language navigation width. */
nav.contacts {
  width: calc(13.235em + 26px);
  max-width: 100%;
}
nav.contacts .contact-line {
  display: block;
  color: #171717;
  justify-self: end;
  padding-inline: 4px;
  margin-inline: -4px;
  border-radius: 4px;
  transition: background-color 150ms ease, color 150ms ease;
}
nav.contacts .contact-line:hover {
  text-decoration: none;
  background-color: #857af8;
  color: #ffffff;
}
@media (max-width: 700px) {
  nav.contacts .contact-line {
    justify-self: start;
  }
}
.layout {
  display: grid;
  grid-template-columns: 32% 68%;
  padding-top: 40px;
}
.sidebar {
  text-align: right;
  padding-right: 40px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.narrative {
  padding-left: 40px;
  min-width: 0;
}
.section {
  margin-bottom: 42px;
}
.section:last-child {
  margin-bottom: 0;
}
h2 {
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
h3 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.6;
  margin: 0 0 4px;
  color: var(--ink);
}
h4 {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 14px;
}
p {
  margin: 0 0 16px;
}
.small {
  font-size: 12.5px;
  line-height: 1.7;
}
.entry {
  margin-bottom: 27px;
}
.entry:last-child {
  margin-bottom: 0;
}
.entry p {
  margin: 4px 0;
}
.entry .date {
  font-size: 12px;
  color: var(--muted);
  margin-top: 7px;
}
.clean-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
}
.clean-list li {
  margin-bottom: 8px;
}
.skill-group + .skill-group {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 24px;
}
.job + .job {
  margin-top: 32px;
}
.job p {
  margin: 6px 0 14px;
}
.bullets {
  padding-left: 18px;
  margin: 10px 0 0;
}
.bullets li {
  padding-left: 2px;
  margin: 7px 0;
}
.project {
  padding-bottom: 25px;
  margin-bottom: 25px;
  border-bottom: 1px solid var(--line);
}
.project:last-child {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 0;
}
.project-head {
  display: flex;
  gap: 16px;
  align-items: baseline;
  justify-content: space-between;
}
.project-head h3 {
  font-size: 14px;
}
.project-head span {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.project p {
  font-size: 13px;
  margin: 10px 0;
}
.technology {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.03em;
}
.case-link {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  margin-top: 16px;
  text-decoration: none;
  font-weight: 500;
  font-size: 12px;
  border-bottom: 1px solid #a3a3a3;
  padding-bottom: 4px;
}
.case-link span {
  font-size: 17px;
  line-height: 1;
}
.case-link:hover {
  border-color: #000;
}
.footer {
  margin-top: 52px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  letter-spacing: 0.07em;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  line-height: 1.7;
}
.footer p {
  margin: 0;
}
.skip {
  position: absolute;
  top: -90px;
  left: 20px;
  background: white;
  padding: 12px;
  z-index: 9;
}
.skip:focus {
  top: 12px;
}
.case-nav {
  margin: 30px 0 0;
  font-size: 12px;
}
.case-nav a {
  text-decoration: none;
}
.case-nav a:hover {
  text-decoration: underline;
}
.case-title {
  font-size: 30px;
  line-height: 1.3;
  letter-spacing: -0.025em;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 20px;
  text-transform: none;
  border: 0;
  padding: 0;
}
.case-deck {
  font-size: 15px;
  line-height: 1.8;
}
.metadata dt {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin: 22px 0 7px;
}
.metadata > div:first-child dt {
  margin-top: 0;
}
.metadata dd {
  font-size: 12.5px;
  margin: 0;
  line-height: 1.8;
}
.toc {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12px;
}
.toc li {
  margin: 10px 0;
}
.toc a {
  text-decoration: none;
}
.toc a:hover {
  text-decoration: underline;
}
.case-section {
  margin-top: 34px;
}
.case-section h2 {
  font-size: 13px;
}
.case-section p {
  font-size: 13px;
  line-height: 1.9;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  line-height: 1.7;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
}
th {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
th:first-child,
td:first-child {
  padding-left: 0;
}
th:last-child,
td:last-child {
  padding-right: 0;
}
.page-end {
  border-top: 1px solid var(--line);
  padding-top: 25px;
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}
.page-end a {
  font-size: 12px;
  text-decoration: none;
}
.page-end a:hover {
  text-decoration: underline;
}
@media (max-width: 950px) {
  body {
    padding: 28px 20px;
  }
  .sheet {
    padding: 46px 38px 28px;
  }
  .header {
    gap: 20px;
  }
  .sidebar {
    padding-right: 27px;
  }
  .narrative {
    padding-left: 27px;
  }
  .layout {
    grid-template-columns: 33% 67%;
  }
  .case-title {
    font-size: 27px;
  }
}
@media (max-width: 700px) {
  body {
    padding: 0;
    background: white;
  }
  .sheet {
    padding: 35px 24px 25px;
    border: 0;
  }
  .header {
    align-items: flex-start;
    flex-direction: column;
    gap: 26px;
    padding-bottom: 30px;
  }
  h1 {
    letter-spacing: 0.12em;
  }
  .contacts {
    text-align: left;
  }
  .layout {
    grid-template-columns: 1fr;
    padding-top: 30px;
  }
  .narrative {
    padding-left: 0;
    order: 0;
  }
  .sidebar {
    border-right: 0;
    padding-right: 0;
    order: 1;
    border-top: 1px solid var(--line);
    padding-top: 35px;
    margin-top: 35px;
  }
  .sidebar .section {
    max-width: none;
  }
  .section {
    margin-bottom: 35px;
  }
  .case-layout .sidebar {
    order: 0;
    margin: 0 0 35px;
    padding: 0 0 30px;
    border-top: 0;
    border-bottom: 1px solid var(--line);
  }
  .case-layout .narrative {
    order: 1;
  }
  .case-layout .metadata {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
    text-align: right;
  }
  .case-layout .metadata dt {
    margin: 0;
  }
  .case-layout .metadata dd {
    margin-bottom: 13px;
  }
  .case-layout .toc-section {
    display: none;
  }
  .case-title {
    font-size: 27px;
  }
  .project-head {
    align-items: flex-start;
  }
  .project-head h3 {
    max-width: 80%;
  }
  .footer {
    flex-direction: column;
    gap: 8px;
    margin-top: 35px;
  }
  .case-nav {
    margin-top: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
@media print {
  body {
    padding: 0;
    background: white;
    color: #000;
  }
  .sheet {
    border: 0;
    max-width: none;
    padding: 8mm 10mm;
  }
  .header {
    flex-direction: row;
    align-items: flex-end;
  }
  .layout {
    grid-template-columns: 32% 68%;
  }
  .sidebar {
    order: 0;
    text-align: right;
    border-right: 1px solid var(--line);
    border-top: 0;
    margin: 0;
    padding: 0 7mm 0 0;
  }
  .narrative {
    order: 1;
    padding: 0 0 0 7mm;
  }
  .section {
    margin-bottom: 7mm;
  }
  h2 {
    margin-bottom: 4mm;
  }
  h3 {
    font-size: 10px;
  }
  .small,
  .clean-list,
  .project p {
    font-size: 9px;
  }
  .entry {
    margin-bottom: 5mm;
  }
  .project,
  .entry,
  .job,
  .case-section {
    break-inside: avoid;
  }
  .no-print {
    display: none !important;
  }
  .footer {
    font-size: 10px;
  }
  .case-layout .sidebar {
    order: 0;
    margin: 0;
    padding: 0 7mm 0 0;
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }
  .case-layout .metadata {
    display: block;
  }
  .case-layout .toc-section {
    display: block;
  }
  .case-title {
    font-size: 22px;
  }
}

/* Typography reference: index.html. */

h1 {
  font-size: 36px;
}
h2 {
  font-size: 16px;
  line-height: 1.5;
}
.profession {
  font-size: 13.5px;
  letter-spacing: 0.22em;
  line-height: 1.5;
  color: #737373;
}
.contacts {
  font-size: 13px;
}
.sidebar h3 {
  font-size: 15px;
  line-height: 1.5;
}
.sidebar .small {
  font-size: 13.5px;
  line-height: 1.5;
  color: #525252;
}
.sidebar .date {
  font-size: 13px;
  line-height: 1.5;
  color: #a3a3a3;
}
.sidebar .clean-list {
  font-size: 14px;
  line-height: 1.5;
}
.sidebar h4 {
  letter-spacing: 0.22em;
  color: #a3a3a3;
}
.about {
  font-size: 15px;
  line-height: 1.8;
  color: #525252;
}
.job h3 {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.025em;
}
.job p {
  font-size: 13.5px;
  line-height: 1.5;
  color: #737373;
}
.bullets {
  font-size: 14px;
  line-height: 1.625;
  color: #525252;
}
#projects .project-head h3 {
  font-size: 15px;
  line-height: 1.5;
}
#projects .project-head span {
  font-size: 12.5px;
  color: #a3a3a3;
}
#projects .project p {
  font-size: 14px;
  line-height: 1.625;
  color: #525252;
}
#projects .technology {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: normal;
  color: #737373;
}
#projects .case-link {
  font-size: 12.5px;
  color: #171717;
}
@media (min-width: 640px) {
  h1 {
    font-size: 48px;
  }
  .profession {
    font-size: 14px;
  }
}
@media (min-width: 768px) {
  h1 {
    font-size: 54px;
  }
  .contacts {
    font-size: 13.5px;
  }
  .about {
    font-size: 16px;
  }
  .bullets {
    font-size: 14.5px;
  }
}
@media (min-width: 1024px) {
  h1 {
    font-size: 58px;
  }
}
@media print {
  h1 {
    font-size: 32px;
  }
  .profession,
  .contacts {
    font-size: 9px;
  }
  h2 {
    font-size: 10px;
  }
  .sidebar h3,
  .job h3,
  #projects .project-head h3 {
    font-size: 10px;
  }
  .sidebar .small,
  .sidebar .date,
  .sidebar .clean-list,
  .about,
  .job p,
  .bullets,
  #projects .project p {
    font-size: 9px;
  }
  #projects .technology,
  #projects .case-link,
  #projects .project-head span {
    font-size: 9px;
  }
}

/* Mobile language codes: short codes above the name at 700px and below. */
.lang-codes {
  display: none;
}
@media screen and (max-width: 700px) {
  nav.contacts {
    display: none;
  }
  .lang-codes {
    display: flex;
    justify-content: space-between;
    align-self: stretch;
    margin: 0 -12px -2px;
  }
  .lang-codes a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    font-size: 12px;
    letter-spacing: 0.1em;
    color: #737373;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 150ms ease, color 150ms ease;
  }
  .lang-codes a[aria-current="page"] {
    color: #171717;
    font-weight: 600;
  }
  .lang-codes a:hover,
  .lang-codes a:active,
  .lang-codes a:focus-visible {
    background-color: #857af8;
    color: #ffffff;
    outline: none;
  }
  .header-side .case-nav a {
    display: inline-block;
    padding-block: 10.75px;
    margin-block: -10.75px;
  }
}

/* Footer links: external link icons next to the name (centered), or below it on
   narrow screens. */
.footer-links {
  display: flex;
  justify-content: center;
  align-self: center;
}
.footer-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  opacity: 0.7;
  transition: opacity 150ms ease;
}
.footer-links a:hover,
.footer-links a:focus-visible {
  opacity: 1;
}
.footer-links a:focus-visible {
  outline-width: 1px;
  outline-offset: -2px;
}
.footer-links img {
  display: block;
  width: 28px;
  height: 28px;
}
@media screen and (min-width: 701px) {
  .footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0;
  }
  .footer-links {
    margin-block: calc((1.7em - 44px) / 2);
  }
}
@media print {
  .footer-links {
    display: none;
  }
}
