/* ============================================================
   floriangerloff.com — modern static one-pager
   No external fonts/CDNs (GDPR-friendly), system font stack.
   ============================================================ */

:root {
  --bg: #f8fafc;
  --bg-alt: #eef2f7;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #55657a;
  --accent: #0284c7;
  --accent-soft: rgba(2, 132, 199, 0.12);
  --border: #dbe3ec;
  --shadow: 0 8px 30px rgba(15, 23, 42, 0.07);
  --radius: 14px;
  --nav-height: 64px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, sans-serif;
}

[data-theme="dark"] {
  --bg: #0b1120;
  --bg-alt: #0f172a;
  --surface: #151f33;
  --text: #e6edf6;
  --text-muted: #94a6bd;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.12);
  --border: #243248;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 12px);
}

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

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

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

.container {
  width: min(1080px, 100% - 2.5rem);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  width: min(1080px, 100% - 2.5rem);
  margin-inline: auto;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-brand {
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.nav-brand:hover { text-decoration: none; }
.nav-brand-dot { color: var(--accent); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0;
}

.nav-menu a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-menu a:hover { color: var(--text); text-decoration: none; }

.nav-cta {
  padding: 0.4rem 0.95rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent) !important;
}
.nav-cta:hover { background: var(--accent-soft); }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---------- Language toggle ---------- */

.lang-toggle {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}

.lang-btn {
  background: none;
  border: 0;
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  color: var(--text-muted);
  transition: background 0.15s ease, color 0.15s ease;
  line-height: 1.8;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active {
  background: var(--accent);
  color: #fff;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--text-muted);
  flex-shrink: 0;
}
.theme-toggle:hover { color: var(--text); border-color: var(--text-muted); }
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* ---------- Hero ---------- */

.hero {
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5.5rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0;
}

.accent { color: var(--accent); }

.hero-subtitle {
  font-size: clamp(1.1rem, 2.4vw, 1.4rem);
  font-weight: 600;
  color: var(--text-muted);
  margin: 0.6rem 0 1.2rem;
}

.hero-lead {
  color: var(--text-muted);
  max-width: 56ch;
  margin: 0 0 1.8rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2.2rem;
  list-style: none;
  padding: 0;
  margin: 2.4rem 0 0;
}
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong {
  font-size: 1.7rem;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.hero-stats span { font-size: 0.85rem; color: var(--text-muted); }

.hero-portrait { display: flex; justify-content: center; }

.portrait-frame {
  position: relative;
  width: min(320px, 70vw);
  aspect-ratio: 1;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(145deg, var(--accent-soft), var(--surface));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
}
.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.portrait-initials {
  display: none;
  font-size: 5rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.04em;
}
.portrait-fallback .portrait-initials { display: block; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}
.btn-primary:hover { box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45); }

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

/* ---------- Sections ---------- */

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--bg-alt); }

.section-title {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  letter-spacing: -0.02em;
  margin: 0 0 2.2rem;
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
}

.section-index {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* ---------- Timeline ---------- */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 0.45rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 2px;
  background: var(--border);
}

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

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.35rem;
}

.timeline-period {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.timeline-body h3 { margin: 0 0 0.15rem; font-size: 1.2rem; letter-spacing: -0.01em; }
.timeline-company { margin: 0 0 0.5rem; font-weight: 600; color: var(--text-muted); font-size: 0.95rem; }
.timeline-body p:last-child { margin: 0; color: var(--text-muted); }

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 0.5rem; font-size: 1.15rem; letter-spacing: -0.01em; }
.card p { color: var(--text-muted); margin: 0; }

.card-education {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.card-education .timeline-company { margin: 0; }

.expertise-grid,
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.2rem;
}

.portfolio-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.6rem;
}
.portfolio-card header h3 { margin: 0; }
.portfolio-card header h3 a {
  color: inherit;
  text-decoration: none;
  border-bottom: 2px solid var(--accent-soft);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.portfolio-card header h3 a:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.portfolio-card > p { margin-bottom: 0.9rem; }

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}
.feature-list li {
  position: relative;
  padding-left: 1.3rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ---------- Contact / Footer ---------- */

.section-contact { text-align: center; }
.section-contact .section-title { justify-content: center; }
.contact-lead {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin: 0 0 1.8rem;
}
.contact-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.4rem 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-inner p { margin: 0; }

/* ---------- Reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

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

/* ---------- Mobile ---------- */

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-portrait { order: -1; justify-content: flex-start; }
  .portrait-frame { width: min(220px, 55vw); }

  .nav-toggle { display: block; }
  .nav-menu {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.25rem 1rem;
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { display: block; padding: 0.7rem 0; font-size: 1.05rem; }
  .nav-cta { text-align: center; margin-top: 0.5rem; }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
