/* Shared modal shell + quotes notepad + sticky note + contact + resume */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 3vw, 2rem);
}

.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 8, 4, 0.78);
  backdrop-filter: blur(4px);
  border: none;
  padding: 0;
  cursor: pointer;
}

.modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 42rem);
  max-height: min(92dvh, 48rem);
  display: flex;
  flex-direction: column;
  background: #f7f3ea;
  color: #1a1a1a;
  border-radius: 4px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 18px 48px rgba(20, 14, 8, 0.45);
  outline: none;
}

/* ---------- Quotes: the whole notepad IS the modal ---------- */

.modal__dialog--quotes {
  /*
   * Notepad aspect ≈ 0.70 (w/h). Size from viewport height so the pad
   * fills most of the screen; width follows so it doesn’t crop the art.
   */
  width: min(96vw, 90dvh * 0.7);
  max-height: 96dvh;
  container-type: inline-size;
  container-name: quotes-modal;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  display: block;
  overflow: visible;
}

.modal__chrome {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
}

.modal__dialog--quotes .modal__chrome {
  position: absolute;
  z-index: 3;
  left: 8%;
  right: 4%;
  top: 10%; /* clear metal spiral */
  width: auto;
  padding: 0;
  padding-top: 0.15rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  pointer-events: none; /* only close is clickable */
}

.modal__dialog--quotes .modal__title {
  flex: 0 1 auto;
  pointer-events: none;
  padding-top: 0;
  line-height: 1.1;
}

.modal__dialog--quotes .modal__chrome .modal__close {
  pointer-events: auto;
  flex: 0 0 auto;
  margin: 0;
  color: #243052;
  background: transparent;
  align-self: center;
}

.modal__dialog--quotes .modal__chrome .modal__close:hover {
  background: rgba(0, 0, 0, 0.05);
}

.modal__dialog--quotes .modal__body {
  padding: 0;
  overflow: visible;
  flex: none;
  min-height: 0;
}

.modal__dialog--quotes .modal__footer {
  position: absolute;
  z-index: 3;
  /* Match Inspiration chrome horizontal inset */
  left: 8%;
  right: 4%;
  bottom: 5%;
  width: auto;
  transform: none;
  padding: 0 2% 0 0; /* Next a bit farther from pad edge */
  border: none;
  background: transparent;
  justify-content: space-between;
  gap: 0.75rem;
}

.modal__title {
  margin: 0;
  font-family: var(--font-hand);
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
  color: rgba(36, 48, 82, 0.75);
}

.modal__dialog--quotes .modal__title {
  font-size: max(1.2rem, 5.4cqi);
  color: #243052;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: from-font;
}

/* Quotes panel chrome uses hand lettering throughout */
.modal__dialog--quotes .modal__title,
.modal__dialog--quotes .modal__btn,
.modal__dialog--quotes .modal__meta {
  font-family: var(--font-hand);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
}

.modal__close {
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(30, 30, 40, 0.7);
  font-size: 1.5rem;
  line-height: 1;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.modal__close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #111;
}

.modal__close:focus-visible {
  outline: 3px solid #2b6cb0;
  outline-offset: 2px;
}

.modal__body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 0.5rem 1.25rem 1rem 1.75rem;
  min-height: 0;
}

.modal__footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.modal__btn {
  appearance: none;
  border: none;
  background: transparent;
  color: #243052;
  font-family: var(--font-ui, system-ui, sans-serif);
  font-size: 0.85rem;
  padding: 0.35rem 0.25rem;
  border-radius: 4px;
  cursor: pointer;
}

.modal__btn:hover {
  background: transparent;
  color: #111;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.modal__btn:focus-visible {
  outline: 3px solid #2b6cb0;
  outline-offset: 2px;
}

/* Quotes nav: soft ink underline instead of loud system blue box */
.modal__dialog--quotes .modal__btn:focus,
.modal__dialog--quotes .modal__btn:focus-visible {
  outline: none;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  color: #111;
}

.modal__dialog--quotes .modal__close:focus,
.modal__dialog--quotes .modal__close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(36, 48, 82, 0.35);
  background: rgba(0, 0, 0, 0.04);
}

