:root {
  --bg: #0a0a0b;
  --fg: #fafafa;
  --muted: #a1a1aa;
  --muted-2: #6c6c72;
  --border: #232326;

  --fh: Georgia, serif;
  --fb: system-ui, sans-serif;
  --serif: var(--fh);
  --sans: var(--fb);

  --accent: hsl(var(--h, 210) 80% 55%);

  --radius-btn: 0.5rem;
  --text-xs: 0.8125rem;
  --text-sm: 0.875rem;
  --gap-xs: 0.5rem;

  color-scheme: dark;
}

/* Default variant uses the dynamic --h hue for its background */
[data-v="default"] {
  --bg: hsl(var(--h, 240) 24% 6%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg, #0a0a0b);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-nav,
main,
.site-footer {
  max-width: 40rem;
  margin: 0 auto;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-mark {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-xs);
  font-size: var(--text-sm);
  color: var(--fg);
}

.nav-mark img {
  border-radius: 50%;
}

.site-nav nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-nav nav a {
  font-size: var(--text-sm);
  color: var(--muted);
}

.site-nav nav a:hover {
  color: var(--fg);
}

.site-nav nav a.nav-btn {
  color: var(--bg);
  background: var(--fg);
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-btn);
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.site-nav nav a.nav-btn:hover {
  color: var(--bg);
  opacity: 0.85;
}

/* # hero */
.hero {
  padding: 3rem 0 3.5rem;
  text-align: center;
}

.hero-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.375rem, 6vw, 3.25rem);
  line-height: 1.1;
  margin: 0 0 0.875rem;
  cursor: default;
  transition: opacity 0.18s ease;
}

.hero-name.is-swapping {
  opacity: 0;
}

.hero-bio {
  max-width: 46ch;
  margin: 0 auto;
  color: var(--muted);
}

.web-info {
  font-size: 0.8rem;
  transition: color 0.15s ease;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.125rem;
  margin-top: 1.125rem;
}

.social-links a {
  color: var(--muted-2);
  font-size: 1.25rem;
  transition: color 0.15s ease;
}

.social-links a:hover {
  color: var(--fg);
}

/* # work */
.work {
  padding-bottom: 4rem;
}

.work h2 {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--muted-2);
  margin: 0 0 0.5rem;
}

.work-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.work-item {
  position: relative;
  padding: 0.8125rem 0;
  border-bottom: 1px solid var(--border);
}

.work-item:last-child {
  border-bottom: none;
}

.work-item-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.work-item-link {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  min-width: 0;
  flex: 1;
}

.work-item h3 {
  font-family: var(--serif);
  font-size: 1.1875rem;
  font-weight: 400;
  line-height: 1.3;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.work-item-link i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  margin-left: 0;
  font-size: 0.75rem;
  line-height: 1;
  color: var(--muted-2);
  transform: translateY(-2px);
}

.work-item:hover .work-item-link h3 {
  text-decoration: underline;
}

.work-code {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  color: var(--muted);
}

.work-code:hover {
  color: var(--fg);
}

.work-item p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
  max-width: 56ch;
}

.work-stack {
  display: block;
  margin-top: 0.25rem;
  font-size: var(--text-xs);
  color: var(--muted-2);
}

/* # footer */
.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  padding-top: 2rem;
  padding-bottom: 3rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: var(--text-xs);
  color: var(--muted-2);
}

.site-footer a,
.site-footer button,
.site-footer code {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.site-footer a:hover,
.site-footer button:hover,
.site-footer code:hover {
  color: var(--fg);
}

/* Footer metadata row */
.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
}


