/* jeffkomarow.com — one stylesheet, no build step. */

/* Barlow Semi Condensed (SIL Open Font License), served from this site's own /fonts/ folder. */
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/barlow-semi-condensed-400.woff") format("woff"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 400; font-style: italic; font-display: swap; src: url("/fonts/barlow-semi-condensed-400-italic.woff") format("woff"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/barlow-semi-condensed-500.woff") format("woff"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/barlow-semi-condensed-600.woff") format("woff"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/barlow-semi-condensed-700.woff") format("woff"); }

:root {
  /* A flat, neutral graphite: the gray that photo and video editing apps use, because it doesn't
     tint the colors of the work on it. No glows or gradients behind anything. */
  --bg: #1a1a1a;
  --bg-raised: #202020;
  --surface: #262626;
  --surface-2: #2e2e2e;
  --line: #383838;
  --line-soft: #2a2a2a;
  --text: #eef0f0;
  --text-soft: #d5dadb;
  --muted: #9ca5a8;
  --faint: #868f92;
  /* Cinema teal. Buttons, labels and links follow these three. */
  --accent: #2ec4b6;
  --accent-strong: #5fdccf;
  --accent-ink: #03201d;
  --paper: #f2f4f4;

  --font-sans: "Barlow Semi Condensed", "Arial Narrow", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* The small uppercase labels (dates, section names). Same font for now: change it here to
     give them a font of their own. */
  --font-label: var(--font-sans);

  --wrap: 1200px;
  --narrow: 680px;
  --gutter: clamp(20px, 4vw, 40px);
  --radius: 12px;
  --radius-sm: 8px;
  /* Buttons have nearly square corners and an outline a step brighter than --line. */
  --radius-btn: 3px;
  --line-strong: color-mix(in srgb, var(--muted) 30%, var(--bg));
  --header-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 64px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Fine film grain over everything. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg, iframe, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-strong); }
::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p { margin: 0; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap.narrow { max-width: calc(var(--narrow) + var(--gutter) * 2); }

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

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip-link:focus { top: 12px; color: var(--accent-ink); }

.lead {
  font-size: clamp(1.125rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  color: var(--text-soft);
  max-width: 38em;
}

/* ------------------------------------------------------------ header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0;
  white-space: nowrap;
}

.site-nav { display: flex; gap: clamp(14px, 2.2vw, 30px); }
.site-nav a {
  position: relative;
  padding: 6px 0;
  font-size: .95rem;
  color: var(--muted);
  transition: color .2s var(--ease);
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }
.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 22px; height: 2px;
  margin: 0 auto;
  border-radius: 2px;
  background: currentColor;
  transition: transform .25s var(--ease), opacity .2s;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.nav-open .nav-toggle-bars { background: transparent; }
.nav-open .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  .js .nav-toggle { display: block; }
  .js .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--bg);
    box-shadow: 0 24px 48px -12px rgba(0, 0, 0, .8);
    border-bottom: 1px solid var(--line);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s .2s;
  }
  .js.nav-open .site-nav {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity .2s var(--ease), transform .2s var(--ease);
  }
  .js .site-nav a {
    padding: 14px 0;
    font-size: 1.15rem;
    border-bottom: 1px solid var(--line-soft);
  }
  .js .site-nav a:last-child { border-bottom: 0; }
  .js .site-nav a[aria-current="page"]::after { display: none; }
  .js .site-nav a[aria-current="page"] { color: var(--accent); }
  /* Without JavaScript the links simply wrap. */
  html:not(.js) .header-inner { flex-wrap: wrap; padding-block: 12px; }
  html:not(.js) .site-nav { flex-wrap: wrap; }
}

/* ------------------------------------------------------------ buttons */

/* Square outline buttons in small capitals, used for every button on the site. A plain one has
   a gray outline that turns teal on hover. .btn-primary, the main action, is outlined in teal
   and fills faintly on hover. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  /* Letter spacing also adds a gap after the last letter, so the right side is a little narrower. */
  padding: 10px calc(20px - .14em) 10px 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-btn);
  /* <button>s don't pick up the page's font and colors on their own. */
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover { border-color: var(--accent); color: var(--text); }
.btn-primary { border-color: var(--accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.text-link::after { content: "→"; color: var(--accent); transition: transform .2s var(--ease); }
.text-link:hover::after { transform: translateX(3px); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
/* Buttons right under a page's introduction (the resume, the 404 page) need some room. */
.page-hero .lead + .actions, .not-found .lead + .actions { margin-top: 28px; }

/* ------------------------------------------------------------ sections */

.section { padding-block: clamp(64px, 9vw, 120px); }
.section + .section { padding-top: 0; }

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(24px, 3vw, 36px);
}
.section-head h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }

.page-hero { padding-block: clamp(56px, 9vw, 112px) clamp(32px, 5vw, 56px); }
.page-hero h1 { font-size: clamp(2.6rem, 6.5vw, 5rem); margin-bottom: 20px; }

/* ------------------------------------------------------------ home hero */

/* A short introduction, then the art as the main thing on the page, in a grid. */
.hero { padding-top: clamp(28px, 4vw, 56px); }
.hero-intro {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "avatar name actions" "avatar lead actions";
  align-items: center;
  gap: 10px clamp(20px, 3vw, 40px);
}
.hero h1 {
  grid-area: name;
  align-self: end;
  font-size: clamp(2.6rem, 5.4vw, 4.4rem);
  line-height: .95;
  letter-spacing: -0.02em;
}
.hero .lead { grid-area: lead; align-self: start; }
.hero-intro .actions { grid-area: actions; }
.hero-avatar {
  grid-area: avatar;
  width: clamp(64px, 7vw, 100px);
  border-radius: 50%;
  outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent);
  outline-offset: 4px;
}

