:root {
  --paper: #f7f6f1;
  --sheet: #ffffff;
  --ink: #171717;
  --muted: #6f716e;
  --line: rgba(23, 23, 23, 0.14);
  --blue: #5f7fa8;
  --yellow: #f8b51a;
  --sage: #d8dfd2;
  --blush: #eadbd8;
  --sidebar-width: clamp(292px, 22vw, 356px);
  --content-pad: clamp(22px, 4.6vw, 74px);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
  text-rendering: geometricPrecision;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 30;
  transform: translateY(-150%);
  background: var(--ink);
  color: var(--sheet);
  padding: 10px 14px;
  border-radius: 4px;
}

.skip-link:focus {
  transform: translateY(0);
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto var(--sidebar-width);
  z-index: 52;
  height: 3px;
  background: transparent;
}

.scroll-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--yellow), var(--blue));
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.2vw, 26px);
  padding: clamp(18px, 2.4vw, 30px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(247, 246, 241, 0.94)),
    var(--paper);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.identity {
  display: grid;
  gap: 9px;
  padding-bottom: 2px;
}

.wordmark {
  display: grid;
  width: max-content;
  font-weight: 820;
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 2.24rem;
}

.identity p {
  margin: 0;
}

.identity p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.work-status {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(23, 23, 23, 0.12);
  border-left: 4px solid var(--yellow);
  border-radius: 6px;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 34px rgba(23, 23, 23, 0.05);
}

.work-status .status-label {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: uppercase;
}

.work-status strong {
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.1;
}

.work-status dl {
  display: grid;
  gap: 7px;
  margin: 0;
}

.work-status dl div {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 9px;
  align-items: baseline;
}

.work-status dt {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 820;
  text-transform: uppercase;
}

.work-status dd {
  min-width: 0;
  margin: 0;
  color: #303230;
  font-size: 0.8rem;
  line-height: 1.25;
}

.side-nav {
  display: grid;
  gap: 5px;
  min-height: 0;
  overflow: auto;
  padding: 2px 4px 2px 0;
  scrollbar-width: thin;
}

.side-nav a {
  position: relative;
  display: grid;
  gap: 3px;
  border: 1px solid transparent;
  border-left: 3px solid transparent;
  border-radius: 6px;
  color: #303230;
  padding: 8px 10px 8px 12px;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.side-nav a:hover,
.side-nav a:focus-visible,
.side-nav a.active {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(23, 23, 23, 0.09);
  border-left-color: var(--blue);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(23, 23, 23, 0.05);
  transform: translateX(2px);
}

.side-nav a.active {
  background:
    linear-gradient(90deg, rgba(95, 127, 168, 0.12), rgba(255, 255, 255, 0.78));
}

.nav-meta {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 820;
  line-height: 1.1;
  text-transform: uppercase;
}

.nav-title {
  color: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.18;
}

.sidebar-actions {
  display: grid;
  gap: 6px;
  margin-top: auto;
  color: var(--muted);
  font-size: 0.82rem;
}

.sidebar-actions span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 820;
  text-transform: uppercase;
}

.sidebar-actions a:hover,
.sidebar-actions a:focus-visible {
  color: var(--ink);
}

main {
  margin-left: var(--sidebar-width);
  overflow: clip;
}

section {
  scroll-margin-top: 56px;
}

.hero,
.profile-panel,
.credentials,
.portfolio-map,
.cv-panel,
.closing {
  padding: clamp(46px, 8vw, 112px) var(--content-pad);
}

.hero {
  --heading-color: var(--blue);
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.34fr);
  align-items: center;
  gap: clamp(26px, 5vw, 84px);
  background:
    linear-gradient(90deg, rgba(248, 181, 26, 0.16), transparent 36%),
    var(--paper);
}

.hero-copy,
.profile-copy,
.cv-copy,
.section-heading,
.closing > div {
  position: relative;
  z-index: 3;
  max-width: 760px;
}

.eyebrow,
.kicker {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: 6.5rem;
  line-height: 0.88;
  letter-spacing: 0;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 18px;
  font-size: 4rem;
  line-height: 0.95;
  letter-spacing: 0;
}

