:root {
  color-scheme: dark;
  --bg: #101722;
  --bg-raised: #151f2c;
  --ink: #dbe5ef;
  --ink-strong: #f5f8fb;
  --muted: #8e9caf;
  --faint: #718197;
  --line: rgba(219, 229, 239, 0.12);
  --line-strong: rgba(219, 229, 239, 0.22);
  --accent: #66d1c4;
  --data-field-accent: #54c1b4;
  --accent-soft: rgba(102, 209, 196, 0.12);
  --cursor-glow: rgba(102, 209, 196, 0.075);
  --cursor-glow-mobile: rgba(102, 209, 196, 0.07);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
  --serifless: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f2ed;
  --bg-raised: #ebe8e1;
  --ink: #37404a;
  --ink-strong: #121820;
  --muted: #68727e;
  --faint: #7d858f;
  --line: rgba(18, 24, 32, 0.12);
  --line-strong: rgba(18, 24, 32, 0.22);
  --accent: #087f77;
  --data-field-accent: #a94f28;
  --accent-soft: rgba(8, 127, 119, 0.1);
  --cursor-glow: rgba(169, 79, 40, 0.14);
  --cursor-glow-mobile: rgba(169, 79, 40, 0.085);
  --shadow: 0 24px 70px rgba(50, 44, 35, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 32px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serifless);
  font-size: 15px;
  line-height: 1.7;
  transition: background-color 240ms ease, color 240ms ease;
}

body::selection {
  background: var(--accent);
  color: var(--bg);
}

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

button {
  color: inherit;
  font: inherit;
}

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

.skip-link {
  position: fixed;
  z-index: 99;
  top: 16px;
  left: 16px;
  padding: 10px 14px;
  background: var(--ink-strong);
  color: var(--bg);
  transform: translateY(-150%);
}

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

.ambient {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    600px circle at var(--mouse-x, 15%) var(--mouse-y, 10%),
    var(--cursor-glow),
    transparent 52%
  );
}

.page-shell {
  display: grid;
  grid-template-columns: minmax(270px, 0.58fr) minmax(640px, 1.42fr);
  gap: clamp(44px, 4.5vw, 72px);
  width: min(1280px, calc(100% - 80px));
  margin: 0 auto;
}

