/* ─────────────────────────────────────────────
   Jackson D. Puzey — site styles
   ───────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, p, ul, li, figure { margin: 0; padding: 0; }
ul { list-style: none; }

:root {
  --ink:    #141413;
  --paper:  #FAF9F5;
  --panel:  #F2F0EB;
  --rule:   #DEDCD7;
  --muted:  #57544E;
  --faint:  #7D7A73;
  --invert: #FAF9F5;

  --display: 'Archivo', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --gut: 64px;
  --maxw: 1480px;
}

@media (max-width: 860px) { :root { --gut: 22px; } }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }

a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gut); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── skip link ───────────────────────────── */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--invert);
  padding: 12px 20px; font-family: var(--mono); font-size: 12px;
}
.skip:focus { left: 0; }

/* ── nav ─────────────────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: 58px;
  display: flex; align-items: center; justify-content: space-between;
  padding-inline: var(--gut);
  background: rgba(250,249,245,.9);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--rule);
}
.nav__name {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: .16em; text-transform: uppercase;
}
.nav__links { display: flex; gap: 26px; align-items: center; }
.nav__links a {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); text-decoration: none;
}
.nav__links a:hover { color: var(--ink); }
.nav__num { color: var(--faint); margin-right: 6px; }

.lang {
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  background: none; border: 1px solid var(--faint); color: var(--muted);
  padding: 6px 10px; cursor: pointer; min-height: 30px;
}
.lang:hover { border-color: var(--ink); color: var(--ink); }

@media (max-width: 860px) {
  .nav__links a:not(.lang) { display: none; }
}

/* ── hero ────────────────────────────────── */
.hero { position: relative; margin-top: 58px; background: var(--ink); }
.hero__img {
  width: 100%; height: clamp(440px, 74vh, 760px);
  object-fit: cover; object-position: 30% 55%;
}
.hero__card {
  background: var(--paper);
  padding: 34px 38px 32px;
  max-width: 520px;
}
@media (min-width: 981px) {
  .hero__card {
    position: absolute; top: 96px; right: var(--gut);
    box-shadow: 0 24px 60px rgba(0,0,0,.14);
  }
}
@media (max-width: 980px) {
  .hero__img { height: 56vh; }
  .hero__card { max-width: none; padding: 28px var(--gut) 26px; }
}

.hero__kicker {
  font-family: var(--mono); font-size: 10px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 16px;
}
.hero__name {
  font-size: clamp(38px, 5.2vw, 62px); font-weight: 700;
  line-height: .94; letter-spacing: -.035em; text-transform: uppercase;
  margin-bottom: 18px;
}
.hero__bio {
  font-size: 15px; font-weight: 400; line-height: 1.7; color: var(--muted);
}
.hero__credit {
  position: absolute; left: var(--gut); bottom: 16px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  color: #fff; text-transform: uppercase;
  background: rgba(20, 20, 19, .78); padding: 6px 10px;
}
@media (max-width: 980px) { .hero__credit { display: none; } }

/* ── spec bar ────────────────────────────── */
.spec {
  display: grid; grid-template-columns: repeat(5, minmax(0,1fr));
  border-bottom: 1px solid var(--ink);
}
.spec__cell { padding: 22px var(--gut) 20px; border-right: 1px solid var(--rule); }
.spec__cell:last-child { border-right: 0; }
.spec__cell:not(:first-child) { padding-inline: 26px; }
.spec__k {
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 7px;
}
.spec__v { font-family: var(--mono); font-size: 13px; }
.spec__v a { text-decoration: none; border-bottom: 1.5px solid var(--ink); }
@media (max-width: 1100px) {
  .spec { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .spec__cell { border-bottom: 1px solid var(--rule); padding-inline: var(--gut) !important; }
}
@media (max-width: 520px) { .spec { grid-template-columns: 1fr; } }

/* ── section furniture ───────────────────── */
.sec { padding-block: 84px; }
.sec__head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 44px; }
.sec__num {
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em; color: var(--faint);
}
.sec__title {
  font-size: clamp(30px, 3.6vw, 46px); font-weight: 700;
  letter-spacing: -.03em; line-height: 1;
}

