@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Rubik:wght@400;500;700&display=swap");

:root {
  color-scheme: light;
  --nord0: #2e3440;
  --nord1: #3b4252;
  --nord2: #434c5e;
  --nord3: #4c566a;
  --nord4: #d8dee9;
  --nord5: #e5e9f0;
  --nord6: #eceff4;
  --nord7: #8fbcbb;
  --nord8: #88c0d0;
  --nord9: #81a1c1;
  --nord10: #5e81ac;
  --nord14: #a3be8c;
  --nord15: #b48ead;

  --bg: #fff;
  --ink: var(--nord0);
  --text: var(--nord3);
  --muted: #6d7b93;
  --accent: var(--nord10);
  --frost: var(--nord8);
  --frost-deep: #7eb6c6;
  --on-frost: var(--nord1);
  --hairline: var(--nord4);
  --tile: #fff;
  --band: #e7ebf1;
  --band-seen: #f3f5f9;
  --footer: #edf0f5;
  --image: var(--nord6);
  --nav-hover: rgb(236 239 244 / 0.85);
  --shadow: rgb(46 52 64 / 0.08);
  --font-ui: Rubik, "Avenir Next", "Segoe UI", sans-serif;
  --page: 72rem;
  --gutter: 1.25rem;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: var(--nord0);
  --ink: var(--nord6);
  --text: var(--nord6);
  --muted: var(--nord4);
  --accent: var(--nord8);
  --frost: var(--nord8);
  --frost-deep: #7eb6c6;
  --on-frost: var(--nord1);
  --hairline: var(--nord3);
  --tile: var(--nord1);
  --band: #292e39;
  --band-seen: #242933;
  --footer: var(--nord1);
  --image: var(--nord0);
  --nav-hover: rgb(76 86 106 / 0.55);
  --shadow: rgb(16 18 24 / 0.35);
}

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

html {
  background: var(--bg);
  color: var(--ink);
  overflow-x: clip;
}

body {
  display: flex;
  flex-direction: column;
  margin: 0;
  width: 100%;
  min-height: 100vh;
  overflow-x: clip;
  padding: 1.25rem 0 0;
  background: var(--bg);
  color: var(--text);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.65;
}

header,
main > :not(.band, .hero) {
  width: min(100%, var(--page));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

main {
  width: 100%;
  margin: 2rem auto;
}

main:has(.hero) {
  margin-top: 0;
}

body:has(.hero) {
  padding-top: 0;
}

body:has(.hero) header {
  position: absolute;
  top: 1.15rem;
  left: 0;
  right: 0;
  z-index: 4;
}

body:has(.hero) .site-name,
body:has(.hero) a.site-name:visited,
body:has(.hero) a.site-name:hover,
body:has(.hero) header nav a,
body:has(.hero) button.theme-toggle {
  color: var(--nord6);
}

body:has(.hero) header nav a:hover,
body:has(.hero) button.theme-toggle:hover {
  background: rgb(236 239 244 / 0.12);
  color: #fff;
}

body:has(.hero) a[aria-current="page"] {
  color: #9adff2;
}

@media (min-width: 48rem) {
  body {
    padding-top: 1.75rem;
  }
}

::selection {
  background: color-mix(in srgb, var(--frost) 42%, transparent);
  color: var(--nord0);
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:visited {
  color: var(--accent);
}

a:hover {
  color: var(--frost-deep);
}

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

header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.25rem;
  max-width: 100%;
  font-family: var(--font-ui);
}

.site-name {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-right: auto;
  padding-block: 0.55rem;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.site-name::before {
  content: "";
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 0.12rem;
  background: var(--frost);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--nord0) 12%, transparent);
}

a.site-name:visited,
a.site-name:hover {
  color: var(--ink);
}

nav {
  min-width: 0;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.4rem;
  padding: 0.35rem 0.65rem;
  border-radius: 0.25rem;
  color: var(--ink);
  text-decoration: none;
}

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

a[aria-current="page"] {
  color: var(--accent);
  font-weight: 500;
}

button.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  width: 2.4rem;
  min-height: 2.4rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0.25rem;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  cursor: pointer;
}

button.theme-toggle:hover {
  background: var(--nav-hover);
  color: var(--ink);
}

button.theme-toggle svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

button.theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] button.theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] button.theme-toggle .icon-moon {
  display: block;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-family: var(--font-ui);
  line-height: 1.25;
}

h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  margin: 2.25rem 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

main section > :first-child {
  margin-top: 0;
}

strong,
b {
  font-weight: 700;
  color: var(--ink);
}

