:root {
  --bg: #fdf6ec;
  --card: #f4ece2;
  --card-line: #e9dfd2;
  --ink: #171717;
  --muted: #6e6a65;
  --line: #e7ded2;

  --max: 1200px;
  --gutter: clamp(16px, 3vw, 24px);

  --sans: "Inter Tight", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 500; }

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Big headings end with a period: "Experience." */
h2 {
  font-size: clamp(44px, 6vw, 64px);
  letter-spacing: -0.04em;
  line-height: 1;
}

/* ---------- Top bar: a black band across the top ---------- */
.masthead { background: var(--ink); color: var(--bg); }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  padding-bottom: 24px;
}
.brand { font-weight: 500; text-decoration: none; }
.nav { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.nav a { font-size: 14px; color: #9b958e; text-decoration: none; transition: color .15s; }
.nav a:hover { color: var(--bg); }

/* ---------- Hero / About ---------- */
/* Split: name, intro and buttons on the left; a tall photo on the right
   that runs from the top of the name to the buttons */
.hero {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  padding-top: clamp(48px, 7vw, 96px);
}
h1 {
  font-size: clamp(56px, 9vw, 128px);
  letter-spacing: -0.05em;
  line-height: 0.92;
  margin-bottom: clamp(28px, 3.5vw, 44px);
}
.hero-text p {
  max-width: 48ch;
  margin: 0 0 14px;
  font-size: 18px;
  line-height: 1.6;
  color: #3a3733;
}
.hero-photo {
  display: block;
  align-self: stretch;       /* the text column sets the height */
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: 50% 30%;
  border-radius: 14px;
}

.ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 28px;
}
.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--ink);
  transition: background .15s, color .15s;
}
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover { background: #3a3a3a; border-color: #3a3a3a; }
.btn-light { background: transparent; color: var(--ink); }
.btn-light:hover { background: var(--ink); color: var(--bg); }
.text-link { font-size: 14px; font-weight: 500; text-underline-offset: 4px; }
/* LinkedIn and GitHub wrap together, not one at a time */
.social-links { display: flex; gap: 14px; }

/* ---------- Sections ---------- */
.section { padding-top: clamp(80px, 11vw, 140px); }
.section > h2 { margin-bottom: 36px; }
.contact > h2 { margin-bottom: 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.section-head h2 { margin-bottom: 0; }
.sub { margin: 0; font-size: 13px; color: var(--muted); }

/* Experience and education: thin ruled rows, big dates on the right */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px 48px;
  padding: 24px 12px;
  border-bottom: 1px solid var(--line);
}
.row h3 { font-size: 15px; letter-spacing: -0.01em; }
.row .desc { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
/* Hackathon log: one compact line per event */
.log .log-row { padding: 14px 12px; align-items: center; }
.log-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; font-size: 15px; }
.log-event { font-weight: 500; }
.log-project { color: var(--muted); }
.log-project::before { content: "·"; margin-right: 10px; color: var(--muted); }
.log-line .tag { margin: 0; line-height: 1.4; }   /* the base .tag has a top margin for the reading shelf */
.tag.tag-award { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); white-space: nowrap; }
.row ul {
  max-width: 64ch;
  margin: 8px 0 0;
  padding-left: 16px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}
