/* Spencer Willett — site styles. One accent, dark ground, thin lines. */
:root {
  --bg: #0a0b0d;
  --bg-raised: #111317;
  --fg: #e8e6df;
  --muted: #8b8a85;
  --line: #24272d;
  --accent: #d9c55a;
  --accent-dim: #6b6230;
  --sans: "Space Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.6 var(--sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
::selection { background: var(--accent); color: var(--bg); }

.logo { color: var(--accent); display: block; }

/* ---------- header / nav ---------- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px clamp(16px, 4vw, 48px);
  position: relative;
  z-index: 2;
}
.brand {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand .logo { width: 48px; height: 48px; transition: transform 0.4s; }
.brand:hover .logo { transform: rotate(60deg); }
.nav { display: flex; gap: clamp(16px, 3vw, 36px); font-size: 17px; font-weight: 500; }
.nav a { color: #a9a79f; letter-spacing: 0.02em; padding: 4px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }

/* ---------- social icons ---------- */
.social { display: flex; gap: 36px; justify-content: center; }
.social a { color: var(--muted); transition: color 0.15s, transform 0.15s; display: inline-flex; }
.social a:hover { color: var(--accent); transform: translateY(-2px); }
.social svg { width: 48px; height: 48px; fill: currentColor; }
.social.small { gap: 22px; }
.social.small svg { width: 26px; height: 26px; }

/* ---------- interior pages ---------- */
main.page {
  flex: 1;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 32px clamp(16px, 4vw, 32px) 64px;
}
.page h1 {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.lede { color: var(--muted); margin: 0 0 36px; }
.mono { font-family: var(--mono); }

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 32px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 12px var(--mono);
}

/* ---------- featured talk ---------- */
.talk { margin-bottom: 44px; }
.talk .num { font: 12px var(--mono); color: var(--accent); letter-spacing: 0.08em; }
.talk h2 { font-size: clamp(20px, 3vw, 26px); font-weight: 500; margin: 4px 0 16px; line-height: 1.3; }
.talk p { color: #bdbbb4; margin: 16px 0 12px; }
.video {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
}
.video img, .video iframe { width: 100%; height: 100%; display: block; object-fit: cover; border: 0; }
.video .play {
  position: absolute;
  left: 50%; top: 50%;
  width: 76px; height: 76px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: rgba(10, 11, 13, 0.7);
  transition: transform 0.2s, background 0.2s;
}
.video .play::after {
  content: "";
  position: absolute;
  left: 30px; top: 22px;
  border-style: solid;
  border-width: 16px 0 16px 26px;
  border-color: transparent transparent transparent var(--accent);
}
.video:hover .play { transform: translate(-50%, -50%) scale(1.08); background: rgba(10, 11, 13, 0.85); }

.made-with { font: 11px var(--mono); color: #5d5c58; letter-spacing: 0.02em; }
.made-with:hover { color: var(--accent); }

/* ---------- projects ---------- */
.projects { list-style: none; margin: 0; padding: 0; }
.project {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.project.has-media { grid-template-columns: 56px 1fr 240px; }
.project:last-child { border-bottom: 1px solid var(--line); }
.project .glyph { width: 56px; height: 56px; stroke: var(--accent); fill: none; stroke-width: 1.25; }
.project .num { font: 12px var(--mono); color: var(--accent); }
.project h2 { font-size: 22px; font-weight: 500; margin: 2px 0 6px; }
.project p { margin: 0 0 12px; color: #bdbbb4; }
.project figure { margin: 0; align-self: center; }
.project figure img { width: 100%; height: auto; display: block; border-radius: 3px; }
.project figcaption { font: 10px var(--mono); color: #5d5c58; margin-top: 6px; text-align: right; }
.project figcaption a { text-decoration: underline; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tags span {
  font: 11px var(--mono);
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 2px;
}
.links { display: flex; gap: 18px; font: 13px var(--mono); }
.links a { color: var(--accent); }
.links a:hover { text-decoration: underline; }
.more { margin-top: 28px; font: 13px var(--mono); }
.more a { color: var(--accent); }

/* ---------- buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 13px var(--mono);
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  padding: 8px 14px;
  border-radius: 2px;
}
.button:hover { border-color: var(--accent); background: rgba(217, 197, 90, 0.06); }
.button svg { width: 14px; height: 14px; fill: currentColor; }

/* ---------- blog ---------- */
.x-card {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 560px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-raised);
}
.x-card:hover { border-color: var(--accent-dim); color: inherit; }
.x-mark { width: 30px; height: 30px; fill: var(--fg); flex: none; }
.x-who { display: flex; flex-direction: column; line-height: 1.3; flex: 1; }
.x-who span { color: var(--muted); font: 13px var(--mono); }
.timeline { max-width: 560px; margin-top: 24px; }
.timeline:empty { display: none; }
.feed { max-width: 560px; margin-top: 28px; }
.feed .note { color: var(--muted); font: 13px var(--mono); }
.feed .twitter-tweet { margin: 0 0 20px !important; }

/* ---------- books ---------- */
.shelf-title {
  font: 500 12px var(--mono);
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 40px 0 8px;
}
.books { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); column-gap: 32px; }
.book {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.book img, .cover-ph { width: 76px; height: auto; display: block; border-radius: 2px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5); }
.cover-ph {
  aspect-ratio: 2 / 3;
  border: 1px solid var(--accent-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 9px var(--mono);
  color: var(--muted);
}
.cover-ph .logo { width: 30px; height: 30px; }
.book .kind { font: 11px var(--mono); color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase; }
.book h2, .series h2 { font-size: 18px; font-weight: 500; margin: 2px 0 2px; line-height: 1.3; }
.book .by, .series .by { color: var(--muted); margin: 0 0 8px; font-size: 14px; }

.shelf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 28px; }
.series { padding-top: 18px; border-top: 1px solid var(--line); }
.fan { position: relative; height: 170px; margin-bottom: 14px; }
.fan img {
  position: absolute;
  bottom: 0;
  width: 92px;
  height: 138px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
  transition: transform 0.25s;
  transform-origin: bottom center;
}
.fan img:nth-child(1) { left: 0; transform: rotate(-7deg); z-index: 3; }
.fan img:nth-child(2) { left: 34px; transform: rotate(0deg); z-index: 2; }
.fan img:nth-child(3) { left: 68px; transform: rotate(7deg); z-index: 1; }
.series:hover .fan img:nth-child(1) { transform: rotate(-12deg) translateX(-6px); }
.series:hover .fan img:nth-child(3) { transform: rotate(12deg) translateX(6px); }

/* ---------- resume ---------- */
.resume-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.resume-sheet { display: block; max-width: 820px; }
.resume-sheet img {
  width: 100%;
  height: auto;
  display: block;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s;
}
.resume-sheet:hover img { transform: translateY(-2px); }

@media (max-width: 720px) {
  .site-header { flex-direction: column; align-items: flex-start; }
  .project, .project.has-media { grid-template-columns: 1fr; gap: 12px; }
  .project .glyph { width: 40px; height: 40px; }
  .project figure { max-width: 320px; }
  .nav { font-size: 16px; }
}
