/* The rail layout: a fixed personality column on the left, work on the right.
   Shared by the homepage and the about/resume pages. */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #FBFBFC;
  --matte: #FBFBFC;
  --black: #111214;
  --gray: #74777D;
  --border: #E3E5E9;
  --rail: 320px;
  --gut: 40px;
  --tile: 6px;
  /* Warm near-black rather than #000: against pure-white tiles, true black
     vibrates at the seam. */
  --panel: #FBFBFC;
  --on-panel: #111214;
  --on-panel-dim: #74777D;
}

body {
  font-family: 'Archivo', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--black);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--black); outline-offset: 3px; }

/* ===== RAIL ===== */
.rail {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--rail);
  padding: var(--gut);
  background: var(--panel);
  color: var(--on-panel);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  z-index: 20;
}

/* Extended, heavy, tightly tracked — the Monument-ish register, out of the
   family already loaded rather than a second typeface. */
.wordmark {
  display: block;
  font-size: 34px;
  font-weight: 800;
  font-stretch: 125%;
  line-height: 0.88;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.role {
  margin-top: 9px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--on-panel-dim);
}
.rail nav {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.rail nav a {
  position: relative;
  /* Every item shares the rail's left edge. Markers live in the padding beside
     it, positioned absolutely, so nothing indents and nothing shifts on hover. */
  padding: 3px 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--on-panel-dim);
  transition: color 0.2s ease;
}
.rail nav a::before {
  content: '→';
  position: absolute;
  left: -21px;
  top: 50%;
  opacity: 0;
  transform: translateY(-50%) translateX(-4px);
  transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.rail nav a:hover { color: var(--on-panel); }
.rail nav a:hover::before { opacity: 1; transform: translateY(-50%) translateX(0); }
.rail nav a[aria-current="page"] { color: var(--on-panel); }
.rail nav a[aria-current="page"]::before {
  content: '';
  left: -16px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--on-panel);
  opacity: 1;
  transform: translateY(-50%);
}

.rail-bottom { display: flex; flex-direction: column; gap: 22px; }

.now { display: flex; flex-direction: column; gap: 5px; }
.now .doing {
  font-size: 13px; line-height: 1.45;
  color: var(--on-panel);
}
.now .place {
  font-size: 12.5px; line-height: 1.5;
  color: var(--on-panel-dim);
  max-width: 26ch;
}
#clock { font-variant-numeric: tabular-nums; }

.pulse {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--on-panel);
  margin-right: 7px;
  vertical-align: 1px;
  animation: breathe 2.6s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.82); }
}
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }

.icons { display: flex; gap: 10px; }
.icons a {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.icons a:hover { border-color: var(--black); background: var(--black); transform: translateY(-2px); }
.icons svg {
  width: 17px; height: 17px;
  fill: none;
  stroke: var(--on-panel-dim);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.2s;
}
.icons a:hover svg { stroke: var(--panel); }

.status { font-size: 12.5px; line-height: 1.5; color: var(--on-panel-dim); }
.status b { color: var(--on-panel); font-weight: 600; }

/* ===== WORK WALL ===== */
.wall {
  margin-left: var(--rail);
  /* Full-bleed horizontally — rail to viewport edge — with breathing room top
     and bottom so the grid reads as a band rather than a wallpaper. */
  padding: var(--gut) 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--tile);
}

/* One standard frame for every thumbnail: 3:2, taken from the Electrify America
   cover. Images fill it edge to edge rather than floating in a matte. */
