:root {
  --bg: #0a0a0a;
  --fg: #f2efe9;
  --muted: #8d8a85;
  --line: rgba(242, 239, 233, 0.12);
  --accent: #8ef0b4;   /* light green */
  --accent2: #8cd2ff;  /* light blue */
  --petrol: #1b7f86;   /* petrol */
  --petrol-deep: #0d3d43;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #000; }

/* Loader */
#loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 6vw;
  transition: opacity .8s ease, visibility .8s;
}
#loader.done { opacity: 0; visibility: hidden; }
.loader-count { font-size: clamp(5rem, 22vw, 18rem); font-weight: 800; letter-spacing: -.06em; line-height: .85; font-variant-numeric: tabular-nums; }
.loader-label { font-family: var(--mono); font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: 1.5rem; }

/* Canvas */
#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; display: block; }

/* Header */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.4rem 6vw;
  mix-blend-mode: difference;
}
.logo { font-weight: 800; font-size: 1.25rem; letter-spacing: -.04em; }
.logo span { color: var(--accent); }
.topbar nav { display: flex; gap: 2rem; font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .15em; }
.topbar nav a { opacity: .75; transition: opacity .2s; }
.topbar nav a:hover { opacity: 1; }
.nav-cta { opacity: 1 !important; border-bottom: 1px solid currentColor; }

/* Progress */
.progress {
  position: fixed; right: 6vw; bottom: 2rem; z-index: 20;
  display: flex; align-items: center; gap: .8rem;
  font-family: var(--mono); font-size: .7rem; color: var(--muted);
}
.progress-bar { width: 80px; height: 1px; background: var(--line); position: relative; overflow: hidden; }
.progress-bar i { position: absolute; inset: 0; background: var(--fg); transform-origin: left; transform: scaleX(0); }
#secnum { color: var(--fg); }

/* Sections */
main { position: relative; z-index: 2; }
.sec {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 8rem 6vw;
  position: relative;
}
.inner { width: min(560px, 100%); }
.eyebrow {
  font-family: var(--mono); font-size: .75rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1.6rem; display: flex; gap: 1rem; align-items: center;
}
.eyebrow span { color: var(--accent); }
.eyebrow::after { content: ""; width: 40px; height: 1px; background: var(--petrol); }

h1 { font-size: clamp(4rem, 13vw, 10.5rem); line-height: .86; letter-spacing: -.055em; font-weight: 800; margin-bottom: 2rem; }
h1 .dot, h2 .dot { color: var(--accent); }
h2 { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: .95; letter-spacing: -.045em; font-weight: 800; margin-bottom: 2.5rem; }
h3 { font-size: 1.15rem; letter-spacing: -.01em; font-weight: 700; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: #cfcbc4; max-width: 34ch; margin-bottom: 2.2rem; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .95rem 1.5rem; border-radius: 999px;
  background: var(--fg); color: #0a0a0a; font-weight: 600; font-size: .95rem;
  transition: transform .25s ease, background .25s;
}
.btn:hover { transform: translateY(-2px); background: var(--accent); }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--fg); background: transparent; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; }

.scroll-hint {
  position: absolute; left: 6vw; bottom: 2rem;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center; gap: .8rem;
}
.scroll-hint i { width: 1px; height: 36px; background: linear-gradient(var(--fg), transparent); animation: drip 2s ease-in-out infinite; }
@keyframes drip { 0%,100% { transform: scaleY(.3); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } }

/* Cards */
.cards { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.card { background: rgba(10,10,10,.78); backdrop-filter: blur(8px); padding: 1.5rem 1.6rem; }
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--muted); font-size: .95rem; }

/* Projects */
.project {
  display: block; padding: 1.7rem; margin-bottom: 1rem;
  border: 1px solid var(--line); border-radius: 18px;
  background: rgba(10,10,10,.7); backdrop-filter: blur(8px);
  transition: border-color .3s, transform .3s;
}
.project:hover { border-color: var(--petrol); transform: translateY(-3px); }
.project-head { display: flex; justify-content: space-between; margin-bottom: 1.2rem; }
.tag { font-family: var(--mono); font-size: .7rem; letter-spacing: .15em; text-transform: uppercase; color: var(--accent); }
.arrow { font-size: 1.3rem; transition: transform .3s; }
.project:hover .arrow { transform: translate(3px,-3px); }
.project h3 { font-size: 1.9rem; letter-spacing: -.03em; margin-bottom: .5rem; }
.project p { color: var(--muted); margin-bottom: 1rem; }
.project-link { font-family: var(--mono); font-size: .8rem; border-bottom: 1px solid var(--line); }

