/* Daniela Bond-Smith. One stylesheet, no frameworks, no third-party requests. */

@font-face { font-family: "Atkinson"; src: url("../fonts/atkinson-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("../fonts/atkinson-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("../fonts/atkinson-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("../fonts/atkinson-700-italic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }

:root {
  /* Palette: coolors.co/e6f0fb-cadff5-0b0f14-46505c-0038e0-a9c0ff
     Blue-black text and footer, sky-blue page, light-blue menu bar and boxes,
     royal blue as the only accent. Light only. */
  --paper: #e6f0fb;
  --band: #cadff5;
  --paper-2: #cadff5;
  --ink: #0b0f14;
  --muted: #46505c;
  --accent: #0038e0;
  --accent-deep: #002aa8;
  --moss: #0038e0;
  --coral: #0038e0;
  --line: #b9cde6;
  --tape: rgba(17, 17, 17, .72);
  --foot-bg: #0b0f14;
  --foot-ink: #cadff5;
  --foot-link: #a9c0ff;
  --shadow: 0 1px 2px rgba(11, 15, 20, .14), 0 8px 24px rgba(11, 15, 20, .16);
  --scratch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 16' preserveAspectRatio='none'%3E%3Cpath d='M3 5C40 4 80 5.6 120 4.6S180 4.2 197 3.6M8 11.2C55 10 95 11.6 140 10.6S185 10.6 194 9.8' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E");
  --rough-fill: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 30' preserveAspectRatio='none'%3E%3Cpath d='M1 1.5C30 .9 60 1.7 99 1C99.3 10 98.9 20 99.1 29C70 29.2 40 28.6 1.2 28.9C.8 20 1.2 10 1 1.5Z'/%3E%3C/svg%3E");
  --rough-line: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 30' preserveAspectRatio='none'%3E%3Cpath d='M2 2.6C30 2 60 2.8 98 2.1C98.3 10 97.9 20 98.1 27.8C70 28.1 40 27.4 2.2 27.7C1.8 20 2.2 10 2 2.6Z' fill='none' stroke='black' stroke-width='1.75' stroke-linejoin='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  --rough-box: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 400' preserveAspectRatio='none'%3E%3Cpath d='M3 4C200 2.2 420 4.6 620 3S900 1.8 997 1.5C998.8 120 996.5 280 997.5 397C760 398.8 520 396.2 300 397.6S90 398.6 2.5 396.2C1.2 280 3.6 120 3 4Z'/%3E%3C/svg%3E");
  --rough-dot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' preserveAspectRatio='none'%3E%3Cpath d='M2.3 1.8L7.5 2.4 12 1.5 18 2.1 18.5 7 17.9 11.8 18.7 18 12.6 18.5 8 17.7 1.8 18.6 1.3 12.4 2 7.6Z'/%3E%3C/svg%3E");
  --tape-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='40'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='120' height='40' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--foot-bg); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Atkinson", system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.5;
}
img { max-width: 100%; height: auto; display: block; }

.wrap { width: 100%; max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.01em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.3rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

a { color: var(--accent); font-weight: 700; text-decoration-line: underline; text-decoration-color: var(--coral); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--accent-deep); text-decoration-line: underline; text-decoration-thickness: 2px; }
/* On the green band, links use the deep green to keep their contrast. */
.callout a:not(.button) { color: var(--accent-deep); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: .5rem; background: var(--ink); color: var(--paper); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: .5rem; }

.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Header */
.site-header { padding: 1.1rem 0 1rem; background: var(--band); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-end; gap: .5rem 2rem; }
.site-header ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.site-header nav a { color: var(--ink); font-weight: 400; text-decoration: none; padding: .25rem 0; }
.site-header nav a:hover { color: var(--accent); }
.site-header nav a[aria-current="page"] { position: relative; }
.site-header nav li:not(.nav-cta) a[aria-current="page"]::after {
  content: "";
  position: absolute; left: -.1rem; right: -.1rem; bottom: -.15rem;
  height: .6rem;
  background: var(--coral);
  -webkit-mask: var(--scratch) no-repeat center / 100% 100%;
          mask: var(--scratch) no-repeat center / 100% 100%;
}

main.wrap { padding-top: 4rem; padding-bottom: 4.5rem; position: relative; z-index: 0; }
body { overflow-x: clip; }
main > section + section { margin-top: 4rem; }

/* Double scratch under headings */
.squiggle::after {
  content: "";
  display: block;
  width: 7rem; height: .75rem;
  margin-top: .45rem;
  background: var(--coral);
  -webkit-mask: var(--scratch) no-repeat left center / 100% 100%;
          mask: var(--scratch) no-repeat left center / 100% 100%;
}
.hero h1.squiggle::after { width: 14rem; height: 1rem; margin-top: .5rem; }

/* Home: introduction */
.hero { display: grid; grid-template-columns: 15rem 1fr; gap: 3rem; align-items: start; position: relative; }
.photo { position: relative; margin: .75rem 0 0; transform: rotate(-2deg); }
.photo img { border-radius: 3px; box-shadow: var(--shadow); }
.photo::before {
  content: ""; position: absolute; z-index: 1;
  top: -.85rem; left: 50%; width: 6.75rem; height: 1.8rem;
  transform: translateX(-50%) rotate(-4deg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, .15)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 3px),
    var(--tape-grain),
    var(--tape);
  clip-path: polygon(2% 0, 98% 0, 100% 14%, 97% 29%, 100% 46%, 96% 63%, 99% 80%, 97% 100%, 3% 100%, 0 86%, 3% 70%, 0 52%, 4% 35%, 1% 17%);
}
.hero-text { max-width: 42rem; }
.hero-text .role { color: var(--muted); font-size: 1rem; margin-bottom: 1.5rem; }
.hero-text p { font-size: 1.2rem; }
.hero-text strong, #take-part strong { color: var(--accent); }

