/* wildtconsulting.de — minimal personal site.
   Pixyll-inspired near-white paper, et-book serif body, mono wordmark,
   right-margin sidenotes via Tufte CSS.
   Layout adapted from edwardtufte/tufte-css (MIT).
   All fonts served locally; no third-party requests. */

/* ============== et-book ============== */

@font-face {
  font-family: "et-book";
  src: url("/assets/fonts/et-book/et-book-roman-line-figures.woff") format("woff"),
       url("/assets/fonts/et-book/et-book-roman-line-figures.ttf")  format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "et-book";
  src: url("/assets/fonts/et-book/et-book-display-italic-old-style-figures.woff") format("woff"),
       url("/assets/fonts/et-book/et-book-display-italic-old-style-figures.ttf")  format("truetype");
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "et-book";
  src: url("/assets/fonts/et-book/et-book-bold-line-figures.woff") format("woff"),
       url("/assets/fonts/et-book/et-book-bold-line-figures.ttf")  format("truetype");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "et-book";
  src: url("/assets/fonts/et-book/et-book-semi-bold-old-style-figures.woff") format("woff"),
       url("/assets/fonts/et-book/et-book-semi-bold-old-style-figures.ttf")  format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "et-book-osf";
  src: url("/assets/fonts/et-book/et-book-roman-old-style-figures.woff") format("woff"),
       url("/assets/fonts/et-book/et-book-roman-old-style-figures.ttf")  format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ============== tokens ============== */

:root {
  --paper:    #fdfdfd;   /* Pixyll's signature near-white */
  --ink:      #2d2d2d;   /* warm dark, not pure black */
  --rule:     #e1e1e1;
  --muted:    #6e6e6e;
  --accent:   #0a7ec2;   /* refreshed Pixyll blue */
  --whisper:  #eaf3fa;   /* faint blue tint for selection */

  --serif:     "et-book", Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --serif-osf: "et-book-osf", "et-book", Palatino, Georgia, serif;
  --mono:      "Berkeley Mono", "iA Writer Mono S", "JetBrains Mono", Menlo, Consolas, monospace;

  --col: 36rem;          /* main reading column ~ 55% */
  --side-w: 17rem;       /* sidenote column width */
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:   #16181b;   /* deep cool charcoal */
    --ink:     #e6e6e6;
    --rule:    #2d3036;
    --muted:   #9a9a9a;
    --accent:  #4ab9ff;
    --whisper: #1c2a36;
  }
}

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

* { box-sizing: border-box; }

/* ============== base ============== */

html { font-size: 15px; }