h1,
h2 {
  color: var(--heading-color, var(--ink));
}

h3 {
  margin-bottom: 8px;
  font-size: 1.45rem;
  line-height: 1.05;
}

.lede {
  max-width: 680px;
  margin-bottom: 28px;
  color: #353735;
  font-size: 1.22rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
}

.button,
.contact-grid a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.64);
  font-size: 0.92rem;
  font-weight: 720;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.button:hover,
.button:focus-visible,
.contact-grid a:hover,
.contact-grid a:focus-visible {
  border-color: rgba(23, 23, 23, 0.36);
  background: var(--sheet);
  transform: translateY(-1px);
}

.button.primary {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--sheet);
}

.quick-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  border: 1px solid var(--line);
  background: var(--line);
}

.quick-facts div {
  min-width: 0;
  padding: 16px;
  background: rgba(255, 255, 255, 0.58);
}

.quick-facts dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 820;
  text-transform: uppercase;
}

.quick-facts dd {
  margin: 0;
  font-size: 0.94rem;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-list.compact {
  gap: 6px;
}

.skill-badge,
.project-tags span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.skill-badge {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px 5px 5px;
  background: rgba(255, 255, 255, 0.66);
  color: #282b28;
  font-size: 0.82rem;
  font-weight: 760;
}

.skill-list.compact .skill-badge {
  min-height: 27px;
  padding: 4px 8px 4px 5px;
  font-size: 0.75rem;
}

.skill-logo-img {
  display: block;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  object-fit: contain;
  object-position: center;
}

.skill-logo-img.wide {
  width: 48px;
}

.skill-list.compact .skill-logo-img {
  width: 20px;
  height: 20px;
}

.skill-list.compact .skill-logo-img.wide {
  width: 42px;
}

.skill-badge.no-logo {
  padding-left: 9px;
}

.plate-frame {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(240, 239, 234, 0.62)),
    var(--sheet);
  box-shadow: 0 18px 54px rgba(23, 23, 23, 0.08);
  isolation: isolate;
}

.plate-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.plate-frame.is-zoomable {
  cursor: zoom-in;
}

.plate-frame.is-zoomable:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 4px;
}

.plate-frame.is-zoomable::after {
  content: "+";
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(23, 23, 23, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 760;
  line-height: 1;
  opacity: 0.86;
  transition:
    background 160ms ease,
    opacity 160ms ease,
    transform 160ms ease;
}

.plate-frame.is-zoomable:hover::after,
.plate-frame.is-zoomable:focus-visible::after {
  background: var(--sheet);
  opacity: 1;
  transform: scale(1.04);
}

.hero-plate,
.project-gallery .plate-frame,
.credentials .plate-frame {
  aspect-ratio: 2382 / 1684;
}

.hero-plate {
  align-self: center;
}

.profile-panel {
  --heading-color: #bd8700;
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(280px, 0.72fr);
  align-items: center;
  gap: clamp(26px, 4vw, 66px);
  background: var(--sheet);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.profile-plate {
  aspect-ratio: 2382 / 1684;
}

.profile-copy p,
.cv-copy p {
  color: #343633;
  font-size: 1.08rem;
}

.role-list {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.role-list li {
  padding-left: 18px;
  border-left: 3px solid var(--yellow);
  color: #303230;
}

.credentials {
  --heading-color: #6f805f;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  align-items: start;
  gap: clamp(28px, 5vw, 78px);
  background:
    linear-gradient(180deg, rgba(216, 223, 210, 0.6), transparent 52%),
    var(--paper);
}

.credentials-grid {
  display: grid;
  grid-column: 1;
  gap: 12px;
}

.credentials .plate-frame {
  grid-column: 2;
  grid-row: 1 / span 2;
  position: sticky;
  top: 30px;
}

.credentials-grid article {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.66);
}

.credentials-grid article > span {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 820;
  text-transform: uppercase;
}

.credentials-grid p {
  margin-bottom: 0;
  color: #363835;
}

.portfolio-map {
  --heading-color: var(--blue);
  display: grid;
  gap: clamp(26px, 4vw, 54px);
  background: var(--sheet);
  border-top: 1px solid var(--line);
}

.portfolio-map .section-heading p {
  max-width: 62ch;
  color: #363835;
}

.map-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 36px);
}

