/* jacklange.me — staging styles */
:root {
  --bg: #090a0c;
  --ink: #f4f1ea;
  --muted: rgba(244, 241, 234, 0.66);
  --quiet: rgba(244, 241, 234, 0.6);
  --line: rgba(255, 255, 255, 0.08);
  --elev: rgba(255, 255, 255, 0.04);
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, "Liberation Serif", serif;
  --radius: 22px;
  --max: 1200px;
  --read: 40rem;
  --pad: 20px;
  --tap: 44px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  scrollbar-gutter: stable;
  background: var(--bg);
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(90% 55% at 8% -8%, rgba(255, 236, 214, 0.055), transparent 48%),
    radial-gradient(70% 45% at 108% 4%, rgba(170, 196, 230, 0.045), transparent 46%),
    radial-gradient(60% 40% at 70% 110%, rgba(120, 110, 160, 0.04), transparent 50%);
}

::selection { background: rgba(255, 255, 255, 0.16); }

a { -webkit-tap-highlight-color: transparent; }

:focus { outline: none; }

:focus-visible {
  outline: 2px solid #f4f1ea;
  outline-offset: 3px;
}

img, video { max-width: 100%; height: auto; display: block; }

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

.skip {
  position: absolute;
  left: 16px;
  top: 8px;
  transform: translateY(-160%);
  background: var(--ink);
  color: var(--bg);
  padding: 12px 16px;
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  z-index: 60;
  text-decoration: none;
  font-size: 14px;
}

.skip:focus { transform: none; }

.wrap { position: relative; z-index: 1; }

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: calc(var(--tap) + 16px);
  padding:
    max(8px, env(safe-area-inset-top))
    max(var(--pad), env(safe-area-inset-right))
    12px
    max(var(--pad), env(safe-area-inset-left));
  background: linear-gradient(to bottom, rgba(9, 10, 12, 0.94), rgba(9, 10, 12, 0.8) 70%, rgba(9, 10, 12, 0));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.12rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 2px;
}

.wordmark:hover { color: #fff; }

.top-end {
  display: flex;
  align-items: center;
  gap: 2px;
}

.toplink {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 550;
  letter-spacing: -0.01em;
  padding: 0 12px;
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
}

.toplink:hover { color: var(--ink); background: var(--elev); }

.toplink[aria-current="page"] { color: var(--ink); }

.topicon {
  display: none;
  width: var(--tap);
  height: var(--tap);
  place-items: center;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  flex-shrink: 0;
}
.topicon:hover { color: var(--ink); background: var(--elev); }
@media (min-width: 1024px) {
  .topicon { display: grid; }
}


.menu { position: relative; }

.menu > summary {
  list-style: none;
  width: var(--tap);
  height: var(--tap);
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(18, 19, 22, 0.72);
  color: rgba(244, 241, 234, 0.92);
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 8px 20px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.menu > summary::-webkit-details-marker { display: none; }

.menu > summary:active { transform: scale(0.94); }

.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(340px, calc(100vw - 24px));
  max-height: calc(100vh - 88px);
  max-height: calc(100dvh - 88px);
  overflow: auto;
  padding: 8px;
  border-radius: 18px;
  background: #121316;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.menu-panel a {
  display: flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  padding: 12px 14px;
  min-height: var(--tap);
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.3;
}

.menu-panel a:hover,
.menu-panel a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.06);
}

.menu-panel .group-label {
  margin: 10px 14px 2px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--quiet);
  font-weight: 600;
}

.menu-panel .group-label:first-child { margin-top: 4px; }

.menu-panel a.menu-main { font-weight: 650; }
.menu-panel a.menu-sub {
  padding-left: 28px;
  font-size: 14.5px;
  color: rgba(244, 241, 234, 0.84);
}
.menu-panel a.menu-sub:hover,
.menu-panel a.menu-sub[aria-current="page"] { color: var(--ink); }

.menu[open] > summary {
  background: #f4f1ea;
  color: #090a0c;
  border-color: #f4f1ea;
}

/* Main */
.screen {
  width: min(var(--max), calc(100% - (var(--pad) * 2)));
  margin: 0 auto;
  padding: 20px 0 calc(72px + env(safe-area-inset-bottom));
}

.page-screen { width: min(820px, calc(100% - (var(--pad) * 2))); }

.hero {
  margin: 0;
}

