*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --cream: #f4f0e8;
  --ink: #1a1612;
  --rust: #b85c38;
  --sand: #d4c9b0;
  --muted: #7a7060;
  --nav-h: 72px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Mono', monospace;
  background: var(--cream);
  color: var(--ink);
  overflow-x: hidden;
}

/* ── HEADER ── */
#hero {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: #2b130c;
  transition: height 0.6s cubic-bezier(0.77,0,0.18,1), background 0.4s;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#hero.expanded { height: 100vh; }

.hero-inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.06'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

#hero:not(.expanded) video { opacity: 0; transition: opacity 0.4s; }
#hero video { transition: opacity 0.4s; }

.nav-collapsed-content {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  z-index: 2;
  white-space: nowrap;
}

.nav-collapsed-content span {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.2rem, 3vw, 2.5rem);
  font-weight: 400;
  letter-spacing: 0.05em;
  color: #ffffff;
}

#hero:not(.expanded) .nav-collapsed-content { opacity: 1; }

/* ── HAMBURGER ── */
#menu-btn {
  position: fixed;
  top: 20px;
  left: 24px;
  z-index: 999;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

#menu-btn.visible { opacity: 1; pointer-events: all; }

#menu-btn span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: #b85c38;
  transition: transform 0.3s, opacity 0.3s;
}

body.menu-open #menu-btn span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
body.menu-open #menu-btn span:nth-child(2) { opacity: 0; }
body.menu-open #menu-btn span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── NAV DRAWER ── */
#nav-drawer {
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  width: 280px;
  background: var(--ink);
  z-index: 900;
  transform: translateX(-100%);
  transition: transform 0.5s cubic-bezier(0.77,0,0.18,1);
  padding: 100px 40px 40px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-right: 1px solid rgba(255,255,255,0.06);
}

body.menu-open #nav-drawer { transform: translateX(0); }

#nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 800;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
  backdrop-filter: blur(2px);
}

body.menu-open #nav-overlay { opacity: 1; pointer-events: all; }

.nav-section-label {
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  margin-top: 16px;
}

#nav-drawer a {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 300;
  color: var(--cream);
  text-decoration: none;
  line-height: 1.2;
  transition: color 0.2s, padding-left 0.2s;
}

#nav-drawer a:hover { color: var(--rust); padding-left: 8px; }

/* ── SECTIONS ── */
main { position: relative; }

.section {
  min-height: 100vh;
  padding: 100px 8vw;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  scroll-margin-top: var(--nav-h);
}

.section:nth-child(odd)  { background: var(--cream); }
.section:nth-child(even) { background: #edeae0; }

.section-number {
  font-size: 0.6rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2rem;
}

.section h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.8rem, 7vw, 6rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
  max-width: 700px;
}

.section h2 em { color: var(--rust); font-style: italic; }

.section p {
  font-size: 0.78rem;
  line-height: 1.9;
  color: var(--muted);
  max-width: 480px;
  margin-bottom: 1.5rem;
}

/* ── WALKING STAR ──
   position:fixed direkt im body → kein Stacking Context schneidet ab.
   Wrapper 600px breit, overflow:visible.
   Größe + transform werden per JS pro Frame gesetzt (siehe index.html).
*/
#star-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 600px;
  height: 420px;
  overflow: visible;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.4s ease;
  transform-origin: center bottom;
}

#star-wrapper.flipped { transform: scaleX(-1); }

#walking-star {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 210px;
  height: 321px;
  transform: translateX(-50%);
  display: block;
  overflow: visible;
}

/* ── GALLERY WALL ── */
.gallery-wall {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 3vw;
  padding-bottom: 60px;
}

.painting {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: var(--top);
  flex: 1;
  max-width: 22%;
  cursor: pointer;
}

.painting::before {
  content: '';
  display: block;
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, #5a4a3a);
}

.frame {
  width: 100%;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s;
}

.frame img, .frame video {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s;
}

.frame:hover { transform: translateY(-6px); }
.frame:hover img { filter: brightness(1) saturate(1.1); transform: scale(1.03); }

.painting-label {
  margin-top: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.painting-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-weight: 300;
  font-style: italic;
  color: #d4c9b0;
  letter-spacing: 0.05em;
}

.painting-year {
  font-size: 0.55rem;
  letter-spacing: 0.3em;
  color: #7a7060;
  text-transform: uppercase;
}

/* ── CONTACT POSTCARD ── */
.postcard-link {
  display: inline-block;
  text-decoration: none;
  margin-top: 2rem;
}

.postcard {
  position: relative;
  display: inline-block;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.4s ease;
  box-shadow: 4px 6px 20px rgba(0,0,0,0.15);
  border-radius: 2px;
}

.postcard:hover {
  transform: translateY(-6px) rotate(1deg);
  box-shadow: 8px 14px 32px rgba(0,0,0,0.22);
}

.postcard-img {
  display: block;
  width: min(560px, 80vw);
  height: auto;
  border-radius: 2px;
}

.postcard-email {
  position: absolute;
  top: 58%;
  left: 7%;
  width: 42%;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.2rem, 1.2vw, 0.85rem);
  font-style: italic;
  color: #b85c38;;
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
  text-decoration: underline;
}

.postcard-hint {
  position: absolute;
  top: 40%;       /* etwas unterhalb der E-Mail */
  left: 7%;
  width: 42%;
  font-family: 'DM Mono', monospace;
  font-size: 1.2rem;
  color: #1a1612;
  letter-spacing: 0.1em;
  pointer-events: none;
}

.contact-link:hover { color: var(--rust); border-color: var(--rust); }

/* ── BACK TO TOP ── */
.back-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 500;
  width: 48px;
  height: 48px;
  background: var(--ink);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s, transform 0.4s, background 0.2s;
  border-radius: 50%;
}

.back-top.visible { opacity: 1; transform: translateY(0); }
.back-top:hover   { background: var(--rust); }

.back-top svg {
  width: 18px;
  height: 18px;
  stroke: var(--cream);
  fill: none;
  stroke-width: 1.5;
  animation: float 2.5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}

/* ── REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible { opacity: 1; transform: none; }

/* ── CV OVERLAY ── */
#cv-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
}

#cv-overlay.open { display: flex; }

#cv-overlay img {
  max-width: 70vw;
  max-height: 85vh;
  display: block;
}

#cv-close {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100000;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #2b130c;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  transition: background 0.2s;
}

#cv-close.open  { display: flex; }
#cv-close:hover { background: #4a2218; }

#cv-close svg {
  width: 18px;
  height: 18px;
  stroke: #ffffff;
  fill: none;
  stroke-width: 2.5;
}