/* hhyurdagul.com — a quiet, single-column personal site.
 * Parchment and Nocturne follow the system color scheme.
 */

/* ------------------------------------------------------------------ fonts */

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-opsz-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-ext-opsz-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-opsz-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-ext-opsz-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-opsz-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-ext-opsz-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-opsz-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-ext-opsz-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ----------------------------------------------------------------- tokens */

:root {
  color-scheme: light dark;

  /* Parchment by day, Nocturne by night. Warm neutrals with a blue accent;
     intermediate tones preserve the same hierarchy in both schemes. */
  --bg: light-dark(#F7F2E8, #141312);
  --text: light-dark(#292524, #EEEAE2);
  --surface: color-mix(in srgb, var(--bg), var(--text) 5%);
  --surface-2: color-mix(in srgb, var(--bg), var(--text) 9%);
  --mat: var(--surface);
  --border: color-mix(in srgb, var(--bg), var(--text) 15%);
  --border-strong: color-mix(in srgb, var(--bg), var(--text) 30%);
  --text-2: color-mix(in srgb, var(--text) 92%, var(--bg));
  --muted: color-mix(in srgb, var(--text) 85%, var(--bg));
  --prose: var(--text);
  --accent: light-dark(#285B8F, #8AAFE0);
  --selection: color-mix(in srgb, var(--bg), var(--accent) 25%);

  --font-serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 0.625rem;
  --measure: 40rem;
  --edge: clamp(1.25rem, 5vw, 5rem);
}

/* ------------------------------------------------------------------- base */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 2rem;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:is(h1, h2, h3, h4, p, ul, ol, dl, dd, figure) {
  margin: 0;
}

:is(ul, ol):where([class]) {
  padding: 0;
  list-style: none;
}

:is(img, svg) {
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--selection);
  color: var(--text);
}

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

/* Native anchor navigation leaves space above the destination. */
:is(:target, #content [id]) {
  scroll-margin-top: 2.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  z-index: 100;
  inset: 0.75rem auto auto 0.75rem;
  padding: 0.625rem 1rem;
  border-radius: var(--radius);
  background: var(--text);
  color: var(--bg);
  font-size: 0.875rem;
  transform: translateY(calc(-100% - 1rem));

  &:focus {
    transform: none;
  }
}

/* ------------------------------------------------------------------ shell */

/* The page header, content and footer share one reading column. */
.shell {
  display: flex;
  flex-direction: column;
  max-width: calc(var(--measure) + var(--edge) * 2);
  min-height: 100dvh;
  margin-inline: auto;
  padding-inline: var(--edge);
  padding-bottom: calc(2.5rem + env(safe-area-inset-bottom));
}

.sheet {
  display: contents;
}

.sheet-body {
  order: 1;
  padding-top: clamp(2.5rem, 9vh, 5.5rem);
}

.reader {
  order: 2;
  min-width: 0;
  margin-top: 3.5rem;
}

.content {
  width: 100%;

  &:focus {
    outline: none;
  }
}

.reader-foot {
  padding-top: 5rem;
  color: var(--muted);
  font-size: 0.75rem;
}

/* ----------------------------------------------------- primary navigation */

.primary-nav {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(0.5rem, 2vw, 1rem);
  margin-inline-start: auto;
}

.primary-nav-link {
  display: flex;
  align-items: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  color: var(--muted);
  font: 400 0.75rem/1.6 var(--font-mono);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.5rem;
  transition: color 150ms;

  &:hover,
  &[aria-current] {
    color: var(--accent);
    text-decoration-line: underline;
  }
}

/* Home pairs the introduction with project cards and compact writing rows. */
body[data-section="home"] {
  & .sheet-body {
    padding-top: clamp(3rem, 14vh, 8rem);
  }

  & .reader {
    margin-top: 0;
  }

  & .sheet-title {
    font-size: clamp(2.25rem, 1.8rem + 1.6vw, 2.875rem);
  }
}

/* Page changes cross-fade where the browser supports view transitions. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}

::view-transition-group(root) {
  animation-duration: 220ms;
}

/* ------------------------------------------------------------- left sheet */

/* Parent links share a baseline with the right-aligned section navigation. */
.sheet-nav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2.75rem;
  margin-bottom: 2.75rem;
}

.path {
  flex: 0 1 auto;
  min-width: 0;
  color: var(--muted);
  font: 400 0.75rem/1.6 var(--font-mono);

  & ol {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    list-style: none;
  }

  & li + li::before {
    content: "/";
    padding-inline: 0.5ch;
    color: var(--border-strong);
  }

  & a {
    overflow-wrap: anywhere;
  }

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

  & [aria-current] {
    color: var(--text);
  }
}

.sheet-title {
  color: var(--text);
  font: 500 clamp(1.875rem, 1.5rem + 1vw, 2.375rem)/1.12 var(--font-serif);
  letter-spacing: -0.012em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.sheet-lede {
  margin-top: 1rem;
  color: var(--text);
  font-size: 1.0625rem;
  line-height: 1.55;
  text-wrap: pretty;
}

/* Muted running text whose links carry the weight. */
:is(.sheet-text, .sheet-lede) {
  & a {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--border-strong);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 150ms, text-decoration-color 150ms;
  }

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

.sheet-text {
  display: grid;
  gap: 0.875rem;
  margin-top: 1.25rem;
  color: var(--text-2);
  font-size: 0.9375rem;
  line-height: 1.7;
  text-wrap: pretty;
}

.sheet-meta {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.8125rem;
}

.sheet-section {
  margin-top: 2.5rem;

  & > h2 {
    padding-bottom: 0.625rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
  }

  & > h2 a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

  & > h2 .arrow {
    flex: none;
    width: 1.125rem;
    height: 1.125rem;
    margin-right: 0.25rem;
    fill: none;
    stroke: var(--muted);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: translate 200ms, stroke 200ms;
  }

  & > h2 a:hover .arrow,
  & > h2 a:focus-visible .arrow {
    stroke: var(--accent);
    translate: 0.25rem 0;
  }
}

/* Hairline index rows: a name on the left, a quiet detail on the right. */
.rows {
  font-size: 0.875rem;
  line-height: 1.45;

  & .row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1.25rem;
    padding-block: 0.625rem;
    border-bottom: 1px solid var(--border);
  }

  & a.row {
    transition: color 150ms;
  }

  & a.row:hover .row-main {
    color: var(--accent);
  }

  & .row-main {
    min-width: 0;
    color: var(--text);
    overflow-wrap: break-word;
    transition: color 150ms;
  }

  & .row-aside {
    flex: 0 1 auto;
    max-width: 55%;
    color: var(--muted);
    text-align: right;
  }

  & time.row-aside {
    flex: none;
    white-space: nowrap;
  }
}

.rows.facts {
  margin-top: 1.75rem;
  border-top: 1px solid var(--border);

  & dt {
    flex: none;
    color: var(--muted);
  }

  & dd {
    color: var(--text);
    text-align: right;
  }
}

.content > .rows {
  border-top: 1px solid var(--border);
}

/* ---------------------------------------------------------------- projects */

/* The image fills the card. The 5:3 frame crops the 2:1 demo captures to
   their middle, dropping the page margins around the demo. */
.card {
  display: grid;
  align-content: start;
  gap: 0.625rem;

  &:hover .card-frame {
    border-color: var(--border-strong);
  }

  &:hover .card-frame img {
    transform: scale(1.03);
  }

  &:hover .card-name {
    color: var(--accent);
  }
}

.card-frame {
  display: block;
  aspect-ratio: 5 / 3;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  background: var(--mat);
  transition: border-color 200ms;

  & img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 400ms cubic-bezier(0.2, 0.7, 0.2, 1);
  }
}

