/* AM.DIRAC site styles. Sizes follow a 0.25rem spacing scale; "sm" = min-width 640px. */

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+100-2BA, U+2BD-2C5, U+2C7-2CC, U+2CE-2D7, U+2DD-2FF, U+304, U+308, U+329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+??, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC, U+304, U+308, U+329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono Fallback";
  src: local(Arial);
  ascent-override: 75.79%;
  descent-override: 22.29%;
  line-gap-override: 0%;
  size-adjust: 134.59%;
}

:root {
  --background: #0f1520;
  --foreground: #e0e5ea;
  --accent: #da9c14;
  --red: #fb2c36;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --prose-body: #d1d5dc;
}
@supports (color: lab(0% 0 0)) {
  :root { --red: lab(55.4814% 75.0732 48.8528); --prose-body: lab(85.1236% -.612259 -3.7138); }
}

*, ::before, ::after { box-sizing: border-box; margin: 0; padding: 0; border: 0 solid; }
html { line-height: 1.5; -webkit-text-size-adjust: 100%; tab-size: 4; }
h1, h2, h3 { font-size: inherit; font-weight: inherit; }
a { color: inherit; text-decoration: inherit; }
input, button { font: inherit; letter-spacing: inherit; color: inherit; background-color: transparent; border-radius: 0; }
button { cursor: pointer; }
::placeholder { opacity: 1; color: color-mix(in oklab, currentcolor 50%, transparent); }

body {
  background: var(--background);
  color: var(--foreground);
  font-family: "JetBrains Mono", "JetBrains Mono Fallback", monospace;
  overflow: hidden;
}
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* frame */
.screen { position: relative; height: 100vh; height: 100dvh; width: 100vw; background-color: var(--background); }
/* iPhone: 100vh includes the area behind Safari's toolbars; dvh is the visible height */
.sphere { position: absolute; inset: 0; z-index: 0; }
.sphere canvas { display: block; }
.overlay {
  pointer-events: none; position: absolute; inset: 0; z-index: 10;
  display: flex; flex-direction: column; padding: 2rem;
}
.overlay--home { justify-content: space-between; }
.row-top { display: flex; align-items: flex-start; justify-content: space-between; }
.brand { display: flex; align-items: baseline; gap: 1.5rem; }
.logo {
  pointer-events: auto; cursor: pointer; color: var(--accent);
  font-size: 1.5rem; line-height: 2rem; font-weight: 600; letter-spacing: -.025em;
}
.nav { pointer-events: auto; display: flex; gap: 1rem; font-size: .875rem; line-height: 1.25rem; opacity: .7; }
.nav a { transition: color .15s var(--ease); }
.nav a:hover { color: var(--accent); }
.tagline { max-width: 20rem; text-align: right; font-size: .875rem; line-height: 1.625; opacity: .7; }

.row-bottom { display: flex; align-items: flex-end; justify-content: space-between; }
.overlay:not(.overlay--home) .row-bottom { margin-top: auto; }
.contact { display: flex; flex-direction: column; gap: .25rem; font-size: .875rem; line-height: 1.25rem; }
.contact a { pointer-events: auto; opacity: .7; transition: opacity .15s var(--ease); }
.contact a:hover { opacity: 1; }
.contact-hiring { color: var(--accent); }

/* home footer: office address above the contact links */
.location { font-style: normal; display: flex; flex-direction: column; gap: .375rem; margin-bottom: 1.25rem; }
.location-label {
  display: inline-flex; align-items: center; gap: .5rem; color: var(--accent); opacity: .8;
  font-size: .6875rem; line-height: 1rem; letter-spacing: .14em; text-transform: uppercase;
}
.location-label::before { content: ""; width: 1.25rem; height: 1px; background: currentcolor; opacity: .7; }
.contact a.location-address {
  display: flex; flex-direction: column; font-size: .75rem; line-height: 1.25rem; opacity: .55;
  transition: opacity .15s var(--ease);
}
.contact a.location-address:hover { opacity: 1; }
.motto { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; text-align: right; font-size: .875rem; line-height: 1.25rem; }
.copyright { font-size: .75rem; line-height: 1rem; opacity: .4; }