/* Timeline */
.timeline { list-style: none; border-left: 1px solid var(--petrol); margin-bottom: 2.5rem; }
.timeline li { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; padding: 0 0 2rem 1.5rem; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -4px; top: .45rem; width: 7px; height: 7px; border-radius: 50%; background: var(--petrol); }
.timeline li:first-child::before { background: var(--accent); box-shadow: 0 0 0 5px rgba(142,240,180,.18); }
.when { font-family: var(--mono); font-size: .75rem; color: var(--muted); padding-top: .25rem; }
.where { color: var(--accent2); font-size: .9rem; margin-bottom: .3rem; }
.timeline p:not(.where) { color: var(--muted); font-size: .95rem; }

/* Contact */
.contact-links { border-top: 1px solid var(--line); }
.contact-big { display: block; font-size: clamp(1.8rem, 4.5vw, 3.2rem); font-weight: 800; letter-spacing: -.04em; padding: 1.4rem 0; border-bottom: 1px solid var(--line); transition: color .25s; word-break: break-all; }
.contact-big:hover { color: var(--accent); }
.contact-row { display: flex; justify-content: space-between; padding: 1.1rem 0; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: .85rem; transition: padding .25s, color .25s; }
.contact-row span:first-child { color: var(--muted); text-transform: uppercase; letter-spacing: .15em; }
.contact-row:hover { padding-left: .6rem; color: var(--accent); }