.row li + li { margin-top: 2px; }
.dates {
  margin: 0;
  font-size: clamp(18px, 2vw, 24px);
  letter-spacing: -0.02em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Experience timeline: a light rail joins the companies; a dark line joins
   each company's dot to the dots of its roles */
.timeline {
  --rail: 7px;                 /* rail's distance from the left edge */
  --indent: 52px;              /* content's distance from the left edge */
  --x: calc(var(--rail) - var(--indent));   /* rail, measured from the content */
  list-style: none;
  margin: 0;
  padding: 0 0 0 var(--indent);
}
.company { position: relative; padding-bottom: 48px; }
.company:last-child { padding-bottom: 0; }
/* Light rail down to the next company's dot */
.company:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(var(--x) - 0.5px);
  top: 13px;
  height: 100%;
  width: 1px;
  background: var(--line);
}
.company-head {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 8px 48px;
  padding-bottom: 6px;
}
/* Company dot (filled) */
.company-head::before {
  content: "";
  position: absolute;
  z-index: 2;
  left: calc(var(--x) - 7px);
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 5px var(--bg);
}
/* Dark line from the company dot down into its roles */
.company-head::after {
  content: "";
  position: absolute;
  z-index: 1;                  /* above the light rail, below the dots */
  left: calc(var(--x) - 1px);
  top: 13px;
  bottom: 0;
  width: 2px;
  background: var(--ink);
}
/* Company and school logos beside the name, straight on the page */
.org { display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; }
.logo { display: grid; place-items: center; width: 36px; height: 36px; }
.logo img { width: 32px; height: 32px; object-fit: contain; }
.company-head h3 { font-size: 22px; letter-spacing: -0.02em; line-height: 1.2; }
.company-head .desc { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

.roles { list-style: none; margin: 0; padding: 0; }
.role {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 48px;
  padding: 16px 0 0;
}
/* Role dot (hollow) */
.role::before {
  content: "";
  position: absolute;
  z-index: 2;
  left: calc(var(--x) - 7px);
  top: 22px;
  box-sizing: border-box;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--bg);
}
/* Dark line into this role's dot, and on to the next role at the same company */
.role::after {
  content: "";
  position: absolute;
  z-index: 1;                  /* above the light rail, below the dots */
  left: calc(var(--x) - 1px);
  top: 0;
  height: 27px;
  width: 2px;
  background: var(--ink);
}
.role:not(:last-child)::after { height: 100%; }
.role h4 { margin: 0; font-size: 16px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.5; }
.role ul {
  max-width: 64ch;
  margin: 6px 0 0;
  padding-left: 16px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}
.role li + li { margin-top: 2px; }
.role-dates { margin: 0; font-size: 13px; color: var(--muted); white-space: nowrap; line-height: 24px; }