.hero-home {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-copy { min-width: 0; }

.hero h1 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: clamp(2.15rem, 6.4vw, 3.35rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
  font-weight: 600;
}

.hero p {
  margin: 0 0 0.95em;
  color: var(--ink);
  font-size: clamp(1.02rem, 1.5vw, 1.08rem);
  line-height: 1.58;
  overflow-wrap: anywhere;
}

.hero p:last-of-type { margin-bottom: 0; }

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 18px 0 4px;
}
.hero .contact-row .btn,
.hero a.btn {
  text-decoration: none;
}
@media (max-width: 519px) {
  .contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .contact-row .btn { width: 100%; padding: 0 12px; }
}


.portraits {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
}

.portraits figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #15161a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 16px 40px rgba(0, 0, 0, 0.28);
}

.portraits img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 20%;
}

@media (min-width: 640px) and (max-width: 959px) {
  .portraits {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .portraits img {
    aspect-ratio: 1;
    object-position: center 15%;
  }
}

@media (min-width: 960px) {
  .hero-home {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.9fr);
    gap: 24px 44px;
    align-items: center;
  }
  .portraits {
    display: block;
    position: relative;
  }
  .portrait-main img {
    aspect-ratio: 4 / 5;
    object-position: center 18%;
  }
  .portrait-alt {
    position: absolute;
    width: 44%;
    right: 14px;
    bottom: 14px;
    margin: 0;
    box-shadow:
      0 0 0 3px #090a0c,
      0 16px 32px rgba(0, 0, 0, 0.45);
  }
  .portrait-alt img {
    aspect-ratio: 1;
    object-position: center 20%;
  }
  .hero-home .hero-copy { padding-top: 2px; }
  .hero-home .contact-row { margin: 20px 0 0; }
  .section-head { margin-top: 28px; }
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 32px 0 14px;
}

.section-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: rgba(244, 241, 234, 0.86);
}

.projects {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 700px) {
  .projects { grid-template-columns: 1fr 1fr; gap: 16px; }
}

.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  border-radius: 24px;
  background: var(--elev);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (hover: hover) {
  .card:hover { transform: translateY(-2px); }
}

.card .thumb {
  aspect-ratio: 16 / 10;
  background: #15161a;
  overflow: hidden;
}

.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.card .meta {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.12rem, 2.2vw, 1.22rem);
  line-height: 1.22;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

/* Article */
.crumb {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 18px;
  color: var(--quiet);
  font-size: 14px;
}

.crumb a {
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding-right: 8px;
}

.crumb a:hover { color: var(--ink); }

.article h1 {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 5.4vw, 2.65rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.article h2 {
  margin: 2em 0 0.65em;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 3vw, 1.45rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
  font-weight: 600;
}

.article h3 {
  margin: 1.7em 0 0.5em;
  font-size: 1.06rem;
  letter-spacing: -0.02em;
  font-weight: 650;
}

.article h4 {
  margin: 1.5em 0 0.5em;
  font-size: 1.02rem;
  letter-spacing: -0.015em;
  font-weight: 650;
  color: rgba(244, 241, 234, 0.92);
}

.article p {
  margin: 0 0 1.05em;
  max-width: var(--read);
  overflow-wrap: anywhere;
}

.article a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: rgba(244, 241, 234, 0.4);
  overflow-wrap: anywhere;
}

.article a:hover { text-decoration-color: var(--ink); }

.article h5 {
  margin: 1.4em 0 0.45em;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  font-weight: 650;
  color: rgba(244, 241, 234, 0.92);
}

.article ul, .article ol {
  margin: 0 0 1.2em;
  padding: 0 0 0 1.2em;
  max-width: var(--read);
}

.article li { margin: 0 0 0.5em; }

.article li::marker { color: var(--quiet); }

.figure, .gallery, .vid, .yt, .file {
  margin: 1.4em 0 1.6em;
}

.figure, .gallery figure, .yt {
  margin-left: 0;
  margin-right: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #121318;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 12px 32px rgba(0, 0, 0, 0.22);
}