h3 {
  margin: 1.75rem 0 0.35rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

p {
  margin: 0.85rem 0 0;
  overflow-wrap: break-word;
}

h1 + p,
h2 + p,
h3 + p {
  margin-top: 0.35rem;
}

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
  margin-top: 0;
  padding: 8.75rem 0 6.75rem;
  background: linear-gradient(180deg, #07111f 0%, #0c1c33 58%, #10243a 100%);
}

@media (min-width: 48rem) {
  .hero {
    padding: 7.5rem 0 7.75rem;
  }

  body:has(.hero) header {
    top: 1.5rem;
  }
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero::before {
  inset: 0 0 3.5rem;
  z-index: -2;
  background-image:
    radial-gradient(1.4px 1.4px at 8% 24%, #fff, transparent),
    radial-gradient(1px 1px at 18% 12%, rgb(255 255 255 / 0.85), transparent),
    radial-gradient(1.2px 1.2px at 31% 34%, #fff, transparent),
    radial-gradient(1px 1px at 44% 16%, rgb(255 255 255 / 0.75), transparent),
    radial-gradient(1.6px 1.6px at 57% 28%, #fff, transparent),
    radial-gradient(1px 1px at 69% 14%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 78% 38%, rgb(255 255 255 / 0.8), transparent),
    radial-gradient(1px 1px at 88% 20%, #fff, transparent),
    radial-gradient(1.3px 1.3px at 14% 52%, #fff, transparent),
    radial-gradient(1px 1px at 93% 48%, rgb(255 255 255 / 0.7), transparent);
  animation: starlight 6s ease-in-out infinite alternate;
}

.aurora {
  position: absolute;
  inset: 0 0 42%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 70%, transparent 100%);
}

.aurora span {
  position: absolute;
  top: -35%;
  left: -4%;
  width: 108%;
  height: 120%;
  filter: blur(28px);
  opacity: 0.5;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgb(80 210 175 / 0.32) 30%,
    rgb(120 200 235 / 0.4) 52%,
    rgb(186 160 230 / 0.32) 72%,
    transparent 100%
  );
  animation: aurora-wobble 3s ease-in-out infinite alternate;
}

@keyframes aurora-wobble {
  from { transform: translate3d(0, -1.15rem, 0) scaleY(0.96); }
  to { transform: translate3d(0, 1.35rem, 0) scaleY(1.06); }
}

@keyframes starlight {
  from { opacity: 0.4; }
  to { opacity: 0.9; }
}

.hero::after {
  z-index: -1;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 4.75rem;
  background: var(--band);
  clip-path: ellipse(72% 100% at 50% 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(100%, 40rem);
  margin-inline: auto;
  padding-inline: var(--gutter);
  text-align: center;
}

.avatar {
  display: block;
  width: 6.5rem;
  height: 6.5rem;
  margin: 0 auto 1.35rem;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 22%;
  box-shadow:
    0 0 0 3px #07111f,
    0 0 0 5px rgb(125 230 255 / 0.9),
    0 0 1.6rem rgb(94 225 255 / 0.45);
}

.hero-lead {
  max-width: 36rem;
  margin: 1.15rem auto 0;
  color: var(--nord4);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.85rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.button-primary,
.button-primary:visited {
  background: var(--frost);
  color: var(--on-frost);
}

.button-primary:hover {
  background: var(--frost-deep);
  color: var(--on-frost);
}

.button-ghost,
.button-ghost:visited {
  border-color: var(--nord3);
  background: transparent;
  color: var(--ink);
}

.button-ghost:hover {
  border-color: var(--frost);
  background: color-mix(in srgb, var(--frost) 12%, transparent);
  color: var(--ink);
}

.hero .button-ghost,
.hero .button-ghost:visited {
  border-color: rgb(216 222 233 / 0.5);
  background: rgb(236 239 244 / 0.06);
  color: var(--nord6);
}

.hero .button-ghost:hover {
  border-color: #9adff2;
  background: rgb(136 192 208 / 0.18);
  color: #fff;
}

h1.wordmark {
  margin: 0;
  text-align: center;
  font-size: clamp(1.7rem, 4.4vw, 2.55rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
}

h1.wordmark em {
  font-style: normal;
  color: var(--accent);
}

.hero h1.wordmark {
  color: var(--nord6);
}

.hero h1.wordmark em {
  background-image: linear-gradient(105deg, #9af7d2 0%, #7fd8f2 46%, #d5c2ff 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

main section {
  margin-top: 2.75rem;
}

.band {
  padding: 2.6rem max(var(--gutter), calc((100% - var(--page)) / 2 + var(--gutter))) 3rem;
}

.band-projects {
  --projects: 108rem;
  margin-top: 0;
  padding-top: 0;
  padding-inline: max(var(--gutter), calc((100% - var(--projects)) / 2 + var(--gutter)));
  background: var(--band);
}

.band .areas,
.band-seen > section {
  margin: 0;
}

.band-seen {
  background: var(--band-seen);
  margin-bottom: -2rem;
}

.band-seen > section {
  width: min(100%, var(--page));
  margin-inline: auto;
  padding: 1.15rem 1.1rem 1.2rem;
  border: 1px solid var(--hairline);
  border-radius: 0.4rem;
  background: var(--tile);
}

.band-seen a {
  text-decoration: none;
}

.band-seen a:hover {
  text-decoration: underline;
}

.areas {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.areas > a {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
  margin-top: 0;
  padding: 0.85rem;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 0.4rem;
  background: var(--tile);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 0.15rem 0.4rem var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.areas > a:visited {
  color: var(--text);
}

.areas > a:hover,
.areas > a:focus-visible {
  transform: translateY(-2px);
  border-color: var(--frost);
  box-shadow: 0 0.7rem 1.4rem var(--shadow);
  color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  .hero::before,
  .aurora span,
  .button,
  .areas > a {
    animation: none;
    transition: none;
  }

  .areas > a:hover,
  .areas > a:focus-visible {
    transform: none;
  }
}

.areas img {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: var(--image);
  border-radius: 0.3rem;
}

.areas h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.areas p {
  margin: 0.45rem 0 0;
}

.card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem 1rem;
  margin-top: 0.85rem;
}

.areas .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.areas .tags li,
.areas .tags li + li {
  margin: 0;
  padding: 0.1rem 0.45rem;
  border: 1px solid var(--hairline);
  border-radius: 0.2rem;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.card-link {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
}

.card-link::after {
  content: " →";
}

main ul,
main ol {
  margin: 1rem 0 0;
  padding-left: 1.15rem;
}

main li + li {
  margin-top: 0.5rem;
}

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

ul.letterboxd li {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  margin: 0;
  column-gap: 0.75rem;
  row-gap: 0.2rem;
}

ul.letterboxd li + li {
  margin-top: 0;
}

ul.letterboxd li > a {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
}

ul.letterboxd img {
  flex: 0 0 2rem;
  width: 2rem;
  height: auto;
  border-radius: 0.15rem;
}

ul.letterboxd time {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

footer {
  display: grid;
  font-family: var(--font-ui);
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem 1.5rem;
  width: 100%;
  max-width: none;
  margin-top: auto;
  margin-inline: 0;
  padding-top: 1.5rem;
  padding-bottom: 1.35rem;
  padding-inline: max(var(--gutter), calc((100% - var(--page)) / 2 + var(--gutter)));
  background: var(--footer);
  border-top: 1px solid var(--hairline);
}

footer p,
footer nav {
  position: relative;
  z-index: 1;
}

footer p {
  margin: 0;
  justify-self: start;
  color: var(--muted);
}

footer .social {
  justify-self: center;
}

footer .social ul {
  justify-content: center;
  gap: 0.15rem 0.2rem;
}

footer .social a {
  padding: 0.45rem;
  color: var(--muted);
}

footer .social svg {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

footer .social a:hover {
  background: transparent;
  color: var(--frost);
}

footer nav[aria-label="Rechtliches"] {
  justify-self: end;
}

footer nav[aria-label="Rechtliches"] a {
  color: var(--accent);
}

@media (max-width: 40rem) {
  header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand toggle"
      "nav nav";
    align-items: center;
    column-gap: 1rem;
    row-gap: 0;
  }

  .site-name {
    grid-area: brand;
    margin-right: 0;
    min-width: 0;
  }

  button.theme-toggle {
    grid-area: toggle;
    justify-self: end;
  }

  header nav {
    grid-area: nav;
  }

  footer {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  footer .social,
  footer nav[aria-label="Rechtliches"] {
    justify-self: start;
  }

  footer .social ul {
    justify-content: flex-start;
  }

  ul.letterboxd li {
    flex-wrap: wrap;
  }

  ul.letterboxd time {
    flex-basis: 100%;
    margin-left: 2.75rem;
  }
}

@media (min-width: 60rem) {
  ul.letterboxd,
  main:has(> section + section) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  ul.letterboxd {
    display: grid;
    column-gap: 1.75rem;
  }

  main:has(> section + section) {
    display: grid;
    column-gap: 2.5rem;
    align-items: start;
    width: min(100%, var(--page));
    margin-inline: auto;
  }

  main:has(> section + section) > h1 {
    grid-column: 1 / -1;
  }

  main:has(> section + section) > :is(h1, section) {
    width: auto;
    margin-inline: 0;
    padding-inline: 0;
  }
}

@media (min-width: 88rem) {
  .band-projects .areas {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
