/* ===========================================================================
   Site-wide theme — me.yodamad.fr
   Loaded after the vendored Neoteroi stylesheets, so equal-specificity
   selectors here win. The vendored files are never edited.

   Note on variable-font axes: only "wdth" is ever set through
   font-variation-settings. "wght" is left to font-weight so that <strong>,
   headings and Material's own weights keep working.
   =========================================================================== */

body {
  font-variation-settings: "wdth" 100;
}

/* --- Type scale ---------------------------------------------------------- */

.md-typeset {
  line-height: 1.65;
}

/* 68ch measure for top-level prose only, so cards, tables and admonitions
   keep their own widths. */
.md-typeset > p,
.md-typeset > ul,
.md-typeset > ol {
  max-width: var(--measure);
}

.md-typeset h1 {
  font-variation-settings: "wdth" 108;
  font-weight: 800;
  font-size: 2.1em;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--md-default-fg-color);
  margin-bottom: 1.2rem;
}

.md-typeset h2 {
  font-variation-settings: "wdth" 104;
  font-weight: 700;
  font-size: 1.45em;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-top: 2.2em;
}

.md-typeset h3 {
  font-variation-settings: "wdth" 102;
  font-weight: 650;
  font-size: 1.15em;
  letter-spacing: -0.005em;
}

/* --- Links --------------------------------------------------------------- */

.md-typeset a {
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: text-decoration-color 120ms;
}

.md-typeset a:hover,
.md-typeset a:focus-visible {
  text-decoration-color: currentcolor;
}

/* Badge rows and video thumbnails are links wrapping an image. */
.md-typeset a:has(img),
.md-typeset a.headerlink {
  text-decoration: none;
}

/* --- Focus ---------------------------------------------------------------
   --signal is marigold on dark, a darker amber on paper, so the ring clears
   3:1 against both grounds. */

:where(a, button, input, select, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
  border-radius: 2px;
}

/* --- Header -------------------------------------------------------------- */

.md-header {
  box-shadow: none;
  border-bottom: 1px solid rgba(234, 242, 232, 0.12);
}

.md-header__title {
  font-variation-settings: "wdth" 96;
  font-weight: 650;
}

.md-header__button.md-logo {
  margin: 0.2rem;
  padding: 0.2rem;
}

.md-header__button.md-logo img {
  height: 1.8rem;
  width: 1.8rem;
  border-radius: 50%;
  object-fit: cover;
}

/* --- Footer -------------------------------------------------------------- */

.md-footer__link {
  margin-top: 0.05rem;
  margin-bottom: 0.05rem;
}

.md-footer__title {
  font-variation-settings: "wdth" 96;
  margin-bottom: 0.1rem;
}

.md-copyright {
  display: inline;
  text-align: center;
}

.md-copyright__highlight {
  display: inline;
  margin-right: 0.5rem;
}

.md-footer-meta {
  background-color: var(--scene-well);
  display: flex;
  align-items: center;
}

/* --- Admonitions ---------------------------------------------------------
   The generated /articles/ and /others/side_projects/ pages are built almost
   entirely from admonitions, so this is where most of the site picks up the
   new look. Padding is deliberately left to Material to avoid two rules
   fighting over the same vertical rhythm. */

.md-typeset .admonition,
.md-typeset details {
  border: none;
  border-left: 2px solid var(--moss);
  border-radius: 0;
  box-shadow: none;
  background: var(--md-default-fg-color--lightest);
  font-size: 0.72rem;
}

.md-typeset .admonition > .admonition-title,
.md-typeset details > summary {
  background: transparent;
  font-weight: 650;
}

.md-typeset .admonition > .admonition-title::before,
.md-typeset details > summary::before {
  background-color: var(--moss);
}

.md-typeset .admonition.tip,
.md-typeset details.tip {
  border-left-color: var(--marigold);
}

.md-typeset .tip > .admonition-title::before,
.md-typeset .tip > summary::before {
  background-color: var(--marigold);
}

.md-typeset .admonition.abstract,
.md-typeset details.abstract {
  border-left-color: var(--link);
}

.md-typeset .abstract > .admonition-title::before,
.md-typeset .abstract > summary::before {
  background-color: var(--link);
}

