/* Basic typography */
body {
  font-family: system-ui, sans-serif;
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1rem;
  line-height: 1.6;
  color: #333;
  background: #fafafa;
}

.blog {
  max-width: 700px;
}

.about {
  max-width: 1000px;
}

body.full-screen {
  max-width: 90%;
}

a {
  color: #0066cc;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

header, footer {
  text-align: center;
  margin: 2rem 0;
  color: #555;
}

h1, h2, h3 {
  line-height: 1.3;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.meta {
  font-size: 0.875rem;
  color: #777;
}

video, img {
  max-width: 100%;
  height: auto;
  display: block;
}

.model-container {
  width: 100%;
}

model-viewer {
  width:100%;
  aspect-ratio: 1 / 1;
  height: auto;
}

.columns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 2%;
}

.columns > div {
  flex: 1;
  min-width: 100px;
  align-content: center;
  justify-content: center;
}

.columns img {
  max-width: 100%;
  height: auto;
  display: block;
}

.inline-img {
  display: inline;
  vertical-align: middle;
	max-height: 1.5em;
	width: auto;
  margin: 0 0.25em;
}

.columns figure {
  flex: 1;
  min-width: 150px;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.columns > .wide-column {
  flex: 1;
  min-width: 234px;
  align-content: center;
  justify-content: center;
}

.columns figure img {
  width: 100%;
  height: auto;
}

figure img {
  display: block;
  margin: 0 auto;
}

figcaption {
  font-size: 0.875rem;
  color: #555;
  margin-top: 0.5rem;
  line-height: 1.4;
  text-align: center;
}


table {
  width: 100%;
  border-collapse: collapse;
  /* margin: 1.5rem 0; */
  font-size: 0.95rem;
}

th, td {
  border: 1px solid #ddd;
  padding: 0.2rem 0.5rem;
  text-align: left;
}

th {
  background: #f0f0f0;
  font-weight: 600;
  color: #333;
}

tr:nth-child(even) {
  background: #fafafa;
}

tr:hover {
  background: #eee;
}

caption {
  caption-side: bottom;
  text-align: center;
  padding: 0.5rem;
  font-size: 0.875rem;
  color: #666;
}

table.cv {
  border-collapse: collapse;
  width: 100%;
}

table.cv td {
  border: none;
  padding: 0.25em 0;
}

table.cv td:nth-child(2) {
  vertical-align: top;
  text-align: right;
  white-space: nowrap;
}

table.cv th {
  text-align: center;
  font-weight: bold;
  font-size: 1em;
  padding-top: 0em;
  border: none;
}

svg.icon {
    width: 24px;
    height: 1.5rem;
    vertical-align: middle;
}

#coefficients-display {
  font-family: "SF Mono", "Menlo", "Monaco", "Consolas", monospace;
}

.app-container {
  flex-direction: column;
  display: flex;
  height: 100vh;
  width: 100%;
  margin: 0;
}

.box {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

/* Center YouTube embeds */
.video-container {
  display: flex;
  justify-content: center;
}

a.home-page-link {
  color: #000000;
  font-size: 3rem;
  text-transform: capitalize;
}

.header-columns {
  display: flex;
  justify-content: space-between; /* left-right alignment on wide screens */
  align-items: center;            /* vertical centering */
  flex-wrap: wrap;                /* allow stacking on small screens */
  padding: 0 1rem;
}

/* Default (mobile / stacked) */
.header-left,
.header-right {
  flex: 1 1 100%;     /* full width when stacked */
  text-align: center; /* center text when stacked */
}

/* Desktop / wider screens */
@media (min-width: 768px) {
  .header-left,
  .header-right {
    flex: 0 0 auto;   /* shrink to fit content horizontally */
  }

  .header-left {
    text-align: left;
  }

  .header-right {
    text-align: right;
  }
}

img.art-thumbnail {
  width: 300px;
  height: auto;
}

.bluesky-embed {
  display: block;
  margin: 0 auto;   /* centers it horizontally */
  text-align: center; /* centers inline text inside it */
}

/* Home page */
.hp-cols {
  width: min(1000px,100%);
  padding: 0;
  margin: 0 auto;
  display: flex;
  gap: 20px;
}

.hp-col-left {
  width: 333px;
  position: static;
  top: auto;
}

.hp-col-right {
  width: 667px;
  max-height: 80vh;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hp-col-right > * {
  flex: 0 0 auto;
}

@media (max-width: 767px) {
  .hp-cols {
    flex-direction: column;
    width: auto;
    padding: 20px;
  }

  .hp-col-left,
  .hp-col-right {
    width: 100%;
    max-height: none;
  }
}

.hp-button {
  background-color:#345;
  border-radius: 12px;
  flex: 1 1 200px;
  min-width: 200px;
  max-width: 400px;
  padding:1rem;
  display: grid;
  align-items: center;
  text-align: center;
}

.hp-button > a {
  color:white;
  font-size: 2rem;
}

.center {
  display: flex;
  justify-content: center; /* horizontal centering */
  align-items: center;    /* vertical centering */
}

#binary-tree-output {
  font-family:Menlo;
  line-height: 125%;
  font-size: 10px;
  padding: 0;
}

pre code {
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Copied from https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-tomorrow.css */
/**
 * prism.js tomorrow night eighties for JavaScript, CoffeeScript, CSS and HTML
 * Based on https://github.com/chriskempson/tomorrow-theme
 * @author Rose Pritchard
 */

code[class*="language-"],
pre[class*="language-"] {
	color: #ccc;
	background: none;
	font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
	font-size: 1em;
	text-align: left;
	white-space: pre;
	word-spacing: normal;
	word-break: normal;
	word-wrap: normal;
	line-height: 1.5;

	-moz-tab-size: 4;
	-o-tab-size: 4;
	tab-size: 4;

	-webkit-hyphens: none;
	-moz-hyphens: none;
	-ms-hyphens: none;
	hyphens: none;

}

/* Code blocks */
pre[class*="language-"] {
	padding: 1em;
	margin: .5em 0;
	overflow: auto;
}

:not(pre) > code[class*="language-"],
pre[class*="language-"] {
	background: #2d2d2d;
}

/* Inline code */
:not(pre) > code[class*="language-"] {
	padding: .1em;
	border-radius: .3em;
	white-space: normal;
}

.token.comment,
.token.block-comment,
.token.prolog,
.token.doctype,
.token.cdata {
	color: #999;
}

.token.punctuation {
	color: #ccc;
}

.token.tag,
.token.attr-name,
.token.namespace,
.token.deleted {
	color: #e2777a;
}

.token.function-name {
	color: #6196cc;
}

.token.boolean,
.token.number,
.token.function {
	color: #f08d49;
}

.token.property,
.token.class-name,
.token.constant,
.token.symbol {
	color: #f8c555;
}

.token.selector,
.token.important,
.token.atrule,
.token.keyword,
.token.builtin {
	color: #cc99cd;
}

.token.string,
.token.char,
.token.attr-value,
.token.regex,
.token.variable {
	color: #7ec699;
}

.token.operator,
.token.entity,
.token.url {
	color: #67cdcc;
}

.token.important,
.token.bold {
	font-weight: bold;
}
.token.italic {
	font-style: italic;
}

.token.entity {
	cursor: help;
}

.token.inserted {
	color: green;
}
