/* hablützel digital. A narrow, type-led page. Fonts are self-hosted. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fbfbfa;
  --ink: #1a1c1b;
  --muted: #5e6560;
  --line: #e6e6e2;
  --raise: #f3f3f0;
  color-scheme: light;
  background: var(--bg);
  color: var(--ink);
}

:root[data-theme="dark"] {
  --bg: #121413;
  --ink: #eceae6;
  --muted: #b4b2ab;
  --line: #2c2e2c;
  --raise: #1c1e1c;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #121413;
    --ink: #eceae6;
    --muted: #b4b2ab;
    --line: #2c2e2c;
    --raise: #1c1e1c;
    color-scheme: dark;
  }
}

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

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

:focus {
  outline: none;
}

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

::selection {
  background: #def475;
  color: #182a25;
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
  text-underline-offset: 0.16em;
}

p {
  margin: 0.4rem 0 0;
}

.skip {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 0.75rem 0 0;
  padding: 0.35rem 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

.wrap {
  width: min(100% - 2.5rem, 40rem);
  margin-inline: auto;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
  padding: 1.25rem 0 0.25rem;
}

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  color: inherit;
  text-decoration: none;
}

.mark {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
  flex: none;
}

.mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.lockup-name {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
}

.lockup-dot {
  color: var(--muted);
  font-weight: 400;
}

.header-side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem 1rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.9rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}

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

html:not(.js) .tools {
  display: none;
}

.tools {
  display: flex;
  align-items: center;
}

.lang {
  display: flex;
}

.tools button {
  appearance: none;
  background: transparent;
  color: var(--muted);
  border: 0;
  font: inherit;
  font-size: 0.95rem;
  min-height: 44px;
  padding: 0 0.4rem;
  cursor: pointer;
}

#theme {
  min-width: 5.4rem;
  text-align: right;
}

.tools button[aria-pressed="true"] {
  color: var(--ink);
  font-weight: 600;
}

.tools button:hover {
  color: var(--ink);
}

.hero {
  padding-top: 3.25rem;
}

.hero:has(.portrait) {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
}

.portrait {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  margin-top: 0.2rem;
}

h1 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 1.85rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.lead {
  max-width: 38rem;
  margin-top: 1rem;
}

.section {
  margin-top: 3rem;
}

h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
}

.projects,
.links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.project {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  column-gap: 1rem;
  align-items: start;
  padding: 1.15rem 0;
}

.project + .project {
  border-top: 1px solid var(--line);
}

.project-icon {
  box-sizing: border-box;
  grid-column: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  min-width: 56px;
  max-width: 56px;
  min-height: 56px;
  max-height: 56px;
  overflow: hidden;
  border-radius: 10px;
  margin: 0;
}

.project-icon img {
  display: block;
  width: 56px;
  height: 56px;
  min-width: 0;
  min-height: 0;
  object-fit: cover;
}

.project-icon-wordmark {
  padding: 0 5px;
  background: #111;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.project-icon-wordmark img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

:root[data-theme="dark"] .project-icon-wordmark {
  background: #0a0a0a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .project-icon-wordmark {
    background: #0a0a0a;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  }
}

.project-body,
.project-visual {
  grid-column: 2;
  min-width: 0;
}

.project-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.6rem;
}

.project-name {
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}

.project-role {
  color: var(--muted);
  font-size: 0.8rem;
}

.project-deck {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.85rem;
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.project-links a {
  white-space: nowrap;
  text-decoration: none;
}

.project-visual {
  grid-column: 2;
  margin: 0.55rem 0 0;
}

.project-visual img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
}

.project-visual figcaption {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.75rem;
}

@media (hover: hover) {
  .project-name:hover,
  .project-links a:hover {
    text-decoration: underline;
    color: var(--ink);
  }
}

@media (max-width: 520px) {
  .project {
    column-gap: 0.8rem;
    padding: 1rem 0;
  }

  .project-visual img {
    height: 96px;
  }
}

.links li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.75rem;
  align-items: baseline;
  padding: 0.35rem 0;
}

.links li + li {
  border-top: 1px solid var(--line);
}

.links span {
  color: var(--muted);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 1.25rem;
  margin-top: 3.5rem;
  padding: 1.25rem 0 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1rem;
}

.site-footer a,
.file-row a {
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.prose {
  padding-top: 2.5rem;
  padding-bottom: 0.5rem;
}

.prose h1 {
  margin-bottom: 1.25rem;
}

.prose h2 {
  margin-top: 1.75rem;
}

.prose a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.draft-note,
.placeholder {
  color: var(--muted);
}

.placeholder {
  display: block;
  margin-top: 0.35rem;
  padding: 0.45rem 0.6rem;
  border: 1px dashed var(--muted);
  background: var(--raise);
}

.logo-page {
  padding-top: 2.5rem;
  padding-bottom: 0.5rem;
}

.logo-lead {
  margin: 0.75rem 0 2rem;
}

.variant + .variant {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.variant-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.75rem;
}

.variant-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.badge {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.variant-copy {
  margin: 0.4rem 0 0.9rem;
  color: var(--muted);
}

.boards {
  display: grid;
  gap: 0.6rem;
}

.board {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: 0.85rem;
  align-items: center;
  margin: 0;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}

.board figcaption {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.75rem;
}

.board-dark {
  background: #121413;
  color: #eceae6;
  padding-inline: 0.75rem;
}

.board-dark figcaption {
  color: #b4b2ab;
}

.board-mark svg {
  display: block;
  width: 3.25rem;
  height: 3.25rem;
}

.board-word svg {
  display: block;
  width: min(100%, 22rem);
  height: auto;
}

.board-solo {
  grid-template-columns: 1fr;
}

.file-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-top: 0.35rem;
}

.sizes {
  display: flex;
  align-items: end;
  gap: 1rem;
  margin-top: 0.75rem;
}

.sizes figure {
  margin: 0;
}

.sizes img {
  display: block;
}

.sizes figcaption {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.75rem;
}

@media (max-width: 520px) {
  .wrap {
    width: min(100% - 2rem, 40rem);
  }

  .site-nav {
    display: none;
  }
}

@media print {
  :root,
  :root[data-theme="dark"] {
    --bg: #fff;
    --ink: #000;
    --muted: #333;
    --line: #ccc;
  }

  .tools,
  .skip,
  .sizes {
    display: none !important;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
  }
}
