/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  --paper: #F0EEE9;
  --paper-soft: #F8F6F1;
  --tar: #080A09;
  --ink: #1A1C1B;
  --ink-soft: #5E615D;
  --muted: #747770;
  --line: #D2D0CA;
  --line-strong: #B8B8B0;
  --chiral: #C9A34E;
  --chiral-dark: #8A6B2E;
  --sea-glass: #718783;
  --field: #FCFBF7;
  --shadow: 0 24px 70px rgb(8 10 9 / 10%);
  --display-font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --text-font: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono-font: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text-font);
  font-size: 16px;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

:focus-visible {
  outline: 3px solid rgb(201 163 78 / 48%);
  outline-offset: 4px;
}

::selection {
  background: rgb(201 163 78 / 34%);
  color: var(--tar);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.site-shell {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--tar);
  isolation: isolate;
  -webkit-user-select: none;
  user-select: none;
}

.membrane-underlayer,
.membrane-surface {
  position: fixed;
  inset: 0;
}

.membrane-underlayer {
  z-index: 0;
  background: #070908;
}

.membrane-surface {
  z-index: 1;
  display: grid;
  overflow: hidden;
  padding: 48px;
  background: var(--paper);
  place-items: center;
  will-change: clip-path;
}

.membrane-tendril-canvas {
  position: fixed;
  z-index: 2;
  inset: 0;
  display: block;
  pointer-events: none;
}

.amoeba-canvas {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  display: block;
  opacity: 0;
  pointer-events: none;
  transition: opacity 500ms ease;
  will-change: transform;
}

.amoeba-canvas.is-ready {
  opacity: 1;
}

.amoeba-trigger {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  display: block;
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  will-change: transform;
}

.amoeba-trigger:disabled {
  cursor: default;
}

.contact-composer {
  position: fixed;
  z-index: 5;
  inset: 0;
  margin: 0;
  mix-blend-mode: difference;
  opacity: 0;
  pointer-events: none;
  transition: opacity 700ms ease;
}

.is-contact-ready .contact-composer {
  opacity: 1;
}

.contact-composer__field,
.contact-composer__status {
  position: absolute;
  top: var(--membrane-contact-axis, 50%);
  width: min(58vw, 900px);
  margin: 0;
  color: var(--paper);
  font-family: var(--mono-font);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.65;
  transform: none;
}

[data-contact-side="left"] .contact-composer__field,
[data-contact-side="left"] .contact-composer__status {
  left: 32px;
  width: min(calc(var(--membrane-contact-depth, 58vw) - 32px - 2.2ch), 900px);
  text-align: left;
}

[data-contact-side="right"] .contact-composer__field,
[data-contact-side="right"] .contact-composer__status {
  right: 32px;
  width: min(calc(var(--membrane-contact-depth, 58vw) - 32px - 2.2ch), 900px);
  text-align: right;
}

.contact-composer__field {
  height: 4.95em;
  pointer-events: none;
}

.is-contact-ready .contact-composer__field {
  pointer-events: auto;
}

.contact-composer textarea,
.contact-composer__mirror {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-align: inherit;
  white-space: pre-wrap;
  overflow-wrap: normal;
  word-break: normal;
}

.contact-composer textarea {
  z-index: 1;
  caret-color: transparent;
  color: transparent;
  outline: none;
  resize: none;
  -webkit-user-select: text;
  user-select: text;
  -webkit-text-fill-color: transparent;
}

.contact-composer textarea:focus-visible {
  outline: none;
}

.contact-composer__mirror {
  z-index: 2;
  pointer-events: none;
}

.contact-composer__word {
  white-space: nowrap;
}

.contact-composer__word--breakable {
  white-space: normal;
}

.contact-composer__marker {
  display: inline;
}

.contact-composer__caret {
  position: absolute;
  z-index: 3;
  top: 0.12em;
  left: 0;
  width: 1px;
  height: 1.28em;
  background: currentColor;
  pointer-events: none;
  transform-origin: top left;
  animation: contact-caret-blink 3.4s steps(1, end) infinite;
  will-change: opacity, transform;
}

.contact-composer__status {
  min-height: 4.95em;
  opacity: 0;
  pointer-events: none;
}

