/* olehsvir.com: plain HTML and CSS, no scripts and no build step. */

@font-face {
  font-family: "Mona Sans";
  src: url("fonts/mona-sans.woff2") format("woff2");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --ink: #17212b;
  --muted: #5b6875;
  --rule: #e2e7ec;
  --accent: #2b6e9b;        /* the steel blue from the original site */
  --accent-hover: #1d5276;
  --todo: #4e8135;          /* code-comment green, as light as stays readable on white */

  --font: "Mona Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: 11rem;          /* left column: dates and skill groups */
  --gap: 2rem;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #10171e;
    --ink: #e6ebf0;
    --muted: #97a5b2;
    --rule: #26333e;
    --accent: #84bde4;
    --accent-hover: #b6d9f1;
    --todo: #8cc27e;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  width: min(100% - 2.5rem, 48rem);
  margin: 0 auto;
  padding: clamp(3rem, 10vh, 7rem) 0 2.5rem;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
}

/* Links */

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
}

a:hover {
  color: var(--accent-hover);
  text-decoration-color: currentColor;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background: color-mix(in srgb, var(--accent) 24%, transparent);
}

/* Intro */

.name {
  margin: 0;
  font-size: clamp(1.75rem, 5.5vw + 0.65rem, 3rem);
  font-weight: 650;
  font-stretch: 125%;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.role {
  margin: 0.6rem 0 0;
  font-size: 1.375rem;
  line-height: 1.3;
  color: var(--muted);
}

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.75rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

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

.lead {
  max-width: 34em;
  margin: 3rem 0 0;
  font-size: 1.25rem;
  line-height: 1.55;
}

.facts {
  margin: 1.25rem 0 0;
  padding-left: 1.15em;
  list-style: square;
}

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

/* Sections */

main {
  margin-top: clamp(3.5rem, 8vw, 5rem);
}

section + section {
  margin-top: clamp(3rem, 7vw, 4.5rem);
}

h2 {
  margin: 0 0 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: 1.3125rem;
  font-weight: 650;
  font-stretch: 112%;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* Jobs and degrees: date on the left, details on the right */

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

.entry {
  display: grid;
  grid-template-columns: var(--gutter) minmax(0, 1fr);
  grid-template-areas:
    "when  title"
    ".     where"
    ".     more";
  column-gap: var(--gap);
  align-items: baseline;
}

.entry + .entry {
  margin-top: 2.25rem;
}

.entry h3 {
  grid-area: title;
  margin: 0;
  font-size: 1.125rem;
  font-weight: 620;
  line-height: 1.4;
}

.where {
  grid-area: where;
  margin: 0.1rem 0 0;
}

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

.loc {
  white-space: nowrap;      /* keeps "Los Angeles, CA" together when the line wraps */
}

.when {
  grid-area: when;
  margin: 0;
  font-size: 0.9375rem;
  color: var(--muted);
  white-space: nowrap;
}

.highlights,
.note {
  grid-area: more;
  margin: 0.75rem 0 0;
}

.note {
  margin-top: 0.3rem;
}

.highlights {
  padding-left: 1.15em;
  list-style: square;
}

.highlights li + li {
  margin-top: 0.35rem;
}

.highlights li::marker {
  color: var(--muted);
}

/* Placeholder notes, styled like a TODO comment in a code editor */

.todo {
  grid-area: more;
  margin: 0.6rem 0 0;
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
  color: var(--todo);
}

/* Lines that sit in the right-hand column without a date or label */

.aside {
  margin: 2rem 0 0 calc(var(--gutter) + var(--gap));
}

.strengths {
  padding-left: 1.15em;
  list-style: square;
}

.strengths li + li {
  margin-top: 0.35rem;
}

.strengths li::marker {
  color: var(--muted);
}

/* Skills */

.skills {
  margin: 0;
}

.skills > div {
  display: grid;
  grid-template-columns: var(--gutter) minmax(0, 1fr);
  column-gap: var(--gap);
  align-items: baseline;
}

.skills > div + div {
  margin-top: 0.55rem;
}

.skills dt {
  font-size: 0.9375rem;
  color: var(--muted);
}

.skills dd {
  margin: 0;
}

/* Footer */

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  margin-top: clamp(4rem, 10vw, 6rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
  color: var(--muted);
}

footer p {
  margin: 0;
}

/* Phones: one column */

@media (max-width: 40rem) {
  .entry {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "when"
      "title"
      "where"
      "more";
  }

  .when {
    margin-bottom: 0.15rem;
  }

  .skills > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .skills > div + div {
    margin-top: 0.9rem;
  }

  .aside {
    margin-left: 0;
  }
}

/* Printing */

@page {
  margin: 1.6cm;
}

@media print {
  :root {
    --paper: #ffffff;
    --ink: #000000;
    --muted: #444444;
    --rule: #bbbbbb;
    --accent: #000000;
    --accent-hover: #000000;
    --todo: #4e8135;
  }

  html {
    font-size: 80%;           /* scales type and spacing down for paper */
  }

  body {
    width: auto;
    padding: 0;
  }

  .name {
    font-size: 20pt;
  }

  .role {
    font-size: 13pt;
  }

  .lead {
    font-size: 11.5pt;
  }

  a {
    text-decoration: none;
  }

  h2,
  .entry h3,
  .where {
    break-after: avoid;
  }

  .highlights li,
  .skills > div {
    break-inside: avoid;
  }
}