/* Footer */
.footer {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 2rem 6vw; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: .75rem; color: var(--muted);
}
.footer a:hover { color: var(--fg); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* Legal pages */
.legal { max-width: 720px; margin: 0 auto; padding: 8rem 6vw 4rem; }
.legal h1 { font-size: clamp(2.6rem, 7vw, 4.5rem); }
.legal h2 { font-size: 1.4rem; letter-spacing: -.02em; margin: 2.2rem 0 .8rem; }
.legal p, .legal li { color: #cfcbc4; margin-bottom: .8rem; }
.legal ul { padding-left: 1.2rem; }
.legal a { border-bottom: 1px solid var(--line); }

@media (max-width: 760px) {
  .topbar nav a:not(.nav-cta) { display: none; }
  .sec { padding: 7rem 7vw 6rem; }
  .timeline li { grid-template-columns: 1fr; gap: .3rem; }
  .progress { display: none; }
  .card, .project { background: rgba(10,10,10,.82); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-hint i { animation: none; }
}

h1 small { display: block; font-size: .32em; letter-spacing: -.03em; line-height: 1; margin-bottom: .12em; color: var(--muted); font-weight: 700; }

/* Petrol glow behind content cards */
.card, .project { box-shadow: inset 0 1px 0 rgba(140,210,255,.06); }
.btn.ghost:hover { border-color: var(--accent2); color: var(--accent2); }

/* YouTube facade (loads iframe only after click) */
.video { position: relative; aspect-ratio: 16 / 9; margin-top: 1.2rem; border-radius: 12px; overflow: hidden;
  background: radial-gradient(120% 90% at 20% 10%, rgba(140,210,255,.22), transparent 60%),
              radial-gradient(90% 80% at 90% 100%, rgba(142,240,180,.18), transparent 60%),
              var(--petrol-deep);
  border: 1px solid rgba(27,127,134,.6); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-play { position: absolute; inset: 0; width: 100%; display: flex; align-items: center; gap: 1rem; padding: 1.2rem;
  background: none; border: 0; color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
.video-icon { flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); position: relative; transition: transform .25s; }
.video-icon::after { content: ""; position: absolute; left: 22px; top: 18px; border-left: 16px solid #0a0a0a; border-top: 10px solid transparent; border-bottom: 10px solid transparent; }
.video-play:hover .video-icon, .video-play:focus-visible .video-icon { transform: scale(1.08); }
.video-play:focus-visible { outline: 2px solid var(--accent2); outline-offset: -4px; }
.video-text { font-weight: 700; font-size: 1rem; }
.video-text small { display: block; font-weight: 400; font-size: .75rem; color: #b9d6d8; margin-top: .3rem; max-width: 30ch; }
.video-link { display: inline-block; margin-top: .7rem; font-family: var(--mono); font-size: .75rem; color: var(--accent2); }
.tl-link { display: inline-block; margin-top: .3rem; font-family: var(--mono); font-size: .75rem; color: var(--accent2); border-bottom: 1px solid rgba(140,210,255,.3); }
.tl-link:hover { color: var(--accent); }

/* Contact photo */
.contact-photo { width: min(300px, 72%); aspect-ratio: 4 / 5; margin-bottom: 2.4rem; border-radius: 20px; overflow: hidden; position: relative;
  border: 1px solid rgba(27,127,134,.55);
  box-shadow: 0 30px 80px -30px rgba(27,127,134,.55), 0 0 0 6px rgba(142,240,180,.04); }
.contact-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.contact-photo::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(10,10,10,.55)), linear-gradient(135deg, rgba(140,210,255,.10), transparent 40%); }

/* ===== Two-person layout ===== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sec { display: block; }
.t { --c: var(--accent); }    /* Thiemo: light green */
.j { --c: var(--accent2); }   /* Johann: light blue */
.who { font-family: var(--mono); font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--c); margin-bottom: 1.2rem; display: flex; align-items: center; gap: .8rem; }
.who::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 12px var(--c); }
.t .dot, .j .dot { color: var(--c); }
.j .tag { color: var(--c); }
.j .timeline li:first-child::before { background: var(--accent2); box-shadow: 0 0 0 5px rgba(140,210,255,.18); }
.j .project:hover { border-color: var(--accent2); }

/* Hero */
.hero { display: flex; flex-direction: column; justify-content: center; gap: 3rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 6vw; align-items: start; }
.person.j { margin-top: 24vh; text-align: right; }
.person.j .who { justify-content: flex-end; }
.person.j .lead { margin-left: auto; }
.name { font-size: clamp(3.2rem, 8.4vw, 8.2rem); line-height: .86; letter-spacing: -.055em; font-weight: 800; margin-bottom: 1.6rem; }
.name small { display: block; font-size: .3em; letter-spacing: -.02em; line-height: 1; margin-bottom: .15em; color: var(--muted); font-weight: 700; }
.hero .lead { font-size: clamp(1rem, 1.3vw, 1.15rem); max-width: 38ch; }
.hero-foot { display: flex; align-items: center; justify-content: center; gap: 1.2rem; color: var(--muted); font-family: var(--mono); font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; }
.amp { font-family: var(--font); font-size: 2.4rem; font-weight: 800; letter-spacing: 0; text-transform: none; color: var(--petrol); line-height: 1; }
.hero-foot .scroll-hint { position: static; }

/* Paired columns, right column slightly offset */
.pair { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(2.5rem, 9vw, 11rem); align-items: start; }
.col.j { margin-top: 14vh; }
.col h2 { font-size: clamp(2rem, 3.4vw, 3.1rem); margin-bottom: 2rem; }
.col .project { margin-bottom: 1rem; }

/* Chips */
.skills { margin-top: 1rem; border: 1px solid var(--line); border-radius: 18px; }
.skills h3 { margin-bottom: .9rem; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li { font-size: .82rem; padding: .4rem .8rem; border-radius: 999px; border: 1px solid rgba(27,127,134,.6); color: #d8e6e6; background: rgba(13,61,67,.35); }

/* Contact */
.photos { margin-bottom: 3rem; }
.contact-photo { width: min(320px, 100%); margin-bottom: 0; }
.contact-photo.j { justify-self: end; margin-top: 10vh; box-shadow: 0 30px 80px -30px rgba(140,210,255,.35), 0 0 0 6px rgba(140,210,255,.04); }
.contact-photo figcaption { position: absolute; left: 1rem; bottom: .9rem; z-index: 2; font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--fg); }
.contact-body { max-width: 640px; margin: 0 auto; }

@media (max-width: 760px) {
  .hero-grid, .pair { grid-template-columns: minmax(0,1fr); }
  .person.j { margin-top: 1rem; }
  .col.j { margin-top: 4.5rem; padding-top: 2.5rem; border-top: 1px solid var(--line); }
  .hero { gap: 2rem; }
  .hero-foot { justify-content: flex-start; flex-wrap: wrap; }
  .photos { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 1rem; }
  .contact-photo.j { margin-top: 3rem; }
  .contact-photo figcaption { font-size: .6rem; left: .6rem; bottom: .6rem; }
}
.hero { align-items: stretch; padding-top: 7rem; padding-bottom: 3rem; gap: 2rem; }
.person.j { margin-top: 15vh; }
.col .where { color: var(--c); opacity: .85; }
.logo .logo-amp { color: var(--accent2); margin: 0 .04em; }

/* Johann – leadership block */
.quote { margin: 0 0 1.4rem; padding: 1.1rem 0 1.1rem 1.3rem; border-left: 2px solid var(--accent2); }
.quote p { font-size: clamp(1.1rem, 1.6vw, 1.35rem); line-height: 1.35; font-weight: 600; letter-spacing: -.01em; color: var(--fg); }
.quote cite { display: block; margin-top: .5rem; font-style: normal; font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent2); }
.intro { color: #cfcbc4; margin-bottom: 1.6rem; max-width: 46ch; }
.card .chips { margin-top: .8rem; }
.principles { margin-top: 1rem; padding: 1.4rem 1.6rem; border: 1px solid rgba(27,127,134,.55); border-radius: 18px; background: rgba(13,61,67,.28); backdrop-filter: blur(8px); }
.principles h3 { margin-bottom: .8rem; }
.principles ol { list-style: none; counter-reset: p; display: grid; gap: .7rem; }
.principles li { counter-increment: p; display: grid; grid-template-columns: 1.8rem 1fr; color: var(--muted); font-size: .95rem; }
.principles li::before { content: counter(p); font-family: var(--mono); color: var(--accent2); font-weight: 700; }
.principles strong { color: var(--fg); font-weight: 600; }
.principles li { display: block; position: relative; padding-left: 1.8rem; }
.principles li::before { position: absolute; left: 0; top: 0; }
