/* michaellemke.info — modern static site
   Design system per DESIGN_SPEC.md */

:root {
  --bg: #ffffff;
  --surface: #f6f7f9;
  --text: #16181d;
  --muted: #5b6470;
  --accent: #0b7285;
  --accent-strong: #095c6b;
  --border: #e4e7ec;
  --radius: 12px;
  --space: clamp(1rem, 2vw, 2rem);
  --maxw: 1100px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #171a21;
    --text: #e8eaed;
    --muted: #9aa3af;
    --accent: #38bdf8;
    --accent-strong: #7dd3fc;
    --border: #262b34;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--space); }

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

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.4em; }
h1 { font-size: clamp(2.2rem, 1.5rem + 3.5vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { color: var(--text); font-weight: 500; }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); cursor: pointer; padding: 8px; }

@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0; align-items: stretch;
    background: var(--bg); border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .nav-links.open { max-height: 320px; }
  .nav-links a { padding: 14px var(--space); border-top: 1px solid var(--border); }
}

/* ---------- Sections ---------- */
section { padding: clamp(3rem, 6vw, 5.5rem) 0; }
.section-head { margin-bottom: 2rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; font-weight: 700; color: var(--accent); margin: 0 0 0.5rem; }

/* ---------- Hero ---------- */
.hero { padding: clamp(4rem, 9vw, 8rem) 0 clamp(3rem, 6vw, 5rem); }
.hero p.lead { font-size: clamp(1.1rem, 1rem + 0.6vw, 1.4rem); color: var(--muted); max-width: 60ch; }
.rotator { color: var(--accent); }
.cta-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.75rem; }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.3rem; border-radius: var(--radius);
  font-weight: 600; cursor: pointer; border: 1px solid transparent;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); color: #fff; }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.08); border-color: var(--accent); }

.exp-card { display: flex; gap: 1rem; align-items: flex-start; }
.exp-logo {
  width: 48px; height: 48px; flex: 0 0 48px; border-radius: 10px;
  object-fit: contain; background: #fff; border: 1px solid var(--border); padding: 6px;
}
.exp-meta { font-size: 0.9rem; color: var(--muted); }

.project-card .thumb { aspect-ratio: 16/10; border-radius: 8px; margin-bottom: 0.85rem; overflow: hidden; background: linear-gradient(135deg, var(--accent), var(--accent-strong)); }
.project-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-card .links { display: flex; gap: 1rem; margin-top: 0.5rem; font-weight: 600; font-size: 0.95rem; }
.project-card .tag { display: inline-block; margin-bottom: 0.5rem; }

/* ---------- Timeline (career) ---------- */
.timeline { position: relative; margin-left: 8px; padding-left: 28px; border-left: 2px solid var(--border); }
.timeline .entry { position: relative; padding: 0 0 2rem; }
.timeline .entry::before {
  content: ""; position: absolute; left: -36px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg);
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 2.5rem 0; color: var(--muted); }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.social { display: flex; gap: 1rem; }
.social a { color: var(--muted); display: inline-flex; }
.social a:hover { color: var(--accent); }
.social svg { width: 22px; height: 22px; }

/* ---------- Project detail pages ---------- */
.prose { max-width: 72ch; }
.prose h2 { font-size: 1.2rem; margin: 1.8rem 0 0.4rem; }
.prose p { color: var(--muted); }
.detail-figure {
  margin: 0 0 2rem; max-width: 760px; min-height: 220px;
  border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}
.detail-figure img {
  width: 100%; display: block; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
}
.back-link { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; margin-bottom: 1rem; }
.meta-row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; margin: 0.5rem 0 0; }
.tag { font-size: 0.8rem; font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); padding: 0.25rem 0.6rem; border-radius: 999px; }

/* ---------- Utilities ---------- */
.center { text-align: center; }
.mt-2 { margin-top: 2rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
