/* Theme overrides contain colors only; layout and interaction rules remain in styles.css. */
:root { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; --ink:#13271f; --muted:#526859; --mint:#236a43; --bg:#edf5ef; --glass:rgba(255,255,255,.48); --line:rgba(255,255,255,.85); }
.theme-toggle { position:fixed; z-index:10001; right:max(20px,env(safe-area-inset-right)); bottom:calc(78px + env(safe-area-inset-bottom)); display:grid; grid-template-rows:1fr 1fr; place-items:center; width:46px; height:90px; box-sizing:border-box; padding:4px; border:1px solid var(--line); border-radius:999px; background:var(--glass); color:var(--mint); box-shadow:inset 0 1px 0 rgba(255,255,255,.14),0 6px 24px rgba(0,0,0,.16); backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px); cursor:pointer; transition:transform .2s ease,background .2s ease; }
.theme-toggle__thumb { position:absolute; top:5px; left:5px; width:34px; height:34px; border-radius:50%; background:rgba(162,255,208,.16); border:1px solid rgba(162,255,208,.3); box-sizing:border-box; box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 2px 8px rgba(0,0,0,.12); transform:translateY(44px); transition:transform .28s cubic-bezier(.22,.7,.2,1),background .2s ease; }
.theme-toggle__icon { position:relative; display:grid; place-items:center; width:34px; height:40px; opacity:.55; transition:opacity .2s ease; }
:root[data-theme="dark"] .theme-toggle__moon,:root[data-theme="light"] .theme-toggle__sun { opacity:1; }
:root[data-theme="light"] .theme-toggle__thumb { transform:translateY(0); background:rgba(255,255,255,.75); border-color:rgba(35,106,67,.2); }
.theme-toggle svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.theme-toggle:active { transform:scale(.92); }
.theme-toggle:focus-visible { outline:2px solid var(--mint); outline-offset:4px; }
html[data-theme="light"] body { background:transparent; isolation:isolate; }
html[data-theme="light"] body::before { z-index:-1; background:radial-gradient(ellipse at 5% 38%,rgba(162,255,208,.48),transparent 42%),radial-gradient(ellipse at 93% 3%,rgba(176,223,206,.7),transparent 40%),linear-gradient(120deg,#f8fcf9,#e6efe9); will-change:transform; }
html[data-theme="light"] .grain { opacity:.02; }
html[data-theme="light"] .glass { background:linear-gradient(135deg,rgba(255,255,255,.68),rgba(255,255,255,.24)); border-color:rgba(255,255,255,.93); box-shadow:inset 0 1px 0 #fff,0 14px 40px rgba(25,73,45,.07); }
html[data-theme="light"] .site-header { background:linear-gradient(135deg,rgba(255,255,255,.78),rgba(244,255,248,.48)); box-shadow:0 14px 40px rgba(25,73,45,.07); }
html[data-theme="light"] .brand-logo { filter:drop-shadow(0 0 2px rgba(10,40,24,.55)); }
html[data-theme="light"] nav.open { background:transparent; border-color:transparent; }
html[data-theme="light"] nav a:hover,html[data-theme="light"] nav a.active { color:#155c35; }
html[data-theme="light"] .lede,html[data-theme="light"] .bio,html[data-theme="light"] .bio p,html[data-theme="light"] .film-details p,html[data-theme="light"] .film-details small,html[data-theme="light"] .resume-label { color:#40584a; }
html[data-theme="light"] .hero-name { background:transparent; }
html[data-theme="light"] .hero-visual::before { background:none; mix-blend-mode:normal; }
html[data-theme="light"] .hero-visual::after { z-index:1; background:linear-gradient(to top,rgba(248,252,249,.64) 0%,rgba(248,252,249,.22) 26%,transparent 58%); }
html[data-theme="light"] .hero-name p { color:#456c55; }
html[data-theme="light"] .screening,html[data-theme="light"] .film-details,html[data-theme="light"] .writing-list details { background:rgba(250,255,252,.64); border-color:rgba(35,90,58,.12); }
html[data-theme="light"] .film-card.placeholder .film-poster,html[data-theme="light"] .photo-card--missing .photo-frame,html[data-theme="light"] .work-accordion:not([open]),html[data-theme="light"] .work-carousel__slide,html[data-theme="light"] .work-tile__surface,html[data-theme="light"] .video-slot { background:linear-gradient(145deg,rgba(162,255,208,.28),rgba(246,255,249,.75) 56%,rgba(206,232,216,.65)); border-color:rgba(66,133,89,.22); box-shadow:inset 0 1px 0 #fff,0 12px 28px rgba(25,73,45,.08); }
html[data-theme="light"] .film-card.placeholder .film-poster::before,html[data-theme="light"] .work-carousel__slide::before,html[data-theme="light"] .work-tile__surface::before,html[data-theme="light"] .video-slot::before { background:radial-gradient(circle at 78% 18%,rgba(162,255,208,.32),transparent 40%); }
html[data-theme="light"] .film-card.placeholder .film-poster::after { background:linear-gradient(180deg,transparent,rgba(35,90,58,.08)); }
html[data-theme="light"] .tba-mark { color:#315b42; }
html[data-theme="light"] .resume-button,html[data-theme="light"] .resume-button:hover { background:linear-gradient(145deg,rgba(162,255,208,.34),rgba(255,255,255,.65) 68%,rgba(206,232,216,.5)); color:var(--ink); border-color:rgba(66,133,89,.25); box-shadow:0 18px 50px rgba(25,73,45,.08); }
html[data-theme="light"] .resume-button.touch-pressed .resume-label { color:#173d29; }
html[data-theme="light"] .resume-button.touch-pressed .resume-icon { background:#173d29; }
html[data-theme="light"] .resume-modal { background:rgba(29,57,42,.4); }
html[data-theme="light"] .resume-modal__panel,html[data-theme="light"] .resume-modal__viewport { background:#edf5ef; border-color:rgba(255,255,255,.85); }
html[data-theme="light"] .resume-zoom-controls button,html[data-theme="light"] .resume-file-actions a,html[data-theme="light"] .resume-modal__close { color:#173d29; background:rgba(246,255,249,.87); border-color:rgba(43,96,63,.2); box-shadow:0 6px 20px rgba(25,73,45,.12); }
html[data-theme="light"] .carousel-arrow:hover,html[data-theme="light"] .carousel-arrow:active,html[data-theme="light"] .carousel-arrow.touch-pressed { color:#0e3c24; }
html[data-theme="light"] .film-details summary:active::after,html[data-theme="light"] .photo-details summary:active::after,html[data-theme="light"] .film-details summary.touch-pressed::after,html[data-theme="light"] .photo-details summary.touch-pressed::after { color:#0e3c24; }
html[data-theme="light"] .site-footer { border-color:rgba(35,90,58,.18); }
html[data-theme="light"] .contact-link,html[data-theme="light"] .production-item,html[data-theme="light"] .photo-details dl,html[data-theme="light"] .film-details p { border-color:rgba(35,90,58,.14); }
html[data-theme="light"] .site-loading__spinner { border-color:rgba(35,106,67,.18); border-top-color:var(--mint); }
html[data-theme="light"] .theme-toggle { background:rgba(244,255,248,.8); border-color:rgba(35,90,58,.15); box-shadow:0 6px 24px rgba(25,73,45,.12); }
/* Media remains unaltered; dark scrims keep captions readable over every image/video. */
html[data-theme="light"] .gallery-card .index,html[data-theme="light"] .gallery-card .enter,html[data-theme="light"] .blog-cover time,html[data-theme="light"] .blog-actions { color:#a2ffd0; }
html[data-theme="light"] .gallery-card .enter { border-color:#a2ffd0; }
html[data-theme="light"] .gallery-card--blog { background:linear-gradient(145deg,#7d173d,#d36b36 52%,#f1b35a); }
html[data-theme="light"] .gallery-card--photo { background:linear-gradient(145deg,#152c78,#2477b8 52%,#8fd3d0); }
html[data-theme="light"] .gallery-card--production { background:linear-gradient(145deg,#194d3d,#2d8663 52%,#b8c75c); }
html[data-theme="light"] .gallery-card { border-color:rgba(255,255,255,.18); box-shadow:0 24px 80px rgba(0,0,0,.24); }
html[data-theme="light"] .blog-cover h2 { color:#f3f5f2; }
html[data-theme="light"] .blog-actions button,html[data-theme="light"] .blog-actions a,html[data-theme="light"] .blog-status { color:#a2ffd0; }
html[data-theme="light"] .blog-status { background:rgba(9,13,12,.94); }
html[data-theme="light"] .work-video-modal__start,html[data-theme="light"] .work-video-modal__close { color:#f3f5f2; border-color:rgba(255,255,255,.35); }
html[data-theme="light"] .work-video-play:hover span { color:#a2ffd0; }
html[data-theme="light"] .work-tile__surface:not(:has(video)) .work-tile__title { color:#173d29; background:linear-gradient(transparent,rgba(246,255,249,.85)); text-shadow:none; }
html[data-theme="light"] .writing-list .blog-card details { background:transparent; }
html[data-theme="light"] .writing-body { color:#40584a; border-color:rgba(35,90,58,.14); }
html[data-theme="light"] .blog-cover::after { color:#a2ffd0; }
html[data-theme="light"] .film-card,html[data-theme="light"] .film-poster,html[data-theme="light"] .portrait-panel { background:rgba(243,251,246,.65); border-color:rgba(66,133,89,.16); }
html[data-theme="light"] .photo-frame,html[data-theme="light"] .archive-master { background:linear-gradient(135deg,rgba(255,255,255,.65),rgba(162,255,208,.12)); border-color:rgba(66,133,89,.16); }
html[data-theme="light"] .portrait-panel::before { background:radial-gradient(ellipse at 45% 35%,rgba(162,255,208,.25),transparent 72%); }
html[data-theme="light"] .portrait-panel::after { background:linear-gradient(to top,rgba(235,248,239,.36),transparent 55%); }
html[data-theme="light"] .resume-zoom-controls button:active,html[data-theme="light"] .resume-zoom-controls button.touch-pressed,html[data-theme="light"] .work-accordion summary:active::after,html[data-theme="light"] .work-accordion summary.touch-pressed::after { color:#0e3c24; }
.film-card { background:var(--glass); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px); contain:layout style; }
.film-details { background:transparent; backdrop-filter:none; -webkit-backdrop-filter:none; }
.film-details[open] { transform:none; }
.film-card:has(.film-details[open]) .film-poster { min-height:0; }
html[data-theme="light"] .film-card { background:linear-gradient(135deg,rgba(255,255,255,.58),rgba(255,255,255,.24)); }
html[data-theme="light"] .film-details { background:transparent; }
/* Opaque artwork does not benefit from nested backdrop blur. */
.film-poster, .hero-visual, .gallery-card { backdrop-filter:none; -webkit-backdrop-filter:none; }
@media(max-width:860px){
  .glass { backdrop-filter:blur(14px) saturate(110%); -webkit-backdrop-filter:blur(14px) saturate(110%); }
  .film-poster, .hero-visual, .gallery-card { backdrop-filter:none; -webkit-backdrop-filter:none; }
  .film-card { backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px); }
  .film-details { backdrop-filter:none; -webkit-backdrop-filter:none; }
  html[data-theme="light"] .grain { opacity:.012; }
}
@media(prefers-reduced-motion:reduce){.theme-toggle,.theme-toggle__thumb,.theme-toggle__icon{transition:none}}
@media(max-width:560px){
  html[data-theme="light"] .hero-visual::after { background:linear-gradient(to top,rgba(248,252,249,.78) 0%,rgba(248,252,249,.35) 28%,rgba(248,252,249,.08) 44%,transparent 64%); }
}
