/* robertmckinnon.au — near-monochrome, one steel-blue accent, dark-mode aware */

:root {
  --bg: #fafaf8;
  --text: #1a1a1a;
  --muted: #555550;
  --accent: #3d6e96;        /* steel blue */
  --accent-strong: #30587a;
  --rule: #d8d8d2;
  --code-bg: #efefea;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181a;
    --text: #e8e8e4;
    --muted: #a3a39c;
    --accent: #7aa7cc;
    --accent-strong: #9dbfdd;
    --rule: #33373b;
    --code-bg: #22262a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  font-size: 1.0625rem;
}

header, main, footer {
  max-width: 70ch;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header / nav */
header { max-width: 82ch; padding-top: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--rule); }
nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.75rem 1.25rem;
  align-items: baseline;
  justify-content: space-between;
  overflow-x: auto;
  scrollbar-width: thin;
}
.site-name { font-weight: 650; color: var(--text); text-decoration: none; }
nav a { white-space: nowrap; }
.nav-links { display: flex; flex: 0 0 auto; gap: 0.9rem; }
.nav-links a { color: var(--accent); text-decoration: none; }
.nav-links a:hover { text-decoration: underline; }
.nav-links a[aria-current="page"] { color: var(--text); font-weight: 600; }
@media (max-width: 520px) {
  header { padding-left: 0.75rem; padding-right: 0.75rem; }
  nav { gap: 0.8rem; }
  .nav-links { gap: 0.65rem; }
  nav a { font-size: 0.92rem; }
}

main { padding-top: 2rem; padding-bottom: 3rem; }

/* Footer */
footer { border-top: 1px solid var(--rule); padding-top: 1rem; padding-bottom: 2.5rem; color: var(--muted); font-size: 0.95rem; }
footer a { color: var(--accent); }
.footer-secondary { margin-top: 1.25rem; }

/* Typography */
h1 { font-size: 1.75rem; line-height: 1.25; margin: 0 0 0.5rem; }
h2 { font-size: 1.3rem; margin-top: 2.25rem; }
h3 { font-size: 1.1rem; margin-top: 1.75rem; }
a { color: var(--accent); }
a:hover { color: var(--accent-strong); }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }
.lede { font-size: 1.15rem; }
.muted { color: var(--muted); }
.mono, code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }
code { background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 4px; }

/* Capability list (Home) */
.capabilities {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 2rem;
}
.capabilities li::before { content: "—\00a0"; color: var(--muted); }
@media (max-width: 480px) { .capabilities { grid-template-columns: 1fr; } }

/* Project cards */
.project-card { border: 1px solid var(--rule); border-radius: 8px; padding: 1.25rem 1.5rem; margin: 1.5rem 0; }
.project-card h2 { margin-top: 0; }
.project-card ul { margin: 0.75rem 0; padding-left: 1.25rem; }

/* Buttons */
.button {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  padding: 0.55rem 1.1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
}
.button:hover { background: var(--accent-strong); color: var(--bg); }

/* Figures / screenshots */
figure { margin: 1.5rem 0; }
figure img { max-width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 8px; }
figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 0.4rem; }

/* Architecture diagram */
.diagram svg { max-width: 100%; height: auto; }

/* Photo / model grid — masonry columns so portrait and landscape both
   show at their natural aspect ratio without cropping */
.photo-grid {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  columns: 2;
  column-gap: 0.75rem;
}
.photo-grid li { margin: 0 0 0.75rem; break-inside: avoid; }
.photo-grid img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 8px;
}
@media (max-width: 480px) { .photo-grid { columns: 1; } }


.model-grid {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}
.model-grid li {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
}
.model-grid img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
@media (max-width: 560px) { .model-grid { grid-template-columns: 1fr; } }

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.screenshot-grid figure { margin: 0; }
.screenshot-grid img {
  display: block;
  width: 100%;
  height: clamp(24rem, 58vw, 38rem);
  object-fit: contain;
  object-position: top center;
  background: #eef2ff;
}
@media (max-width: 620px) {
  .screenshot-grid { grid-template-columns: 1fr; }
  .screenshot-grid img { height: auto; }
}
