:root{
  --bg: #ffffff;
  --bg-raised: #f4f4f4;
  --line: #d8d8d8;
  --text: #111111;
  --muted: #555555;
  --muted-2: #8a8a8a;
  --accent-a: #111111;
  --accent-b: #111111;
  --radius: 0px;
  --maxw: 1440px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a{ color: inherit; text-decoration: none; }

.eyebrow{
  font-family: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

h1,h2,h3,.display{
  font-family: inherit;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.4em;
}

/* ---------- language toggle ---------- */
html.lang-en [data-lang="de"]{ display:none; }
html.lang-de [data-lang="en"]{ display:none; }
[data-lang]{ display:block; }

/* ---------- nav ---------- */
.site-nav{
  position: sticky;
  top:0;
  z-index: 50;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 22px clamp(20px, 5vw, 64px);
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand{
  font-weight: 700;
  font-size: 1.02rem;
}
.brand span{ color: var(--muted); font-weight: 400; }

.nav-links{
  display:flex;
  align-items:center;
  gap: clamp(16px, 3vw, 34px);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav-links a{
  color: var(--muted);
  position: relative;
  padding: 4px 0;
  transition: color .2s ease;
}
.nav-links a:hover, .nav-links a.active{ color: var(--text); }
.nav-links a.active::after{
  content:"";
  position:absolute;
  left:0; right:0; bottom:-2px;
  height:1px;
  background: var(--text);
}

#lang-toggle{
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 6px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease;
}
#lang-toggle:hover{ border-color: var(--text); color: var(--text); }

.menu-toggle{ display:none; }

@media (max-width: 720px){
  .nav-links{ gap: 14px; font-size: 0.7rem; }
}

/* ---------- hero ---------- */
.hero{
  position: relative;
  min-height: 78vh;
  display:flex;
  align-items:center;
  padding: 40px clamp(20px, 5vw, 64px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero > img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit: cover;
  object-position: center center;
  z-index: 0;
}
.hero::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(rgba(255,255,255,0.35), rgba(255,255,255,0.85));
  z-index: 1;
  pointer-events: none;
}
.hero-canvas{
  position:absolute; inset:0;
  width:100%; height:100%;
  opacity: 0.5;
  z-index: 1;
}
.hero-content{ position:relative; z-index:2; max-width: 1000px; }
.hero .eyebrow{ margin-bottom: 18px; display:block; }
.hero h1{
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.02;
}
.hero p.lede{
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  max-width: 760px;
  margin-top: 18px;
}

/* ---------- layout helpers ---------- */
.wrap{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 64px);
}

section.page-header{
  position: relative;
  overflow: hidden;
  min-height: 34vh;
  display:flex;
  align-items:center;
  padding: 0;
  border-bottom: 1px solid var(--line);
}
section.page-header > img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit: cover;
  object-position: center center;
  z-index: 0;
}
section.page-header::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(rgba(255,255,255,0.4), rgba(255,255,255,0.88));
  z-index: 1;
  pointer-events: none;
}
section.page-header .page-header-content{
  position: relative;
  z-index: 2;
  padding: 56px clamp(20px, 5vw, 64px);
}
section.page-header h1{ font-size: clamp(2rem, 5vw, 3.1rem); }
section.page-header p.lede{ color: var(--muted); max-width: 640px; }

/* ---------- project blocks ---------- */
.project{
  padding: 88px 0;
  border-bottom: 1px solid var(--line);
  display:grid;
  grid-template-columns: 260px 1fr;
  gap: 56px;
}
.project:last-of-type{ border-bottom:none; }

.project-meta{ position: sticky; top: 96px; align-self:start; }
.project-meta .dotmark{ margin-bottom: 16px; }
.project-meta .eyebrow{ margin-bottom: 6px; }
.project-meta .year{ color: var(--muted-2); font-size:0.78rem; }

.project-body h2{ font-size: clamp(1.5rem, 3vw, 2.1rem); }
.project-body .desc{ max-width: 1000px; }
.project-body .desc p{ margin: 0 0 1em; color: var(--text); }
.project-body .desc[data-lang="de"] p{ color: var(--muted); }

.media-grid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: start;
  gap: 22px;
  margin: 26px 0 10px;
}
.media-grid.cols-2{ grid-template-columns: repeat(2,1fr); }
.media-grid.cols-4{ grid-template-columns: repeat(2,1fr); }