.is-contact-sending .contact-composer__field {
  opacity: 0.46;
}

.is-contact-sending .contact-composer__caret {
  animation-duration: 620ms;
}

.is-contact-sent .contact-composer__field,
.is-contact-error .contact-composer__field {
  opacity: 0;
}

.is-contact-sent .contact-composer__status,
.is-contact-error .contact-composer__status {
  opacity: 1;
}

.contact-composer__field.is-at-limit {
  animation: contact-limit 240ms ease;
}

@keyframes contact-caret-blink {
  0%,
  72%,
  86%,
  100% {
    opacity: 1;
  }

  76%,
  82% {
    opacity: 0;
  }
}

@keyframes contact-limit {
  0%,
  100% {
    transform: translateX(0);
  }

  42% {
    transform: translateX(3px);
  }
}

.site-shell.is-amoeba-hovered .amoeba-canvas {
  filter: brightness(1.06) contrast(1.02);
}

.profile-intro {
  position: relative;
  width: min(980px, 100%);
  font-size: 4rem;
  text-align: center;
  transform: translateY(-15vh);
  transform: translateY(-15dvh);
  will-change: transform;
}

.profile-intro-credit {
  margin: 0;
  color: var(--ink);
  font-family: var(--display-font);
  font-size: 0.5em;
  font-weight: 300;
  letter-spacing: 0.18em;
  line-height: 1.15;
  text-indent: 0.18em;
  text-wrap: balance;
  will-change: transform;
}

.profile-intro h1 {
  margin: 1.5em 0 0;
  color: var(--ink);
  font-family: var(--display-font);
  font-size: 1em;
  font-weight: 300;
  letter-spacing: 0.18em;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-indent: 0.18em;
  text-transform: uppercase;
  text-wrap: balance;
  will-change: transform;
}

.profile-intro-description {
  max-width: 620px;
  margin: 52px auto 0;
  color: var(--ink);
  font-family: var(--display-font);
  font-size: 1.0625rem;
  font-weight: 300;
  letter-spacing: 0.035em;
  line-height: 1.72;
  text-wrap: pretty;
  will-change: transform;
}

.profile-intro-specialty {
  max-width: 620px;
  margin: 28px auto 0;
  color: var(--ink);
  font-family: var(--display-font);
  font-size: 0.9375rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-align: center;
  will-change: transform;
}

.admin-link,
.admin-submit {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.admin-page {
  background:
    linear-gradient(90deg, rgb(216 209 196 / 42%) 1px, transparent 1px),
    linear-gradient(rgb(216 209 196 / 42%) 1px, transparent 1px),
    var(--paper);
  background-size: 42px 42px;
}

.admin-shell {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 48px 28px 80px;
}

.admin-header {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
}

.admin-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.admin-kicker {
  margin: 0 0 6px;
  color: var(--chiral-dark);
  font-family: var(--mono-font);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-header h1 {
  margin: 0;
  font-family: var(--display-font);
  font-size: 3rem;
  font-weight: 300;
  letter-spacing: 0;
  line-height: 1;
}

.admin-link {
  flex: 0 0 auto;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  background: var(--paper-soft);
}

.admin-link.is-current {
  border-color: var(--tar);
  background: var(--tar);
  color: var(--paper-soft);
}

.admin-form,
.admin-notice,
.admin-errors {
  border: 1px solid var(--line);
  background: rgb(250 248 242 / 84%);
  box-shadow: 0 18px 60px rgb(36 34 31 / 8%);
}

.admin-form {
  padding: 30px;
}

.admin-notice,
.admin-errors {
  margin: 0 0 18px;
  padding: 14px 16px;
}

.admin-notice {
  color: var(--chiral-dark);
  font-weight: 600;
}

.admin-errors {
  color: #7C302A;
}

.admin-errors p {
  margin: 0 0 8px;
  font-weight: 700;
}

.admin-errors ul {
  margin: 0;
  padding-left: 20px;
}

.admin-section {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.admin-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.admin-section h2 {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: 1rem;
}

.field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field + .field {
  margin-top: 18px;
}

.field label {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 700;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--field);
  color: var(--ink);
}

.field-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.8125rem;
}

.field input {
  min-height: 46px;
  padding: 0 12px;
}

.field textarea {
  min-height: 132px;
  padding: 12px;
  resize: vertical;
}

.admin-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
}

