/* ── 1. VARIABLEN ────────────────────────────────────────────────── */


:root {
  --hintergrund: #000;
  --text: #ffffff;
  --text-2: rgba(255,255,255,0.72);
  --trennlinie: rgba(255,255,255,0.12);
  --maximale-breite: 1680px;
  --header-bg: rgba(0,0,0,0.7);
}

@media (prefers-color-scheme: light) {
  :root {
    --hintergrund: #f5f5f5;
    --text: #111111;
    --text-2: rgba(0,0,0,0.6);
    --trennlinie: rgba(0,0,0,0.12);
    --header-bg: rgba(245,245,245,0.85);
  }
  body { background: var(--hintergrund); color: var(--text); }
  header { background: var(--header-bg) !important; }
  /* Header-Nav: Name, Home/Work/About, E-Mail */
  .portfolio-name { color: #111111; }
  .social-media a { color: #111111; }
  .kontaktfeld a { color: #111111; }
  .social-media a:hover::after, .social-media a.active::after { background: #111111; }
  /* Projekt-Filter: Alle / CGI / Typografie / Raum */
  .filter-btn { color: rgba(0,0,0,0.35); }
  .filter-btn:hover, .filter-btn.active { color: #111111; }
  .filter-btn.active::after { background: #111111; }
  /* Grid / List Toggle */
  .view-links a { color: rgba(0,0,0,0.35); }
  .view-links a.active, .view-links a:hover { color: #111111; }
  /* Projekt-Kacheln */
  .project-tile { background: var(--hintergrund); }
}


/* ── 2. RESET ────────────────────────────────────────────────────── */

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


/* ── 3. BASIS-ELEMENTE ───────────────────────────────────────────── */

html { scroll-behavior: smooth; }

body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--hintergrund);
  color: var(--text);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-top: 74px;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }


/* ── 4. LAYOUT ───────────────────────────────────────────────────── */

.container {
  width: min(calc(100% - 64px), var(--maximale-breite));
  margin: 0 auto;
}

.section { padding: 10px 0 24px; }

.hero, .work-head, .projects-wrap, .about-section {
  border-inline: 1px solid var(--trennlinie);
}


/* ── 5. HEADER ───────────────────────────────────────────────────── */

header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  padding: 6px 0;
  background: var(--header-bg, rgba(0,0,0,0.7));
  border-inline: 1px solid var(--trennlinie);
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  min-height: 56px;
}

.portfolio-name, .kontaktfeld, .social-media { font-size: 0.95rem; color: var(--text); }
.kontaktfeld { text-align: right; }

.social-media { display: flex; gap: 20px; flex-wrap: wrap; }

.social-media a {
  position: relative;
  padding-bottom: 4px;
}

.social-media a:hover::after,
.social-media a.active::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--text);
}


/* ── 6. HERO ─────────────────────────────────────────────────────── */

.hero { padding: 20px 0 6px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.7fr;
  align-items: start;
  min-height: 210px;
}

.hero-title {
  font-size: clamp(3rem, 7vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  font-weight: 500;
  overflow: hidden;
  white-space: nowrap;
}

.hero-text {
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.35;
  max-width: 420px;
  text-align: justify;
  padding-top: 10px;
}

.hero-side {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 20px;
  padding-top: 10px;
  font-size: 0.95rem;
  text-align: right;
}

.social-media {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}



/* ── 7. HAUPTVIDEO ───────────────────────────────────────────────── */

.hauptvideo {
  max-width: 100vw;
  width: 100%;
  height: 100vh;
  object-fit: cover;
  display: block;
  margin-top: -74px;
}


/* ── 8. WORK / FILTER ────────────────────────────────────────────── */


#work {
  padding-top: 100px;
  padding-bottom: 40px;
}

.work-head {
  padding-top: 80px;
  padding-bottom: 8px;
}

.work-head-grid {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}

.work-head h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.filter-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
}

.filter-btn {
  position: relative;
  font-size: 1.05rem;
  color: var(--text-2);
  padding: 0 0 4px 0;
  transition: color 0.2s ease;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  vertical-align: baseline;
  display: inline;
}

.filter-btn:hover,
.filter-btn.active { color: var(--text); }

.filter-btn.active::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--text);
}