/* Admonition titles carrying only a date / read-time read as metadata. */
.md-typeset .info > .admonition-title {
  color: var(--md-default-fg-color--light);
  font-weight: 400;
}

/* --- Neoteroi timeline ---------------------------------------------------
   The vendored stylesheet hardcodes pink (#fc466b) and blue (#3f5efb)
   gradients that clash with the palette. Re-tinted here. The talks pages
   render as `.nt-timeline.vertical.left`; `.center` is covered as insurance. */

.nt-timeline.vertical.left .nt-timeline-before {
  background: linear-gradient(rgba(94, 140, 106, 0) 0%, var(--moss) 100%) no-repeat 30px/2px 100%;
}

.nt-timeline.vertical.left .nt-timeline-after {
  background: linear-gradient(var(--moss) 0%, rgba(94, 140, 106, 0) 100%) no-repeat 30px/2px 100%;
}

.nt-timeline.vertical.left .nt-timeline-items {
  background: linear-gradient(var(--moss), var(--moss)) no-repeat 30px/2px 100%;
}

.nt-timeline.vertical.center .nt-timeline-before {
  background: linear-gradient(rgba(94, 140, 106, 0) 0%, var(--moss) 100%) no-repeat center/2px 100%;
}

.nt-timeline.vertical.center .nt-timeline-after {
  background: linear-gradient(var(--moss) 0%, rgba(94, 140, 106, 0) 100%) no-repeat center/2px 100%;
}

.nt-timeline.vertical.center .nt-timeline-items {
  background: linear-gradient(var(--moss), var(--moss)) no-repeat center/2px 100%;
}

.md-typeset .nt-timeline-dot {
  background-color: var(--scene-deep);
  border: 2px solid var(--marigold);
  box-shadow: none;
}

.md-typeset .nt-timeline-dot .icon {
  color: var(--marigold);
}

/* The date column: condensed, tabular, so dates align down the page. */
[data-md-color-scheme] .nt-timeline-sub-title {
  color: var(--signal);
  font-variation-settings: "wdth" 84;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.md-typeset .nt-timeline-title {
  font-variation-settings: "wdth" 102;
  font-weight: 650;
  font-size: 1.05em;
  line-height: 1.25;
}

/* ===========================================================================
   The gig list — a speaker's year as dated stops.
   Shared by /talks/, the per-year archives and the homepage hero, so it lives
   here rather than in home.css.
   =========================================================================== */

.md-typeset .gigs {
  list-style: none;
  margin: 1.2rem 0 0;
  padding: 0;
  /* overrides the 68ch measure set on top-level lists */
  max-width: none;
}

.md-typeset .gig {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 0 1.3rem;
  margin: 0;
  padding: 0.8rem 0;
  border-top: 1px solid var(--rule);
}

.md-typeset .gig:last-child {
  border-bottom: 1px solid var(--rule);
}

/* `hidden` alone cannot beat `display: grid`. */
.md-typeset .gig[hidden],
.gig-year[hidden] {
  display: none;
}

.md-typeset .gig__date {
  display: flex;
  flex-direction: column;
  font-variation-settings: "wdth" 82;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.12;
  font-variant-numeric: tabular-nums;
  color: var(--signal);
  white-space: nowrap;
}

.md-typeset .gig__year {
  font-size: 0.58em;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

.md-typeset .gig__body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.md-typeset .gig__title {
  font-variation-settings: "wdth" 102;
  font-weight: 650;
  font-size: 0.86rem;
  line-height: 1.3;
}

.md-typeset .gig__meta,
.md-typeset .gig__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 1.1rem;
  font-size: 0.68rem;
  color: var(--md-default-fg-color--light);
}

.md-typeset .gig__event {
  font-weight: 650;
  color: var(--md-default-fg-color);
}

/* --- Filter ------------------------------------------------------------- */

.md-typeset .gig-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.9rem 1.5rem;
  margin: 1.6rem 0 0;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--rule);
}

.md-typeset .gig-filter__field {
  display: flex;
  flex: 1 1 13rem;
  flex-direction: column;
  gap: 0.3rem;
}

.md-typeset .gig-filter__field > span {
  font-size: 0.62rem;
  letter-spacing: 0.02em;
  color: var(--md-default-fg-color--light);
}

