/* ============================================
   Johannes Petter – jpetter.com
   Light + Dark Theme (System-Default) · 2026
   ============================================ */

/* ---------- Light (Default) ---------- */
:root {
  --bg: #faf9f7;
  --bg-soft: #f2f0ec;
  --surface: #ffffff;
  --surface-2: #f5f3ef;
  --border: #e3e0d8;
  --text: #1d1f24;
  --muted: #5d626e;
  --accent: #b07d2b;
  --accent-soft: rgba(176, 125, 43, 0.10);
  --btn-primary-text: #ffffff;
  --header-bg: rgba(250, 249, 247, 0.85);
  --shadow: 0 2px 16px rgba(29, 31, 36, 0.06);
  --radius: 16px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Dark (System) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1115;
    --bg-soft: #14171d;
    --surface: #1a1e26;
    --surface-2: #212631;
    --border: #2b313d;
    --text: #eceae5;
    --muted: #9aa0ab;
    --accent: #d4a24e;
    --accent-soft: rgba(212, 162, 78, 0.12);
    --btn-primary-text: #1a1405;
    --header-bg: rgba(15, 17, 21, 0.85);
    --shadow: none;
  }
}

/* ---------- Dark (manuell gewählt) ---------- */
[data-theme="dark"] {
  --bg: #0f1115;
  --bg-soft: #14171d;
  --surface: #1a1e26;
  --surface-2: #212631;
  --border: #2b313d;
  --text: #eceae5;
  --muted: #9aa0ab;
  --accent: #d4a24e;
  --accent-soft: rgba(212, 162, 78, 0.12);
  --btn-primary-text: #1a1405;
  --header-bg: rgba(15, 17, 21, 0.85);
  --shadow: none;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s, color 0.25s;
}

img { max-width: 100%; display: block; }

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

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 68px;
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--text);
  white-space: nowrap;
}
.brand:hover { text-decoration: none; color: var(--accent); }
.brand span { color: var(--accent); }

.header-right { display: flex; align-items: center; gap: 6px; }

.main-nav { display: flex; gap: 2px; align-items: center; }

.main-nav a {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 13px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.main-nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.main-nav a.active { color: var(--accent); background: var(--accent-soft); }

.icon-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 7px 11px;
  font-size: 0.95rem;
  cursor: pointer;
  line-height: 1;
  font-family: var(--font);
  font-weight: 700;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }

a.icon-btn { display: inline-block; }
a.icon-btn:hover { text-decoration: none; }

.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
    padding: 12px;
    gap: 2px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 16px; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 84px 0 72px;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, var(--accent-soft), transparent),
    var(--bg);
}

.hero .portrait {
  width: 176px;
  height: 176px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 28px;
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 8px var(--accent-soft);
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.hero .tagline {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 28px;
}

.hero .intro {
  max-width: 640px;
  margin: 0 auto 36px;
  color: var(--muted);
  font-size: 1.08rem;
}

/* ---------- Social icon row ---------- */
.social-row { display: flex; justify-content: center; gap: 14px; margin-bottom: 36px; }

.social-row a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.15s, border-color 0.15s;
}
.social-row a:hover { transform: translateY(-3px); border-color: var(--accent); text-decoration: none; }
.social-row svg { width: 22px; height: 22px; fill: var(--text); }

