/* Minimal theme. Change colours and fonts here. */
:root {
  --brown: #3a1f14;       /* dark brown: headings, nav pills */
  --side-bg: #f6efe0;     /* sidebar: cream / off-white */
  --side-text: #3a2a22;
  --side-muted: #7a6657;
  --side-link: #b5532a;   /* terracotta */
  --accent: #b5532a;      /* terracotta links on the CV */
  --bg: #ffffff;
  --text: #26262b;
  --muted: #6b6b73;
  --rule: #e6e0d6;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --side-width: 26rem;
}

* { box-sizing: border-box; }

html { font-size: 17px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 2px; }

h1, h2 { font-weight: 600; }

/* ---------- Home: sidebar | photo ---------- */
.home { position: relative; }

.sidebar {
  background: var(--side-bg);
  color: var(--side-text);
  padding: 4.5rem 1.5rem 2.5rem;   /* top room for the nav on phones */
}

.sidebar h1 { color: var(--brown); font-size: 2rem; line-height: 1.15; margin: 0 0 .6rem; }
.role { margin: 0 0 1.2rem; color: var(--side-muted); }
.blurb { margin: 0 0 1.4rem; font-size: .96rem; }

.links { list-style: none; margin: 0; padding: 0; }
.links li { margin: .4rem 0; }
.sidebar a { color: var(--side-link); text-decoration: none; }
.sidebar a:hover { color: var(--brown); text-decoration: underline; }

.hero img { display: block; width: 100%; height: auto; }   /* phones: whole photo */

/* CV / Contact links, top right */
.home .topnav {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  display: flex;
  gap: .5rem;
}
.home .topnav a {
  padding: .35rem .9rem;
  border-radius: 999px;
  background: rgba(58, 31, 20, .85);
  color: #fff;
  font-size: .9rem;
  text-decoration: none;
}
.home .topnav a:hover { background: #fff; color: var(--brown); }

@media (min-width: 60rem) {
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--side-width);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
  }
  .hero { margin-left: var(--side-width); height: 100vh; }
  .hero img { height: 100%; object-fit: cover; object-position: 28% 55%; }
  .home .topnav { top: 1.5rem; right: 1.75rem; }
}

/* ---------- CV / Contact / 404: plain single column ---------- */
.cvpage, .content {
  max-width: 50rem;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 4rem;
}

.cv-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2rem;
}
.home-link { font-weight: 600; color: var(--text); text-decoration: none; }
.cvpage .topnav { display: flex; gap: 1.1rem; font-size: .92rem; }

.cvpage h1, .content h1 { font-size: 2rem; line-height: 1.15; margin: 0 0 .4rem; }
.cvpage .role { color: var(--muted); margin: 0 0 1.5rem; }

.bio p { margin: 0 0 1.75rem; }

section { margin-bottom: 2rem; }

h2 {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  border-bottom: 1px solid var(--rule);
  padding-bottom: .3rem;
  margin: 0 0 .9rem;
}

dl { margin: 0; display: grid; grid-template-columns: 5.2rem 1fr; gap: .6rem 1rem; }
dt { color: var(--muted); font-size: .92rem; text-align: right; }
dd { margin: 0; }
.note { color: var(--muted); font-size: .93rem; }

section > p { margin: 0; }

footer { color: var(--muted); font-size: .85rem; border-top: 1px solid var(--rule); padding-top: 1rem; }
footer p { margin: 0; }

.contact dl { grid-template-columns: 8rem 1fr; }

/* Resume-style header: title left, photo top right */
.cv-head {
  display: flex;
  justify-content: space-between;
  align-items: stretch;        /* photo matches the height of the title block */
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--rule);
}
.cv-head > div { display: flex; flex-direction: column; justify-content: center; }
.cv-head h1 { margin: 0 0 .5rem; }
.cv-head .role { margin-bottom: 0; line-height: 1.5; }
.eyebrow {
  margin: 0 0 .35rem;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
}
.cv-photo {
  flex: none;
  width: 9.5rem;
  height: auto;
  min-height: 8rem;
  object-fit: cover;
  object-position: 50% 22%;
}

@media (min-width: 40rem) {
  .cvpage, .content { padding-top: 2rem; }
}

/* ---------- Phones ---------- */
@media (max-width: 560px) {
  .sidebar h1 { font-size: 1.8rem; }
  .cvpage h1 { font-size: 1.7rem; }
  dl, .contact dl { grid-template-columns: 1fr; gap: 0; }
  dt { text-align: left; margin-top: .75rem; }
  .links li { margin: .6rem 0; }   /* bigger tap targets */
  .cv-photo { width: 6.5rem; min-height: 7rem; }
  .cv-head { gap: 1rem; }
}

@media print {
  .home .topnav, .cvpage .topnav { display: none; }
  body { color: #000; }
}