/* Projects: sideways row of image cards */
.arrow {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  transition: background .15s;
}
.arrow:hover { background: var(--card-line); }
.scroll-nav { display: flex; gap: 8px; flex: none; }
.scroll-nav[hidden] { display: none; }
.arrow:disabled { opacity: .35; cursor: default; }
.arrow:disabled:hover { background: var(--card); }
.arrow svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.cards {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 460px);
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: max(var(--gutter), (100vw - var(--max)) / 2 + var(--gutter));
  padding-inline: max(var(--gutter), (100vw - var(--max)) / 2 + var(--gutter));
  scrollbar-width: none;
}
.cards::-webkit-scrollbar { display: none; }
.card { scroll-snap-align: start; }
.card-art {
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  border: 1px solid var(--card-line);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.card-art span {
  font-size: clamp(56px, 6vw, 88px);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 0.9;
}
.card-art small { margin-top: 10px; font-size: 13px; color: var(--muted); }
.art-1 { background: linear-gradient(160deg, #e9edf1, #d7dde4); }
.art-2 { background: linear-gradient(160deg, #f1efec, #e2dfda); }
.art-3 { background: linear-gradient(160deg, #f4e9de, #e6d6c5); }
/* Projects with their own branding: logo + name on the brand color, placement in the corner */
.art-brand { position: relative; flex-direction: row; align-items: center; justify-content: center; gap: .32em; font-size: clamp(34px, 3.8vw, 50px); }
/* Every mark shares one height, tied to the wordmark, so lockups line up card to card */
.art-brand .brand-mark { flex: none; height: 1em; width: auto; }
.card-art .brand-name { font-size: 1em; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.art-brand .placement {
  position: absolute;
  left: 14px;
  bottom: 14px;
  margin: 0;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.2);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  opacity: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.placement .trophy { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.art-photo { background-size: cover; background-position: center; border: 0; }
.art-reclaim { background: #df281b; color: #fff; border-color: #df281b; }
.art-earshot { background: #fff; color: #111; }
.art-earshot .brand-mark { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.art-earshot .brand-name { font-weight: 500; letter-spacing: -0.04em; }
.art-earshot .placement { background: rgba(0,0,0,.06); color: #111; }
.case-link { margin-top: 24px; }
.card h3 { margin-top: 14px; font-size: 14px; }
.card p { margin: 4px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }

/* Education: degree headline, coursework tags, then activity stat cards */
.edu { border-top: 1px solid var(--line); padding-top: 24px; }
.edu-head { display: grid; grid-template-columns: 1fr auto; gap: 16px 48px; align-items: start; padding-inline: 12px; }
.edu-head h3 { font-size: 15px; letter-spacing: -0.01em; }
.edu-head .desc { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
/* Coursework and activities sit under the school name (past the logo), each with a small label above */
.edu-group { margin-top: 20px; padding-left: calc(12px + 36px + 14px); padding-right: 12px; }
.edu-label { margin: 0 0 8px; font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.chips li { padding: 2px 9px; border: 1px solid var(--card-line); border-radius: 999px; font-size: 12px; line-height: 1.6; background: #fffaf3; }
.edu-text { margin: 0; font-size: 14px; color: var(--ink); }
.edu-list { list-style: none; margin: 0; padding: 0; font-size: 14px; color: var(--muted); }
.edu-list li + li { margin-top: 6px; }
.edu-list strong { font-weight: 500; color: var(--ink); }

/* Skills: one row per group, a small label on the left and tags on the right */
.skill-rows { border-top: 1px solid var(--line); }
.skill-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px 24px;
  align-items: baseline;
  padding: 16px 12px;
  border-bottom: 1px solid var(--line);
}
.skill-row .edu-label { margin: 0; }

/* ---------- Beyond work page ---------- */
.nav a[aria-current="page"] { color: var(--bg); }
.page-intro { padding-top: clamp(48px, 7vw, 96px); }
.page-intro h1 { margin-bottom: 20px; }
.page-intro p { max-width: 48ch; margin: 0; font-size: 18px; line-height: 1.6; color: #3a3733; }

/* Book covers (images in assets/covers/) */
.cover {
  aspect-ratio: 2 / 3;
  border-radius: 4px 10px 10px 4px;
  box-shadow: inset 6px 0 0 rgba(0,0,0,.08), 0 10px 24px -14px rgba(0,0,0,.35);
}
.cover-img { display: block; width: 100%; object-fit: cover; background: var(--card); }
/* Books Goodreads has no cover for */
.cover-blank { display: flex; align-items: flex-end; padding: 14px; background: var(--card); border: 1px solid var(--card-line); }
.cover-blank span { font-size: 15px; font-weight: 500; line-height: 1.2; }

/* Reading shelf scrolls sideways, so it holds any number of books */
.shelf {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 172px;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: max(var(--gutter), (100vw - var(--max)) / 2 + var(--gutter));
  padding-inline: max(var(--gutter), (100vw - var(--max)) / 2 + var(--gutter));
  padding-bottom: 8px;
  scrollbar-width: none;
}
.shelf::-webkit-scrollbar { display: none; }
.book { scroll-snap-align: start; }
.book h3 { margin-top: 14px; font-size: 15px; }
/* "Currently reading" pill under a book's cover */
.tag {
  display: inline-block;
  margin: 14px 0 0;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 11px;
  font-weight: 500;
}
.book-now h3 { margin-top: 8px; }
/* Beyond work lists: short entries with a small date on the right */
.entries .row { align-items: start; padding-top: 14px; padding-bottom: 14px; }
.entries .row h3 { font-size: 17px; }
.entries .row .desc { max-width: 64ch; margin-top: 4px; font-size: 14px; line-height: 1.55; }
.book .desc { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

/* Hobby photos: a sideways row of tall portrait frames, cropped around the action */
.hobbies {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 240px;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: max(var(--gutter), (100vw - var(--max)) / 2 + var(--gutter));
  padding-inline: max(var(--gutter), (100vw - var(--max)) / 2 + var(--gutter));
  padding-bottom: 8px;
  scrollbar-width: none;
}
.hobbies::-webkit-scrollbar { display: none; }
.hobby { scroll-snap-align: start; }
.hobby-photo { aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; background: var(--card); }
.hobby-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 50%); }
/* Hobby text appears over the bottom of the photo on hover (or tap/focus) */
.hobby-photo { position: relative; }
.hobby-caption {
  position: absolute;
  inset: auto 0 0 0;
  margin: 0;
  padding: 48px 16px 16px;
  background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,0));
  color: #fff;
  font-size: 14px;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s;
}
.has-caption { cursor: default; outline: none; }
.has-caption:hover .hobby-caption,
.has-caption:focus-visible .hobby-caption,
.has-caption:focus .hobby-caption { opacity: 1; transform: none; }
.has-caption:focus-visible { box-shadow: 0 0 0 2px var(--ink); }
.hobby h3 { margin-top: 14px; font-size: 16px; }

/* ---------- Projects page: a grid of cards; each opens its breakdown in a popup ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 36px 16px;
  padding-top: clamp(40px, 5vw, 64px);
  /* Buttons center their contents vertically, so keep each card its own height
     rather than stretching to the row and pushing shorter cards down */
  align-items: start;
}
button.card { padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
button.card:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
button.card:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 12px; }

.case-modal {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--bg);
  color: var(--ink);
  overflow: auto;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.45);
}
.case-modal::backdrop { background: rgba(23,23,23,.55); }
.case-modal > .card-art { aspect-ratio: 16 / 6; border: 0; border-radius: 0; }
.case-modal .case-body { padding: clamp(24px, 4vw, 40px); }
.modal-close {
  position: sticky;
  top: 12px;
  float: right;
  z-index: 1;
  margin: 12px 12px -48px 0;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--bg);
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.modal-close:hover { background: var(--card); }
body.modal-open { overflow: hidden; }
.case-body h2 { font-size: clamp(30px, 3.6vw, 44px); margin-bottom: 14px; }
.case-body .chips { margin-top: 22px; }
.case-meta { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.case-lede { max-width: 58ch; margin: 0; font-size: 17px; line-height: 1.6; color: #3a3733; }
.case-facts { margin: 22px 0 0; display: grid; gap: 12px; }
.case-facts dt { font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.case-facts dd { margin: 3px 0 0; max-width: 58ch; font-size: 15px; }
/* GitHub section, filled in by scripts/sync-github.mjs */
.repo { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.repo-meta { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--muted); }
.gh-icon { width: 15px; height: 15px; flex: none; fill: var(--ink); }
.spark { display: block; width: 100%; max-width: 420px; height: 40px; margin-top: 14px; fill: var(--ink); }
.spark .empty { fill: var(--card-line); }
.spark-axis { display: flex; justify-content: space-between; max-width: 420px; margin: 6px 0 0; font-size: 11px; color: var(--muted); }
.repo .case-link { margin-top: 20px; }

/* Six-month heatmap and "Currently building" on /projects, filled in by scripts/sync-github.mjs.
   The heatmap SVG scales with its width, so its text is sized in viewBox units. */
.heat-total { margin: 0 0 18px; font-size: 15px; color: var(--muted); }
.heat-total strong { color: var(--ink); font-weight: 500; }
/* On narrow screens the grid scrolls sideways; rtl makes it open on the latest weeks */
.heat-scroll { max-width: 680px; overflow-x: auto; scrollbar-width: none; direction: rtl; }
.heat-scroll::-webkit-scrollbar { display: none; }
.heatmap { display: block; direction: ltr; width: 100%; min-width: 480px; height: auto; }
.heatmap text { font-size: 6.5px; fill: var(--muted); }
.heatmap .l0, .heat-legend .l0 { fill: var(--card-line); }
.l1 { fill: #e7b9a3; } .l2 { fill: #d4825f; } .l3 { fill: #b5532f; } .l4 { fill: #7a3218; }
.heat-legend { display: flex; align-items: center; justify-content: flex-end; gap: 6px; max-width: 680px; margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.heat-legend svg { width: 61px; height: 10px; }
/* While the heatmap is hidden, "Currently building" sits right under the heading */
.activity[hidden] + script + .building-title { margin-top: 0; }

.building-title { margin: 56px 0 8px; font-size: 18px; letter-spacing: -0.01em; }
.building { list-style: none; margin: 0; padding: 0; max-width: 680px; }
.building li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 20px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.building-name { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; font-weight: 500; }
.building-name a { color: inherit; text-decoration: underline; text-decoration-color: var(--card-line); text-underline-offset: 3px; }
.building-name a:hover { text-decoration-color: currentColor; }
.building-tag { flex: none; padding: 0 8px; border: 1px solid var(--card-line); border-radius: 999px; font-size: 11px; font-weight: 400; line-height: 1.6; color: var(--muted); }
.building-about { margin: 3px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.building-spark { width: 89px; height: 22px; fill: var(--ink); }
.building-spark .empty { fill: var(--card-line); }
.building-count { margin: 0; min-width: 84px; text-align: right; font-size: 12px; color: var(--muted); }
.building-count strong { font-size: 15px; font-weight: 500; color: var(--ink); }
.building-count span { display: block; }
@media (max-width: 560px) {
  .building li { grid-template-columns: minmax(0, 1fr) auto; }
  .building-spark { display: none; }
}

/* Home page project cards link to their write-up */
a.card { display: block; text-decoration: none; color: inherit; }
a.card:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
.see-all-row { margin-top: 24px; }
.see-all { font-size: 14px; font-weight: 500; text-underline-offset: 4px; white-space: nowrap; }
.section-head-end { display: flex; align-items: center; gap: 16px; }

/* ---------- Password protection ---------- */
/* Lock icons only show for locked visitors (middleware adds data-locked to <body>) */
.lock-icon { display: none; width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; vertical-align: -1px; }
body[data-locked] .lock-icon { display: inline; }
.btn .lock-icon { margin-left: 6px; }
.see-all .lock-icon { margin-right: 4px; }

.unlock-modal {
  width: min(420px, calc(100vw - 32px));
  padding: clamp(24px, 4vw, 36px);
  border: 0;
  border-radius: 16px;
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.45);
}
.unlock-modal::backdrop { background: rgba(23,23,23,.55); }
.unlock-modal h2 { font-size: clamp(36px, 5vw, 48px); margin-bottom: 12px; }
.unlock-modal .modal-close { position: absolute; top: 12px; right: 12px; float: none; margin: 0; box-shadow: none; }
body[data-locked] .unlock-modal .lock-big { display: block; width: 26px; height: 26px; margin-bottom: 16px; }
.unlock-modal p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.unlock-form { margin-top: 20px; }
.unlock-form label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.unlock-row { display: flex; gap: 10px; }
.unlock-row input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border: 1px solid var(--card-line);
  border-radius: 999px;
  background: #fffaf3;
  font: inherit;
  font-size: 15px;
}
.unlock-row input:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.unlock-modal .unlock-error { margin-top: 10px; color: #a33a2b; font-size: 14px; }
.unlock-skip { display: block; margin-top: 18px; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

/* ---------- Contact popup (contact.js) ---------- */
.contact-modal {
  width: min(480px, calc(100vw - 32px));
  padding: clamp(24px, 4vw, 36px);
  border: 0;
  border-radius: 16px;
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.45);
}
.contact-modal::backdrop { background: rgba(23,23,23,.55); }
.contact-modal h2 { font-size: clamp(36px, 5vw, 48px); margin-bottom: 20px; }
.contact-modal .modal-close { position: absolute; top: 12px; right: 12px; float: none; margin: 0; box-shadow: none; }
.contact-list { margin: 0 0 28px; }
.contact-list div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--line); }
.contact-list div:last-child { border-bottom: 1px solid var(--line); }
.contact-list dt { font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.contact-list dd { margin: 0; font-size: 16px; overflow-wrap: anywhere; }
.contact-list a { text-decoration: underline; text-decoration-color: var(--card-line); text-underline-offset: 4px; }
.contact-list a:hover { text-decoration-color: currentColor; }

/* Let's talk + footer: a black band at the bottom of the page */
.closing {
  margin-top: clamp(80px, 11vw, 140px);
  background: var(--ink);
  color: var(--bg);
}
.closing .section { padding-top: clamp(64px, 8vw, 104px); }
.closing .btn-dark { background: var(--bg); border-color: var(--bg); color: var(--ink); }
.closing .btn-dark:hover { background: #e9e1d6; border-color: #e9e1d6; }
.closing .btn-light { border-color: var(--bg); color: var(--bg); }
.closing .btn-light:hover { background: var(--bg); color: var(--ink); }

.footer {
  padding-top: clamp(64px, 8vw, 96px);
  padding-bottom: 32px;
  font-size: 13px;
  color: #9b958e;
}

/* ---------- Smaller screens ---------- */
@media (max-width: 700px) {
  .skill-row { grid-template-columns: 1fr; padding-inline: 0; }
  .edu-head { grid-template-columns: 1fr; gap: 0; padding-inline: 0; }
  .edu-head .dates { order: -1; font-size: 15px; color: var(--muted); margin-bottom: 6px; }
  .edu-group { padding-left: calc(36px + 14px); padding-right: 0; }
  .timeline { --indent: 36px; }
  .company-head, .role { grid-template-columns: 1fr; gap: 0; }
  .company-head .dates { order: -1; font-size: 15px; color: var(--muted); }
  .role-dates { order: -1; line-height: 1.5; }
  .role::before { top: 43px; }
  .role::after { height: 48px; }
  .company-head::before { top: 33px; }
  .company-head::after, .company:not(:last-child)::after { top: 40px; }
  .topbar { flex-direction: column; align-items: flex-start; }
  .hero { grid-template-columns: 1fr; }
  .hero-photo { max-width: 320px; height: auto; aspect-ratio: 4 / 5; }
  .row { grid-template-columns: 1fr; gap: 0; padding-inline: 0; }
  .log .log-row { padding-inline: 0; }
  .log .role-dates { order: -1; line-height: 1.5; margin-bottom: 4px; }
  .dates { order: -1; font-size: 15px; color: var(--muted); margin-bottom: 4px; }
  .cards { grid-auto-columns: 85%; }
}