.figure img, .gallery img, .yt img {
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.figure figcaption, .gallery figcaption, .gallery-cap {
  margin: 0;
  padding: 10px 14px 12px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.figure figcaption, .gallery figcaption { background: rgba(0, 0, 0, 0.2); }

.gallery-cap {
  grid-column: 1 / -1;
  padding: 6px 2px 0;
  background: none;
}

.gallery {
  display: grid;
  gap: 10px;
  background: none;
  box-shadow: none;
  overflow: visible;
  border-radius: 0;
}

.gallery.cols-2, .gallery.cols-3 { grid-template-columns: 1fr; }

@media (min-width: 560px) {
  .gallery.cols-2 { grid-template-columns: 1fr 1fr; }
  .gallery.cols-3 { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .gallery.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
}

.gallery figure { margin: 0; }

.vid {
  display: flex;
  justify-content: center;
  background: none;
  box-shadow: none;
  overflow: visible;
}

.vid video {
  width: min(100%, 464px);
  max-height: 80vh;
  background: #000;
  border-radius: 18px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 12px 32px rgba(0, 0, 0, 0.22);
}

.yt {
  display: block;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.yt img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }

.yt .badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  min-height: var(--tap);
  border-radius: 999px;
  background: rgba(18, 19, 22, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
}

.file {
  padding: 16px;
  border-radius: 18px;
  background: var(--elev);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.file-name {
  font-weight: 600;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.file-note { color: var(--muted); font-size: 0.9rem; margin: 2px 0 0; }

.btn,
.article a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: background 150ms ease, border-color 150ms ease;
}

/* cream pill, near-black text: about 16:1 */
.btn-primary,
.article a.btn-primary {
  background: #f4f1ea;
  color: #090a0c;
  border-color: #f4f1ea;
}
.btn-primary:hover,
.article a.btn-primary:hover { background: #ffffff; border-color: #ffffff; text-decoration: none; }

/* outline pill, cream text on near-black: about 16:1; border 4.5:1 */
.btn-ghost,
.article a.btn-ghost {
  background: transparent;
  color: #f4f1ea;
  border-color: rgba(244, 241, 234, 0.55);
}
.btn-ghost:hover,
.article a.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: #f4f1ea; text-decoration: none; }

/* legacy single-button file blocks (other PDF pages) */
.file-row > .btn:not(.btn-primary):not(.btn-ghost),
.article .file-row > a.btn:not(.btn-primary):not(.btn-ghost) {
  background: #f4f1ea;
  color: #090a0c;
  border-color: #f4f1ea;
}

.file-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 519px) {
  .pdf-card { padding: 12px; }
  .sheets { padding: 0; background: transparent; margin-top: 14px; }
  .pdf-card .file-row { flex-direction: column; align-items: stretch; }
  .file-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .file-actions .btn { padding: 0 12px; white-space: normal; text-align: center; line-height: 1.2; }
}

/* Paper-sheet PDF preview */
.sheets {
  margin-top: 18px;
  display: grid;
  gap: 18px;
  justify-items: center;
  padding: clamp(10px, 3vw, 28px);
  border-radius: 14px;
  background: #15161a;
}

.sheet {
  display: block;
  width: min(100%, 760px);
  background: #fff;
  border-radius: 3px;
  overflow: hidden;
  cursor: zoom-in;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.4),
    0 14px 40px rgba(0, 0, 0, 0.55);
}

.sheet img { width: 100%; height: auto; display: block; }

.sheet:focus-visible { outline: 3px solid #f4f1ea; outline-offset: 4px; }

.file object a { display: inline-flex; align-items: center; min-height: var(--tap); }

.file object,
.file iframe {
  display: none;
  width: 100%;
  height: min(70vh, 820px);
  margin-top: 14px;
  border: 0;
  border-radius: 12px;
  background: #111;
}

@media (min-width: 700px) {
  .file object, .file iframe { display: block; }
}

/* Footer */
.foot {
  width: min(var(--max), calc(100% - (var(--pad) * 2)));
  margin: 0 auto;
  padding: 0 0 calc(36px + env(safe-area-inset-bottom));
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
}

.foot-grid {
  display: grid;
  gap: 8px;
  padding: 24px 0 8px;
}

@media (min-width: 720px) {
  .foot-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 22px;
    padding: 28px 0 8px;
  }
}

.foot h2 {
  margin: 16px 0 6px;
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--quiet);
  font-weight: 600;
}

.foot-grid > div:first-child h2 { margin-top: 0; }

@media (min-width: 720px) {
  .foot h2 { margin-top: 0; }
}

.foot a, .foot p {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.foot a {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0;
}

.foot a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(244, 241, 234, 0.4);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.foot a:hover { text-decoration-color: var(--ink); }

.foot p { margin: 0; padding: 8px 0; }

/* 404 */
.notice {
  max-width: 28rem;
  margin: 10vh auto 0;
}

.notice h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 6vw, 2.4rem);
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}

.notice p { color: var(--muted); }

.notice a { color: var(--ink); }

@media (min-width: 740px) {
  .hide-wide { display: none; }
}

@media (max-width: 739px) {
  .hide-narrow { display: none; }
  body { font-size: 16px; line-height: 1.6; }
  :root { --pad: 18px; }
  .hero h1 { margin-bottom: 16px; }
  .section-head { margin-top: 36px; }
}

@media (min-width: 1024px) {
  .screen { padding-top: 12px; }
  .page-screen { width: min(860px, calc(100% - 48px)); }
}
