/*
  Modern Portfolio Styles
  - Vanilla CSS, no build step
  - Light/Dark via [data-theme="dark"] on <html>
  - Utility-like tokens + components
*/

:root {
  --bg: #ffffff;
  --bg-alt: #f7fafc;
  --text: #0b1220;
  --muted: #5b6470;
  --primary: #0ea5e9; /* sky-500 */
  --primary-600: #0284c7;
  --ring: rgba(14, 165, 233, 0.3);
  --card: #ffffff;
  --border: #e5e7eb;
  --shadow: 0 10px 30px rgba(2, 8, 20, 0.08);
  --radius: 14px;
}
.btn--cta {
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  border: 1px solid rgba(239,68,68,.5);
  box-shadow: 0 6px 18px rgba(239,68,68,.25);
}
.btn--cta:hover { filter: brightness(1.03); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(239,68,68,.35); }
html[data-theme="dark"] .btn--cta { box-shadow: 0 6px 18px rgba(0,0,0,.45); }

html[data-theme="dark"] {
  --bg: #0b1220;
  --bg-alt: #0f172a;
  --text: #eef2ff;
  --muted: #a3adbc;
  --primary: #38bdf8; /* sky-400 */
  --primary-600: #0ea5e9;
  --ring: rgba(56, 189, 248, 0.35);
  --card: #0f172a;
  --border: #1f2937;
  --shadow: 0 12px 32px rgba(2, 8, 20, 0.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation */
#topMenu { 
  position: sticky; 
  top: 0; 
  z-index: 10000; 
  background: color-mix(in oklab, var(--bg) 90%, transparent); 
  border-bottom: 1px solid var(--border); 
  backdrop-filter: saturate(180%) blur(10px); 
}
#topMenu .inner { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  min-height: 64px; 
}
#topMenu .logo { 
  flex-shrink: 0; 
}
#topMenu .menu { 
  list-style: none; 
  display: flex; 
  gap: 18px; 
  margin: 0; 
  padding: 0; 
}
#topMenu .menu .nav-item { 
  margin: 0; 
}
#topMenu .menu .nav-link { 
  color: var(--muted); 
  text-decoration: none; 
  font-weight: 700; 
  letter-spacing: .2px; 
}
#topMenu .menu .nav-link:hover, 
#topMenu .menu .nav-item.active .nav-link { 
  color: var(--text); 
}

/* Burger Menu Toggle */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 48px;
  height: 48px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 60;
}

.menu-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
  border-radius: 8px;
}

.menu-toggle__hamburger {
  display: flex;
  justify-content: space-between;
  width: 24px;
  height: 20px;
}

  .menu-toggle__hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
  }

  /* Burger Menu Animation */
  .menu-toggle[aria-expanded="true"] .menu-toggle__hamburger span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  
  .menu-toggle[aria-expanded="true"] .menu-toggle__hamburger span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }
  
  .menu-toggle[aria-expanded="true"] .menu-toggle__hamburger span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

/* Navigation Menu */
.main-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 380px;
  height: 100vh;
  background: var(--card);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
  padding: 80px 24px 40px;
  transition: right 0.4s ease;
  z-index: 50;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.main-nav.open {
  right: 0;
}

.menu {
  list-style: none;
  padding: 0;
  margin: 0 0 40px 0;
  flex: 1;
}

.nav-item {
  margin-bottom: 12px;
}

