@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/ibm-plex-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/ibm-plex-sans-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/ibm-plex-sans-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-var-roman.woff2") format("woff2-variations"),
       url("fonts/ibm-plex-mono-var-roman.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --ink: #0a0a0a;
  --muted: #6b6b6b;
  --line: #0a0a0a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
}

body {
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.label {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

/* ---------- Frame ---------- */

.frame {
  max-width: 1100px;
  margin: 0 auto;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Header grid (home page) ---------- */

.hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  border-bottom: 1px solid var(--line);
}

.hero-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  border-right: 1px solid var(--line);
}

.hero-mark img {
  width: 100%;
  height: auto;
  max-width: 190px;
}

.hero-text {
  padding: 56px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}

.hero-text h1 {
  margin: 0;
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero-text p {
  margin: 0;
  max-width: 34ch;
  font-size: 1.15rem;
  color: var(--muted);
}

/* ---------- Tile nav ---------- */

.tiles {
  display: grid;
  grid-template-columns: 280px repeat(3, 1fr);
  flex: 1;
}

.tile {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 32px;
  display: flex;
  align-items: flex-end;
  min-height: 220px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.3;
  letter-spacing: -0.005em;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.tile:last-child { border-right: none; }

.tile:hover,
.tile:focus-visible {
  background: var(--ink);
  color: var(--bg);
  outline: none;
}

/* photo-hover tiles (About / Get in Touch) */

.tile--photo {
  position: relative;
  overflow: hidden;
  z-index: 0;
}

.tile--photo::before,
.tile--photo::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 1;
}

.tile--photo::before {
  background-size: cover;
  background-position: center;
  filter: grayscale(1);
}

.tile-about::before { background-image: url("about-photo.jpg"); }
.tile-contact::before { background-image: url("contact-photo.jpg"); }

.tile--photo::after {
  background: linear-gradient(to top, rgba(0,0,0,0.78), rgba(0,0,0,0) 60%);
}

.tile--photo span {
  position: relative;
  z-index: 2;
}

.tile--photo:hover,
.tile--photo:focus-visible {
  background: var(--bg);
  color: var(--bg);
}

.tile--photo:hover::before,
.tile--photo:hover::after,
.tile--photo:focus-visible::before,
.tile--photo:focus-visible::after {
  opacity: 1;
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--line);
  padding: 20px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
}

footer .label { color: var(--muted); }

/* ---------- Inner pages (About / Impressum) ---------- */

.page-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 32px;
  border-bottom: 1px solid var(--line);
}

.page-header img {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.page-header .back {
  margin-left: auto;
  text-decoration: none;
  font-weight: 700;
}

.page-header .back:hover { text-decoration: underline; }

.page-body {
  padding: 56px 32px;
  max-width: 68ch;
}

.page-body h2 {
  font-size: 2.2rem;
  margin: 0 0 28px;
  letter-spacing: -0.01em;
}

.page-body h2 + h2 {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.page-body h3 {
  font-size: 1.05rem;
  margin: 36px 0 10px;
  letter-spacing: -0.005em;
}

.page-body address {
  font-style: normal;
  margin: 0 0 32px;
}

.page-body p {
  margin: 0 0 20px;
  color: var(--ink);
}

.page-body .placeholder {
  color: var(--muted);
  font-style: italic;
}

.page-body dl {
  display: grid;
  grid-template-columns: 180px 1fr;
  row-gap: 14px;
  column-gap: 16px;
  margin: 0 0 32px;
}

.page-body dt { color: var(--muted); }
.page-body dd { margin: 0; }

/* ---------- Mobile ---------- */

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero-mark { border-right: none; border-bottom: 1px solid var(--line); padding: 36px; }
  .hero-text { padding: 36px 24px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tile { border-right: 1px solid var(--line); min-height: 160px; padding: 24px; }
  .tile:nth-child(2n) { border-right: none; }
  .page-body dl { grid-template-columns: 1fr; row-gap: 4px; }
  .page-body dt { margin-top: 12px; font-weight: 700; }
}
