@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600&family=Manrope:wght@400;500;700&display=swap');

:root {
  --paper: #f3efe6;
  --paper-2: #ebe5d8;
  --ink: #16140f;
  --muted: #6d665a;
  --line: #d6cfbf;
  --accent: #d9431e;
  --accent-ink: #fff8f0;
  --ok: #2f6b3a;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Manrope', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* paper grain */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }

.shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  min-height: 100vh;
}

.aside {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem clamp(1.5rem, 5vw, 5rem);
  border-right: 1px solid var(--line);
}

.brand {
  font: 600 1.35rem var(--serif);
  letter-spacing: -.01em;
  text-decoration: none;
}
.brand span { color: var(--accent); }

.headline {
  font: 400 clamp(2.8rem, 6.5vw, 5.8rem)/.95 var(--serif);
  letter-spacing: -.035em;
  max-width: 11ch;
}
.headline em { font-style: italic; color: var(--accent); }

.aside small { color: var(--muted); font-size: .85rem; }

.main {
  display: flex;
  align-items: center;
  padding: 3rem clamp(1.5rem, 5vw, 5rem);
}

.panel { width: 100%; max-width: 380px; }

.eyebrow {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .75rem;
}

h1 {
  font: 600 2rem/1.1 var(--serif);
  letter-spacing: -.02em;
  margin-bottom: .5rem;
}
.lede { color: var(--muted); margin-bottom: 2rem; }

form { display: grid; gap: 1.1rem; }

label { display: grid; gap: .35rem; font-size: .85rem; font-weight: 500; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
.label-row a { font-weight: 400; color: var(--muted); }

input {
  width: 100%;
  padding: .8rem .9rem;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  transition: border-color .15s, box-shadow .15s;
}
input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}

button {
  margin-top: .4rem;
  padding: .9rem 1rem;
  font: 700 .95rem var(--sans);
  letter-spacing: .02em;
  color: var(--accent-ink);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 2px;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, background .12s;
}
button:hover { background: var(--accent); border-color: var(--accent); }
button:active { transform: translate(2px, 2px); }
button:disabled { opacity: .55; cursor: wait; }
button.ghost { background: transparent; color: var(--ink); }
button.ghost:hover { color: var(--accent-ink); }

.msg {
  display: none;
  padding: .75rem .9rem;
  font-size: .9rem;
  border-left: 3px solid var(--accent);
  background: var(--paper-2);
}
.msg.show { display: block; }
.msg.ok { border-left-color: var(--ok); }

.foot { margin-top: 1.75rem; font-size: .9rem; color: var(--muted); }

.card {
  padding: 1.25rem;
  margin-bottom: 2rem;
  border: 1px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  background: var(--paper);
}
.card dt { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.card dd { font: 600 1.15rem var(--serif); margin-bottom: .6rem; word-break: break-all; }
.card dd:last-child { margin-bottom: 0; }

h2 { font: 600 1.2rem var(--serif); margin: 0 0 1rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

/* one orchestrated entrance */
.rise { opacity: 0; transform: translateY(14px); animation: rise .6s cubic-bezier(.2, .7, .2, 1) forwards; }
.rise:nth-child(2) { animation-delay: .06s; }
.rise:nth-child(3) { animation-delay: .12s; }
.rise:nth-child(4) { animation-delay: .18s; }
.rise:nth-child(5) { animation-delay: .24s; }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .aside { border-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 2rem; gap: 2.5rem; }
  .headline { font-size: 2.6rem; }
  .aside small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .rise { animation: none; opacity: 1; transform: none; }
}

/* ---------- profile picture ---------- */

.avatar-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.avatar-row h2 { margin-bottom: .2rem; }
.hint { color: var(--muted); font-size: .85rem; margin-bottom: .75rem; }

.avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 50%;
  box-shadow: 4px 4px 0 var(--ink);
  background: var(--paper-2);
  font: 600 2.4rem var(--serif);
  color: var(--accent);
  transition: opacity .15s;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.busy { opacity: .45; }

.avatar-actions { display: flex; gap: .5rem; }
.avatar-actions button,
.avatar-actions .button { margin: 0; padding: .55rem .85rem; font-size: .85rem; }

/* a <label> styled like the dark button, so the file picker opens on click */
.button {
  display: inline-block;
  font: 700 .95rem var(--sans);
  letter-spacing: .02em;
  color: var(--accent-ink);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 2px;
  cursor: pointer;
  transition: background .12s;
}
.button:hover { background: var(--accent); border-color: var(--accent); }
.button:has(input:disabled) { opacity: .55; cursor: wait; }
.button:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }

#avatar-msg { margin-bottom: 1.5rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