.map-gallery .plate-frame {
  aspect-ratio: 2382 / 1684;
}

.map-gallery figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  border: 1px solid rgba(23, 23, 23, 0.08);
  border-radius: 4px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.78);
  color: #313330;
  font-size: 0.72rem;
  font-weight: 760;
}

.project {
  position: relative;
  background: var(--paper);
  padding: clamp(52px, 8vw, 112px) var(--content-pad);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 34%, transparent), transparent 30%),
    var(--paper);
  border-top: 1px solid var(--line);
}

.project::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 8px;
  background: var(--accent);
}

.project-inner {
  display: grid;
  grid-template-columns: minmax(270px, 0.72fr) minmax(0, 1.45fr);
  align-items: start;
  gap: clamp(26px, 4vw, 76px);
}

.project-copy {
  position: sticky;
  z-index: 3;
  top: clamp(24px, 4vw, 54px);
  min-width: 0;
  padding-top: 12px;
}

.project-copy h2 {
  max-width: 10ch;
  margin-bottom: 20px;
}

.project-copy p {
  color: #333633;
  font-size: 1.05rem;
}

.project-meta {
  display: grid;
  gap: 10px;
  margin: 24px 0;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.project-meta div {
  display: grid;
  grid-template-columns: minmax(92px, 0.38fr) minmax(0, 1fr);
  gap: 14px;
}

.project-meta dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 820;
  text-transform: uppercase;
}

.project-meta dd {
  min-width: 0;
  margin: 0;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tags span {
  border: 1px solid var(--line);
  border-color: color-mix(in srgb, var(--accent) 64%, var(--line));
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(255, 255, 255, 0.56);
  color: #2d302d;
  font-size: 0.77rem;
  font-weight: 720;
}

.project-gallery {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(18px, 3vw, 42px);
  min-width: 0;
}

.project-gallery figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  border: 1px solid rgba(23, 23, 23, 0.08);
  border-radius: 4px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.78);
  color: #313330;
  font-size: 0.72rem;
  font-weight: 760;
}

.cv-panel {
  --heading-color: var(--blue);
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(260px, 0.55fr);
  align-items: center;
  gap: clamp(28px, 5vw, 86px);
  background:
    linear-gradient(90deg, rgba(95, 127, 168, 0.12), transparent 54%),
    var(--sheet);
  border-top: 1px solid var(--line);
}

.cv-plate {
  aspect-ratio: 1191 / 1684;
  max-width: 620px;
  justify-self: center;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
}

.closing {
  --heading-color: #b88312;
  min-height: 72svh;
  display: grid;
  grid-template-columns: minmax(280px, 0.62fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 86px);
  background:
    linear-gradient(180deg, rgba(248, 181, 26, 0.14), transparent 52%),
    var(--paper);
  border-top: 1px solid var(--line);
}

.closing .plate-frame {
  aspect-ratio: 2382 / 1684;
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  align-items: center;
  gap: clamp(10px, 2vw, 22px);
  padding: clamp(16px, 3vw, 34px);
  background: rgba(247, 246, 241, 0.58);
  backdrop-filter: blur(8px) saturate(0.95);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-figure {
  display: grid;
  min-width: 0;
  max-height: 92svh;
  margin: 0;
  place-items: center;
}

.lightbox img {
  display: block;
  max-width: min(100%, 1680px);
  max-height: 84svh;
  border: 1px solid rgba(23, 23, 23, 0.16);
  border-radius: 6px;
  background: var(--sheet);
  box-shadow: 0 28px 96px rgba(23, 23, 23, 0.24);
  object-fit: contain;
}

.lightbox figcaption {
  max-width: min(100%, 980px);
  margin-top: 10px;
  border: 1px solid rgba(23, 23, 23, 0.1);
  border-radius: 4px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.74);
  color: #2e302e;
  font-size: 0.82rem;
  font-weight: 760;
  text-align: center;
}

