/* Configuration */
:root {
  --font-body: "Nunito Sans", system-ui, sans-serif;
  --font-mono: MonoLisa, monospace;
  --font-size-base: 1.1rem;
  --font-size-small: 0.98rem;
  --font-size-code: 0.8rem;
  --font-weight-body: 340;
  --font-weight-strong: 700;
  --line-height-base: 1.5;

  --content-max: 80ch;
  --content-padding: 1rem;

  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-pill: 999px;

  --color-text: #1b1b1b;
  --color-link: #13692a;
  --color-accent: #13692a;
  --color-border: #d7d7d7;
  --color-border-soft: #bfc7c1;
  --color-muted: #565656;
  --color-muted-strong: #2c2c2c;
  --color-surface: #f6f6f6;
  --color-callout-bg: #eef3ef;
  --color-callout-border: #c9d3cc;

  --code-border: #c9c9c9;
  --code-header-start: #f7f7f8;
  --code-header-end: #e9eaec;
  --code-bg: #1f1f1f;

  --cv-pill-border: #13692a;
  --cv-pill-bg: #e3ede6;
  --cv-pill-text: #13692a;
  --cv-timeline-line: #b6b6b6;
  --cv-timeline-dot: #d5d5d5;

  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.18);
}

:root[data-theme="dark"] {
  --color-text: #e6e6e6;
  --color-link: #1a9a3c;
  --color-accent: #1a9a3c;
  --color-border: #3f3f3f;
  --color-border-soft: #1a9a3c;
  --color-muted: #b0b0b0;
  --color-muted-strong: #d4d4d4;
  --color-surface: #121212;
  --color-callout-bg: #101b14;
  --color-callout-border: #1f3a2a;

  --code-border: #3a3a3a;
  --code-header-start: #2a2a2c;
  --code-header-end: #1f1f20;
  --code-bg: #121212;

  --cv-pill-border: #1a9a3c;
  --cv-pill-bg: #106527;
  --cv-pill-text: #b9d7ef;
  --cv-timeline-line: #3f3f3f;
  --cv-timeline-dot: #4f4f4f;
}

html {
  color-scheme: light dark;
}

html[data-theme="light"] {
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

body {
  font-family: var(--font-body);
  font-optical-sizing: auto;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-body);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background-color: var(--color-surface);
  -webkit-font-smoothing: antialiased;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
  transition: background-color 0.1s ease, color 0.1s ease;
}

h1, h2, h3, h4, h5, h6 {
  margin-top:48px;
}

.site-title {
  margin-top:12px;
}
body * {
  transition: color 0.1s ease, background-color 0.1s ease, border-color 0.1s ease, fill 0.1s ease;
}

@media (prefers-reduced-motion: reduce) {
  body,
  body * {
    transition: none;
  }
}

body a {
  text-decoration: none;
  color: var(--color-link);
}

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

main {
  max-width: min(var(--content-max), 100% - var(--content-padding));
  margin-inline: auto;
}
strong {
  font-weight: var(--font-weight-strong);
}

.font-size-small {
  font-size: var(--font-size-small);
}

.title-container {
  display: flex;
  align-items: center;
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-right: 2px;
  margin-top: 16px;
}
.theme-toggle {
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: none;
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.theme-toggle__icon {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}
.title {
  font-size: 1.25rem;
  font-weight: var(--font-weight-strong);
  color: var(--color-accent);
}
.title-image {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-pill);
  vertical-align: middle;
  margin-right: 16px;  
  margin-left: 2px;
}
hr {
  border: none;
  border-top: 1px solid var(--color-border);
}

code[class*="language-"], pre[class*="language-"]{
  font-family: var(--font-mono);
  font-size: var(--font-size-code);
}

pre,
pre[class*="language-"] {
  position: relative;
  border-radius: var(--radius-md);
  border: 1px solid var(--code-border);
  background:
    linear-gradient(var(--code-header-start), var(--code-header-end)) 0 0 / 100% 1.45rem no-repeat,
    var(--code-bg);
  padding: 2.1rem 1.2rem 1.2rem;
  overflow-x: auto;
  overflow-y: hidden;
}