.modal__dialog--quotes:focus,
.modal__dialog--quotes:focus-visible {
  outline: none;
}

.modal__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.modal__dialog--quotes .modal__btn {
  font-size: max(1rem, 3.9cqi);
}

.modal__meta {
  font-family: var(--font-ui, system-ui, sans-serif);
  font-size: 0.75rem;
  color: rgba(36, 48, 82, 0.55);
  min-width: 4ch;
  text-align: center;
}

.modal__dialog--quotes .modal__meta {
  font-size: max(0.95rem, 3.6cqi);
  color: #243052;
  opacity: 0.75;
}

/* Pad art + writing area */
.quotes-pad {
  position: relative;
  width: 100%;
  line-height: 0; /* kill gap under img */
}

.quotes-pad__art {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(4px 10px 18px rgba(20, 14, 8, 0.45));
}

.quotes-pad__writing {
  position: absolute;
  /* Equal sides; sit closer under Inspiration chrome */
  left: 10%;
  right: 10%;
  top: 19.5%; /* a touch more air under Inspiration */
  bottom: 12%;
  overflow: auto;
  line-height: normal;
  text-align: left;
  pointer-events: none; /* text not interactive */
}

.quotes-view__text {
  margin: 0;
  font-family: var(--font-hand);
  font-size: max(1.15rem, 5.2cqi);
  line-height: 1.42;
  color: #243052;
  border: none;
  padding: 0;
}

.quotes-view__author {
  margin: 0;
  padding-top: 0.55em;
  font-family: var(--font-hand);
  font-size: max(1rem, 4cqi);
  color: #243052;
  opacity: 0.9;
}

/* ---------- Sticky: the sticky note IS the modal ---------- */

.modal__dialog--sticky {
  /* Sticky art ≈ square (613×595). Size from the shorter viewport side. */
  width: min(96vw, 72dvh);
  max-height: 96dvh;
  container-type: inline-size;
  container-name: sticky-modal;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  display: block;
  overflow: visible;
}

.modal__dialog--sticky .modal__chrome {
  position: absolute;
  z-index: 3;
  left: 12%;
  right: 8%;
  top: 9%;
  width: auto;
  padding: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.modal__dialog--sticky .modal__title {
  flex: 0 1 auto;
  pointer-events: none;
  font-family: var(--font-hand);
  font-size: max(1.2rem, 5.2cqi);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #1a2744;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: from-font;
}

.modal__dialog--sticky .modal__chrome .modal__close {
  pointer-events: auto;
  flex: 0 0 auto;
  margin: 0;
  color: #1a2744;
  background: transparent;
  align-self: center;
}

.modal__dialog--sticky .modal__chrome .modal__close:hover {
  background: rgba(0, 0, 0, 0.06);
}

.modal__dialog--sticky .modal__body {
  padding: 0;
  overflow: visible;
  flex: none;
  min-height: 0;
}

.modal__dialog--sticky .modal__footer {
  display: none;
}

.modal__dialog--sticky .modal__close:focus,
.modal__dialog--sticky .modal__close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(26, 39, 68, 0.35);
  background: rgba(0, 0, 0, 0.04);
}

.modal__dialog--sticky:focus,
.modal__dialog--sticky:focus-visible {
  outline: none;
}

.sticky-note-modal {
  position: relative;
  width: 100%;
  line-height: 0;
}

.sticky-note-modal__art {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(4px 10px 18px rgba(20, 14, 8, 0.45));
}

.sticky-note-modal__writing {
  position: absolute;
  left: 12%;
  right: 11%;
  /* Clear the chrome title; list margin adds a little more air under the underline */
  top: 22%;
  bottom: 10%;
  overflow: auto;
  line-height: normal;
  text-align: left;
  pointer-events: auto; /* allow scroll if list is long */
}

.sticky-list {
  margin: 0.45em 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-hand);
  font-size: max(1rem, 3.85cqi);
  line-height: 1.26;
  color: #1a2744;
}

.sticky-list > li {
  margin: 0 0 0.32em;
}

