:root {
  --bg: #faf6ef;
  --card-bg: #ffffff;
  --fg: #1a2e1a;
  --muted: #4a5a4a;
  --accent-orange: #e07818;
  --accent-green: #1faa59;
  --accent-mint: #d4f4e2;
  --accent-yellow: #fef3c7;
  --accent-yellow-mark: #fde68a;
  --accent-green-mark: #bbf7d0;
  --border: #e8e0d4;
  --shadow: 0 2px 12px rgba(26,46,26,0.07);
  --shadow-md: 0 4px 24px rgba(26,46,26,0.10);
  --radius: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 18px;
  line-height: 1.65;
  min-height: 100vh;
}

.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

/* ── Language toggle ── */
.lang-switch {
  display: flex;
  justify-content: flex-end;
  gap: .25rem;
  margin-bottom: 2rem;
}
.lang-switch a {
  display: inline-flex;
  align-items: center;
  padding: .25rem;
  border-radius: 6px;
  opacity: .45;
  transition: opacity .15s;
}
.lang-switch a img {
  width: 24px;
  height: 24px;
  display: block;
  border-radius: 50%;
  object-fit: cover;
}
.lang-switch a.active,
.lang-switch a:hover {
  opacity: 1;
}

/* ── Hero ── */
.hero {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 2.5rem;
}

.avatar-wrap {
  flex-shrink: 0;
  position: relative;
  width: fit-content;
}

.avatar-wrap::before {
  content: "";
  position: absolute;
  inset: -9% -11% -11% -9%;
  background: var(--accent-mint);
  border-radius: 32%;
  transform: rotate(-7deg);
  z-index: 0;
}

.avatar {
  width: 148px;
  height: 148px;
  border-radius: 28px;
  object-fit: cover;
  object-position: center top;
  display: block;
  position: relative;
  z-index: 1;
}

.hero-text h1 {
  margin: 0 0 .15rem;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--fg);
}

.hero-text .nickname {
  font-family: 'Caveat', cursive;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent-orange);
  display: block;
  margin-bottom: .6rem;
}

.hero-text .subtitle {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--fg);
  margin: 0 0 .3rem;
}

.highlight-green {
  background: linear-gradient(transparent 55%, rgb(205, 238, 218) 55%);
  padding: 0 2px;
}

.highlight-yellow {
  background: linear-gradient(transparent 55%, rgb(255, 214, 110) 55%);
  padding: 0 2px;
}

.hero-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .75rem;
  margin-top: .75rem;
  font-size: .85rem;
  color: var(--muted);
}
.hero-contacts a {
  color: var(--accent-green);
  text-decoration: none;
  font-weight: 700;
}
.hero-contacts a:hover { text-decoration: underline; }
.hero-contacts .sep { color: var(--border); }

/* ── Section labels (Caveat) ── */
.section-label {
  font-family: 'Caveat', cursive;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-green);
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.section-label::before {
  content: '↓';
  font-family: inherit;
}

/* ── Metrics grid ── */
.metrics {
  margin-bottom: 2.5rem;
}

.metrics-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  align-items: flex-start;
}

.metric-card.highlight .value {
  color: var(--accent-green);
}

.metric-card {
  background: var(--card-bg);
  border: none;
  border-radius: 20px;
  padding: .75rem 1.3rem .7rem;
  box-shadow: 0 4px 16px rgba(26,46,26,0.09);
  position: relative;
  width: auto;
  flex: 0 1 auto;
  max-width: 100%;
}

/* Slight alternating rotation, like the hand-placed cards on the CV */
.metrics-grid .metric-card:nth-child(1) { transform: rotate(-1deg); }
.metrics-grid .metric-card:nth-child(2) { transform: rotate(.8deg); }
.metrics-grid .metric-card:nth-child(3) { transform: rotate(-.6deg); }
.metrics-grid .metric-card:nth-child(4) { transform: rotate(1deg); }
.metrics-grid .metric-card:nth-child(5) { transform: rotate(-.8deg); }

.metric-card .value {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--fg);
  display: block;
  letter-spacing: -.03em;
  line-height: 1.15;
  margin-bottom: .1rem;
}

.metric-card .label {
  font-size: .8rem;
  color: var(--muted);
  display: block;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
}

