:root {
  --fg: hsl(0 0 11.76%);
  --bg: hsl(0 0 95%);
  --hl: hsl(0 0 25%);
  --li: hsl(0 0 65%);
  --font: 1.2em / 1.6 sans-serif, system-ui;
  --mw: 40rem;
  --op: clamp(1em, 3vw, 2em);
  --in: 0.5em;
  color-scheme: light;
  background-color: var(--bg);
}

body {
  font: var(--font);
  color: var(--fg);
  max-width: var(--mw);
  margin: var(--op) auto;
  letter-spacing: -0.1ch;
}
main,
footer {
  padding: 0 var(--in);
}

main {
  margin: var(--op) 0;
}

h2,
h3,
h4,
h5 {
  margin: 0 0 var(--in) 0;
  font-weight: 300;
  letter-spacing: -0.15ch;
  display: inline-block;
}

h2 {
  padding: 0 1ch;
  background: var(--fg);
  color: var(--bg);
}

p {
  margin: var(--in) 0;
}

main p {
  padding-left: 2ch;
  border-left: var(--hl) 2px solid;
}

footer {
  font-size: 14pt;
  text-align: center;
}

a {
  font-weight: thin;
  color: var(--hl);
  text-decoration: none;
}

a:hover {
  text-decoration: underline 1px solid;
}

p a {
  text-decoration: underline 1px solid;
}

code {
  font-family: monospace;
  background: hsl(0 0 90%);
  padding: 0.1em 0.3em;
  border-radius: 3px;
  font-size: 0.9em;
  vertical-align: middle;
}

header nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1ch;
}

header nav > div {
  text-align: center;
}

nav span {
  margin: 1ch;
}

footer nav {
  text-align: center;
}

header,
footer {
  background-color: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

hr {
  height: 0;
  color: var(--li);
  margin: var(--in) kvar(--op);
}

summary {
  user-select: none;
}

.button:hover {
  text-decoration: none;
}

@view-transition {
  navigation: auto;
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}

@media not (prefers-reduced-motion: reduce) {
  #logo,
  #side-logo {
    view-transition-name: site-logo;
  }

  header nav > div {
    view-transition-name: site-nav;
  }

  ::view-transition-group(site-logo),
  ::view-transition-group(site-nav) {
    animation-duration: 0.5s;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  }

  ::view-transition-old(site-logo),
  ::view-transition-new(site-logo) {
    height: 100%;
    width: auto;
    object-fit: contain;
  }
}

.service-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--in);
  margin: var(--in) 0;
}

.service-card {
  padding: var(--in);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.service-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 0px -1px rgba(0, 0, 0, 0.1);
}

.service-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--in);
}

.service-name {
  font-weight: bold;
  color: var(--fg);
  text-decoration: none;
}

.service-name:hover {
  text-decoration: none;
}

.service-description {
  font-size: 0.85em;
  margin-bottom: var(--in);
  flex-grow: 1;
  line-height: 1.4;
}

.service-links {
  display: flex;
  gap: 0.8em;
  opacity: 0.8;
}

.service-icon {
  width: 1em;
  height: 1em;
  vertical-align: middle;
}

details {
  margin: var(--in);
}

summary {
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}

summary::after {
  content: "▸";
  font-weight: bold;
  font-size: 1.2em;
  vertical-align: middle;
  display: inline-block;
  transition: transform 0.2s ease;
}

details[open] summary::after {
  transform: rotate(90deg);
}

#logo {
  width: 200px;
  height: 200px;
}

#side-logo {
  width: 64px;
  height: 64px;
}

nav a[href="/"],
header a[href="/"] {
  text-decoration: none;
}

.crypto-list {
  display: flex;
  flex-direction: column;
  gap: 1.25em;
  padding: 0 1em;
}

.crypto-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5em;
  padding-left: 1.25em;
  border-left-width: 4px;
  border-left-style: solid;
  transition: background-color 0.2s ease;
  padding-top: 0.2em;
  padding-bottom: 0.2em;
}

.crypto-ticker {
  font-weight: 700;
  color: var(--fg);
  user-select: none;
  min-width: 3.5rem;
  font-size: 1.1em;
}

.crypto-address {
  font-family: monospace;
  word-break: break-all;
  color: var(--hl);
  font-size: 0.9em;
  line-height: 1.4;
  text-align: right;
  flex: 1;
  opacity: 0.9;
}