.sticky-list__label {
  display: block;
}

.sticky-list__sub {
  margin: 0.1em 0 0.25em;
  padding: 0 0 0 0.85em;
  list-style: none;
  font-size: 0.9em;
  opacity: 0.9;
  line-height: 1.25;
}

.sticky-list__sub-item {
  margin: 0 0 0.08em;
}

.sticky-list__sub-item::before {
  content: "– ";
  opacity: 0.65;
}

/* ---------- Contact: paper sheet + Lamy across the top ---------- */

.modal__dialog--contact {
  width: min(96vw, 58dvh);
  max-height: 90dvh;
  container-type: inline-size;
  container-name: contact-modal;
  /* Soft white paper + subtle fiber grain */
  background-color: #fbf9f4;
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(255, 255, 255, 0.65) 0%, transparent 45%),
    radial-gradient(ellipse at 80% 90%, rgba(230, 224, 210, 0.35) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
  background-blend-mode: normal, normal, multiply;
  border-radius: 1em;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.75) inset,
    0 14px 40px rgba(20, 14, 8, 0.4);
  overflow: visible;
  margin-top: 1.25rem; /* pen can sit on the top edge without clipping */
}

.modal__dialog--contact .modal__chrome {
  padding: max(1.7rem, 5.2cqi) 1.1rem 0.25rem 1.5rem; /* air under pen; title hidden */
  border: none;
  position: relative;
  z-index: 8;
  justify-content: flex-end; /* close only */
}

/* Title sits under the Lamy — hide it; spacing stays via chrome padding */
.modal__dialog--contact .modal__title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.modal__dialog--contact .modal__close {
  position: relative;
  z-index: 9;
  color: #1a2744;
}

.modal__dialog--contact .modal__close:hover {
  background: rgba(0, 0, 0, 0.05);
}

.modal__dialog--contact .modal__close:focus,
.modal__dialog--contact .modal__close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(26, 39, 68, 0.3);
}

.modal__dialog--contact:focus,
.modal__dialog--contact:focus-visible {
  outline: none;
}

.modal__dialog--contact .modal__body {
  padding: max(1.15rem, 4.4cqi) 1.5rem 1.35rem 1.5rem; /* keep Name under the barrel */
  overflow: visible; /* let Lamy hang over the paper edge */
}

.modal__dialog--contact .modal__footer {
  display: none;
}

/* Lamy rests across the top edge of the paper, slight tilt */
.modal__dialog--contact .contact-sheet__pen {
  position: absolute;
  z-index: 3;
  top: max(-1.55rem, -3.4cqi);
  left: -2%;
  width: 100%;
  transform: rotate(-6deg);
  transform-origin: center center;
  pointer-events: none;
  line-height: 0;
}

.modal__dialog--contact .contact-sheet__pen img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(1px 3px 4px rgba(20, 14, 8, 0.35));
}

.contact-form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
  margin: 0;
  padding: 0.15rem 0 0;
  max-height: 62dvh;
  overflow: auto;
}

.contact-form__row {
  display: grid;
  grid-template-columns: minmax(4.5rem, 22%) 1fr;
  gap: 0.5rem 0.85rem;
  align-items: baseline;
}

.contact-form__row--message {
  align-items: start;
}

.contact-form__row--message .contact-form__label {
  padding-top: 0.35rem;
}

.contact-form__label {
  font-family: var(--font-hand);
  font-size: max(1rem, 3.9cqi);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: #1a2744;
  line-height: 1.2;
}

.contact-form__input {
  appearance: none;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0.2rem 0.15rem 0.3rem;
  border: none;
  border-bottom: 1.5px solid rgba(26, 39, 68, 0.35);
  border-radius: 0;
  background: transparent;
  color: #1a1a1a;
  font-family: var(--font-ui, system-ui, sans-serif);
  font-size: max(0.9rem, 2.8cqi);
  line-height: 1.35;
  outline: none;
  transition: border-color 0.15s ease;
}

.contact-form__input:hover {
  border-bottom-color: rgba(26, 39, 68, 0.55);
}