.lightbox button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(23, 23, 23, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 1.2rem;
  font-weight: 760;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.lightbox button:hover,
.lightbox button:focus-visible {
  border-color: rgba(23, 23, 23, 0.34);
  background: var(--sheet);
  transform: scale(1.04);
}

.lightbox-close {
  position: absolute;
  top: clamp(14px, 2.5vw, 24px);
  right: clamp(14px, 2.5vw, 24px);
}

.lightbox-prev {
  justify-self: end;
}

.lightbox-next {
  justify-self: start;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 520ms ease,
    transform 620ms cubic-bezier(0.2, 0.65, 0.18, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@supports (animation-timeline: view()) {
  .project-gallery .plate-frame {
    animation: plate-rise linear both;
    animation-timeline: view();
    animation-range: entry 8% cover 36%;
  }

  @keyframes plate-rise {
    from {
      opacity: 0.2;
      transform: translateY(42px) scale(0.985);
    }

    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
}

@media (max-width: 1180px) {
  :root {
    --sidebar-width: 276px;
  }

  .hero,
  .profile-panel,
  .credentials,
  .project-inner,
  .cv-panel,
  .closing {
    grid-template-columns: 1fr;
  }

  .credentials .plate-frame {
    position: relative;
    top: auto;
    grid-column: auto;
    grid-row: auto;
  }

  .project-copy {
    position: relative;
    top: auto;
  }

  .project-copy h2 {
    max-width: 14ch;
  }
}

@media (max-width: 820px) {
  :root {
    --sidebar-width: 0px;
    --content-pad: clamp(16px, 5vw, 28px);
  }

  section {
    scroll-margin-top: 168px;
  }

  .scroll-progress {
    inset: 0 0 auto 0;
  }

  .sidebar {
    inset: 0 0 auto 0;
    width: auto;
    height: auto;
    max-height: 138px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    padding: 12px var(--content-pad);
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .identity {
    align-content: start;
    gap: 6px;
  }

  .wordmark {
    font-size: 20px;
  }

  .identity p,
  .work-status,
  .sidebar-actions {
    display: none;
  }

  .side-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 0 0 3px;
  }

  .side-nav a {
    border-left: 0;
    border-bottom: 2px solid transparent;
    padding: 8px 9px;
  }

  .nav-meta {
    display: none;
  }

  .nav-title {
    font-size: 0.78rem;
    white-space: nowrap;
  }

  .side-nav a:hover,
  .side-nav a:focus-visible,
  .side-nav a.active {
    border-bottom-color: var(--yellow);
    transform: none;
  }

  main {
    margin-left: 0;
    padding-top: 112px;
  }

  .hero {
    min-height: auto;
    padding-top: 34px;
  }

  h1 {
    font-size: 4rem;
  }

  h2 {
    font-size: 2.7rem;
  }

  .quick-facts,
  .contact-grid,
  .map-gallery {
    grid-template-columns: 1fr;
  }

  .project::before {
    width: 5px;
  }

  .project-meta div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .project-gallery figcaption,
  .map-gallery figcaption {
    position: static;
    width: 100%;
    max-width: none;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.9);
  }

  .project-gallery .plate-frame,
  .map-gallery .plate-frame {
    display: block;
    aspect-ratio: auto;
    overflow: hidden;
  }

  .project-gallery .plate-frame img,
  .map-gallery .plate-frame img {
    height: auto;
  }

  .lightbox {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr auto;
    padding: 54px 14px 18px;
  }

  .lightbox-figure {
    grid-column: 1 / -1;
  }

  .lightbox-prev {
    justify-self: end;
  }

  .lightbox-next {
    justify-self: start;
  }
}

@media (max-width: 520px) {
  section {
    scroll-margin-top: 196px;
  }

  .sidebar {
    grid-template-columns: 1fr;
    max-height: 156px;
  }

  main {
    padding-top: 142px;
  }

  .hero-actions {
    display: grid;
  }

  h1 {
    font-size: 3.2rem;
  }

  h2 {
    font-size: 2.2rem;
  }

  .button,
  .contact-grid a {
    width: 100%;
  }

  .plate-frame {
    border-radius: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