.card-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.125rem 0.75rem;
}

.card-name {
  color: var(--text);
  font: 500 1.125rem/1.3 var(--font-serif);
  transition: color 150ms;
}

.card-status {
  color: var(--muted);
  font-size: 0.75rem;
}

.card-summary {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  color: var(--text-2);
  font-size: 0.875rem;
  line-height: 1.55;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: 2.5rem 1.5rem;
}

/* Home uses the same cards in a native, horizontally scrolling strip. */
.card-strip {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  padding: 0.25rem 0 0.75rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;

  & > li {
    flex: 0 0 calc((100% - 2rem) / 2.4);
    min-width: 12rem;
    scroll-snap-align: start;
  }
}

.project-page {
  display: grid;
  gap: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.reader:has(.project-page) {
  margin-top: 2.5rem;
}

.page-foot {
  display: grid;
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.project-page .page-foot .facts {
  margin-top: 0;
  border-top: 0;
  font-size: 0.8125rem;

  & dd a {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--border-strong);
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
  }

  & dd a:hover {
    color: var(--accent);
  }
}

/* Articles open like a letter, with the original two-line drop cap. */
.post .prose > p:first-of-type::first-letter {
  float: left;
  margin: 0.1em 0.08em 0 0;
  color: var(--text);
  font: 500 3.05em/0.8 var(--font-serif);
}

@supports (initial-letter: 2) {
  .post .prose > p:first-of-type::first-letter {
    float: none;
    margin: 0 0.1em 0 0;
    font-size: inherit;
    line-height: inherit;
    initial-letter: 2;
  }
}

/* ----------------------------------------------------------- reading prose */

.prose {
  min-width: 0;
  color: var(--prose);
  font: 400 1.125rem/1.75 var(--font-serif);
  overflow-wrap: break-word;

  & > * + * {
    margin-top: 1.25rem;
  }

  & :is(h2, h3, h4) {
    color: var(--text);
    font-weight: 500;
    line-height: 1.3;
    text-wrap: balance;
  }

  & h2 {
    margin-top: 2.75rem;
    font-size: 1.625rem;
    letter-spacing: -0.01em;
  }

  & h3 {
    margin-top: 2.25rem;
    font-size: 1.25rem;
  }

  & h4 {
    margin-top: 1.75rem;
    font-size: 1.0625rem;
  }

  & :is(h2, h3, h4) + * {
    margin-top: 0.875rem;
  }

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

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

  & :is(ul, ol) {
    padding-left: 1.5rem;
  }

  & li + li {
    margin-top: 0.5rem;
  }

  & img {
    display: block;
    margin-inline: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }

  /* Demos get a little more room than prose: they overhang the column by
     2rem a side. 100vw counts the scrollbar, hence the extra margin. */
  & .demo {
    --demo-width: min(44rem, 100vw - 3rem);
    width: var(--demo-width);
    margin-inline: calc((100% - var(--demo-width)) / 2);
    margin-block: 2.5rem;
  }

  /* System pipeline: steps flow downward, then sideways once the page is wide
     enough. Widened past the column like demos. */
  & .pipeline {
    --pipeline-width: min(52rem, 100vw - 3rem);
    width: var(--pipeline-width);
    margin-inline: calc((100% - var(--pipeline-width)) / 2);
    margin-block: 2.5rem;

    & ol {
      display: grid;
      gap: 1.5rem;
      margin: 0;
      padding: 0;
      list-style: none;
    }

    & ol > li {
      position: relative;
      margin: 0;
      padding: 0;
    }

    & ol > li:not(:last-child)::after {
      content: "↓";
      position: absolute;
      bottom: -1.5rem;
      left: 50%;
      translate: -50% 0;
      color: var(--muted);
      line-height: 1.5rem;
    }

    & .pipeline-branch {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0.75rem;
    }

    & .pipeline-step {
      display: flex;
      flex-direction: column;
      gap: 0.2rem;
      padding: 0.75rem 0.875rem;
      border: 1px solid var(--border-strong);
      border-radius: var(--radius);
      background: var(--surface);
      font-size: 0.8125rem;
      line-height: 1.45;
    }

    /* The fallback outcome is drawn lighter than the main path. */
    & .pipeline-branch > .pipeline-step:last-child {
      border-style: dashed;
      background: none;
    }

    & .pipeline-label {
      color: var(--accent);
      font-size: 0.75rem;
      font-weight: 600;
    }

    & .pipeline-name {
      color: var(--text);
      font-weight: 600;
    }

    & .pipeline-tool {
      color: var(--text-2);
    }

    & .pipeline-stat {
      margin-top: auto;
      padding-top: 0.35rem;
      color: var(--muted);
      font: 400 0.75rem/1.5 var(--font-mono);
    }

    @media (min-width: 60rem) {
      & ol {
        grid-auto-columns: 1fr;
        grid-auto-flow: column;
        gap: 1.25rem;
        /* Single steps keep their own height beside the taller branch. */
        align-items: center;
      }

      & ol > li:not(:last-child)::after {
        content: "→";
        top: 50%;
        right: -1.25rem;
        bottom: auto;
        left: auto;
        width: 1.25rem;
        translate: 0 -50%;
        text-align: center;
      }

      & .pipeline-branch {
        grid-template-columns: 1fr;
      }
    }
  }

  & figure {
    margin-block: 1.75rem;
  }

  & figcaption {
    margin-top: 0.75rem;
    color: var(--muted);
    text-align: center;
    font-size: 0.75rem;
    line-height: 1.7;
  }

  & table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: 0.8125rem;
    line-height: 1.7;
  }

  & :is(th, td) {
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border-strong);
    text-align: left;
    vertical-align: top;
  }

  & th {
    background: var(--surface-2);
    color: var(--text);
    font-weight: 600;
  }

  & code {
    padding: 0.15em 0.35em;
    border-radius: 0.25rem;
    background: var(--surface-2);
    color: var(--accent);
    font: 400 0.8em/1.6 var(--font-mono);
    overflow-wrap: anywhere;
  }
}