.contact-form__input:focus {
  border-bottom-color: #1a2744;
}

.contact-form__input:focus-visible {
  box-shadow: 0 2px 0 0 rgba(26, 39, 68, 0.15);
}

.contact-form__textarea {
  appearance: none;
  width: 100%;
  min-width: 0;
  min-height: 8.5rem;
  margin: 0;
  padding: 0.5rem 0.55rem;
  border: 1px solid rgba(26, 39, 68, 0.28);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.35);
  color: #1a1a1a;
  font-family: var(--font-ui, system-ui, sans-serif);
  font-size: max(0.9rem, 2.8cqi);
  line-height: 1.45;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.contact-form__textarea:hover {
  border-color: rgba(26, 39, 68, 0.45);
}

.contact-form__textarea:focus {
  border-color: #1a2744;
  background: rgba(255, 255, 255, 0.55);
}

.contact-form__textarea:focus-visible {
  box-shadow: 0 0 0 2px rgba(26, 39, 68, 0.12);
}

/* Honeypot — leave in DOM for bots; hide from humans */
.contact-form__hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem 1.25rem;
  margin-top: 0.25rem;
}

.contact-form__submit {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0.25rem 0.1rem;
  margin-left: auto;
  font-family: var(--font-hand);
  font-size: max(1.1rem, 4.2cqi);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: #1a2744;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: from-font;
}

.contact-form__submit:hover {
  color: #0d1528;
}

.contact-form__submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(26, 39, 68, 0.28);
  border-radius: 2px;
}

.contact-form__submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.contact-form__status {
  margin: 0;
  margin-right: auto;
  font-family: var(--font-ui, system-ui, sans-serif);
  font-size: 0.8rem;
  line-height: 1.35;
  color: rgba(26, 39, 68, 0.7);
  min-height: 1.2em;
  flex: 1 1 auto;
}

.contact-form__status[data-tone="error"] {
  color: #8b2e2e;
}

.contact-form__status[data-tone="ok"] {
  color: #1e5a3a;
}

/* ---------- Resume: letter-size paper (same family as contact) ---------- */

.modal__dialog--resume {
  /* Floor 36rem so MBA/laptop stays a two-column letter, not the phone stack.
     min(96vw, …) keeps the same formula from overflowing a narrow window. */
  width: min(96vw, clamp(36rem, 52dvh, 70vw));
  max-height: 90dvh;
  container-type: inline-size;
  container-name: resume;
  background-color: #fbf9f4;
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(255, 255, 255, 0.65) 0%, transparent 45%),
    radial-gradient(ellipse at 80% 90%, rgba(230, 224, 210, 0.35) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
  background-blend-mode: normal, normal, multiply;
  border-radius: 1em;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.75) inset,
    0 14px 40px rgba(20, 14, 8, 0.4);
  overflow: hidden;
}

.modal__dialog--resume .modal__chrome {
  padding: 0.65rem 0.85rem 0 1.15rem;
  border: none;
  justify-content: flex-end;
}

.modal__dialog--resume .modal__title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.modal__dialog--resume .modal__close {
  color: #1a2744;
}

.modal__dialog--resume .modal__close:hover {
  background: rgba(0, 0, 0, 0.05);
}

.modal__dialog--resume .modal__close:focus,
.modal__dialog--resume .modal__close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(26, 39, 68, 0.3);
}

.modal__dialog--resume:focus,
.modal__dialog--resume:focus-visible {
  outline: none;
}

.modal__dialog--resume .modal__body {
  padding: 0.15rem 1.45rem 1.25rem 1.45rem;
  overflow: auto;
}

.modal__dialog--resume .modal__footer {
  display: none;
}

.resume-sheet {
  margin: 0;
  color: #1a1a1a;
}

.resume-sheet__head {
  display: flex;
  align-items: center;
  gap: 1rem 1.15rem;
  margin: 0 0 1.15rem;
  padding-bottom: 0.95rem;
  border-bottom: 1px solid rgba(26, 39, 68, 0.16);
}

