/* ============================================================
   gabrielschutz.de — Senior Software Engineer, Payments & Financial Systems
   Two-column hero + card grid layout. System-sans body, Fraunces
   display. OKLCH tinted neutrals, one restrained petrol accent.
   Light + auto dark via prefers-color-scheme. No framework.
   ============================================================ */

/* ---- Tokens -------------------------------------------------- */
:root {
  /* neutrals tinted cool (hue 250) — pure gray is dead */
  --bg:        oklch(98.5% 0.006 250);
  --surface:   oklch(96.5% 0.008 250);
  --ink:       oklch(24% 0.020 255);
  --muted:     oklch(46% 0.022 255);
  --faint:     oklch(54% 0.020 255);   /* AA 4.5+ on --bg (keywords, footer, refs) */
  --line:      oklch(90% 0.012 250);
  --line-soft: oklch(94% 0.010 250);

  /* one accent: deep petrol — distinct from generic dev-blue / AI-cyan */
  --accent:      oklch(45% 0.105 228);
  --accent-ink:  oklch(40% 0.110 228);   /* link text, AA on --bg */
  --accent-soft: oklch(93% 0.030 228);   /* hover wash, underlines */
  --on-accent:   oklch(99% 0.004 250);   /* text on accent fill */

  /* type */
  --font-display: "Fraunces", "Hoefler Text", Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
               "Helvetica", Arial, sans-serif;

  --t-xs:  0.78rem;
  --t-sm:  0.875rem;
  --t-base: 1.06rem;                       /* ~17px */
  --t-md:  clamp(1.14rem, 1.0rem + 0.6vw, 1.3rem);
  --t-lg:  clamp(1.35rem, 1.1rem + 1.1vw, 1.7rem);
  --t-display: clamp(2.45rem, 1.7rem + 3.3vw, 3.75rem);

  /* rhythm */
  --measure: 38rem;
  --gap: clamp(2.8rem, 2rem + 3vw, 4.2rem);
  --pad-x: clamp(1.25rem, 0.6rem + 3vw, 2.2rem);

  --radius: 9px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);  /* ease-out, natural decel */
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        oklch(17.5% 0.013 258);   /* warm-dark, never pure black */
    --surface:   oklch(21.5% 0.014 258);
    --ink:       oklch(91% 0.012 250);
    --muted:     oklch(72% 0.018 250);
    --faint:     oklch(60% 0.018 250);
    --line:      oklch(32% 0.014 258);
    --line-soft: oklch(27% 0.013 258);

    --accent:      oklch(74% 0.105 222);
    --accent-ink:  oklch(80% 0.100 222);   /* link text on dark */
    --accent-soft: oklch(30% 0.045 228);
    --on-accent:   oklch(17.5% 0.013 258);

    /* lighter body weight reads better on dark */
    --body-weight: 360;
  }
}

/* ---- Reset / base ------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: var(--body-weight, 400);
  font-size: var(--t-base);
  line-height: 1.6;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

::selection { background: var(--accent-soft); color: var(--ink); }

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

/* ---- Shell -------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: 60rem;
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

/* ---- Site header: wordmark + language toggle ---------------- */
.site-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: clamp(1.4rem, 1rem + 1.5vw, 2.4rem);
}
.wordmark {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: 1.18rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.wordmark .dot { color: var(--accent); }

.langtoggle {
  font-size: var(--t-sm);
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 0.5ch;
  color: var(--faint);
}
.langtoggle a {
  color: var(--muted);
  padding: 0.15em 0.1em;
  border-bottom: 1.5px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.langtoggle a:hover { color: var(--accent-ink); }
.langtoggle .current {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

/* ---- Sections ----------------------------------------------- */
main { display: block; }
section { margin-block: var(--gap); }
section:first-of-type { margin-top: clamp(1rem, 0.4rem + 2vw, 2.2rem); }

/* centered, narrower text blocks (stack, languages, background, contact) */
.section-center { max-width: 34rem; margin-inline: auto; }

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin: 0 0 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.8ch;
}
.eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
/* centered sections get a flanking rule on both sides */
.section-center .eyebrow { justify-content: center; }
.section-center .eyebrow::before {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

h1, h2, h3 { font-weight: 600; line-height: 1.12; margin: 0; }

/* ---- Hero: text left, portrait right ------------------------ */
.hero {
  display: grid;
  gap: clamp(1.6rem, 1rem + 3vw, 2.8rem);
  align-items: start;
}
@media (min-width: 46rem) {
  .hero { grid-template-columns: minmax(0, 1fr) auto; }
}
.hero-text { min-width: 0; max-width: 40rem; }

.hero .portrait {
  display: block;
  order: -1;                       /* photo above name on narrow screens */
  width: clamp(150px, 40vw, 210px);
  aspect-ratio: 485 / 600;
  height: auto;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 18px 40px -28px color-mix(in oklab, var(--ink) 55%, transparent);
}
@media (min-width: 46rem) {
  .hero .portrait { order: 0; width: clamp(180px, 18vw, 215px); }
}

.hero .name {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: var(--t-display);
  letter-spacing: -0.02em;
  line-height: 1.02;
  color: var(--accent-ink);
  margin: 0 0 0.45em;
}
.hero .role {
  font-size: var(--t-lg);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 0.7rem;
  max-width: 24ch;
}
.hero .lede {
  font-size: var(--t-md);
  color: var(--muted);
  margin: 0 0 1.4rem;
  max-width: var(--measure);
  text-wrap: pretty;
}
.hero .lede strong { color: var(--ink); font-weight: 600; }

/* availability — status pill with a live dot */
.avail {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35em 0.6ch;
  font-size: var(--t-sm);
  color: var(--muted);
  margin: 0;
  padding: 0.75em 1.15em;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in oklab, var(--surface) 65%, transparent);
}
.avail b { color: var(--ink); font-weight: 600; }
.avail .dot {
  flex: none;
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 0.15ch;
}

/* ---- Selected work — card grid ------------------------------ */
.work {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 34rem) { .work { grid-template-columns: 1fr 1fr; } }
@media (min-width: 52rem) { .work { grid-template-columns: repeat(4, 1fr); gap: 1.1rem; } }

.work li {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.15rem 1.2rem;
  background: color-mix(in oklab, var(--surface) 70%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease),
              box-shadow 0.2s var(--ease);
}
.work li:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -20px color-mix(in oklab, var(--ink) 45%, transparent);
}
.work .headline {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
  line-height: 1.28;
  text-wrap: pretty;
  margin: 0;
}
.work .headline .metric {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--accent-ink);
  letter-spacing: -0.01em;
}
.work .detail {
  font-size: var(--t-xs);
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
  text-wrap: pretty;
}
/* one-line extra below the grid */
.work-note {
  display: flex;
  gap: 0.7ch;
  align-items: baseline;
  margin: 1.2rem 0 0;
  font-size: var(--t-sm);
  color: var(--muted);
}
.work-note .plus { color: var(--accent-ink); font-weight: 700; }
.work-note b { color: var(--ink); font-weight: 600; }

