:root {
  color-scheme: dark;
  --profile-ink: #24201a;
  --profile-plum: #3f2548;
  --profile-indigo: #35369c;
  --profile-lavender: #7c679e;
  --profile-sage: #c8c793;
  --profile-line: rgba(200, 199, 147, .24);
  font-family: "IBM Plex Mono", monospace;
  color: var(--profile-sage);
  background: var(--profile-ink);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--profile-sage);
  background: radial-gradient(ellipse at 2% 25%, rgba(63, 37, 72, .85), transparent 38%), radial-gradient(ellipse at 95% 75%, rgba(53, 54, 156, .45), transparent 34%), radial-gradient(circle, rgba(200, 199, 147, .18) 1px, transparent 1.5px), var(--profile-ink);
  background-size: auto, auto, 56px 56px, auto;
}

body::before { position: fixed; z-index: 20; inset: 0; background: repeating-linear-gradient(to bottom, rgba(200, 199, 147, .045) 0 1px, transparent 1px 4px); content: ""; pointer-events: none; }
button, a { font: inherit; }
body > header { position: relative; z-index: 1; display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 20px; padding: 12px clamp(20px, 7vw, 104px); border-bottom: 1px solid var(--profile-line); background: rgba(36, 32, 26, .76); }
body > header h1 { margin: 0; color: var(--profile-sage); font: 11px/1.8 "Press Start 2P", monospace; }
nav[aria-label="StudySwipe sections"] { display: flex; flex-wrap: wrap; gap: 8px; }
nav[aria-label="StudySwipe sections"] button, .pixel-button { border: 1px solid var(--profile-sage); border-radius: 0; padding: 9px 12px; background: var(--profile-plum); color: var(--profile-sage); box-shadow: 3px 3px 0 var(--profile-indigo); font-size: 11px; text-decoration: none; cursor: pointer; }
nav[aria-label="StudySwipe sections"] button:hover, .pixel-button:hover { background: var(--profile-indigo); transform: translate(-1px, -1px); }
nav[aria-label="StudySwipe sections"] button:focus-visible, .pixel-button:focus-visible { outline: 2px solid var(--profile-sage); outline-offset: 3px; }
main { position: relative; z-index: 1; width: min(900px, calc(100% - 32px)); margin: 28px auto 64px; }
main > section[hidden] { display: none; }
.profile-page { max-width: 760px; margin: 0 auto; }
.profile-heading { margin: 0 0 22px; }
.pixel-eyebrow { margin: 0 0 9px; color: var(--profile-lavender); font: 7px/1.9 "Press Start 2P", monospace; letter-spacing: 0; }
.profile-heading h2 { margin: 0; color: var(--profile-sage); font: 17px/1.8 "Press Start 2P", monospace; }
.profile-subtitle, .profile-status { color: rgba(200, 199, 147, .78); font-size: 12px; line-height: 1.6; }
.profile-status { min-height: 20px; }
.identity-card, .profile-card { border: 1px solid var(--profile-line); border-top: 2px solid var(--profile-sage); background: linear-gradient(130deg, rgba(63, 37, 72, .96), rgba(36, 32, 26, .94)); box-shadow: 4px 5px 0 rgba(36, 32, 26, .8), 0 0 0 2px rgba(53, 54, 156, .7); }
.identity-card { display: flex; align-items: center; gap: 18px; padding: 20px; }
.avatar { display: grid; width: 74px; height: 74px; flex: 0 0 74px; place-items: center; border: 2px solid var(--profile-sage); background: linear-gradient(145deg, var(--profile-lavender), var(--profile-indigo)); box-shadow: 4px 4px 0 var(--profile-ink); color: var(--profile-sage); font: 20px "Press Start 2P", monospace; }
.identity-copy { min-width: 0; flex: 1; }
.identity-copy .pixel-eyebrow { margin-bottom: 8px; }
.identity-copy h3 { margin: 0; color: var(--profile-sage); font-size: 20px; overflow-wrap: anywhere; }
.profile-handle, .linkedin-link { display: inline-block; margin: 6px 12px 0 0; color: rgba(200, 199, 147, .75); font-size: 11px; }
.linkedin-link { color: var(--profile-sage); }
.edit-profile { flex: 0 0 auto; }
.profile-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; margin-top: 20px; }
.profile-card { padding: 18px; }
.detail-list { display: grid; gap: 0; margin: 0; }
.detail-list div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--profile-line); }
.detail-list dt { color: rgba(200, 199, 147, .68); font-size: 11px; }
.detail-list dd { margin: 0; color: var(--profile-sage); font-size: 12px; overflow-wrap: anywhere; }
.interest-list { display: flex; flex-wrap: wrap; gap: 8px; }
.interest-chip { border: 1px solid var(--profile-lavender); padding: 7px 9px; background: var(--profile-plum); box-shadow: 2px 2px 0 var(--profile-indigo); color: var(--profile-sage); font-size: 11px; }
.muted-copy { margin: 0; color: rgba(200, 199, 147, .68); font-size: 12px; line-height: 1.6; }
.journey-section { margin-top: 30px; }
.journey-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.journey-heading .pixel-eyebrow { margin-bottom: 6px; }
.journey-heading h3 { margin: 0; color: var(--profile-sage); font: 10px/1.8 "Press Start 2P", monospace; }
.experience-list { display: grid; gap: 12px; }
.experience-item { display: grid; grid-template-columns: 16px 1fr; gap: 14px; border: 1px solid var(--profile-line); padding: 16px; background: rgba(63, 37, 72, .68); box-shadow: 3px 3px 0 rgba(36, 32, 26, .85); }
.experience-marker { width: 12px; height: 12px; margin-top: 4px; border: 2px solid var(--profile-sage); background: var(--profile-indigo); box-shadow: 2px 2px 0 var(--profile-ink); }
.experience-content h4 { margin: 0 0 5px; color: var(--profile-sage); font-size: 14px; }
.experience-organization, .experience-dates, .experience-description { margin: 4px 0 0; color: rgba(200, 199, 147, .75); font-size: 11px; line-height: 1.55; }
.experience-dates { color: var(--profile-lavender); }
.experience-description { color: rgba(200, 199, 147, .9); }
@media (max-width: 680px) { body > header { align-items: flex-start; flex-direction: column; } nav[aria-label="StudySwipe sections"] { width: 100%; } nav[aria-label="StudySwipe sections"] button { flex: 1 1 auto; } .profile-grid { grid-template-columns: 1fr; } .identity-card { align-items: flex-start; flex-wrap: wrap; } .identity-copy { flex-basis: calc(100% - 100px); } .edit-profile { margin-left: 92px; } .journey-heading { align-items: flex-start; flex-direction: column; } }