.resume-sheet__card {
  flex: 0 0 auto;
  width: 38%;
  height: auto;
  display: block;
  border-radius: 2px;
  transform: rotate(-3deg);
  filter: drop-shadow(1px 3px 4px rgba(20, 14, 8, 0.28));
  pointer-events: none;
  user-select: none;
}

.resume-sheet__identity {
  min-width: 0;
  flex: 1 1 auto;
}

.resume-sheet__name {
  margin: 0;
  font-family: var(--font-hand);
  font-size: max(1.4rem, 5.6cqi);
  font-weight: 400;
  line-height: 1.15;
  color: #1a2744;
  letter-spacing: 0.01em;
}

.resume-sheet__tagline {
  margin: 0.35rem 0 0;
  font-family: var(--font-ui, system-ui, sans-serif);
  font-size: max(0.7rem, 2.2cqi);
  line-height: 1.35;
  color: rgba(26, 39, 68, 0.72);
}

.resume-sheet__section {
  margin: 0 0 0.95rem;
}

.resume-sheet__h {
  margin: 0 0 0.35rem;
  font-family: var(--font-hand);
  font-size: max(1rem, 3.4cqi);
  font-weight: 400;
  letter-spacing: 0.03em;
  color: #1a2744;
}

.resume-places,
.resume-roles,
.resume-work {
  margin: 0;
  padding: 0;
  list-style: none;
}

.resume-places {
  display: grid;
  gap: 0.2rem 1rem;
}

.resume-places li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
  font-size: max(0.85rem, 2.4cqi);
  line-height: 1.35;
}

.resume-places__label {
  font-size: max(0.65rem, 1.9cqi);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(26, 39, 68, 0.55);
}

.resume-places__place {
  color: #1a1a1a;
}

.resume-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.4rem;
}

.resume-roles li {
  font-size: max(0.75rem, 2.15cqi);
  line-height: 1.25;
  color: #1a2744;
  background: rgba(26, 39, 68, 0.05);
  border: 1px solid rgba(26, 39, 68, 0.1);
  border-radius: 999px;
  padding: 0.22rem 0.65rem;
}

.resume-work {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.resume-work li {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 0.15rem 0.85rem;
  align-items: baseline;
  font-size: max(0.84rem, 2.35cqi);
  line-height: 1.3;
}

.resume-work__main {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
}

.resume-work__org {
  font-weight: 600;
  color: #1a1a1a;
}

.resume-work__place {
  font-size: max(0.7rem, 2cqi);
  line-height: 1.25;
  color: rgba(26, 39, 68, 0.55);
}

.resume-work__role {
  color: rgba(26, 39, 68, 0.78);
  font-size: max(0.78rem, 2.2cqi);
}

.resume-work__misc {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
  margin: 0.7rem 0 0;
  font-size: max(0.78rem, 2.2cqi);
  line-height: 1.35;
  color: #1a1a1a;
}

.resume-work__misc-label {
  font-size: max(0.65rem, 1.9cqi);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(26, 39, 68, 0.55);
}

.resume-sheet__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0.45rem 1rem;
  margin-top: 0.35rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(26, 39, 68, 0.16);
}

.resume-sheet__social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.resume-sheet__link {
  font-size: max(0.75rem, 2.1cqi);
  color: #1a2744;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.resume-sheet__link:hover {
  color: #0d1528;
}

.resume-sheet__link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(26, 39, 68, 0.28);
  border-radius: 2px;
}

/* ---------- Identity: blown-up 35mm slide ---------- */

.modal__dialog--identity {
  width: min(92vw, 88dvh * 0.96);
  max-height: 96dvh;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  display: block;
  container-type: inline-size;
  container-name: identity-modal;
}

.modal__dialog--identity .modal__chrome {
  position: absolute;
  z-index: 3;
  left: 8%;
  right: 6%;
  top: 5.5%;
  width: auto;
  padding: 0;
  border: none;
  justify-content: flex-end;
  pointer-events: none;
}

.modal__dialog--identity .modal__title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.modal__dialog--identity .modal__chrome .modal__close {
  pointer-events: auto;
  color: #1a1a1a;
  background: transparent;
}