.nav-link {
  display: block;
  padding: 12px 0;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-item.active .nav-link {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* Overlay when menu is open */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 40;
  backdrop-filter: blur(4px);
}

.menu-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* Desktop/Tablet styles */
@media (min-width: 768px) {
  .menu-toggle {
    display: none !important;
  }
  
  #topMenu .inner {
    display: flex;
    align-items: center;
    position: relative;
    justify-content: flex-start !important; /* Nav darf volle Zeile einnehmen */
    gap: 0 !important; /* keine Lücke vor der Nav */
  }
  
  #topMenu .logo {
    display: none;
  }
  
  #topMenu .main-nav {
    position: static !important;
    width: 100% !important;
    max-width: none !important; /* Mobile max-width:380px überschreiben */
    height: auto !important;
    background: transparent;
    box-shadow: none;
    padding: 0;
    display: flex !important;
    align-items: center !important;
    gap: 0 !important; /* keine Lücke am Anfang der Nav */
    justify-content: flex-start !important; /* Menü linksbündig */
    flex: 1 1 auto !important; /* nimmt restliche Breite links ein */
    min-width: 0 !important; /* verhindert Größenbeschränkung durch Inhalt */
    margin-right: auto !important; /* drückt Icons nach rechts, Menu bleibt links */
    margin-left: 0 !important; /* keine Einrückung links */
    overflow: visible;
    right: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  #topMenu .menu {
    display: flex !important;
    gap: 20px;
    margin: 0 !important;
    padding: 0 !important;
    align-items: center !important; /* vertikale Ausrichtung der Links */
    white-space: nowrap !important; /* keine Zeilenumbrüche im Menü */
    flex: 0 1 auto !important; /* wächst nicht, damit rechts Platz für Icons bleibt */
    justify-content: flex-start !important; /* Links bündig an Start */
    margin-right: auto !important; /* nimmt linken Bereich ein, schiebt Icons nach rechts */
  }
  
  .nav-item {
    margin: 0;
    padding-left: 0 !important; /* Sicherheitsnetz gegen UA-Styles */
  }
  
  .nav-link {
    display: flex; /* gleiche Ausrichtung wie Buttons */
    align-items: center; /* vertikal mittig */
    height: 42px; /* gleiche Höhe wie .btn--icon */
    padding: 0; /* verhindert optisches Absenken unter die Unterstreichung */
    font-size: 1rem;
    position: relative;
  }
  
  .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
  }
  
  .nav-link:hover::after,
  .nav-item.active .nav-link::after {
    width: 100%;
  }
  
  #topMenu .nav-actions {
    margin-left: auto !important; /* schiebt Icons ganz nach rechts */
    margin-top: 0 !important;
    padding: 0 !important;
    border: none !important;
    gap: 8px;
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
  }
  
  .menu-overlay {
    display: none;
  }
}

/* Aktiver Menüpunkt hervorheben */
.menu .nav-item.active > a,
.nav__links a[aria-current="page"] {
  color: var(--text);
  border-bottom: 2px solid var(--primary);
  padding-bottom: 2px;
}
.nav__actions { display: flex; gap: 10px; align-items: center; }
.nav__hamburger { display: inline-flex; }

@media (min-width: 768px) {
  .nav__links { display: flex; }
  .nav__hamburger { display: none; }
}

/* Buttons */
.btn { 
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); text-decoration: none; font-weight: 600;
  box-shadow: var(--shadow); transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); border-color: color-mix(in oklab, var(--border), var(--primary) 30%); }
.btn:focus { outline: none; box-shadow: 0 0 0 4px var(--ring); }
.btn--primary { background: var(--primary); color: white; border-color: transparent; }
.btn--primary:hover { background: var(--primary-600); }
.btn--ghost { background: transparent; }
.btn--icon { padding: 10px; width: 42px; height: 42px; justify-content: center; }
.btn--lang { width: auto; padding: 10px 12px; gap: 6px; }
.btn--lang i { margin-right: 2px; }

/* Sections */
.section { padding: 88px 0; background: var(--bg); }
.section--alt { background: var(--bg-alt); }
.section__header { text-align: center; margin-bottom: 36px; }
.title { font-size: clamp(1.75rem, 3vw, 2.5rem); margin: 0 0 10px; }
.lede { color: var(--muted); max-width: 720px; margin: 0 auto; }

