/* Sam Wane — personal site */
:root {
  --field: #1f3b2d;
  --field-2: #274a38;
  --barley: #eceee2;
  --paper: #f7f8f2;
  --ink: #1a1c19;
  --muted: #56604f;
  --line: #c9cfbc;
  --hivis: #f2c230;
  --link: #1f5c3f;
  --measure: 38rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-variation-settings: "wdth" 100;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--hivis); outline-offset: 3px; }

.wrap { width: min(100% - 2.5rem, 68rem); margin-inline: auto; }

/* Header */
.site-header { background: var(--field); color: var(--barley); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem 2rem; padding-block: 1.1rem;
}
.brand {
  color: var(--barley); text-decoration: none;
  font-weight: 800; font-variation-settings: "wdth" 125; font-size: 1.15rem; letter-spacing: -0.01em;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.5rem; }
.site-nav a { color: var(--barley); text-decoration: none; padding-block: 0.25rem; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--line); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--hivis); }

/* Hero (home) — crop rows */
.hero {
  background:
    repeating-linear-gradient(90deg, transparent 0 46px, rgba(236,238,226,0.06) 46px 48px),
    var(--field);
  color: var(--barley);
  padding-block: clamp(3rem, 8vw, 6rem) 0;
  overflow: hidden;
}
.hero .wrap {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 2.5rem; align-items: end;
}
.hero h1 {
  margin: 0;
  font-weight: 800; font-variation-settings: "wdth" 125;
  font-size: clamp(3rem, 10vw, 7.5rem); line-height: 0.9; letter-spacing: -0.03em;
}
.hero .role { margin: 1rem 0 0; font-size: clamp(1.25rem, 2.5vw, 1.6rem); font-weight: 500; }
.hero .intro { max-width: 30rem; margin: 1.5rem 0 clamp(2.5rem, 6vw, 4.5rem); color: #d6dccb; }
.portrait { align-self: end; }
.portrait img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-bottom: 10px solid var(--hivis); }

/* Page head (inner pages) */
.page-head { background: var(--field); color: var(--barley); padding-block: clamp(2.5rem, 6vw, 4rem); }
.page-head h1 {
  margin: 0; font-weight: 800; font-variation-settings: "wdth" 125;
  font-size: clamp(2.4rem, 6vw, 4.25rem); line-height: 1; letter-spacing: -0.02em;
}
.page-head p { margin: 0.9rem 0 0; max-width: var(--measure); color: #d6dccb; }

main { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
h2 {
  font-weight: 750; font-variation-settings: "wdth" 112;
  font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.4rem;
}
.sub { margin: 0 0 1rem; color: var(--muted); font-weight: 600; }
p { max-width: var(--measure); }

/* Home: where to next */
.pointers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.5rem; }
.pointers a.block {
  display: block; text-decoration: none; color: inherit;
  border-top: 3px solid var(--ink); padding-top: 1rem;
}
.pointers a.block:hover h2 { text-decoration: underline; text-underline-offset: 0.15em; }
.pointers p { margin: 0; color: var(--muted); }

/* Inventions */
.work { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.work + .work { margin-top: clamp(3rem, 7vw, 5rem); padding-top: clamp(3rem, 7vw, 5rem); border-top: 1px solid var(--line); }
.work:nth-of-type(even) figure { order: 2; }
.work figure { margin: 0; }
.work img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--barley); }
.specs { list-style: none; padding: 0; margin: 0 0 1.25rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.specs li { background: var(--barley); border: 1px solid var(--line); padding: 0.2rem 0.65rem; font-size: 0.9rem; }

/* Presentations */
.talks { list-style: none; margin: 0; padding: 0; }
.talk {
  display: grid; grid-template-columns: 7rem 1fr; gap: 1.5rem;
  padding-block: 2rem; border-top: 1px solid var(--line);
}
.talk:last-child { border-bottom: 1px solid var(--line); }
.talk .when { font-weight: 700; font-variation-settings: "wdth" 125; font-size: 1.25rem; }
.talk p { margin: 0.25rem 0 0; }
.talk-banner { margin: 0 0 2.5rem; max-width: 28rem; }
.talk-banner img { width: 100%; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 2rem; color: var(--muted); font-size: 0.95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.site-footer p { margin: 0; }

@media (max-width: 760px) {
  .hero .wrap, .pointers, .work { grid-template-columns: 1fr; }
  .work:nth-of-type(even) figure { order: 0; }
  .hero .intro { margin-bottom: 2rem; }
  .talk { grid-template-columns: 1fr; gap: 0.25rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