/* -------------------------------------------------------------------- CV */

.prose {
  & h4:has(.when) {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.25rem 1rem;
    margin-top: 1.75rem;
    font: 600 1rem/1.45 var(--font-sans);
    letter-spacing: 0;
  }

  & .when {
    color: var(--muted);
    font: 400 0.875rem/1.45 var(--font-sans);
    white-space: nowrap;
  }

  & .cv-meta {
    color: var(--muted);
    font: 400 0.9375rem/1.6 var(--font-sans);
  }

  & :is(h3, h4) + .cv-meta {
    margin-top: 0.25rem;
  }
}

/* The complete consulting list opens in place; individual entries stay
   compact until their descriptions are requested. Native details needs no JS. */
.engagements {
  margin-top: 2rem;
  border-block: 1px solid var(--border);
  font: 400 0.9375rem/1.55 var(--font-sans);

  & summary {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    min-height: 2.75rem;
    cursor: pointer;
    list-style: none;

    &::-webkit-details-marker {
      display: none;
    }

    &::after {
      content: "+";
      flex: none;
      color: var(--muted);
    }
  }

  & > summary {
    align-items: center;
    padding-block: 0.875rem;
    color: var(--text);
    font-weight: 500;
  }

  & > summary .count {
    margin-left: auto;
    color: var(--muted);
    font-weight: 400;
  }

  & > summary:hover {
    color: var(--accent);
  }

  & ul {
    padding: 0;
    list-style: none;
  }

  & li + li {
    margin-top: 0;
  }
}

