/* Same tokens as portfolio.alohateresa.com (src/app/globals.css), so the two sites read as one brand.
   Layout: one column of sections; bios side by side, photos three across, work in a card grid. */
:root {
  --bg: #0a0a0d;
  --bg-raised: #14141b;
  --bg-sunk: #0f0f14;
  --line: #2a2a36;
  --text: #f3f1ee;
  --muted: #a6a2b0;
  --pink: #bc70a4;
  --blush: #eadedb;
  --blue: #7a9deb;
  --gradient: linear-gradient(140deg, var(--pink) 0%, var(--blush) 50%, var(--blue) 75%);
  --flow: linear-gradient(90deg, var(--pink), var(--blush) 25%, var(--blue) 50%, var(--blush) 75%, var(--pink));
  --sans: "Avenir Next", AvenirNext, Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: monospace, monospace;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 14px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
/* Anything marked hidden stays hidden, even when a class gives it a display (the bio texts, the viewer arrows). */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img, video, iframe { display: block; max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0; font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
/* Sections: dividers run the full width of the screen (Teresa: "it's okay for the dividers to be end to end"), with
   less empty space above each heading ("so much space between the divider and the text"). */
.section { position: relative; padding-block: clamp(28px, 3.5vw, 48px); }
.section::before {
  content: ""; position: absolute; top: 0; left: 50%; width: 100vw; transform: translateX(-50%);
  border-top: 1px solid var(--line);
}
/* The full-width dividers must never cause sideways scrolling (100vw includes a desktop scrollbar). */
html, body { overflow-x: clip; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 20; }
.skip:focus { left: 16px; background: var(--bg-raised); padding: 8px 12px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.lede { font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: var(--muted); max-width: 58ch; }
.hint { color: var(--muted); max-width: 42ch; font-size: 0.95rem; }
.gradient-text { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgb(10 10 13 / 0.88); /* older phones without color-mix() */
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(10px); /* Safari before 18 */
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; }
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; }
.top nav { display: flex; gap: clamp(12px, 3vw, 28px); }
.top nav a {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
}
.top nav a:hover { color: var(--text); }
.top-right { display: flex; align-items: center; gap: clamp(12px, 3vw, 28px); }

/* Copy mode: every copy and download control carries .copy-only and shows only while the switch is on. */
html:not([data-copy="on"]) .copy-only { display: none !important; }

/* The switch: red pill when copy buttons are off, green when on. Hover or focus shows what it does. */
.copy-toggle { position: relative; display: flex; align-items: center; }
.switch {
  --off: #e5484d;
  --on: #30a46c;
  position: relative; width: 44px; height: 24px; padding: 0; flex: none;
  border: 0; border-radius: 999px; background: var(--off); cursor: pointer;
  transition: background-color 0.2s;
}
.switch::before { content: ""; position: absolute; inset: -10px -4px; } /* a bigger tap area than it looks */
.switch-knob {
  position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 0.4); transition: transform 0.2s;
}
.switch[aria-checked="true"] { background: var(--on); }
.switch[aria-checked="true"] .switch-knob { transform: translateX(20px); }
@media (prefers-reduced-motion: reduce) { .switch, .switch-knob { transition: none; } }

.tip {
  position: absolute; top: calc(100% + 12px); right: 0; z-index: 30;
  width: max-content; max-width: min(280px, calc(100vw - 32px));
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-raised); color: var(--text); font-size: 0.85rem; line-height: 1.45;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.5);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
  pointer-events: none;
}
.copy-toggle:hover .tip, .switch:focus-visible + .tip, .copy-toggle.show-tip .tip {
  opacity: 1; visibility: visible; transform: none;
}

