/* armancohan.com
   A precision-instrument look: cool off-white page on a faint engineering grid, EB Garamond
   throughout, electric blue as the only accent. */

:root {
  --paper: #f3f5f9;
  --grid: #dde2ea;
  --ink: #0b1220;
  --muted: #5d6878;
  --rule: #cfd5df;
  --accent: #2457ff;
  --accent-ink: #1740c9;


  --sans: "EB Garamond", Garamond, Georgia, "Times New Roman", serif;
  --wide: 12.5rem;
  --max: 70rem;
}

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

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

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

body {
  margin: 0;
  padding: 0 2rem 6rem;
  background-color: var(--paper);
  background-image: radial-gradient(var(--grid) 1px, transparent 1.2px);
  background-size: 28px 28px;
  background-position: 14px 14px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.1875rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  text-underline-offset: .2em;
}

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

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

p {
  margin: 0 0 1em;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  background: var(--paper);
  padding: .4rem .8rem;
}

/* Masthead */
.masthead {
  max-width: var(--max);
  margin: 0 auto;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .4rem 1.8rem;
  padding: 1.25rem 0 0;
  font-size: .9375rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover {
  color: var(--accent);
}

.block {
  scroll-margin-top: 1.5rem;
}

.identity {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  column-gap: 3rem;
  padding: 2.75rem 0 3rem;
}

h1 {
  margin: 0 0 1.1rem;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: .06em;
  text-transform: uppercase;
}

h1 .cap {
  font-size: 1.22em;
}

.role {
  max-width: 34rem;
  margin: 0 0 1.4rem;
  font-size: 1.1875rem;
  line-height: 1.45;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .9375rem;
}

.portrait {
  width: 11rem;
  height: 11rem;
  object-fit: cover;
  border-radius: 2px;
  outline: 1px solid var(--ink);
  outline-offset: 6px;
  filter: saturate(.8);
}

/* Sections: a full-width rule, the heading in a wide left column */
.block {
  display: grid;
  grid-template-columns: var(--wide) minmax(0, 1fr);
  column-gap: 2rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.6rem 0 3.2rem;
  border-top: 1px solid var(--ink);
}

.block > h2 {
  grid-column: 1;
  margin: .15rem 0 0;
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: .06em;
  line-height: 1.3;
}

.block > :not(h2) {
  grid-column: 2;
}

.prose {
  max-width: 40rem;
}

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

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

/* The three questions, each with its papers */
.questions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 2rem;
  margin-top: 1.75rem;
}

.question h3 {
  margin: 0 0 .7rem;
  padding-top: .7rem;
  border-top: 1px solid var(--rule);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.question h4 {
  margin: 1.1rem 0 .4rem;
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .03em;
}

.works {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .9375rem;
  line-height: 1.5;
}

.works li {
  display: grid;
  grid-template-columns: 2.7rem minmax(0, 1fr);
}

.works .y {
  color: var(--muted);
  font-size: .8125rem;
  padding-top: .1em;
}

.works a {
  color: var(--ink);
  text-decoration-color: color-mix(in srgb, var(--ink) 25%, transparent);
}

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

/* Teaching: a vertical timeline, one dot per term */
.courses {
  position: relative;
  margin: 0;
  padding: .2rem 0 0 2rem;
  list-style: none;
  border-left: 1px solid var(--rule);
}

.courses li {
  position: relative;
  max-width: 40rem;
  padding-bottom: 1.6rem;
}

.courses li:last-child {
  padding-bottom: .2rem;
}

/* The dot sits on the rail */
.courses li::before {
  content: "";
  position: absolute;
  left: calc(-2rem - 5.5px);
  top: .3rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--ink);
}

.courses li.current::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}

.term {
  display: flex;
  gap: .9rem;
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.3;
}

.term small {
  color: var(--accent-ink);
  font-size: .8125rem;
  letter-spacing: .02em;
}

.courses h3 {
  margin: .3rem 0 0;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.35;
}

.courses h3 a {
  color: var(--ink);
  text-decoration-color: color-mix(in srgb, var(--ink) 25%, transparent);
}

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

.code {
  margin-left: .5rem;
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 400;
  letter-spacing: .03em;
  white-space: nowrap;
}

.courses p {
  margin: .4rem 0 0;
  color: var(--muted);
  font-size: .9375rem;
  line-height: 1.5;
}

/* Email fallback: stored reversed in the source, displayed the right way round */
.rev {
  unicode-bidi: bidi-override;
  direction: rtl;
}

/* Narrow screens */
@media (max-width: 760px) {
  body {
    padding: 0 1.25rem 4rem;
    font-size: 1rem;
  }


  .nav {
    justify-content: flex-start;
    gap: .4rem 1.3rem;
  }

  .identity {
    grid-template-columns: minmax(0, 1fr);
    padding: 2rem 0 2rem;
  }

  .portrait {
    grid-row: 1;
    width: 6.5rem;
    height: 6.5rem;
    margin-bottom: 1.75rem;
  }

  .block {
    grid-template-columns: minmax(0, 1fr);
    row-gap: .9rem;
    padding: 1.25rem 0 2.4rem;
  }

  .block > :not(h2) {
    grid-column: 1;
  }

  .questions {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 1.25rem;
  }

  .courses {
    padding-left: 1.5rem;
  }

  .courses li::before {
    left: calc(-1.5rem - 5.5px);
  }
}