/* Profile setup shares the same pixel interface. */
body:has(#experience-form) > header { border-bottom: 1px solid var(--profile-line); }
body:has(#experience-form) > header h1 { font-size: 12px; }
body:has(#experience-form) main { max-width: 620px; }
#profile-status { border-left: 2px solid var(--profile-lavender); padding: 8px 12px; background: rgba(63, 37, 72, .55); }
#experience-form { display: grid; gap: 14px; padding: 22px; border: 1px solid var(--profile-line); border-top: 2px solid var(--profile-sage); background: linear-gradient(130deg, rgba(63, 37, 72, .96), rgba(36, 32, 26, .94)); box-shadow: 4px 5px 0 rgba(36, 32, 26, .8), 0 0 0 2px rgba(53, 54, 156, .7); }
#experience-form h2 { margin: 0 0 4px; font: 10px/1.8 "Press Start 2P", monospace; }
#experience-form label { display: grid; gap: 7px; color: rgba(200, 199, 147, .82); font-size: 11px; }
#experience-form input, #experience-form select, #experience-form textarea { width: 100%; border: 1px solid var(--profile-line); border-radius: 0; padding: 10px; background: rgba(36, 32, 26, .8); color: var(--profile-sage); font: inherit; }
#experience-form input[type="checkbox"] { width: auto; accent-color: var(--profile-indigo); }
#experience-form button { justify-self: start; border: 1px solid var(--profile-sage); padding: 10px 14px; background: linear-gradient(145deg, var(--profile-lavender), var(--profile-indigo)); color: var(--profile-sage); box-shadow: 4px 4px 0 rgba(36, 32, 26, .8); cursor: pointer; }
body:has(#experience-form) main > p:last-child a { color: var(--profile-sage); }

/* Matching branch swipe interface embedded in the signed-in app. */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
#swipe:has(.matching-interface) { width: 100%; }
.matching-interface { display: block; width: 100%; height: min(1120px, calc(100vh + 240px)); min-height: 760px; border: 0; background: transparent; }
@media (max-width: 680px) { .matching-interface { height: 1060px; min-height: 1060px; } }

/* Chats branch interface embedded in the signed-in app. */
#chats:has(.chat-interface) { width: 100%; }
.chat-interface { display: block; width: 100%; height: min(850px, calc(100vh - 132px)); min-height: 640px; border: 0; background: transparent; }
@media (max-width: 680px) { .chat-interface { height: 760px; min-height: 760px; } }
