:root {
  --bg: #f7f7f2;
  --panel: #eeeee8;
  --ink: #23241f;
  --muted: #66685e;
  --line: #d4d5cc;
  --accent: #e83b19;
  --on-accent: #fff;
  --font-sans: 'Geist Variable', sans-serif;
  --font-mono: 'Geist Mono Variable', monospace;
  color-scheme: light;
}
:root[data-theme='dark'] {
  --bg: #171915;
  --panel: #1e211b;
  --ink: #f0f0e5;
  --muted: #a2a69a;
  --line: #363b30;
  --accent: #ff633e;
  --on-accent: #151713;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
button,
input,
textarea {
  font: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
a,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.65;
}
button {
  color: inherit;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
::selection {
  background: var(--accent);
  color: var(--on-accent);
}
h1,
h2,
h3,
p {
  margin: 0;
}
button {
  border: 0;
}
svg {
  display: block;
}
.portfolio {
  --gutter: clamp(28px, 5vw, 100px);
}
.first-screen {
  height: 100svh;
  min-height: 550px;
  position: relative;
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}
.site-header {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0 var(--gutter, 5vw);
  position: relative;
  z-index: 5;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 13px;
  font-weight: 550;
}
.name-mark {
  font-size: 31px;
  line-height: 1;
  letter-spacing: -4px;
  font-weight: 750;
  padding-right: 5px;
}
.name-mark span {
  color: var(--accent);
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 13px;
}
.site-header nav a:hover {
  color: var(--accent);
}
.theme-toggle {
  width: 36px;
  height: 36px;
  background: transparent;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
}
.theme-toggle:hover {
  background: var(--panel);
}
.hero {
  height: calc(100% - 72px);
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  position: relative;
}
.hero-copy {
  position: relative;
  z-index: 2;
  width: 49%;
  padding-bottom: 28px;
  pointer-events: none;
}
.hero-copy a {
  pointer-events: auto;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.7;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 450;
  color: var(--muted);
}
.hero-copy .eyebrow {
  margin-bottom: clamp(20px, 4vh, 45px);
  display: flex;
  gap: 10px;
  align-items: center;
}
.signal-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  flex: none;
}
.hero h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: clamp(80px, min(10.8vw, 15.7vh), 178px);
  line-height: 0.86;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}
