:root {
  color-scheme: light;
  --navy: #152d46;
  --deep: #10263c;
  --ochre: #9a5c13;
  --gold: #f3be31;
  --paper: #fbfaf5;
  --sand: #f1ece3;
  --ink-muted: #425360;
  --line: #d9d2c6;
  --shell: min(1120px, calc(100% - 96px));
  --display: Georgia, "Times New Roman", serif;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--navy);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img, video { display: block; max-inline-size: 100%; }
figure, p, h1, h2, h3, h4 { margin: 0; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 3px solid #2878be; outline-offset: 4px; }
section[id] { scroll-margin-top: 1.5rem; }
.shell { inline-size: var(--shell); margin-inline: auto; }
.skip { position: absolute; inset: .5rem auto auto .5rem; z-index: 2; padding: .75rem 1rem; background: white; transform: translateY(-160%); }
.skip:focus { transform: none; }

.topbar { padding-top: 1rem; background: var(--paper); }
.topbar-inner, .footer-inner { display: flex; justify-content: space-between; align-items: center; min-height: 60px; gap: 1rem; }
.topbar-inner { padding-inline: 1.15rem 1.5rem; border-radius: 999px; background: var(--navy); color: var(--paper); }
.brand { display: inline-flex; gap: .55rem; align-items: center; font-weight: 800; font-size: 1.2rem; letter-spacing: -.045em; text-decoration: none; }
nav { display: flex; align-items: center; gap: clamp(.85rem, 4vw, 2.4rem); }
nav a, .footer-inner > a:last-child { display: inline-flex; align-items: center; min-height: 44px; font-size: .94rem; text-decoration: none; }
nav a:hover, .footer-inner > a:last-child:hover { text-decoration: underline; text-underline-offset: .35em; }

.cover { background: var(--paper); }
.hero { position: relative; isolation: isolate; container-type: inline-size; height: clamp(410px, 50vw, 620px); }
.hero-year { position: absolute; left: 0; top: 19%; z-index: 2; font-size: clamp(.9rem, 1.35vw, 1.12rem); }
.hero-title { position: absolute; inset: 47% 0 auto; transform: translateY(-50%); display: flex; justify-content: center; align-items: center; gap: .045em; font: 900 18.3cqi/.92 Impact, "Arial Narrow", sans-serif; letter-spacing: .024em; white-space: nowrap; }
.hero-title span:first-child { color: #345e90; }
.hero-title span:last-child { color: #bc8311; }
.hero-portrait { position: absolute; z-index: 1; bottom: 0; left: 50%; transform: translateX(-50%); display: block; width: auto; height: 87%; max-width: 65%; object-fit: contain; object-position: center bottom; filter: drop-shadow(.3rem 0 .55rem #172b3938); }
.hero-summary { position: absolute; right: 0; bottom: 8%; z-index: 2; text-align: right; max-width: 30%; font-size: clamp(.875rem, 1.35vw, 1.03rem); line-height: 1.48; }
.hero-roles span { display: block; }
.hero-name { margin-bottom: .4rem; font-weight: 750; font-size: 1.17em; }
.portfolio-fields { position: relative; z-index: 2; display: flex; justify-content: space-around; align-items: center; gap: .55rem; min-height: 57px; width: 100%; margin: 0; padding: .6rem max(1rem, calc((100% - 1120px) / 2)); list-style: none; background: var(--gold); box-shadow: inset 0 -4px #345e90; font-size: .96rem; font-weight: 670; }
.portfolio-fields li { display: flex; text-align: center; justify-content: center; align-items: center; gap: clamp(.45rem, 2vw, 1.6rem); }
.portfolio-fields li:not(:first-child)::before { content: "✳" / ""; color: #294f7b; font-size: 1.2em; }
.profile { border-block: 1px solid var(--line); background: var(--sand); }
.profile-inner {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  grid-template-areas: "title copy" "portrait copy";
  column-gap: clamp(1.5rem, 7vw, 6rem);
  row-gap: clamp(1rem, 2.4vw, 1.8rem);
  align-items: start;
  padding-block: clamp(3rem, 6vw, 5rem);
}
.profile h2 { grid-area: title; }
.profile-portrait {
  grid-area: portrait;
  width: min(100%, 21rem);
  padding: .5rem;
  border: 1px solid #c9bca5;
  border-bottom: 4px solid var(--gold);
  background: var(--paper);
}
.profile-portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 4.35;
  object-fit: cover;
  object-position: center 94%;
}
.profile h2, .skills h2, .section-heading h2 { font: 400 clamp(2.3rem, 5.2vw, 4.35rem)/1 var(--display); letter-spacing: -.055em; }
.profile-copy { grid-area: copy; align-self: center; display: grid; gap: 1rem; max-width: 65ch; }
.profile p, .section-heading p { color: var(--ink-muted); font-size: 1.05rem; line-height: 1.65; }
.experience { padding-block: clamp(3.35rem, 7vw, 6.35rem); }
.experience-list { border-top: 1px solid var(--line); }
.experience-entry { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(1rem, 5vw, 4rem); padding-block: 1.5rem; border-bottom: 1px solid var(--line); }
.experience-entry h3 { margin-top: .35rem; font: 700 clamp(1.28rem, 2.65vw, 1.85rem)/1.18 var(--display); letter-spacing: -.025em; }
.experience-date { color: var(--ochre); font-size: .875rem; font-weight: 700; }
.experience-role, .experience-detail p, .skill-list dd { color: var(--ink-muted); line-height: 1.6; }
.experience-role { margin-top: .35rem; }
.experience-detail p { max-width: 60ch; }
.experience-links { display: flex; flex-wrap: wrap; gap: .25rem 1.15rem; margin-top: .55rem; }
.experience-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; text-underline-offset: .23em; }
.skills { padding-block: clamp(2.8rem, 5vw, 4.25rem); background: var(--sand); border-block: 1px solid var(--line); }
.skill-list { display: grid; grid-template-columns: 1.1fr 1.2fr .7fr; gap: 1.5rem; margin: 1.4rem 0 0; }
.skill-list dt { margin-bottom: .25rem; font-weight: 700; }
.skill-list dd { margin: 0; max-width: 38ch; }
.work, .videos { padding-block: clamp(3.35rem, 7vw, 6.35rem); }
.section-heading { margin-bottom: clamp(1.5rem, 3.5vw, 2.65rem); }
.section-heading p { margin-top: .65rem; }
.work-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2.6rem 1.5rem; }
.work-grid article { grid-column: span 2; min-width: 0; }
.work-grid .production { grid-column: span 3; }
.media-button { position: relative; overflow: hidden; display: block; cursor: zoom-in; width: 100%; padding: 0; border: 0; background: var(--sand); border-radius: 2px; }
.media-button img { width: 100%; height: auto; aspect-ratio: 4 / 4.35; object-fit: cover; object-position: top;  }
.production img { aspect-ratio: 16 / 9; object-position: center 63%; }
.zoom { position: absolute; bottom: .65rem; right: .65rem; display: grid; place-items: center; min-width: 2.5rem; min-height: 2.5rem; font-size: 1.35rem; border-radius: 50%; background: var(--paper); color: var(--navy); }
.card-caption { padding-top: .85rem; }
.card-caption .format { margin: 0 0 .25rem; color: var(--ochre); font-size: .875rem; font-weight: 650; }
.card-caption h3, .card-caption h4 { font: 700 1.48rem/1.21 var(--display); letter-spacing: -.025em; }
.card-caption p, .video-grid p { margin-top: .42rem; color: var(--ink-muted); font-size: 1rem; line-height: 1.55; }

.videos { color: #f8f4ed; background: var(--deep); }
.videos .section-heading p, .video-grid p { color: #c8d2d8; }
.video-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.35rem; }
.video-grid video { width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #080f16; border-radius: 2px; }
.video-grid article { min-width: 0; }
.video-grid h3 { margin-top: .7rem; font-size: 1.02rem; line-height: 1.35; }
.video-grid p { font-size: .94rem; }
.footer { color: #f8f4ed; background: var(--deep); border-top: 1px solid #3c4b56; }
.footer-inner { min-height: 94px; }
.footer-inner > span { color: #c8d2d8; font-size: .875rem; }


dialog { width: fit-content; max-width: min(94vw, 900px); max-height: 94dvh; margin: auto; padding: 0; overflow: auto; border: none; border-radius: 3px; background: var(--paper); color: var(--navy); }
dialog::backdrop { background: #081421db; }
dialog img { width: auto; margin-inline: auto; max-width: 100%; max-height: calc(94dvh - 60px); object-fit: contain; }
.viewer-top { display: flex; gap: 1rem; justify-content: space-between; align-items: center; padding: .45rem .75rem .45rem 1rem; }
.viewer-top h2 { font-size: 1rem; }
.viewer-top button { inline-size: 2.5rem; block-size: 2.5rem; border: 0; border-radius: 50%; color: var(--navy); background: var(--sand); cursor: pointer; font-size: 1.5rem; }

@media (max-width: 940px) {
  :root { --shell: calc(100% - 64px); }
  .hero { height: clamp(410px, 59vw, 550px); }
  .video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  :root { --shell: calc(100% - clamp(28px, 9vw, 48px)); }
  body { overflow-wrap: anywhere; }
  .topbar { padding-top: .65rem; }
  .topbar-inner { min-height: 52px; padding-inline: .8rem; gap: .45rem; }
  .brand { font-size: 1.05rem; }
  nav { gap: clamp(.4rem, 2.45vw, .95rem); }
  nav a { font-size: .875rem; }

  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    height: auto;
    padding-block: 1.4rem 1.25rem;
    row-gap: .5rem;
  }
  .hero-year {
    position: static;
    margin-block-end: .15rem;
    color: var(--ink-muted);
    font-size: .875rem;
  }
  .hero-title {
    position: static;
    transform: none;
    grid-area: 2 / 1;
    height: auto;
    padding: 0;
    font-size: 14.5cqi;
    line-height: 1;
    gap: .045em;
  }
  .hero::before {
    content: "";
    grid-area: 3 / 1;
    border-radius: 3px 3px 0 0;
    background: linear-gradient(180deg, #f7f2e8, #eae0cd);
  }
  .hero-portrait {
    position: relative;
    inset: auto;
    transform: none;
    grid-area: 3 / 1;
    align-self: end;
    justify-self: center;
    height: clamp(14rem, 62vw, 22rem);
    max-width: 75%;
    margin-top: .55rem;
  }
  .hero-summary {
    position: static;
    grid-row: 4;
    max-width: none;
    padding-top: .5rem;
    text-align: center;
  }
  .hero-name { margin-bottom: .23rem; font-size: 1.05rem; }
  .hero-roles { color: var(--ink-muted); line-height: 1.45; }

  .portfolio-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .4rem .65rem;
    min-height: 0;
    padding: .85rem max(1rem, calc((100% - 32rem) / 2)) 1.05rem;
    font-size: .875rem;
    line-height: 1.4;
  }
  .portfolio-fields li::before { display: none; }
  .portfolio-fields li:is(:first-child, :nth-child(2), :last-child) { grid-column: 1 / -1; }
  .portfolio-fields li:nth-child(2) { padding: .2rem .4rem; text-wrap: balance; }

  .profile-inner { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "copy" "portrait"; gap: 1.15rem; }
  .profile-portrait { margin-top: .25rem; }
  .experience-entry { grid-template-columns: minmax(0, 1fr); gap: .6rem; }
  .skill-list { grid-template-columns: minmax(0, 1fr); gap: .85rem; }
  .work-grid { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
  .work-grid article, .work-grid .production { grid-column: auto; }
  .media-button img { aspect-ratio: 5 / 4; }
  .production img { aspect-ratio: 16 / 9; }
  .video-grid { grid-template-columns: minmax(0, 1fr); gap: 1.15rem; }
  .video-grid article {
    display: grid;
    grid-template-columns: minmax(0, 41%) minmax(0, 1fr);
    gap: .95rem;
    align-items: center;
    padding-bottom: 1.15rem;
    border-bottom: 1px solid #3c4b56;
  }
  .video-grid article:last-child { padding-bottom: 0; border-bottom: 0; }
  .video-grid h3 { margin-top: 0; }
  .video-grid p { line-height: 1.45; }
  .footer-inner { flex-wrap: wrap; gap: .3rem .85rem; min-height: 76px; }
}
.design-project { margin-top: clamp(3rem, 6vw, 5rem); padding-top: clamp(2.2rem, 4vw, 3.5rem); border-top: 1px solid var(--line); }
.design-project .section-heading h3 { font: 400 clamp(1.9rem, 4vw, 3rem)/1.05 var(--display); letter-spacing: -.045em; }
.design-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2rem 1.5rem; }
.design-grid article { grid-column: span 2; min-width: 0; }
.design-grid .design-landscape { grid-column: span 3; }
.design-grid .media-button img { aspect-ratio: 1 / 1.1; object-fit: contain; object-position: center; }
.design-grid .design-landscape img { aspect-ratio: 16 / 9; }
@media (max-width: 650px) {
  .design-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem .8rem; }
  .design-grid article { grid-column: auto; }
  .design-grid article:first-child, .design-grid .design-landscape { grid-column: 1 / -1; }
  .design-grid .card-caption h4 { font-size: 1.2rem; }
}

.instagram-project { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); align-items: start; gap: clamp(1.5rem, 6vw, 5rem); }
.instagram-copy h3 { margin-block: .4rem .85rem; font: 400 clamp(1.9rem, 4vw, 3rem)/1.05 var(--display); letter-spacing: -.045em; }
.instagram-copy > p { max-width: 54ch; color: var(--ink-muted); line-height: 1.6; }
.instagram-copy > p + p { margin-top: .75rem; }
.instagram-copy .instagram-meta { color: var(--ochre); font-size: .875rem; font-weight: 650; }
.instagram-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: .55rem; font-weight: 650; text-underline-offset: .23em; }
.instagram-embed { display: block; width: 100%; height: 615px; border: 1px solid var(--line); border-radius: 2px; background: white; }
@media (max-width: 650px) {
  .instagram-project { grid-template-columns: minmax(0, 1fr); gap: .85rem; }
  .instagram-embed { max-width: 360px; height: clamp(455px, 158vw, 615px); margin-inline: auto; }
}

@media (prefers-reduced-motion: no-preference) {
  :root { --ease-out: cubic-bezier(.22, 1, .36, 1); }
  html { scroll-behavior: smooth; }

  .topbar-inner { animation: header-in .65s var(--ease-out) backwards; }
  .hero-title span { animation: title-in .9s var(--ease-out) .07s backwards; }
  .hero-title span:last-child {
    --title-offset: -26px;
    animation-delay: .16s;
  }
  .hero-portrait { animation: portrait-in .95s var(--ease-out) .15s backwards; }
  .hero-year, .hero-summary { animation: text-in .62s var(--ease-out) .35s backwards; }
  .hero-summary { animation-delay: .48s; }
  .portfolio-fields { animation: text-in .64s var(--ease-out) .52s backwards; }

  .motion-item {
    transition: opacity .66s var(--ease-out), translate .8s var(--ease-out);
    transition-delay: var(--reveal-delay, 0ms);
  }
  .motion-pending:not(:focus-within) { opacity: 0; translate: 0 22px; }
  .motion-item:focus-within { transition: none; }
  .profile-portrait.motion-pending:not(:focus-within) { translate: 0 32px; }
  :is(.work-grid, .design-grid, .video-grid, .skill-list) > .motion-item:nth-child(3n + 2) {
    --reveal-delay: 55ms;
  }
  :is(.work-grid, .design-grid, .video-grid, .skill-list) > .motion-item:nth-child(3n) {
    --reveal-delay: 110ms;
  }

  nav a {
    position: relative;
    text-decoration: none;
  }
  nav a::after {
    content: "";
    position: absolute;
    inset: auto 0 .52rem;
    height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .34s var(--ease-out);
  }
  nav a:hover { text-decoration: none; }
  nav a:is(:hover, :focus-visible)::after { transform: scaleX(1); }

  @media (hover: hover) {
    .media-button img { transition: transform .65s var(--ease-out); }
    .media-button .zoom {
      transition: rotate .46s var(--ease-out), background-color .28s ease, color .28s ease;
    }
    .media-button:hover img { transform: scale(1.045); }
    .media-button:hover .zoom { rotate: 90deg; background: var(--gold); }
  }

  @supports (animation-timeline: scroll()) {
    body::before {
      content: "";
      position: fixed;
      inset: 0 0 auto;
      z-index: 10;
      height: 3px;
      pointer-events: none;
      background: var(--gold);
      transform-origin: left;
      animation: page-progress linear both;
      animation-timeline: scroll(root block);
    }
  }

  @supports (transition-behavior: allow-discrete) {
    dialog {
      opacity: 0;
      scale: .97;
      translate: 0 9px;
      transition: opacity .24s ease, scale .36s var(--ease-out),
        translate .36s var(--ease-out), display .36s allow-discrete, overlay .36s allow-discrete;
    }
    dialog[open] { opacity: 1; scale: 1; translate: 0 0; }
    dialog::backdrop {
      background: #08142100;
      transition: background-color .3s ease, display .36s allow-discrete, overlay .36s allow-discrete;
    }
    dialog[open]::backdrop { background: #081421db; }

    @starting-style {
      dialog[open] { opacity: 0; scale: .97; translate: 0 9px; }
      dialog[open]::backdrop { background: #08142100; }
    }
  }
}

@media (max-width: 650px) and (prefers-reduced-motion: no-preference) {
  .motion-item { transition-duration: .42s, .55s; }
  .motion-pending:not(:focus-within) { translate: 0 12px; }
  .profile-portrait.motion-pending:not(:focus-within) { translate: 0 18px; }
  .hero-title span { animation-duration: .65s; }
  .hero-portrait { animation-duration: .68s; }
  .hero-year, .hero-summary, .portfolio-fields { animation-delay: .18s; }
}
@keyframes header-in {
  from { opacity: 0; translate: 0 -10px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes title-in {
  from { opacity: 0; clip-path: inset(0 0 100%); translate: var(--title-offset, 26px) 18px; }
  to { opacity: 1; clip-path: inset(0); translate: 0 0; }
}

@keyframes portrait-in {
  from { opacity: 0; translate: 0 35px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes text-in {
  from { opacity: 0; translate: 0 12px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes page-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
