/* STUDIO MIA — an image-first portfolio. */
:root {
  --paper: #fff;
  --ink: #181818;
  --muted: #767676;
  --line: #dedede;
  --nav-height: 108px;
  --pad: clamp(24px, 5vw, 88px);
  --sans: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --jp: "Zen Kaku Gothic New", sans-serif;
  --ease: cubic-bezier(.22,1,.36,1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; overscroll-behavior-y: none; }
body { margin: 0; padding-bottom: var(--nav-height); background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
body.dialog-open { overflow: hidden; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { font-weight: 400; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; cursor: pointer; }
img, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
::selection { background: #ddd; color: #111; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid currentColor; outline-offset: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 40; padding: 14px 20px; background: #fff; color: #000; transform: translateY(-150%); }
.skip-link:focus { transform: none; }
/* A quiet navigation bar lets the work own the first screen. */
.site-header { position: fixed; z-index: 20; bottom: 0; left: 0; right: 0; height: var(--nav-height); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 34px; padding: 20px 38px; background: #fff; border-top: 1px solid #ededed; }
.wordmark { justify-self: start; display: inline-flex; flex-direction: column; gap: 10px; min-height: 44px; justify-content: center; }
.wordmark img { width: 166px; height: auto; }
.wordmark > span { font-size: 9px; letter-spacing: .035em; color: var(--muted); }
.site-nav { display: flex; align-items: center; gap: 37px; font-size: 12px; }
.site-nav a { position: relative; padding: 14px 0; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 7px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.site-nav a:hover::after, .site-nav a[aria-current]::after { transform: scaleX(1); }
.nav-count { font-size: 8px; margin-left: 5px; vertical-align: super; color: var(--muted); }
.header-social { justify-self: end; display: flex; align-items: center; gap: 27px; min-height: 44px; font-size: 11px; }
.header-social span { font-size: 20px; }
/* Three original covers, edge to edge. */
.projects { position: relative; display: grid; grid-template-columns: 3fr 2fr; grid-template-rows: repeat(2,minmax(0,1fr)); height: calc(100svh - var(--nav-height)); min-height: 560px; gap: 2px; overflow: hidden; background: #fff; }
.project { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #333; }
.project-featured { grid-row: 1 / 3; }
.project-link { position: relative; display: block; height: 100%; color: #fff; isolation: isolate; }
.project-link:focus-visible { outline: 3px solid #fff; outline-offset: -8px; }
.project-top, .project-copy, .project-action { display: none; }
.project-media, .project-media img, .project-media canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.project-media { z-index: -2; overflow: hidden; }
.project-media img { object-fit: cover; }
.project-featured .project-media img { object-position: 62% center; }
.project-media canvas { opacity: 0; transition: opacity .35s; pointer-events: none; }
.project-media.is-webgl-ready canvas { opacity: 1; }
.project-link::after { content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none; background: transparent; }
.project-top { position: absolute; top: 27px; left: 30px; right: 30px; display: flex; justify-content: space-between; gap: 20px; font-size: 10px; letter-spacing: .025em; line-height: 1.5; text-shadow: 0 1px 3px #0006; }
.project-divider { padding: 0 7px; opacity: .6; }
.project-copy { position: absolute; left: 30px; right: 32px; bottom: 71px; }
.project-copy > p { font-size: 10px; letter-spacing: .025em; margin-bottom: 12px; }
.project-copy h2 { font-size: clamp(28px, 2.7vw, 44px); letter-spacing: -.045em; line-height: 1.12; text-wrap: balance; text-shadow: 0 1px 4px #0006; }
.project-featured .project-copy { left: 42px; right: 42px; bottom: 89px; }
.project-featured .project-top { left: 42px; right: 42px; }
.project-featured h2 { font-size: clamp(48px, 5.7vw, 100px); line-height: 1.01; letter-spacing: -.055em; }
.project-description { display: block; font-family: var(--jp); font-size: 11px; letter-spacing: .045em; margin-top: 14px; }
.project-action { position: absolute; left: 30px; right: 30px; bottom: 23px; display: flex; justify-content: space-between; align-items: center; font-size: 10px; letter-spacing: .025em; text-shadow: 0 1px 3px #0006; }
.project-action > span { font-size: 24px; transition: transform .5s var(--ease); }
.project-featured .project-action { left: 42px; right: 42px; bottom: 32px; }
.project-play { position: absolute; left: 50%; top: 44%; display: grid; place-items: center; width: 62px; height: 62px; border: 1px solid #ffffff94; border-radius: 50%; transform: translate(-50%,-50%); opacity: 0; transition: opacity .35s, transform .5s var(--ease); }
.project-play svg { width: 21px; height: 21px; }
.project-featured .project-play { width: 86px; height: 86px; }
.project-featured .project-play svg { width: 27px; height: 27px; }
.project-link:hover .project-play, .project-link:focus-visible .project-play { opacity: 1; transform: translate(-50%,-50%) scale(1.06); }
.project-link:hover .project-action > span { transform: translate(3px,-3px); }
/* Profile and contact remain useful, without competing with the covers. */
.content-section { padding: 100px var(--pad); }
.section-label { display: flex; justify-content: space-between; gap: 20px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 10px; letter-spacing: .035em; color: var(--muted); }
.about-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 12%; margin-top: 65px; }
.about-title { font-family: var(--jp); font-size: clamp(29px,3.15vw,48px); font-weight: 500; line-height: 1.6; letter-spacing: -.015em; }
.about-line { position: relative; display: block; white-space: nowrap; }
.about-char { position: relative; display: inline-block; min-width: .42em; opacity: 0; transform: translateY(.5em) skewY(6deg); filter: blur(7px); animation: char-reveal .42s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: var(--delay); }
.about-char.is-resolved { opacity: 1; transform: none; filter: none; }
.about-char.is-glitching { text-shadow: 1px 0 rgba(255, 111, 111, .75), -1px 0 rgba(83, 167, 255, .8); }
.about-copy > p { font-family: var(--jp); font-size: 13px; line-height: 2.15; }
.about-copy > p + p { margin-top: 22px; }
.about-facts { margin-top: 40px; font-size: 11px; }
.about-facts > div { display: grid; grid-template-columns: 95px 1fr; gap: 20px; padding-block: 13px; border-top: 1px solid var(--line); }
.about-facts dt { color: var(--muted); }
.about-facts a:hover { text-decoration: underline; text-underline-offset: 5px; }
.secondary-work { margin-top: 28px; display: flex; justify-content: space-between; gap: 20px; font-size: 11px; padding-block: 14px; border-bottom: 1px solid var(--line); }
.secondary-work > span:first-child { color: var(--muted); }
.secondary-work > span:last-child > span { margin-left: 15px; }
.production-notes { margin: 52px 0 0 auto; width: 42%; font-size: 11px; color: var(--muted); }
.production-notes summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
summary::-webkit-details-marker { display: none; }
.production-notes summary span { font-size: 17px; }
.production-notes[open] summary span { transform: rotate(45deg); }
.production-notes > div { font-family: var(--jp); line-height: 2; }
.production-notes p + p { margin-top: 12px; }
.contact { padding-top: 25px; }
.contact-layout { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 12%; margin-top: 50px; }
.contact h2 { font-size: clamp(65px,8.2vw,130px); letter-spacing: -.07em; line-height: 1.1; }
.contact h2 a { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.contact h2 span { font-size: .65em; transition: transform .4s var(--ease); }
.contact h2 a:hover span { transform: translate(5px,-5px); }
.contact-layout > div > p { font-family: var(--jp); font-size: 12px; line-height: 1.9; }
.contact-account { display: inline-block; font-size: 15px; padding: 15px 0; }
.contact-layout > div > p.response-note { color: var(--muted); font-size: 10px; }
.site-footer { display: flex; justify-content: space-between; gap: 20px; margin-inline: var(--pad); padding: 25px 0 35px; border-top: 1px solid var(--line); font-size: 9px; color: var(--muted); }
/* Film player — native controls and keyboard-friendly modal. */
.film-dialog { width: min(1200px,calc(100% - 48px)); max-height: calc(100dvh - 40px); padding: 24px; border: 1px solid var(--line); background: #fff; color: var(--ink); overflow-y: auto; }
.film-dialog::backdrop { background: #fff; }
.image-dialog::backdrop { background: #fff; }
.dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 25px; margin-bottom: 22px; }
.dialog-label { color: var(--muted); font-size: 9px; letter-spacing: .1em; margin-bottom: 8px; }
.dialog-header h2 { font-size: 18px; letter-spacing: -.015em; }
.dialog-close { display: inline-flex; align-items: center; justify-content: center; gap: 18px; padding: 0 5px 0 10px; min-height: 44px; border: 0; background: transparent; font-size: 11px; }
.dialog-close > span:last-child { font-size: 28px; }
.film-dialog video { width: 100%; max-height: calc(100dvh - 200px); background: #f2f2f2; }
.film-meta { display: flex; justify-content: space-between; gap: 25px; margin-top: 17px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.film-meta > a { white-space: nowrap; }
.film-error { font-family: var(--jp); font-size: 12px; margin-top: 18px; }
/* Work 02 — a separate collection of frames from Work 01. */
.stills-main { padding-top: 54px; }
.stills-heading { padding: 0 var(--pad) 57px; }
.back-link { display: inline-flex; gap: 16px; align-items: center; min-height: 44px; font-size: 11px; }
.stills-heading .section-label { margin-top: 35px; }
.stills-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 35px; margin-top: 37px; }
.stills-intro h1 { font-size: clamp(42px,6.4vw,100px); letter-spacing: -.06em; line-height: 1.05; }
.stills-intro p { font-family: var(--jp); font-size: 12px; line-height: 1.9; }
.stills-intro a { display: inline-block; font-family: var(--sans); font-size: 11px; margin-top: 16px; border-bottom: 1px solid currentColor; padding-bottom: 4px; }
.stills-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 32px 16px; padding: 0 16px 50px; }
.still { min-width: 0; }
.still-wide { grid-column: 1 / -1; }
.still > a { position: relative; display: block; overflow: hidden; background: #eee; }
.still img { width: 100%; height: auto; transition: transform 1s var(--ease); }
.still a:hover img { transform: scale(1.015); }
.still a::after { content: "↗"; position: absolute; right: 20px; bottom: 20px; color: #fff; font-size: 22px; text-shadow: 0 1px 6px #0008; }
.still figcaption { display: flex; justify-content: space-between; gap: 20px; margin-top: 12px; font-size: 10px; color: var(--muted); }
.stills-end { display: flex; justify-content: space-between; gap: 25px; padding: 40px var(--pad) 65px; font-size: 12px; }
.image-dialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 28px; border: 0; background: #fff; color: var(--ink); overflow: hidden; }
.image-dialog[open] { display: grid; grid-template-rows: auto minmax(0,1fr) auto; }
.image-dialog .dialog-header { margin-bottom: 14px; }
.image-dialog .dialog-header h2 { font-size: 13px; }
.lightbox-image { align-self: center; justify-self: center; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox-controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 25px; margin-top: 14px; font-size: 11px; }
.lightbox-controls button { display: inline-flex; gap: 20px; align-items: center; min-height: 44px; border: 0; background: transparent; padding: 0 5px; }
.lightbox-controls button:last-child { justify-self: end; }
.lightbox-caption { text-align: center; color: var(--muted); font-family: var(--jp); font-size: 11px; }
@keyframes char-reveal {
  0% { opacity: 0; transform: translateY(.55em) skewY(6deg); filter: blur(7px); }
  20% { opacity: 1; }
  100% { opacity: 1; transform: none; filter: none; }
}
@media (max-width: 1050px) {
  .site-header { padding-inline: 26px; gap: 25px; }
  .wordmark img { width: 145px; }
  .site-nav { gap: 27px; }
  .projects { grid-template-columns: 58fr 42fr; }
  .project-featured .project-top, .project-top { left: 24px; right: 24px; }
  .project-featured .project-copy { left: 24px; right: 24px; }
  .project-copy { left: 24px; right: 24px; bottom: 65px; }
  .project-top { font-size: 9px; }
  .project-featured .project-action, .project-action { left: 24px; right: 24px; }
  .project-copy h2 { font-size: 27px; }
  .project-featured h2 { font-size: 5.6vw; }
  .project-description { font-size: 10px; }
  .project-play { width: 44px; height: 44px; top: 37%; }
  .project-featured .project-play { width: 68px; height: 68px; top: 44%; }
  .about-layout, .contact-layout { gap: 7%; grid-template-columns: 1fr 1fr; }
  .production-notes { width: 46.5%; }
}
@media (max-width: 700px) {
  :root { --nav-height: 88px; --pad: 24px; }
  html { scroll-padding-top: 15px; }
  .site-header { padding: 15px 21px; grid-template-columns: 1fr auto; gap: 20px; }
  .wordmark { gap: 7px; }
  .wordmark img { width: 111px; }
  .wordmark > span { font-size: 7px; max-width: 125px; line-height: 1.5; }
  .site-nav { font-size: 10px; gap: 20px; }
  .nav-count { font-size: 7px; margin-left: 3px; }
  .header-social { display: none; }
  .projects { height: auto; min-height: 0; grid-template-columns: 1fr; grid-template-rows: none; gap: 2px; }
  .project { height: auto; aspect-ratio: 16 / 9; min-height: 0; }
  .project-featured { grid-row: auto; height: auto; min-height: 0; }
  .project-top, .project-featured .project-top { top: 14px; left: 16px; right: 16px; font-size: 8px; }
  .project-top, .project-copy > p, .project-description { display: none; }
  .project-copy { bottom: 39px; left: 16px; right: 16px; }
  .project-featured .project-copy { bottom: 43px; left: 16px; right: 16px; }
  .project-copy h2 { font-size: 25px; }
  .project-featured h2 { font-size: clamp(30px,9vw,48px); }
  .project-copy > p { font-size: 9px; }
  .project-description { font-size: 11px; }
  .project-featured .project-action, .project-action { left: 16px; right: 16px; bottom: 13px; font-size: 8px; }
  .project-play { opacity: 1; width: 38px; height: 38px; top: 50%; }
  .project-featured .project-play { width: 48px; height: 48px; top: 50%; }
  .content-section { padding: 65px var(--pad); }
  .section-label { font-size: 9px; gap: 15px; line-height: 1.6; }
  .about-layout, .contact-layout { grid-template-columns: 1fr; gap: 32px; margin-top: 35px; }
  .about-layout h2 { font-size: 31px; }
  .about-copy > p { font-size: 12px; }
  .about-facts { font-size: 10px; }
  .about-facts > div { grid-template-columns: 70px 1fr; gap: 15px; }
  .secondary-work { font-size: 10px; }
  .production-notes { width: 100%; margin-top: 30px; font-size: 10px; }
  .contact { padding-top: 0; }
  .contact h2 { font-size: 70px; }
  .contact-layout > div > p { font-size: 11px; }
  .contact-account { font-size: 14px; }
  .site-footer { flex-wrap: wrap; font-size: 8px; padding-block: 25px; gap: 18px; }
  .site-footer > span:nth-child(2) { order: 3; flex-basis: 100%; }
  .site-footer > a { margin-left: auto; }
  .film-dialog { padding: 16px; width: calc(100% - 20px); max-height: calc(100dvh - 24px); }
  .dialog-header { gap: 15px; margin-bottom: 17px; }
  .dialog-header h2 { font-size: 14px; line-height: 1.4; }
  .dialog-close { gap: 10px; font-size: 10px; }
  .film-meta { display: block; font-size: 9px; }
  .film-meta > a { display: inline-block; padding-top: 12px; }
  .film-dialog video { max-height: calc(100dvh - 220px); }
  .stills-main { padding-top: 22px; }
  .stills-heading { padding-bottom: 35px; }
  .stills-heading .section-label { margin-top: 22px; }
  .stills-intro { display: block; margin-top: 28px; }
  .stills-intro h1 { font-size: 12vw; }
  .stills-intro p { font-size: 11px; margin-top: 25px; }
  .stills-intro a { font-size: 10px; margin-top: 12px; }
  .stills-grid { grid-template-columns: 1fr; gap: 25px; padding: 0 10px 25px; }
  .still-wide { grid-column: auto; }
  .still figcaption { margin: 10px 5px 0; font-size: 9px; }
  .stills-end { padding: 25px var(--pad) 40px; font-size: 11px; }
  .image-dialog { padding: 15px; }
  .lightbox-controls { gap: 10px; font-size: 10px; }
  .lightbox-caption { font-size: 9px; }
  .lightbox-controls button { gap: 7px; }
}
@media (max-width: 359px) {
  .site-header { padding-inline: 17px; gap: 12px; }
  .wordmark img { width: 92px; }
  .wordmark > span { font-size: 6px; max-width: 98px; }
  .site-nav { gap: 14px; font-size: 9px; }
  .project-copy h2 { font-size: 29px; }
  .project-featured h2 { font-size: 42px; }
  .project-featured { min-height: 450px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
