:root {
  /* Palette from gorillasun.com */
  color-scheme: light;
  --bg: #e3ddd4;
  --ink: #141210;
  --text: #2f2a26;
  --muted: #5c544c;
  --line: rgba(20, 18, 16, 0.13);
  --soft: #d9d3ca;
  --hover: #d1cbc2;
  --accent: #d45800; /* the "SUN" orange on gorillasun.com, used in both themes */
  --on-accent: #f1eeea;
  --serif: 'Habibi', Georgia, serif;
  --sans: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --sidebar: 296px;
  --column: 680px;
}
/* Dark theme: follows the OS unless the visitor picked a theme with the toggle */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #0e0e0e;
    --ink: #ece9e4;
    --text: #d3d0cb;
    --muted: #9b9287;
    --line: rgba(236, 233, 228, 0.12);
    --soft: #1c1a17;
    --hover: #241f1a;
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0e0e0e;
  --ink: #ece9e4;
  --text: #d3d0cb;
  --muted: #9b9287;
  --line: rgba(236, 233, 228, 0.12);
  --soft: #1c1a17;
  --hover: #241f1a;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.6 var(--sans);
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -0.01em; }
p, ul { margin: 0; }
p { text-wrap: pretty; }
.icon { flex: none; }

/* ── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border: 0; cursor: pointer;
  font: 500 14px/1 var(--sans); letter-spacing: -0.01em; color: inherit;
  transition: background 0.15s, opacity 0.15s;
}
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover { opacity: 0.85; }
.btn-square { width: 40px; padding: 0; background: var(--soft); }
.btn-square:hover, .btn-soft:hover { background: var(--hover); }
.btn-soft { background: var(--soft); gap: 32px; padding: 0 14px 0 18px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-sm.btn-square { width: 32px; padding: 0; }

/* ── Sidebar ───────────────────────────────────────── */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar);
  display: flex; flex-direction: column; gap: 24px;
  padding: 24px 22px; border-right: 1px solid var(--line);
  overflow-y: auto;
}
.avatar {
  width: 80px; height: 80px; object-fit: cover; margin-bottom: 18px;
  display: grid; place-items: center;
  background: var(--soft); color: var(--accent);
  font: 400 28px/1 var(--serif);
}
.name { font-size: 24px; line-height: 1.2; }
.title { color: var(--muted); font-size: 14px; margin-top: 4px; }
.bio { color: var(--text); margin-top: 14px; }
.facts {
  list-style: none; padding: 20px 0 0; border-top: 1px solid var(--line);
  display: grid; gap: 10px; font-size: 14px; line-height: 1.4;
}
.facts li { display: flex; align-items: center; gap: 10px; }
.facts .icon { color: var(--muted); }
.sidebar-bottom { margin-top: auto; display: grid; gap: 16px; }
.socials { list-style: none; padding: 0; display: flex; gap: 2px; margin-left: -10px; }
.socials a { width: 36px; height: 36px; display: grid; place-items: center; color: var(--muted); transition: color 0.15s, background 0.15s; }
.socials a:hover { color: var(--ink); background: var(--soft); }
.cta { display: flex; gap: 8px; }
.cta .btn-dark { flex: 1; }

/* ── Main column ───────────────────────────────────── */
.main { margin-left: var(--sidebar); min-height: 100vh; display: flex; flex-direction: column; }
.nav {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg); border-bottom: 1px solid transparent; transition: border-color 0.2s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: var(--column); margin: 0 auto; padding: 14px 28px;
}
.nav nav { display: flex; align-items: center; gap: 20px; font-size: 14px; font-weight: 500; letter-spacing: -0.01em; color: var(--muted); }
.nav nav a:hover { color: var(--ink); }
.nav-actions { display: flex; gap: 6px; margin-left: auto; }

/* Theme toggle shows the theme you'd switch to */
.theme-toggle .sun { display: none; }
:root[data-theme='dark'] .theme-toggle .sun { display: block; }
:root[data-theme='dark'] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-toggle .sun { display: block; }
  :root:not([data-theme='light']) .theme-toggle .moon { display: none; }
}

main { max-width: var(--column); width: 100%; margin: 0 auto; padding: 0 28px; flex: 1; }
section { padding: 56px 0; border-top: 1px solid var(--line); }
section h2 { font-size: 30px; line-height: 1.2; margin-bottom: 24px; }