/* Research updates: a box in the band colour */
.callout { max-width: 44rem; padding: 1.75rem 2rem 2rem; position: relative; z-index: 0; }

/* Rough-edged shapes */
.callout::before, .cv-card::before, .button::before, .site-header nav .nav-cta a::before, .tag::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  -webkit-mask: var(--rough-fill) no-repeat 0 0 / 100% 100%;
          mask: var(--rough-fill) no-repeat 0 0 / 100% 100%;
}
.callout::before, .cv-card::before { background: var(--band); -webkit-mask-image: var(--rough-box); mask-image: var(--rough-box); }
.button::before { background: var(--accent); }
.button:hover::before { background: var(--ink); }
.button.is-waiting::before { background: var(--accent); -webkit-mask-image: var(--rough-line); mask-image: var(--rough-line); }
.site-header nav .nav-cta a::before, .tag::before { background: currentColor; -webkit-mask-image: var(--rough-line); mask-image: var(--rough-line); }
.site-header nav .nav-cta a:hover::before, .site-header nav .nav-cta a[aria-current="page"]::before { background: var(--accent); -webkit-mask-image: var(--rough-fill); mask-image: var(--rough-fill); }
main > section + .callout { margin-top: 3.5rem; }
.callout + section { margin-top: 3.5rem; }
.callout h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); margin-bottom: .6rem; }
.callout p { margin-bottom: 1.1rem; }
.callout p:last-child { margin-bottom: 0; }

/* Menu item for the community map */
.site-header nav .nav-cta a {
  color: var(--accent); font-weight: 700;
  position: relative; z-index: 0; padding: calc(.2rem + 1.5px) calc(.8rem + 1.5px);
}
.site-header nav .nav-cta a:hover { color: var(--paper); }
.site-header nav .nav-cta a[aria-current="page"] { color: var(--paper); text-decoration: none; }

/* Home: right now */
.now { max-width: 40rem; }
.now ul { list-style: none; margin: 0; padding: 0; }
.now li { position: relative; padding-left: 1.75rem; margin-bottom: 1.1rem; }
.now li::before {
  content: ""; position: absolute; left: .2rem; top: .58em;
  width: .62rem; height: .62rem;
  background: var(--coral);
  -webkit-mask: var(--rough-dot) no-repeat 0 0 / 100% 100%;
          mask: var(--rough-dot) no-repeat 0 0 / 100% 100%;
  transform: rotate(-3deg);
}
.now li:nth-child(3n+2)::before { transform: rotate(2deg); }
.now li:nth-child(3n)::before { transform: rotate(-1deg); }
.now strong { font-weight: 700; }