/* inner pages */
.page { pointer-events: auto; margin: 2rem auto 0; width: 100%; max-width: 42rem; overflow-y: auto; }
.page-title { color: var(--accent); font-size: 1.5rem; line-height: 2rem; font-weight: 600; letter-spacing: -.025em; }
.lede { margin-top: 1rem; font-size: .875rem; line-height: 1.625; opacity: .7; }
.lede--next { margin-top: .75rem; }
.section-title { margin-top: 2.5rem; color: var(--accent); font-size: 1.25rem; line-height: 1.75rem; font-weight: 600; letter-spacing: -.025em; }
.jobs { margin-top: 1rem; }

/* careers copy */
.lead-in { margin-top: 1rem; font-size: 1rem; line-height: 1.5rem; font-weight: 500; opacity: .9; }
.roles { margin-top: .5rem; }
.role { padding: 1.25rem 0; border-bottom: 1px solid color-mix(in oklab, currentcolor 10%, transparent); }
.role-title { font-size: 1rem; line-height: 1.5rem; font-weight: 500; }
.lede.role-text { margin-top: .375rem; }
.bullets { margin-top: .75rem; padding-left: 1.25rem; display: flex; flex-direction: column; gap: .625rem; }
.bullets { list-style: none; }
.bullets li { position: relative; margin-top: 0; }
.bullets li::before { content: "–"; position: absolute; left: -1.25rem; color: var(--accent); opacity: .9; }
.lede strong { font-weight: 500; color: var(--foreground); }
.callout {
  margin-top: 1.75rem; padding: 1.25rem 1.5rem; border-radius: .375rem;
  border: 1px solid color-mix(in oklab, var(--accent) 35%, transparent);
  border-left: 3px solid var(--accent);
  background: color-mix(in oklab, var(--accent) 6%, transparent);
}
.callout-label { font-size: .75rem; line-height: 1rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); opacity: .85; }
.callout-email {
  display: inline-block; margin-top: .5rem; color: var(--accent); font-size: 1.25rem; line-height: 1.75rem; font-weight: 600;
  letter-spacing: -.01em; text-decoration: underline; text-underline-offset: 5px;
  text-decoration-color: color-mix(in oklab, var(--accent) 45%, transparent); transition: text-decoration-color .15s var(--ease);
}
.callout-email:hover { text-decoration-color: var(--accent); }
.callout-note { margin-top: .5rem; font-size: .875rem; line-height: 1.625; opacity: .7; }
.section-title--first { margin-top: 1.5rem; }
.section-title + .list { margin-top: .25rem; }
.jobs .jobs-default { margin-top: 0; }
.inline-link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in oklab, var(--accent) 50%, transparent); transition: text-decoration-color .15s var(--ease); }
.inline-link:hover { text-decoration-color: var(--accent); }
.muted { opacity: .5; }
.error { color: var(--red); }

.list { margin-top: 1.5rem; }
.item {
  display: block; padding: 1.5rem 0; transition: opacity .15s var(--ease);
  border-bottom: 1px solid color-mix(in oklab, currentcolor 10%, transparent);
}
.item:hover { opacity: .7; }
.item-head { display: flex; align-items: center; justify-content: space-between; }
.item-title { font-size: 1.125rem; line-height: 1.75rem; font-weight: 500; }
.item-meta { font-size: .875rem; line-height: 1.25rem; opacity: .5; transition: opacity .15s var(--ease); }
.item-apply { font-size: .875rem; line-height: 1.25rem; opacity: .5; transition: opacity .15s var(--ease); }
.item:hover .item-apply { opacity: 1; }
.item--static:hover { opacity: 1; }
.person-bio { margin-top: .5rem; font-size: .875rem; line-height: 1.625; opacity: .7; }
.item-summary { margin-top: .5rem; font-size: .875rem; line-height: 1.25rem; opacity: .5; }

.post-date { margin-top: .5rem; display: block; font-size: .875rem; line-height: 1.25rem; opacity: .5; }

