/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-text: #000;
  --color-text-muted: #8a8a8a;
  --color-accent: #c30;
  --color-bg: #fff;
  --color-border: #ccc;
  --color-hover-bg: #e6e6e6;
  --font-main: "ff-din-paneuropean", sans-serif;
  --max-width: 960px;
  --spacing: 20px;
}

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

body {
  font-family: var(--font-main);
  font-weight: 400;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
}

a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
}

a:hover {
  color: var(--color-text);
  background-color: var(--color-hover-bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

hr {
  border: none;
  border-top: 1px dotted var(--color-border);
  margin: var(--spacing) 0;
}

/* === Layout === */
.site-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing);
}

/* === Header === */
.site-header {
  padding: var(--spacing) 0 30px;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
}

/* === Navigation === */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-family: var(--font-main);
  font-size: 1rem;
  cursor: pointer;
  padding: 8px 0;
  color: var(--color-text-muted);
}

.nav-toggle:hover {
  color: var(--color-text);
}

.site-nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.site-nav li a {
  display: block;
  padding: 4px 12px 4px 0;
  color: var(--color-text-muted);
}

.site-nav li a:hover {
  background-color: var(--color-hover-bg);
  color: var(--color-text);
}

.site-nav li a[aria-current="page"] {
  color: var(--color-text);
}

/* === Main Content === */
.main-content {
  padding: 0 0 var(--spacing);
}

.page-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--spacing);
}

/* === Slideshow === */
.slideshow {
  position: relative;
  width: 100%;
  aspect-ratio: 960 / 638;
  overflow: hidden;
  margin-bottom: var(--spacing);
}

.slideshow picture {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.slideshow picture.active {
  opacity: 1;
}

.slideshow img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* === Project Grid === */
.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing);
}

.project-card {
  border-top: 1px dotted var(--color-border);
  padding-top: var(--spacing);
}

.project-card:first-child {
  border-top: none;
  padding-top: 0;
}

.project-card h3 {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.project-card h3 a {
  color: var(--color-text-muted);
}

.project-card h3 a:hover {
  color: var(--color-text);
}

.project-card picture {
  margin-bottom: 8px;
}

.project-card .sub-projects {
  list-style: none;
  margin-top: 4px;
}

.project-card .sub-projects li a {
  display: inline;
  padding: 2px 0;
}

/* === Project Detail === */
.project-detail {
  max-width: var(--max-width);
}

.project-detail picture {
  margin-bottom: var(--spacing);
}

.project-detail p {
  margin-bottom: 1em;
}

/* === Services (Leistungen) === */
.services-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.service-section {
  border-top: 1px dotted var(--color-border);
  padding: var(--spacing) 0;
}

.service-section h3 {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--color-accent);
  margin-bottom: 10px;
}

.service-section ul {
  list-style: none;
  margin-bottom: 10px;
}

.service-section ul li::before {
  content: "· ";
}

.service-section .service-links {
  padding-left: 10px;
}

.service-section .service-links a {
  margin-right: 8px;
}

/* === Book Projects === */
.book-section {
  border-top: 1px dotted var(--color-border);
  padding: var(--spacing) 0;
}

.book-section h3 {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--color-accent);
  margin-bottom: 10px;
}

.book-section p {
  margin-bottom: 0.5em;
}

/* === Contact === */
.contact-content p {
  margin-bottom: 1em;
}

.contact-content a {
  word-break: break-all;
}

/* === Footer === */
.site-footer {
  border-top: 1px dotted var(--color-border);
  padding: 10px 0;
  margin-top: var(--spacing);
}

.site-footer p {
  font-size: 0.625rem;
}

/* === Responsive: Tablet (640px+) === */
@media (min-width: 640px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-card {
    border-top: 1px dotted var(--color-border);
    padding-top: var(--spacing);
  }

  .project-card:nth-child(-n+2) {
    border-top: none;
    padding-top: 0;
  }

  .services-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 0 var(--spacing);
  }
}

/* === Responsive: Desktop (1024px+) === */
@media (min-width: 1024px) {
  .project-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .project-card:nth-child(-n+3) {
    border-top: none;
    padding-top: 0;
  }
}

/* === Responsive: Mobile (<640px) === */
@media (max-width: 639px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    flex-direction: column;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav li a {
    padding: 8px 0;
    border-bottom: 1px dotted var(--color-border);
  }

  .site-title {
    font-size: 1.1rem;
  }
}