pre::before,
pre[class*="language-"]::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1.45rem;
  border-bottom: 1px solid var(--code-border);
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
  z-index: 0;
}

pre::after,
pre[class*="language-"]::after {
  content: "";
  position: absolute;
  top: 0.42rem;
  left: 0.75rem;
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  background: #ff5f56;
  box-shadow: 0.95rem 0 0 #ffbd2e, 1.9rem 0 0 #27c93f;
  z-index: 1;
}

pre > code,
pre[class*="language-"] > code {
  position: relative;
  z-index: 1;
  display: block;
}

table {
  margin:         auto;
  border-collapse: collapse;
  /* border: 1px solid #7F7F7F; */
  margin-bottom: 40px;
  margin-top: 40px;
  overflow-x: auto;
  display: block;
  width: 100%;
}

table th {
  /* background-color: #7F7F7F; */
  padding-right: 24px;
} 
table th, td {
  border: 1px solid var(--color-border-soft);
  padding: 4px;
}

.page-datamatrix main {
  max-width: 100%;
  margin-inline: auto;
}

.page-mtg-wishlist main {
  max-width: 100%;
  margin-inline: auto;
  padding-inline: var(--content-padding);
  box-sizing: border-box;
}

.page-datamatrix .content-shell {
  max-width: min(var(--content-max), 100% - var(--content-padding));
  margin-inline: auto;
}

.page-datamatrix .header,
.page-datamatrix .footer,
.page-datamatrix .full-bleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: var(--content-padding);
  padding-right: var(--content-padding);
  box-sizing: border-box;
}

.page-datamatrix table {
  width: 100vw;
  min-width: max-content;
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-surface), #ffffff 35%);
  overflow: auto;
  max-height: 72vh;
  scrollbar-gutter: stable both-edges;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  -webkit-overflow-scrolling: touch;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  min-width: 100%;
  display: block;
  font-size: clamp(0.85rem, 0.5vw + 0.7rem, 1rem);
  line-height: 1.35;
}

.page-datamatrix table caption {
  caption-side: top;
  text-align: left;
  padding: 0.9rem 1rem 0.5rem;
  color: var(--color-muted-strong);
  font-size: 0.95rem;
}

.page-datamatrix table th,
.page-datamatrix table td {
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--color-border-soft);
  background: var(--color-surface);
  min-width: 9rem;
  width: 1%;
  white-space: nowrap;
}

.page-datamatrix table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: color-mix(in srgb, var(--color-surface), #ffffff 20%);
  box-shadow: inset 0 -1px 0 var(--color-border-soft);
}

.page-datamatrix table tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: color-mix(in srgb, var(--color-surface), #ffffff 12%);
  font-weight: 700;
}

.page-datamatrix table thead th:first-child {
  left: 0;
  z-index: 4;
}

.page-datamatrix table tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--color-surface), #000000 2%);
}