/* Hero */
/* Less empty space above and below the top section (Teresa, 2026-12-03: "mostly the top section"). */
.hero { padding-block: clamp(32px, 5vw, 64px) clamp(32px, 4vw, 48px); display: grid; gap: 20px; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px;
  font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase;
  text-decoration: none; border: 1px solid var(--line); background: transparent; color: var(--text);
  cursor: pointer; transition: border-color 0.2s, background-color 0.2s;
}
.button:hover { border-color: var(--muted); }
.button.primary {
  background: var(--flow) 0 50% / 200% 100%; color: #121218; border-color: transparent; font-weight: 600;
  animation: flow-x 5s linear infinite paused;
}
.button.primary:hover, .button.primary:focus-visible { animation-play-state: running; }
.button.small { padding: 8px 14px; font-size: 0.74rem; }
.button.done { background: var(--blush); color: #121218; border-color: transparent; animation: none; }
@keyframes flow-x { from { background-position-x: 0%; } to { background-position-x: -200%; } }
@media (prefers-reduced-motion: reduce) { .button.primary { animation: none; } }

/* Section heads */
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px 32px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head > div { display: grid; gap: 8px; }

/* Cards */
.card { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }

/* Bios */
.bios { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.bio { padding: clamp(20px, 3vw, 32px); display: grid; gap: 20px; justify-items: start; }
.bio-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; width: 100%; }
.count { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.bio-text { display: grid; gap: 14px; max-width: 68ch; }
.bio-text p { color: var(--blush); }

/* Photos */
/* Photos: four across on a laptop or wider (the headshot and STEM Conference, then EXCITE Camp, whose then-and-now
   pair is two cards wide), two across on tablets, one on phones. Community stays three across. */
.photo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.photo-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1000px) { .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .photo-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* The then-and-now pair spans two columns, beside the EXCITE talk photo. */
.photo.wide { grid-column: span 2; }
@media (max-width: 640px) { .photo.wide { grid-column: 1 / -1; } }
@media (max-width: 560px) { .photo-grid, .photo-grid.three { grid-template-columns: minmax(0, 1fr); } }
/* Community's three cards go straight from three across to one, so none sits alone. */
@media (max-width: 640px) { .photo-grid.three { grid-template-columns: minmax(0, 1fr); } }
/* minmax(0, 1fr) keeps the 1600px photos from widening the card past its column in Chrome. */
.photo { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; overflow: hidden; }
.photo-frame { position: relative; aspect-ratio: 4 / 5; background: var(--bg-sunk); border-bottom: 1px solid var(--line); }
.photo-frame img, .photo-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
/* The same padding on every side of the caption, so it never sits on the card's edge when the copy buttons are hidden. */
.photo figcaption { padding: 18px; display: grid; gap: 8px; align-content: start; font-size: 0.92rem; }
.photo .meta { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.photo .actions { padding: 0 18px 18px; }

/* Work */
.group { display: grid; gap: 20px; }
.group + .group { margin-top: clamp(40px, 6vw, 64px); }
.group-head { display: grid; gap: 4px; }
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
/* Installations: the eight lead projects two across, larger than the rest, in four even rows. */
.group-onsite .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .group-onsite .work-grid { grid-template-columns: minmax(0, 1fr); } }
/* The other sixteen: four across on a laptop or wider, so the rows come out even. */
.group-more .work-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.work { overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.clip { aspect-ratio: 16 / 9; background: var(--bg-sunk); border-bottom: 1px solid var(--line); }
.clip video { width: 100%; height: 100%; object-fit: cover; }
/* No footage: the title on the brand gradient, matching the portfolio's tile. */
.type-tile {
  width: 100%; height: 100%; display: grid; place-items: center; padding: 24px; text-align: center;
  background:
    radial-gradient(circle at 20% 20%, rgb(188 112 164 / 0.35), transparent 55%),
    radial-gradient(circle at 80% 80%, rgb(122 157 235 / 0.35), transparent 55%),
    var(--bg-raised);
  font-family: var(--mono); font-size: 1.1rem; letter-spacing: 0.04em; color: var(--text);
}
/* A column, so each card's buttons sit at its bottom and line up across a row. */
.work-body { padding: 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.work-body .actions { margin-top: auto; padding-top: 6px; }
.summary { color: var(--blush); font-size: 0.95rem; }
.role { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.credit { font-size: 0.8rem; color: var(--muted); }
.notes { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.note-pill {
  justify-self: start; font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.04em;
  padding: 4px 10px; border-radius: 999px; background: var(--gradient); color: #121218; font-weight: 600;
}
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font-size: 0.74rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }


.head-side { display: grid; gap: 12px; justify-items: start; max-width: 42ch; }

/* Case-study popup: a centered sheet on wide screens, the full screen on phones. */
html.locked { overflow: hidden; }
.case {
  width: min(980px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px);
  padding: 0; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); color: var(--text); overflow-y: auto; overscroll-behavior: contain;
}
.case::backdrop { background: rgb(5 5 8 / 0.82); }
.case-bar {
  position: sticky; top: 0; z-index: 2;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 12px 10px 20px;
  background: rgb(10 10 13 / 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.case-bar .eyebrow { overflow-wrap: anywhere; }
.case-media { position: relative; aspect-ratio: 16 / 9; background: #000; }
.case-media video, .case-media iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.case-play { position: absolute; left: 16px; bottom: 16px; }
.case-body { padding: clamp(20px, 4vw, 40px); display: grid; gap: 28px; }
.case-body section { display: grid; gap: 10px; }
.case-body h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
.case-body h3 { font-size: 1.05rem; }
.case-body ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; color: var(--blush); }
.case-body p { color: var(--blush); }
.case-intro { display: grid; gap: 12px; }
.case-intro .lede { color: var(--muted); }

.copy-box { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.copy-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.copy-block { display: grid; gap: 4px; font-size: 0.92rem; overflow-wrap: anywhere; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px 24px; margin: 0; }
.facts div { display: grid; gap: 2px; min-width: 0; }
.facts dt, .how dt {
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.facts dd, .how dd { margin: 0; color: var(--blush); }
.how { margin: 0; display: grid; gap: 6px 0; }
.how dd + dt { margin-top: 10px; }

.case-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.shot { margin: 0; display: grid; gap: 10px; align-content: start; min-width: 0; }
.shot img, .shot video { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-sunk); }
.shot figcaption { font-size: 0.85rem; color: var(--muted); }
.case-more { font-size: 0.92rem; }
.case-more a { color: var(--muted); }
.case-more a:hover { color: var(--text); }

@media (max-width: 600px) {
  .case {
    width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; inset: 0;
    border: 0; border-radius: 0;
  }
  .case-bar {
    padding-top: max(10px, env(safe-area-inset-top, 0px));
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
  }
  .case-body { padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px)); }
}

/* Video player */
.player {
  width: min(1000px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  padding: 0; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-raised); color: var(--text);
}
.player::backdrop { background: rgb(5 5 8 / 0.82); }
.player-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px 10px 18px; }
.player-title { font-weight: 600; overflow-wrap: anywhere; }
.player-frame { aspect-ratio: var(--aspect, 16 / 9); max-height: calc(100vh - 110px); margin-inline: auto; background: #000; }
.player-frame iframe { width: 100%; height: 100%; border: 0; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding-block: 40px calc(40px + env(safe-area-inset-bottom, 0px)); }
.foot-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; color: var(--muted); font-size: 0.92rem; }
.foot a:hover { color: var(--text); }

@media (max-width: 820px) {
  .bios { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) {
  .top nav { gap: 10px; }
  .mark span { display: none; }
}
/* Touch screens: every button and nav link at least 44px tall, the size fingers need. */
@media (pointer: coarse) {
  .button { min-height: 44px; }
  .button.small { padding: 10px 16px; }
  .top nav a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 4px; }
}

/* Zoomable photos and clips: the whole image is the button. */
.zoom { display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; cursor: zoom-in; }
.photo-frame .zoom { position: absolute; inset: 0; }
.zoom:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.shot .zoom { border-radius: 10px; }

/* Full-screen viewer: media centered, caption along the bottom, previous and next at the sides. */
.viewer {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: transparent; color: var(--text); overflow: hidden;
}
.viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.viewer::backdrop { background: rgb(6 6 9 / 0.96); }
.viewer-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: max(12px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px));
}
.viewer-count { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.04em; color: var(--muted); font-variant-numeric: tabular-nums; }
.viewer-stage { position: relative; min-height: 0; }
/* An absolutely placed box gives the media a definite height to fit inside, so tall photos never run off-screen. */
.viewer-media { position: absolute; inset: 0 clamp(8px, 6vw, 72px); display: flex; align-items: center; justify-content: center; }
.viewer-media img, .viewer-media video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.viewer-nav {
  /* Fixed to the screen's vertical middle, so the arrows stay put whatever the photo's shape or caption length. */
  position: fixed; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line);
  background: rgb(10 10 13 / 0.72); color: var(--text); font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.viewer-nav.prev { left: max(8px, env(safe-area-inset-left, 0px)); }
.viewer-nav.next { right: max(8px, env(safe-area-inset-right, 0px)); }
.viewer-nav:hover { border-color: var(--muted); }
.viewer-caption {
  max-width: 70ch; margin: 0 auto; text-align: center; color: var(--blush); font-size: 0.95rem;
  padding: 12px max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}
.viewer-caption:empty { display: none; }

/* Bio: the headshot beside the two bios (stacked); the headshot goes on top on narrow screens. */
.bio-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.6fr); gap: 20px; align-items: start; }
.bio-layout .bios { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 820px) {
  .bio-layout { grid-template-columns: minmax(0, 1fr); }
  .bio-photo { max-width: 420px; }
}