.modal__dialog--identity .modal__close:hover {
  background: rgba(0, 0, 0, 0.06);
}

.modal__dialog--identity .modal__close:focus,
.modal__dialog--identity .modal__close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(26, 39, 68, 0.3);
}

.modal__dialog--identity:focus,
.modal__dialog--identity:focus-visible {
  outline: none;
}

.modal__dialog--identity .modal__body {
  padding: 0;
  overflow: visible;
}

.modal__dialog--identity .modal__footer {
  display: none;
}

.identity-slide {
  position: relative;
  width: 100%;
  line-height: 0;
}

.identity-slide__back {
  position: absolute;
  z-index: 0;
  /* Grow past the film so the lift tucks under the black/white frame. */
  left: calc(var(--slide-window-left) - 3%);
  top: calc(var(--slide-window-top) - 3%);
  right: calc(var(--slide-window-right) - 3%);
  bottom: calc(var(--slide-window-bottom) - 3%);
  background: var(--slide-film-lift);
  pointer-events: none;
}

.identity-slide__mount {
  display: block;
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(4px 12px 22px rgba(20, 14, 8, 0.45));
}

.identity-slide__window {
  position: absolute;
  z-index: 2;
  left: var(--slide-window-left);
  top: var(--slide-window-top);
  right: var(--slide-window-right);
  bottom: var(--slide-window-bottom);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
  pointer-events: none;
}

.identity-slide__logo {
  display: block;
  width: 90%;
  height: 90%;
  object-fit: contain;
  object-position: center center;
  box-sizing: border-box;
  background: transparent;
}

.identity-slide__label {
  position: absolute;
  z-index: 3;
  left: 10.1%;
  top: 52%;
  right: auto;
  bottom: auto;
  margin: 0;
  max-width: 62%;
  font-family: var(--font-marker);
  font-size: max(1.1rem, 6.2cqi);
  font-weight: 400;
  line-height: 1.05;
  text-align: center;
  white-space: nowrap;
  color: #161616;
  transform: translate(-50%, -50%) rotate(-90deg);
  transform-origin: center center;
  pointer-events: none;
}

/* ---------- iPad Mini: device chrome + types home ---------- */

.modal__dialog--ipad {
  width: min(92vw, 90dvh * 0.687);
  max-height: 96dvh;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  display: block;
}

.modal__dialog--ipad .modal__chrome {
  position: absolute;
  z-index: 4;
  left: 6%;
  right: 4%;
  top: 2.5%;
  width: auto;
  padding: 0;
  border: none;
  justify-content: flex-end;
  pointer-events: none;
}

.modal__dialog--ipad .modal__title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.modal__dialog--ipad .modal__chrome .modal__close {
  pointer-events: auto;
  color: #e8e8e8;
  background: transparent;
}

.modal__dialog--ipad .modal__close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.modal__dialog--ipad .modal__close:focus,
.modal__dialog--ipad .modal__close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45);
}

.modal__dialog--ipad:focus,
.modal__dialog--ipad:focus-visible {
  outline: none;
}

.modal__dialog--ipad .modal__body {
  padding: 0;
  overflow: visible;
}

.modal__dialog--ipad .modal__footer {
  display: none;
}

.ipad-device {
  position: relative;
  width: 100%;
  line-height: 0;
}

.ipad-device__bezel {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(4px 16px 28px rgba(12, 8, 4, 0.5));
}

/* Glass inset measured from ipad-mini.png (641×933). */
.ipad-device__screen {
  position: absolute;
  z-index: 2;
  left: var(--ipad-screen-left);
  top: var(--ipad-screen-top);
  width: var(--ipad-screen-width);
  height: var(--ipad-screen-height);
  overflow: hidden;
  background: var(--ipad-wallpaper) center / cover no-repeat;
  container-type: inline-size;
  container-name: ipad-glass;
}

.ipad-device__home {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 93.8%;
  width: 11.5%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.ipad-device__home:focus,
.ipad-device__home:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.55);
}

.ipad-widgets {
  display: flex;
  flex-direction: column;
  gap: 3.2%;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 3.6% 4%;
}

