/* css/page-style.css: the site's page look (STYLE.md, Page Structure).
   White ground, hairlines, one accent (#990000), and the Apollonian gasket fixed behind the page.
   Link it after css/common.css. A page opts into the background by placing
     <div class="bg-gasket" aria-hidden="true"><img src="images/gasket.svg" alt="" decoding="async"></div>
   as the first element of <body>, ahead of the navbar and the .container; images/gasket.svg and images/gasket-mark.svg come from scripts/gen_gasket.py.
   Rules marked !important override Bootstrap utilities or the hover colours in css/common.css. */

body { color: #222; position: relative; }
a {
  text-decoration-thickness: 1px; text-underline-offset: 2px;
  text-decoration-color: rgba(43, 85, 151, 0.35);
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
a:hover { text-decoration-color: currentColor; }
::selection { background: rgba(153, 0, 0, 0.14); }
hr { border-color: rgba(0, 0, 0, 0.12); opacity: 1; }

h2[id] {
  color: #990000; font-size: 1.7rem; font-weight: 400; letter-spacing: -0.005em;
  border-bottom: 1px solid rgba(153, 0, 0, 0.30); padding-bottom: 9px; margin: 46px 0 18px 0;
}
/* the heading mark draws the four circles that generate the background gasket */
h2[id]::before {
  content: ""; display: inline-block; width: 0.78em; height: 0.78em; margin-right: 0.42em;
  vertical-align: -0.04em; background: url(../images/gasket-mark.svg) center / contain no-repeat;
}

.alert.alert-warning {
  background: transparent; border: 0; border-left: 2px solid rgba(0, 0, 0, 0.12); border-radius: 0;
  color: #6b6b6b; padding-left: 16px !important;
}
ul.vert { list-style: none; padding-left: 1.25em; }
ul.vert > li { position: relative; margin-bottom: 0.2rem; }
ul.vert > li::before {
  content: ""; position: absolute; left: -1.05em; top: 0.6em; width: 0.42em; height: 0.42em;
  border: 1.5px solid rgba(153, 0, 0, 0.55); border-radius: 50%;
}
/* disclosure chevrons in the accent; !important outranks the hover colours in css/common.css */
details.smart-details > summary::before { border-color: rgba(153, 0, 0, 0.55) !important; border-width: 0 1.5px 1.5px 0 !important; }

/* gasket layer, fixed to the viewport behind the page (images/gasket.svg, from scripts/gen_gasket.py) */
.bg-gasket { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: -1; }
.bg-gasket img {
  position: absolute; display: block; width: max(118vw, 118vh); height: max(118vw, 118vh);
  right: -22vw; top: -18vh; opacity: 0.10;
}
@media (max-width: 767.98px) {
  .bg-gasket img { width: 190vw; height: 190vw; right: -95vw; top: -10vh; }
}
/* a feathered white wash under the main column keeps the text clear; sidebar lines get a halo */
.bg-gasket ~ .container .col-md-9.content-spacing { position: relative; }
.bg-gasket ~ .container .col-md-9.content-spacing::before {
  content: ""; position: absolute; z-index: -1; top: -24px; bottom: -24px; left: -36px; right: 0;
  background: rgba(255, 255, 255, 0.55);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 48px, #000 calc(100% - 48px), transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 48px, #000 calc(100% - 48px), transparent 100%);
}
.bg-gasket ~ .container #sidebar, .bg-gasket ~ .container .alert {
  text-shadow: 0 0 4px #fff, 0 0 8px #fff, 0 0 12px #fff;
}
@media (max-width: 991.98px) {
  .bg-gasket ~ .container .col-md-9.content-spacing::before { left: 0; right: 0; -webkit-mask-image: none; mask-image: none; }
}
/* ---- Shared page components (STYLE.md, Components). A page uses these classes instead of defining its own. ---- */
/* tagline under a page title: smaller and grey */
.pg-tag { margin: -4px 0 16px; font-size: 0.98rem; line-height: 1.45; color: #6a6a6a; }
/* callout: an accent hairline on the left, no fill; a leading <strong> takes the accent */
.pg-callout {
  border-left: 2px solid rgba(153, 0, 0, 0.30); padding: 4px 0 4px 16px; margin: 16px 0 14px;
  font-size: 0.95rem; line-height: 1.55; color: #444;
}
.pg-callout > strong:first-child { color: #990000; }
/* the star request on project pages: the same callout with a star icon */
.pg-callout-star { position: relative; padding-left: 44px; }
.pg-callout-star::before {
  content: "\f005"; position: absolute; left: 16px; top: 5px; font-family: "Font Awesome 6 Free"; font-weight: 900;
  font-style: normal; font-size: 1.05rem; line-height: 1.5; color: #990000; opacity: 0.8;
}
.bg-gasket ~ .container .pg-callout { text-shadow: 0 0 4px #fff, 0 0 8px #fff, 0 0 12px #fff; }
/* code panel: white, a hairline frame, no shadow */
.pg-code { background: #fff; border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 4px; padding: 12px 14px; }
/* caption under a figure or a table */
.pg-cap { font-size: 0.88rem; line-height: 1.45; color: #6a6a6a; }
/* venue tag after a paper's name, such as [EMNLP'26]: venue color, never wrapped */
.pg-venue { font-size: 0.72rem; color: #8a5a2a; white-space: nowrap; }
/* heading inside a section: item-name size, ink */
.pg-h3 { margin: 22px 0 4px; font-size: 1.12rem; font-weight: 700; line-height: 1.3; color: #1f1f1f; }
/* quiet section heading for pages of many short lists (Services, Teaching, Collaboration):
   an h2[id] at a smaller size and tighter spacing; the color, rule, and mark come from h2[id] */
.container h2.pg-sec { font-size: 1.3rem; line-height: 1.25; padding-bottom: 6px; margin: 24px 0 10px; }

@media (prefers-reduced-motion: reduce) { a { transition: none; } }