.caption{
  color: var(--muted-2);
  font-size: 0.85rem;
  margin-top: 10px;
  max-width: 680px;
}

@media (max-width: 860px){
  .project{ grid-template-columns: 1fr; gap: 22px; }
  .project-meta{ position:static; }
  .media-grid{ grid-template-columns: repeat(2,1fr) !important; }
}

/* ---------- placeholder media frame (point-cloud) ---------- */
.frame{
  position: relative;
  aspect-ratio: 4/3; /* fallback box for placeholder canvases; real images override this below */
  background: transparent;
  border: none;
  border-radius: var(--radius);
  overflow: hidden;
}
/* once a frame holds a real <img>, drop the fixed box so the image keeps its
   own natural aspect ratio instead of being letterboxed unevenly */
.frame:has(img){
  aspect-ratio: auto;
}
.frame canvas{ position:absolute; inset:0; width:100%; height:100%; }
.frame .frame-label{
  position:absolute;
  left:10px; bottom:10px;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(17,17,17,0.45);
  z-index: 2;
}
.frame.video::after{
  content: "▶";
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  font-size: 1.4rem;
  color: rgba(17,17,17,0.55);
  z-index:2;
  pointer-events: none;
}
/* once a real <video> or <iframe> embed is inside, the overlay icon isn't
   needed at all — the player has its own play button */
.frame.video:has(video)::after,
.frame.video:has(iframe)::after{
  display: none;
}

/* real images: natural size, no forced box, no cropping, no letterbox gaps */
.frame img{
  position: static;
  width: 100%;
  height: auto;
  display: block;
}
/* real video tags (not the iframes) still need to fill their own fixed-ratio wrapper */
.frame video{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit: contain;
  display:block;
}

/* ---------- media protection (basic deterrent, not real DRM) ---------- */
.frame img, .frame video, .frame canvas{
  -webkit-user-select:none;
  -moz-user-select:none;
  user-select:none;
  -webkit-user-drag:none;
}
/* images: block pointer entirely so right-click hits the frame, not the <img> itself */
.frame img{ pointer-events:none; }
/* video keeps pointer-events so the controls stay clickable */
.frame{ -webkit-touch-callout:none; }

/* ---------- about page ---------- */
.about-grid{
  display:grid;
  grid-template-columns: 300px 1fr;
  gap: 64px;
  padding: 72px 0;
}
.about-portrait .frame{ aspect-ratio: 3/4; }
.about-name{ font-size: 1.6rem; margin-top: 20px; }
.about-role{ color: var(--muted); font-size:0.8rem; letter-spacing:0.08em; text-transform:uppercase; margin-top:6px;}
.about-contact{ color: var(--muted); font-size: 0.92rem; margin-top: 10px; }

.about-bio p{ max-width: 680px; margin: 0 0 1.1em; }
.about-bio [data-lang="de"] p{ color: var(--muted); }

.subsection{ padding: 56px 0; border-top: 1px solid var(--line); }
.subsection h3{ font-size: 1.5rem; margin-bottom: 28px; }

.list-entry{
  display:grid;
  grid-template-columns: 1fr;
  gap: 4px;
  padding: 18px 0;
  border-bottom: 1px dashed var(--line);
}
.list-entry:last-child{ border-bottom:none; }
.list-entry .lt{ font-weight: 600; }
.list-entry .ls{ color: var(--muted); font-size: 0.92rem; }

.skills-grid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}
.skills-grid h4{
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin: 0 0 10px;
}
.skills-grid p{ color: var(--muted); margin:0; }

@media (max-width: 860px){
  .about-grid{ grid-template-columns: 1fr; gap: 28px; }
  .skills-grid{ grid-template-columns: 1fr; gap: 24px; }
}

/* ---------- footer ---------- */
footer{
  padding: 48px clamp(20px,5vw,64px) 100px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted-2);
  font-size: 0.78rem;
}
.back-to-top{
  border:1px solid var(--line);
  padding: 8px 14px;
  border-radius: var(--radius);
  color: var(--muted);
  transition: border-color .2s ease, color .2s ease;
}
.back-to-top:hover{ border-color: var(--text); color: var(--text); }