.engagements[open] > summary::after,
.engagement[open] > summary::after {
  content: "−";
}

/* Method notes fold the caveats behind a result; same affordance as the
   engagement list, but the body keeps prose lists and tables. */
.method-notes {
  border-block: 1px solid var(--border);

  & > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 2.75rem;
    padding-block: 0.875rem;
    color: var(--text);
    font: 500 0.9375rem/1.55 var(--font-sans);
    cursor: pointer;
    list-style: none;

    &::-webkit-details-marker {
      display: none;
    }

    &::after {
      content: "+";
      flex: none;
      color: var(--muted);
      font-weight: 400;
    }

    &:hover {
      color: var(--accent);
    }
  }

  &[open] > summary::after {
    content: "−";
  }
}

.method-notes-body {
  padding-bottom: 1.5rem;
  font-size: 1rem;

  & > * + * {
    margin-top: 1rem;
  }
}

.engagement-group {
  margin-block: 0.75rem 1.5rem;
}

.prose .engagement-label {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font: 500 0.75rem/1.6 var(--font-sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.engagement {
  border-bottom: 1px solid var(--border);

  & > summary {
    align-items: baseline;
    padding-block: 0.5rem;
  }

  & > summary .name {
    min-width: 0;
    color: var(--text);
    overflow-wrap: anywhere;
  }

  & > summary .when {
    max-width: 45%;
    margin-left: auto;
    text-align: right;
    font-size: 0.8125rem;
  }

  & > summary:hover .name {
    color: var(--accent);
  }
}

.engagement-body {
  display: grid;
  gap: 0.5rem;
  padding: 0.25rem 0 1rem;
  color: var(--text-2);

  & .cv-meta {
    font-size: 0.8125rem;
  }
}

/* ----------------------------------------------------------------- narrow */

@media (width <= 30rem) {
  .rows .row-aside {
    max-width: 45%;
  }

  .prose .when {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after,
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