/* ── full-bleed section shell ────────────── */
.sec--bleed { padding-block: 84px; }
.sec--bleed > .sec__head {
  max-width: var(--maxw); margin: 0 auto 44px; padding-inline: var(--gut);
}

/* ── experience ──────────────────────────── */
/* Source order is photo → jobs → service, so screen readers and resume
   parsers read the work history before the service block. Grid placement
   puts service back under the photo visually, and the 1fr first row lets
   the photo absorb whatever height the jobs column doesn't use, so both
   columns always end flush. */
.exp {
  display: grid;
  grid-template-columns: minmax(300px, 34%) 1fr;
  grid-template-rows: 1fr auto;
  align-items: stretch;
}
.exp__figure { grid-column: 1; grid-row: 1; }
.svc         { grid-column: 1; grid-row: 2; }
.exp__list   { grid-column: 2; grid-row: 1 / span 2; }

@media (max-width: 1080px) {
  .exp { grid-template-columns: 1fr; grid-template-rows: none; }
  .exp__figure, .svc, .exp__list { grid-column: 1; grid-row: auto; }
}

.exp__figure { position: relative; margin: 0; min-height: 420px; overflow: hidden; }
.exp__figure img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%;
}
.exp__list { padding-left: 56px; padding-right: var(--gut); min-width: 0; }

@media (max-width: 1080px) {
  .exp__figure { height: 300px; min-height: 0; }
  .exp__figure img { object-position: 50% 28%; }
  .exp__list { padding: 32px var(--gut) 0; }
}

/* ── service & leadership (left column) ──── */
.svc { padding: 44px 40px 0 var(--gut); }
.svc__title {
  font-size: 21px; font-weight: 700; letter-spacing: -.02em;
  margin-bottom: 20px;
}
.svc__item { border-top: 1px solid var(--ink); padding: 18px 0 16px; }
.svc__item + .svc__item { border-top-color: var(--rule); }
.svc__org { font-size: 15.5px; font-weight: 600; letter-spacing: -.012em; line-height: 1.25; }
.svc__meta {
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint); margin: 5px 0 2px;
}
.svc__role {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 10px;
}
.svc .pts li { font-size: 11.5px; line-height: 1.7; padding-left: 16px; }
@media (max-width: 1080px) { .svc { padding: 40px var(--gut) 0; } }

/* caption sitting on a photo */
/* captions sit over photographs of unknown brightness,
   so they carry their own ground rather than relying on the image */
.cap {
  position: absolute; left: 14px; bottom: 14px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: #fff;
  background: rgba(20, 20, 19, .78);
  padding: 6px 10px;
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.figure { position: relative; margin: 0; }

.job { border-top: 1px solid var(--ink); padding: 26px 0 30px; }
.job + .job { border-top-color: var(--rule); }
.job__top {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 20px; flex-wrap: wrap; margin-bottom: 4px;
}
.job__org { font-size: 23px; font-weight: 600; letter-spacing: -.02em; }
.job__meta {
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--faint);
  white-space: nowrap;
}
.job__place {
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em;
  color: var(--faint); margin-bottom: 16px;
}
.role { margin-top: 18px; }
.role__top {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; flex-wrap: wrap; margin-bottom: 10px;
}
.role__name {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em;
  text-transform: uppercase; font-weight: 500;
}
.role__dates {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; color: var(--faint);
}
.pts { display: flex; flex-direction: column; gap: 9px; }
.pts li {
  font-family: var(--mono); font-size: 12.5px; line-height: 1.75; color: var(--muted);
  padding-left: 20px; position: relative;
}
.pts li::before {
  content: '—'; position: absolute; left: 0; color: var(--faint);
}

