/* ============================================================
   Luke Conran — editorial pearl
   Fraunces (display) · Source Sans 3 (body) · system mono (meta)
   ============================================================ */

:root {
  --paper:       #E9E3DE;
  --ink:         #2B2725;
  --muted:       #666161;
  --rule:        rgba(165, 147, 123, 0.45);  /* #A5937B */
  --rule-strong: #A5937B;
  --accent:      #AF9AC9;
  --accent-deep: #7E689E;
  --highlight:   #E3C49B;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

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

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Source Sans 3", "Source Sans Pro", sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

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

h1, h2, h3 {
  font-family: "Fraunces", serif;
  font-weight: 500;
  line-height: 1.2;
  margin: 0;
}

p { margin: 0 0 1em; max-width: 66ch; }

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

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

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

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

.wrap--wide { max-width: 880px; }

/* small monospace meta line: dates, tech, labels */
.meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  padding: 2.75rem 0 1.1rem;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  font-family: "Fraunces", serif;
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.wordmark:hover { color: var(--accent-deep); }

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

.site-nav a {
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
}

.site-nav a:hover { color: var(--ink); }

.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom: 2px solid var(--accent);
}

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

.site-footer {
  margin-top: 7rem;
  padding: 1.8rem 0 3.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 0.6rem 2rem;
  flex-wrap: wrap;
}

.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent-deep); }

.footer-links { display: flex; gap: 1.2rem; flex-wrap: wrap; }

/* ---- page intro ---------------------------------------------- */

.page-title {
  font-size: 2.1rem;
  margin: 4.5rem 0 0.75rem;
}

.page-intro {
  color: var(--muted);
  margin-bottom: 1.25rem;
}

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

.lede {
  font-family: "Fraunces", serif;
  font-size: 2.5rem;
  font-weight: 500;
  line-height: 1.18;
  margin: 5.5rem 0 1.5rem;
  max-width: 22ch;
}

.lede-detail { max-width: 56ch; margin-bottom: 6rem; }

.section-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.closing-note {
  font-family: "Fraunces", serif;
  font-style: italic;
  color: var(--muted);
  margin: 6rem 0 0;
}

.more-link {
  display: inline-block;
  margin-top: 2.25rem;
  font-size: 0.9rem;
}

/* ---- work list (home + work page) ---------------------------- */

.work-item {
  padding: 2.4rem 0;
  border-top: 1px solid var(--rule);
}

.work-item:last-of-type { border-bottom: 1px solid var(--rule); }

.work-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem 2rem;
  flex-wrap: wrap;
}

.work-head h2, .work-head h3 { font-size: 1.35rem; }

.work-item .meta { margin: 0.35rem 0 1rem; }

.work-item p:last-of-type { margin-bottom: 0; }

.work-image {
  display: block;
  width: 240px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  float: right;
  margin: 0.4rem 0 1rem 2rem;
}

.work-image-group {
  float: right;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0.4rem 0 1rem 2rem;
}

.work-image-group .work-image {
  float: none;
  margin: 0;
  width: 240px;
}

/* ---- work page sections ------------------------------------- */

.work-sections-nav {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.5rem;
  margin-bottom: 3.5rem;
}

.work-sections-nav a {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.work-sections-nav a:hover {
  color: var(--ink);
  border-color: var(--rule-strong);
}

.work-section {
  margin-top: 4rem;
}

.work-section-title {
  font-size: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule-strong);
  margin-bottom: 0;
}

.work-role {
  font-style: italic;
  color: var(--muted);
  margin: 0.15rem 0 0.4rem;
}

.work-item::after { content: ""; display: block; clear: both; }

.work-item .meta { margin: 0 0 1rem; }

.work-link {
  display: inline-block;
  margin-top: 1.2rem;
  font-size: 0.9rem;
}

/* ---- about (qualifications) ---------------------------------- */

.about-section {
  padding: 3rem 0 1rem;
  border-top: 1px solid var(--rule);
  margin-top: 3rem;
}

.about-section h2 { font-size: 1.5rem; margin-bottom: 1.75rem; }

.entry { margin-bottom: 2.5rem; }
.entry:last-child { margin-bottom: 1rem; }
.entry::after { content: ""; display: block; clear: both; }

.entry-image {
  float: right;
  width: 220px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  margin: 0.4rem 0 1rem 2rem;
}

.entry-image-group {
  float: right;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0.4rem 0 1rem 2rem;
}

.entry-image-group .entry-image {
  float: none;
  margin: 0;
  width: 220px;
}

.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.35rem 2rem;
  flex-wrap: wrap;
}

.entry-head h3 { font-size: 1.15rem; }

.entry-role {
  font-style: italic;
  color: var(--muted);
  margin: 0.15rem 0 0.75rem;
}

.skill-line { margin-bottom: 0.9rem; max-width: none; }
.skill-line strong { font-weight: 600; }

.cert-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cert-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.35rem 2rem;
  flex-wrap: wrap;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--rule);
}

.cert-list li:last-child { border-bottom: none; }

.cert-name em { color: var(--muted); font-style: normal; }

/* ---- service ------------------------------------------------- */

.event {
  padding: 3rem 0 0.5rem;
  border-top: 1px solid var(--rule);
  margin-top: 3rem;
}

.event h2 { font-size: 1.5rem; }
.event h2 a { text-decoration: none; }
.event h2 a:hover { text-decoration: underline; text-decoration-color: var(--accent); }

.event .meta { display: block; margin: 0.4rem 0 1.25rem; }

.event-keywords {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 1.25rem 0;
}

.event-image {
  display: block;
  max-width: 400px;
  border: 1px solid var(--rule);
  margin: 1.5rem 0 2rem;
}

/* ---- reading ------------------------------------------------- */

.book {
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--rule);
  margin-top: 3rem;
}

.book::after { content: ""; display: block; clear: both; }

.book h2 { font-size: 1.4rem; }

.book .meta { display: block; margin: 0.4rem 0 1.25rem; }

.book-cover {
  float: right;
  width: 130px;
  border: 1px solid var(--rule);
  margin: 0.4rem 0 1rem 2rem;
}

.takeaway {
  border-left: 2px solid var(--accent);
  padding-left: 1.1rem;
  font-style: italic;
  color: var(--muted);
  margin: 1.5rem 0 0;
}

/* ---- legacy (uml.html) --------------------------------------- */

.prose { margin-top: 3rem; }

/* ---- responsive ---------------------------------------------- */

@media (max-width: 640px) {
  body { font-size: 16px; }

  .site-header { padding-top: 2rem; }
  .site-nav { gap: 1.1rem; }

  .lede { font-size: 1.9rem; margin-top: 3.5rem; }
  .lede-detail { margin-bottom: 4rem; }

  .page-title { font-size: 1.7rem; margin-top: 3rem; }
  .page-intro { margin-bottom: 2.5rem; }

  .work-image, .event-image { max-width: 100%; }

  .work-image, .work-image-group {
    float: none;
    width: 100%;
    margin: 1.25rem 0 0;
  }
  .work-image-group .work-image { width: 100%; }

  .book-cover {
    float: none;
    margin: 1.25rem 0;
  }

  .site-footer { margin-top: 5rem; }
}