/* Grid helpers */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
@media (min-width: 900px){
  .grid--2 { grid-template-columns: 1fr 1fr; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero__inner { display: grid; gap: 28px; align-items: center; grid-template-columns: 1fr; }
.hero__content { text-align: center; }
.hero__visual { display: none; }
.headline { font-size: clamp(2.25rem, 6vw, 4rem); margin: 0 0 12px; font-weight: 800; }
.subhead { font-size: clamp(1.1rem, 2.2vw, 1.35rem); color: var(--muted); margin: 0 0 22px; }
.hero__cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 22px 0 10px; }
.hero__socials { display: flex; gap: 12px; justify-content: center; margin-top: 8px; }
.social { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--text); }

@media (min-width: 980px) {
  .hero__inner { grid-template-columns: 1.2fr 1fr; }
  .hero__content { text-align: left; }
  .hero__cta { justify-content: flex-start; }
  .hero__socials { justify-content: flex-start; }
  .hero__visual { display: block; }
}

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card--glass { height: 320px; display: grid; place-items: center; position: relative; overflow: hidden; }
.card--glass::before { content: ""; position: absolute; inset: -40%; background: radial-gradient(600px 200px at var(--x,50%) var(--y,50%), color-mix(in oklab, var(--primary) 25%, transparent), transparent 60%); filter: blur(30px); opacity: .7; }
.logo { font-size: 80px; font-weight: 800; letter-spacing: 1px; color: color-mix(in oklab, var(--text) 85%, var(--primary)); }

/* Feature list */
.feature-list { display: grid; gap: 16px; }
.feature { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); box-shadow: var(--shadow); }
.feature i { width: 24px; height: 24px; color: var(--primary); }
.feature h4 { margin: 0 0 6px; }
.feature p { margin: 0; color: var(--muted); }

/* Project cards */
.cards { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 900px){ .cards { grid-template-columns: 1fr 1fr; } }
.card--project { overflow: hidden; }
.card__media { aspect-ratio: 16 / 9; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.card--project:hover .card__media img { transform: scale(1.06); }
.card__body { padding: 18px; }
.card__actions { display: flex; gap: 10px; margin-top: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: 12px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); background: var(--card); }

/* Anchor als Karte muss block-level sein (Safari-Kompatibilität) */
a.card { display: block; color: inherit; cursor: pointer; }

/* Education grid centering (2 items) */
.edu-grid { grid-template-columns: 1fr; justify-items: center; justify-content: center; }
.edu-grid > .card { width: 100%; max-width: 360px; }
@media (min-width: 720px){
  .edu-grid { grid-template-columns: repeat(2, minmax(280px, 360px)); justify-content: center; }
}

/* Skills */
.skillcard { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.meter { margin: 12px 0 16px; }
.meter__head { display: flex; justify-content: space-between; font-weight: 600; }
.meter__value { color: var(--primary); }
.meter__bar { height: 10px; background: color-mix(in oklab, var(--border), var(--bg) 30%); border-radius: 999px; overflow: hidden; }
.meter__bar span { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--primary), var(--primary-600)); border-radius: 999px; transition: width 1s ease; }