.identity {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100vh;
  min-height: 680px;
  padding: 72px 0 42px;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  margin-bottom: 44px;
  color: var(--ink-strong);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.wordmark span {
  color: var(--accent);
}

.location {
  margin: 0 0 26px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.identity h1 {
  margin: 0;
  color: var(--ink-strong);
  font-size: clamp(42px, 4vw, 58px);
  font-weight: 600;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.role {
  margin: 14px 0 0;
  color: var(--ink-strong);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.intro {
  max-width: 430px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.section-nav {
  display: grid;
  gap: 15px;
  width: 250px;
  margin: 30px 0;
}

.section-nav a {
  display: grid;
  grid-template-columns: 26px 40px auto;
  align-items: center;
  gap: 12px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 180ms ease;
}

.section-nav i {
  display: block;
  width: 25px;
  height: 1px;
  background: currentColor;
  transition: width 180ms ease;
}

.section-nav b {
  font-weight: 500;
  white-space: nowrap;
}

.section-nav a:hover,
.section-nav a.is-active {
  color: var(--ink-strong);
}

.section-nav a:hover i,
.section-nav a.is-active i {
  width: 40px;
}

.identity-footer {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.controls,
.socials {
  display: flex;
  align-items: center;
  gap: 18px;
}

.control {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.control:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.control:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.language-current {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
}

.theme-toggle svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

:root[data-theme="dark"] .theme-toggle .moon,
:root[data-theme="light"] .theme-toggle .sun {
  display: none;
}

.socials a {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 180ms ease;
}

.socials a:hover {
  color: var(--accent);
}

main {
  min-width: 0;
  padding-bottom: 40px;
}

.section {
  padding: 108px 0;
  border-bottom: 1px solid var(--line);
}

.section--opening {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding-top: 72px;
  padding-bottom: 0;
  overflow: hidden;
}

.opening-line {
  max-width: 690px;
  margin: 0;
  color: var(--ink-strong);
  font-size: clamp(32px, 4.2vw, 58px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.12;
}

.opening-line::first-line {
  color: var(--accent);
}

.opening-note {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 28px;
  max-width: 560px;
  margin-top: 52px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.opening-note span,
.section-label,
.project-topline,
.date,
.note-grid > a > span {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.opening-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.down-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 12px;
  margin-top: 54px;
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 600;
}

.down-link b {
  color: var(--accent);
  font-size: 20px;
  transition: transform 180ms ease;
}

.down-link:hover b {
  transform: translateY(4px);
}

.data-field {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 220px;
  flex: 1 0 220px;
  margin-top: 26px;
  overflow: hidden;
  border-top: 1px solid var(--line);
  cursor: crosshair;
}

.data-field::before {
  position: absolute;
  z-index: 1;
  top: -2px;
  left: 0;
  width: 38px;
  height: 3px;
  background: var(--data-field-accent);
  content: "";
  opacity: 0.72;
}

.data-field canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.section-label {
  display: flex;
  gap: 13px;
  margin: 0 0 42px;
  color: var(--muted);
  font-weight: 500;
}

.section-label span:first-child {
  color: var(--accent);
}

.prose {
  display: grid;
  gap: 20px;
}

.prose p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.75;
}

.prose p:first-child {
  color: var(--ink);
}

.portrait {
  margin: 56px 0 0;
}

.portrait__stage {
  position: relative;
  height: clamp(300px, 38vw, 410px);
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 48% 46%, color-mix(in srgb, var(--data-field-accent) 15%, transparent), transparent 32%),
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-color: var(--bg-raised);
  background-size: auto, 42px 42px, 42px 42px;
}

.portrait__stage::before,
.portrait__stage::after {
  position: absolute;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  content: "X 40.4168 · Y −3.7038";
  pointer-events: none;
}

.portrait__stage::before {
  top: 15px;
  left: 17px;
}

.portrait__stage::after {
  right: 17px;
  bottom: 15px;
  content: "MAD · 2026";
}

.portrait__disc {
  --portrait-x: 0px;
  --portrait-y: 0px;
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(130px, 14.5vw, 165px);
  aspect-ratio: 1;
  padding: 7px;
  border: 1px solid color-mix(in srgb, var(--data-field-accent) 72%, var(--line-strong));
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 24px 55px color-mix(in srgb, var(--data-field-accent) 20%, transparent);
  cursor: grab;
  transform: translate(calc(-50% + var(--portrait-x)), calc(-50% + var(--portrait-y)));
  transition: box-shadow 180ms ease, scale 180ms ease;
  touch-action: none;
  user-select: none;
  will-change: transform;
}

.portrait__disc::after {
  position: absolute;
  inset: -11px;
  border: 1px dashed color-mix(in srgb, var(--data-field-accent) 42%, transparent);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.portrait__disc.is-dragging {
  z-index: 2;
  box-shadow: 0 30px 70px color-mix(in srgb, var(--data-field-accent) 30%, transparent);
  cursor: grabbing;
  scale: 1.025;
}

.portrait__disc img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 44%;
  filter: saturate(0.95) contrast(1.04);
  pointer-events: none;
}

.portrait figcaption {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 13px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.experience-list {
  display: grid;
}

.experience-item {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 28px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
}

.experience-item:last-child {
  border-bottom: 1px solid var(--line);
}

.experience-item--current {
  position: relative;
}

.experience-item--current::before {
  position: absolute;
  top: 35px;
  left: -18px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-soft);
  content: "";
}

.experience-item .date {
  margin: 4px 0 0;
}

.experience-item h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.company {
  margin: 2px 0 12px;
  color: var(--accent);
  font-size: 12px;
}

.experience-item div > p:last-of-type {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 17px 0 0;
  padding: 0;
  list-style: none;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stack li:not(:last-child)::after {
  margin-left: 14px;
  color: var(--line-strong);
  content: "·";
}

.resume-callout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(145px, 0.42fr) minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  width: 100%;
  margin-top: 40px;
  padding: 30px 28px 30px 32px;
  overflow: hidden;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink-strong);
  transition: background-color 220ms ease;
}

.resume-callout::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent);
  content: "";
  transform: scaleY(0.22);
  transform-origin: bottom;
  transition: transform 220ms ease;
}

.resume-callout:hover {
  background: var(--accent-soft);
}

.resume-callout:hover::before {
  transform: scaleY(1);
}

.resume-callout__meta {
  display: grid;
  gap: 9px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.07em;
  line-height: 1.5;
  text-transform: uppercase;
}

.resume-callout__meta span:first-child {
  color: var(--accent);
}

.resume-callout strong {
  font-size: clamp(21px, 2.5vw, 32px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.15;
}

.resume-callout__arrow {
  color: var(--accent);
  font-size: 26px;
  line-height: 1;
  transition: transform 180ms ease;
}

.resume-callout:hover .resume-callout__arrow {
  transform: translate(4px, -4px);
}

.section-heading-row {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 30px;
  margin-bottom: 44px;
}

.section-heading-row .section-label {
  margin: 0;
}

.section-heading-row > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.featured-work {
  display: grid;
}

.project {
  display: grid;
  grid-template-columns: minmax(150px, 0.78fr) minmax(260px, 1.22fr);
  gap: 28px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}

.project:last-child {
  border-bottom: 1px solid var(--line);
}

.project-image {
  position: relative;
  align-self: start;
  overflow: hidden;
  background: var(--bg-raised);
  box-shadow: var(--shadow);
}

.project-image,
.project-image img {
  aspect-ratio: 3 / 2;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.68) contrast(1.04);
  transition: filter 240ms ease, transform 500ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.project:hover .project-image img {
  filter: saturate(1) contrast(1);
  transform: scale(1.035);
}

.project-topline {
  display: flex;
  justify-content: space-between;
  color: var(--faint);
}

.project-topline span:first-child {
  color: var(--accent);
}

.project h2 {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0 12px;
  color: var(--ink-strong);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 600;
  letter-spacing: -0.035em;
}

.project h2 span {
  color: var(--accent);
  font-size: 16px;
  transition: transform 180ms ease;
}

.project:hover h2 span {
  transform: translate(3px, -3px);
}

.project-copy > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.more-work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 52px 24px;
}

.archive-card {
  min-width: 0;
}

.archive-card__image {
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: var(--bg-raised);
  box-shadow: var(--shadow);
}

.archive-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.72) contrast(1.03);
  transition: filter 240ms ease, transform 500ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.archive-card:hover .archive-card__image img {
  filter: saturate(1) contrast(1);
  transform: scale(1.035);
}

.archive-card__top {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.archive-card__top span:last-child {
  color: var(--accent);
  font-size: 13px;
  transition: transform 180ms ease;
}

.archive-card:hover .archive-card__top span:last-child {
  transform: translate(3px, -3px);
}

.archive-card h2 {
  margin: 9px 0 8px;
  color: var(--ink-strong);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.archive-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.archive-card .stack {
  margin-top: 13px;
}

.note-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 280px;
  background: var(--bg-raised);
}

.note-grid > a {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px;
}

.note-grid > a strong {
  color: var(--ink-strong);
  font-size: clamp(19px, 2.2vw, 28px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.25;
}

.note-grid > a b {
  align-self: flex-end;
  color: var(--accent);
  font-size: 18px;
  transition: transform 180ms ease;
}

.note-grid > a:hover b {
  transform: translate(3px, -3px);
}

.note-image {
  overflow: hidden;
}

.note-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.5);
}

.contact-section {
  border-bottom: 0;
  padding-bottom: 40px;
}

.contact-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  align-items: end;
}

.contact-heading .section-label {
  margin-bottom: 26px;
}

.contact-heading h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: clamp(34px, 4.4vw, 58px);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 1.05;
}

.contact-location {
  display: grid;
  gap: 7px;
  min-width: 150px;
  margin: 0 0 5px;
}

.contact-location span {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-location strong {
  color: var(--ink-strong);
  font-size: 14px;
  font-weight: 500;
}

.contact-directory {
  margin-top: 52px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.contact-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  min-height: 68px;
  padding: 15px 4px;
  border-top: 1px solid var(--line);
  transition: background-color 180ms ease, padding 180ms ease;
}

.contact-row:first-child {
  border-top: 0;
}

.contact-row:hover {
  padding-right: 14px;
  padding-left: 14px;
  background: var(--accent-soft);
}

.contact-row > span {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink-strong);
  font-size: 15px;
  font-weight: 500;
}

.contact-row b {
  color: var(--accent);
  font-size: 18px;
  font-weight: 500;
  transition: transform 180ms ease;
}

.contact-row:hover b {
  transform: translate(3px, -3px);
}

footer {
  display: flex;
  justify-content: space-between;
  margin-top: 72px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

footer a:hover {
  color: var(--accent);
}

/* Résumé preview */

.resume-is-open {
  overflow: hidden;
}

.resume-viewer {
  width: min(1180px, calc(100% - 48px));
  height: min(880px, calc(100vh - 48px));
  max-width: none;
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.resume-viewer::backdrop {
  background: rgba(7, 12, 18, 0.7);
  backdrop-filter: blur(8px);
}

.resume-viewer__shell {
  display: grid;
  grid-template-columns: 255px minmax(0, 1fr);
  height: 100%;
}

.resume-viewer__info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px;
  border-right: 1px solid var(--line);
}

.resume-viewer__close {
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-strong);
  cursor: pointer;
  place-items: center;
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.resume-viewer__close:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: rotate(6deg);
}

.resume-viewer__copy {
  display: grid;
  gap: 14px;
}

.resume-viewer__eyebrow {
  margin: 0;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.resume-viewer__copy h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.05em;
}

.resume-viewer__copy > p:last-of-type {
  margin: 0;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.6;
}

.resume-viewer__actions {
  display: grid;
  gap: 10px;
}

.resume-viewer__actions a {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-strong);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.resume-viewer__actions a:hover {
  color: var(--accent);
}

.resume-viewer__document {
  min-width: 0;
  min-height: 0;
  padding: 18px;
  overflow: hidden;
  background: var(--bg-raised);
}

.resume-viewer__document > a {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #d8d8d8;
  place-items: center;
}

.resume-viewer__document img {
  display: block;
  width: auto;
  max-width: 100%;
  height: min(842px, calc(100vh - 86px));
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
}

/* Project case studies */

.detail-shell {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: clamp(48px, 6vw, 96px);
  width: min(1280px, calc(100% - 80px));
  margin: 0 auto;
}

.detail-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100vh;
  min-height: 680px;
  padding: 56px 0 36px;
}