@media (max-width: 900px) {
  .hero-intro {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "avatar name" "lead lead" "actions actions";
    row-gap: 18px;
  }
  .hero h1 { align-self: center; }
}

/* ------------------------------------------------------------ work cards */

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: clamp(28px, 3vw, 40px) clamp(20px, 2.4vw, 28px);
}

.work-card { min-width: 0; }
.work-link { display: block; }
.work-link:hover { color: inherit; }

.work-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .04) inset;
}
.work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease), filter .4s var(--ease);
}
.work-thumb.is-contain { background: var(--paper); }
.work-thumb.is-contain img { object-fit: contain; padding: 8%; }
.work-link:hover .work-thumb img { transform: scale(1.04); filter: brightness(1.06); }

.play {
  position: absolute;
  left: 50%; top: 50%;
  width: 64px; height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  background: rgba(11, 11, 12, .55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .35) inset;
  transition: transform .3s var(--ease), background .3s var(--ease);
}
.play::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 20px; height: 22px;
  margin: -11px 0 0 -7px;
  background: #fff;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.work-link:hover .play, .video-poster:hover .play {
  transform: scale(1.08);
  background: var(--accent);
}
.work-link:hover .play::after, .video-poster:hover .play::after { background: var(--accent-ink); }

.badge-ext {
  position: absolute;
  right: 12px; top: 12px;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(11, 11, 12, .6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: .95rem;
  color: var(--text);
}

.thumb-fallback {
  position: absolute;
  inset: 0;
  background: var(--surface-2);
}

.work-meta { padding-top: 14px; }
.work-title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  transition: color .2s var(--ease);
}
.work-link:hover .work-title { color: var(--accent-strong); }
.work-role {
  margin-top: 6px;
  font-family: var(--font-label);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* The big video in the home hero, with viewfinder corners. */
.work-card.is-hero .work-thumb { border-radius: 16px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .06) inset; }
.work-card.is-hero .work-thumb::after {
  --vf: rgba(255, 255, 255, .75);
  content: "";
  position: absolute;
  inset: 16px;
  pointer-events: none;
  background:
    linear-gradient(var(--vf), var(--vf)) left top / 26px 2px no-repeat,
    linear-gradient(var(--vf), var(--vf)) left top / 2px 26px no-repeat,
    linear-gradient(var(--vf), var(--vf)) right top / 26px 2px no-repeat,
    linear-gradient(var(--vf), var(--vf)) right top / 2px 26px no-repeat,
    linear-gradient(var(--vf), var(--vf)) left bottom / 26px 2px no-repeat,
    linear-gradient(var(--vf), var(--vf)) left bottom / 2px 26px no-repeat,
    linear-gradient(var(--vf), var(--vf)) right bottom / 26px 2px no-repeat,
    linear-gradient(var(--vf), var(--vf)) right bottom / 2px 26px no-repeat;
}
.work-card.is-hero .play { width: 84px; height: 84px; margin: -42px 0 0 -42px; }
.work-card.is-hero .play::after { width: 26px; height: 28px; margin: -14px 0 0 -9px; }
.work-card.is-hero .work-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.work-card.is-hero .work-title { font-size: 1.1rem; }
.work-card.is-hero .work-role { margin: 0; white-space: nowrap; }