.md-typeset .gig-filter__field input {
  font: inherit;
  font-size: 0.78rem;
  padding: 0.42rem 0.6rem;
  color: var(--md-default-fg-color);
  background: var(--md-default-fg-color--lightest);
  /* --edge, not --rule: an input's border identifies the control, so it
     needs 3:1 rather than the hairline used between list rows. */
  border: 1px solid var(--edge);
  border-radius: 2px;
}

.md-typeset .gig-filter__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.md-typeset .chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 650;
  padding: 0.34rem 0.65rem;
  color: var(--md-default-fg-color--light);
  background: none;
  border: 1px solid var(--edge);
  border-radius: 999px;
  cursor: pointer;
}

.md-typeset .chip__n {
  font-size: 0.85em;
  font-variant-numeric: tabular-nums;
  opacity: 0.65;
}

/* Marigold as a fill, with --scene on top: 7.5:1 in both schemes. */
.md-typeset .chip[aria-pressed="true"] {
  color: var(--scene);
  background: var(--marigold);
  border-color: var(--marigold);
}

.md-typeset .chip[aria-pressed="true"] .chip__n {
  opacity: 0.8;
}

.md-typeset .gig-filter__count {
  margin: 0;
  font-size: 0.66rem;
  font-variant-numeric: tabular-nums;
  color: var(--md-default-fg-color--light);
}

.md-typeset .gig-empty {
  margin-top: 1.4rem;
  font-size: 0.78rem;
  color: var(--md-default-fg-color--light);
}

.md-typeset .gig-year > h2 {
  margin-top: 2rem;
  font-variation-settings: "wdth" 86;
  font-size: 1.1em;
  letter-spacing: 0.04em;
  color: var(--md-default-fg-color--light);
}

@media screen and (max-width: 29.9375em) {
  .md-typeset .gig {
    grid-template-columns: 3.6rem 1fr;
    gap: 0 0.9rem;
  }

  .md-typeset .gig__date {
    font-size: 0.92rem;
  }
}

/* ===========================================================================
   Speaker kit
   =========================================================================== */

/* `.md-typeset ul:not([hidden])` sets `display: flow-root`, so the selector
   has to outrank it or the figures stack one per line. */
.md-typeset ul.stats:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 1.8rem;
  row-gap: 0.5rem;
  list-style: none;
  margin: 1.2rem 0 1.8rem;
  padding: 0.6rem 0;
  max-width: none;
  border-top: 2px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.md-typeset .stats li {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin: 0;
}

.md-typeset .stat__n {
  font-variation-settings: "wdth" 104;
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--signal);
}

.md-typeset .stat__l {
  font-size: 0.66rem;
  line-height: 1.2;
  color: var(--md-default-fg-color--light);
}

.md-typeset .speaker-photo {
  width: 100%;
  max-width: 17rem;
  height: auto;
  float: right;
  margin: 0 0 1rem 1.4rem;
}

@media screen and (max-width: 29.9375em) {
  .md-typeset .speaker-photo {
    float: none;
    margin: 0 0 1rem;
  }
}

/* The repertoire: one row per talk on offer, with how often it was given. */
.md-typeset .reps {
  list-style: none;
  margin: 1.2rem 0 0;
  padding: 0;
  max-width: none;
}

.md-typeset .rep {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0;
  padding: 0.7rem 0;
  border-top: 1px solid var(--rule);
}

.md-typeset .rep:last-child {
  border-bottom: 1px solid var(--rule);
}

.md-typeset .rep__title {
  font-variation-settings: "wdth" 102;
  font-weight: 650;
  font-size: 0.86rem;
  line-height: 1.3;
}

.md-typeset .rep__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 1rem;
  font-size: 0.68rem;
  color: var(--md-default-fg-color--light);
}

.md-typeset .rep__count {
  color: var(--signal);
  font-weight: 600;
}

.md-typeset .rep__venues {
  font-size: 0.66rem;
  color: var(--ink-faint);
}

/* --- Embeds -------------------------------------------------------------
   The podcast page hand-pastes iframes with width="560", which overflows
   below ~600px. */

.md-typeset iframe {
  max-width: 100%;
}

.md-typeset .video-container,
.md-typeset .mkdocs-video-wrapper {
  max-width: 100%;
}
