@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/static/fonts/figtree-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/static/fonts/figtree-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Syne";
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url("/static/fonts/syne-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Syne";
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url("/static/fonts/syne-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #141a17;
  --ink-soft: #2a332e;
  --mist: #e7ece9;
  --mist-deep: #cfd8d3;
  --panel: #f3f6f4;
  --signal: #9a4e24;
  --signal-soft: #c47a4a;
  --line: rgba(20, 26, 23, 0.12);
  --font-display: "Syne", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, sans-serif;
}
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
[id] { scroll-margin-top: 6rem; }
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(154, 78, 36, 0.12), transparent 55%),
    radial-gradient(900px 600px at -10% 20%, rgba(47, 90, 72, 0.1), transparent 50%),
    linear-gradient(180deg, var(--mist) 0%, var(--panel) 45%, var(--mist-deep) 100%);
  min-height: 100%;
  overflow-wrap: break-word;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; text-wrap: balance; }
a { color: inherit; }
::selection { background: rgba(154, 78, 36, 0.25); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.skip {
  position: absolute; left: -999px;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 60; background: var(--panel); padding: 0.5rem 1rem; }
.wrap { width: min(72rem, calc(100% - 2rem)); margin-inline: auto; }
@media (min-width: 640px) { .wrap { width: min(72rem, calc(100% - 3rem)); } }
@media (min-width: 768px) { .wrap { width: min(72rem, calc(100% - 5rem)); } }

.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  border-bottom: 1px solid rgba(243, 246, 244, 0.08);
  background: rgba(20, 26, 23, 0.72);
  backdrop-filter: blur(10px);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  width: min(72rem, calc(100% - 2rem)); margin: 0 auto; padding: 0.75rem 0;
  overflow: visible;
}
.brand { color: var(--panel); text-decoration: none; font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; flex: 0 0 auto; }
.brand-lg { display: none; }
@media (min-width: 640px) { .brand-sm { display: none; } .brand-lg { display: inline; } }
.nav nav {
  display: flex; gap: 0.85rem; overflow-x: auto; flex: 1 1 auto; min-width: 0;
  font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(243,246,244,0.78); scrollbar-width: none; justify-content: flex-end;
}
.nav nav a { text-decoration: none; white-space: nowrap; }
.nav nav a:hover, .nav nav a[aria-current] { color: var(--panel); }
.nav nav a[aria-current] { text-decoration: underline; text-underline-offset: 8px; text-decoration-color: var(--signal); }
.nav .lang {
  position: relative; flex: 0 0 auto; z-index: 70;
  margin-left: 0.15rem; padding-left: 0.65rem;
  border-left: 1px solid rgba(243,246,244,0.18);
  font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(243,246,244,0.78);
}
.nav .lang > summary {
  list-style: none; cursor: pointer; color: inherit;
  min-height: 2rem; display: inline-flex; align-items: center; user-select: none;
}
.nav .lang > summary::-webkit-details-marker { display: none; }
.nav .lang > summary::after { content: " ▾"; font-size: 0.75em; }
.nav .lang[open] > summary { color: var(--panel); }
.nav .lang-menu {
  position: absolute; right: 0; top: calc(100% + 0.45rem); z-index: 80;
  display: flex; flex-direction: column; gap: 0.15rem;
  min-width: 11rem; max-height: min(70vh, 22rem); overflow-y: auto;
  padding: 0.55rem 0.65rem;
  background: rgba(20, 26, 23, 0.98); border: 1px solid rgba(243,246,244,0.12);
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.35);
}
.nav .lang-menu a {
  text-decoration: none; white-space: nowrap; color: rgba(243,246,244,0.85);
  text-transform: none; letter-spacing: 0.02em; font-size: 0.78rem; padding: 0.35rem 0.15rem;
}
.nav .lang-menu a:hover { color: var(--panel); }
.nav .lang-menu a[aria-current="true"] { color: var(--panel); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--signal); }

