/* Bethan Cotterill — minimal portfolio styles */

/* ---- Base ---- */
:root {
  --max-width: 1100px;
  --pad: 18px;
  --text: #111;
  --muted: #444;
  --bg: #fff;

  /* System font stack: neutral and timeless */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  line-height: 1.45;
  background: var(--bg);
  color: var(--text);
}

/* Links */
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* ---- Layout ---- */
.site-header,
.content,
.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--pad);
}

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.site-title {
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* Nav */
.site-nav a {
  margin-left: 14px;
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Main */
.content {
  padding-top: 0;
  padding-bottom: calc(var(--pad) * 2);
}

/* Footer */
.site-footer {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---- Work grid ---- */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.work { margin: 0; }

.work img {
  width: 100%;
  height: auto;
  display: block;
}

figcaption {
  margin-top: 8px;
  font-size: 0.95rem;
}

.title { font-style: italic; }
.meta { color: var(--muted); }

/* ---- Typography helpers ---- */
h1, h2, h3 { font-weight: 600; margin: 0 0 12px; }
p { margin: 0 0 14px; }

/* CV list */
.cv-section { margin: 0 0 22px; }
.cv-section h2 { font-size: 1rem; margin-bottom: 10px; }
.cv-list { list-style: none; padding: 0; margin: 0; }
.cv-list li { margin: 0 0 8px; }

/* Visually hidden (for accessible page headings) */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ---- Mobile ---- */
@media (max-width: 700px) {
  .grid { grid-template-columns: 1fr; }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav a {
    margin-left: 0;
    margin-right: 14px;
  }
}
