:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1d2430;
  --muted: #5d6776;
  --line: #dfe4ea;
  --accent: #244a73;
  --accent-hover: #183754;
  --max: 1040px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}

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

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

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner,
main,
.footer-inner {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.2rem;
  font-size: 0.95rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--text);
}

main { padding: 3.5rem 0 4.5rem; }

.hero {
  max-width: 760px;
  margin-bottom: 2.6rem;
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

h1, h2 {
  line-height: 1.15;
  letter-spacing: -0.025em;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.1rem, 5vw, 3.6rem);
}

h2 {
  margin-top: 2.4rem;
  font-size: 1.45rem;
}

.lead {
  font-size: 1.13rem;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.35rem;
}

.card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
}

.card p { color: var(--muted); }

.card .project-link {
  display: inline-block;
  margin-top: 0.25rem;
  font-weight: 650;
}

.prose {
  max-width: 780px;
}

.prose p {
  margin: 1rem 0;
}

.link-box {
  margin: 2rem 0;
  padding: 1rem 1.15rem;
  border-left: 4px solid var(--accent);
  background: var(--surface);
}

.link-box strong {
  display: block;
  margin-bottom: 0.25rem;
}

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner {
  min-height: 92px;
  padding: 1.4rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.counter-slot {
  margin-top: 1.5rem;
  font-size: 0.82rem;
  color: var(--muted);
}

/*
  Visitor counter insertion point:
  paste the currently generated embed code for counter ID
  "tilmanambach.selfhost.eu" here after it has been verified.
*/

@media (max-width: 760px) {
  .header-inner,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-inner {
    padding: 1rem 0;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  main {
    padding-top: 2.5rem;
  }
}