.admin-actions-split {
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.admin-submit {
  min-width: 150px;
  border: 0;
  padding: 0 22px;
  background: var(--tar);
  color: var(--paper-soft);
  cursor: pointer;
}

.admin-submit:hover {
  background: var(--sea-glass);
}

.admin-shell-wide {
  width: min(1240px, 100%);
}

.admin-toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.admin-toolbar p {
  margin: 0;
  color: var(--muted);
}

.admin-table-wrap,
.admin-message,
.admin-empty {
  border: 1px solid var(--line);
  background: rgb(250 248 242 / 88%);
  box-shadow: 0 18px 60px rgb(36 34 31 / 8%);
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
  font-size: 0.875rem;
  table-layout: fixed;
}

.admin-table-date-column {
  width: 145px;
}

.admin-table-name-column {
  width: 130px;
}

.admin-table-contact-column {
  width: 180px;
}

.admin-table-actions-column {
  width: 170px;
}

.admin-table th,
.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-table-body {
  overflow-wrap: anywhere;
  white-space: normal;
}

.admin-table time {
  white-space: nowrap;
}

.admin-table-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  white-space: nowrap;
}

.admin-table-actions form {
  margin: 0;
}

.admin-danger-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: #7C302A;
  cursor: pointer;
  text-decoration: underline;
}

.admin-empty {
  margin: 0;
  padding: 28px;
  color: var(--muted);
}

.admin-message {
  padding: 30px;
}

.admin-message-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0 0 30px;
}

.admin-message-meta div {
  min-width: 0;
}

.admin-message-meta dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-message-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.admin-message-body {
  min-height: 132px;
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
  font-size: 1.0625rem;
  line-height: 1.7;
  white-space: pre-wrap;
}

@media (max-width: 860px) {
  .membrane-surface {
    padding: 28px;
  }

  .profile-intro {
    font-size: 3.25rem;
  }

  .contact-composer__field,
  .contact-composer__status {
    font-size: 0.8125rem;
  }
}

@media (max-width: 640px) {
  .membrane-surface {
    padding: 22px;
  }

  .profile-intro {
    font-size: 2.25rem;
  }

  .profile-intro h1 {
    letter-spacing: 0.14em;
    line-height: 1.25;
    text-indent: 0.14em;
  }

  .profile-intro-description {
    margin-top: 36px;
    font-size: 1rem;
    line-height: 1.65;
  }

  .profile-intro-specialty {
    margin-top: 20px;
    font-size: 0.875rem;
  }

  .contact-composer__field,
  .contact-composer__status {
    right: 16px !important;
    left: 16px !important;
    width: auto;
    font-size: 0.6875rem;
    letter-spacing: 0.02em;
    text-align: left !important;
    transform: none;
  }

  [data-contact-side="top"] .contact-composer__field,
  [data-contact-side="top"] .contact-composer__status {
    top: 28px;
    bottom: auto;
  }

  [data-contact-side="bottom"] .contact-composer__field,
  [data-contact-side="bottom"] .contact-composer__status {
    top: calc(var(--membrane-contact-edge, 73dvh) + 28px);
    bottom: auto;
  }

  .contact-composer__field.is-at-limit {
    animation-name: contact-limit-mobile;
  }

  .admin-shell {
    padding: 30px 16px 56px;
  }

  .admin-header {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-header-actions {
    justify-content: flex-start;
  }

  .admin-header h1 {
    font-size: 2.5rem;
  }

  .admin-form {
    padding: 20px;
  }

  .admin-message {
    padding: 20px;
  }

  .admin-message-meta {
    grid-template-columns: 1fr;
  }
}

@keyframes contact-limit-mobile {
  0%,
  100% {
    transform: translateX(0);
  }

  42% {
    transform: translateX(3px);
  }
}

@media (max-width: 380px) {
  .contact-composer__field,
  .contact-composer__status {
    right: 14px !important;
    left: 14px !important;
    font-size: 0.625rem;
  }

  .profile-intro {
    font-size: 1.9rem;
  }
}

@media (max-width: 340px) {
  .contact-composer__field,
  .contact-composer__status {
    font-size: 0.5625rem;
  }
}
