/* About Andrei Pinter
   Same house style as the photography site: black ground, Big Shoulders for the signage, Newsreader for reading.
   The one loud element is the staircase, which is also a bar chart of the career it describes. */
@font-face { font-family: "Big Shoulders Display"; src: url(fonts/big-shoulders-display.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url(fonts/newsreader.woff2) format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url(fonts/newsreader-italic.woff2) format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }

:root {
  --night: #000;
  --paper: #eeece6;
  --ash: #9a978f;
  --step: #1c1b19;
  --line: rgba(238, 236, 230, .16);
  --gold: #e0c285;
  --pad: clamp(16px, 4vw, 56px);
  --display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", sans-serif;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html { background: var(--night); color: var(--paper); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--night); font: 400 1.0625rem/1.6 var(--serif); font-optical-sizing: auto; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 99; background: var(--paper); color: #000; padding: 8px 12px; }
.skip:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }


/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 34vw); gap: clamp(24px, 4vw, 64px); align-items: end;
  padding: clamp(40px, 7vw, 96px) var(--pad) 0; }
.hero h1 { font: 800 clamp(4.2rem, 13.5vw, 13.5rem)/.8 var(--display); letter-spacing: -.005em; text-transform: uppercase; }
.hero h1 span { display: block; }
.hero h1 span:nth-child(2) { font-weight: 250; color: rgba(238, 236, 230, .62); }
.roles { margin-top: clamp(24px, 3vw, 40px); font-size: 1.2rem; line-height: 1.45; }
.where { margin-top: 14px; color: var(--ash); font-style: italic; }
.portrait img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #2a2622; border-radius: 2px; }

/* ---------- the staircase ---------- */
.climb { padding: clamp(72px, 10vw, 140px) var(--pad) 0; --rise: clamp(64px, 8.5vw, 124px); }
.stairs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; height: calc(var(--rise) * 4 + 3.6em);
  font: 700 clamp(1.7rem, 3.3vw, 3.5rem)/.92 var(--display); }
.stairs li { position: relative; height: calc(var(--rise) * (var(--k) + 1));
  background: linear-gradient(180deg, var(--step) 0%, rgba(28, 27, 25, .35) 70%, rgba(0, 0, 0, 0) 100%);
  border-top: 2px solid var(--paper); border-left: 1px solid var(--line); transform-origin: bottom;
  animation: rise .9s var(--ease) both; animation-delay: calc(var(--k) * 170ms + 200ms); }
.stairs li:first-child { border-left: 0; }
.stairs li:last-child { border-top-color: var(--gold); }
.stairs span { position: absolute; left: 0; right: 12px; bottom: calc(100% + .22em); padding-left: .06em;
  animation: lift .7s var(--ease) both; animation-delay: calc(var(--k) * 170ms + 520ms); }
.stairs li:last-child span { color: var(--gold); }
.floor { border-top: 1px solid var(--line); padding-top: 14px; color: var(--ash); font-style: italic; }
/* the climb plays when it scrolls into view; without JavaScript it simply stands */
.js .stairs:not(.go) li, .js .stairs:not(.go) span { animation-play-state: paused; }
@keyframes rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes lift { from { opacity: 0; transform: translateY(.4em); } to { opacity: 1; transform: none; } }

/* ---------- section heads ---------- */
.head { font: 700 clamp(2.4rem, 5vw, 4.4rem)/.9 var(--display); letter-spacing: .002em; margin-bottom: clamp(24px, 3vw, 40px); }

/* ---------- essay with hanging figures ---------- */
.story { padding: clamp(80px, 10vw, 150px) var(--pad) 0; display: grid; grid-template-columns: minmax(12rem, 18rem) minmax(0, 40rem); column-gap: clamp(28px, 5vw, 80px); }
.story .head { grid-column: 2; }
.essay { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; row-gap: 1.1em; }
.essay > p { grid-column: 2; font-size: 1.22rem; line-height: 1.68; }
.essay > .lede { font-size: clamp(1.45rem, 2.1vw, 1.8rem); line-height: 1.4; }
.figs { grid-column: 1; grid-row: span 2; align-self: start; display: grid; gap: 22px; padding-top: .3em; }
.figs p { display: grid; gap: 2px; padding-top: 10px; border-top: 1px solid var(--line); }
.figs b { font: 700 clamp(2.4rem, 3.6vw, 3.4rem)/.9 var(--display); color: var(--gold); }
.figs span { font-size: .95rem; line-height: 1.35; color: var(--ash); }