.title-period {
  color: var(--accent);
}
.hero-role {
  font-size: clamp(20px, min(2.65vw, 4vh), 40px);
  line-height: 1.15;
  letter-spacing: -0.045em;
  font-weight: 450;
  margin-top: clamp(20px, 3.7vh, 40px);
}
.role-break {
  display: none;
}
.role-period {
  display: none;
}
.project-cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  margin-top: clamp(20px, 4vh, 42px);
  padding: 15px 20px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 13px;
  font-weight: 550;
  min-height: 46px;
}
.project-cta:hover {
  filter: brightness(0.9);
}
.project-cta span {
  font-size: 20px;
  line-height: 1;
}
.hero-coordinate {
  position: absolute;
  bottom: 25px;
  left: var(--gutter);
  font: 10px var(--font-mono);
  letter-spacing: 0.09em;
  color: var(--muted);
}
.hero-coordinate span {
  margin-left: 26px;
  color: var(--ink);
}
.scroll-cue {
  position: absolute;
  bottom: 22px;
  right: var(--gutter);
  display: flex;
  gap: 40px;
  align-items: center;
  font: 10px var(--font-mono);
  text-transform: uppercase;
  color: var(--muted);
}
.scroll-cue span:last-child {
  font-size: 18px;
  color: var(--ink);
}
.amelia-stage {
  position: absolute;
  top: 44px;
  right: 3%;
  bottom: 62px;
  width: 48%;
  z-index: 1;
  touch-action: pan-y;
}
.amelia-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.amelia-canvas canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.amelia-poster {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: var(--poster-width, 100%);
  max-width: none;
  height: auto;
  object-fit: contain;
  object-position: center top;
  transition: opacity 0.3s;
  pointer-events: none;
}
.amelia-stage[data-status='ready'] .amelia-poster {
  opacity: 0;
}
.amelia-stage::after {
  content: '';
  position: absolute;
  bottom: 1%;
  left: 28%;
  right: 24%;
  height: 10px;
  background: var(--ink);
  filter: blur(18px);
  opacity: 0.09;
  pointer-events: none;
}
.mount-line {
  position: absolute;
  top: 56px;
  left: 70%;
  height: 36px;
  width: 4px;
  transform: translateX(-50%);
  background: var(--ink);
  z-index: 0;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 100;
  background: var(--ink);
  color: var(--bg);
  padding: 16px;
}
.skip-link:focus {
  top: 10px;
}
.projects-section {
  padding: 100px var(--gutter) 110px;
  scroll-margin-top: 0;
}
.section-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  margin-bottom: 40px;
}
.section-heading .eyebrow {
  grid-column: 1/-1;
  margin-bottom: 18px;
}
.section-heading h2,
.contact-intro h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(54px, 6vw, 96px);
  font-weight: 600;
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}
.section-heading h2 span,
.contact-intro h2 span {
  color: var(--accent);
}
.section-note {
  font-size: 13px;
  color: var(--muted);
  padding-bottom: 4px;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.project-card {
  border: 1px solid var(--line);
  transition:
    transform 0.25s,
    border-color 0.25s;
  min-width: 0;
}
.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--ink);
}
.project-art {
  height: 260px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center;
}
.art-cross {
  position: absolute;
  color: var(--muted);
  font: 14px var(--font-mono);
}
.cross-a {
  top: 12px;
  left: 12px;
}
.cross-b {
  right: 12px;
  bottom: 12px;
}
.art-index {
  position: absolute;
  bottom: 15px;
  left: 16px;
  font: 10px var(--font-mono);
}
.art-caption {
  position: absolute;
  right: 16px;
  top: 16px;
  font: 8px var(--font-mono);
  letter-spacing: 0.1em;
  color: var(--muted);
}
.project-glyph {
  width: 110px;
  height: 110px;
  position: relative;
  transform: rotate(-30deg) skewY(12deg);
  transition: transform 0.6s;
}
.project-glyph i {
  position: absolute;
  inset: 0;
  border: 1px solid var(--muted);
  background: var(--panel);
}
.project-glyph i:nth-child(2) {
  transform: translate(10px, -10px);
}
.project-glyph i:nth-child(3) {
  transform: translate(20px, -20px);
}
.project-glyph i:nth-child(4) {
  transform: translate(30px, -30px);
  border-color: var(--accent);
}
.glyph-02 {
  width: 105px;
  height: 105px;
  transform: rotate(30deg) skewY(-10deg);
}
.glyph-02 i {
  border-radius: 50%;
}
.glyph-03 {
  width: 90px;
  height: 125px;
  transform: rotate(-10deg) skewY(0deg);
}
.glyph-03 i:nth-child(2) {
  transform: rotate(30deg);
}
.glyph-03 i:nth-child(3) {
  transform: rotate(60deg);
}
.glyph-03 i:nth-child(4) {
  transform: rotate(90deg);
}
.project-card:hover .project-glyph {
  transform: rotate(0deg) skewY(0);
}
.project-meta {
  padding: 24px;
  position: relative;
}
.project-status {
  font: 9px var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-meta h3 {
  font-size: 24px;
  letter-spacing: -0.04em;
  font-weight: 500;
  margin: 16px 0 8px;
}
.project-meta p {
  font-size: 12px;
  color: var(--muted);
}
.card-arrow {
  position: absolute;
  right: 24px;
  top: 24px;
  font-size: 20px;
}
.contact-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9%;
  padding: 100px var(--gutter);
  border-top: 1px solid var(--line);
  background: var(--panel);
}
.contact-intro .eyebrow {
  margin-bottom: 26px;
}
.contact-intro h2 {
  font-size: clamp(66px, 7.5vw, 110px);
}
.email-link {
  font-size: clamp(12px, 1.3vw, 18px);
  display: flex;
  gap: 14px;
  margin-top: 32px;
  letter-spacing: -0.03em;
  width: fit-content;
}
.email-link:hover,
.social-links a:hover {
  color: var(--accent);
}
.social-links {
  display: flex;
  gap: 28px;
  font-size: 11px;
  margin-top: 23px;
}
.contact-form {
  padding-top: 22px;
  position: relative;
}
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font: 10px var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}
.contact-form input,
.contact-form textarea {
  border: 0;
  border-bottom: 1px solid var(--muted);
  padding: 12px 0;
  background: transparent;
  border-radius: 0;
  width: 100%;
  color: var(--ink);
  font: 14px var(--font-sans);
  text-transform: none;
  resize: vertical;
  min-width: 0;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--muted);
  opacity: 0.8;
}
.form-bottom {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 28px;
}
.send-button {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  background: var(--ink);
  color: var(--bg);
  padding: 15px 20px;
  min-height: 48px;
  font-size: 12px;
  flex: none;
}
.form-privacy {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 130px;
}
.form-status {
  font-size: 12px;
  line-height: 1.7;
  margin-top: 12px;
  min-height: 21px;
}
.form-status.error {
  color: var(--accent);
}
.preview-note {
  font: 9px var(--font-mono);
  color: var(--muted);
  margin-top: 20px;
  line-height: 1.5;
}
.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 27px var(--gutter);
  font-size: 10px;
  border-top: 1px solid var(--line);
}
.site-footer > span {
  color: var(--muted);
}
.case-study {
  --gutter: 5vw;
}
.case-study article {
  max-width: 1000px;
  margin: 80px auto;
  padding: 0 30px;
}
.case-study h1 {
  font-size: clamp(56px, 9vw, 110px);
  letter-spacing: -0.07em;
  font-weight: 450;
  margin-top: 25px;
}
.case-study h1 span {
  color: var(--accent);
}
.case-lead {
  font-size: 26px;
  margin: 20px 0;
}
.case-notice {
  max-width: 600px;
  line-height: 1.8;
  color: var(--muted);
}
.case-fields {
  margin: 60px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}
