/* Wood-board look: old paper notes pinned and stapled to a wooden board.
   Every rule is scoped to html.wood so the classic look is untouched. */
html.wood {
  --ink: #1f2b5c;
  --ink-soft: #4a5378;
  --ink-blue: #1d5fc0;
  --pencil: #231f1c;
  --pencil-light: rgba(35, 31, 28, .4);
  --hand: 'Patrick Hand', 'Comic Sans MS', cursive;
  --title: 'Kalam', 'Patrick Hand', cursive;
  --text: var(--ink); --muted: var(--ink-soft); --blue: var(--ink-blue); --blue-dark: #174d9e;
  --line: rgba(31, 43, 92, .2);
  font-size: 18px;
}
html.wood body {
  background: #8f5d36;
  color: var(--ink); font-family: var(--hand); letter-spacing: .01em;
}
/* The board is a fixed layer (works on phones, unlike background-attachment: fixed),
   so the papers scroll over it. Soft vignette on top so it reads as a lit surface. */
html.wood body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  will-change: transform; /* own layer: no repaint while scrolling */
  background:
    radial-gradient(ellipse at 50% 35%, transparent 45%, rgba(30, 14, 4, .45) 100%),
    url(../images/textures/wood.jpg) center top / 1000px auto;
}
html.wood a { color: var(--ink-blue); }
html.wood a:hover { color: #174d9e; }
html.wood b, html.wood strong { color: #141d45; }

/* ---------- Shared paper + fasteners ---------- */
html.wood .profile,
html.wood main > section,
html.wood .brand,
html.wood .topnav ul a,
html.wood .home-art,
html.wood .page-title,
html.wood .subpage > .list,
html.wood .subpage > .projects {
  background: #f3ead4 url(../images/textures/paper.jpg) center / 520px;
  border-radius: 3px 7px 4px 6px / 6px 3px 7px 4px;
  box-shadow:
    inset 0 0 24px rgba(150, 112, 52, .2),
    5px 6px 0 rgba(45, 22, 6, .38);
}
/* Black pencil outline. This bakes the original live SVG pencil filter (wobble +
   graphite grain + faint offset stroke) into a 9-slice border-image: same look,
   but static, so it costs nothing to repaint on scroll or hover. */
html.wood .profile::after,
html.wood main > section::after,
html.wood .brand::after,
html.wood .topnav ul a::after,
html.wood .look-toggle::after,
html.wood .rcard::after,
html.wood .tl-card::after,
html.wood .hon::after,
html.wood .tags span::after,
html.wood .proj::after,
html.wood .page-title::after,
html.wood .page-intro::after,
html.wood .subpage > .list::after,
html.wood .subpage > .projects::after {
  /* The line is centred 6.75px into the 14px border, so this inset centres it on the edge.
     z-index -1 (inside each box's own stacking context) draws it under the box's content:
     it never overlaps animated content, so the browser doesn't move it to a GPU layer,
     where it was disappearing during hover transitions and animations. */
  content: ""; position: absolute; inset: -7px; pointer-events: none; z-index: -1;
  border: 14px solid transparent;
  border-image: url(../images/textures/pencil-frame.png) 28 / 14px round;
}
/* Research cards clip their overflow (for the figure), so keep their line just inside. */
html.wood .rcard::after { inset: -5px; }
/* Each outlined box isolates its stacking context so the z-index -1 line stays above its paper. */
html.wood .profile, html.wood main > section, html.wood .brand, html.wood .topnav ul a,
html.wood .look-toggle, html.wood .rcard, html.wood .tl-card, html.wood .hon, html.wood .proj,
html.wood .page-title, html.wood .page-intro, html.wood .subpage > .list, html.wood .subpage > .projects { isolation: isolate; }
/* Push pin: flat cartoon head, inked outline, highlight dot, hard shadow. */
html.wood .profile::before,
html.wood main > section::before,
html.wood .brand::before,
html.wood .topnav ul a::before,
html.wood .page-title::before,
html.wood .subpage > .list::before,
html.wood .subpage > .projects::before {
  content: ""; position: absolute; z-index: 3; top: -8px; left: 22px;
  width: 19px; height: 19px; border-radius: 50%; box-sizing: border-box;
  background: radial-gradient(circle at 34% 30%, #fff 0 2.5px, transparent 3px), var(--pin, #d23a2e);
  border: 2px solid var(--pencil);
  box-shadow: inset -3px -3px 0 rgba(0, 0, 0, .22), 3px 4px 0 rgba(30, 14, 4, .45);
}
/* Staple: inked metal bar across the top edge. */
html.wood .rcard::before,
html.wood .tl-card::before,
html.wood .hon::before,
html.wood .proj::before {
  content: ""; position: absolute; z-index: 3; top: -4px; left: 26px;
  width: 36px; height: 8px; border-radius: 2px; rotate: -4deg; box-sizing: border-box;
  background: linear-gradient(180deg, #f4f6f8 0 40%, #b5bcc4 40%);
  border: 1.8px solid var(--pencil); box-shadow: 2px 2px 0 rgba(30, 14, 4, .35);
}

/* ---------- Top nav: pinned paper tags ---------- */
/* Dark-walnut billboard header beam that stays at the top while the page scrolls. */
html.wood .topnav {
  position: sticky; top: 0; z-index: 30; border: 0; will-change: transform;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  background: #3e2414 url(../images/textures/beam.jpg) left top / auto 100% repeat-x;
  box-shadow: 0 7px 0 rgba(20, 8, 0, .35), 0 12px 18px -6px rgba(20, 8, 0, .45);
}
/* Pencil-drawn bottom edge of the bar */
html.wood .topnav::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 8px; pointer-events: none;
  background: url(../images/textures/pencil-line-3.png) left center / 400px 8px repeat-x;
}
html.wood .topnav .inner { height: 80px; padding: 6px 24px 0; max-width: 1100px; align-items: center; }
html.wood .brand {
  position: relative; display: inline-block; padding: 10px 22px 8px;
  font-family: var(--title); font-weight: 700; font-size: 1.55rem; color: var(--ink); rotate: -1.2deg;
}
html.wood .brand::before { left: 12px; }
html.wood .brand:hover { color: var(--ink); }
html.wood .topnav ul { overflow: visible; gap: 12px; padding-top: 0; flex-wrap: wrap; }
html.wood .topnav ul a {
  position: relative; padding: 8px 18px 6px; border-radius: 3px 6px 3px 5px;
  font-family: var(--hand); font-size: 1.08rem; font-weight: 400; color: var(--ink);
  transition: rotate .2s, translate .2s;
}
html.wood .topnav ul a::before { left: 50%; margin-left: -8px; width: 15px; height: 15px; top: -6px; }
html.wood .topnav li:nth-child(1) a { rotate: .8deg; --pin: #2a6fd1; }
html.wood .topnav li:nth-child(2) a { rotate: -1deg; --pin: #d23a2e; }
html.wood .topnav li:nth-child(3) a { rotate: .6deg; --pin: #3a9a4a; }
html.wood .topnav li:nth-child(4) a { rotate: -.7deg; --pin: #e0b21c; }
html.wood .topnav ul a:hover { color: var(--ink); rotate: 0deg; translate: 0 -2px; }
/* Name tag and tabs: the darker manila card stock, like the interest tags. */
html.wood .brand, html.wood .topnav ul a {
  background: #e2cca0 url(../images/textures/manila.jpg) center / 200px;
  box-shadow: inset 0 0 12px rgba(120, 82, 32, .22), 4px 5px 0 rgba(20, 8, 0, .4);
}
html.wood .topnav ul a.active {
  background-image: linear-gradient(rgba(120, 175, 235, .3), rgba(120, 175, 235, .3)), url(../images/textures/manila.jpg);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px;
}

/* ---------- Layout ---------- */
html.wood .page { max-width: 1100px; gap: 30px; grid-template-columns: 290px 1fr; padding-top: 34px; }
/* Profile card as a "WANTED" poster: sun-yellowed paper, scorched edges, stays put. */
.wanted-title, .wanted-contact { display: none; }
html.wood .profile {
  position: sticky; top: 104px; /* just below the header bar */
  padding: 18px 22px 20px; text-align: center; rotate: -.8deg; --pin: #8a8f96;
  background-image: linear-gradient(rgba(214, 170, 96, .28), rgba(190, 140, 70, .32)), url(../images/textures/paper.jpg);
  box-shadow: inset 0 0 0 5px rgba(120, 72, 24, .12), inset 0 0 46px rgba(110, 62, 18, .5), 5px 6px 0 rgba(45, 22, 6, .38);
}
html.wood .wanted-title {
  display: block; margin: 0 0 8px; font-family: 'Rye', var(--title); font-size: 2.6rem; line-height: 1;
  letter-spacing: .06em; text-transform: uppercase; color: #3a2414;
  padding-bottom: 8px; border-bottom: 3px double rgba(58, 36, 20, .7);
}
/* Square mugshot frame; the round-canvas photo is zoomed so the dark canvas fills it. */
.avatar-frame { display: contents; }
html.wood .avatar-frame {
  display: block; width: 136px; height: 136px; margin: 4px auto 12px; overflow: hidden;
  border: 6px solid #f6ecd3; box-shadow: 0 0 0 2px var(--pencil), 3px 4px 0 rgba(60, 40, 15, .3);
}
html.wood .avatar {
  width: 100%; height: 100%; margin: 0; display: block; border: 0; border-radius: 0; box-shadow: none;
  object-fit: cover; transform: scale(1.42); transform-origin: 50% 56%;
  filter: sepia(.25) contrast(1.05);
}
html.wood .profile h1 { font-family: 'Rye', var(--title); font-weight: 400; font-size: 1.3rem; color: #3a2414; margin-bottom: 4px; }
html.wood .profile .role { color: #4a3420; font-size: 1rem; line-height: 1.4; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 3px double rgba(58, 36, 20, .7); }
html.wood .wanted-contact {
  display: block; margin: 0 0 6px; font-family: 'Rye', var(--title); font-size: .66rem;
  letter-spacing: .01em; white-space: nowrap; text-transform: uppercase; color: #3a2414;
}
html.wood .links { text-align: left; gap: 4px; padding-left: 10px; }
html.wood .links a, html.wood .links span { font-size: 1rem; color: var(--ink); }
html.wood .links .cv-link { color: var(--ink-blue); }
html.wood .links svg { color: var(--ink-blue); width: 19px; height: 19px; }

html.wood main > section {
  position: relative; padding: 26px 30px 24px; margin-bottom: 30px;
  /* Keep each tilted paper on its own GPU layer permanently. Otherwise hovering a card
     re-rasterizes the paper differently and its contents (e.g. the dashed timeline) jump. */
  will-change: transform;
}
html.wood main > section:nth-of-type(1) { rotate: .3deg; --pin: #2a6fd1; }
html.wood main > section:nth-of-type(2) { rotate: -.4deg; --pin: #d23a2e; }
html.wood main > section:nth-of-type(3) { rotate: .25deg; --pin: #3a9a4a; }
html.wood main > section:nth-of-type(4) { rotate: -.3deg; --pin: #e0b21c; }
html.wood main > section:nth-of-type(5) { rotate: .35deg; --pin: #8a4fc4; }

html.wood h2 {
  font-family: var(--title); font-weight: 700; font-size: 1.75rem; line-height: 1.2;
  letter-spacing: 0; text-transform: none; color: var(--ink);
  border: 0; padding-bottom: 8px; margin-bottom: 16px; position: relative;
}
/* Heading rule: a single pencil line under the title instead of a box. */
html.wood h2::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 8px; pointer-events: none;
  background: url(../images/textures/pencil-line.png) left center / 400px 8px repeat-x;
}
html.wood h2 a { font-family: var(--hand); font-size: 1.02rem; }
html.wood .bio p { font-size: 1.13rem; line-height: 1.6; }

/* Interest tags: little manila card slips with the same pencil outline, each at its own angle. */
html.wood .tags { gap: 12px 10px; }
html.wood .tags span {
  position: relative; isolation: isolate; color: var(--ink);
  font-size: 1rem; font-weight: 400; padding: 4px 14px 3px; border-radius: 0;
  background: #e2cca0 url(../images/textures/manila.jpg) center / 200px;
  box-shadow: inset 0 0 10px rgba(120, 82, 32, .22), 2px 3px 0 rgba(60, 40, 15, .3);
}
html.wood .tags span::after,
html.wood .brand::after,
html.wood .topnav ul a::after,
html.wood .look-toggle::after,
html.wood .page-intro::after {
  border-image: url(../images/textures/pencil-tag.png) 28 / 14px round stretch;
}
html.wood .tags span:nth-child(5n+1) { rotate: -1.6deg; }
html.wood .tags span:nth-child(5n+2) { rotate: 1.2deg; translate: 0 2px; }
html.wood .tags span:nth-child(5n+3) { rotate: -.6deg; }
html.wood .tags span:nth-child(5n+4) { rotate: 1.8deg; }
html.wood .tags span:nth-child(5n+5) { rotate: -1deg; translate: 0 1px; }

/* Recently */
html.wood .recent-updates li + li { border-top: 0; background: url(../images/textures/pencil-dash-h.png) left top / 200px 6px repeat-x; }
html.wood .recent-updates a { color: var(--ink); font-size: 1.05rem; grid-template-columns: 90px minmax(0, 1fr); }
html.wood .recent-updates time { font-size: .98rem; color: var(--ink-soft); border-right: 0; background: url(../images/textures/pencil-dash-v.png) right top / 6px 200px repeat-y; opacity: 1; }
html.wood .recent-more { color: var(--ink-blue); text-decoration: underline; text-underline-offset: 3px; }

/* Inner cards are thinner slips of paper fastened onto the sheet. */
html.wood .rcard, html.wood .tl-card, html.wood .hon, html.wood .proj {
  position: relative; color: var(--ink);
  background: rgba(255, 251, 240, .7); border: 0;
  border-radius: 2px 5px 3px 4px; box-shadow: 3px 4px 0 rgba(60, 40, 15, .22);
  transition: rotate .2s, translate .2s, box-shadow .2s;
}
html.wood .list.home-research { gap: 18px; }
html.wood .home-research > li:nth-child(odd) .rcard { rotate: -.5deg; }
html.wood .home-research > li:nth-child(even) .rcard { rotate: .5deg; }
html.wood a.rcard:hover, html.wood .tl-card:hover, html.wood a.hon:hover, html.wood a.proj:hover {
  rotate: 0deg; transform: none; translate: -1px -3px;
  box-shadow: 5px 7px 0 rgba(60, 40, 15, .28);
}
/* Figures sit in the slip like taped-in photos. */
html.wood .home-research .rthumb { margin: 10px 0 10px 10px; overflow: visible; }
/* breathing room between the photo print and the text */
html.wood .home-research .rcard.with-thumb { column-gap: 26px; }
html.wood .home-research .rthumb::after {
  content: ""; position: absolute; top: -9px; left: 50%; width: 40px; height: 13px; margin-left: -20px; rotate: -3deg;
  background: rgba(232, 214, 168, .78); border-left: 1.5px dotted rgba(35, 31, 28, .35); border-right: 1.5px dotted rgba(35, 31, 28, .35);
}
html.wood .home-research .item-head h3 { font-family: var(--title); font-weight: 700; font-size: 1.15rem; }
html.wood .home-research .date { font-size: .92rem; color: var(--ink-soft); }
html.wood .card-authors { font-size: .92rem; color: var(--ink-soft); }
html.wood .home-research .card-authors { font-size: .9rem; }
html.wood .publication-meta .venue { font-size: .96rem; font-style: normal; color: var(--ink-blue); }
/* Award badge as a highlighter stroke */
html.wood .badge {
  background: linear-gradient(transparent 30%, rgba(255, 214, 64, .85) 30% 88%, transparent 88%);
  color: #6b4500; font-size: .9rem; font-weight: 400; padding: 0 4px; border-radius: 0;
}

/* Experience timeline: inked thread with paper buttons */
html.wood .timeline::before { border: 0; width: 6px; left: 19px; background: url(../images/textures/pencil-dash-v.png) center top / 6px 200px repeat-y; }
html.wood .tl-node { background: #f6eedb url(../images/textures/paper.jpg) center / 200px; color: var(--ink); border: 2.2px solid var(--pencil); box-shadow: 2px 3px 0 rgba(60, 40, 15, .3); }
html.wood .tl-item.current .tl-node { background: #e2cca0 url(../images/textures/manila.jpg) center / 160px; color: var(--ink); border-color: var(--pencil); }
/* A still pencil ring instead of the endless pulse (the animation forced constant GPU work). */
html.wood .tl-item.current .tl-node::after { animation: none; transform: none; opacity: 1; inset: -8px; border: 0; border-radius: 0; background: url(../images/textures/pencil-dash-ring.png) center / 100% 100% no-repeat; }
html.wood .tl-item:nth-child(odd) .tl-card { rotate: .35deg; }
html.wood .tl-item:nth-child(even) .tl-card { rotate: -.35deg; }
html.wood .tl-card b { font-family: var(--title); font-size: 1.1rem; }
html.wood .tl-org, html.wood .tl-date { color: var(--ink-soft); font-size: .98rem; }
html.wood .tl-sum { color: var(--ink); font-size: 1rem; }
/* Kind and organization labels: tiny manila slips with a pencil edge (no blue chips). */
html.wood .tl-chips { gap: 7px; }
html.wood .tl-chips .tl-kind, html.wood .tl-chips .org-badge {
  background: #e2cca0 url(../images/textures/manila.jpg) center / 160px; color: var(--ink);
  border: 1.5px solid var(--pencil); border-radius: 2px; box-shadow: 1.5px 2px 0 rgba(60, 40, 15, .28);
  font-family: var(--hand); font-weight: 400; font-size: .84rem; line-height: 1.35; letter-spacing: .03em; padding: 1px 8px 0;
}
html.wood .tl-chips .tl-kind { text-transform: uppercase; font-size: .76rem; letter-spacing: .07em; padding-top: 2px; }
html.wood .tl-chips .org-badge::before { content: none; }
html.wood .tl-chips > :nth-child(odd) { rotate: -2deg; }
html.wood .tl-chips > :nth-child(even) { rotate: 1.5deg; }
/* Honors */
html.wood .hon-body b { font-family: var(--title); font-size: 1.08rem; }
html.wood .hon-body small { color: var(--ink-soft); font-size: .96rem; }
html.wood .hon-ico { background: #f6eedb url(../images/textures/paper.jpg) center / 200px; color: var(--ink); border: 2px solid var(--pencil); }
html.wood .hon-year { background: transparent; color: var(--ink-soft); font-size: .92rem; }
html.wood .hon.feature { background: rgba(255, 238, 180, .55); border-color: rgba(180, 130, 20, .45); }
html.wood .hon.feature .hon-ico { background: #f2c14e; color: var(--pencil); }
html.wood .hon-more { color: #8f5a00; font-size: .95rem; }

/* The cat sketch hangs off the poster's bottom-right corner; the poster gets extra room
   at the bottom so the sketch never covers the contact links. */
html.wood .profile { padding-bottom: 96px; z-index: 2; } /* above the papers, so the sketch is never covered */
html.wood .home-art {
  display: block; position: absolute; z-index: 4; opacity: 1; pointer-events: none;
  left: auto; right: -8px; top: auto; bottom: -54px; width: 112px;
  padding: 7px; rotate: 7deg; border: 2.2px solid var(--pencil);
}

html.wood footer { color: #f6ead0; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); font-size: 1rem; max-width: 1100px; }

@media (max-width: 820px) {
  html.wood .profile { position: relative; top: auto; }
  /* Compact one-row bar on phones: smaller name, tabs scroll sideways. */
  html.wood .topnav .inner { height: auto; align-items: center; gap: 8px; padding: 12px 14px 8px; }
  html.wood .brand { font-size: 1.2rem; padding: 6px 16px 4px; }
  html.wood .topnav ul { margin: 0 -14px; padding: 9px 14px 6px; gap: 8px; flex-wrap: nowrap; overflow-x: auto; max-width: 100vw; }
  html.wood .topnav ul a { padding: 5px 12px 3px; font-size: .95rem; }
  html.wood .page { grid-template-columns: 1fr; }
  html.wood .links { text-align: center; padding-left: 0; }
  html.wood main > section { padding: 24px 18px 20px; }
}
@media (max-width: 480px) {
  html.wood .recent-updates time { border-right: 0; }
  html.wood .topnav ul { justify-content: flex-start; }
}

/* ---------- Look switch (both looks) ---------- */
/* Look switch: lives at the right end of the top bar (look.js puts it there). */
.topnav .inner { position: relative; }
.topnav .inner > ul { margin-left: auto; }
.look-toggle {
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; cursor: pointer;
  font: 600 .82rem/1 var(--sans); color: var(--muted); white-space: nowrap;
  background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 6px 11px 6px 7px;
  transition: color .2s, background-color .2s;
}
.look-toggle:hover { color: var(--blue-dark); background: var(--blue-soft); }
.look-toggle .swatch {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  background: url(../images/textures/wood.jpg) center / 260px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25);
}
html.wood .look-toggle .swatch { background: linear-gradient(140deg, #8cc8f5, #3d93db); }
/* Phones: just the swatch, tucked into the bar's top-right corner. */
@media (max-width: 820px) {
  .look-toggle { position: absolute; top: 10px; right: 12px; padding: 5px; }
  .look-toggle .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* Wood: a manila tag on the beam, like the tabs. */
html.wood .look-toggle {
  position: relative; font: 400 1rem/1 var(--hand); color: var(--ink); padding: 7px 13px 6px 9px;
  border: 0; border-radius: 3px 6px 3px 5px; rotate: 1.5deg;
  background: #e2cca0 url(../images/textures/manila.jpg) center / 200px;
  box-shadow: inset 0 0 12px rgba(120, 82, 32, .22), 4px 5px 0 rgba(20, 8, 0, .4);
}
html.wood .look-toggle:hover { color: var(--ink); rotate: 0deg; }
@media (max-width: 820px) {
  html.wood .look-toggle { position: absolute; top: 12px; right: 12px; padding: 6px; }
}

/* ---------- Research, Experience and Fun Projects pages ---------- */
html.wood .subpage { position: relative; z-index: 1; max-width: 900px; padding-top: 40px; }
html.wood .subpage.experience-page { max-width: 980px; }
/* Page title: a pinned paper sign; intro: a manila note under it. */
html.wood .page-title {
  position: relative; display: block; width: fit-content; margin: 0 0 18px; padding: 10px 26px 6px;
  font-family: var(--title); font-weight: 700; font-size: 2.3rem; line-height: 1.2; letter-spacing: 0;
  color: var(--ink); rotate: -1.2deg; --pin: #d23a2e;
}
html.wood .page-intro {
  position: relative; display: block; width: fit-content; max-width: 100%; margin: 0 0 34px 18px; padding: 5px 16px 4px;
  font-size: 1.08rem; color: var(--ink); rotate: .8deg;
  background: #e2cca0 url(../images/textures/manila.jpg) center / 200px;
  box-shadow: inset 0 0 10px rgba(120, 82, 32, .22), 3px 4px 0 rgba(45, 22, 6, .38);
}
/* Lists sit on one big pinned sheet (Experience keeps its own sections as sheets). */
html.wood .subpage > .list,
html.wood .subpage > .projects { position: relative; padding: 30px 28px 26px; rotate: .2deg; --pin: #3a9a4a; }
html.wood .subpage > .list { gap: 26px; }
/* Research page: no shared sheet. Each project is its own paper pinned to the board. */
html.wood .subpage > .list.eq { padding: 0; rotate: none; background: none; box-shadow: none; gap: 34px; }
html.wood .subpage > .list.eq::before, html.wood .subpage > .list.eq::after { content: none; }
html.wood .subpage > .list.eq > li > .rcard {
  padding: 24px 24px 20px;
  background: #f3ead4 url(../images/textures/paper.jpg) center / 520px;
  border-radius: 3px 7px 4px 6px / 6px 3px 7px 4px;
  box-shadow: inset 0 0 24px rgba(150, 112, 52, .2), 5px 6px 0 rgba(45, 22, 6, .38);
}
html.wood .subpage > .list.eq > li > a.rcard:hover { box-shadow: inset 0 0 24px rgba(150, 112, 52, .2), 7px 9px 0 rgba(45, 22, 6, .4); }
/* push pin instead of a staple */
html.wood .subpage > .list.eq > li > .rcard::before {
  top: -8px; left: 22px; width: 19px; height: 19px; border-radius: 50%; rotate: none;
  background: radial-gradient(circle at 34% 30%, #fff 0 2.5px, transparent 3px), var(--pin, #d23a2e);
  border: 2px solid var(--pencil);
  box-shadow: inset -3px -3px 0 rgba(0, 0, 0, .22), 3px 4px 0 rgba(30, 14, 4, .45);
}
html.wood .subpage > .list.eq > li:nth-child(3n+1) > .rcard { --pin: #2a6fd1; }
html.wood .subpage > .list.eq > li:nth-child(3n+2) > .rcard { --pin: #d23a2e; }
html.wood .subpage > .list.eq > li:nth-child(3n+3) > .rcard { --pin: #3a9a4a; }
/* pins sit on the top edge, so the card can't clip its overflow; the figure clips itself */
html.wood .subpage > .list.eq > li > .rcard { overflow: visible; }
html.wood .subpage > .list.eq > li > .rcard::after { inset: -7px; }
html.wood .subpage > .projects { gap: 24px; }
html.wood .experience-page section { margin-top: 0; }
html.wood .experience-page section > h2 {
  font-size: 1.75rem; text-transform: none; letter-spacing: 0; color: var(--ink);
}
html.wood .experience-page .list { gap: 22px; }

/* Slip details shared by the pages */
html.wood .subpage > .list > li:nth-child(odd) > .rcard,
html.wood .experience-page .list > li:nth-child(odd) > .rcard,
html.wood .projects > .proj:nth-child(odd) { rotate: -.4deg; }
html.wood .subpage > .list > li:nth-child(even) > .rcard,
html.wood .experience-page .list > li:nth-child(even) > .rcard,
html.wood .projects > .proj:nth-child(even) { rotate: .4deg; }
html.wood .rcard h3, html.wood .proj h3 { font-family: var(--title); font-weight: 700; font-size: 1.2rem; color: var(--ink); }
html.wood .rcard .sub, html.wood .experience-meta, html.wood .experience-advisors { color: var(--ink-soft); font-size: .95rem; }
html.wood .rcard .desc, html.wood .experience-desc, html.wood .proj p { color: var(--ink); font-size: 1.02rem; line-height: 1.55; }
html.wood .rcard .go, html.wood .proj .go { font-family: var(--hand); font-weight: 400; font-size: 1.02rem; color: var(--ink-blue); text-decoration: underline; text-underline-offset: 3px; }
/* Research page: figure as a taped-in photo, paper line as a dashed note */
html.wood .subpage > .list .rthumb {
  position: relative; overflow: visible; border-radius: 0; background: none;
}
html.wood .subpage > .list .rthumb::after {
  content: ""; position: absolute; top: -14px; left: 50%; width: 70px; height: 20px; margin-left: -35px; rotate: -3deg;
  background: rgba(232, 214, 168, .78); border-left: 2px dotted rgba(35, 31, 28, .35); border-right: 2px dotted rgba(35, 31, 28, .35);
}
html.wood .publine, html.wood .rcard.with-thumb .publine {
  border: 0; border-radius: 0; padding: 10px 14px; font-size: 1rem;
  background: url(../images/textures/pencil-dash-h.png) left top / 200px 6px repeat-x, url(../images/textures/pencil-dash-h.png) left bottom / 200px 6px repeat-x,
              url(../images/textures/pencil-dash-v.png) left top / 6px 200px repeat-y, url(../images/textures/pencil-dash-v.png) right top / 6px 200px repeat-y;
}
html.wood .publine .label, html.wood .rcard.with-thumb .publine .label {
  background: #e2cca0 url(../images/textures/manila.jpg) center / 200px; color: var(--ink);
  font-size: .78rem; letter-spacing: .06em; border: 1.5px solid var(--pencil); border-radius: 2px; padding: 1px 7px;
}
html.wood .publine .ptitle, html.wood .rcard.with-thumb .publine .ptitle { font-weight: 400; font-size: 1rem; color: #141d45; }
html.wood .rcard.with-thumb .publine .venue { font-size: .95rem; color: var(--ink-blue); }
/* Experience page: logo panel as a pasted-in card */
html.wood a.experience-card { border-radius: 2px 5px 3px 4px; }
html.wood .proj { padding: 18px 20px; }
@media (max-width: 640px) {
  html.wood .page-title { font-size: 1.8rem; }
  html.wood .subpage > .list, html.wood .subpage > .projects { padding: 24px 16px 20px; }
}

/* Torn print edges, one per image size so the tear scale looks right. */
html.wood {
  --torn-lg: polygon(0.00% 6.3px, 1.56% 2.6px, 3.12% 0.8px, 4.69% 2.1px, 6.25% 2.3px, 7.81% 1.0px, 9.38% 1.1px, 10.94% 1.0px, 12.50% 0.3px, 14.06% 5.7px, 15.62% 0.6px, 17.19% 0.7px, 18.75% 4.8px, 20.31% 0.5px, 21.88% 2.1px, 23.44% 1.1px, 25.00% 0.7px, 26.56% 1.5px, 28.12% 1.6px, 29.69% 1.7px, 31.25% 2.4px, 32.81% 0.4px, 34.38% 1.0px, 35.94% 5.8px, 37.50% 0.0px, 39.06% 0.5px, 40.62% 1.0px, 42.19% 1.0px, 43.75% 1.6px, 45.31% 1.2px, 46.88% 1.6px, 48.44% 0.6px, 50.00% 0.3px, 51.56% 0.9px, 53.12% 5.8px, 54.69% 1.0px, 56.25% 1.2px, 57.81% 1.9px, 59.38% 2.3px, 60.94% 3.7px, 62.50% 2.5px, 64.06% 1.9px, 65.62% 2.6px, 67.19% 0.3px, 68.75% 3.6px, 70.31% 1.3px, 71.88% 1.9px, 73.44% 0.8px, 75.00% 1.2px, 76.56% 0.7px, 78.12% 1.2px, 79.69% 1.3px, 81.25% 1.5px, 82.81% 1.8px, 84.38% 0.6px, 85.94% 1.6px, 87.50% 0.2px, 89.06% 1.6px, 90.62% 4.1px, 92.19% 6.3px, 93.75% 4.6px, 95.31% 0.2px, 96.88% 6.0px, 98.44% 1.0px, 100.00% 1.3px, calc(100% - 1.7px) 1.56%, calc(100% - 1.0px) 3.12%, calc(100% - 2.1px) 4.69%, calc(100% - 1.3px) 6.25%, calc(100% - 2.5px) 7.81%, calc(100% - 2.1px) 9.38%, calc(100% - 2.5px) 10.94%, calc(100% - 6.0px) 12.50%, calc(100% - 0.7px) 14.06%, calc(100% - 1.7px) 15.62%, calc(100% - 1.8px) 17.19%, calc(100% - 1.1px) 18.75%, calc(100% - 0.4px) 20.31%, calc(100% - 0.6px) 21.88%, calc(100% - 2.6px) 23.44%, calc(100% - 0.8px) 25.00%, calc(100% - 0.9px) 26.56%, calc(100% - 4.4px) 28.12%, calc(100% - 0.3px) 29.69%, calc(100% - 0.4px) 31.25%, calc(100% - 2.1px) 32.81%, calc(100% - 1.3px) 34.38%, calc(100% - 0.6px) 35.94%, calc(100% - 2.4px) 37.50%, calc(100% - 0.7px) 39.06%, calc(100% - 5.1px) 40.62%, calc(100% - 1.8px) 42.19%, calc(100% - 0.2px) 43.75%, calc(100% - 4.3px) 45.31%, calc(100% - 2.0px) 46.88%, calc(100% - 0.4px) 48.44%, calc(100% - 4.4px) 50.00%, calc(100% - 2.3px) 51.56%, calc(100% - 1.4px) 53.12%, calc(100% - 2.3px) 54.69%, calc(100% - 2.3px) 56.25%, calc(100% - 1.9px) 57.81%, calc(100% - 0.2px) 59.38%, calc(100% - 1.4px) 60.94%, calc(100% - 0.7px) 62.50%, calc(100% - 0.4px) 64.06%, calc(100% - 1.1px) 65.62%, calc(100% - 2.1px) 67.19%, calc(100% - 3.7px) 68.75%, calc(100% - 4.7px) 70.31%, calc(100% - 1.3px) 71.88%, calc(100% - 2.3px) 73.44%, calc(100% - 1.5px) 75.00%, calc(100% - 2.2px) 76.56%, calc(100% - 1.3px) 78.12%, calc(100% - 2.5px) 79.69%, calc(100% - 6.0px) 81.25%, calc(100% - 1.2px) 82.81%, calc(100% - 0.4px) 84.38%, calc(100% - 2.4px) 85.94%, calc(100% - 0.2px) 87.50%, calc(100% - 0.1px) 89.06%, calc(100% - 5.8px) 90.62%, calc(100% - 2.2px) 92.19%, calc(100% - 1.9px) 93.75%, calc(100% - 0.2px) 95.31%, calc(100% - 0.2px) 96.88%, calc(100% - 5.6px) 98.44%, calc(100% - 1.8px) 100.00%, 98.44% calc(100% - 1.3px), 96.88% calc(100% - 1.6px), 95.31% calc(100% - 0.3px), 93.75% calc(100% - 2.1px), 92.19% calc(100% - 0.7px), 90.62% calc(100% - 0.9px), 89.06% calc(100% - 0.2px), 87.50% calc(100% - 1.2px), 85.94% calc(100% - 5.0px), 84.38% calc(100% - 1.1px), 82.81% calc(100% - 1.4px), 81.25% calc(100% - 1.6px), 79.69% calc(100% - 3.6px), 78.12% calc(100% - 2.2px), 76.56% calc(100% - 1.3px), 75.00% calc(100% - 0.9px), 73.44% calc(100% - 4.0px), 71.88% calc(100% - 1.4px), 70.31% calc(100% - 2.1px), 68.75% calc(100% - 3.9px), 67.19% calc(100% - 0.7px), 65.62% calc(100% - 1.8px), 64.06% calc(100% - 1.6px), 62.50% calc(100% - 0.9px), 60.94% calc(100% - 1.0px), 59.38% calc(100% - 0.9px), 57.81% calc(100% - 2.0px), 56.25% calc(100% - 0.2px), 54.69% calc(100% - 0.5px), 53.12% calc(100% - 1.7px), 51.56% calc(100% - 0.5px), 50.00% calc(100% - 1.6px), 48.44% calc(100% - 1.1px), 46.88% calc(100% - 2.1px), 45.31% calc(100% - 2.0px), 43.75% calc(100% - 0.8px), 42.19% calc(100% - 0.5px), 40.62% calc(100% - 0.2px), 39.06% calc(100% - 1.1px), 37.50% calc(100% - 1.1px), 35.94% calc(100% - 1.9px), 34.38% calc(100% - 1.9px), 32.81% calc(100% - 2.0px), 31.25% calc(100% - 1.8px), 29.69% calc(100% - 1.6px), 28.12% calc(100% - 1.1px), 26.56% calc(100% - 0.6px), 25.00% calc(100% - 5.0px), 23.44% calc(100% - 2.0px), 21.88% calc(100% - 0.4px), 20.31% calc(100% - 0.7px), 18.75% calc(100% - 1.4px), 17.19% calc(100% - 0.7px), 15.62% calc(100% - 6.3px), 14.06% calc(100% - 5.3px), 12.50% calc(100% - 0.8px), 10.94% calc(100% - 1.6px), 9.38% calc(100% - 1.5px), 7.81% calc(100% - 0.9px), 6.25% calc(100% - 0.9px), 4.69% calc(100% - 1.1px), 3.12% calc(100% - 5.2px), 1.56% calc(100% - 0.3px), 0.00% calc(100% - 2.1px), 0.3px 98.44%, 1.2px 96.88%, 1.2px 95.31%, 4.4px 93.75%, 0.2px 92.19%, 2.4px 90.62%, 1.6px 89.06%, 1.5px 87.50%, 1.5px 85.94%, 1.5px 84.38%, 1.5px 82.81%, 1.7px 81.25%, 0.7px 79.69%, 0.4px 78.12%, 1.5px 76.56%, 2.1px 75.00%, 1.1px 73.44%, 1.4px 71.88%, 0.2px 70.31%, 4.9px 68.75%, 0.8px 67.19%, 2.1px 65.62%, 0.2px 64.06%, 0.6px 62.50%, 2.0px 60.94%, 0.2px 59.38%, 0.8px 57.81%, 1.4px 56.25%, 1.3px 54.69%, 1.4px 53.12%, 2.5px 51.56%, 0.0px 50.00%, 5.8px 48.44%, 6.3px 46.88%, 5.7px 45.31%, 0.2px 43.75%, 0.6px 42.19%, 2.4px 40.62%, 2.4px 39.06%, 2.5px 37.50%, 1.3px 35.94%, 4.2px 34.38%, 4.7px 32.81%, 0.8px 31.25%, 1.3px 29.69%, 5.6px 28.12%, 2.3px 26.56%, 1.3px 25.00%, 2.0px 23.44%, 6.1px 21.88%, 4.3px 20.31%, 4.1px 18.75%, 0.9px 17.19%, 2.3px 15.62%, 1.6px 14.06%, 1.0px 12.50%, 0.9px 10.94%, 1.2px 9.38%, 0.2px 7.81%, 2.0px 6.25%, 0.7px 4.69%, 2.0px 3.12%, 0.3px 1.56%);
  --torn-md: polygon(0.00% 0.7px, 3.85% 2.0px, 7.69% 0.6px, 11.54% 1.6px, 15.38% 1.7px, 19.23% 3.4px, 23.08% 0.9px, 26.92% 3.9px, 30.77% 0.2px, 34.62% 1.0px, 38.46% 0.5px, 42.31% 0.5px, 46.15% 3.1px, 50.00% 0.4px, 53.85% 1.6px, 57.69% 0.8px, 61.54% 3.9px, 65.38% 1.2px, 69.23% 1.2px, 73.08% 1.3px, 76.92% 1.8px, 80.77% 0.3px, 84.62% 0.7px, 88.46% 0.6px, 92.31% 0.0px, 96.15% 0.4px, 100.00% 0.8px, calc(100% - 0.3px) 3.85%, calc(100% - 0.5px) 7.69%, calc(100% - 3.3px) 11.54%, calc(100% - 0.7px) 15.38%, calc(100% - 0.8px) 19.23%, calc(100% - 1.0px) 23.08%, calc(100% - 0.1px) 26.92%, calc(100% - 1.4px) 30.77%, calc(100% - 0.6px) 34.62%, calc(100% - 0.6px) 38.46%, calc(100% - 1.8px) 42.31%, calc(100% - 1.2px) 46.15%, calc(100% - 1.3px) 50.00%, calc(100% - 4.2px) 53.85%, calc(100% - 0.4px) 57.69%, calc(100% - 0.3px) 61.54%, calc(100% - 0.4px) 65.38%, calc(100% - 4.1px) 69.23%, calc(100% - 4.2px) 73.08%, calc(100% - 1.0px) 76.92%, calc(100% - 1.9px) 80.77%, calc(100% - 1.5px) 84.62%, calc(100% - 0.6px) 88.46%, calc(100% - 3.9px) 92.31%, calc(100% - 1.6px) 96.15%, calc(100% - 1.9px) 100.00%, 96.15% calc(100% - 1.4px), 92.31% calc(100% - 0.5px), 88.46% calc(100% - 1.1px), 84.62% calc(100% - 1.7px), 80.77% calc(100% - 0.7px), 76.92% calc(100% - 0.3px), 73.08% calc(100% - 0.0px), 69.23% calc(100% - 0.2px), 65.38% calc(100% - 0.9px), 61.54% calc(100% - 4.2px), 57.69% calc(100% - 1.4px), 53.85% calc(100% - 1.4px), 50.00% calc(100% - 1.9px), 46.15% calc(100% - 1.5px), 42.31% calc(100% - 0.9px), 38.46% calc(100% - 3.2px), 34.62% calc(100% - 3.3px), 30.77% calc(100% - 0.1px), 26.92% calc(100% - 0.1px), 23.08% calc(100% - 0.4px), 19.23% calc(100% - 1.9px), 15.38% calc(100% - 0.8px), 11.54% calc(100% - 1.6px), 7.69% calc(100% - 0.7px), 3.85% calc(100% - 4.3px), 0.00% calc(100% - 3.8px), 3.9px 96.15%, 1.5px 92.31%, 0.2px 88.46%, 1.0px 84.62%, 0.5px 80.77%, 0.3px 76.92%, 0.9px 73.08%, 1.6px 69.23%, 1.9px 65.38%, 1.0px 61.54%, 3.2px 57.69%, 1.8px 53.85%, 1.2px 50.00%, 1.7px 46.15%, 1.0px 42.31%, 1.9px 38.46%, 1.4px 34.62%, 0.9px 30.77%, 0.3px 26.92%, 1.8px 23.08%, 4.3px 19.23%, 0.1px 15.38%, 0.0px 11.54%, 1.7px 7.69%, 1.4px 3.85%);
  --torn-sm: polygon(0.00% 0.7px, 7.14% 2.5px, 14.29% 3.0px, 21.43% 0.4px, 28.57% 0.1px, 35.71% 1.5px, 42.86% 0.7px, 50.00% 3.6px, 57.14% 1.0px, 64.29% 2.9px, 71.43% 0.9px, 78.57% 0.5px, 85.71% 0.7px, 92.86% 0.5px, 100.00% 3.1px, calc(100% - 1.1px) 7.14%, calc(100% - 1.3px) 14.29%, calc(100% - 0.5px) 21.43%, calc(100% - 3.4px) 28.57%, calc(100% - 0.4px) 35.71%, calc(100% - 0.5px) 42.86%, calc(100% - 0.1px) 50.00%, calc(100% - 0.7px) 57.14%, calc(100% - 1.3px) 64.29%, calc(100% - 1.2px) 71.43%, calc(100% - 1.1px) 78.57%, calc(100% - 0.6px) 85.71%, calc(100% - 0.8px) 92.86%, calc(100% - 1.0px) 100.00%, 92.86% calc(100% - 0.4px), 85.71% calc(100% - 2.7px), 78.57% calc(100% - 2.8px), 71.43% calc(100% - 0.5px), 64.29% calc(100% - 0.6px), 57.14% calc(100% - 0.6px), 50.00% calc(100% - 1.3px), 42.86% calc(100% - 0.1px), 35.71% calc(100% - 0.3px), 28.57% calc(100% - 1.1px), 21.43% calc(100% - 0.3px), 14.29% calc(100% - 3.1px), 7.14% calc(100% - 0.7px), 0.00% calc(100% - 1.3px), 0.8px 92.86%, 1.4px 85.71%, 0.5px 78.57%, 1.0px 71.43%, 0.9px 64.29%, 3.0px 57.14%, 0.5px 50.00%, 0.7px 42.86%, 0.0px 35.71%, 3.0px 28.57%, 1.3px 21.43%, 0.3px 14.29%, 0.5px 7.14%);
}
/* Research figures as physical prints: white photo border with a ragged, deckled edge
   (clip-path), a thin dark edge and a cast shadow that follow the ragged shape
   (drop-shadow on the parent, since clip-path would clip the image's own shadow). */
html.wood .rthumb, html.wood .proj-photo, html.wood .experience-media { background: none; border: 0; outline: 0; box-shadow: none;
  filter: drop-shadow(1px 0 0 rgba(35, 31, 28, .85)) drop-shadow(-1px 0 0 rgba(35, 31, 28, .85))
          drop-shadow(0 1px 0 rgba(35, 31, 28, .85)) drop-shadow(0 -1px 0 rgba(35, 31, 28, .85))
          drop-shadow(3px 4px 0 rgba(60, 40, 15, .28)); }
html.wood .rthumb img {
  box-sizing: border-box; border: 9px solid #fffdf7; background: #fffdf7;
  clip-path: var(--torn-lg);
}
/* Fun Projects previews and Experience logos as smaller prints. */
.proj-photo { display: contents; }
html.wood .proj-photo { display: block; flex-shrink: 0; align-self: center; }
html.wood .proj img, html.wood .proj.play img {
  display: block; margin: 0; border-radius: 0; outline: 0; box-shadow: none;
  box-sizing: border-box; border: 7px solid #fffdf7; background: #fffdf7;
  clip-path: var(--torn-md);
}
html.wood .proj.play img { width: 214px; height: 144px; }
html.wood .proj.art img { width: 164px; height: 204px; }
html.wood .experience-media, html.wood .scai .experience-media, html.wood .clsp .experience-media,
html.wood .supio .experience-media, html.wood .athletics .experience-media { background: none; border: 0; padding: 18px 16px; }
html.wood .experience-content { border-left: 0; background: url(../images/textures/pencil-dash-v.png) left top / 6px 200px repeat-y; }
html.wood .experience-media img, html.wood .hockey .experience-media img {
  box-sizing: border-box; border: 6px solid #fffdf7; background: #fffdf7; border-radius: 0;
  max-height: 124px; clip-path: var(--torn-sm); mix-blend-mode: normal;
}
@media (max-width: 820px) { html.wood .proj.play img { width: 100%; height: auto; } html.wood .proj-photo { align-self: stretch; } }

/* Staples sit on the top edge, so slips must not clip their overflow. */
html.wood .rcard, html.wood a.experience-card, html.wood .home-research .rcard.with-thumb { overflow: visible; }
html.wood .rcard::after { inset: -7px; }

/* Phones: stack the image on top of the text in the Experience cards and the Home
   publication cards, instead of squeezing it into a narrow side column. */
@media (max-width: 640px) {
  html.wood a.experience-card { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  html.wood .experience-media { padding: 18px 16px 6px; }
  html.wood .experience-media img, html.wood .hockey .experience-media img { width: auto; max-width: 70%; max-height: 120px; }
  html.wood .experience-content {
    padding: 16px 18px 18px;
    background: url(../images/textures/pencil-dash-h.png) left top / 200px 6px repeat-x;
  }
  html.wood .list.eq.home-research { grid-auto-rows: auto; }
  html.wood .list.eq.home-research > li, html.wood .list.eq.home-research > li > .rcard { height: auto; }
  html.wood .home-research .rcard.with-thumb { grid-template-columns: minmax(0, 1fr); row-gap: 4px; align-content: start; }
  html.wood .home-research .rthumb { position: relative; width: auto; height: auto; min-height: 0; margin: 14px 14px 0; }
  html.wood .home-research .rthumb img { position: static; width: 100%; height: auto; }
  html.wood .home-research .rbody { padding: 10px 18px 18px; }
}

/* Content is visible right away: no scroll fade-in (it left blank papers while scrolling). */
html.wood.reveal-on .reveal { opacity: 1; transform: none; filter: none; transition: none; }
