/*
Theme Name: Quant Paper
Theme URI: https://lf0.com
Author: LF0
Author URI: https://lf0.com
Description: A sober editorial block theme for quantitative research, AI, and backtesting publications.
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: quant-paper
Tags: block-theme, full-site-editing, blog, portfolio, grid-layout
*/

:root {
  scroll-behavior: smooth;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.06em;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--wp--preset--color--accent);
  outline-offset: 3px;
}

.wp-site-blocks {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wp-site-blocks > main {
  flex: 1;
}

.quant-paper-site-header {
  border-bottom: 1px solid var(--wp--preset--color--border);
}

.quant-paper-site-header .wp-block-navigation {
  gap: clamp(0.75rem, 2vw, 1.35rem);
}

.quant-paper-site-header .wp-block-navigation a {
  text-decoration: none;
}

.quant-paper-meta-strip {
  border-top: 1px solid var(--wp--preset--color--border);
  border-bottom: 1px solid var(--wp--preset--color--border);
}

.quant-paper-meta-strip a {
  color: inherit;
}

.quant-paper-article {
  counter-reset: footnotes;
}

.quant-paper-article :where(p, li) {
  hanging-punctuation: first last;
}

.quant-paper-article :where(h2, h3, h4) {
  scroll-margin-top: 6rem;
}

.quant-paper-article :where(.wp-block-image, .wp-block-embed, .wp-block-table, .wp-block-code, pre) {
  margin-top: var(--wp--preset--spacing--50);
  margin-bottom: var(--wp--preset--spacing--50);
}

.wp-block-table {
  overflow-x: auto;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 6px;
}

.wp-block-table table {
  min-width: 720px;
  border-collapse: collapse;
  font-size: var(--wp--preset--font-size--small);
}

.wp-block-table th {
  background: var(--wp--preset--color--surface-alt);
  font-weight: 650;
  text-align: left;
}

.wp-block-table th,
.wp-block-table td {
  border: 1px solid var(--wp--preset--color--border);
  padding: 0.7rem 0.85rem;
  vertical-align: top;
}

.wp-block-code,
pre {
  overflow-x: auto;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 6px;
}

.wp-block-code code,
pre code {
  white-space: pre;
}

.wp-block-quote {
  border-left: 3px solid var(--wp--preset--color--accent);
  padding-left: var(--wp--preset--spacing--40);
}

.wp-block-pullquote {
  border-top: 1px solid var(--wp--preset--color--border);
  border-bottom: 1px solid var(--wp--preset--color--border);
}

.wp-block-image img,
.wp-block-post-featured-image img {
  border-radius: 6px;
}

.wp-block-footnotes {
  border-top: 1px solid var(--wp--preset--color--border);
  font-size: var(--wp--preset--font-size--small);
  margin-top: var(--wp--preset--spacing--70);
  padding-top: var(--wp--preset--spacing--40);
}

.quant-paper-card {
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 6px;
}

.quant-paper-table-wrapper {
  overflow-x: auto;
}

.quant-paper-table-wrapper table {
  min-width: 820px;
}

.quant-paper-kicker {
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .quant-paper-site-header .wp-block-group {
    align-items: flex-start;
  }

  .quant-paper-site-header .wp-block-navigation {
    width: 100%;
  }
}
