/* andreas-prinz.de — single stylesheet for all pages.
   Brand text colour: #220041. Every rule below takes its colour from these
   custom properties, so changing them here changes the whole site. */

:root {
  color-scheme: light dark;

  --bg:        #ffffff;
  --ink:       #220041;
  /* secondary text: the same hue, lightened — keeps small labels subordinate
     to the headline instead of competing with it */
  --muted:     #6a5a85;
  --hairline:  rgba(34, 0, 65, 0.13);
  --ring:      rgba(34, 0, 65, 0.10);
  --shadow:    0 1px 2px rgba(34, 0, 65, 0.07), 0 8px 24px rgba(34, 0, 65, 0.09);

  --border:       rgba(34, 0, 65, 0.16);
  --border-hover: rgba(34, 0, 65, 0.40);
  --tile-hover:   rgba(34, 0, 65, 0.035);
  --tile-lift:    0 4px 14px rgba(34, 0, 65, 0.10);

  /* logo silhouette: source art is black / navy, so it is normalised, not tinted */
  --logo-filter:       brightness(0) saturate(0);
  --logo-opacity:      0.62;
  --logo-opacity-hover: 0.95;

  --measure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    /* The brand #220041 is a light-mode-only colour: on a dark ground it measures
       1.03:1 and is invisible. Dark mode stays neutral white. */
    --bg:       #0d1117;
    --ink:      #e9edf5;
    --muted:    #9aa4b5;
    --hairline: rgba(233, 237, 245, 0.15);
    --ring:     rgba(233, 237, 245, 0.14);
    --shadow:   0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 30px rgba(0, 0, 0, 0.45);

    --border:       rgba(233, 237, 245, 0.20);
    --border-hover: rgba(233, 237, 245, 0.50);
    --tile-hover:   rgba(233, 237, 245, 0.055);
    --tile-lift:    0 4px 16px rgba(0, 0, 0, 0.45);

    /* invert so black and navy artwork both become one soft white silhouette */
    --logo-filter:        brightness(0) saturate(0) invert(1);
    --logo-opacity:       0.72;
    --logo-opacity-hover: 1;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* no justify-content: the content block centres itself with auto margins so the
     footer can sit flush at the bottom of the viewport */
  padding: 3rem 1.25rem 1.75rem;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* ---------- home ---------- */

.card {
  width: 100%;
  max-width: var(--measure);
  /* auto block margins centre the card in the space left above the footer */
  margin: auto;
  padding-bottom: 2.5rem;
  text-align: center;
  animation: rise 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.avatar {
  /* source is 288px, so 144px displays at exactly 2x on retina */
  width: 144px;
  height: 144px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--ring), var(--shadow);
}

h1 {
  margin: 1.75rem 0 0;
  font-size: clamp(1.5rem, 1.15rem + 1.9vw, 2.125rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.tagline {
  margin: 0.75rem 0 0;
  font-size: clamp(1rem, 0.9rem + 0.7vw, 1.1875rem);
  font-weight: 600;
  line-height: 1.45;
  text-wrap: balance;
}

/* ---------- work / link stack ---------- */

.work {
  margin-top: 2.75rem;
  /* narrower than the card so the tiles read as buttons, not full-width bars */
  max-width: 22rem;
  margin-inline: auto;
}

.work-label {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.work-label::before,
.work-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hairline);
}

.work-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.work-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  padding: 0.9rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.18s ease, background-color 0.18s ease,
              transform 0.18s ease, box-shadow 0.18s ease;
}

.work-link:hover,
.work-link:focus-visible {
  border-color: var(--border-hover);
  background-color: var(--tile-hover);
  transform: translateY(-2px);
  box-shadow: var(--tile-lift);
}

.work-link img {
  display: block;
  /* cap by width too: the two logos have very different aspect ratios
     (8.2:1 and 7:1), so height alone would make one overpower the other */
  height: 24px;
  width: auto;
  max-width: 100%;
  filter: var(--logo-filter);
  opacity: var(--logo-opacity);
  transition: opacity 0.18s ease;
}

.work-link:hover img,
.work-link:focus-visible img { opacity: var(--logo-opacity-hover); }

.work-text {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* ---------- footer ---------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem 1.25rem;
  /* The footer needs no auto margin of its own: the auto block margins on .card /
     .prose absorb all remaining space, which pushes this flush to the bottom on a
     short page and leaves it directly below the content on a long one. Adding
     margin-top:auto here as well would split the free space three ways and park
     the card in the upper third. */
  flex-shrink: 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

.site-footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.site-footer a:hover {
  color: var(--ink);
  border-bottom-color: var(--hairline);
}

/* ---------- legal pages ---------- */

.prose {
  width: 100%;
  max-width: 42rem;
  margin-inline: auto;
  /* legal pages read top-down: start at the top, and let the auto bottom margin
     push the footer to the bottom of the viewport on short pages */
  margin-top: 0;
  margin-bottom: auto;
  padding-bottom: 3rem;
}

.prose h1 {
  margin-top: 0;
  font-size: clamp(1.375rem, 1.2rem + 1vw, 1.75rem);
  text-align: left;
}

.prose h2 {
  margin: 2.25rem 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.prose h3 {
  margin: 1.5rem 0 0.35rem;
  font-size: 0.9375rem;
  font-weight: 700;
}

.prose p, .prose ul { margin: 0.6rem 0; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin: 0.2rem 0; }
.prose address { font-style: normal; }

.prose a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

.lede { color: var(--muted); }

.back {
  display: inline-block;
  margin-bottom: 2rem;
  font-size: 0.8125rem;
  color: var(--muted);
  text-decoration: none;
}
.back:hover { color: var(--ink); }

/* ---------- shared states ---------- */

a:focus-visible,
.project-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 3px;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
