@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700&family=Roboto:wght@400;500;700;900&display=swap');

:root {
  --background: #ffffff;
  --beige: #f5f0eb;
  --fashion-panel: #f4e6e7;
  --ink: #211d1b;
  --muted: #655e59;
  --line: #ddd7d1;
  --content-width: 860px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: 'Josefin Sans', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body:has(.project-dialog[open]) {
  overflow: hidden;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: 'Roboto', sans-serif;
}

a {
  color: inherit;
}

/* Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: var(--beige);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 25px 24px;
}

.brand {
  font-family: 'Roboto', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-decoration: none;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 19px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.nav-links a {
  border-bottom: 1px solid transparent;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  border-bottom-color: var(--ink);
}

/* Grundlayout */
section,
.footer {
  max-width: var(--content-width);
  margin: 0 auto;
  padding-right: 24px;
  padding-left: 24px;
}

.section-border {
  border-top: 1px solid var(--line);
}

/* Startbereich */
.hero {
  padding-top: 72px;
  padding-bottom: 64px;
}

.eyebrow {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero h1 {
  margin-bottom: 0;
  font-size: clamp(2.5rem, 6vw, 4.1rem);
  font-weight: 900;
  letter-spacing: 0.035em;
  line-height: 0.98;
  text-transform: uppercase;
}

.role {
  margin-top: 16px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  font-weight: 400;
  letter-spacing: 0.035em;
}

.hero-text {
  max-width: 49ch;
  margin-top: 25px;
  margin-bottom: 0;
  font-size: 0.98rem;
  line-height: 1.65;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding: 11px 15px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #ffffff;
  font-family: 'Roboto', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 150ms ease, color 150ms ease;
}

.button:hover,
.button:focus-visible {
  background: transparent;
  color: var(--ink);
}

/* Hintergrundlabels bei den Abschnittsüberschriften */
.section-label {
  display: inline-block;
  margin-bottom: 17px;
  padding: 5px 9px;
  background: var(--beige);
  font-family: 'Roboto', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.15;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 13px;
  font-size: clamp(1.55rem, 3.5vw, 2.15rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.14;
}

/* Über mich */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(210px, 0.65fr);
  gap: 48px;
  align-items: start;
  padding-top: 55px;
  padding-bottom: 55px;
}

.about-copy > p:not(.section-label) {
  max-width: 57ch;
  margin-bottom: 16px;
}

.portrait-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  padding: 16px;
  border: 1px dashed #c9c1ba;
  background: var(--beige);
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

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

/* Projekte */
.projects {
  padding-top: 55px;
  padding-bottom: 56px;
}

.section-intro > p:last-child {
  max-width: 61ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

/* Drei kompakte Karten pro Reihe auf großem Desktop */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.project-card:hover,
.project-card:focus-visible {
  box-shadow: 5px 6px 0 var(--beige);
  outline: none;
  transform: translate(-2px, -2px);
}

.project-card:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* Informationsdesign-Karten */
.project-image {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--beige);
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.4;
  text-align: center;
}

/* Modedesign-Karten */
.fashion-card .project-image {
  background: var(--fashion-panel);
}

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

.project-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 12px;
}

.project-meta {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.61rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  line-height: 1.25;
  text-transform: uppercase;
}

.project-title {
  display: block;
  margin-bottom: 6px;
  font-family: 'Roboto', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.project-description {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

/* Kontakt */
.footer {
  padding-top: 55px;
  padding-bottom: 64px;
}

.footer h2 {
  margin-bottom: 27px;
}

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

.contact-item {
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.contact-label {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-item > p:last-child,
.contact-item a {
  margin-bottom: 0;
  font-size: 0.9rem;
  text-decoration: none;
}

.contact-item a:hover,
.contact-item a:focus-visible {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Großansicht / Diashow der Projekte */
.project-dialog {
  width: min(1000px, calc(100vw - 32px));
  max-width: none;
  max-height: min(790px, calc(100vh - 32px));
  overflow: auto;
  padding: 0;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.project-dialog::backdrop {
  background: rgba(33, 29, 27, 0.62);
  backdrop-filter: blur(2px);
}

.dialog-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  background: var(--beige);
}

.dialog-count {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.dialog-close,
.gallery-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  font-family: 'Roboto', sans-serif;
  cursor: pointer;
}

.dialog-close {
  width: 30px;
  height: 30px;
  font-size: 1.25rem;
  line-height: 1;
}

.dialog-close:hover,
.dialog-close:focus-visible,
.gallery-button:hover,
.gallery-button:focus-visible {
  background: var(--ink);
  color: #ffffff;
}

.dialog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(230px, 0.5fr);
}

.dialog-gallery {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  min-height: 440px;
  padding: 18px;
  background: var(--beige);
}

.dialog-gallery img {
  width: 100%;
  max-height: 570px;
  object-fit: contain;
}

.gallery-button {
  width: 32px;
  height: 32px;
  font-size: 1.05rem;
}

.gallery-prev {
  justify-self: start;
}

.gallery-next {
  justify-self: end;
}

.dialog-copy {
  padding: 29px 24px;
}

.dialog-meta {
  margin-bottom: 11px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.dialog-copy h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.dialog-copy > p:not(.dialog-meta):not(.dialog-hint) {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.58;
}

.dialog-hint {
  margin-top: 28px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.45;
}

/* Tablet: zwei Projektkarten pro Reihe */
@media (max-width: 820px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .project-content {
    padding: 14px;
  }

  .project-title {
    font-size: 0.94rem;
  }

  .project-description {
    font-size: 0.81rem;
  }
}

@media (max-width: 740px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .dialog-layout {
    grid-template-columns: 1fr;
  }

  .dialog-gallery {
    min-height: 310px;
  }
}

/* Smartphone: eine Projektkarte pro Reihe */
@media (max-width: 590px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 19px 20px;
  }

  .nav-links {
    gap: 8px 15px;
    flex-wrap: wrap;
    font-size: 0.74rem;
  }

  section,
  .footer {
    padding-right: 20px;
    padding-left: 20px;
  }

  .hero {
    padding-top: 54px;
    padding-bottom: 52px;
  }

  .hero h1 {
    font-size: clamp(2.25rem, 13vw, 3.2rem);
  }

  .role {
    font-size: 0.98rem;
  }

  .about {
    grid-template-columns: 1fr;
    gap: 29px;
    padding-top: 43px;
    padding-bottom: 43px;
  }

  .portrait-slot {
    max-width: 255px;
  }

  .projects,
  .footer {
    padding-top: 43px;
    padding-bottom: 46px;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 24px;
  }

  .project-content {
    padding: 15px;
  }

  .project-title {
    font-size: 0.97rem;
  }

  .project-description {
    font-size: 0.84rem;
  }

  .project-dialog {
    width: min(100vw - 20px, 1000px);
    max-height: calc(100vh - 20px);
  }

  .dialog-topbar {
    padding: 10px 12px;
  }

  .dialog-gallery {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    min-height: 250px;
    padding: 10px;
  }

  .dialog-copy {
    padding: 22px 18px;
  }
}