/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root{
  --bg: #f2f2f0;
  --ink: #161513;
  --muted: #8c8a80;
  --hover-bg: #eeece5;
  --subsidebar-w: 150px;
  --edge: 20px; /* Rand rund um das Home-Bild (oben/unten/rechts) */

  /* Schriftgrössen — EINE Stelle für alles. Nie wieder einzeln
     jagen: hier anpassen, überall zieht es nach. */
  --fs-brand: 18px;    /* "Silas Schäfer" oben links */
  --fs-nav: 14px;      /* Hauptmenü + zweite Bar + Contact-Zeilen + Listen */
  --fs-body: 15px;     /* Fliesstext: Biography-Absätze, Contact-Notiz, Section-Labels */
  --fs-heading: 16px;  /* Contact/Publications-Titel, Werktitel */
  --fs-foot: 9px;       /* Copyright */
}


*{ box-sizing: border-box; margin:0; padding:0; }
html, body{ height:100%; }

body{
  background: var(--bg);
  color: var(--ink);
  font-family: 'Neue Haas Grotesk', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  font-size: var(--fs-nav);
  -webkit-font-smoothing: antialiased;
}

a{ color: inherit; }

/* ============================================================
   APP LAYOUT — Sidebar / Flyout-Sidebar / Content
   ============================================================ */
.app{
  display:flex;
  min-height: 100vh;
}

/* ---------- SIDEBAR LEVEL 1 ---------- */
.sidebar--main{
  width: max-content;
  flex-shrink:0;
  display:flex;
  flex-direction:column;
  padding: var(--edge) 22px var(--edge);
  position: sticky;
  top:0;
  height:100vh;
}

.brand{
  all: unset;
  cursor:pointer;
  font-size: var(--fs-brand);
  font-weight:500;
  letter-spacing:-0.01em;
  display:flex;
  align-items:center;
  height:20px;
  margin-bottom:44px;
  white-space:nowrap;
}

.nav-level1{ display:flex; flex-direction:column; gap:2px; }

.nav-item{
  all:unset;
  cursor:pointer;
  font-size: var(--fs-nav);
  font-weight:400;
  letter-spacing:0.01em;
  color: var(--ink);
  padding:4px 8px;
  margin:0 -8px;
  border-radius:3px;
  white-space:nowrap;
}
.nav-item.active{ font-weight:500; }

.sidebar-foot{
  font-size: var(--fs-foot);
  color: var(--muted);
  margin-top:auto;
}

/* ---------- SIDEBAR LEVEL 2 (Flyout) ---------- */
.sidebar--sub{
  width: var(--subsidebar-w);
  flex-shrink:0;
  padding-bottom: var(--edge);
  padding-left: 0px;
  padding-right: 6px;
  position: sticky;
  top:0;
  height:100vh;
  overflow:hidden;
}
.sidebar--sub .nav-level2{
  visibility:hidden;
}
.sidebar--sub.open .nav-level2:not([hidden]){
  visibility:visible;
}

.nav-level2{ display:flex; flex-direction:column; gap:2px; white-space:nowrap; }
.nav-level2[hidden]{ display:none; }
.nav-item--sub{
  font-size: var(--fs-nav);
}
.nav-item--sub.active{ font-weight:500; }

/* ---------- CONTENT ---------- */
.content{
  flex:1;
  min-width:0;
  padding: 32px 48px 90px;
  position: relative;
}

.about-wrap,
.contact-wrap,
.pub-wrap,
.work-project{
  max-width: 760px;
  width:100%;
  margin: 0 auto;
}

.view{ display:none; }
.view.active{ display:block; }

/* ---------- HOME ---------- */
.view[data-view="home"].active{
  position: absolute;
  top: var(--edge);
  right: var(--edge);
  bottom: var(--edge);
  left: 0;
}
.home-image{
  width:100%;
  height:100%;
}
.home-image img{
  width:100%;
  height:100%;
  object-fit: contain;
  object-position: right center;
  display:block;
}