/* Skill rows with blue dot indicators */
.skillgrid { display: grid; gap: 8px; }
.skill-row { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 8px 10px; background: color-mix(in oklab, var(--bg), var(--text) 3%); border: 1px solid var(--border); border-radius: 8px; }
.skill-row .name { font-weight: 600; color: var(--text); }
.dots { display: inline-grid; grid-auto-flow: column; gap: 6px; }
.dot { width: 14px; height: 14px; border-radius: 3px; background: #e5e7eb; }
html[data-theme="dark"] .dot { background: #334155; }
.dot--filled { background: #4289db; }
html[data-theme="dark"] .dot--filled { background: #38bdf8; }

/* Skill chips (oval pills) */
.skillchips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { 
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 14px;
  border: 1px solid transparent; transition: transform .15s ease, filter .2s ease;
}
.chip:hover { transform: translateY(-1px); filter: brightness(1.05); }

/* Light mode shades */
.chip--strong { background: #1d4ed8; color: #fff; }
.chip--medium { background: #3b82f6; color: #fff; }
.chip--light { background: #93c5fd; color: #0b1220; }

/* Dark mode adjustments */
html[data-theme="dark"] .chip--strong { background: #1e40af; color: #e5e7eb; }
html[data-theme="dark"] .chip--medium { background: #2563eb; color: #e5e7eb; }
html[data-theme="dark"] .chip--light { background: #60a5fa; color: #0b1220; }

/* Form */
.form { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.field { display: grid; gap: 8px; margin-bottom: 14px; }
label { font-weight: 600; }
input, textarea { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; }
input:focus, textarea:focus { outline: none; box-shadow: 0 0 0 4px var(--ring); border-color: transparent; }
.hp { position: absolute; left: -9999px; top: -9999px; }

.alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; border: 1px solid; }
.alert--success { background: #ecfdf5; border-color: #10b981; color: #065f46; }
.alert--error { background: #fef2f2; border-color: #ef4444; color: #7f1d1d; }

/* Footer */
.footer { padding: 28px 0; border-top: 1px solid var(--border); background: var(--bg); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.to-top { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); color: var(--text); background: var(--card); box-shadow: var(--shadow); }

/* Fancy bits */
.gradient-text {
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__blobs .blob { position: absolute; inset: auto; filter: blur(30px); opacity: .35; }
.blob--a { left: 10%; top: 10%; width: 320px; height: 320px; border-radius: 999px; background: radial-gradient(200px at 30% 30%, #60a5fa, transparent 70%); }
.blob--b { right: 5%; bottom: 10%; width: 420px; height: 420px; border-radius: 999px; background: radial-gradient(220px at 60% 60%, #a78bfa, transparent 75%); }

/* Experience cards */
.exp-cards { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px){ .exp-cards { grid-template-columns: 1fr 1fr; } }
.exp-card { border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.exp-hero { aspect-ratio: 16 / 9; position: relative; overflow: hidden; display: grid; place-items: center; color: #fff; font-weight: 800; letter-spacing: .5px; }
.exp-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, var(--exp-a, #60a5fa) 0%, var(--exp-b, #a78bfa) 100%); }
.exp-hero__label { position: relative; z-index: 1; font-size: clamp(18px, 3vw, 28px); text-shadow: 0 6px 24px rgba(0,0,0,.25); }
.exp-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .25; }
.exp-summary { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 16px; cursor: pointer; }
.exp-avatar { width: 48px; height: 48px; border-radius: 12px; background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%); color: #fff; display: grid; place-items: center; font-weight: 800; letter-spacing: .5px; }
.exp-meta { display: flex; flex-direction: column; gap: 4px; }
.exp-title { font-weight: 800; color: var(--text); }
.exp-sub { color: var(--muted); font-weight: 600; font-size: .95rem; }
.exp-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-size: 11px; padding: 6px 8px; border-radius: 999px; background: color-mix(in oklab, var(--primary) 12%, var(--bg)); color: color-mix(in oklab, var(--text) 70%, var(--primary)); border: 1px solid color-mix(in oklab, var(--primary) 30%, var(--border)); }
.exp-toggle { color: var(--muted); transition: transform .2s ease; }
.exp-card.open .exp-toggle { transform: rotate(180deg); }
.exp-details { border-top: 1px solid var(--border); padding: 0 16px; max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.exp-card.open .exp-details { padding: 16px; }
.exp-list { margin: 0; padding-left: 18px; }
.exp-list li { margin: 6px 0; }

/* Mobile nav panel */
.mobile-panel { display: none; position: fixed; inset: 64px 0 0 0; background: var(--bg); border-top: 1px solid var(--border); padding: 16px 20px; }
.mobile-panel.open { display: block; }
.mobile-panel a { display: block; padding: 12px 6px; color: var(--muted); text-decoration: none; font-weight: 600; }
.mobile-panel a:hover { color: var(--text); }

/* Ensure top menu stays above map */
#topMenu { position: sticky; top: 0; inset-inline: 0; z-index: 10000; background: color-mix(in oklab, var(--bg) 92%, transparent); border-bottom: 1px solid var(--border); backdrop-filter: saturate(180%) blur(10px); }
/* Leaflet z-index anpassen, damit Menü oben bleibt */
.leaflet-container { z-index: 0 !important; }
.leaflet-top, .leaflet-bottom { z-index: 500 !important; }
.leaflet-pane { z-index: 400 !important; }
.leaflet-popup-pane { z-index: 700 !important; }
.leaflet-tooltip-pane { z-index: 650 !important; }

/* Modal for skill details */
.modal-overlay { position: fixed; inset: 0; background: rgba(2,8,20,.55); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; z-index: 1000; }
.modal-overlay.open { display: flex; }
.modal { width: min(720px, 92vw); background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.modal__header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.modal__title { margin: 0; font-weight: 800; font-size: 1.15rem; }
.modal__close { border: none; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; padding: 6px 10px; border-radius: 8px; }
.modal__close:hover { background: color-mix(in oklab, var(--bg), var(--text) 4%); }
.modal__body { padding: 16px; color: var(--text); }

/* Simple gallery */
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); margin-top: 16px; }
@media (min-width: 900px){ .gallery { grid-template-columns: repeat(3, 1fr); } }
.gallery img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.gallery img { transition: transform .35s ease, box-shadow .35s ease, filter .35s ease; }
.gallery img:hover { transform: scale(1.03); box-shadow: 0 12px 32px rgba(2,8,20,.18); filter: saturate(1.05); }

/* Blog Cover: einheitliche Bildausschnitte */
.blog-cover-wrap { width: 100%; border-bottom: 1px solid var(--border); overflow: hidden; position: relative; }
.blog-cover-wrap.blog-cover--card { aspect-ratio: 16 / 9; }
.blog-cover-wrap.blog-cover--post { aspect-ratio: 16 / 6; }
.blog-cover { width: 100%; height: 100%; object-fit: cover; display: block; transition: filter .6s ease, transform .6s ease; }
.blog-cover.is-loading { filter: blur(16px) saturate(1.05); transform: scale(1.02); }

/* Tag Chips klickbar */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags .tag { display: inline-block; font-size: .85rem; color: var(--muted); background: color-mix(in oklab, var(--bg), var(--text) 6%); border: 1px solid var(--border); padding: 4px 8px; border-radius: 999px; text-decoration: none; }
.tags .tag:hover { color: var(--text); background: color-mix(in oklab, var(--bg), var(--text) 10%); }

/* Popover (Suche unter Button) */
.popover { position: absolute; top: calc(100% + 8px); right: 0; display: none; z-index: 12000; }
.popover.open { display: block; }
.popover .popover__inner { width: min(90vw, 520px); background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 18px 40px rgba(2,8,20,.25); padding: 12px; }
.popover::before { content: ''; position: absolute; top: -8px; right: 36px; border-width: 0 8px 8px 8px; border-style: solid; border-color: transparent transparent var(--border) transparent; }
.popover::after { content: ''; position: absolute; top: -7px; right: 36px; border-width: 0 7px 7px 7px; border-style: solid; border-color: transparent transparent var(--card) transparent; }

/* Hero 2-Spalten Layout (wie Portfolio) */
.hero-two-col { display: grid; gap: 16px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px){ .hero-two-col { grid-template-columns: 1.1fr 0.9fr; } }
.hero-two-col .hero-title { margin: 0 0 6px 0; font-size: clamp(1.8rem, 3.6vw, 3rem); font-weight: 800; }
.hero-two-col .hero-sub { margin: 0 0 12px 0; color: var(--muted); }
.hero-two-col .hero-cta { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.hero-two-col .hero-socials { display: flex; justify-content: center; gap: 10px; margin-top: 10px; }

/* Zoom/Lightbox */
img.zoomable { cursor: zoom-in; }
.zoom-overlay { position: fixed; inset: 0; background: color-mix(in oklab, #000, transparent 35%); display: none; z-index: 11000; backdrop-filter: blur(2px); }
.zoom-overlay.open { display: grid; place-items: center; animation: fadeIn .2s ease; }
.zoom-overlay .zoom-img { max-width: min(95vw, 1400px); max-height: 90vh; border-radius: 12px; border: 1px solid var(--border); box-shadow: 0 20px 60px rgba(0,0,0,.35); cursor: zoom-out; transition: transform .2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Advertisement Circle */
.ad-wrap { display: grid; place-items: center; margin: 22px 0; }
.ad-circle {
  width: 260px; height: 260px;
  border-radius: 9999px;
  background: radial-gradient(220px 180px at 60% 35%, color-mix(in oklab, var(--primary) 30%, var(--card)), var(--card));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: grid; place-items: center; text-align: center; padding: 18px;
}
@media (min-width: 900px) { .ad-circle { width: 320px; height: 320px; } }
.ad-circle h3 { margin: 6px 0 6px; font-weight: 800; }
.ad-circle p { margin: 0 0 12px; color: var(--muted); }

/* Rote Akzent-Variante für runde CTA-Kacheln (z. B. CV auf Home) */
.ad-circle--accent {
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  border-color: rgba(239,68,68,.5);
}

/* CV Hover Preview (Popover) */
.cv-preview { position: relative; display: inline-block; }
.cv-preview .preview-popover {
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  width: 320px; height: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(2,8,20,.25);
  padding: 6px;
  display: none;
  z-index: 12000;
}
.cv-preview:hover .preview-popover { display: block; }
.cv-preview:hover .ad-circle { transform: scale(1.05); box-shadow: 0 16px 36px rgba(239,68,68,.35); }
.ad-circle { transition: transform .25s ease, box-shadow .25s ease; }
.ad-wrap--cv { margin: 28px 0 18px; }
.preview-popover::after {
  content: '';
  position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%);
  border-width: 8px 8px 0 8px; border-style: solid;
  border-color: var(--border) transparent transparent transparent;
}
.preview-popover embed, .preview-popover iframe {
  width: 100%; height: 100%; border: 0; border-radius: 8px; background: #fff;
}

/* Sticky CTA Button */
.sticky-cta { position: fixed; right: 18px; bottom: 18px; z-index: 11000; text-decoration: none; display: block; }
.sticky-cta .ad-circle { 
  box-shadow: 0 10px 24px rgba(2,8,20,.18); 
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease; 
  /* auffällige Farbgebung nur für Sticky CTA */
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  border-color: rgba(239,68,68,.5);
  animation: ctaGlow 2.4s ease-in-out infinite;
}
.sticky-cta .ad-circle:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(2,8,20,.22); }
html[data-theme="dark"] .sticky-cta .ad-circle { box-shadow: 0 10px 24px rgba(0,0,0,.35); }
html[data-theme="dark"] .sticky-cta .ad-circle { color: #fff; border-color: rgba(239,68,68,.45); }
@keyframes ctaGlow {
  0% { box-shadow: 0 10px 24px rgba(239,68,68,.30), 0 0 0 0 rgba(239,68,68,.0); }
  50% { box-shadow: 0 12px 28px rgba(239,68,68,.40), 0 0 0 10px rgba(239,68,68,.08); }
  100% { box-shadow: 0 10px 24px rgba(239,68,68,.30), 0 0 0 0 rgba(239,68,68,.0); }
}

/* Mini-Variante für Sticky CTA */
.ad-circle--mini { width: 140px; height: 140px; padding: 12px; }
.ad-circle--mini h3 { font-size: .9rem; margin: 4px 0; }
.ad-circle--mini p { font-size: .75rem; margin: 0; color: var(--muted); }
/* Chip detail: Container unter dem Chip, volle Zeilenbreite */
.skillchips { align-items: flex-start; }
.skillchips .chip { position: relative; }
.skillchips .chip-detail {
  display: none;
  flex: 1 1 100%;
  width: 100%;
}
.skillchips .chip-detail.open { display: block; }
.skillchips .chip-detail__inner {
  margin-top: 8px;
  margin-bottom: 6px;
  padding: 2px 0;
}

/* Pills (einzelne, ovale Bubbles) */
.chip-detail__pill {
  display: inline-block;
  margin: 4px 6px 2px 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: #3b82f6;
  color: #fff;
  border: 1px solid transparent;
  font-weight: 600;
  backdrop-filter: saturate(120%);
  animation: chipFadeIn .2s ease both;
}

/* Pill-Farben je Variante */
.chip-detail--strong .chip-detail__pill { background: #1d4ed8; color: #fff; }
html[data-theme="dark"] .chip-detail--strong .chip-detail__pill { background: #1e40af; color: #e5e7eb; }
.chip-detail--medium .chip-detail__pill { background: #3b82f6; color: #fff; }
html[data-theme="dark"] .chip-detail--medium .chip-detail__pill { background: #2563eb; color: #e5e7eb; }
.chip-detail--light .chip-detail__pill { background: #93c5fd; color: #0b1220; }
html[data-theme="dark"] .chip-detail--light .chip-detail__pill { background: #60a5fa; color: #0b1220; }

/* Close-Button in der Detail-Zeile */
.chip-detail__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0 2px 4px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.35);
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.chip-detail--light .chip-detail__close { border-color: rgba(0,0,0,0.15); }
.chip-detail__close:hover { filter: brightness(1.05); }

/* Leichte Animation */
  @keyframes chipFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
  }

/* Einheitliche Inhaltsbreite für freie Blöcke (analog .inner/max-width) */
/* Da diese Blöcke bereits innerhalb von .inner liegen, kein zusätzliches Padding/Max-Width nötig.
   Stattdessen: Nur wenn sie AUSSERHALB von .inner stehen, begrenzen. */
.hero .hero-two-col,
.skillchips,
.ad-wrap,
.gallery,
.cards,
.exp-cards {
  width: 100%;
  /* Kein zusätzliches max-width/padding, da .inner bereits begrenzt */
}

/* Download Box (für Blog-Downloads) */
.download-box {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
  margin: 14px 0;
}
.download-box__icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: grid; place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-600));
}
.download-box__meta { display: grid; gap: 4px; }
.download-box__title { margin: 0; font-weight: 800; color: var(--text); }
.download-box__info { margin: 0; color: var(--muted); font-size: .9rem; }
.download-box__actions { display: flex; gap: 10px; }
.download-box .btn { box-shadow: none; }

@media (max-width: 520px){
  .download-box { grid-template-columns: 40px 1fr; grid-auto-rows: auto; }
  .download-box__actions { grid-column: 1 / -1; }
}

/* YouTube Embed (privacy-friendly, click-to-load) */
.yt-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); cursor: pointer; background: #000; }
.yt-embed__thumb { width: 100%; height: 100%; object-fit: cover; filter: brightness(.9) saturate(1.05); transition: transform .35s ease, filter .35s ease; }
.yt-embed__play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: clamp(36px, 6vw, 64px); text-shadow: 0 6px 24px rgba(0,0,0,.35); }
.yt-embed__badge { position: absolute; left: 10px; bottom: 10px; background: rgba(0,0,0,.55); color: #fff; padding: 6px 10px; border-radius: 999px; font-weight: 700; font-size: .8rem; letter-spacing: .2px; border: 1px solid rgba(255,255,255,.15); }
.yt-embed:hover .yt-embed__thumb { transform: scale(1.03); filter: brightness(1) saturate(1.1); }
.yt-embed.is-playing { box-shadow: none; }