.subscribe { margin-top: 2.5rem; }
.subscribe-label { margin-bottom: .75rem; font-size: .875rem; line-height: 1.25rem; opacity: .5; }
.subscribe-form { display: flex; gap: .5rem; }
.subscribe-input, .subscribe-button, .subscribe-done { font-family: monospace; }
.subscribe-input {
  border-radius: .25rem; border: 1px solid color-mix(in oklab, currentcolor 20%, transparent);
  background: transparent; padding: .375rem .75rem; font-size: .875rem; line-height: 1.25rem;
  color: inherit; opacity: .7; outline: none;
}
.subscribe-input::placeholder { opacity: .4; }
.subscribe-input:focus { border-color: var(--accent); opacity: 1; }
.subscribe-button {
  border-radius: .25rem; background: var(--accent); padding: .375rem 1rem; font-size: .875rem; line-height: 1.25rem;
  font-weight: 500; color: #000; transition: opacity .15s var(--ease);
}
.subscribe-button:hover { opacity: .8; }
.subscribe-button:disabled { opacity: .5; }
.subscribe-error { align-self: center; font-size: .875rem; line-height: 1.25rem; opacity: .5; }
.subscribe-done { font-size: .875rem; line-height: 1.25rem; opacity: .7; }

/* article (blog post body) */
.prose { margin-top: 1.5rem; color: var(--prose-body); font-size: 1rem; line-height: 1.75; }
.prose p { margin-top: 1.25em; margin-bottom: 1.25em; }
.prose h2 { color: var(--accent); margin-top: 2em; margin-bottom: 1em; font-size: 1.5em; font-weight: 700; line-height: 1.33333; }
.prose h3 { color: var(--accent); margin-top: 1.6em; margin-bottom: .6em; font-size: 1.25em; font-weight: 600; line-height: 1.6; }
.prose h2 + *, .prose h3 + * { margin-top: 0; }
.prose a { color: var(--accent); font-weight: 500; text-decoration: underline; }
.prose strong { color: #fff; font-weight: 600; }
.prose ul, .prose ol { margin-top: 1.25em; margin-bottom: 1.25em; padding-inline-start: 1.625em; }
.prose ul { list-style-type: disc; }
.prose ol { list-style-type: decimal; }
.prose li { margin-top: .5em; margin-bottom: .5em; padding-inline-start: .375em; }
.prose code { color: #fff; font-size: .875em; font-weight: 600; }
.prose code::before, .prose code::after { content: "`"; }
.prose blockquote { margin: 1.6em 0; padding-inline-start: 1em; border-inline-start: .25rem solid #364153; font-style: italic; font-weight: 500; color: #f3f4f6; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }

@media (max-width: 639px) {
  .item--static .item-head { flex-direction: column; align-items: flex-start; gap: .25rem; }
  /* the nav no longer leaves room for the tagline beside it: stack the tagline under the header */
  .overlay--home .row-top { flex-direction: column; gap: 1.25rem; }
  .overlay--home .tagline { max-width: 18rem; text-align: left; }
  .location-address span { white-space: nowrap; }
  /* footer: copyright under the links instead of squeezed beside them; clear the home indicator */
  .row-bottom { flex-direction: column; align-items: flex-start; gap: .75rem; }
  .motto { align-items: flex-start; text-align: left; }
  .overlay { padding-bottom: max(2rem, calc(env(safe-area-inset-bottom) + 1.25rem)); }
}
/* inner pages scroll as a whole page when taller than the screen, footer after the content (home stays one fixed screen) */
body:has(.screen--page) { overflow: auto; }
.screen--page { height: auto; min-height: 100vh; min-height: 100dvh; }
.screen--page .overlay { position: relative; inset: auto; min-height: 100vh; min-height: 100dvh; pointer-events: auto; }
.screen--page .page { overflow: visible; }
.screen--page .row-bottom { padding-top: .5rem; }
@media (max-width: 639px) {
  .screen--page .row-bottom { padding-top: 3rem; }
}
@media (max-width: 374px) {
  /* iPhone SE / mini width: keep the header on one line */
  .brand { gap: 1rem; }
  .logo { font-size: 1.375rem; }
  .nav { gap: .75rem; font-size: .8125rem; }
}

@media (min-width: 640px) {
  .overlay { padding: 3rem; }
  .logo, .page-title { font-size: 1.875rem; line-height: 2.25rem; }
  .tagline { font-size: 1rem; }
  .contact, .motto { font-size: 1rem; line-height: 1.5rem; }
  .copyright { font-size: .75rem; line-height: 1rem; }
  .contact a.location-address { font-size: .8125rem; }
  .lede { font-size: 1rem; }
  .section-title { font-size: 1.5rem; line-height: 2rem; }
  .item-title { font-size: 1.25rem; line-height: 1.75rem; }
  .lead-in, .role-title { font-size: 1.125rem; line-height: 1.75rem; }
  .callout-email { font-size: 1.5rem; line-height: 2rem; }
}