.case-fields section {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.case-fields h2 {
  font-size: 18px;
  font-weight: 500;
}
.case-fields p {
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
}
.not-found {
  max-width: 700px;
  margin: 20vh auto;
  padding: 30px;
}
.not-found h1 {
  font-size: 48px;
  letter-spacing: -0.05em;
  margin: 25px 0;
}
.not-found p {
  margin-bottom: 20px;
}
.not-found a {
  border-bottom: 1px solid var(--accent);
}
@media (min-width: 1600px) {
  .site-header {
    height: 84px;
  }
  .hero {
    height: calc(100% - 84px);
  }
  .amelia-stage {
    top: 52px;
    bottom: 75px;
  }
  .mount-line {
    top: 63px;
    height: 42px;
  }
  .project-art {
    height: 310px;
  }
}
@media (max-height: 650px) and (min-width: 901px) {
  .site-header {
    height: 62px;
  }
  .hero {
    height: calc(100% - 62px);
  }
  .hero-copy .eyebrow {
    margin-bottom: 20px;
  }
  .hero-copy {
    padding-bottom: 24px;
  }
  .hero h1 {
    font-size: 90px;
  }
  .hero-role {
    font-size: 25px;
    margin-top: 22px;
  }
  .project-cta {
    margin-top: 24px;
    padding: 11px 16px;
    min-height: 42px;
  }
  .amelia-stage {
    top: 37px;
    bottom: 55px;
  }
  .mount-line {
    top: 48px;
  }
  .hero-coordinate {
    bottom: 20px;
  }
  .scroll-cue {
    bottom: 17px;
  }
}
@media (max-width: 1100px) {
  .hero-role {
    max-width: 390px;
  }
  .eyebrow-tail {
    display: none;
  }
  .project-art {
    height: 210px;
  }
  .project-meta {
    padding: 20px;
  }
  .contact-section {
    gap: 5%;
  }
  .mount-line {
    left: 68%;
  }
  .site-header nav {
    gap: 22px;
  }
}
@media (max-width: 900px) {
  .portfolio {
    --gutter: 24px;
  }
  .first-screen {
    height: auto;
    min-height: 0;
    padding-bottom: 50px;
  }
  .site-header {
    height: 64px;
  }
  .hero {
    height: auto;
    min-height: 0;
    display: block;
    padding-top: 55px;
  }
  .hero-copy {
    width: 100%;
    padding: 0;
  }
  .hero-copy .eyebrow {
    margin-bottom: 26px;
  }
  .hero h1 {
    font-size: clamp(80px, 17vw, 135px);
    max-width: 70%;
  }
  .hero-role {
    font-size: 28px;
    max-width: 100%;
    margin-top: 26px;
  }
  .project-cta {
    margin-top: 25px;
  }
  .amelia-stage {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    width: min(100%, 540px);
    height: 460px;
    margin: 12px auto 0;
  }
  .mount-line {
    display: none;
  }
  .hero-coordinate {
    bottom: auto;
    top: calc(100% + 470px);
    left: 24px;
  }
  .scroll-cue {
    bottom: auto;
    top: calc(100% + 465px);
    right: 24px;
  }
  .projects-section {
    padding: 65px var(--gutter);
  }
  .project-grid {
    gap: 12px;
  }
  .project-art {
    height: 180px;
  }
  .project-glyph {
    scale: 0.75;
  }
  .project-meta h3 {
    font-size: 22px;
  }
  .project-meta p {
    line-height: 1.6;
  }
  .project-meta {
    padding: 16px;
  }
  .card-arrow {
    right: 16px;
    top: 16px;
  }
  .contact-section {
    padding: 65px var(--gutter);
    gap: 40px;
    grid-template-columns: 1fr;
  }
  .contact-intro h2 br {
    display: none;
  }
  .contact-intro h2 {
    font-size: 64px;
  }
  .contact-form {
    padding-top: 0;
  }
  .form-privacy {
    max-width: none;
  }
  .contact-intro .eyebrow {
    margin-bottom: 20px;
  }
  .email-link {
    font-size: 16px;
  }
  .site-footer {
    flex-wrap: wrap;
  }
  .section-note {
    font-size: 11px;
  }
  .hero-coordinate,
  .scroll-cue {
    display: none;
  }
}
@media (max-width: 600px) {
  .portfolio {
    --gutter: 20px;
  }
  .wordmark {
    font-size: 11px;
    gap: 10px;
  }
  .name-mark {
    font-size: 27px;
  }
  .site-header nav {
    gap: 17px;
    font-size: 11px;
  }
  .theme-toggle {
    width: 32px;
    height: 32px;
  }
  .hero {
    padding-top: 45px;
  }
  .hero h1 {
    font-size: 100px;
    max-width: 100%;
  }
  .hero-role {
    font-size: 25px;
    max-width: 290px;
  }
  .amelia-stage {
    height: 410px;
    margin-top: 20px;
  }
  .first-screen {
    padding-bottom: 20px;
  }
  .project-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .project-art {
    height: 270px;
  }
  .project-glyph {
    scale: 1;
  }
  .project-meta {
    padding: 22px;
  }
  .card-arrow {
    top: 22px;
    right: 22px;
  }
  .section-heading {
    display: block;
    margin-bottom: 30px;
  }
  .section-heading .eyebrow {
    margin-bottom: 18px;
  }
  .section-note {
    margin-top: 16px;
    font-size: 12px;
  }
  .section-heading h2 {
    font-size: 64px;
  }
  .contact-intro h2 {
    font-size: 58px;
  }
  .contact-intro h2 br {
    display: block;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .form-bottom {
    gap: 20px;
  }
  .site-footer > span {
    display: none;
  }
  .case-fields {
    grid-template-columns: 1fr;
  }
  .case-study .site-header nav {
    gap: 15px;
  }
  .case-study article {
    margin: 50px auto;
    padding: 0 20px;
  }
  .case-lead {
    font-size: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
@media (min-width: 901px) {
  .mount-line {
    left: var(--mount-left, 70%);
    height: calc(var(--mount-bottom, 92px) - 52px);
    top: 52px;
  }
}
.turnstile-widget {
  margin-top: 20px;
}
/* Connect the smaller mobile rig to the same header before the hero copy. */
.amelia-poster {
  transition: none;
}
@media (max-width: 900px) {
  .first-screen {
    display: flex;
    flex-direction: column;
  }
  .site-header {
    order: 0;
    flex: none;
  }
  .amelia-stage {
    order: 1;
    height: 330px;
    width: min(100%, 460px);
    margin: 0 auto;
  }
  .hero {
    order: 2;
    padding-top: 24px;
    padding-bottom: 20px;
  }
  .mount-line {
    display: block;
    left: var(--mount-left, 60%);
    top: 60px;
    height: calc(var(--mount-bottom, 96px) - 60px);
    width: 3px;
  }
}
/* The supplied ceiling plate itself attaches to the page edge. Navigation leaves it clear. */
.amelia-stage {
  top: 0;
}
.site-header nav {
  margin-right: auto;
  margin-left: clamp(28px, 8vw, 130px);
}
.site-header .theme-toggle {
  position: absolute;
  right: var(--gutter, 5vw);
  top: 50%;
  transform: translateY(-50%);
}
@media (min-width: 1600px) {
  .amelia-stage {
    top: 0;
  }
}
@media (max-height: 650px) and (min-width: 901px) {
  .amelia-stage {
    top: 0;
  }
}
@media (max-width: 900px) {
  .amelia-stage {
    top: auto;
    margin-top: -64px;
    height: 360px;
  }
  .portfolio .site-header {
    border-bottom: 0;
  }
  .portfolio .site-header nav {
    position: absolute;
    left: var(--gutter);
    top: 86px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    margin: 0;
  }
  .portfolio .site-header .theme-toggle {
    position: absolute;
    right: auto;
    left: calc(100vw - var(--gutter) * 2 - 36px);
    top: -72px;
    transform: none;
  }
}

/* The character is the interaction target; labels and acronym disclosure were retired. */
.amelia-stage {
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
  cursor: pointer;
  color: inherit;
}
.amelia-stage:disabled {
  cursor: default;
  opacity: 1;
}
.amelia-stage:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -3px;
}

/* Room for the enlarged character's motion, while keeping its mount on the ceiling. */
@media (min-width: 901px) {
  .amelia-stage {
    width: 72%;
  }
}
@media (max-width: 900px) {
  .amelia-stage {
    height: 540px;
  }
}

/* Single-viewport homepage shell. Case studies retain their existing styles. */
.portfolio--lab {
  --bg: #f7f7f2;
  --panel: #e5e5df;
  --ink: #292c2d;
  --muted: #656b6a;
  --line: #cbd0cb;
  --accent: #327f81;
  --gutter: clamp(28px, 5vw, 100px);
  background: var(--bg);
  color: var(--ink);
}
:root[data-theme='dark'] .portfolio--lab {
  --bg: #171915;
  --panel: #22292d;
  --ink: #eeeee7;
  --muted: #a3adae;
  --line: #3a464b;
  --accent: #77b9b9;
}
.portfolio--lab .first-screen {
  height: 100svh;
  min-height: 0;
  padding: 0;
  border: 0;
  overflow: clip;
}
.portfolio--lab .site-header {
  height: 88px;
  padding: 0 var(--gutter);
  border: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  background: transparent;
  pointer-events: none;
}
.portfolio--lab .wordmark,
.portfolio--lab .homepage-controls {
  pointer-events: auto;
}
.portfolio--lab .wordmark {
  width: fit-content;
}
.future-navigation-slot {
  /* Three future links can occupy this region without displacing the ceiling socket. */
  max-width: calc(66.667vw - 390px);
  min-width: 0;
}
.homepage-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.portfolio--lab .site-header .theme-toggle,
.portfolio--lab .motion-toggle {
  position: static;
  transform: none;
  width: 36px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 3px;
  background: transparent;
}
.portfolio--lab .theme-toggle:hover,
.portfolio--lab .motion-toggle:hover {
  background: var(--panel);
}
.language-control {
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 3px;
  min-width: 62px;
  min-height: 36px;
  padding: 5px 6px;
  font: 11px var(--font-mono);
  cursor: pointer;
}
.language-control:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.portfolio--lab .hero {
  height: calc(100% - 88px);
  padding: 0 var(--gutter);
  pointer-events: none;
  display: flex;
  align-items: center;
}
.portfolio--lab .hero-copy {
  width: 43%;
  max-width: 620px;
  padding: 0 0 clamp(12px, 2svh, 24px);
}
.portfolio--lab .hero-copy .eyebrow {
  font-size: clamp(10px, 0.85vw, 13px);
  margin-bottom: clamp(20px, 3svh, 32px);
  letter-spacing: 0.06em;
  text-transform: none;
}
.portfolio--lab .signal-dot {
  background: var(--accent);
  border-radius: 50%;
}
.portfolio--lab .hero h1 {
  font-size: clamp(80px, min(10.8vw, 15.7svh), 178px);
  max-width: none;
  line-height: 0.9;
}
.portfolio--lab .hero-role {
  font-size: clamp(20px, min(2.05vw, 3.3svh), 31px);
  line-height: 1.35;
  letter-spacing: -0.025em;
  max-width: 440px;
  margin-top: clamp(22px, 4svh, 38px);
  text-wrap: pretty;
}
.portfolio--lab .project-cta {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 2px;
  gap: 8px;
  padding: 12px 16px;
  opacity: 1;
  cursor: default;
  filter: none;
  line-height: 1.5;
  margin-top: clamp(24px, 4svh, 42px);
}
.portfolio--lab .project-cta span {
  font-size: inherit;
  line-height: inherit;
  font-weight: 400;
}
/* Match posterPlacement before hydration so the poster does not jump on load. */
.portfolio--lab .amelia-stage {
  --poster-width: min(157.894737svh, 72vw);
  --poster-left: calc(66.666667vw - var(--poster-width) * 0.459417518);
  --poster-top: 0px;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
}
.portfolio--lab .amelia-stage::after {
  display: none;
}
.portfolio--lab .skip-link {
  opacity: 0;
  pointer-events: none;
}
.portfolio--lab .skip-link:focus {
  opacity: 1;
  pointer-events: auto;
}
.portfolio--lab .hero-copy:lang(th) .eyebrow {
  letter-spacing: 0;
  font-family: var(--font-sans);
}
@media (max-width: 900px), (max-height: 500px) {
  .portfolio--lab {
    --gutter: 24px;
  }
  .portfolio--lab .first-screen {
    height: auto;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
  }
  .portfolio--lab .site-header {
    height: 72px;
    gap: 12px;
    order: 0;
  }
  .portfolio--lab .wordmark {
    font-size: 12px;
    gap: 10px;
  }
  .portfolio--lab .future-navigation-slot {
    display: none;
  }
  .portfolio--lab .homepage-controls {
    grid-column: 3;
  }
  .portfolio--lab .amelia-stage {
    --poster-width: min(568.421053px, 150vw);
    --poster-left: calc(50vw - var(--poster-width) * 0.459417518);
    position: relative;
    inset: auto;
    order: 1;
    width: 100%;
    height: min(540px, 110vw);
    min-height: 300px;
    margin: 0;
  }
  .portfolio--lab .hero {
    order: 2;
    height: auto;
    padding: 32px var(--gutter) 54px;
    display: block;
  }
  .portfolio--lab .hero-copy {
    width: 100%;
    max-width: 600px;
    padding: 0;
  }
  .portfolio--lab .hero h1 {
    font-size: clamp(80px, 17vw, 135px);
  }
  .portfolio--lab .hero-copy .eyebrow {
    font-size: 11px;
    margin-bottom: 24px;
  }
  .portfolio--lab .hero-role {
    font-size: 25px;
    max-width: 440px;
    margin-top: 26px;
  }
  .portfolio--lab .project-cta {
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-top: 26px;
  }
}
@media (max-width: 400px) {
  .portfolio--lab {
    --gutter: 18px;
  }
  .portfolio--lab .wordmark {
    font-size: 11px;
    gap: 7px;
  }
  .portfolio--lab .homepage-controls {
    gap: 2px;
  }
  .portfolio--lab .site-header .theme-toggle,
  .portfolio--lab .motion-toggle {
    width: 30px;
  }
  .language-control {
    min-width: 56px;
  }
}

@media (min-width: 901px) and (max-height: 500px) {
  .portfolio--lab .amelia-stage {
    --poster-left: calc(50vw - var(--poster-width) * 0.459417518);
  }
}

/* Compact portrait view keeps every localized introduction within one screen. */
@media (max-width: 400px) and (max-height: 900px) {
  .portfolio--lab .hero { padding-top: 16px; padding-bottom: 24px; }
  .portfolio--lab .hero h1 { font-size: 64px; }
  .portfolio--lab .hero-copy .eyebrow { margin-bottom: 16px; }
  .portfolio--lab .hero-role { font-size: 18px; line-height: 1.3; margin-top: 18px; }
  .portfolio--lab .project-cta { margin-top: 18px; padding: 10px 12px; }
}

/* Narrow, short screens retain the full introduction without changing Amelia's framing. */
@media (max-width: 400px) and (max-height: 800px) {
  .portfolio--lab .hero { padding-top: 10px; padding-bottom: 14px; }
  .portfolio--lab .hero h1 { font-size: 52px; }
  .portfolio--lab .hero-copy .eyebrow { font-size: 10px; margin-bottom: 10px; }
  .portfolio--lab .hero-role { font-size: 16px; line-height: 1.3; margin-top: 12px; }
  .portfolio--lab .project-cta { margin-top: 12px; padding: 10px 12px; }
}