/* Research */
.lede { font-size: 1.25rem; max-width: 38rem; }
.toc { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-size: 1rem; }
.topic { max-width: 40rem; margin-top: 3.5rem; scroll-margin-top: 1rem; }
.topic h3 { font-size: 1.05rem; font-weight: 700; margin-top: 1.75rem; color: var(--muted); letter-spacing: .02em; }
.pubs { list-style: none; padding: 0; margin: 0; font-size: 1rem; line-height: 1.5; }
.pubs li { padding: .6rem 0; border-top: 1px solid var(--line); }
.pubs li:last-child { border-bottom: 1px solid var(--line); }
.pubs .meta { display: block; color: var(--muted); font-size: .95rem; }
.press { font-size: .95rem; color: var(--muted); }
.press a { color: var(--muted); }
.press a:hover { color: var(--accent); }
.tag { display: inline-block; position: relative; z-index: 0; font-size: .8rem; letter-spacing: .03em; padding: 1px calc(.45em + 1px); color: var(--moss); margin-left: .3em; vertical-align: .1em; }

/* Media */
.media { max-width: 44rem; }
.media-head { font-size: 1.3rem; margin: 2.5rem 0 .6rem; }
.media-head .muted { font-size: .95rem; font-weight: 400; margin-left: .4rem; }

/* CV downloads */
.cv { max-width: 40rem; scroll-margin-top: 1rem; }
.cv-files { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.25rem; }
.cv-card { padding: 1.1rem 1.25rem; position: relative; z-index: 0; }
.cv-card h3 { margin: 0 0 .3rem; font-size: 1.15rem; color: var(--accent); }
.cv-card p { margin: 0 0 .4rem; font-size: 1rem; }
.cv-card p:last-child { margin: 0; }

/* CV pages */
.cv-page { max-width: 46rem; }
.cv-contact { color: var(--muted); font-size: 1rem; }
.cv-name { display: block; margin-bottom: .35rem; font-size: 1.6rem; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; color: var(--ink); }
.cv-page h2 { color: var(--accent); font-size: 1.5rem; margin-top: 2.5rem; padding-bottom: .3rem; border-bottom: 1px solid var(--line); }
.cv-page h3 { font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1.5rem 0 .5rem; }
.cv-interests { font-size: 1rem; }
.cv-list { list-style: none; margin: 0; padding: 0; font-size: 1rem; line-height: 1.5; }
.cv-list li { display: flex; gap: 1.5rem; justify-content: space-between; padding: .55rem 0; }
.cv-what { flex: 1; padding-left: 1.2rem; text-indent: -1.2rem; }
.cv-when { flex: none; color: var(--muted); white-space: nowrap; }
@media (max-width: 560px) {
  .cv-list li { flex-direction: column; gap: 0; }
  .cv-when { order: -1; font-size: .9rem; }
}

/* Community map */
.map-page { max-width: 40rem; }
.map-page h1 { font-size: clamp(2rem, 4.2vw, 2.8rem); }
#take-part h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); color: var(--accent); }
.button {
  display: inline-block; padding: .7rem 1.6rem; position: relative; z-index: 0;
  color: var(--paper); font-weight: 700; text-decoration: none;
}
.button:hover { color: var(--paper); text-decoration: none; }
.button.is-waiting { color: var(--accent); }
.survey-frame { margin-top: 2rem; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; }
.survey-frame iframe { display: block; width: 100%; height: 80vh; min-height: 40rem; border: 0; }
.small { font-size: .95rem; color: var(--muted); }

/* Footer */
.site-footer { background: var(--foot-bg); padding: 2.25rem 0 3rem; font-size: .95rem; color: var(--foot-ink); }
.site-footer .wrap { display: flex; flex-direction: column; gap: 1rem; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--foot-link); font-weight: 400; text-decoration-line: underline; text-decoration-color: currentColor; text-decoration-thickness: 1px; }
.site-footer a:hover { color: #ffffff; background: none; }

@media (max-width: 760px) {
  main.wrap { padding-top: 2.5rem; }
  .hero { grid-template-columns: 1fr; gap: 2rem; }
  .photo { width: 12rem; }
  .cv-files { grid-template-columns: 1fr; }
}

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