/* ------------------------------------------------------------ portfolio */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
/* The links to the portfolio's sections are buttons (.btn) with the number of videos in each. */
.chip-count {
  font-family: var(--font-label);
  font-size: .72rem;
  color: var(--faint);
}

.work-section { padding-top: clamp(40px, 6vw, 72px); }
.work-section .section-head { border-top: 1px solid var(--line); padding-top: 20px; }
.work-section .section-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }

/* ------------------------------------------------------------ clients */

/* The logos are square tiles with their own backgrounds, at most --tile wide: 7 per row (4 full rows
   of 28), and 4 per row on phones and small tablets (7 full rows). With more logos, the last row is
   shorter. */
.clients {
  --per-row: 7;
  --tile: 112px;
  --gap: 12px;
  display: grid;
  grid-template-columns: repeat(var(--per-row), minmax(0, 1fr));
  gap: var(--gap);
  max-width: calc(var(--per-row) * var(--tile) + (var(--per-row) - 1) * var(--gap));
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (max-width: 760px) { .clients { --per-row: 4; --gap: 10px; } }
.client {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08);
}
.client img { width: 100%; height: 100%; object-fit: contain; }
.client-name {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  text-align: center;
  font-family: var(--font-label);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-soft);
}

/* ------------------------------------------------------------ services */

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
}
.service {
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
}
/* The small teal numbers (01, 02…) that used to sit above each service's name. No page shows them
   now; this is kept for the sections saved in content/archive/. */
.service-num {
  font-family: var(--font-label);
  font-size: .75rem;
  letter-spacing: .14em;
  color: var(--accent);
}
.service h2, .service h3 { font-size: 1.45rem; margin-block: 18px 16px; }
/* Whatever comes first in a box starts at its top edge. */
.service > :first-child { margin-top: 0; }
.service ul { margin: 0; padding: 0; list-style: none; }
.service li {
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
  color: var(--text-soft);
}

.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tools li {
  padding: 8px 14px;
  border: 1px solid var(--line);
  /* Square like the buttons, but with a fainter outline and normal letters, because they're
     labels and can't be clicked. */
  border-radius: var(--radius-btn);
  font-size: .9rem;
  color: var(--text-soft);
}

/* ------------------------------------------------------------ articles */

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 32px 24px;
}