.ipad-widget {
  position: relative;
  flex: 1 1 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  margin: 0;
  padding: 1.7cqi 2.3cqi 1.2cqi;
  border: 0.28cqi solid #fff;
  border-radius: 2cqi;
  cursor: pointer;
  overflow: hidden;
  background-color: #2a3348;
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow: 0 2px 6px rgba(10, 16, 32, 0.22);
}

.ipad-widget::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    to left,
    rgba(8, 12, 24, 0.48) 0%,
    rgba(8, 12, 24, 0.12) 42%,
    transparent 70%
  );
  pointer-events: none;
}

.ipad-widget:hover {
  filter: brightness(1.08);
}

.ipad-widget:focus,
.ipad-widget:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 0.28cqi #fff,
    0 0 0 0.7cqi rgba(28, 79, 156, 0.55);
}

.ipad-widget__label {
  position: relative;
  z-index: 1;
  font-family: var(--font-ui);
  font-size: max(0.78rem, 4.4cqi);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: #fff;
  text-align: right;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
}

.ipad-folder,
.ipad-app,
.ipad-viewer {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  font-family: var(--font-ui);
}

.ipad-folder {
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(
    180deg,
    rgba(16, 24, 40, 0.22) 0%,
    rgba(16, 24, 40, 0.38) 100%
  );
}

.ipad-folder__bar,
.ipad-app__bar,
.ipad-viewer__bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9cqi;
  min-height: max(1.85rem, 8.4cqi);
  padding: 0.95cqi 1.2cqi;
}

.ipad-folder__bar {
  background: rgba(12, 16, 28, 0.42);
}

.ipad-folder__title,
.ipad-app__title {
  flex: 1 1 auto;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: max(0.78rem, 3.4cqi);
  font-weight: 600;
  text-align: center;
}

.ipad-folder__title {
  color: #fff;
}

.ipad-bar__back,
.ipad-viewer__close,
.ipad-viewer__nav {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.45cqi 0.8cqi;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: max(0.7rem, 3cqi);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.ipad-bar__back {
  padding: 0.9cqi 2.6cqi;
  border-radius: 999px;
  color: #f4f7ff;
  background: rgba(255, 255, 255, 0.22);
  text-align: center;
  line-height: 1.25;
  min-width: 10cqi;
}

.ipad-bar__back--ghost {
  visibility: hidden;
  pointer-events: none;
}

.ipad-bar__back:hover {
  background: rgba(255, 255, 255, 0.32);
}

.ipad-bar__back:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7);
}

.ipad-viewer__close:focus-visible,
.ipad-viewer__nav:focus-visible,
.ipad-icon:focus-visible,
.ipad-app__thumb:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7);
  border-radius: 4px;
}

.ipad-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-content: start;
  gap: 3.4cqi 1.05cqi;
  padding: 2.6cqi 1.6cqi 3cqi;
  overflow: auto;
}

.ipad-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65cqi;
  margin: 0.55cqi 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #fff;
}

.ipad-icon__face {
  display: block;
  flex: 0 0 auto;
  width: 10.6cqi;
  height: 10.6cqi;
  overflow: hidden;
  border-radius: 22%;
  background: #f4f6fa;
  box-shadow: 0 2px 5px rgba(8, 12, 24, 0.28);
}

.ipad-icon__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  background: #fff;
}

.ipad-icon__letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 5.2cqi;
  font-weight: 700;
  color: #1c4f9c;
}

.ipad-icon__name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: max(0.55rem, 2.3cqi);
  font-weight: 600;
  line-height: 1.15;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.ipad-folder-empty {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.9cqi;
  text-align: center;
  color: #fff;
}

.ipad-folder-empty__title {
  margin: 0 0 0.35em;
  font-size: max(0.85rem, 3.7cqi);
  font-weight: 600;
}

.ipad-folder-empty__copy {
  margin: 0;
  font-size: max(0.75rem, 3.2cqi);
  color: rgba(255, 255, 255, 0.78);
}

.ipad-app {
  background: #e7ebf2;
  color: #1a1f2c;
}

