/* custom.css — project-specific styles extending libre.css */

/* Canvas wrapper */
.canvas-wrapper {
  border: 2px solid var(--border);
  border-radius: 4px;
  background: var(--bg-surface);
  max-width: 100%;
  overflow: hidden;
}

.canvas-wrapper canvas {
  display: block;
  width: 100%;
  height: auto;
}

/* Dark mode accent color for canvas drawing */
@media (prefers-color-scheme: dark) {
  :root {
    --accent: #6db3d8;
  }
}

@media (prefers-color-scheme: light) {
  :root {
    --accent: #1a5276;
  }
}

/* Site title in the header — a link, not the page heading */
.site-title {
  font-family: "DejaVu Sans", "Liberation Sans", Helvetica, sans-serif;
  font-size: 1.5rem;
  font-weight: bold;
  line-height: 1.25;
  margin: 0;
}

.site-title a {
  text-decoration: none;
}

.site-title a:hover {
  text-decoration: underline;
}

/* Landing page */
.landing-header {
  margin-bottom: 2rem;
}

.landing-name {
  margin-bottom: 0.25rem;
}

.landing-role {
  font-weight: bold;
}

.landing-location {
  color: var(--fg-muted);
}

.landing-contact {
  margin: 0.75rem 0 0;
}

.landing-summary {
  margin-bottom: 1rem;
}

.landing-pitch {
  color: var(--fg-muted);
  margin-bottom: 2rem;
}

.landing-writing {
  margin-bottom: 1rem;
}

/* CV landing page */
.cv-header {
  margin-bottom: 2rem;
}

.cv-name {
  margin-bottom: 0.25rem;
}

.cv-role {
  font-weight: bold;
}

.cv-location {
  color: var(--fg-muted);
}

.cv-contact {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0.75rem 0;
}

.cv-actions {
  margin: 0.75rem 0 0;
}

.cv-download {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-surface);
  text-decoration: none;
}

.cv-summary {
  margin-bottom: 2rem;
}

.cv-note {
  color: var(--fg-muted);
  margin-bottom: 2rem;
}

.cv-entry {
  margin-bottom: 1.5rem;
}

.cv-entry h3 {
  margin-bottom: 0.15rem;
}

.cv-entry-meta {
  color: var(--fg-muted);
  margin-bottom: 0.5rem;
}

.cv-entry-note {
  color: var(--fg-muted);
}

.cv-links {
  list-style: none;
  padding: 0;
}

.cv-links li {
  margin: 0.25rem 0;
}

.cv-skill-group h3 {
  margin-bottom: 0.15rem;
}

.cv-skill-group p {
  color: var(--fg-muted);
}

.cv-recognition li {
  margin: 0.25rem 0;
}

.cv-writing {
  margin-bottom: 0.75rem;
}

.cv-more {
  color: var(--fg-muted);
}

/* DOI links */
.doi {
  font-family: ui-monospace, "SFMono-Regular", "Liberation Mono", monospace;
  font-size: 0.9em;
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 1px dotted var(--link);
}

.doi:hover,
.doi:focus {
  background: var(--code-bg);
}

.doi-prefix {
  color: var(--fg-muted);
}

/* Post lead and aside notes */
.lead {
  font-size: 1.1rem;
  line-height: 1.5;
  border-left: 3px solid var(--border);
  padding-left: 0.9rem;
  margin-bottom: 0.75rem;
}

.note {
  color: var(--fg-muted);
  font-style: italic;
  margin-bottom: 2rem;
}

/* Linkdump entries */
.paper {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 1rem;
  margin: 0.75rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.paper-title {
  font-weight: bold;
}

.paper-title p {
  margin: 0;
}

.paper-venue {
  grid-column: 1;
  color: var(--fg-muted);
  font-size: 0.9em;
}

.paper-links {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  justify-content: flex-end;
}

.paper-note {
  grid-column: 1 / -1;
  margin-top: 0.2rem;
}

.paper-note p {
  margin: 0;
}

.paper-link {
  font-family: ui-monospace, "SFMono-Regular", "Liberation Mono", monospace;
  font-size: 0.72rem;
  line-height: 1.5;
  padding: 0.1em 0.45em;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--fg-muted);
  text-decoration: none;
  white-space: nowrap;
}

.paper-link:hover,
.paper-link:focus {
  background: var(--code-bg);
  color: var(--link);
}

.paper-link-arxiv {
  color: var(--link);
}

.paper-link-github {
  color: var(--link);
}

/* Standalone badge row, outside a paper card */
.paper-link-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.35rem 0;
}

@media (max-width: 32rem) {
  .paper {
    grid-template-columns: 1fr;
  }

  .paper-links {
    grid-column: 1;
    grid-row: auto;
    justify-content: flex-start;
  }
}

/* Series box minor tweaks */
.series-box {
  margin: 2rem 0;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-surface);
}

.series-title {
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.series-toc {
  margin: 0;
  padding-left: 1.5rem;
}

.series-toc li {
  margin: 0.25rem 0;
}

.series-current {
  font-weight: bold;
}