:root {
  --bg: #f7f2ea;
  --bg-soft: #fffaf3;
  --surface: rgba(255, 252, 246, 0.84);
  --surface-strong: rgba(255, 250, 241, 0.96);
  --text: #201a12;
  --text-soft: rgba(32, 26, 18, 0.72);
  --line: rgba(32, 26, 18, 0.12);
  --accent: #b66334;
  --accent-soft: rgba(182, 99, 52, 0.12);
  --shadow: 0 24px 60px rgba(57, 44, 25, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(219, 177, 99, 0.18), transparent 38%),
    linear-gradient(180deg, var(--bg) 0%, #efe5d6 58%, #e7dbc8 100%);
  font: 400 16px/1.6 "Public Sans", system-ui, sans-serif;
}

a {
  color: inherit;
}

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

code,
pre {
  font-family: "SFMono-Regular", ui-monospace, monospace;
}

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

.site-shell {
  min-height: 100vh;
  padding: 24px;
}

.site-header,
.site-footer,
.hero,
.projects-list-section,
.project-page,
.about-layout,
.error-page {
  width: min(1120px, 100%);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 16px;
  z-index: 20;
}

.site-header-inner,
.hero,
.project-page,
.about-layout,
.error-page {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
}

.site-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
}

.site-brand-mark,
.eyebrow,
.editor-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.site-brand-name,
h1,
h2,
h3 {
  margin: 0;
  font-family: "Newsreader", serif;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.site-nav a,
.site-nav-button,
.copy-link-button,
.editor-primary-button,
.editor-secondary-button,
.editor-chip,
.editor-icon-button {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--text);
  padding: 10px 14px;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.site-nav-button,
.editor-primary-button {
  background: var(--text);
  border-color: var(--text);
  color: white;
}

.page-shell {
  padding-top: 28px;
}

.hero {
  display: grid;
  min-height: 280px;
  align-items: end;
  padding: clamp(28px, 4vw, 48px);
  background:
    radial-gradient(circle at 80% 20%, rgba(182, 99, 52, 0.18), transparent 30%),
    linear-gradient(135deg, rgba(255, 253, 249, 0.94), rgba(247, 239, 225, 0.9));
}

.hero-copy {
  max-width: 640px;
}

.hero h1,
.about-copy h1,
.error-page h1 {
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 0.95;
}

.hero-text {
  max-width: 48ch;
  margin: 18px 0 0;
  color: var(--text-soft);
  font-size: 1.05rem;
}

.projects-list-section {
  padding-top: 28px;
}

.projects-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.project-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.project-card-link {
  display: flex;
  align-items: stretch;
  color: inherit;
  text-decoration: none;
}

.project-card-media {
  position: relative;
  flex: 0 0 clamp(240px, 34vw, 400px);
  aspect-ratio: 4 / 3;
  background: linear-gradient(140deg, rgba(182, 99, 52, 0.14), rgba(255, 255, 255, 0.36));
}

.project-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.project-card-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: 24px;
  color: var(--text-soft);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.project-card-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: clamp(24px, 3vw, 36px);
}

.project-card-copy h2 {
  font-size: clamp(2rem, 4.8vw, 3.8rem);
  line-height: 0.92;
  max-width: 10ch;
}

.project-card-date {
  margin: 0;
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.project-card-copy p,
.project-footer,
.site-footer-inner p,
.rich-content p,
.rich-content li,
.about-copy,
.empty-state {
  color: var(--text-soft);
}

.project-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(32, 26, 18, 0.8);
  color: white;
  font-size: 0.75rem;
}

.project-card-admin {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}

.project-card-link:hover .project-card-media img,
.project-card-link:focus-visible .project-card-media img {
  transform: scale(1.03);
}

.project-card-admin a,
.project-card-admin button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.project-page,
.about-layout,
.error-page {
  padding: clamp(24px, 4vw, 42px);
}

.project-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.project-header-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  text-align: left;
}

.project-header .eyebrow {
  margin: 0;
}

.project-header h1 {
  font-size: clamp(1.95rem, 3.8vw, 3.3rem);
  line-height: 0.95;
}

.project-header-actions {
  display: flex;
  gap: 12px;
}

.project-hero {
  margin-top: 28px;
  border-radius: calc(var(--radius-lg) - 8px);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.5);
}

.project-hero img {
  width: 100%;
  height: auto;
}

.video-embed-shell {
  position: relative;
  padding-top: 56.25%;
}

.video-embed-shell iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.project-body,
.about-copy {
  margin-top: 28px;
}

.project-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  grid-template-areas:
    "photo actions"
    "photo copy";
  gap: 28px;
}

.about-page-display {
  display: contents;
}

.about-page-actions {
  grid-area: actions;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.about-photo-frame {
  grid-area: photo;
  margin: 0;
  border-radius: calc(var(--radius-lg) - 6px);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.56);
}

.about-copy {
  grid-area: copy;
}

.rich-content {
  font-size: 1.04rem;
}

.rich-content .content-block + .content-block {
  margin-top: 24px;
}

.rich-content .content-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.75rem, 2vw, 1.25rem);
  align-items: start;
}

.rich-content .content-col {
  min-width: 0;
}

.rich-content a {
  color: var(--accent);
}

.rich-content blockquote {
  margin: 0;
  padding-left: 18px;
  border-left: 3px solid rgba(182, 99, 52, 0.4);
  color: var(--text);
}

.rich-content pre {
  overflow-x: auto;
  padding: 16px 18px;
  border-radius: 16px;
  background: #1c1917;
  color: #f5f5f4;
}

.portfolio-image {
  display: grid;
  gap: 10px;
}

.portfolio-image.align-center img {
  margin-inline: auto;
}

.portfolio-image.align-right img {
  margin-left: auto;
}

.portfolio-image figcaption {
  font-size: 0.92rem;
  color: var(--text-soft);
}

.site-footer {
  padding-top: 28px;
  padding-bottom: 12px;
}

.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 0;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer-link {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(32, 26, 18, 0.14);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.78);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 32px rgba(57, 44, 25, 0.12);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.site-footer-link:hover,
.site-footer-link:focus-visible {
  transform: translateY(-2px);
  background: rgba(255, 248, 239, 0.94);
  border-color: rgba(182, 99, 52, 0.32);
}

.site-footer-link svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-footer-link .icon-fill {
  fill: currentColor;
  stroke: none;
}

.empty-state,
.error-page {
  text-align: center;
}

.site-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  border-radius: 999px;
  padding: 12px 16px;
  background: rgba(32, 26, 18, 0.88);
  color: white;
  opacity: 0;
  transform: translateY(12px);
  transition: 180ms ease;
}

.site-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .project-card-link {
    align-items: center;
  }

  .project-card-media {
    flex-basis: clamp(220px, 38vw, 320px);
  }

  .about-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "actions"
      "photo"
      "copy";
  }
}

@media (max-width: 720px) {
  .rich-content .content-row {
    grid-template-columns: 1fr;
  }

  .site-shell {
    padding: 16px;
  }

  .site-header {
    position: static;
  }

  .site-header-inner,
  .project-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer-inner {
    justify-content: center;
  }

  .project-card-link {
    flex-direction: column;
    align-items: stretch;
  }

  .project-card-media {
    flex-basis: auto;
    width: 100%;
  }

  .project-card-copy {
    padding: 20px;
  }
}