/* ---- Stack — icon-led lines --------------------------------- */
.stack-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  display: grid;
  gap: 0.85rem;
}
.stack-rows li {
  display: flex;
  gap: 0.8ch;
  align-items: start;
  font-size: var(--t-sm);
  color: var(--muted);
  line-height: 1.55;
}
.stack-rows .ico {
  flex: none;
  width: 1.05em;
  height: 1.05em;
  margin-top: 0.22em;
  color: var(--accent-ink);
}
.stack-rows b { color: var(--ink); font-weight: 600; }

/* ---- Spoken languages row ----------------------------------- */
.langs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.langs li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  text-align: center;
}
.langs .lang-name { font-weight: 600; color: var(--ink); }
.langs .lang-meta { font-size: var(--t-sm); color: var(--muted); }

/* ---- Background prose --------------------------------------- */
.prose {
  color: var(--muted);
  margin: 0;
  text-wrap: pretty;
  text-align: center;
}
.prose strong { color: var(--ink); font-weight: 600; }
.prose p { margin: 0 0 0.9rem; }
.prose p:last-child { margin-bottom: 0; }
.prose a { border-bottom: 1px solid var(--accent-soft); transition: border-color 0.18s var(--ease); }
.prose a:hover { border-bottom-color: var(--accent); }

/* ---- Contact / CTA ------------------------------------------ */
.cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin: 0 0 1.6rem;
}
@media (max-width: 28rem) { .cta-row { grid-template-columns: 1fr; } }
/* hero variant: a compact CTA pair right under the availability line */
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  max-width: none;
  margin: 1.4rem 0 0;
}
.hero-cta .btn { width: auto; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55ch;
  white-space: nowrap;
  width: 100%;
  font-size: var(--t-sm);
  font-weight: 600;
  letter-spacing: 0.005em;
  padding: 0.8em 1.15em;
  border-radius: var(--radius);
  border: 1.5px solid var(--accent);
  transition: transform 0.16s var(--ease), background 0.18s var(--ease),
              color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.btn .pdf { font-size: var(--t-xs); font-weight: 600; opacity: 0.75; letter-spacing: 0.06em; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover {
  color: var(--on-accent);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px -8px color-mix(in oklab, var(--accent) 65%, transparent);
}
.btn-ghost { background: transparent; color: var(--accent-ink); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-ink); transform: translateY(-1px); }

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--t-sm);
}
.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.55ch;
  color: var(--muted);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.contact-links a:hover { color: var(--accent-ink); border-bottom-color: var(--accent); }
.contact-links .ico { flex: none; width: 1.05em; height: 1.05em; }
.refs { font-size: var(--t-sm); color: var(--faint); margin: 1.3rem 0 0; text-align: center; }

/* ---- Footer ------------------------------------------------- */
.site-foot {
  margin-top: var(--gap);
  padding-block: 2rem 2.6rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1.2rem;
  font-size: var(--t-sm);
  color: var(--faint);
  text-align: center;
}
.site-foot ul {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 0.5rem 1.2rem;
  margin: 0; padding: 0; list-style: none;
}
.site-foot li { display: inline-flex; align-items: center; gap: 1.2rem; }
.site-foot li::before {
  content: "";
  width: 1px;
  height: 0.9em;
  background: var(--line);
}
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--accent-ink); }

/* ---- Page-load motion: one orchestrated reveal -------------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise 0.7s var(--ease) both; }
  .reveal:nth-child(1) { animation-delay: 0.02s; }
  .reveal:nth-child(2) { animation-delay: 0.09s; }
  .reveal:nth-child(3) { animation-delay: 0.16s; }
  .reveal:nth-child(4) { animation-delay: 0.23s; }
  .reveal:nth-child(5) { animation-delay: 0.30s; }
  .reveal:nth-child(6) { animation-delay: 0.37s; }
  .reveal:nth-child(7) { animation-delay: 0.44s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* live availability dot */
  .avail .dot { animation: ping 2.6s var(--ease) infinite; }
  @keyframes ping {
    0%   { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 50%, transparent); }
    70%  { box-shadow: 0 0 0 6px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
  }
}

/* ---- Print: hide chrome (the PDFs are the print artifact) --- */
@media print {
  .site-head, .site-foot, .langtoggle { display: none; }
  body { color: #000; background: #fff; }
}