.hero { position: relative; min-height: 100svh; overflow: hidden; color: var(--panel); }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center 18%; }
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(20,26,23,0.88), rgba(20,26,23,0.5) 55%, rgba(20,26,23,0.18)),
    linear-gradient(180deg, rgba(20,26,23,0.25), transparent 40%, rgba(20,26,23,0.75));
}
.hero-copy { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: flex-end; min-height: 100svh; padding: 7rem 0 3.5rem; }
.hero-loc { margin: 0 0 1rem; font-size: 0.8rem; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(243,246,244,0.72); }
.hero h1 { margin: 0; font-size: clamp(2rem, 5.6vw, 4.6rem); line-height: 1.02; letter-spacing: -0.03em; font-weight: 650; }
.hero h1 span, .hero-title span { display: block; }
.hero-title { margin: 1.25rem 0 0; max-width: 40rem; font-size: clamp(0.95rem, 2.2vw, 1.55rem); color: rgba(243,246,244,0.92); font-family: var(--font-display); }
.hero-cta { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: 0.7rem 1.4rem; text-decoration: none; font-size: 0.9rem; letter-spacing: 0.04em; border-radius: 2px; }
.btn-signal { background: var(--signal); color: var(--panel); }
.btn-signal:hover { background: var(--signal-soft); }
.btn-ghost { border: 1px solid rgba(243,246,244,0.28); color: rgba(243,246,244,0.85); }
.btn-ghost:hover { border-color: rgba(243,246,244,0.65); color: var(--panel); }
.btn-ghost-ink { border: 1px solid rgba(243,246,244,0.35); color: var(--panel); }
.btn-line { border: 1px solid var(--line); }