/* ---------- Buttons ---------- */
.btn-row { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.btn-row.left { justify-content: flex-start; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; fill: currentColor; }

.btn-primary { background: var(--accent); color: var(--btn-primary-text); }
.btn-primary:hover { box-shadow: 0 6px 24px var(--accent-soft); }

.btn-youtube { background: #e62117; color: #ffffff; }
.btn-youtube:hover { box-shadow: 0 6px 24px rgba(230, 33, 23, 0.35); }

.btn-ghost { border: 1px solid var(--border); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section.alt { background: var(--bg-soft); }

.section-title {
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.section-sub { color: var(--muted); max-width: 660px; margin-bottom: 44px; }

.eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.center { text-align: center; }
.center .section-sub { margin-left: auto; margin-right: auto; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.card-grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* ---------- Foto-Sektion ---------- */
.photo-band { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.photo-band img { width: 100%; height: 380px; object-fit: cover; object-position: center 30%; }

.split { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

/* ---------- Timeline (Lebenslauf) ---------- */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 6px; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--border);
}

.timeline-item { position: relative; padding-bottom: 40px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -28px; top: 7px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
}

.timeline-item .period {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.timeline-item h3 { font-size: 1.2rem; margin: 4px 0 2px; }
.timeline-item .org { color: var(--muted); font-weight: 600; margin-bottom: 10px; font-size: 0.95rem; }
.timeline-item p { color: var(--muted); }

/* ---------- Skill chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
.chip.accent { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ---------- Projekt-Karten ---------- */
.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.15s, border-color 0.15s;
}
.project-card:hover { transform: translateY(-4px); border-color: var(--accent); }

.project-card .logo-wrap {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  padding: 16px;
}
.project-card .logo-wrap img { max-height: 100%; width: auto; object-fit: contain; }

.project-card .role {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.project-card h3 { font-size: 1.25rem; margin: 6px 0 10px; }
.project-card p { color: var(--muted); font-size: 0.95rem; flex: 1; }
.project-card .card-link { margin-top: 16px; font-weight: 700; font-size: 0.9rem; }

.status-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 6px;
  padding: 3px 10px;
  margin-left: 8px;
  vertical-align: middle;
}
.status-tag.active { background: rgba(80, 180, 120, 0.15); color: #3d9e6a; }
[data-theme="dark"] .status-tag.active { color: #6fce9a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .status-tag.active { color: #6fce9a; } }
.status-tag.past { background: rgba(120, 126, 138, 0.15); color: var(--muted); }

/* ---------- Logo-Karte (Startseite) ---------- */
.logo-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}
.logo-card img { width: 100%; max-width: 380px; height: auto; }

/* ---------- Zusammenarbeit ---------- */
.collab-card {
  transition: transform 0.15s, border-color 0.15s;
}
.collab-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.collab-card .collab-icon { font-size: 1.8rem; margin-bottom: 12px; display: block; }
.collab-card h3 { font-size: 1.1rem; }

/* ---------- Social-Kanal-Karten ---------- */
.channel-card {
  display: flex;
  align-items: center;
  gap: 20px;
  transition: transform 0.15s, border-color 0.15s;
}
.channel-card:hover { transform: translateY(-3px); border-color: var(--accent); text-decoration: none; }

.channel-card .channel-icon {
  flex-shrink: 0;
  width: 60px; height: 60px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
}
.channel-card .channel-icon svg { width: 30px; height: 30px; fill: var(--text); }
.channel-card h3 { font-size: 1.1rem; color: var(--text); margin-bottom: 2px; }
.channel-card p { color: var(--muted); font-size: 0.9rem; }

/* ---------- Kontakt ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }

.contact-card { text-align: center; transition: transform 0.15s, border-color 0.15s; display: block; }
.contact-card:hover { transform: translateY(-3px); border-color: var(--accent); text-decoration: none; }
.contact-card .contact-icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-card .contact-icon svg { width: 26px; height: 26px; fill: var(--accent); }
.contact-card h3 { font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.contact-card .value { font-size: 1.05rem; font-weight: 700; color: var(--text); }

/* ---------- YouTube-Embed (Zwei-Klick) ---------- */
.video-wrap {
  position: relative;
  max-width: 820px;
  margin: 0 auto 56px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.video-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }

.video-facade {
  position: absolute;
  inset: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--surface);
  border: 0;
  cursor: pointer;
  color: var(--text);
  font-family: var(--font);
  font-size: 1.05rem;
}
.video-facade .play {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: #e62117;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}
.video-facade .play svg { width: 30px; height: 30px; fill: #fff; margin-left: 4px; }
.video-facade:hover .play { transform: scale(1.08); }
.video-facade small { color: var(--muted); max-width: 460px; padding: 0 20px; font-size: 0.8rem; line-height: 1.5; }

/* ---------- Rechtstexte ---------- */
.legal { max-width: 780px; }
.legal h1 { font-size: 2rem; margin-bottom: 28px; }
.legal h2 { font-size: 1.35rem; margin: 36px 0 14px; }
.legal h3 { font-size: 1.1rem; margin: 26px 0 10px; }
.legal p, .legal li { color: var(--muted); margin-bottom: 12px; }
.legal ul { padding-left: 22px; margin-bottom: 16px; }
.legal a { word-break: break-word; }

/* ---------- Animationen & Effekte ---------- */
@media (prefers-reduced-motion: no-preference) {

  /* Hero-Auftritt beim Laden */
  @keyframes pop-in {
    from { opacity: 0; transform: scale(0.7); }
    to   { opacity: 1; transform: scale(1); }
  }
  @keyframes fade-up {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: none; }
  }
  @keyframes ring-pulse {
    0%   { box-shadow: 0 0 0 8px var(--accent-soft); }
    50%  { box-shadow: 0 0 0 16px rgba(0, 0, 0, 0); }
    100% { box-shadow: 0 0 0 8px var(--accent-soft); }
  }

  .hero .portrait   { animation: pop-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both, ring-pulse 3.5s ease-in-out 1.2s infinite; }
  .hero h1          { animation: fade-up 0.6s 0.15s both; }
  .hero .tagline    { animation: fade-up 0.6s 0.25s both; }
  .hero .intro      { animation: fade-up 0.6s 0.35s both; }
  .hero .social-row { animation: fade-up 0.6s 0.45s both; }
  .hero .btn-row    { animation: fade-up 0.6s 0.55s both; }

  /* Scroll-Reveal (Klasse wird per JS gesetzt) */
  .reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: var(--reveal-delay, 0s);
  }
  .reveal.in { opacity: 1; transform: none; }
}

/* Tap-Feedback (v.a. mobil) */
.btn:active { transform: scale(0.96); }
.card:active, .channel-card:active, .contact-card:active { transform: scale(0.985); }
.social-row a:active, .footer-social a:active, .icon-btn:active { transform: scale(0.9); }

/* Header-Schatten beim Scrollen */
.site-header { transition: box-shadow 0.25s; }
.site-header.scrolled { box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 48px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 36px;
}

.site-footer h4 {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.site-footer a { color: var(--text); font-size: 0.95rem; }
.site-footer a:hover { color: var(--accent); }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 8px; }

.footer-social { display: flex; gap: 10px; }
.footer-social a {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
}
.footer-social a:hover { border-color: var(--accent); }
.footer-social svg { width: 17px; height: 17px; fill: var(--text); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.85rem;
}
.footer-bottom a { color: var(--muted); margin-left: 18px; }
.footer-bottom a:first-child { margin-left: 0; }
