/* lukasjakober.ch: one narrow column, a quiet header with plain links, light and dark. */
:root {
  color-scheme: light dark;
  --bg: #fbfaf7;
  --fg: #1d1d1b;
  --muted: #6b6a65;
  --line: #e4e1da;
  --accent: #c2410c;
  --code-bg: #f1efe9;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151514;
    --fg: #ecebe6;
    --muted: #9c9a93;
    --line: #2d2c29;
    --accent: #fb8a55;
    --code-bg: #1f1e1c;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 1.0625rem/1.65 var(--sans);
}

a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}
a:hover { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

header.site, main, footer.site {
  max-width: 42rem;
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Header: name on the left, plain links on the right */
header.site {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  padding-top: 1.75rem;
  padding-bottom: 1.75rem;
}
header.site .name { font-weight: 650; text-decoration: none; margin-right: auto; }
header.site nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; font-size: 0.9375rem; }
header.site nav a, header.site .lang { color: var(--muted); text-decoration: none; }
header.site nav a:hover, header.site .lang:hover { color: var(--fg); }
header.site nav a[aria-current] { color: var(--fg); text-decoration: underline; text-decoration-color: var(--accent); }
header.site .lang { font-size: 0.8125rem; letter-spacing: 0.04em; padding-left: 1.25rem; border-left: 1px solid var(--line); }

/* Phones: name and language on the first row, the links on their own row below */
@media (max-width: 34rem) {
  header.site .lang { order: 1; }
  header.site nav { order: 2; flex-basis: 100%; }
}

main { padding-top: clamp(1.5rem, 6vh, 3.5rem); padding-bottom: 2rem; }

h1, h2, h3 { text-wrap: balance; line-height: 1.25; }
h1 { margin: 0 0 1.25rem; font-size: clamp(1.6rem, 4.5vw, 2rem); font-weight: 700; letter-spacing: -0.01em; }
h2 {
  margin: 3rem 0 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
p { margin: 0 0 1rem; }
.note { color: var(--muted); }

/* Intro with optional photo */
.intro { display: flex; gap: 1.5rem; align-items: flex-start; margin-bottom: 2.5rem; }
.intro > div { min-width: 0; }
.photo { width: 7.5rem; height: 7.5rem; border-radius: 0.6rem; object-fit: cover; flex: none; }
.lede p { font-size: 1.1875rem; color: var(--muted); margin: 0; }
@media (max-width: 30rem) { .intro { flex-direction: column; } }

/* Now */
h1 .updated { display: inline-block; margin-left: 0.5rem; font-size: 0.875rem; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.now { margin: 0; }
.now > div { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 1rem; padding: 0.9rem 0; border-top: 1px solid var(--line); }
.now dt { font-weight: 600; }
.now dd { margin: 0; }

/* Lists of posts */
.posts { margin: 0; padding: 0; list-style: none; }
.posts li { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1rem; padding: 0.7rem 0; border-top: 1px solid var(--line); }
.posts time { font-size: 0.875rem; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 0.1rem; }
.more { margin-top: 1rem; font-size: 0.9375rem; }

/* Long text: projects, about, posts */
.prose h2 {
  margin: 2.5rem 0 0.5rem;
  font-size: 1.1875rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg);
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.prose h2:first-child { margin-top: 0; }
.prose em:only-child { color: var(--muted); }
.prose .tags { font-size: 0.875rem; color: var(--muted); }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose code { font-family: var(--mono); font-size: 0.875em; background: var(--code-bg); padding: 0.1em 0.3em; border-radius: 0.25rem; }
.prose pre { background: var(--code-bg); padding: 1rem; border-radius: 0.5rem; overflow-x: auto; line-height: 1.5; }
.prose pre code { background: none; padding: 0; }
.prose img { max-width: 100%; height: auto; border-radius: 0.4rem; }

.post .back { margin-bottom: 1.5rem; font-size: 0.9375rem; }
.post .back a { color: var(--muted); text-decoration: none; }
.post .meta { margin-top: -0.75rem; margin-bottom: 2rem; color: var(--muted); font-size: 0.9375rem; }
.post .prose h2 { border-top: 0; padding-top: 0; }

/* About */
.timeline, .pubs { margin: 0; padding: 0; list-style: none; }
.timeline li { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 1rem; padding: 0.8rem 0; border-top: 1px solid var(--line); }
.timeline .when { font-size: 0.875rem; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 0.1rem; }
.timeline p { margin: 0; }
.timeline .what { font-weight: 600; }
.timeline .more-info { color: var(--muted); font-size: 0.9375rem; }
.pubs li { padding: 0.8rem 0; border-top: 1px solid var(--line); }
.pubs .pub-title { font-weight: 600; }
.pubs .venue { color: var(--muted); }
.skills { margin: 0; }
.skills > div { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 1rem; padding: 0.6rem 0; border-top: 1px solid var(--line); }
.skills dt { color: var(--muted); font-size: 0.9375rem; }
.skills dd { margin: 0; }
.contact { font-weight: 500; }

@media (max-width: 34rem) {
  .now > div, .posts li, .timeline li, .skills > div { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; }
}

footer.site {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1.25rem;
  padding-bottom: 3rem;
  font-size: 0.875rem;
  color: var(--muted);
}
footer.site p { margin: 0; }
footer.site::before { content: ""; flex-basis: 100%; border-top: 1px solid var(--line); margin-bottom: 0.75rem; }

/* Projects */
.projects { margin: 0; padding: 0; list-style: none; }
.projects li + li { border-top: 1px solid var(--line); }
.project-card {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  padding: 1.1rem 0;
  text-decoration: none;
}
.projects li:first-child .project-card { padding-top: 0.25rem; }
.project-card:hover { color: inherit; }
.project-card .project-image { width: 4.5rem; height: 4.5rem; margin: 0; flex: none; object-fit: cover; border-radius: 0.4rem; }
.project-text { display: grid; gap: 0.15rem; min-width: 0; }
.status { font-size: 0.8125rem; color: var(--muted); letter-spacing: 0.02em; }
.project-title {
  font-weight: 650;
  font-size: 1.0625rem;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.25em;
  transition: text-decoration-color 0.3s ease;
}
.project-card:hover .project-title,
.project-card:focus-visible .project-title { text-decoration-color: var(--accent); }
.project-desc { color: var(--muted); font-size: 0.9375rem; }
@media (prefers-reduced-motion: reduce) { .project-title { transition: none; } }
.project-image { display: block; max-width: 100%; height: auto; border-radius: 0.5rem; margin: 0 0 1.5rem; }
.project .back { margin-bottom: 1.5rem; font-size: 0.9375rem; }
.project .back a { color: var(--muted); text-decoration: none; }
.project .status { margin: 0 0 0.25rem; }
.project > .project-image { width: 100%; height: auto; max-height: 18rem; object-fit: contain; object-position: left center; }
.project .tags { font-size: 0.875rem; color: var(--muted); }
.links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.button {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
}
.button:hover { border-color: var(--accent); }
@media (max-width: 30rem) {
  .project-card { align-items: flex-start; }
  .project-card .project-image { width: 3.5rem; height: 3.5rem; }
}