.trabajo, .perfiles, .intro, .block { padding: 4.5rem 0; }
.trabajo h2, .perfiles h2, .intro h1, .experiencia h2, .block h2 { font-size: clamp(1.75rem, 4vw, 3.2rem); line-height: 1.08; letter-spacing: -0.02em; margin: 0; }
#trabajo .wrap {
  container-type: inline-size;
}
#trabajo h2 {
  text-align: center;
  text-wrap: balance;
  /* No nowrap: DE/EL/PL titles overflow the wrap (e.g. Rückverfolgbarkeit…). */
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  /* Escala con el mismo ancho que .trace img (el wrap). */
  font-size: clamp(1.25rem, 3.6cqi, 2.75rem);
  letter-spacing: -0.03em;
  max-width: 100%;
}
@media (max-width: 639px) {
  #trabajo h2 {
    font-size: clamp(1.25rem, 5.2vw, 1.75rem);
  }
}
.intro h1 { max-width: none; }
.eyebrow { margin: 0 0 0.7rem; font-size: 0.75rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--signal); }
.eyebrow a { color: var(--signal); text-decoration: none; }
.eyebrow a:hover { color: var(--signal-soft); }
.eyebrow.light, .lede.light { color: rgba(243,246,244,0.7); }
.lede { max-width: none; width: 100%; color: var(--ink-soft); font-size: 1.05rem; line-height: 1.55; overflow-wrap: normal; }
.lede a { color: var(--signal); }
.prose { margin: 1.1rem 0 0; color: var(--ink-soft); font-size: 1.1rem; line-height: 1.65; max-width: none; width: 100%; text-wrap: pretty; overflow-wrap: normal; }
@media (min-width: 768px) {
  .prose, .intro .lede { text-align: justify; }
}
.trace { margin: 2.5rem 0 0; }
.trace img { width: 100%; height: auto; display: block; }
.cards { display: grid; gap: 1.2rem; margin-top: 2.2rem; }
@media (min-width: 768px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { border: 1px solid var(--line); background: rgba(255,255,255,0.35); padding: 1.4rem; }
.card h3, .card h2 { margin: 0.6rem 0 0; font-size: 1.35rem; }
.more { display: inline-block; margin-top: 1.2rem; color: var(--ink-soft); text-decoration: none; }
.more:hover { color: var(--signal); }
.soft { color: var(--ink-soft); }

.experiencia { background: var(--ink); color: var(--panel); padding: 4.5rem 0 5rem; }
.experiencia h2 { color: var(--panel); }
.xp { display: grid; gap: 0.6rem; border-top: 1px solid rgba(243,246,244,0.12); padding-top: 2rem; margin-top: 2rem; }
.xp:first-of-type { border-top: 0; padding-top: 0; margin-top: 1.5rem; }
@media (min-width: 768px) { .xp { grid-template-columns: 11rem 1fr; } }
.when { margin: 0; color: rgba(243,246,244,0.65); font-size: 0.95rem; }
.xp h3 { margin: 0; font-size: 1.2rem; }
.org { margin: 0.3rem 0 0; color: rgba(243,246,244,0.72); }
.xp ul { margin: 0.8rem 0 0; padding-left: 1.2rem; color: rgba(243,246,244,0.78); }
.cta-row { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

.contact { border-top: 1px solid var(--line); background: rgba(20,26,23,0.04); padding: 4rem 0; }
.contact-grid { display: flex; flex-direction: column; gap: 2rem; }
@media (min-width: 768px) { .contact-grid { flex-direction: row; justify-content: space-between; align-items: flex-end; } }
.contact h2 { margin: 0; font-size: clamp(1.6rem, 3.5vw, 2.6rem); }
.contact-links a { display: block; }
.contact-links .mail { text-underline-offset: 4px; }
.contact-links .mail:hover { text-decoration: underline; }
.social { display: flex; gap: 1.2rem; margin-top: 0.8rem; font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); }
.social a { text-decoration: none; }
.social a:hover { color: var(--signal); }

body.inner { padding-top: 4rem; }
.inner-main .intro { padding-top: 3rem; }
.plain { color: var(--ink-soft); line-height: 1.7; }
.skill-grid {
  display: grid;
  gap: 1.8rem;
  margin-top: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}
.skill-grid h3 { margin: 0 0 0.8rem; font-size: 1.15rem; }
.pillar-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
@media (min-width: 768px) { .pillar-grid { grid-template-columns: repeat(3, 1fr); } }
.pillar-grid article {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.pillar-grid h3 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
}
.pillar-grid p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
  font-size: 0.95rem;
}
.item { border-top: 1px solid var(--line); padding-top: 1.2rem; margin-top: 1.2rem; }
.item h3 { margin: 0; font-size: 1.15rem; }
.sub { margin: 2.5rem 0 0; font-size: 1.5rem; }
.cards.ink { margin-top: 1.5rem; }
.cards.ink article { border-top: 1px solid rgba(243,246,244,0.12); padding-top: 1.2rem; }
.pills { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 1.2rem 0 0; padding: 0; list-style: none; }
.pills li {
  border: 1px solid var(--line);
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.chat-form { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.5rem; }
.chat-form input {
  flex: 1 1 16rem; min-height: 2.75rem; border: 1px solid var(--line);
  background: rgba(255,255,255,0.55); padding: 0 1rem; font: inherit; color: var(--ink);
}
.chat-form input:focus { border-color: var(--signal); outline: none; }
.chat-answer { margin-top: 1.5rem; white-space: pre-wrap; color: var(--ink-soft); line-height: 1.6; }
.chat-sources { margin-top: 1rem; padding: 0; list-style: none; font-size: 0.75rem; color: var(--ink-soft); }
.chat-error { color: #8b1e1e; }

.appear { animation: rise 0.75s cubic-bezier(0.16, 1, 0.3, 1) both; }
.appear.d1 { animation-delay: 0.08s; }
.appear.d2 { animation-delay: 0.18s; }
.appear.d3 { animation-delay: 0.32s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.js .appear-in { opacity: 0; transform: translateY(16px); }
.js .appear-in.is-in { animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
@media (prefers-reduced-motion: reduce) {
  .appear, .js .appear-in, .js .appear-in.is-in { animation: none; opacity: 1; transform: none; }
}