/* # responsive */
@media (max-width: 480px) {



  .site-nav {
    padding-top: 1.375rem;
    padding-bottom: 1.375rem;
  }

  .site-nav nav {
    gap: 0.75rem;
  }

  .work-item-row {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .work-item-link {
    flex: 1;
    min-width: 0;
  }

  .work-item h3 {
    font-size: 1.125rem;
  }

  .work-code {
    flex-shrink: 0;
    white-space: nowrap;
  }
}

@media (max-width: 360px) {

  .site-nav,
  main,
  .site-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .site-nav nav {
    gap: var(--gap-xs);
  }

  .site-nav nav a {
    font-size: var(--text-xs);
  }

  .site-nav nav a.nav-btn {
    padding: 0.375rem 0.625rem;
  }

  .work-item-row {
    gap: var(--gap-xs);
  }

  .work-item h3 {
    font-size: 1.0625rem;
  }

  .work-item-link i {
    width: 0.875rem;
    height: 0.875rem;
    font-size: 0.625rem;
  }

  .work-code {
    font-size: 0.75rem;
  }
}

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

/* # dock */
#dock,
#dock-toggle {
  --dock-bg: light-dark(#f4f4f5, #141417);
  --dock-hover: light-dark(#e4e4e7, #232329);
  --dock-control-bg: light-dark(#e4e4e7, #232329);
  --dock-control-hover: light-dark(#d4d4d8, #32323a);
  --dock-border: light-dark(#d4d4d8, #2e2e33);
  --dock-control-border: light-dark(#c4c4cc, #3f3f46);
  --dock-fg: light-dark(#18181b, #f4f4f5);
  --dock-muted: light-dark(#52525b, #a1a1aa);

  position: fixed !important;
  right: 1rem !important;
  z-index: 9999 !important;
  align-items: center;
  background: var(--dock-bg) !important;
  color: var(--dock-fg) !important;
  font: var(--text-xs) / 1 system-ui, sans-serif !important;
  border: 0.0625rem solid var(--dock-border) !important;
  border-radius: var(--radius-btn) !important;
}

#dock-toggle {
  bottom: 1rem !important;
  display: inline-flex !important;
  gap: 0.45rem;
  padding: 0.5rem 0.75rem !important;
  text-decoration: none !important;
  cursor: pointer;
}

#dock-toggle i {
  color: var(--accent) !important;
  font-size: 0.75rem;
}

#dock-toggle:hover,
#dock-toggle[aria-expanded="true"] {
  background: var(--dock-hover) !important;
}

#dock-toggle code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
  color: inherit !important;
  background: none !important;
  border: 0 !important;
  padding: 0 !important;
  text-decoration: none !important;
}

#dock {
  bottom: 3.375rem !important;
  display: none;
  gap: 0.375rem;
  flex-wrap: wrap;
  max-width: calc(100vw - 2rem);
  padding: 0.375rem !important;
}

#dock.is-open {
  display: inline-flex;
}

#dock select,
#dock button {
  font: inherit !important;
  color: var(--dock-fg) !important;
  background: var(--dock-control-bg) !important;
  border: 0.0625rem solid var(--dock-control-border) !important;
  border-radius: 0.25rem !important;
  padding: 0.25rem 0.5rem !important;
  text-decoration: none !important;
  cursor: pointer;
}

#dock select:hover,
#dock button:hover {
  color: var(--dock-fg) !important;
  background: var(--dock-control-hover) !important;
}

#dock select {
  max-width: 6.5rem;
  text-overflow: ellipsis;
}

#dock select option {
  color: var(--dock-fg);
  background: var(--dock-bg);
}

#dock input[type="range"] {
  padding: 0 !important;
  margin: 0 0.25rem !important;
  width: 4rem;
  height: 0.25rem;
  accent-color: var(--accent);
  cursor: pointer;
}

#dock span {
  color: var(--dock-muted) !important;
  padding: 0 0.125rem;
  user-select: none;
}

#dock-toggle:focus-visible,
#dock :focus-visible {
  outline: 0.125rem solid var(--dock-fg);
  outline-offset: 0.125rem;
}

@media (max-width: 30rem) {

  #dock,
  #dock-toggle {
    right: 0.75rem !important;
  }

  #dock-toggle {
    bottom: 0.75rem !important;
  }

  #dock {
    bottom: 3rem !important;
    max-width: calc(100vw - 1.5rem);
  }
}