/* Start here when changing the fonts, colours and spacing. */
@font-face {
  font-family: 'Special Elite';
  src: url('assets/fonts/SpecialElite-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
:root {
  --background: #f5f2ed;
  --ink: #2c2927;
  --accent: #b84e30;
  --muted: #756f67;
  --rule: #ded8cf;
  --name-font: 'Special Elite', 'Courier New', monospace;
  --font: 'Courier New', Courier, monospace;
  --page-width: 960px;
}
* { box-sizing: border-box; }
body { margin: 30px; color: var(--ink); background: var(--background); font: 13px/1.2 var(--font); }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }
header { width: fit-content; max-width: 100%; margin-bottom: 38px; }
.name { display: flex; width: fit-content; align-items: center; gap: 15px; color: var(--accent); font-family: var(--name-font); font-size: 36px; font-weight: 400; line-height: 1.2; margin-bottom: 18px; }
/* Trimmed export aligns with navigation; offset matches Special Elite's visual centre. */
.brand-logo { width: 100px; height: auto; flex: 0 0 100px; transform: translateY(-0.08em); }
.name:hover { text-decoration: none; }
/* Let the name set the header width, then distribute navigation across it. */
nav { display: flex; width: 0; min-width: 100%; justify-content: space-between; flex-wrap: wrap; gap: 12px 22px; font-size: 14px; text-transform: uppercase; }
nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 2px; }
main { max-width: var(--page-width); outline: none; }
h1,h2,h3,p { font-size: inherit; margin: 0; }
h1 { margin-bottom: 46px; }
h2,h3 { font-weight: bold; }
p + p { margin-top: 16px; }
img, video { display: block; max-width: 100%; height: auto; }
.home-image { width: 500px; }
.project-list { display: grid; gap: 22px; }
.project-row { display: grid; grid-template-columns: 320px 310px 1fr; gap: 20px; align-items: start; }
.project-row:hover { text-decoration: none; }
.project-row:hover h2 { text-decoration: underline; }
.project-row h2, .project-detail h1, .about-heading, .lab-row h2 { text-transform: uppercase; }
.project-thumbnail { width: 320px; }
.project-row .year { margin-top: 18px; }
.about-heading { margin-bottom: 0; }
.media-placeholder { width: 100%; min-height: 210px; display: grid; place-items: center; background: #eae5de; color: var(--muted); padding: 25px; text-align: center; }
.back-link { display: inline-block; margin-bottom: 30px; }
.project-detail h1 { margin-bottom: 8px; }
.detail-intro { max-width: 620px; margin: 28px 0; }
.detail-meta { max-width: 620px; display: grid; grid-template-columns: 80px 1fr; gap: 8px 16px; margin: 0 0 35px; }
dt { font-weight: bold; } dd { margin: 0; }
.gallery { width: 620px; max-width: 100%; }
.gallery-stage { width: 100%; }
.gallery-stage img, .gallery-stage video { max-height: 680px; width: 100%; object-fit: contain; object-position: left center; }
.gallery-controls { display: flex; gap: 18px; align-items: center; margin-top: 12px; }
button { font: inherit; background: transparent; color: inherit; border: 0; padding: 5px 0; cursor: pointer; }
button:hover { text-decoration: underline; }
.lab-list { display: grid; gap: 50px; }
.lab-row { display: grid; grid-template-columns: 320px 1fr; gap: 20px; }
.lab-row .gallery { width: 320px; }
.lab-row .gallery-stage img { max-height: 420px; }
.lab-row p { margin-top: 8px; }
.contacts { max-width: 620px; }
.bio h1, .contacts h1 { margin-bottom: 30px; }
/* Bio follows the same compact, monospace layout as the rest of the site. */
.bio { max-width: 960px; display: grid; grid-template-columns: 276px minmax(0, 1fr); gap: 52px; align-items: start; }
.bio h1 { margin-bottom: 12px; }
.bio-portrait { width: 100%; aspect-ratio: 276 / 213; object-fit: cover; object-position: center; }
.bio-intro { margin-top: 16px; }
.bio-cv section + section { margin-top: 28px; }
.bio-cv h2 { font-weight: normal; margin-bottom: 16px; }
.cv-entry { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; margin-bottom: 16px; }
.cv-entry h3 { font-weight: normal; }
.cv-entry p + p { margin-top: 4px; }
.skill-group + .skill-group { margin-top: 12px; }
.skill-group h3 { font-weight: normal; }
.contacts a { text-decoration: underline; overflow-wrap: anywhere; }
.contacts dl { display: grid; grid-template-columns: 100px 1fr; gap: 20px; }
.skip-link { position: absolute; left: -10000px; }
.skip-link:focus { left: 30px; top: 5px; background: var(--background); }
@media (max-width: 1000px) {
  .project-row { grid-template-columns: minmax(200px, 320px) minmax(150px, 1fr) minmax(170px, 1fr); }
}
@media (max-width: 680px) {
  body { margin: 20px; }
  .name { font-size: clamp(18px, 5vw, 30px); gap: 10px; }
  .brand-logo { width: 60px; flex-basis: 60px; }
  .bio { grid-template-columns: 1fr; gap: 30px; }
  nav { gap: 12px 18px; font-size: 11px; }
  header { margin-bottom: 32px; }
  h1 { margin-bottom: 28px; }
  .project-list { gap: 44px; }
  .project-row, .lab-row { grid-template-columns: 1fr; gap: 14px; }
  .project-thumbnail, .lab-row .gallery { width: 100%; }
  .project-row .year { margin-top: 6px; }
  .project-row .about-heading { display: none; }
  .contacts dl { grid-template-columns: 1fr; gap: 8px; }
  .contacts dd { margin-bottom: 12px; }
}