.post-link { display: block; height: 100%; }
.post-link:hover { color: inherit; }
.post-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
}
.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.post-link:hover .post-thumb img { transform: scale(1.04); }
.post-meta { padding-top: 16px; }
.post-meta time {
  font-family: var(--font-label);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.post-title {
  margin-top: 8px;
  font-size: 1.2rem;
  line-height: 1.3;
  letter-spacing: 0;
  transition: color .2s var(--ease);
}
.post-link:hover .post-title { color: var(--accent-strong); }
.post-excerpt {
  margin-top: 8px;
  color: var(--muted);
  font-size: .95rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.year-group {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 24px;
  padding-block: 36px;
  border-top: 1px solid var(--line);
}
.year {
  font-family: var(--font-label);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--accent);
}
.year-group .post-list { display: grid; gap: 28px; }
.year-group .post-link {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.year-group .post-meta { padding-top: 4px; }

@media (max-width: 760px) {
  .year-group { grid-template-columns: 1fr; gap: 16px; }
  .year-group .post-link { grid-template-columns: 120px minmax(0, 1fr); gap: 16px; }
  .year-group .post-thumb { border-radius: var(--radius-sm); }
  .year-group .post-title { font-size: 1.05rem; margin-top: 6px; }
  .year-group .post-excerpt { display: none; }
}

/* A single article. */
.post-header { padding-block: clamp(48px, 8vw, 96px) 32px; }
.post-header h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin-bottom: 18px; }
.post-date {
  font-family: var(--font-label);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.prose {
  padding-bottom: clamp(48px, 7vw, 88px);
  font-size: 1.25rem;
  line-height: 1.75;
  color: var(--text-soft);
}
.prose > * + * { margin-top: 1.3em; }
.prose h2, .prose h3, .prose h4 { color: var(--text); margin-top: 2em; line-height: 1.25; }
.prose h2 { font-size: 1.6rem; }
.prose h3 { font-size: 1.3rem; }
.prose strong { color: var(--text); font-weight: 650; }
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.prose a:hover { color: var(--accent-strong); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .5em; }
.prose li::marker { color: var(--accent); }
.prose blockquote {
  margin-inline: 0;
  padding: 4px 0 4px 24px;
  border-left: 2px solid var(--accent);
  color: var(--muted);
}
.prose blockquote > * + * { margin-top: .8em; }
.prose figure { margin-inline: 0; margin-block: 2em; }
.prose figure img, .prose p img { border-radius: 10px; margin-inline: auto; }
.prose > figure img { width: auto; max-height: 80vh; }
.prose .post-cover { margin: 0 0 2.2em; }
.prose .post-cover img { width: auto; max-height: 70vh; margin-inline: auto; border-radius: 12px; }
.prose figcaption {
  margin-top: 12px;
  text-align: center;
  font-size: .92rem;
  color: var(--muted);
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2.5em; }
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 12px;
  margin-block: 2em;
}
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
}
.prose .video { margin-block: 2em; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-poster { position: absolute; inset: 0; display: block; }
.video-poster img { width: 100%; height: 100%; object-fit: cover; opacity: .92; transition: opacity .3s var(--ease); }
.video-poster:hover img { opacity: 1; }

.spotify {
  width: 100%;
  height: 352px;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
}
.prose .spotify { margin-block: 2em; }

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-bottom: clamp(56px, 8vw, 104px);
}
.post-nav-link {
  display: grid;
  gap: 6px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 600;
  line-height: 1.35;
  transition: border-color .2s var(--ease);
}
.post-nav-link span {
  font-family: var(--font-label);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.post-nav-link:hover { border-color: var(--accent); color: var(--text); }
.post-nav-link.next { text-align: right; }
@media (max-width: 640px) {
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-link.next { text-align: left; }
}

/* ------------------------------------------------------------ about */

.about-intro { padding-block: clamp(48px, 8vw, 96px) 0; }
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}
.about-portrait {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  margin: 0;
}
.about-portrait img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9);
}
.about-copy > * + * { margin-top: 1.2em; }
.about-copy h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); margin-bottom: 24px; }
.about-copy > p:not(.lead) { font-size: 1.25rem; line-height: 1.75; color: var(--text-soft); }
.about-copy .about-crest { width: auto; height: 96px; margin-top: 2em; }
.about-copy .about-facts { margin-top: 2em; }
.about-copy .actions { margin-top: 2em; }
.about-facts {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.about-facts li {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.about-facts .k {
  font-family: var(--font-label);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 3px;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.photo-grid:empty { display: none; }
.photo-grid figure { margin: 0; overflow: hidden; border-radius: 10px; background: var(--surface); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.photo-grid figure:hover img { transform: scale(1.03); }
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-portrait { position: static; max-width: 340px; }
}
@media (max-width: 560px) {
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  /* 3 wide + 3 tall photos in 2 columns: run the first and last across the full width. */
  .photo-grid > :first-child, .photo-grid > :last-child { grid-column: 1 / -1; }
  .photo-grid > :last-child img { aspect-ratio: 5 / 4; object-position: top; }
  .about-facts li { grid-template-columns: 1fr; gap: 4px; }
}

/* ------------------------------------------------------------ resume password page */

.lock .lead a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.lock .lead a:hover { color: var(--accent-strong); }
.lock-form { margin-top: 36px; max-width: 30rem; }
.lock-form label { display: block; margin-bottom: 10px; font-weight: 600; }
.lock-row { display: flex; flex-wrap: wrap; gap: 12px; }
.lock-row input {
  flex: 1 1 12rem;
  min-height: 44px;
  padding: 8px 16px;
  /* Square, like the button beside it. */
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-btn);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
}
.lock-row input:hover { border-color: var(--muted); }
/* Soft red, 8.9:1 against the background. */
.lock-message { margin-top: 14px; color: #ff8f86; }

/* ------------------------------------------------------------ resume */

.resume-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.resume-section + .resume-section { margin-top: 48px; }
.resume-section > h2 {
  padding-bottom: 14px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-label);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}
.job { padding-block: 22px; border-bottom: 1px solid var(--line-soft); }
.job h3 { font-size: 1.2rem; line-height: 1.3; }
.job .org { color: var(--muted); font-weight: 500; }
.job .when {
  margin-top: 6px;
  font-family: var(--font-label);
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
}
.job ul { margin: 12px 0 0; padding-left: 1.2em; color: var(--text-soft); }
.job li + li { margin-top: 6px; }
.job p { margin-top: 10px; color: var(--text-soft); }
.resume-aside { position: sticky; top: calc(var(--header-h) + 24px); }
.resume-aside ul { margin: 0; padding: 0; list-style: none; }
.resume-aside li { padding: 9px 0; border-bottom: 1px solid var(--line-soft); color: var(--text-soft); }
.resume-aside a:hover { color: var(--accent-strong); }
@media (max-width: 860px) {
  .resume-grid { grid-template-columns: 1fr; }
  .resume-aside { position: static; }
}

/* ------------------------------------------------------------ playlists */

.playlists {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
  gap: 20px;
}

/* ------------------------------------------------------------ contact */

.contact-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.contact-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(0, 2fr) auto;
  align-items: center;
  gap: 24px;
  padding: clamp(18px, 2.4vw, 26px) 4px;
  border-bottom: 1px solid var(--line);
  transition: background .2s var(--ease), padding .3s var(--ease);
}
.contact-name { font-size: clamp(1.3rem, 2.6vw, 1.9rem); font-weight: 700; letter-spacing: -0.01em; }
.contact-handle { color: var(--muted); overflow-wrap: anywhere; }
.contact-arrow { font-size: 1.4rem; color: var(--faint); transition: transform .25s var(--ease), color .25s var(--ease); }
.contact-row:hover { color: var(--text); padding-inline: 16px; background: var(--bg-raised); }
.contact-row:hover .contact-name, .contact-row:hover .contact-arrow { color: var(--accent); }
.contact-row:hover .contact-arrow { transform: translateX(4px); }
@media (max-width: 560px) {
  .contact-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; }
  .contact-handle { grid-row: 2; font-size: .92rem; }
  .contact-arrow { grid-row: 1 / span 2; grid-column: 2; }
}

