/* QSymbolic LLC — site styles */
:root {
  --paper: #EDF0F1;
  --surface: #F7F9F9;
  --ink: #0F1720;
  --slate: #465261;
  --rule: #C8D0D5;
  --accent: #1E4B8F;
  --accent-dark: #15356A;
  --dark: #0F1720;
  --dark-text: #E6EAED;
  --dark-muted: #AAB5BF;
  --dark-link: #9DB7E6;
  --dark-rule: #2C3743;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", "Helvetica Neue", Helvetica, sans-serif;
  --mono: "IBM Plex Mono", Menlo, Consolas, monospace;

  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --section: clamp(72px, 10vw, 128px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.mono { font-family: var(--mono); font-size: 0.9em; overflow-wrap: anywhere; }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100;
}
.skip:focus { left: 8px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  border-radius: 3px; font-weight: 500; font-size: 16px; text-decoration: none;
  border: 1px solid transparent;
}
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(237, 240, 241, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-name { font-family: var(--serif); font-size: 24px; font-weight: 500; }
.brand-llc { font-size: 13px; color: var(--slate); letter-spacing: 0.04em; }
.site-nav { display: flex; align-items: center; gap: 32px; font-size: 15px; }
.site-nav a:not(.btn) { color: var(--ink); text-decoration: none; }
.site-nav a:not(.btn):hover { color: var(--accent); }
.nav-toggle {
  display: none; width: 44px; height: 44px;
  align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--rule); border-radius: 3px; color: var(--ink); cursor: pointer;
}

/* Hero */
.hero { padding: clamp(56px, 9vw, 112px) 0 var(--section); border-bottom: 1px solid var(--rule); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 80px); align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 26px; }
.kicker { color: var(--accent); font-weight: 500; font-size: 15px; }
.hero h1 { font-size: clamp(44px, 6.4vw, 80px); line-height: 1.02; letter-spacing: -0.025em; }
.lede { font-size: clamp(18px, 1.6vw, 20px); line-height: 1.6; color: var(--slate); max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; padding-top: 6px; }

.scope { margin: 0; padding: 28px; background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; }
.scope-plot { display: block; width: 100%; height: auto; overflow: visible; }
.scope-plot .grid path { stroke: #D3DADE; stroke-width: 1; fill: none; }
.scope-plot .wave { fill: none; stroke-width: 2.2; }
.scope-plot .wave-a { stroke: var(--ink); }
.scope-plot .wave-b { stroke: var(--accent); }
.scope-plot .wave-b-group { transform: translateX(24px); animation: lock 1.8s cubic-bezier(.2,.7,.2,1) both; }
.scope-plot .bracket path { stroke: var(--accent); stroke-width: 1.5; fill: none; }
.scope-plot text { font-family: var(--mono); font-size: 14px; fill: var(--ink); }
.scope-plot .tag-b { fill: var(--accent); }
.scope-plot .bracket { animation: appear .6s ease 1.5s both; }
.scope figcaption { margin-top: 16px; font-size: 15px; color: var(--slate); }

@keyframes lock { from { transform: translateX(96px); } to { transform: translateX(24px); } }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }

/* Sections */
.section { padding: var(--section) 0; border-bottom: 1px solid var(--rule); }
.section h2 { font-size: clamp(34px, 4.2vw, 52px); line-height: 1.08; }
.section-head { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; align-items: end; margin-bottom: 56px; }
.section-head p { color: var(--slate); max-width: 28em; }
.section-head-row { grid-template-columns: 1fr auto; }

.pillars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.pillar { padding: 40px 40px 44px 0; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 14px; }
.pillar:nth-child(even) { padding: 40px 0 44px 40px; border-left: 1px solid var(--rule); }
.pillar h3 { font-size: 29px; line-height: 1.2; font-weight: 500; }
.pillar p { color: var(--slate); max-width: 32em; }

.table-scroll { overflow-x: auto; }
.ip-table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 18px; }
.ip-table th {
  text-align: left; font-weight: 500; font-size: 14px; color: var(--slate);
  padding: 16px 24px 16px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule);
}
.ip-table td { padding: 26px 24px 26px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.ip-table td:first-child { font-weight: 500; width: 42%; }
.note { margin-top: 28px; color: var(--slate); font-size: 15px; }

.profile-links { display: flex; gap: 28px; font-size: 16px; }
.papers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.paper { background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; padding: 36px; display: flex; flex-direction: column; gap: 14px; }
.paper-meta { font-size: 14px; color: var(--slate); }
.paper h3 { font-size: 26px; line-height: 1.25; font-weight: 500; }
.paper p:not(.paper-meta) { color: var(--slate); font-size: 16px; }
.paper a { margin-top: auto; font-size: 14px; }

.section-dark { background: var(--dark); color: var(--dark-text); border-bottom: 0; }
.section-dark a { color: var(--dark-link); }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 6vw, 80px); align-items: start; }
.lede-sm { margin-top: 20px; color: var(--dark-muted); max-width: 30em; }
.facts { margin: 0; border-top: 1px solid var(--dark-rule); }
.facts div { padding: 22px 0; border-bottom: 1px solid var(--dark-rule); }
.facts dt { font-size: 19px; font-weight: 500; }
.facts dd { margin: 4px 0 0; color: var(--dark-muted); font-size: 15px; }

.prose { display: flex; flex-direction: column; gap: 20px; color: var(--slate); max-width: 36em; }
.contact { border-bottom: 0; }
.email-line { color: var(--ink); }

.site-footer { background: var(--dark); color: var(--dark-muted); font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding-top: 40px; padding-bottom: 40px; }
.footer-links { display: flex; gap: 24px; }
.site-footer a { color: var(--dark-link); }

/* Responsive */
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule); padding: 8px var(--gutter) 20px;
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--rule); }
  .site-nav .btn { margin-top: 16px; }
  .hero-grid, .split, .section-head, .section-head-row { grid-template-columns: 1fr; }
  .section-head { gap: 20px; margin-bottom: 40px; }
}
@media (max-width: 720px) {
  .pillars, .papers { grid-template-columns: 1fr; }
  .pillar, .pillar:nth-child(even) { padding: 32px 0; border-left: 0; }
  .paper { padding: 26px; }
  .scope { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scope-plot .wave-b-group, .scope-plot .bracket { animation: none; }
}
