/* Shared stylesheet for frank-buss.de
   Applied to all pages by apply-layout.py, which also inserts the header and footer. */

:root {
  --fg: #1c2230;
  --muted: #5d6677;
  --bg: #ffffff;
  --bg-alt: #f4f6f9;
  --line: #dfe4ec;
  --accent: #1d5fc4;
  --accent-hover: #15489a;
  --brand: #229bd0;
  --tag-bg: #e8effa;
  --tag-fg: #1f4f99;
  --radius: 8px;
  --max: 64rem;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0 auto;
  max-width: var(--max);
  padding: 0 1.25rem;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
}

/* ---------- site header (full width bar) ---------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  margin: 0 0 2rem;
  padding: .8rem 0;
  /* bottom line in the logo color, extended to the full window width */
  border-bottom: 2px solid var(--brand);
  border-image: linear-gradient(var(--brand), var(--brand)) 0 0 1 0 / 0 0 2px 0 / 0 100vmax;
  font-family: var(--sans);
  line-height: 1.4;
}

.site-brand { display: block; line-height: 0; }
.site-brand img { display: block; width: auto; max-width: none; height: 96px; }

.site-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; }

.site-nav a,
.site-nav a:visited {
  color: var(--fg);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover { color: var(--accent); text-decoration: none; }

/* ---------- site footer ---------- */

.site-footer {
  clear: both;
  margin-top: 3.5rem;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--sans);
  font-size: .9rem;
}

.site-footer p { margin: 0; }
.site-footer a, .site-footer a:visited { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* ---------- base typography ---------- */

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

h1, h2, h3, h4 { line-height: 1.25; color: #111827; }
h1 { font-size: 2rem; margin: .4em 0 .6em; }
h2 { font-size: 1.5rem; margin: 2em 0 .6em; }
h3 { font-size: 1.15rem; margin: 1.6em 0 .5em; }

p, ul, ol, dl { margin: 0 0 1em; }
li { margin: .2em 0; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

img, video, canvas { max-width: 100%; height: auto; }

pre, code, tt, kbd, samp { font-family: var(--mono); font-size: .9em; }

pre {
  overflow-x: auto;
  padding: .8rem 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  line-height: 1.45;
}

blockquote {
  margin: 1em 0;
  padding: .2em 1em;
  border-left: 3px solid var(--line);
  color: var(--muted);
}

address { font-style: normal; color: var(--muted); font-size: .9rem; margin-top: 2rem; }

/* old pages: unify fonts and keep tables from shrinking the text (quirks mode) */
font[face] { font-family: inherit; }
table { font-size: inherit; line-height: inherit; max-width: 100%; }

/* ---------- home page ---------- */

.hero {
  display: flex;
  flex-wrap: wrap-reverse;
  align-items: center;
  gap: 1.5rem 2.5rem;
  margin: 1rem 0 2.5rem;
}

.hero-text { flex: 1 1 26rem; }
.hero h1 { font-size: 2.4rem; margin: 0 0 .2em; }
.hero .role { font-size: 1.2rem; color: var(--muted); margin: 0 0 1em; }
.hero p { max-width: 42rem; }

.hero-photo {
  flex: 0 0 auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-alt);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
}

.buttons { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.4rem 0 0; }

.button,
.button:visited {
  display: inline-block;
  padding: .5rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
}

.button.primary, .button.primary:visited { background: var(--accent); color: #fff; }
.button:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }

.section-intro { color: var(--muted); max-width: 46rem; }

/* skills */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem 2rem; margin: 0; }
.skills dt { font-weight: 700; margin: 0; }
.skills dd { margin: .15rem 0 0; color: var(--muted); }

/* experience timeline */
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline > li { position: relative; margin: 0 0 1.6rem; padding-left: 1.4rem; }
.timeline > li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: .45rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}
.timeline h3 { margin: 0; font-size: 1.05rem; }
.timeline .meta { color: var(--muted); font-size: .9rem; margin: .1rem 0 .4rem; }
.timeline p { margin: 0 0 .4rem; }

/* featured project cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 1.25rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.card {
  display: flex;
  flex-direction: column;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.card img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--bg-alt); }
.card-body { padding: .9rem 1rem 1rem; display: flex; flex-direction: column; flex: 1; }
.card h3 { margin: 0 0 .15rem; font-size: 1.1rem; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.card p { margin: .4rem 0 .6rem; font-size: .95rem; }
.card .links { margin-top: auto; font-size: .9rem; }

.year { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; white-space: nowrap; }

.tags { display: flex; flex-wrap: wrap; gap: .3rem; margin: .2rem 0 .5rem; padding: 0; list-style: none; }
.tags li {
  margin: 0;
  padding: .05rem .5rem;
  border-radius: 999px;
  background: var(--tag-bg);
  color: var(--tag-fg);
  font-size: .78rem;
  white-space: nowrap;
}

/* project lists */
.project-group { margin: 2rem 0 0; }
.project-group h3 { margin: 0 0 .6rem; padding-bottom: .3rem; border-bottom: 1px solid var(--line); }

.projects { list-style: none; padding: 0; margin: 0; }
.projects > li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0 1rem;
  margin: 0;
  padding: .55rem 0;
  border-bottom: 1px dashed var(--line);
}
.projects > li:last-child { border-bottom: 0; }
.projects .year { padding-top: .1rem; }
.projects .title { font-weight: 600; }
.projects .desc { display: block; color: var(--muted); font-size: .95rem; }
.projects .extra { font-size: .9rem; }

.note { color: var(--muted); font-size: .92rem; }

/* contact */
.contact-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: .4rem 2rem; }
.contact-list li { margin: 0; }
.contact-list .label { display: inline-block; min-width: 5.5rem; color: var(--muted); }

/* ---------- small screens ---------- */

@media (max-width: 40rem) {
  body { padding: 0 1rem; }
  h1 { font-size: 1.7rem; }
  .hero h1 { font-size: 2rem; }
  .hero-photo { width: 130px; height: 130px; }
  .site-brand img { height: 72px; }
  .projects > li { grid-template-columns: 1fr; }
  .projects .year { padding-top: 0; }
}

@media print {
  .site-header, .site-footer { display: none; }
  body { max-width: none; }
  a { color: inherit; }
}