.ipad-app__bar {
  background: #2a3348;
  color: #fff;
}

.ipad-app__title {
  color: #fff;
}

.ipad-app__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 1.6cqi 1.75cqi 2cqi;
}

.ipad-app__headline {
  margin: 0 0 0.45em;
  font-size: max(1rem, 4.3cqi);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #1a2744;
}

.ipad-app__meta {
  margin: 0 0 0.75em;
  padding: 0.45em 0 0.55em;
  border-bottom: 1px solid #c9d0dc;
}

.ipad-app__meta-label {
  margin: 0 0 0.45em;
  font-size: max(0.55rem, 2.3cqi);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5c6780;
}

.ipad-app__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7cqi;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ipad-app__chip {
  padding: 0.46cqi 1.16cqi;
  border-radius: 999px;
  font-size: max(0.55rem, 2.3cqi);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.ipad-app__chip--0 {
  background: #d7e8ff;
  color: #18427a;
}

.ipad-app__chip--1 {
  background: #d8f3ea;
  color: #145a46;
}

.ipad-app__chip--2 {
  background: #f3e2ff;
  color: #5a237d;
}

.ipad-app__chip--3 {
  background: #ffe4d4;
  color: #8a3a12;
}

.ipad-app__chip--4 {
  background: #ffe8ef;
  color: #8a2450;
}

.ipad-app__body {
  font-size: max(0.7rem, 2.9cqi);
  line-height: 1.5;
  color: #2a3140;
}

.ipad-app__p {
  margin: 0 0 0.7em;
}

.ipad-app__p:last-child {
  margin-bottom: 0;
}

.ipad-app__strip {
  flex: 0 0 auto;
  display: flex;
  gap: 0.8cqi;
  padding: 0.95cqi 1.15cqi;
  overflow-x: auto;
  background: #d7dde8;
  border-top: 1px solid #c5ccd8;
}

.ipad-app__thumb {
  flex: 0 0 auto;
  width: 11.7cqi;
  height: 11.7cqi;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(30, 40, 60, 0.15);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
}

.ipad-app__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ipad-viewer {
  background: #000;
  color: #fff;
}

.ipad-viewer__bar {
  background: rgba(0, 0, 0, 0.72);
}

.ipad-viewer__close {
  color: #fff;
  font-size: max(1.05rem, 4.6cqi);
  line-height: 1;
  min-width: 4.2cqi;
}

.ipad-viewer__meta {
  font-size: max(0.65rem, 2.8cqi);
  color: rgba(255, 255, 255, 0.8);
}

.ipad-viewer__stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.ipad-viewer__scroll {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.ipad-viewer__img {
  display: block;
  width: 100%;
  height: auto;
}

.ipad-viewer__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 3.9cqi;
  height: 5.6cqi;
  color: #fff;
  font-size: 5cqi;
  line-height: 1;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 4px;
  pointer-events: auto;
}

.ipad-viewer__nav--prev {
  left: 0.6cqi;
}

.ipad-viewer__nav--next {
  right: 0.6cqi;
}

.ipad-viewer__full {
  position: absolute;
  right: 0.85cqi;
  bottom: 0.85cqi;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5cqi;
  height: 3.5cqi;
  min-width: 22px;
  min-height: 22px;
  color: #fff;
  background: rgba(8, 10, 14, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.ipad-viewer__full:hover,
.ipad-viewer__full:focus-visible {
  background: rgba(8, 10, 14, 0.72);
  outline: none;
}

.ipad-viewer__full-icon {
  display: block;
  width: 48%;
  height: 48%;
}

body.modal-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .modal__backdrop {
    backdrop-filter: none;
  }

  .contact-form__input,
  .contact-form__textarea {
    transition: none;
  }
}

/* Narrow resume paper (small dialog) — stack instead of clipping.
   Container query, not a viewport breakpoint. */
@container resume (max-width: 32rem) {
  .resume-sheet__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
  }

  .resume-sheet__card {
    width: min(52%, 10.5rem);
  }

  .resume-places li,
  .resume-work li {
    grid-template-columns: 1fr;
    gap: 0.08rem;
  }
}