.metric-card.dark {
  background: #1a2e1a;
  color: #fff;
  display: flex;
  align-items: center;
  gap: .85rem;
  text-decoration: none;
  transition: opacity .15s;
}
.metric-card.dark:hover { opacity: .88; }
.metric-card.dark img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}
.metric-card.dark .badge-text {
  font-size: .8rem;
  color: rgba(255,255,255,0.75);
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}
.metric-card.dark .badge-text strong {
  color: #fff;
  display: block;
  font-size: .95rem;
  margin-bottom: .1rem;
}
.metric-card.dark .badge-arrow {
  margin-left: auto;
  font-size: 1rem;
  opacity: .5;
  flex-shrink: 0;
}

/* ── Bio ── */
.bio {
  margin-bottom: 2.5rem;
}

.bio p {
  color: var(--muted);
  margin: 0 0 1rem;
  font-size: 1rem;
  line-height: 1.8;
}
.bio p:last-child { margin-bottom: 0; }
.bio strong { color: var(--fg); }

/* ── ManyContacts card ── */
.mc-card {
  background: var(--card-bg);
  border: 1.5px solid var(--accent-green);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2.5rem;
}

.mc-card .mc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: .75rem;
}

.mc-card h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--fg);
}

.mc-card .mc-tag {
  font-size: .75rem;
  font-weight: 700;
  background: var(--accent-mint);
  color: var(--accent-green);
  border-radius: 999px;
  padding: .2rem .65rem;
  white-space: nowrap;
}

.mc-card p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.75;
}
.mc-card p strong { color: var(--fg); }

.mc-card a.mc-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--accent-green);
  color: #fff;
  padding: .55rem 1.1rem;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  transition: opacity .15s;
}
.mc-card a.mc-link:hover { opacity: .85; }

/* ── CTA ── */
.cta {
  text-align: center;
  margin-bottom: 2.5rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}
.cta p { margin: 0; }

/* ── Footer links ── */
.footer-links {
  display: flex;
  justify-content: center;
  gap: .75rem;
  flex-wrap: wrap;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem 1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  color: var(--fg);
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform .1s ease, box-shadow .15s ease;
}
.link-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.link-btn img {
  width: 17px;
  height: 17px;
  object-fit: contain;
}
.link-btn.cv-btn {
  background: var(--fg);
  color: #fff;
  border-color: var(--fg);
}

/* ── Companies logos ── */
.companies {
  margin-bottom: 2.5rem;
}

.logos-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem 2.5rem;
}

/* Each slot is a fixed 28px tall cell so ALL logos share the same visual height */
.logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  text-decoration: none;
}

.logo-item img {
  height: 28px;
  width: auto;
  /*
    max-width 200px covers the widest logos at 28px height:
    chicfy 108×16 (6.75:1) → 189px | manycontacts 2799×426 (6.57:1) → 184px
    alten 94×16 (5.88:1) → 165px — all < 200px → all render at full 28px height
  */
  max-width: 200px;
  object-fit: contain;
  filter: brightness(0) opacity(0.38);
  transition: filter .2s ease;
  display: block;
}

/* All-caps wordmarks (Chicfy, ALTEN) look oversized at full slot height */
.logo-item img.logo-caps {
  height: 21px;
}

.logo-item:hover img {
  filter: none;
}

/* ── Talk card ── */
.talk-card {
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 2.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  transition: transform .1s ease, box-shadow .15s ease;
}
.talk-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.talk-card .talk-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: .1rem;
}
/* Consecutive project cards sit closer together */
.talk-card.stacked {
  margin-bottom: 1rem;
}
.talk-card .project-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
  margin-top: .1rem;
}
.talk-card .talk-body {}
.talk-card .talk-meta {
  font-size: .75rem;
  font-weight: 700;
  color: var(--accent-orange);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .3rem;
}
.talk-card .talk-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--fg);
  line-height: 1.3;
  margin: 0 0 .3rem;
}
.talk-card .talk-desc {
  font-size: .85rem;
  color: var(--muted);
  font-weight: 600;
}
.talk-card .talk-arrow {
  margin-left: auto;
  font-size: 1.1rem;
  color: var(--muted);
  flex-shrink: 0;
  align-self: center;
}

/* ── Responsive ── */

@media (max-width: 640px) {
  .hero {
    grid-template-columns: 90px 1fr;
    gap: 1rem;
  }
  .avatar {
    width: 82px;
    height: 82px;
    border-radius: 18px;
  }
  .hero-text h1 { font-size: 1.5rem; }
  .metric-card .value { font-size: 1.25rem; }
  .metric-card .label,
  .metric-card.dark .badge-text { white-space: normal; }
  .mc-card { padding: 1.1rem 1.25rem; }
  .talk-card { flex-wrap: wrap; }
  .talk-card .talk-arrow { display: none; }
}