body {
  width: 87.5%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 12.5%;
  font-family: var(--serif);
  background-color: var(--paper);
  color: var(--ink);
  counter-reset: sidenote-counter;
  font-feature-settings: "kern", "liga", "onum";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ============== site header ============== */

.site-header {
  width: 87.5%;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2.2rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.5rem;
}

.brand {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.15rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.01em;
  background: none;
  text-shadow: none;
}
.brand:hover { color: var(--accent); }

.primary-nav {
  display: flex;
  gap: 1.6rem;
  font-family: var(--serif);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
}
.primary-nav a {
  color: var(--muted);
  background: none;
  text-shadow: none;
  text-decoration: none;
}
.primary-nav a:hover,
.primary-nav a:focus { color: var(--accent); }

/* ============== franklin content layout ============== */

.franklin-content {
  position: relative;
  padding-bottom: 4rem;
}

/* Reading column applies to direct text children only */
.franklin-content > p,
.franklin-content > ol,
.franklin-content > ul,
.franklin-content > dl,
.franklin-content > h1,
.franklin-content > h2,
.franklin-content > h3,
.franklin-content > hr,
.franklin-content > blockquote,
.franklin-content > .lede,
.franklin-content > .contact-cta {
  width: 55%;
}

/* ============== display typography ============== */

.eyebrow {
  font-family: var(--serif-osf);
  font-style: normal;
  font-weight: 400;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.36em;
  color: var(--muted);
  margin: 0 0 1.2rem;
  padding: 0;
}

h1 {
  font-family: var(--serif);
  font-style: normal;
  font-weight: 700;
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 1.4rem;
  color: var(--ink);
}

.lede {
  font-style: italic;
  font-weight: 400;
  font-size: 1.4rem;
  line-height: 1.42;
  color: var(--ink);
  margin: 0 0 2.4rem;
  font-feature-settings: "kern", "liga", "onum";
}

/* ============== section headings ============== */

h2 {
  font-style: italic;
  font-weight: 400;
  font-size: 1.7rem;
  line-height: 1.15;
  margin: 3.2rem 0 1.1rem;
  color: var(--ink);
}

h3 {
  font-family: var(--serif);
  font-style: normal;
  font-weight: 400;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  line-height: 1.2;
  margin: 1.8rem 0 0.5rem;
  color: var(--muted);
}

/* Anchor links on auto-wrapped headings stay invisible */
.header-anchor {
  color: inherit !important;
  background: none !important;
  text-shadow: none !important;
  text-decoration: none !important;
}
.header-anchor:hover { color: var(--accent) !important; }

/* ============== body text ============== */

p, dl, ol, ul {
  font-size: 1.35rem;
  line-height: 1.78;
}

p, ol, ul {
  margin: 0 0 1.3rem;
  vertical-align: baseline;
}

p {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

li {
  padding: 0.35rem 0;
  line-height: 1.55;
}

ul li::marker {
  color: var(--rule);
}

strong { font-weight: 600; }
em     { font-style: italic; }

hr {
  display: block;
  height: 0;
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
  padding: 0;
}

/* ============== links: Tufte's underline-skip ============== */

a:link, a:visited {
  color: inherit;
  text-decoration: none;
  background: linear-gradient(var(--paper), var(--paper)),
              linear-gradient(var(--paper), var(--paper)),
              linear-gradient(currentColor, currentColor);
  background-size: 0.05em 1px, 0.05em 1px, 1px 1px;
  background-repeat: no-repeat, no-repeat, repeat-x;
  background-position: 0% 92%, 100% 92%, 0% 92%;
  text-shadow: 0.03em 0 var(--paper), -0.03em 0 var(--paper),
               0 0.03em var(--paper), 0 -0.03em var(--paper),
               0.06em 0 var(--paper), -0.06em 0 var(--paper),
               0.09em 0 var(--paper), -0.09em 0 var(--paper),
               0.12em 0 var(--paper), -0.12em 0 var(--paper),
               0.15em 0 var(--paper), -0.15em 0 var(--paper);
}

a:hover, a:focus { color: var(--accent); }

/* ============== blockquote ============== */

blockquote {
  font-size: 1.35rem;
  margin: 1rem 0 1rem 2rem;
  padding-left: 1rem;
  border-left: 2px solid var(--rule);
  color: var(--muted);
  font-style: italic;
}

/* ============== code ============== */

code, kbd, samp {
  font-family: var(--mono);
  font-size: 0.92em;
  line-height: 1.4;
  color: var(--ink);
  background: transparent;
  padding: 0;
}

/* ============== Tufte sidenotes & margin notes ============== */

.sidenote, .marginnote {
  float: right;
  clear: right;
  margin-right: -60%;
  width: 50%;
  margin-top: 0.4rem;
  margin-bottom: 0.6rem;
  font-style: italic;
  font-size: 1.0rem;
  line-height: 1.42;
  color: var(--muted);
  position: relative;
  vertical-align: baseline;
}

.sidenote::before {
  content: "";
  display: block;
  width: 1.4rem;
  height: 1px;
  background: var(--rule);
  margin-bottom: 0.35rem;
}

.sidenote-number { counter-increment: sidenote-counter; }
.sidenote-number::after,
.sidenote.numbered::before {
  font-family: var(--serif-osf);
  position: relative;
  vertical-align: baseline;
}
.sidenote-number::after {
  content: counter(sidenote-counter);
  font-size: 0.85rem;
  top: -0.5rem;
  left: 0.1rem;
}
.sidenote.numbered::before {
  content: counter(sidenote-counter) "  ";
  font-size: 0.85rem;
  top: -0.5rem;
  background: none;
  width: auto;
  height: auto;
  display: inline;
}

@media (max-width: 880px) {
  .sidenote, .marginnote {
    float: none;
    display: block;
    width: 92%;
    margin: 1rem 0 1.2rem 1.6rem;
    padding-left: 0.8rem;
    border-left: 2px solid var(--rule);
  }
  .sidenote::before { display: none; }
}

/* ============== Elsewhere — tight list with brand-mark icons ============== */

.elsewhere ul {
  list-style: none;
  padding-left: 0;
  margin: 0.4rem 0 0;
}

.elsewhere li {
  display: flex;
  align-items: baseline;
  gap: 0.55em;
  padding: 0.15rem 0;
  line-height: 1.5;
  color: var(--muted);
}

.elsewhere li > p {
  margin: 0;
  flex: 1 1 auto;
  color: var(--ink);
}

.elsewhere li::before {
  content: "";
  flex: 0 0 auto;
  width: 0.95em;
  height: 0.95em;
  background-color: currentColor;
  -webkit-mask: var(--icon, none) center / contain no-repeat;
          mask: var(--icon, none) center / contain no-repeat;
  transform: translateY(0.12em);
  opacity: 0.85;
  transition: color 120ms ease, opacity 120ms ease;
}

.elsewhere li:hover::before { color: var(--accent); opacity: 1; }

/* Strip the gradient-underline trick for these links — standard underline reads
   cleaner alongside the icon. */
.elsewhere a {
  background: none;
  text-shadow: none;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  color: var(--ink);
}

.elsewhere a:hover,
.elsewhere a:focus {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* Brand-mark mask icons (simple-icons paths, CC0). Inline SVG data URIs. */

.elsewhere li:has(a[href*="github.com"])     { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/></svg>"); }

.elsewhere li:has(a[href*="linkedin.com"])   { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 01-2.063-2.065 2.063 2.063 0 112.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z'/></svg>"); }

.elsewhere li:has(a[href*="orcid.org"])      { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 0C5.372 0 0 5.372 0 12s5.372 12 12 12 12-5.372 12-12S18.628 0 12 0zM7.369 4.378c.525 0 .947.431.947.947 0 .525-.422.947-.947.947-.525 0-.946-.422-.946-.947 0-.525.421-.947.946-.947zm-.722 3.038h1.444v10.041H6.647V7.416zm3.562 0h3.9c3.712 0 5.344 2.653 5.344 5.025 0 2.578-2.016 5.025-5.325 5.025h-3.919V7.416zm1.444 1.303v7.444h2.297c3.272 0 4.022-2.484 4.022-3.722 0-2.016-1.284-3.722-4.097-3.722h-2.222z'/></svg>"); }

.elsewhere li:has(a[href*="scholar.google"]) { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M5.242 13.769L0 9.5 12 0l12 9.5-5.242 4.269C17.548 11.249 14.978 9.5 12 9.5c-2.977 0-5.548 1.748-6.758 4.269zM12 10a7 7 0 1 0 0 14 7 7 0 0 0 0-14z'/></svg>"); }

.elsewhere li:has(a[href*="uni-stuttgart"])  { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 3 1 9l4 2.18v6L12 21l7-3.82v-6l2-1.09V17h2V9L12 3zM5.18 9 12 5.28 18.82 9 12 12.72zM17 15.99l-5 2.73-5-2.73v-3.72L12 15l5-2.73z'/></svg>"); }

/* ============== contact CTA ============== */

.contact-cta {
  font-style: italic;
  font-size: 1.35rem;
  color: var(--muted);
  margin-top: 3.2rem;
  margin-bottom: 0;
}
.contact-cta a { color: var(--ink); }

/* ============== service tiles (kept for reuse) ============== */

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin: 1.5rem 0 2rem;
  width: 55%;
}
@media (min-width: 640px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
.service-card {
  border: 1px solid var(--rule);
  padding: 1rem 1.1rem;
  background: transparent;
  text-decoration: none;
  background-image: none;
  text-shadow: none;
}
.service-card h3 { margin: 0 0 0.4rem; font-size: 1.3rem; color: var(--ink); font-style: italic; }
.service-card p  { font-size: 1.15rem; color: var(--muted); margin: 0; }

/* ============== email obfuscation ============== */

.email {
  font-family: var(--mono);
  font-size: 1.05rem;
  color: var(--ink);
}
.email .at, .email .dot { color: var(--muted); font-style: italic; }

a.email-link {
  font-family: var(--mono);
  font-size: 1.05rem;
}

/* ============== footer / colophon ============== */

.site-footer {
  width: 87.5%;
  margin-top: 5rem;
  padding-top: 2rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--rule);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.2rem;
}

.colophon {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.4;
}

.colophon .copyright { font-style: normal; font-family: var(--serif-osf); }

.colophon .typeface {
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.legal-nav {
  font-family: var(--serif);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
}
.legal-nav a {
  color: var(--muted);
  background: none;
  text-shadow: none;
  text-decoration: none;
}
.legal-nav a:hover { color: var(--accent); }
.legal-nav .sep { margin: 0 0.4rem; opacity: 0.5; }

/* ============== responsive ============== */

@media (max-width: 880px) {
  body {
    width: 92%;
    padding-left: 4%;
    padding-right: 4%;
  }
  .site-header,
  .site-footer { width: 100%; }
  .franklin-content > p,
  .franklin-content > ol,
  .franklin-content > ul,
  .franklin-content > dl,
  .franklin-content > h1,
  .franklin-content > h2,
  .franklin-content > h3,
  .franklin-content > hr,
  .franklin-content > blockquote,
  .franklin-content > .lede,
  .franklin-content > .contact-cta { width: 100%; }
  .services-grid { width: 100%; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .primary-nav { font-size: 0.8rem; gap: 1.2rem; }
}

/* ============== accessibility ============== */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  text-decoration: none;
  text-shadow: none;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--accent);
}

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

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
