/* stephenfisher.ca
   Two colours carry meaning throughout: green is finance, blue is software. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Literata";
  src: url("/fonts/literata.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --paper: #eff3f0;
  --ink: #13231e;
  --muted: #52615b;
  --rule: #c9d4ce;
  --finance: #1b6249;
  --software: #2f49ab;

  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --text: "Literata", Georgia, "Times New Roman", serif;

  --gutter: clamp(1.25rem, 5vw, 3rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1a17;
    --ink: #e6ede9;
    --muted: #9dada6;
    --rule: #2b3b36;
    --finance: #62c9a1;
    --software: #96abf7;
  }
}

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

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.65;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.wrap {
  max-width: 70rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.in-finance {
  color: var(--finance);
}

.in-software {
  color: var(--software);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  padding: 0.5rem 0.75rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--display);
}

.skip:focus {
  top: 0.5rem;
}

/* Header */

.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1.5rem;
  font-family: var(--display);
}

.name {
  font-weight: 600;
  font-size: 1.125rem;
  text-decoration: none;
}

.site-header ul {
  display: flex;
  gap: 1.5rem;
}

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

.site-header nav a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* Hero */

.hero {
  padding-block: clamp(3rem, 10vw, 7rem) clamp(3rem, 8vw, 5.5rem);
}

h1 {
  max-width: 17ch;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.5rem, 7.2vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1 span {
  display: block;
}

h1 span + span {
  margin-top: 0.18em;
}

.hero-text {
  max-width: 62ch;
  margin-top: clamp(2rem, 5vw, 3rem);
}

.hero-text p + p {
  margin-top: 1em;
}

/* Sections */

.section {
  padding-block: clamp(3rem, 8vw, 5.5rem);
  border-top: 1px solid var(--rule);
}

h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.section-intro {
  max-width: 62ch;
  margin-top: 0.75rem;
  color: var(--muted);
}

/* What I do: finance and software side by side, then the two capabilities
   that need both. Green is finance, blue is software, ink is both. */

.caps {
  margin-top: 2.5rem;
}

.cap {
  padding: 0 0 2.75rem 1.5rem;
  border-left: 3px solid var(--lane);
}

.cap.finance {
  --lane: var(--finance);
}

.cap.software {
  --lane: var(--software);
}

.cap.both {
  --lane: var(--ink);
}

.cap:last-child {
  padding-bottom: 0.25rem;
}

.lane-tag,
.when {
  font-family: var(--display);
  font-size: 0.9375rem;
  line-height: 1.4;
}

.lane-tag {
  font-weight: 600;
  color: var(--lane);
}

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

h3 {
  margin-top: 0.25rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.6vw, 1.875rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.cap-intro {
  max-width: 44ch;
  margin-top: 0.625rem;
  color: var(--muted);
}

.cap ul {
  max-width: 60ch;
  margin-top: 1rem;
}

.cap ul li {
  position: relative;
  padding-left: 1.125rem;
}

.cap ul li + li {
  margin-top: 0.5rem;
}

.cap ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.375rem;
  height: 2px;
  background: var(--lane);
}

@media (min-width: 56rem) {
  .caps {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .cap {
    padding-right: 2.5rem;
  }

  /* The bar is where the two lanes join. */
  .cap.both {
    padding-top: 1.75rem;
    padding-bottom: 0.25rem;
    border-top: 3px solid var(--lane);
  }
}

/* Background */

.history {
  max-width: 46rem;
  margin-top: 2rem;
  margin-bottom: 2.5rem;
  border-top: 1px solid var(--rule);
}

.history li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.125rem 2rem;
  padding-block: 0.75rem;
  border-bottom: 1px solid var(--rule);
}

/* Skills */

.skills {
  display: grid;
  gap: 1.75rem 3rem;
  margin-top: 2rem;
}

@media (min-width: 44rem) {
  .skills {
    grid-template-columns: 1fr 1fr;
  }
}

.skills dt {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.125rem;
}

.skills dd {
  max-width: 48ch;
  margin-top: 0.25rem;
}

/* Contact */

.contact p {
  margin-top: 0.75rem;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2.5rem;
  margin-top: 1.5rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  letter-spacing: -0.01em;
}

.links a {
  text-decoration-thickness: 2px;
  text-decoration-color: var(--software);
}

.links li:first-child a {
  text-decoration-color: var(--finance);
}

.links a:hover {
  text-decoration-thickness: 4px;
}

/* Footer */

.site-footer {
  padding-block: 2rem 3rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.9375rem;
}

/* 404 */

.not-found {
  padding-block: clamp(4rem, 14vw, 9rem);
}

.not-found p {
  max-width: 50ch;
  margin-top: 1.5rem;
}

@media print {
  .site-header nav,
  .skip {
    display: none;
  }

  .section {
    padding-block: 1.5rem;
  }
}