/* Hawaii roots: one section, three groups (EXCITE Camp, the STEM Conference, River of Life Mission). */
.subgroups { display: grid; gap: clamp(36px, 5vw, 56px); }
.subgroup { display: grid; gap: 16px; }
.subgroup h3 { font-size: 1.2rem; }

/* The bio card's Short/Full toggle: the card's height slides, and the new text fades in. */
.bio-stage { width: 100%; overflow: hidden; transition: height 0.45s cubic-bezier(0.2, 0.7, 0.2, 1); }
.bio-text { transition: opacity 0.4s ease 0.08s; }
.bio-text.fading { opacity: 0; transition: none; }
.bio-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (prefers-reduced-motion: reduce) { .bio-stage, .bio-text { transition: none; } }

/* Hover animation from the portfolio (Teresa, 2026-12-03, on the Full bio button): an outlined button gets a gradient
   ring that turns slowly while hovered or focused. Hover effects apply only where a mouse can hover; on touch screens a
   tap shows the ring while pressed. */
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin-border { to { --spin: 360deg; } }
:where(.spin-border) { position: relative; }
.spin-border::after {
  content: ""; position: absolute; inset: -1px; padding: 1px; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--spin), var(--pink), var(--blush), var(--blue), var(--blush), var(--pink));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0; transition: opacity 0.3s ease;
  animation: spin-border 6s linear infinite paused;
}
.spin-border:focus-visible { border-color: transparent; }
.spin-border:focus-visible::after { opacity: 1; animation-play-state: running; }
@media (hover: hover) {
  .spin-border:hover { border-color: transparent; }
  .spin-border:hover::after { opacity: 1; animation-play-state: running; }
}
.spin-border:active { border-color: transparent; }
.spin-border:active::after { opacity: 1; transition: none; }
@media (prefers-reduced-motion: reduce) { .spin-border::after { animation: none; } }
