@view-transition {
  navigation: auto;
}

:root {
  --max: 1100px;
  --black: #000000;
  --white: #ffffff;

  --bg: var(--black);
  --fg: var(--white);
}

html[data-theme="light"] {
  --bg: var(--white);
  --fg: var(--black);
}

.theme-toggle {
  width: 2.0em;
  height: 2.0em;

  /* display: none; */
  display: inline-grid;
  place-items: center;

  border-radius: 50%;
  border: 1px solid var(--bg);
  background: var(--fg);
  color: var(--bg);

  padding: 0;
  cursor: pointer;
  line-height: 0;
}

.theme-toggle .icon {
  width: 0.8em;
  height: 0.8em;
  display: block;
}

html[data-theme="light"] .icon-sun { display: none; }
html[data-theme="dark"]  .icon-moon  { display: none; }

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: var(--fg);
  color: var(--bg);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Utilities */
.mt-0 {
  margin-top: 0;
}

html {
  height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--fg);
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  font-size: 1rem;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 400;
}

graphics {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: transparent;
  pointer-events: none;

  width: 100%;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
}

#logo-graphics {
  /* background: orange; */
  width: 100%;
  height: 8em;
}

/* Main centered container */
#container {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: clamp(0.75rem, 4vw, 2rem);
}

/* Layout blocks */
header {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  padding-block: 1em;
}

content {
  display: block;
  flex-grow: 1;
  line-height: 1.5rem;
}

details {
    background: var(--fg);
    color: var(--bg);
    padding: 1.0em;
}

footer {
  padding-block: 2.5em;
  align-self: flex-end;
}

/* Back to top button */
#back-to-top-btn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: none;
  z-index: 9999;
}

/* Navigation / icons */
.nav-item {
  display: flex;
  align-items: center;
  color: var(--fg);
}

.nav-item > svg {
  height: 1em;
  width: 1em;
  flex-shrink: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-style: normal;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 0.5rem;
  line-height: 1.4;
}

h1 {
  color: var(--fg);
}

hr {
  border-color: var(--fg);
}

a {
  color: var(--fg);
  text-decoration: underline;
}

strong,
b {
  font-weight: 600;
}

/* Code blocks */
code:not(.hljs) {
  background: var(--fg);
  color: var(--bg);
  font-size: 1em;
  padding: 0.1rem 0.3rem;
  white-space: nowrap;
}

.hljs {
  background-color: var(--fg);
  border-radius: 5px;
}

/* Photos */
.photo {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2em;
  margin-block: 2em;
}

.photo > img {
  display: block;
  width: 100%;
  height: auto;
  max-block-size: min(90svh, 700px);
  object-fit: contain;
}

.photo-md > img {
  max-block-size: min(70svh, 700px);
}

/* Blockquote + caption */
blockquote {
  width: 70%;
  margin-inline: auto;
}

photocap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-block: 1em;
  margin-block: 1em;
  width: 100%;
}
