:root {
  --bg: #f4f1eb;
  --bg-elevated: #fffcf7;
  --ink: #12151a;
  --muted: #5c6470;
  --line: rgba(18, 21, 26, 0.1);
  --accent: #1e3a2f;
  --accent-soft: rgba(30, 58, 47, 0.12);
  --wash: radial-gradient(1200px 600px at 10% -10%, rgba(30, 58, 47, 0.09), transparent 55%),
    radial-gradient(900px 500px at 95% 0%, rgba(94, 124, 112, 0.12), transparent 50%);
  --font-display: "Cormorant Garamond", "Georgia", serif;
  --font-sans: "Libre Franklin", system-ui, sans-serif;
  --radius: 12px;
  --shadow: 0 24px 60px rgba(18, 21, 26, 0.07);
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  background-image: var(--wash);
  min-height: 100vh;
}

body.edit-mode {
  overflow: hidden;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

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

a:hover {
  opacity: 0.85;
}

.shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1rem 0 0.5rem;
  flex-wrap: wrap;
}

.owner-tools {
  display: contents;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(18, 21, 26, 0.04);
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.btn:hover {
  background: #fff;
  border-color: rgba(18, 21, 26, 0.18);
}

.btn--primary {
  background: var(--accent);
  color: #f4f1eb;
  border-color: transparent;
}

.btn--primary:hover {
  filter: brightness(1.06);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  box-shadow: none;
}

.btn--small {
  font-size: 0.8rem;
  padding: 0.35rem 0.65rem;
}

.hero {
  padding: 1.5rem 0 3rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 3rem;
}

.eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.hero__name {
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  margin: 0 0 0.75rem;
}

.hero__headline {
  font-size: 1.2rem;
  max-width: 38rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.hero__chip {
  font-size: 0.85rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  color: var(--ink);
}

.hero__chip--link {
  text-decoration: none;
  color: var(--accent);
  font-weight: 600;
}

.profile__links {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.profile__link {
  font-size: 0.95rem;
}

.hero__actions {
  margin-top: 1.25rem;
}

.section {
  margin-bottom: 3.5rem;
  scroll-margin-top: 1.25rem;
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.section__title {
  font-size: clamp(1.65rem, 3vw, 2rem);
  margin: 0;
}

.section__lede {
  max-width: 36rem;
  color: var(--muted);
  margin: 0;
  font-size: 0.98rem;
}

.grid-2 {
  display: grid;
  gap: 1rem;
}

@media (min-width: 800px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
  height: 100%;
}

.card__top {
  margin-bottom: 0.65rem;
}

.card__title {
  font-size: 1.35rem;
  margin: 0 0 0.2rem;
}

.card__org {
  margin: 0;
  font-weight: 600;
  font-size: 0.92rem;
}

.card__meta,
.card__dates {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.card__credential {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
}

.card__body {
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.card__list {
  margin: 0.85rem 0 0;
  padding-left: 1.1rem;
  color: var(--ink);
}

.card__list li {
  margin-bottom: 0.35rem;
}

.work-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.work {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s;
}

.work:hover {
  transform: translateY(-2px);
  border-color: rgba(30, 58, 47, 0.35);
}

.work--static {
  cursor: default;
}

.work--static:hover {
  transform: none;
  border-color: var(--line);
}

.work h3 {
  font-size: 1.2rem;
  margin: 0 0 0.35rem;
}

.work__sub {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.work__badge {
  display: inline-block;
  margin-top: 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.work__arrow {
  font-size: 1.1rem;
  opacity: 0.5;
  flex-shrink: 0;
}

.snapshot {
  margin: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}

.snapshot__row {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.snapshot__row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.snapshot__row:first-child {
  padding-top: 0;
}

.snapshot dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 700;
}

.snapshot dd {
  margin: 0;
  font-size: 0.98rem;
}

.about__body p {
  margin: 0 0 1rem;
  max-width: 42rem;
  font-size: 1.05rem;
}

.muted {
  color: var(--muted);
}

.site-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--muted);
}

.nav-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
  font-weight: 600;
}

.nav-inline a {
  text-decoration: none;
  color: var(--muted);
}

.nav-inline a:hover {
  color: var(--accent);
}

/* Edit panel */
.edit-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 21, 26, 0.35);
  z-index: 40;
}

.edit-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(100vw - 1rem, 520px);
  max-width: 100%;
  height: 100vh;
  background: var(--bg-elevated);
  z-index: 50;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  box-shadow: -12px 0 48px rgba(18, 21, 26, 0.12);
  transform: translateX(104%);
  transition: transform 0.28s ease;
}

.edit-panel.is-open {
  transform: translateX(0);
}

.edit-panel__head {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-shrink: 0;
}

.edit-panel__head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-family: var(--font-display);
}

.edit-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.edit-panel__body {
  flex: 1;
  overflow: auto;
  padding: 1rem 1.25rem 2rem;
}

.edit-sections {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.edit-section h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.field {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.field input,
.field textarea,
.field select,
.input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.input--tall {
  min-height: 5rem;
  resize: vertical;
}

.field-grid-2 {
  display: grid;
  gap: 0.5rem;
}

@media (min-width: 480px) {
  .field-grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.field-row {
  margin-bottom: 0.5rem;
}

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

.editor-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
  background: #fff;
}

.editor-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.editor-card__head strong {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.editor-card__actions {
  display: flex;
  gap: 0.25rem;
}

.pw-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(18, 21, 26, 0.45);
}

.pw-overlay[hidden] {
  display: none !important;
}

.pw-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.pw-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}

.pw-card p {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.pw-error {
  color: #8b2942;
  font-size: 0.85rem;
  margin: 0.25rem 0 0;
  min-height: 1.25rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