/* ── work (dark) ─────────────────────────── */
.work { background: var(--ink); color: var(--invert); padding-block: 84px; }
.work .sec__num { color: rgba(250,249,245,.45); }
.work .sec__title { color: var(--invert); }
.work__intro {
  font-size: 15px; line-height: 1.75; color: rgba(250,249,245,.6);
  max-width: 620px; margin: -22px 0 48px;
}
.proj {
  width: 100%; text-align: left; background: none; color: inherit;
  border: 0; border-top: 1px solid rgba(250,249,245,.3);
  padding: 26px 0 26px; cursor: pointer; font: inherit;
  display: grid; grid-template-columns: 58px 320px 1fr auto;
  gap: 36px; align-items: center;
  transition: background .25s;
}
.proj + .proj { border-top-color: rgba(250,249,245,.16); }
.proj:last-of-type { border-bottom: 1px solid rgba(250,249,245,.3); }
.proj:hover { background: rgba(250,249,245,.045); }
.proj__id {
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
  color: rgba(250,249,245,.45);
}
.proj__title {
  display: block;
  font-size: 25px; font-weight: 600; letter-spacing: -.022em; line-height: 1.15;
}
.proj__course {
  display: block;
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(250,249,245,.45); margin-top: 7px;
}
.proj__desc {
  font-family: var(--mono); font-size: 12.5px; line-height: 1.7;
  color: rgba(250,249,245,.56);
}
.proj__cta {
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; border: 1px solid rgba(250,249,245,.4);
  padding: 12px 20px; white-space: nowrap;
}
.proj:hover .proj__cta { background: var(--invert); color: var(--ink); }
@media (max-width: 1080px) {
  .proj { grid-template-columns: 44px 1fr; gap: 10px 18px; align-items: start; }
  .proj__desc, .proj__cta { grid-column: 2; }
  .proj__cta { justify-self: start; margin-top: 6px; }
}

/* ── quad: education + contact ───────────── */
.quad { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
.quad__cell { padding: 76px var(--gut); min-width: 0; }
/* the photo must not drive the row height — the text beside it does.
   absolute positioning takes the image out of flow so the row stays honest. */
.quad__fig { position: relative; margin: 0; overflow: hidden; }
.quad__fig img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.quad__cell--dark {
  background: var(--ink); color: var(--invert);
  display: flex; flex-direction: column; justify-content: center; min-height: 620px;
}
.quad__fig--bocconi img { object-position: 50% 32%; }
.quad__fig--duomo img { object-position: 50% 0; }

@media (max-width: 980px) {
  .quad { grid-template-columns: 1fr; }
  .quad__fig { height: 320px; }
  .quad__cell--dark { min-height: 0; }
  .quad__cell { padding: 56px var(--gut); }
  .quad__fig--duomo { order: 3; }
}

.school { border-top: 1px solid var(--ink); padding: 24px 0 26px; }
.school + .school { border-top-color: var(--rule); }
.school:last-of-type { border-bottom: 1px solid var(--ink); }
.school__top {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 18px; flex-wrap: wrap; margin-bottom: 8px;
}
.school__name { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.school__meta {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint);
}
.school__deg {
  font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin-bottom: 14px;
}

/* ── credentials ─────────────────────────── */
.creds { display: block; }
.cred {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; padding: 13px 0; border-top: 1px solid var(--rule);
}
.cred__n { font-family: var(--mono); font-size: 12.5px; }
.cred__src {
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint); white-space: nowrap;
}
.sub {
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--faint);
  padding-bottom: 10px; border-bottom: 1px solid var(--ink); margin-bottom: 2px;
}
.sub--sp { margin-top: 34px; }