.detail-sidebar .wordmark {
  margin-bottom: 30px;
}

.back-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 180ms ease;
}

.back-link:hover {
  color: var(--accent);
}

.detail-position {
  margin: 28px 0 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.project-index {
  display: grid;
  gap: 4px;
  margin: 26px 0;
}

.project-index a {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  padding: 4px 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.035em;
  line-height: 1.35;
  text-transform: uppercase;
  transition: color 180ms ease, transform 180ms ease;
}

.project-index a > span {
  color: var(--faint);
}

.project-index a:hover,
.project-index a[aria-current="page"] {
  color: var(--ink-strong);
  transform: translateX(3px);
}

.project-index a[aria-current="page"] > span {
  color: var(--accent);
}

.project-index a b {
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-sidebar .identity-footer {
  gap: 16px;
}

.detail-sidebar .socials {
  gap: 14px;
}

.project-main {
  min-width: 0;
  padding: 68px 0 38px;
  border-left: 1px solid var(--line);
}

.project-main > article {
  padding-left: clamp(44px, 5vw, 80px);
}

.detail-hero {
  max-width: 930px;
  padding: 48px 0 68px;
}

.detail-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-hero h1 {
  max-width: 900px;
  margin: 0;
  color: var(--ink-strong);
  font-size: clamp(50px, 7vw, 94px);
  font-weight: 500;
  letter-spacing: -0.075em;
  line-height: 0.98;
}

.detail-lead {
  max-width: 760px;
  margin: 32px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.55;
}

.detail-actions,
.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.detail-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-width: 168px;
  padding: 12px 15px;
  border: 1px solid var(--line-strong);
  color: var(--ink-strong);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.detail-button:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.detail-cover {
  margin: 0;
  overflow: hidden;
  background: var(--bg-raised);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.detail-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}

.detail-facts > div {
  min-width: 0;
  padding: 0 18px;
  border-left: 1px solid var(--line);
}

.detail-facts > div:first-child {
  padding-left: 0;
  border-left: 0;
}

.detail-facts > div:last-child {
  padding-right: 0;
}

.detail-facts > div:last-child:nth-child(5) {
  grid-column: 1 / -1;
  margin-top: 26px;
  padding: 24px 0 0;
  border-top: 1px solid var(--line);
  border-left: 0;
}

.detail-facts dt {
  margin-bottom: 7px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-facts dd {
  margin: 0;
  color: var(--ink-strong);
  font-size: 13px;
  line-height: 1.5;
}

.detail-story,
.detail-media,
.detail-report {
  padding: 100px 0;
  border-bottom: 1px solid var(--line);
}

.detail-story > .section-label {
  margin-bottom: 54px;
}

.story-block {
  display: grid;
  grid-template-columns: minmax(130px, 0.32fr) minmax(0, 1fr);
  gap: clamp(30px, 5vw, 76px);
  padding: 40px 0;
  border-top: 1px solid var(--line);
}

.story-block:first-child {
  border-top-color: var(--line-strong);
}

.story-block h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.45;
}

.story-copy {
  max-width: 720px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.story-copy p {
  margin: 0 0 18px;
}

.story-copy p:last-child {
  margin-bottom: 0;
}

.story-copy ul {
  display: grid;
  gap: 10px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.story-copy li {
  position: relative;
  padding-left: 22px;
}

.story-copy li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.detail-section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.45fr);
  gap: 40px;
  align-items: end;
  margin-bottom: 44px;
}

.detail-section-heading .section-label {
  margin-bottom: 24px;
}

.detail-section-heading h2 {
  max-width: 700px;
  margin: 0;
  color: var(--ink-strong);
  font-size: clamp(32px, 4.2vw, 58px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.1;
}

.detail-section-heading > p {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.report-pages {
  display: block;
  margin-top: 10px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: var(--bg-raised);
  object-fit: cover;
}

.interactive-viewport {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #ffffff;
}

.interactive-frame {
  display: block;
  max-width: none;
  border: 0;
  background: #ffffff;
  transform-origin: top left;
}

.report-actions {
  margin: 0 0 22px;
}

.pdf-frame {
  min-height: 760px;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
}

.pdf-frame object {
  display: block;
  width: 100%;
  height: min(80vh, 940px);
  min-height: 740px;
  border: 0;
  background: #e9e9e9;
}

.pdf-fallback {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 740px;
  color: #21262d;
  text-align: center;
}

.pdf-fallback p {
  margin: 0 0 14px;
}

.pdf-fallback a {
  color: #087f77;
  font-weight: 600;
}

.project-pagination {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.project-pagination a {
  display: flex;
  min-height: 160px;
  padding: 30px;
  flex-direction: column;
  justify-content: space-between;
  border-left: 1px solid var(--line);
  transition: background-color 180ms ease;
}

.project-pagination a:first-child {
  border-left: 0;
  padding-left: 0;
}

.project-pagination a:hover {
  background: var(--accent-soft);
}

.project-pagination a span {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-pagination a strong {
  max-width: 330px;
  color: var(--ink-strong);
  font-size: clamp(19px, 2.2vw, 28px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.25;
}

.detail-footer {
  margin-top: 38px;
}

@media (max-width: 900px) {
  .ambient {
    background: radial-gradient(500px circle at 10% 0%, var(--cursor-glow-mobile), transparent 60%);
  }

  .page-shell {
    display: block;
    width: min(680px, calc(100% - 48px));
  }

  .identity {
    position: relative;
    display: block;
    height: auto;
    min-height: 0;
    padding: 44px 0 56px;
    border-bottom: 1px solid var(--line);
  }

  .identity h1 {
    font-size: clamp(44px, 12vw, 70px);
  }

  .intro {
    max-width: 560px;
  }

  .section-nav {
    display: none;
  }

  .identity-footer {
    margin-top: 40px;
  }

  .section--opening {
    min-height: auto;
    padding: 80px 0 104px;
  }

  .data-field {
    display: none;
  }

  .portrait__stage {
    height: 340px;
  }

  .portrait__disc {
    cursor: default;
    transform: translate(-50%, -50%);
  }

  .resume-viewer__shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .opening-line {
    font-size: clamp(34px, 7vw, 55px);
  }

  .section {
    padding: 88px 0;
  }

  .detail-shell {
    display: block;
    width: min(760px, calc(100% - 48px));
  }

  .detail-sidebar {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 28px;
    align-items: start;
    height: auto;
    min-height: 0;
    padding: 34px 0;
    border-bottom: 1px solid var(--line);
  }

  .detail-sidebar .wordmark {
    display: block;
    margin-bottom: 16px;
  }

  .detail-position,
  .project-index {
    display: none;
  }

  .detail-sidebar .identity-footer {
    align-items: flex-end;
    margin: 0;
  }

  .detail-sidebar .socials {
    display: none;
  }

  .project-main {
    padding: 0;
    border-left: 0;
  }

  .project-main > article {
    padding-left: 0;
  }

  .detail-hero {
    padding: 72px 0 60px;
  }

  .resume-callout {
    grid-template-columns: 1fr auto;
  }

  .contact-heading {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .contact-location {
    margin: 0;
  }

  .resume-callout__meta {
    grid-column: 1 / -1;
  }

  .detail-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 30px;
  }

  .detail-facts > div {
    padding: 0 18px;
  }

  .detail-facts > div:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }

  .detail-facts > div:last-child:nth-child(5) {
    margin-top: 0;
  }
}

@media (max-width: 600px) {
  .page-shell {
    width: min(100% - 34px, 680px);
  }

  .wordmark {
    margin-bottom: 36px;
  }

  .socials {
    flex-wrap: wrap;
    gap: 12px 18px;
  }

  .opening-note,
  .experience-item,
  .section-heading-row,
  .project,
  .note-grid {
    grid-template-columns: 1fr;
  }

  .opening-note {
    gap: 10px;
  }

  .portrait figcaption {
    display: grid;
    gap: 4px;
  }

  .experience-item {
    gap: 10px;
  }

  .section-heading-row {
    gap: 18px;
  }

  .project {
    gap: 22px;
  }

  .project-image,
  .project-image img {
    aspect-ratio: 3 / 2;
  }

  .more-work-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .note-grid {
    min-height: 0;
  }

  .note-grid > a {
    min-height: 240px;
    padding: 28px;
  }

  .note-image {
    aspect-ratio: 16 / 10;
  }

  .contact-directory {
    margin-top: 40px;
  }

  .contact-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 20px;
    padding: 18px 0;
  }

  .contact-row > span {
    grid-column: 1 / -1;
  }

  .contact-row:hover {
    padding-right: 8px;
    padding-left: 8px;
  }

  .experience-item--current::before {
    display: none;
  }

  .resume-callout {
    gap: 22px;
    margin-top: 32px;
    padding: 26px 20px 26px 24px;
  }

  .resume-callout strong {
    font-size: 23px;
  }

  footer {
    gap: 20px;
  }

  .detail-shell {
    width: min(100% - 34px, 760px);
  }

  .detail-sidebar {
    padding: 24px 0;
  }

  .detail-hero {
    padding: 60px 0 50px;
  }

  .detail-hero h1 {
    font-size: clamp(43px, 14.8vw, 64px);
  }

  .detail-lead {
    font-size: 17px;
  }

  .detail-cover {
    margin-right: -17px;
    margin-left: -17px;
  }

  .detail-facts {
    grid-template-columns: 1fr;
  }

  .detail-facts > div,
  .detail-facts > div:nth-child(odd) {
    padding: 0;
    border-left: 0;
  }

  .detail-story,
  .detail-media,
  .detail-report {
    padding: 74px 0;
  }

  .detail-story > .section-label {
    margin-bottom: 36px;
  }

  .story-block,
  .detail-section-heading {
    grid-template-columns: 1fr;
  }

  .story-block {
    gap: 16px;
    padding: 30px 0;
  }

  .story-copy {
    font-size: 15px;
  }

  .detail-section-heading {
    gap: 20px;
    margin-bottom: 32px;
  }

  .detail-section-heading h2 {
    font-size: clamp(34px, 10vw, 48px);
  }

  .pdf-frame {
    min-height: 540px;
    margin-right: -17px;
    margin-left: -17px;
    padding: 5px;
  }

  .pdf-frame object,
  .pdf-fallback {
    height: 540px;
    min-height: 540px;
  }

  .interactive-viewport {
    width: calc(100% + 34px);
    margin-left: -17px;
  }

  .project-pagination {
    grid-template-columns: 1fr;
  }

  .project-pagination a,
  .project-pagination a:first-child {
    min-height: 130px;
    padding: 25px 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .project-pagination a:first-child {
    border-top: 0;
  }
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: 180ms ease both page-out;
}

::view-transition-new(root) {
  animation: 320ms ease both page-in;
}

@keyframes page-out {
  to {
    opacity: 0;
    transform: translateY(-5px);
  }
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
}

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

  .data-field {
    cursor: default;
  }
}
