/* Palette and typography shared by every portfolio page. */
:root {
  color-scheme: light;
  --paper: #fefcfe;
  --ink: #000;
  --label: #fff;
  --learning: #dbff48;
  --font-code: "Courier New", Courier, monospace;
  --font-content: monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #000;
  --ink: #fefcfe;
  --label: #000;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: normal .8125rem/1.5 var(--font-code);
  letter-spacing: .025em;
}
button { font: inherit; letter-spacing: inherit; }
strong, b { font-weight: normal; }
a { color: var(--label); background: var(--ink); }
a:hover, a[aria-current="page"] { color: var(--ink); background: var(--label); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.skip-link { position: absolute; left: 1rem; top: 1rem; z-index: 2; }
.skip-link:not(:focus) { clip-path: inset(50%); }

/* Desktop sidebar and the same menu in a collapsible mobile header. */
.layout { width: 100%; max-width: 1140px; margin: auto; padding: 1.5rem 15px 3rem; }
.site-header { margin-bottom: 1rem; }
.site-title { text-decoration: none; }
.mobile-bar { display: flex; align-items: center; gap: .5rem; }
.menu-toggle {
  margin-left: auto;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  padding: .35rem .65rem;
  cursor: pointer;
}
/* The social icons and the light switch share a square tile. */
.social {
  display: flex;
  justify-content: flex-end;
  gap: .3rem;
  margin-bottom: 1.5rem;
}
.social a, .theme-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 0;
}
.social a { background: var(--ink); }
.social img { display: block; width: 19px; height: 19px; }
:root:not([data-theme="dark"]) .social img { filter: invert(1); }
.theme-toggle {
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}
.theme-toggle::before {
  content: "";
  width: 14px;
  height: 21px;
  border: 1px solid currentColor;
}
.theme-toggle::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 8px;
  background: currentColor;
  transform: translateY(-4px);
}
.theme-toggle[aria-pressed="true"]::after { transform: translateY(4px); }
.menu { margin: 0; padding: 0; list-style: none; }
.menu a { display: inline; text-decoration: none; }
.menu .learning { color: var(--learning); background: #000; }
.menu .learning:is(:hover, :focus-visible) { color: #000; background: var(--learning); }
.sidebar-skull, .sidebar-contact { display: none; }
.home-skull { text-align: center; }
[data-theme="dark"] :is(.sidebar-skull, .home-skull img) { filter: invert(1); }

@media (min-width: 576px) { .layout { max-width: 540px; } }
@media (min-width: 768px) { .layout { max-width: 720px; } }
@media (min-width: 992px) { .layout { max-width: 960px; } }
@media (max-width: 1199px) {
  body { font-size: .75rem; }
  .site-header {
    margin: -1.5rem calc(50% - 50vw) 1.5rem;
    padding: .65rem 1rem;
    color: var(--label);
    background: var(--ink);
  }
  .site-header :focus-visible { outline-color: var(--label); }
  .site-title { font-size: .9375rem; }
  .menu { padding-top: .5rem; }
  .menu a { display: inline-block; padding: .3rem 0; }
}
@media (min-width: 1200px) {
  .layout { max-width: 1140px; display: grid; grid-template-columns: 25% minmax(0, 66.667%); }
  .site-header { position: sticky; top: 1.5rem; align-self: start; padding-right: 30px; }
  .sidebar-skull, .sidebar-contact { display: block; }
  .sidebar-skull { margin-bottom: 1rem; }
  .sidebar-contact, .menu { margin-top: 1rem; }
  .sidebar-contact p { margin: .4rem 0 1rem; }
  main { padding: 0 15px; }
  .menu-toggle, .home-skull { display: none; }
}

/* Content blocks. Copy a heading and its video figure to add another film. */
main {
  min-width: 0;
  font-family: var(--font-content);
}
h1, h2, h3, h4, h5, h6 {
  display: table;
  margin: 0 0 .75rem;
  background: var(--ink);
  color: var(--label);
  font: normal 1.3em/1.12 var(--font-content);
}
h1 a, h2 a, h3 a, h4 a { color: inherit; }
p, figure, pre { margin: 0 0 1rem; }
img { max-width: 100%; height: auto; vertical-align: middle; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.video iframe, .model iframe {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
  aspect-ratio: 16 / 9;
}
.video.standard iframe { aspect-ratio: 4 / 3; }
.model iframe { aspect-ratio: 1; }
.model .model-credit { color: var(--ink); }
.square-embed {
  display: block;
  max-width: 100%;
  height: auto;
  border: 0;
  aspect-ratio: 1;
}
figcaption { margin-top: .5rem; text-align: center; }
.image-link { background: transparent; }
.centered { text-align: center; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 0;
  list-style: none;
}
.single-column .gallery-grid { grid-template-columns: 1fr; }
.gallery-grid figure { margin: 0; }
.gallery-grid img { display: block; width: 100%; }
.gallery-cropped img { aspect-ratio: 1; object-fit: cover; }
.spacer { height: 2rem; }