/* ---------- skills ---------- */
.skills { padding: clamp(96px, 11vw, 160px) var(--pad) 0; }
.comp { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(24px, 3vw, 44px); }
.comp > div { border-top: 2px solid var(--paper); padding-top: 14px; }
.comp dt { font: 700 1.7rem/1 var(--display); margin-bottom: 14px; }
.comp li { padding: 5px 0; line-height: 1.35; border-bottom: 1px solid var(--line); }
.creds { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 80px); margin-top: clamp(64px, 7vw, 100px); }
.creds h3 { font: 700 1.7rem/1 var(--display); margin-bottom: 16px; }
.edu p + p { margin-top: 12px; }
.edu .deg { font-size: 1.3rem; line-height: 1.3; }
.edu .yr { font: 600 1.3rem/1 var(--display); color: var(--gold); margin-left: .3em; }
.edu p:not(.deg) { color: rgba(238, 236, 230, .82); }
.certs li { display: grid; gap: 1px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.certs li:first-child { border-top: 1px solid var(--line); }
.certs b { font-weight: 500; }
.certs span { color: var(--ash); font-size: .95rem; }
.member { margin-top: 16px; color: rgba(238, 236, 230, .82); }

/* ---------- things I've built ---------- */
.built { padding: clamp(96px, 11vw, 160px) var(--pad) 0; }
.built .head { margin-bottom: 10px; }
.intro { color: var(--ash); font-style: italic; margin-bottom: clamp(24px, 3vw, 40px); }
.projects { border-top: 2px solid var(--paper); }
.projects a { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) minmax(0, 3fr); gap: 8px 32px; align-items: baseline;
  padding: 16px 0 14px; border-bottom: 1px solid var(--line); text-decoration: none; transition: background-color .3s var(--ease), padding .3s var(--ease); }
.pn { font: 650 clamp(1.7rem, 2.6vw, 2.4rem)/1 var(--display); transition: color .3s var(--ease); }
.pd { color: rgba(238, 236, 230, .82); line-height: 1.4; }
.pu { color: var(--ash); font-size: .9rem; text-align: right; overflow-wrap: anywhere; }
.projects a:hover .pn, .projects a:focus-visible .pn { color: var(--gold); }
.projects a:hover { background: rgba(238, 236, 230, .04); padding-left: 12px; padding-right: 12px; }

/* ---------- contact + footer ---------- */
.contact { padding: clamp(96px, 11vw, 160px) var(--pad) clamp(72px, 8vw, 120px); }
.contact ul { display: flex; flex-wrap: wrap; gap: 12px clamp(28px, 5vw, 72px); }
.contact a { font: 300 clamp(3rem, 8vw, 7.5rem)/.9 var(--display); text-decoration: none; border-bottom: 2px solid var(--line);
  transition: font-weight .45s var(--ease), border-color .45s var(--ease), color .45s var(--ease); }
.contact a:hover, .contact a:focus-visible { font-weight: 800; border-color: var(--gold); color: var(--gold); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding: 22px var(--pad) max(26px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); color: var(--ash); font-size: .9rem; }

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) {
  .comp { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; align-items: start; }
  .portrait { order: -1; max-width: 420px; }
  .story { grid-template-columns: 1fr; }
  .story .head, .essay > p { grid-column: 1; }
  .essay { grid-template-columns: 1fr; }
  .figs { grid-column: 1; grid-row: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: .6em 0; }
  .creds { grid-template-columns: 1fr; }
  .projects a { grid-template-columns: 1fr; gap: 4px; }
  .pu { text-align: left; }
}
@media (max-width: 720px) {
  /* the staircase turns on its side: it still climbs up and to the right */
  .stairs { display: flex; flex-direction: column-reverse; align-items: stretch; height: auto; font-size: clamp(1.9rem, 8.6vw, 2.6rem); }
  .stairs li { height: auto; min-height: 0; margin-left: calc(var(--k) * 14%); padding: .5em 0 1.1em .06em; border-left: 0;
    background: linear-gradient(90deg, var(--step), rgba(0, 0, 0, 0)); transform-origin: left; animation-name: rise-x; }
  .stairs span { position: static; display: block; }
  .floor { margin-top: 0; }
  .figs { grid-template-columns: 1fr; }
  .comp { grid-template-columns: 1fr; }
  @keyframes rise-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}
@media (prefers-reduced-motion: reduce) {
  .stairs li, .stairs span { animation: none; }
  * { transition: none !important; }
}
