/* Nunito is self hosted under the SIL Open Font License. The license is in fonts/OFL.txt. */
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fff6f9;
  --surface: #ffffff;
  --soft: #ffe4ee;
  --line: #f7c4d8;
  --ink: #3b1231;
  --muted: #6e3a5f;
  --accent: #b3245f;
  --btn-bg: #b3245f;
  --btn-fg: #ffffff;
  --mark: #ffd6e5;
  --ear-inner: #ffc2d7;
  --dot: #ff9cc2;
  --shadow: 0 10px 30px rgba(179, 36, 95, 0.10);
  --radius: 24px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #2a1024;
    --surface: #361530;
    --soft: #44193c;
    --line: #5e2553;
    --ink: #ffe8f1;
    --muted: #efbfd5;
    --accent: #ff9cc2;
    --btn-bg: #ff9cc2;
    --btn-fg: #2a1024;
    --mark: #6b2458;
    --ear-inner: #a8457f;
    --dot: #a8457f;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-style: wavy;
}

a:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 999px;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 800;
}

h1 {
  font-size: clamp(2.4rem, 8vw, 3.8rem);
  font-weight: 900;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.7rem, 5vw, 2.2rem);
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1.05rem;
  margin-bottom: 0.25em;
}

p {
  margin: 0 0 1em;
}

/* The pink highlighter only sits under the email address. */
mark {
  color: inherit;
  background: linear-gradient(transparent 55%, var(--mark) 55%);
  padding: 0 0.1em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  padding: 8px 16px;
  border-radius: 999px;
  z-index: 10;
}

.skip-link:focus {
  top: 12px;
}

/* Header */

.site-header {
  padding: 14px 0;
}

.nav-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 900;
  font-size: 1.1rem;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
}

.site-nav a:hover {
  background: var(--soft);
}

/* Hero */

.hero {
  display: grid;
  gap: 8px;
  padding-top: 24px;
  padding-bottom: 16px;
  align-items: center;
}

.role {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--muted);
}

.role .dot {
  color: var(--accent);
  padding: 0 0.2em;
}

.lede {
  font-size: 1.2rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 999px;
  border: 2px solid var(--accent);
  color: var(--accent);
  background: transparent;
  font-weight: 800;
  text-decoration: none;
}

.btn:hover {
  background: var(--soft);
  text-decoration: none;
}

.btn.primary {
  background: var(--btn-bg);
  color: var(--btn-fg);
}

.btn.primary:hover {
  filter: brightness(1.08);
}

.hero-art {
  margin: 0 auto;
  width: 100%;
  max-width: 360px;
}

.art-blob {
  fill: var(--soft);
}

.art-dot {
  fill: var(--dot);
}

.art-tracks {
  fill: var(--dot);
}

/* Bunny tracks between sections */

.hop {
  border: 0;
  height: 24px;
  margin: 24px auto;
  max-width: 300px;
  background: url("../img/tracks.svg") repeat-x center / 100px 20px;
  opacity: 0.8;
}

/* Sections */

.section {
  padding-top: 24px;
  padding-bottom: 24px;
  scroll-margin-top: 16px;
}

.section-lede {
  font-size: 1.15rem;
  max-width: 44em;
  color: var(--muted);
}

.card {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--shadow);
}

.job {
  margin-top: 24px;
}

.job-head {
  border-bottom: 2px dashed var(--line);
  margin-bottom: 18px;
  padding-bottom: 10px;
}

.job-head h3 {
  margin-bottom: 0.2em;
}

.meta {
  color: var(--muted);
  font-weight: 700;
  margin: 0;
}

.work-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 18px;
}

.work-list li {
  position: relative;
  padding-left: 30px;
}

.work-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  background: url("../img/ears.svg") no-repeat center / contain;
}

.work-list p {
  margin: 0;
}

.job.side {
  background: var(--soft);
  box-shadow: none;
}

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

.bg-grid {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

.bg-grid .card p:last-child {
  margin-bottom: 0;
}

.cert-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.cert-list li {
  background: var(--soft);
  border-radius: 16px;
  padding: 10px 14px;
}

.cert-list strong,
.cert-list li > span {
  display: block;
}

.cert-list li > span {
  color: var(--muted);
  font-size: 0.95rem;
}

.tools-head {
  margin-top: 32px;
}

.pills {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pills li {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 4px 14px;
  font-weight: 700;
  font-size: 0.95rem;
}

.personal p {
  font-size: 1.1rem;
  max-width: 40em;
}

/* Contact card with ears peeking over the top */

.contact-wrap {
  position: relative;
  max-width: 560px;
  margin: 48px auto 0;
}

.contact-wrap::before,
.contact-wrap::after {
  content: "";
  position: absolute;
  top: -46px;
  width: 34px;
  height: 84px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: radial-gradient(ellipse 36% 44% at 50% 52%, var(--ear-inner) 98%, var(--surface) 100%);
  z-index: 0;
}

.contact-wrap::before {
  left: calc(50% - 44px);
  transform: rotate(-10deg);
}

.contact-wrap::after {
  left: calc(50% + 10px);
  transform: rotate(10deg);
}

.contact-card {
  position: relative;
  z-index: 1;
  text-align: center;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 20px 30px;
  box-shadow: var(--shadow);
}

.email {
  display: inline-block;
  font-size: clamp(1.2rem, 5vw, 1.6rem);
  font-weight: 900;
  overflow-wrap: anywhere;
}

/* Footer */

.site-footer {
  margin-top: 40px;
  padding: 24px 0 32px;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* 404 */

.error-page {
  text-align: center;
  padding: 32px 0 16px;
  max-width: 34em;
  margin: 0 auto;
}

.error-page h1 {
  font-size: clamp(2rem, 7vw, 3rem);
}

.lost-bunny {
  width: 100%;
  max-width: 260px;
  margin-bottom: 12px;
}

/* Wider screens */

@media (min-width: 760px) {
  .container {
    padding: 0 28px;
  }

  .hero {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 40px;
    padding-top: 48px;
  }

  .hero-art {
    max-width: 420px;
  }

  .card {
    padding: 28px 30px;
  }

  .work-list {
    grid-template-columns: 1fr 1fr;
    gap: 22px 36px;
  }

  .bg-grid {
    grid-template-columns: 1.3fr 1fr;
  }
}

/* Motion only for people who have not asked the system to reduce it */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .ear-twitch {
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: twitch 7s ease-in-out infinite;
  }

  .alert-line {
    animation: pulse 2.6s ease-in-out infinite;
  }

  .btn {
    transition: background-color 0.15s ease, filter 0.15s ease;
  }
}

@keyframes twitch {
  0%,
  86%,
  100% {
    transform: rotate(0deg);
  }
  90% {
    transform: rotate(-9deg);
  }
  94% {
    transform: rotate(4deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.8;
  }
}