/* ── contact ─────────────────────────────── */
.contact__h {
  font-size: clamp(34px, 4.4vw, 54px); font-weight: 700;
  letter-spacing: -.035em; line-height: .98; margin-bottom: 36px;
  text-transform: uppercase;
}
.contact__row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 18px; padding: 15px 0; border-top: 1px solid rgba(250,249,245,.25);
}
.contact__k {
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; color: rgba(250,249,245,.5);
}
.contact__v { font-family: var(--mono); font-size: 13px; text-decoration: none; }
.contact__v:hover { border-bottom: 1px solid var(--invert); }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em;
  text-transform: uppercase; text-decoration: none;
  border: 1px solid var(--ink); padding: 14px 24px; min-height: 44px;
  background: none; color: var(--ink); cursor: pointer;
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--ink); color: var(--invert); }
.btn--light {
  border-color: rgba(250,249,245,.5); color: var(--invert);
  margin-top: 32px; align-self: flex-start;
}
.btn--light:hover { background: var(--invert); color: var(--ink); }

/* ── footer ──────────────────────────────── */
.foot {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 26px var(--gut); border-top: 1px solid var(--rule);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint);
}

/* ── lightbox ────────────────────────────── */
.lb {
  position: fixed; inset: 0; z-index: 300; display: none;
  background: rgba(10,10,10,.96); flex-direction: column;
}
.lb[open], .lb.is-open { display: flex; }
.lb__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 20px; border-bottom: 1px solid rgba(250,249,245,.14);
  color: var(--invert); flex: 0 0 auto;
}
.lb__title { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; }
.lb__count {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  color: rgba(250,249,245,.55);
}
.lb__x {
  background: none; border: 1px solid rgba(250,249,245,.3); color: var(--invert);
  width: 36px; height: 36px; cursor: pointer; font-size: 18px; line-height: 1;
}
.lb__x:hover { background: rgba(250,249,245,.12); }
.lb__stage {
  flex: 1 1 auto; display: flex; align-items: center; justify-content: center;
  gap: 14px; padding: 18px; min-height: 0;
}
.lb__stage img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.lb__nav {
  flex: 0 0 auto; width: 44px; height: 44px; cursor: pointer;
  background: none; border: 1px solid rgba(250,249,245,.25);
  color: var(--invert); font-size: 18px; line-height: 1;
}
.lb__nav:hover:not(:disabled) { background: rgba(250,249,245,.12); }
.lb__nav:disabled { opacity: .25; cursor: default; }
.lb__film {
  flex: 0 0 auto; display: flex; gap: 6px; padding: 12px 18px;
  overflow-x: auto; border-top: 1px solid rgba(250,249,245,.14);
}
.lb__film img {
  width: 74px; height: 48px; object-fit: cover; opacity: .4;
  cursor: pointer; border: 2px solid transparent; flex: 0 0 auto;
}
.lb__film img.is-on { opacity: 1; border-color: rgba(250,249,245,.85); }
@media (max-width: 720px) { .lb__film { display: none; } }

/* ── reveal ──────────────────────────────── */
.rv { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.rv.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; } }

/* ── print ───────────────────────────────── */
@media print {
  .nav, .lang, .lb, .hero__img, .hero__credit, .exp__figure,
  .edu__figure, .contact__img, .proj__cta, .btn { display: none !important; }
  body { background: #fff; color: #000; font-size: 10.5pt; }
  .hero { margin-top: 0; background: #fff; }
  .hero__card { position: static; max-width: none; padding: 0 0 18px; box-shadow: none; }
  .sec, .work, .contact { padding-block: 14px; }
  .work, .contact { background: #fff !important; color: #000 !important; }
  .work .sec__title, .proj__title, .contact__h, .contact__v { color: #000 !important; }
  .proj__desc, .work__intro, .proj__course, .proj__id { color: #333 !important; }
  .proj { grid-template-columns: 44px 1fr; break-inside: avoid; }
  .exp, .edu, .contact__grid { grid-template-columns: 1fr !important; }
  .job, .school, .proj { break-inside: avoid; }
  .rv { opacity: 1 !important; transform: none !important; }
}
