/* Lucas Zhou — portfolio. Static, no framework, no external requests. */

/* Dark only, deliberately, and not following the system: four of the five
   project screenshots are dark UIs, so one committed dark surface is the
   look the images already have.

   The ground is a warm slate rather than near-black. Against near-black the
   dark screenshots sink into the page and the one light screenshot is a
   glare; lifted to this, every image reads as an object sitting on a
   surface. Each figure also gets a matte of that surface between the image
   and its border, so a dark screenshot and a light one are framed alike. */

:root {
  color-scheme: dark;
  --bg: #23262b;
  --surface: #2c3037;
  --border: #3d434c;
  --text: #e9e7e3;
  --text-dim: #a7a49e;
  --accent: #8ab4f8;
  --measure: 62ch;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 24px;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

/* ---------- header ---------- */

.site-header {
  max-width: 980px;
  margin: 0 auto;
  padding-block: 88px 56px;
}

.site-header h1 {
  margin: 0;
  font-size: 2.75rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.tagline {
  max-width: var(--measure);
  margin: 16px 0 0;
  font-size: 1.25rem;
  line-height: 1.45;
  color: var(--text);
}

.contact {
  max-width: var(--measure);
  margin: 14px 0 0;
  color: var(--text-dim);
}

.header-links {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.header-links a {
  font-weight: 550;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.header-links a:hover { border-bottom-color: currentColor; }

/* ---------- projects ---------- */

main {
  max-width: 980px;
  margin: 0 auto;
}

.section-heading {
  margin: 0 0 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: 36px;
  align-items: start;
  padding-block: 44px;
  border-top: 1px solid var(--border);
}

.project-body { min-width: 0; }

.project h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 620;
  letter-spacing: -0.01em;
}

.summary {
  margin: 10px 0 0;
  color: var(--text-dim);
}

/* Evidence, not adjectives — the reason each card exists. */
.evidence {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.evidence li {
  position: relative;
  padding-left: 20px;
  margin-top: 7px;
  font-size: 0.9375rem;
}

.evidence li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.75;
}

.tech {
  margin: 20px 0 0;
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
  color: var(--text-dim);
}

.links {
  margin: 18px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
}

.links a {
  display: inline-block;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 550;
  text-decoration: none;
  background: var(--surface);
}

.links a:hover { border-color: var(--accent); }

.links a.primary {
  border-color: var(--accent);
  color: var(--bg);
  background: var(--accent);
}

.links a.primary:hover { filter: brightness(1.08); }

/* The matte: a ring of page colour between the image and its border, so a
   dark screenshot and a light one are framed the same way. */
.project-figure {
  display: block;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  line-height: 0;
}

.project-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

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

.site-footer {
  max-width: 980px;
  margin: 0 auto;
  padding-block: 40px 72px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.875rem;
}

.site-footer p { margin: 0; }

/* ---------- narrow screens ---------- */

@media (max-width: 760px) {
  .site-header { padding-block: 56px 36px; }
  .site-header h1 { font-size: 2.125rem; }
  .tagline { font-size: 1.125rem; }

  .project {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding-block: 36px;
  }

  /* Image first on a phone: it is the fastest way to see what the thing is. */
  .project-figure { order: -1; }
}