.tile { display: block; }
.tile .frame {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 12px;
  background: var(--matte);
}
.tile img,
.tile video {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
/* Tall page screenshots are framed from the top, where the content is. */
.tile .frame.crop-top img { object-position: top; }
.tile:hover img, .tile:hover video { transform: scale(1.025); }

/* The label sits on the image, but stays permanently visible — a recruiter
   scanning should learn who the work was for without hovering anything. */
.tile .label {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 64px 22px 20px;
  background: linear-gradient(to top, rgba(10, 11, 13, 0.88) 0%, rgba(10, 11, 13, 0.6) 45%, rgba(10, 11, 13, 0) 100%);
}
.l-main { display: block; min-width: 0; }
.l-title {
  display: block;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #FFFFFF;
}
.l-desc {
  display: block;
  margin-top: 3px;
  font-size: 13.5px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.78);
}
.l-year {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.l-title::after {
  content: ' →';
  opacity: 0;
  transition: opacity 0.25s ease;
}
.tile:hover .l-title::after { opacity: 1; }
.arch {
  padding: 2px 7px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 100px;
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .wall { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .rail {
    position: static;
    width: auto;
    padding: 24px 20px 0;
    gap: 24px;
  }
  .rail nav { margin-top: 18px; flex-direction: row; gap: 20px; }
  .rail-bottom { gap: 16px; }
  .bits { display: none; }
  .wordmark { font-size: 28px; }
  .wall { margin-left: 0; padding: 20px; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.001ms !important; }
}

/* ===== TEXT PAGES ON THE RAIL (about, resume) ===== */
.page {
  margin-left: var(--rail);
  padding: var(--gut) var(--gut) 96px 0;
}
.page h1 {
  font-size: clamp(38px, 5vw, 62px);
  font-weight: 800;
  font-stretch: 118%;
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}
.page .lede {
  font-size: clamp(17px, 1.7vw, 22px);
  font-weight: 400;
  line-height: 1.45;
  color: var(--gray);
  max-width: 46ch;
  margin-bottom: 56px;
}
.page .lede em { font-style: normal; font-weight: 600; color: var(--black); }

.page section { margin-bottom: 44px; max-width: 68ch; }
.page section.wide { max-width: none; }
.page .eyebrow {
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gray); margin-bottom: 12px;
}
.page h2 {
  font-size: 24px; font-weight: 700; font-stretch: 108%;
  letter-spacing: -0.02em; margin-bottom: 12px;
}
.page p { font-size: 16.5px; line-height: 1.65; color: #46433F; }
.page p + p { margin-top: 14px; }
.page p em { font-style: normal; font-weight: 600; color: var(--black); }
.page a.inline { text-decoration: underline; text-underline-offset: 2px; }

.facts { list-style: none; display: grid; gap: 10px; margin-top: 4px; }
.facts li {
  display: grid; grid-template-columns: 130px 1fr; gap: 16px;
  font-size: 15.5px; align-items: baseline;
}
.facts dt, .facts .k {
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--gray);
}

.ph {
  font-size: 0.92em; font-weight: 500; color: var(--gray);
  background: rgba(17, 18, 20, 0.04);
  border: 1px dashed rgba(17, 18, 20, 0.28);
  border-radius: 4px; padding: 0 6px;
}

@media (max-width: 820px) {
  .page { margin-left: 0; padding: 8px 20px 64px; }
  .facts li { grid-template-columns: 1fr; gap: 2px; }
}

/* Marks older work on the wall without dimming it. */

/* ===== ABOUT ===== */
.about .born {
  margin: -8px 0 34px;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--gray);
}
/* Two columns: the portrait holds the left rail of the page and stays put while
   the copy scrolls past it. */
.about-grid {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  margin-bottom: 64px;
}
.about-grid .col-text section:last-child { margin-bottom: 0; }
.about .portrait {
  position: sticky;
  top: var(--gut);
  width: 250px;
  overflow: hidden;
  border-radius: 12px;
}
.about .portrait img { width: 100%; display: block; }

.about ul.free {
  list-style: none;
  display: grid;
  gap: 9px;
  margin-top: 6px;
}
.about ul.free li {
  font-size: 16.5px;
  line-height: 1.55;
  color: #44474C;
  padding-left: 20px;
  position: relative;
}
.about ul.free li::before {
  content: '•';
  position: absolute;
  left: 2px;
  color: var(--gray);
}
.about .inspo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 10px;
  margin-top: 6px;
}
/* One ratio across the set, so a wide screenshot can't leave a hole in the grid. */
.about .inspo figure {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: var(--border);
  aspect-ratio: 4 / 3;
}
.about .inspo img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.about .inspo figure:hover img { transform: scale(1.03); }
.about .inspo figcaption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 20px;
  background: linear-gradient(to top, rgba(12, 12, 11, 0.86) 0%, rgba(12, 12, 11, 0.42) 55%, rgba(12, 12, 11, 0.08) 100%);
  color: #FFFFFF;
  font-size: 14px;
  line-height: 1.4;
  opacity: 0;
  transition: opacity 0.32s ease;
}
.about .inspo figure:hover figcaption,
.about .inspo figure:focus-within figcaption { opacity: 1; }
/* No hover on touch, so the caption simply stays. */
@media (hover: none) {
  .about .inspo figcaption { opacity: 1; }
}
@media (max-width: 1000px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about .portrait { position: static; }
}
@media (max-width: 820px) {
  .about .inspo { grid-template-columns: 1fr; }
  .about .portrait { max-width: 100%; }
}

/* ===== RESUME ===== */
.resume-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.resume-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center;
  height: 40px; padding: 0 20px;
  border-radius: 100px;
  background: var(--black);
  color: var(--bg);
  font-size: 14px; font-weight: 600; letter-spacing: 0.02em;
  transition: opacity 0.2s, transform 0.2s;
}
.btn:hover { opacity: 0.86; transform: translateY(-1px); }
.btn.ghost {
  background: transparent;
  color: var(--black);
  border: 1px solid var(--border);
}
.btn.ghost:hover { border-color: var(--black); }

/* Tall enough to read a page without a nested scrollbar fight. */
.resume-embed {
  display: block;
  width: 100%;
  height: min(1400px, 88vh);
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--panel);
}
.fallback { padding: 40px; font-size: 16px; color: var(--gray); }

@media (max-width: 820px) {
  .resume-embed { height: 70vh; }
}

/* An outbound link, marked as one: no incoming arrow like the internal items,
   but a persistent ↗ that lifts on hover. */
.rail nav a.ext::before { content: none; }
.rail nav a.ext .ext-mark {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.82em;
  color: var(--on-panel-dim);
  transform: translateY(-1px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}
.rail nav a.ext:hover .ext-mark {
  color: var(--on-panel);
  transform: translate(2px, -3px);
}
.sr {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Visually hidden, still announced. */
.sr {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
