/* Rainer Zugwurst — Senior SAP Application Manager
   Warm theme: graphite / warm-slate / sand / terracotta. Self-contained, no external assets.
   NB: the tokens --navy/--navy-2/--slate keep their names for low-churn but now hold WARM
   graphite/brown values (no blue anywhere). */

:root {
  --navy:        #2c2a27;   /* primary dark (warm graphite) */
  --navy-2:      #232120;   /* deeper graphite */
  --slate:       #4a443d;   /* warm slate-brown (secondary) */
  --accent:      #b35a3a;   /* terracotta */
  --accent-hover:#c56a47;
  --accent-soft: #f6ebe5;
  --ink:         #2a2622;   /* warm near-black body text */
  --muted:       #6b635a;   /* warm grey */
  --line:        #e7e2db;   /* warm light border */
  --bg:          #ffffff;
  --bg-alt:      #f7f4f0;   /* warm light section bg */
  --maxw:        1080px;
  --radius:      10px;
  --shadow:      0 1px 2px rgba(40,36,32,.06), 0 8px 30px rgba(40,36,32,.10);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Header / nav ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(35,33,32,.97);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { color: #fff; font-weight: 700; letter-spacing: .3px; font-size: 1.02rem; }
.brand span { color: #fff; font-weight: 600; }
.nav { display: flex; align-items: center; }
.nav a { color: #fff; margin-left: 22px; font-size: .92rem; font-weight: 600; }
.nav a:hover { color: #fff; text-decoration: none; }
@media (max-width: 720px) { .nav a { display: none; } }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(179,90,58,.32), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 55%, var(--slate) 100%);
  color: #fff;
  padding: 64px 0 72px;
}
.hero .wrap { display: grid; grid-template-columns: 1fr 280px; gap: 48px; align-items: center; }
.hero .eyebrow {
  text-transform: uppercase; letter-spacing: 2.5px; font-size: .76rem;
  color: #fff; font-weight: 600; margin: 0 0 14px;
}
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); line-height: 1.08; margin: 0 0 10px; color: #fff; letter-spacing: -.5px; }
.hero .role { font-size: clamp(1.05rem, 2.2vw, 1.35rem); color: #fff; font-weight: 500; margin: 0 0 20px; }
.hero p.lead { font-size: 1.06rem; color: #fff; max-width: 56ch; margin: 0 0 26px; }
.hero .meta { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .92rem; color: #fff; margin-bottom: 28px; }
.hero .meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero .meta b { color: #fff; font-weight: 600; }

.portrait {
  width: 240px; height: 320px; object-fit: cover;
  border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.35);
  border: 3px solid rgba(255,255,255,.12); justify-self: end;
}
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 28px; }
  .portrait { justify-self: start; width: 180px; height: 240px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 22px; border-radius: 8px; font-weight: 600; font-size: .96rem;
  border: 1.5px solid transparent; cursor: pointer; transition: transform .12s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: var(--accent); color: #fff; border-color: transparent; }
.btn-ghost:hover { background: var(--accent-hover); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
section.alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin: 0 0 34px; }
.section-head h2 {
  font-size: 1.6rem; margin: 0 0 6px; color: var(--navy); letter-spacing: -.3px;
  display: inline-block; padding-bottom: 8px; border-bottom: 3px solid var(--accent);
}
.section-head p { color: var(--muted); margin: 8px 0 0; max-width: 62ch; }

.lead-text { font-size: 1.12rem; color: var(--ink); max-width: 70ch; }

/* ---------- Expertise grid ---------- */
.grid { display: grid; gap: 20px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .grid.cols-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 8px; font-size: 1.08rem; color: var(--navy); }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag {
  background: var(--accent-soft); color: var(--slate); font-size: .82rem; font-weight: 600;
  padding: 5px 12px; border-radius: 999px; border: 1px solid #ecd6cb;
}

/* ---------- Experience timeline ---------- */
.timeline { position: relative; margin-top: 8px; }
.tl-item { position: relative; padding: 0 0 30px 30px; border-left: 2px solid var(--line); }
.tl-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -8px; top: 4px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line);
}
.tl-item.current::before { background: #1f9d57; }
.tl-period { font-size: .82rem; font-weight: 700; color: var(--accent); letter-spacing: .3px; text-transform: uppercase; }
.tl-role { font-size: 1.12rem; font-weight: 700; color: var(--navy); margin: 2px 0 1px; }
.tl-org { font-size: .96rem; color: var(--muted); margin: 0 0 8px; }
.tl-org .badge { display:inline-block; margin-left:8px; font-size:.72rem; font-weight:700; color:#1f9d57; background:#e7f6ee; border:1px solid #c6ead4; padding:2px 9px; border-radius:999px; vertical-align:middle; text-transform:uppercase; letter-spacing:.4px; }
.tl-item ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink); }
.tl-item ul li { margin: 3px 0; }

.tl-more { margin-top: 8px; }
.tl-more summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 8px 0; }
.tl-compact { display: grid; grid-template-columns: 150px 1fr; gap: 4px 18px; margin-top: 16px; font-size: .94rem; }
.tl-compact dt { color: var(--accent); font-weight: 600; }
.tl-compact dd { margin: 0 0 10px; color: var(--ink); }
.tl-compact dd b { color: var(--navy); }
@media (max-width: 600px){ .tl-compact { grid-template-columns: 1fr; } .tl-compact dd { margin-bottom: 14px; } }

/* ---------- Two-column meta (certs / education / languages) ---------- */
.split { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 28px; } }
.list-clean { list-style: none; padding: 0; margin: 0; }
.list-clean li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-clean li:last-child { border-bottom: none; }
.list-clean .yr { font-weight: 700; color: var(--accent); margin-right: 10px; }
.list-clean b { color: var(--navy); }

.lang-row { display:flex; align-items:center; justify-content:space-between; padding:12px 0; border-bottom:1px solid var(--line); }
.lang-row:last-child { border-bottom:none; }
.lang-row .lvl { color: var(--muted); font-size: .9rem; }

/* ---------- Contact ---------- */
.contact { text-align: center; background: var(--navy); color: #fff; }
.contact h2 { color: #fff; border: none; font-size: 1.8rem; margin: 0 0 10px; }
.contact p { color: #fff; max-width: 52ch; margin: 0 auto 26px; }
.contact .btn-row { justify-content: center; }
.contact .small { font-size: .9rem; color: rgba(255,255,255,.7); margin-top: 22px; }

/* ---------- Footer ---------- */
footer { background: #1c1a18; color: rgba(255,255,255,.65); font-size: .86rem; padding: 26px 0; text-align: center; }

/* ---------- Reveal animation (progressive enhancement) ----------
   Hidden only when JS is active (html.js). Without JS everything stays visible. */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Bilingual (DE/EN) toggle ----------
   Both languages live in the DOM; <html> carries exactly one of lang-en / lang-de
   (set statically to lang-en, adjusted by JS before paint). Switch buttons use
   data-set (never data-lang) so they are never hidden by these rules. */
html.lang-en [data-lang="de"] { display: none; }
html.lang-de [data-lang="en"] { display: none; }

.langswitch {
  display: inline-flex; margin-left: 22px; flex: none;
  border: 1px solid rgba(255,255,255,.28); border-radius: 999px; overflow: hidden;
}
.langswitch button {
  appearance: none; -webkit-appearance: none; border: 0; background: transparent;
  color: #fff; cursor: pointer; font: inherit; font-size: .82rem; font-weight: 700;
  letter-spacing: .4px; padding: 5px 12px; line-height: 1.5; transition: background .15s, color .15s;
}
.langswitch button:hover { color: #fff; }
html.lang-en .langswitch [data-set="en"],
html.lang-de .langswitch [data-set="de"] { background: var(--accent); color: #fff; }