.view-links { display: flex; gap: 40px; align-items: center; }

.view-links a {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  color: var(--text-2);
  transition: color 0.2s ease;
  cursor: pointer;
}

.view-links a.active,
.view-links a:hover { color: var(--text); }


/* ── 9. PROJEKTE GRID ────────────────────────────────────────────── */

.projects-wrap {
  padding-top: 60px;
  padding-bottom: 140px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: transparent;
}

.projects-grid.hidden { display: none; }

.project-tile {
  position: relative;
  display: block;
  background: var(--hintergrund);
  aspect-ratio: 4 / 3;
  overflow: visible;
  transition: opacity 0.3s ease;
}

.project-tile.tall { aspect-ratio: 4 / 3; }
.project-tile.wide { aspect-ratio: 2 / 1; }

.project-tile__inner {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-origin: center center;
}

.project-tile:hover .project-tile__inner {
  transform: scale(0.9);
}

.project-tile img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.3s ease;
}

.project-tile video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.project-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  background: linear-gradient(to top, rgba(22,22,22,0.72), rgba(0,0,0,0.08) 20%, transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.project-overlay span { font-size: 0.85rem; color: rgba(255,255,255,0.76); margin-bottom: 6px; }
.project-overlay h3 { font-size: 1.1rem; font-weight: 500; color: #fff; }

.project-tile:hover .project-overlay { opacity: 1; }



/* ── 10. PROJEKTE LISTE ──────────────────────────────────────────── */

.projects-list {
  display: none;
  flex-direction: column;
}

.projects-list.visible { display: flex; }

.list-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2.5rem;
  padding: 22px 0;
  border-bottom: 1px solid var(--trennlinie);
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.list-item:first-child { border-top: 1px solid var(--trennlinie); }
.list-item:hover { opacity: 0.7; }

.list-item__thumb {
  width: 340px;
  height: 210px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.list-item__info {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.list-item__title {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.01em;
}

.list-item__category {
  font-size: 0.9rem;
  color: var(--text-2);
  letter-spacing: 0.02em;
}

.list-item__year {
  font-size: 0.9rem;
  color: var(--text-2);
}


/* ── 11. ABOUT ───────────────────────────────────────────────────── */

.about-section { padding: 0 0 80px; }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.about-section h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}

.about-copy p {
  color: var(--text);
  font-size: 1rem;
  text-align: justify;
  line-height: 1.5;
  max-width: 650px;
  margin-bottom: 16px;
}


/* ── 12. FOOTER ──────────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--trennlinie);
  padding: 18px 0 30px;
  color: var(--text-2);
  font-size: 0.92rem;
}

.footer-grid { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }


/* ── 13. RESPONSIVE ──────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .hero-grid, .about-grid { grid-template-columns: 1fr; }
  .work-head-grid { gap: 16px; }
  .topbar { grid-template-columns: 1fr auto 1fr; gap: 12px; }
  .kontaktfeld { text-align: right; }
  .social-media { justify-content: flex-start; padding-top: 0; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .list-item__thumb { width: 220px; height: 138px; }
}


@media (max-width: 700px) {
  .topbar { min-height: unset; padding: 8px 0; }header { padding: 6px 0; }
  .hero-title {font-size: 2rem; }
  .hero-text { font-size: 1rem; max-width:80%;}
  .hero-grid { min-height: unset; gap: 12px;}
  .container { width: min(calc(100% - 32px), var(--maximale-breite)); }
  header, .hero, .work-head, .projects-wrap, .about-section { border-inline: none; }
  .social-media { gap: 10px; }
  .hero-side { align-items: flex-start; justify-content: flex-start; text-align: left; font-size: 1rem; padding-bottom: 20px;}
  .topbar { grid-template-columns: 1fr auto 1fr; align-items: center; }
  .portfolio-name, .kontaktfeld, .social-media { font-size: .78rem; }
  .view-links { gap: 240px; display: none; }
  .projects-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 10px; padding-bottom: 10px; }
  .work-head-grid { flex-direction: column; align-items: flex-start; gap: 12px; }
  #work { padding-top: 32px; }
  .work-head { padding-top: 24px; padding-bottom: 0; }
  .section { padding-bottom: 0 !important; }
  .projects-wrap { padding-top: 16px !important; padding-bottom: 60px !important; }
  .filter-btn { font-size: 01rem; }
  .filter-links { justify-content: flex-start; }
  .list-item { flex-direction: column; align-items: flex-start; padding: 16px 0; }
  .list-item__thumb { width: 100%; height: auto; aspect-ratio: 16/9; }
  .list-item__info { width: 100%; }
   .hauptvideo {
    height: auto;
    max-height: 100%;
    object-fit: contain;
    margin-top: 0;
  }
  .about-copy p { font-size: 01rem; max-width:80% ; }
  .about-grid { gap: 8px; }
.about-section h2 { margin-bottom: 8px; }
}

/* ── 14. PROJEKT-DETAIL (project.html) ───────────────────────────── */

/* Header-Klassen in project.html (Aliase zu den Index-Klassen) */
.brand,
.role,
.contact,
.top-links {
  font-size: 0.95rem;
  color: var(--text);
}

.top-links {
  display: flex;
  gap: 20px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.top-links a {
  position: relative;
  padding-bottom: 4px;
}

.top-links a:hover::after,
.top-links a.active::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--text);
}

.contact { text-align: right; }

/* Projekt-Layout */
.project-page {
  border-left: 1px solid var(--trennlinie);
  border-right: 1px solid var(--trennlinie);
  padding-top: 42px;
  padding-bottom: 90px;
}

.project-section-grid { display: block; }

.project-copy { max-width: 50%; }

/* Vollbreite-Bild & Video */
.project-image-full {
  margin-top: 0;
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.project-image-full img {
  width: 100%;
  height: auto;
  display: block;
}

.project-video-full {
  margin-top: 0;
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  aspect-ratio: 16 / 9;
}

.project-video-full iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Titel & Text */
.project-title {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  font-weight: 500;
  margin-bottom: 34px;
}

.project-copy p {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.55;
  max-width: 760px;
  margin-bottom: 22px;
}

/* Meta-Grid */
.project-meta {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 26px 36px;
  margin-top: 34px;
  padding-top: 28px;
}

.project-meta div {
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.45;
}

.project-meta strong {
  display: block;
  color: var(--text-2);
  margin-bottom: 8px;
  font-weight: 500;
}

/* Nächstes Projekt */
.project-next {
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--trennlinie);
}

.project-next__label {
  display: block;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 500;
  margin-bottom: 14px;
}

.project-next__link {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  color: var(--text);
  transition: opacity 0.2s ease;
}

.project-next__link:hover { opacity: 0.72; }

.project-next__thumb {
  width: 240px;
  height: 180px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  background: var(--trennlinie);
}

.project-next__title {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.project-next__arrow {
  font-size: 1rem;
  color: var(--text-2);
  margin-left: 2px;
}

/* Responsive: project.html */
@media (max-width: 1100px) {
  .project-copy { max-width: 100%; }
}

@media (max-width: 700px) {
  header.project-page { border-left: none; border-right: none; }
  .project-page { border-left: none; border-right: none; }
  .top-links { gap: 10px; }
  .brand, .contact, .top-links { font-size: .78rem; }
  .project-meta { grid-template-columns: 1fr 1fr 1fr; gap: 16px 20px; }
  .project-page { padding-top: 28px; padding-bottom: 60px; }
  .project-copy p { font-size: .78rem; }
  .project-meta div { font-size: .78rem; }
  .project-meta { margin-top: 16px; padding-top: 14px; } 
}

/* Light Mode: project.html */
@media (prefers-color-scheme: light) {
  .top-links a:hover::after,
  .top-links a.active::after { background: #111111; }
  .project-meta div { color: var(--text); }
  .project-meta strong { color:var(--text-2) }
}


/* Grid/List-Buttons temporär ausgeblendet */
.view-links {
  display: none;
}