.page-datamatrix table tbody tr:hover td {
  background: color-mix(in srgb, var(--color-surface), #13692a 8%);
}

.page-datamatrix .table-hint {
  margin: 0.6rem 0 1.4rem;
  color: var(--color-muted);
  font-size: var(--font-size-small);
}

@media (max-width: 720px) {
  .page-datamatrix table {
    max-height: 60vh;
  }

  .page-datamatrix table th,
  .page-datamatrix table td {
    min-width: 7.5rem;
    padding: 0.45rem 0.6rem;
  }
}

blockquote {
  border-left: 1px solid var(--color-border);
  background-color: var(--color-surface);
  padding-left: 20px;
  padding-right: 20px;
  margin-bottom: 40px;
  margin-top: 40px;
  margin-inline-start: 20px;
  margin-inline-end: 20px;
}

.callout {
  margin: 1.5rem 0;
  padding: 1rem 1.2rem;
  border: 1px solid var(--color-callout-border);
  border-left: 3px solid var(--color-accent);
  background: var(--color-callout-bg);
  border-radius: var(--radius-md);
}

.callout__title {
  margin: 0 0 0.35rem;
  font-weight: 700;
}

.callout__body {
  margin: 0;
  color: var(--color-muted-strong);
  font-size: var(--font-size-small);
}

.page-cv .cv-skills {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 1.5rem;
}

.page-cv .cv-skills th,
.page-cv .cv-skills td {
  border: none;
  padding: 0.45rem 0.8rem;
  text-align: left;
  vertical-align: top;
}

.page-cv .cv-skills th:first-child,
.page-cv .cv-skills td:first-child {
  text-align: right;
}

.page-cv .cv-skills th + th,
.page-cv .cv-skills td + td {
  border-left: 1px solid var(--color-border-soft);
}

.page-cv .cv-timeline {
  list-style: none;
  margin-left: 0;
  padding-left: 0;
  position: relative;
}

.page-cv .cv-timeline::before {
  content: "";
  position: absolute;
  left: 0.9rem;
  top: 0.7rem;
  bottom: 0.7rem;
  width: 2px;
  background: var(--cv-timeline-line);
  border-radius: var(--radius-pill);
}

.page-cv .cv-timeline > li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 1rem;
}

.page-cv .cv-timeline > li:last-child {
  margin-bottom: 0;
}

.page-cv .cv-timeline > li::before {
  content: "";
  position: absolute;
  left: calc(0.55rem + 1px);
  top: 0.35rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--cv-timeline-dot);
  border: 2px solid var(--cv-timeline-line);
  box-sizing: border-box;
}

.page-cv .cv-timeline li li {
  font-size: var(--font-size-small);
}

.page-cv .cv-timeline li ul {
  margin-top: 0.4rem;
}

.page-cv .cv-timeline > li:first-child::before {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.page-cv .cv-timeline > li:first-child strong {
  color: var(--color-accent);
}

@media (max-width: 720px) {
  .page-cv .cv-skills thead {
    display: none;
  }

  .page-cv .cv-skills,
  .page-cv .cv-skills tbody,
  .page-cv .cv-skills tr,
  .page-cv .cv-skills td {
    display: block;
    width: 100%;
  }

  .page-cv .cv-skills tr {
    margin-bottom: 1rem;
  }

  .page-cv .cv-skills td {
    border: none;
    padding: 0.15rem 0;
  }

  .page-cv .cv-skills td + td {
    border-left: none;
  }

  .page-cv .cv-skills td:first-child {
    font-weight: 700;
    letter-spacing: 0.02em;
    text-align: left;
  }

  .page-cv .cv-skills td:last-child {
    padding-bottom: 0.4rem;
  }
}

.scryfall-grid {
  display: grid;
  grid-template-columns: 1fr;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
}

.scryfall-card {
  display: block;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.scryfall-card img {
  border-radius: 12px;
  box-shadow: var(--shadow-card);
}

.scryfall-card__meta {
  display: grid;
  gap: 0.2rem;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--color-muted-strong);
}

.scryfall-card__name {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.scryfall-card__set,
.scryfall-card__count {
  color: var(--color-muted);
}

@media (max-width: 720px) {
  .scryfall-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 78ch) {
  .scryfall-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.page-mtg-wishlist .scryfall-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  justify-content: start;
}


.mermaid svg {
  margin: auto;
  margin-top: 40px;
  margin-bottom: 40px;
  font-family: system-ui, sans-serif;
}

.photo {
  float: right;
  border-radius: var(--radius-sm);
  margin-right: 0px;
  width: 128px;
  margin-left: 16px;
  height: 128px;  
}

.page-cv .cv-name {
  margin-top: 0;
}

@media (prefers-color-scheme: dark) {
  .mermaid svg {
    -webkit-filter: invert(1);
            filter: invert(1);
  }
}