/* ---------- WORKS: leer / coming soon ---------- */
.work-empty{
  padding-top: 20vh;
  color: var(--muted);
  font-size: var(--fs-nav);
  font-style: italic;
}

/* ---------- WORKS: einzelnes Projekt ---------- */
.work-title{
  font-size: var(--fs-heading);
  font-weight:500;
  margin-bottom:24px;
}
.work-scroll{
  display:flex;
  flex-direction:column;
  gap: 40px;
  max-width: 900px;
}
.work-scroll figure img{
  width:100%;
  height:auto;
  display:block;
}

/* ---------- ABOUT ---------- */
.about-text{
  max-width:620px;
}
.about-portrait{
  width:200px;
  margin-left:auto;
  margin-bottom:32px;
}
.about-portrait img{
  width:100%;
  height:auto;
  display:block;
}

.about-block{
  margin-bottom:40px;
  scroll-margin-top: 32px;
}
.about-block-label{
  font-size: var(--fs-body);
  font-weight:700;
  color: var(--ink);
  margin-bottom:18px;
}
.about-block p{
  font-size: var(--fs-body);
  line-height:1.65;
  color:#2a2924;
  margin-bottom:12px;
}

.cv-list{ list-style:none; }
.cv-list li{
  display:flex;
  gap:18px;
  font-size: var(--fs-nav);
  padding:4px 0;
}
.cv-year{
  color: var(--ink);
  flex-shrink:0;
  width:80px;
}

/* ---------- CONTACT ---------- */
.view[data-view="contact"].active{
  margin-top: 52px;
}

.contact-wrap h1{ font-size: var(--fs-heading); font-weight:500; margin-bottom:16px; }
.contact-note{ font-size: var(--fs-body); line-height:1.65; margin-bottom:18px; color:#2a2924; max-width:480px; }
.contact-line{ font-size: var(--fs-nav); margin-bottom:6px; }
.contact-line a{ text-decoration:none; }
.contact-line a:hover{ color: var(--muted); }
.contact-image{
  width:280px;
  margin-top:32px;
}
.contact-image img{
  width:100%;
  height:auto;
  display:block;
}

/* ---------- PUBLICATIONS ---------- */
.pub-wrap h1{ font-size: var(--fs-heading); font-weight:500; margin-bottom:18px; }
.pub-list{ list-style:none; }
.pub-list li{
  display:flex;
  gap:18px;
  font-size: var(--fs-nav);
  padding:5px 0;
}
.pub-year{
  color: var(--ink);
  flex-shrink:0;
  width:50px;
}

.mobile-copyright{
  display:none;
}

/* ============================================================
   RESPONSIVE — Mobile
   ============================================================ */
@media (max-width: 780px){
  .mobile-copyright{
    display:block;
    text-align:center;
    font-size: var(--fs-foot);
    color: var(--muted);
    padding: 20px 20px 36px;
  }

  .app{ flex-direction:column; }

  .sidebar--main{
    position:relative;
    height:auto;
    width:100%;
    flex-direction:row;
    align-items:center;
    flex-wrap:wrap;
    padding: 14px 18px;
  }
  .brand{ margin-bottom:0; margin-right:auto; }
  .nav-level1{ flex-direction:row; gap:4px; }
  .sidebar-foot{ display:none; }

  .sidebar--sub{
    position:relative;
    height:auto;
    width:100%;
    padding:0 18px;
    padding-top:0 !important;
  }
  .sidebar--sub:not(.open){
    width:0;
    padding:0;
    height:0;
    overflow:hidden;
  }
  .sidebar--sub.open{
    width:100%;
    padding:12px 18px;
  }
  .nav-level2{ flex-direction:row; flex-wrap:wrap; gap:8px 14px; }

  .content{
    padding: 24px 18px 70px;
    display:block;
  }

  .view[data-view="home"].active{
    position: static;
    padding:0;
  }
  .home-image{
    height: 60vh;
  }

  .about-wrap{ margin-left:0; }
  .about-block{ margin-bottom:36px; }
}