.hero {
  border: 0; padding: 56px 0 52px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.hero-image { width: 104px; height: 104px; border-radius: 50%; object-fit: cover; margin-bottom: 24px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
  padding: 4px 12px 4px 10px; background: var(--soft); font-size: 13px; font-weight: 500;
}
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: #1fa45a; box-shadow: 0 0 0 3px rgba(31, 164, 90, 0.18); }
.hero .headline { font-family: var(--serif); letter-spacing: -0.01em; font-size: clamp(32px, 4vw, 40px); line-height: 1.15; text-wrap: balance; }
.lead { color: var(--muted); font-size: 17px; line-height: 1.55; max-width: 30em; margin: 12px auto 0; text-wrap: balance; }
.hero .btn-soft { margin-top: 28px; }

.prose { color: var(--text); font-size: 16px; line-height: 1.7; }

/* ── Entries (experience + education) ─────────────── */
.row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.row h3 { font-size: 18px; line-height: 1.35; }
.meta, .date { color: var(--muted); font-size: 14px; line-height: 1.45; }
.meta { margin-top: 2px; }
.meta a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.meta a:hover { text-decoration-color: currentColor; }
.date { white-space: nowrap; padding-top: 3px; }
.dot { margin: 0 4px; font-size: 10px; vertical-align: 1px; }
.desc { color: var(--text); margin-top: 12px; }

.bullets { color: var(--text); margin-top: 12px; padding-left: 18px; display: grid; gap: 8px; }
.bullets ul { padding-left: 18px; margin-top: 8px; display: grid; gap: 6px; list-style: circle; }
.bullets li::marker { color: var(--muted); }
.bullets strong { color: var(--ink); font-weight: 500; }

.timeline { display: grid; gap: 44px; }
.company { display: grid; grid-template-columns: 32px 1fr; column-gap: 16px; position: relative; }
.company.multi::before {
  content: ''; position: absolute; left: 15.5px; top: 44px; bottom: 0;
  border-left: 1px solid var(--line);
}
.logo {
  width: 32px; height: 32px; display: grid; place-items: center; overflow: hidden;
  background: var(--accent); color: var(--on-accent); font: 400 17px/1 var(--serif);
  outline: 1px solid var(--line); outline-offset: -1px;
}
.logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.roles { display: grid; gap: 32px; }

.results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.result { background: var(--soft); padding: 14px 16px; display: grid; align-content: start; gap: 4px; }
.result-value { font: 500 22px/1.15 var(--sans); letter-spacing: -0.02em; }
.result-label { color: var(--muted); font-size: 13px; line-height: 1.4; }

#education .entry + .entry { margin-top: 36px; }

.skill-group + .skill-group { margin-top: 24px; }
.label { font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { background: var(--soft); font-size: 14px; line-height: 1.4; padding: 5px 11px; }

/* ── Contact + footer ──────────────────────────────── */
.contact { text-align: center; padding: 64px 0; }
.contact h2 { margin-bottom: 0; font-size: 34px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; margin-top: 32px; text-align: left; }
.card { display: flex; align-items: center; gap: 14px; padding: 12px; background: var(--soft); transition: background 0.15s; min-width: 0; }
.card:hover { background: var(--hover); }
.card > span:last-child { min-width: 0; }
.card-icon { width: 38px; height: 38px; flex: none; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); }
.card-title { display: block; font: 400 16px/1.3 var(--serif); }
.card-sub { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.footer {
  max-width: var(--column); width: 100%; margin: 0 auto; padding: 24px 28px 32px;
  display: flex; justify-content: space-between; font-size: 13px; color: var(--muted);
}
.footer a { display: inline-flex; align-items: center; gap: 6px; }
.footer span a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.footer a:hover { color: var(--ink); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Impressum page ────────────────────────────────── */
.legal main { max-width: 640px; padding-top: 48px; padding-bottom: 64px; }
.legal h1 { font-size: 34px; margin: 24px 0 4px; }
.legal h2 { font-size: 26px; margin: 40px 0 12px; }
.legal p { color: var(--text); margin-top: 12px; }
.legal .muted { color: var(--muted); font-size: 14px; margin-top: 0; }
.legal main a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.legal .back { color: var(--muted); font-size: 14px; text-decoration: none; }

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 1023px) {
  .sidebar { position: static; width: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 24px; overflow: visible; }
  .sidebar-top { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: center; }
  .avatar { width: 64px; height: 64px; margin: 0; grid-row: span 2; font-size: 24px; }
  .bio { grid-column: 1 / -1; }
  .sidebar-bottom { margin-top: 0; }
  .cta { max-width: 360px; }
  .main { margin-left: 0; }
}
@media (max-width: 640px) {
  .nav-inner, main, .footer { padding-left: 16px; padding-right: 16px; }
  .sidebar { padding: 20px 16px; }
  .nav nav { display: none; }
  .row { flex-direction: column; gap: 2px; }
  .date { padding-top: 0; }
  .company { grid-template-columns: 1fr; }
  .company.multi::before { display: none; }
  .logo { margin-bottom: 10px; }
  section { padding: 44px 0; }
  section h2 { font-size: 28px; }
  .timeline { gap: 40px; }
  .result { padding: 10px; }
  .result-value { font-size: 18px; }
  .result-label { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
