/* shared by index.html and about.html — edit once, both pages update */

:root {
  --bg:     #fafaf9;                  /* off-white, warm */
  --ink:    #161614;                  /* headings, key words, links */
  --body:   #32322d;                  /* body text */
  --faint:  #77776f;                  /* footer and back link only */
  --accent: #a04f2d;                  /* hover colour — change this one value */
  --rule:   rgba(22, 22, 20, 0.28);   /* resting link underline */
}

body {
  max-width: 680px;
  margin: 12vh auto;
  padding: 0 24px 10vh;
  font-family: "Lora", serif;
  font-size: 16px;
  line-height: 1.68;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

p { margin: 0 0 16px; }

/* key words sit in near-black against the grey body text */
.key, strong { color: var(--ink); font-weight: 400; }

/* links: hairline underline held off the baseline, darkening on hover */
a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule);
  transition: text-decoration-color 0.22s ease, color 0.22s ease;
}
a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.pic {
  color: var(--ink);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.22s ease;
}
.pic:hover { color: var(--accent); }

/* photo triggers that sit among real links: solid underline, not dotted */
.pic.plain {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--rule);
  transition: text-decoration-color 0.22s ease, color 0.22s ease;
}
.pic.plain:hover { text-decoration-color: var(--accent); }

/* highlighted phrases in the opening line */
.hl {
  padding: 0.08em 0.22em;
  margin: 0 -0.08em;
  border-radius: 2px;
  color: var(--ink);
  -webkit-box-decoration-break: clone;   /* keeps the wash intact across line breaks */
  box-decoration-break: clone;
}
.hl:not(.pic) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* the wash only appears under the cursor */
.hl { background: transparent; transition: background 0.25s ease; }

.hl-amber { text-decoration-color: rgba(132, 96, 16, 0.55); }
.hl-rust  { text-decoration-color: rgba(134, 50, 26, 0.55); }
.hl-sage  { text-decoration-color: rgba(54, 88, 65, 0.55); }

.hl-amber:hover { background: rgba(206, 160, 52, 0.26); }
.hl-rust:hover  { background: rgba(178, 74, 45, 0.18); }
.hl-sage:hover  { background: rgba(92, 130, 103, 0.20); }
.hl-slate:hover { background: rgba(88, 112, 148, 0.18); }

/* trailing punctuation that should not pick up the underline */
.shout { text-decoration: none; color: var(--ink); }

/* section headings: grey labels, not black statements */
h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin: 58px 0 12px;
  letter-spacing: 0.005em;
}

ul { padding-left: 20px; margin: 0 0 18px; }
li { margin-bottom: 9px; }

/* "more about me" */
.more {
  display: inline-block;
  margin-top: 40px;
  padding: 8px 16px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
  transition: border-color 0.22s ease, background 0.22s ease;
}
.more:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(160, 79, 45, 0.045);
}
.more::after { content: " \2192"; }

/* back link on the detail page */
.back {
  display: inline-block;
  margin-bottom: 38px;
  font-size: 14px;
  color: var(--faint);
  text-decoration: none;
}
.back:hover { color: var(--accent); }
.back::before { content: "\2190  "; }

.footer {
  margin-top: 64px;
  padding-top: 22px;
  border-top: 1px solid rgba(26, 26, 24, 0.09);
  color: var(--faint);
  font-size: 14px;
}
.footer a { color: var(--faint); }
.footer a:hover { color: var(--accent); }

/* photo popup / carousel */
.popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.popup.open { display: flex; }

.popup-card {
  position: relative;
  background: var(--bg);
  max-width: 560px;
  width: 100%;
  border-radius: 2px;
  overflow: hidden;
}

/* fixed stage so photos of different shapes don't make the card jump */
.popup-frame {
  position: relative;
  background: #f0f0ee;
  height: 62vh;
  max-height: 560px;
}
.popup-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;   /* no long-press "Save Image" on iOS */
}

.popup-card p {
  padding: 16px 20px;
  margin: 0;
  font-size: 14px;
  color: var(--body);
  white-space: pre-line;
}

/* prev / next */
.popup-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(250, 250, 249, 0.85);
  color: var(--ink);
  font: 400 20px/1 "Lora", serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.popup-nav:hover { background: var(--bg); }
.popup-nav.prev { left: 12px; }
.popup-nav.next { right: 12px; }
.popup-card.single .popup-nav,
.popup-card.single .popup-count { display: none; }

.popup-count {
  position: absolute;
  bottom: 12px;
  right: 14px;
  padding: 3px 9px;
  border-radius: 2px;
  background: rgba(26, 26, 24, 0.55);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.popup-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: rgba(250, 250, 249, 0.85);
  color: var(--ink);
  font: 400 17px/1 "Lora", serif;
  cursor: pointer;
}
.popup-close:hover { background: var(--bg); }

@media (max-width: 600px) {
  body { margin: 7vh auto; }
  .popup-frame { height: 54vh; }
  .popup-nav { width: 34px; height: 34px; }
}