/* ------------------------------------------------------------ call to action */

.cta {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 6vw, 72px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bg-raised);
}
.cta h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); margin-bottom: 16px; max-width: 14em; }
.cta p.lead { margin-bottom: 28px; }

/* ------------------------------------------------------------ simple text pages */

.text-page { padding-bottom: clamp(56px, 8vw, 104px); }
.text-page h2 { font-size: 1.35rem; margin: 2em 0 .6em; color: var(--text); }
.text-page p { color: var(--text-soft); line-height: 1.75; }
.text-page p + p { margin-top: 1em; }
.text-page a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------ footer */

main { padding-bottom: clamp(48px, 7vw, 96px); }
main > .section:last-child { padding-bottom: 0; }

.site-footer {
  border-top: 1px solid var(--line-soft);
  background: var(--bg-raised);
}
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px 48px;
  padding-block: 48px 36px;
}
.footer-about p { margin-top: 12px; color: var(--muted); font-size: .95rem; }
.footer-email { color: var(--text-soft); }
.footer-links {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 10px 40px;
  margin: 0;
  padding: 0;
  list-style: none;
  align-content: start;
}
.footer-links a { color: var(--muted); font-size: .95rem; }
.footer-links a:hover { color: var(--text); }
.footer-fine {
  grid-column: 1 / -1;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  font-size: .85rem;
  color: var(--faint);
}
.footer-fine a:hover { color: var(--text); }
@media (max-width: 640px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------ art on the home page */

/* All the art in one grid, three across, in a new random order on every visit. site.js shuffles it
   and keeps it hidden until then, so the order it was built in (newest first) never flashes up;
   without JavaScript it stays newest first. Every piece shows as a square (the whole thing opens
   when it's clicked), and the videos loop in place. */
.art { margin-top: clamp(32px, 5vw, 56px); }
.art-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(4px, 1vw, 14px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.js .art-grid:not(.is-shuffled) { visibility: hidden; }
.art-item[hidden] { display: none; }
.art-link {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-btn);
  background: var(--surface);
}
.art-link img, .art-link video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* HDR photos keep their brighter highlights on screens that can show them. */
  dynamic-range-limit: no-limit;
  transition: transform .6s var(--ease);
}
.art-link video { pointer-events: none; } /* a click opens it full size */
.art-link:hover img, .art-link:hover video { transform: scale(1.03); }
/* A play mark in a video's corner when it isn't looping on its own: without JavaScript, for people
   whose device asks for less motion, or when the device won't play it (an iPhone in Low Power Mode). */
