/* Jörg Gertenbach – Dreher gesucht
   Modernisierte Portfolio-Website */

:root {
  --color-bg: #f6f7f9;
  --color-surface: #ffffff;
  --color-surface-alt: #eef0f3;
  --color-border: #e0e3e8;
  --color-text: #1c2430;
  --color-text-muted: #5b6472;
  --color-primary: #1f4e79;
  --color-primary-dark: #163a5c;
  --color-accent: #e08a1e;
  --color-accent-dark: #b96f14;
  --shadow-sm: 0 1px 2px rgba(20, 24, 33, 0.06), 0 1px 1px rgba(20, 24, 33, 0.04);
  --shadow-md: 0 6px 16px rgba(20, 24, 33, 0.10), 0 2px 6px rgba(20, 24, 33, 0.06);
  --shadow-lg: 0 20px 40px rgba(20, 24, 33, 0.18), 0 6px 16px rgba(20, 24, 33, 0.10);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --header-height: 68px;
  --max-width: 1100px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #12161c;
    --color-surface: #1a2027;
    --color-surface-alt: #212934;
    --color-border: #2b333f;
    --color-text: #e8ebef;
    --color-text-muted: #a2acb9;
    --color-primary: #4d8bc4;
    --color-primary-dark: #6ba1d3;
    --color-accent: #f0a53c;
    --color-accent-dark: #f5b968;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.55);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-primary);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 200;
}
.skip-link:focus {
  left: 0;
}

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--color-text);
  line-height: 1.2;
}

.brand-name {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-text);
}

.brand-tag {
  font-size: 0.75rem;
  color: var(--color-accent-dark);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  width: 42px;
  height: 42px;
  cursor: pointer;
  position: relative;
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle::before { top: 14px; }
.nav-toggle span { top: 20px; }
.nav-toggle::after { top: 26px; }

.nav-toggle[aria-expanded="true"]::before {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"]::after {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-links a:hover {
  background: var(--color-surface-alt);
  color: var(--color-text);
}

.nav-links a[aria-current="page"] {
  color: var(--color-primary);
  background: var(--color-surface-alt);
}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }
  .nav-links {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    padding: 8px;
    display: none;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links a {
    padding: 12px 14px;
  }
}

/* Hero */
.hero {
  background: linear-gradient(160deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  padding: 56px 0 64px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

@media (max-width: 800px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-accent);
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.2;
  margin: 0 0 14px;
}

.hero p.lead {
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.88);
  max-width: 46ch;
  margin: 0 0 26px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.hero-photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.hero-photos a:first-child img {
  aspect-ratio: 3/4;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-accent {
  background: var(--color-accent);
  color: #1c1200;
}
.btn-accent:hover {
  background: var(--color-accent-dark);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}
.btn-outline:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-primary-dark);
}

/* Sections */
.section {
  padding: 56px 0;
}

.section-alt {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section-heading {
  margin: 0 0 8px;
  font-size: 1.6rem;
}

.section-sub {
  color: var(--color-text-muted);
  margin: 0 0 32px;
  max-width: 60ch;
}

/* Facts / stat strip */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin: 32px 0 0;
}

.fact-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.fact-card .fact-number {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--color-primary);
}

.fact-card .fact-label {
  color: var(--color-text-muted);
  font-size: 0.92rem;
}

/* Tag list (Stärken) */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.tag-list li {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
}

/* Two-column cards (Was/Wo suche ich) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.card h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card ul {
  margin: 0;
  padding-left: 1.1em;
  color: var(--color-text-muted);
}
.card ul li + li {
  margin-top: 6px;
}

/* Timeline (Lebenslauf) */
.timeline {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 760px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--color-border);
}

.timeline-item {
  position: relative;
  padding: 0 0 28px 34px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 3px solid var(--color-primary);
}

.timeline-item.is-training::before {
  border-color: var(--color-accent);
}

.timeline-date {
  display: inline-block;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--color-primary);
  background: var(--color-surface-alt);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 6px;
}

.timeline-item.is-training .timeline-date {
  color: var(--color-accent-dark);
}

.timeline-role {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 700;
}

.timeline-desc {
  margin: 0;
  color: var(--color-text-muted);
}

/* Zeugnisse gallery */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.filter-btn {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}

.filter-btn[aria-pressed="true"] {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
}

.gallery-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  padding: 0;
  text-align: left;
  font-family: inherit;
  color: inherit;
  display: block;
  width: 100%;
}

.gallery-item:hover {
  box-shadow: var(--shadow-md);
}

.gallery-thumb {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--color-surface-alt);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-caption {
  padding: 12px 14px;
}

.gallery-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.gallery-badge.badge-cert {
  color: var(--color-accent-dark);
}

.gallery-title {
  font-weight: 700;
  font-size: 0.95rem;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 16, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.lightbox.open {
  display: flex;
}

.lightbox-content {
  max-width: min(90vw, 900px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.lightbox-content img {
  max-height: 74vh;
  width: auto;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}

.lightbox-caption {
  color: #fff;
  text-align: center;
  font-weight: 600;
}

.lightbox-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lightbox-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* Kontakt */
.contact-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  max-width: 620px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--color-border);
}
.contact-row:first-child {
  border-top: none;
}

.contact-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.contact-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin: 0 0 2px;
}

.contact-value {
  font-weight: 700;
  margin: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 28px 0;
  color: var(--color-text-muted);
  font-size: 0.88rem;
  text-align: center;
}

/* Utility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