.art-link.is-video::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  display: none;
  width: clamp(22px, 2.4vw, 30px);
  aspect-ratio: 1;
  border-radius: var(--radius-btn);
  background: rgba(11, 11, 12, .6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6.5v11l9-5.5z' fill='%23fff'/%3E%3C/svg%3E") center / 100% no-repeat;
}
html:not(.js) .art-link.is-video::after, .art-link.is-still::after { display: block; }
@media (prefers-reduced-motion: reduce) {
  .art-link.is-video::after { display: block; }
}

/* Above the grid, a box for each category that turns it on and off. They need JavaScript, so they
   only show when it runs. A box that's on is outlined in teal with its little square filled in. */
.art-boxes { display: none; flex-wrap: wrap; gap: 10px; margin-bottom: clamp(16px, 2.4vw, 28px); }
.js .art-boxes { display: flex; }
.art-box::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border: 1px solid currentColor;
  border-radius: 1px;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.art-box[aria-pressed="true"] { border-color: var(--accent); }
.art-box[aria-pressed="true"]:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.art-box[aria-pressed="true"]::before { border-color: var(--accent); background: var(--accent); }
/* An off box stays gray when the pointer is on it, so it doesn't look on right after a click. */
.art-box[aria-pressed="false"] { color: var(--muted); }
.art-box[aria-pressed="false"]:hover { border-color: var(--muted); color: var(--text-soft); }
.art-none { padding-block: 40px; color: var(--muted); }
@media (max-width: 560px) {
  .art-boxes { gap: 8px; }
  .art-box { padding-inline: 14px calc(14px - .14em); }
}

/* ------------------------------------------------------------ video lightbox */

.lightbox {
  width: min(1200px, 94vw);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  overflow: visible;
}
.lightbox::backdrop {
  background: rgba(5, 5, 6, .9);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.lightbox-title { font-weight: 600; }
.lightbox-tools { flex: none; display: flex; align-items: center; gap: 8px; }
/* Close is one of the site's buttons (.btn). The arrows beside it are square buttons of the same
   height and outline. */
.lightbox-step {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-btn);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1.1rem;
  cursor: pointer;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.lightbox-step:hover { border-color: var(--accent); color: var(--accent); }
.lightbox-step[hidden] { display: none; }
.lightbox-frame {
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 120px);
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
}
.lightbox-frame iframe { width: 100%; height: 100%; border: 0; }

/* A piece of art opened from the home page: as big as the window allows, at its own shape. A video's
   shape (--ratio, its width divided by its height) is set by site.js. */
.lightbox.is-art { width: min(1600px, 96vw); }
.lightbox.is-art .lightbox-frame {
  display: grid;
  place-items: center;
  aspect-ratio: auto;
  border-radius: 0;
  background: none;
}
.lightbox.is-art .lightbox-frame img {
  width: auto;
  max-height: calc(100vh - 120px);
  border-radius: var(--radius);
  dynamic-range-limit: no-limit;
}
.lightbox.is-art .lightbox-frame video {
  width: min(100%, (100vh - 120px) * var(--ratio, 1));
  height: auto;
  border-radius: var(--radius);
  background: #000;
}

/* ------------------------------------------------------------ 404 */

.not-found { padding-block: clamp(80px, 14vw, 180px); }
.not-found h1 { font-size: clamp(2.6rem, 7vw, 5rem); margin-bottom: 20px; }

/* ------------------------------------------------------------ motion & print */

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

@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  body::after, .site-header, .site-footer, .skip-link, .lightbox, .no-print { display: none !important; }
  .page-hero { padding-block: 0 16pt; }
  .page-hero h1 { font-size: 26pt; }
  .resume-section > h2, .lead, .job .org, .job .when, .job ul, .job p,
  .resume-aside li, .resume-aside a { color: #000 !important; }
  .resume-grid { grid-template-columns: 2fr 1fr; gap: 24pt; }
  .resume-aside { position: static; }
  .job { break-inside: avoid; padding-block: 10pt; }
  a { text-decoration: none; }
}
