:root {
  --bg: #e8e0d9;
  --surface: #f7f2ec;
  --surface-soft: #ece2da;
  --text: #221d24;
  --muted: #514a56;
  --line: #cbbfcb;
  --accent: #43106d;
  --accent-soft: #e7dbf2;
  --accent-wash: #f1e9f8;
  --shadow-soft: 0 1px 0 rgba(22, 16, 28, 0.05);
  --radius-lg: 18px;
  --radius-md: 14px;
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 14px;
  --space-4: 18px;
  --space-5: 24px;
  --space-6: 32px;
  --content-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(180deg, #ebe3dc 0%, var(--bg) 100%);
  font-family: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.page-shell {
  width: min(calc(100% - 48px), var(--content-width));
  margin: 0 auto 64px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 16px;
  border-bottom: 1px solid var(--line);
}

.brand,
.site-nav a,
.button,
.project-url {
  text-decoration: none;
}

.brand {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.92rem;
}

.intro {
  padding: 26px 0 22px;
}

.intro-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 36px;
  align-items: start;
  padding: 28px 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.68), var(--surface-soft));
  border: 1px solid var(--line);
  border-left: 3px solid rgba(67, 16, 109, 0.78);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.hero-copy {
  display: grid;
  max-width: none;
  gap: 0;
}

.intro-media {
  margin: 0;
}

.headshot {
  display: block;
  width: 168px;
  height: auto;
  border-radius: 0;
  border: 1px solid var(--line);
  background: transparent;
}

.intro-kicker {
  margin: 0 0 var(--space-1);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Iowan Old Style", Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-name {
  color: var(--text);
  font-family: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.45;
  max-width: 92ch;
}

h2 {
  max-width: none;
  font-size: clamp(1.58rem, 2.2vw, 1.92rem);
  line-height: 1.15;
}

h3 {
  font-size: 1.32rem;
  line-height: 1.14;
}

h4 {
  font-size: 1.22rem;
  line-height: 1.22;
}

.hero-text,
.hero-note,
.project-summary,
.project-note,
.site-footer p,
.project-type {
  color: var(--muted);
  line-height: 1.68;
}

.hero-text {
  max-width: 68ch;
  margin: var(--space-2) 0 0;
  color: var(--text);
  font-size: 1rem;
}

.hero-note {
  max-width: 74ch;
  margin: var(--space-1) 0 0;
  font-size: 0.95rem;
}

.hero-note a,
.contact-line a {
  color: var(--accent);
  text-decoration: none;
}

.hero-note a:hover,
.contact-line a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.hero-note-extended {
  max-width: 78ch;
}

.contact-block {
  display: grid;
  gap: 4px;
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
}

.contact-label {
  margin: 0;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.contact-separator {
  color: var(--line);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 0.92rem;
  font-weight: 600;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}

.button-primary {
  color: #ffffff;
  background: var(--text);
  border-color: var(--text);
}

.button-secondary {
  background: transparent;
}

.button:hover {
  border-color: var(--accent);
}

.button-secondary:hover {
  background: rgba(255, 255, 255, 0.6);
}

.section {
  padding-top: 42px;
}

.section-heading {
  display: grid;
  gap: 6px;
  margin-bottom: 24px;
}

.section-title {
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  line-height: 1.18;
}

.section-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.project-showcase,
.project-list-secondary {
  display: grid;
  gap: 22px;
}

.project-list-secondary {
  margin-top: 22px;
}

.project-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 24px;
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  transition:
    transform 180ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    background-color 220ms ease;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, rgba(67, 16, 109, 0.88), rgba(67, 16, 109, 0.14));
  opacity: 0.18;
  transition: opacity 220ms ease, transform 220ms ease, width 220ms ease;
}

.project-card.is-active {
  background: #faf6fd;
  border-color: rgba(67, 16, 109, 0.26);
  box-shadow:
    0 10px 22px rgba(22, 16, 28, 0.06),
    0 1px 0 rgba(22, 16, 28, 0.05);
}

.project-card.is-active::before {
  opacity: 0.7;
  width: 6px;
}

.project-card.is-active .project-name {
  color: #301740;
}

.project-card.is-active .project-type,
.project-card.is-active .project-url-label {
  color: var(--accent);
}

.project-card.is-active .project-media {
  background: #e6d8f1;
}

.project-card.is-active .project-media img {
  background: linear-gradient(180deg, #f7f1fc, #e2d4ed);
}

.project-card-featured {
  grid-template-columns: 1fr;
}

.project-card-secondary {
  grid-template-columns: 1fr;
}

.project-media {
  display: grid;
  margin: 0;
  order: 2;
  min-width: 0;
  align-items: center;
  justify-items: center;
  background: var(--surface-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.project-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  object-position: center;
  background: linear-gradient(180deg, var(--accent-wash), #e6dced);
}

.project-copy {
  display: grid;
  grid-template-rows: auto 1fr;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 0;
}

.project-card-featured .project-copy {
  padding: 0;
}

.project-meta {
  display: grid;
  gap: 6px;
  min-width: 0;
  align-content: start;
}

.project-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  min-width: 0;
}

.project-type {
  margin: 0;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-visual-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-card-featured .project-name {
  font-size: clamp(1.34rem, 1.7vw, 1.56rem);
  line-height: 1.1;
}

.project-card-secondary .project-name {
  font-size: 1.18rem;
  line-height: 1.14;
}

.project-content {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  min-height: 0;
  max-width: none;
}

.project-summary {
  margin: 0;
  color: var(--text);
  font-size: 0.97rem;
  line-height: 1.62;
}

.project-card-featured .project-summary {
  font-size: 0.99rem;
}

.project-note {
  margin: 0;
  font-size: 0.94rem;
  max-width: 70ch;
}

.project-team {
  margin-top: auto;
  padding-top: 18px;
}

.project-team-label {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-team-list {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.62;
}

.project-team-list a {
  color: var(--accent);
  text-decoration: none;
}

.project-team-list a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.project-card-secondary .project-media img {
  aspect-ratio: 16 / 10;
}

.project-card-photo .project-media img {
  object-fit: cover;
  background: #d8cddb;
}

.project-links {
  display: grid;
  gap: 4px;
  min-width: 0;
  order: 3;
  margin-top: 0;
  padding: 6px 0 0;
  background: transparent;
}

.project-url-label {
  margin: 0;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-url {
  display: block;
  max-width: 100%;
  color: var(--accent);
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.76rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(67, 16, 109, 0.34);
  text-underline-offset: 0.18em;
}

.project-url:hover {
  color: var(--text);
}

.project-url-muted {
  color: var(--muted);
  text-decoration: none;
}

.project-type,
.project-visual-label,
.project-name,
.project-summary,
.project-note,
.project-team-list,
.project-team-label {
  overflow-wrap: anywhere;
}

.closing-note {
  margin-top: 30px;
  padding: 18px 20px;
  background: linear-gradient(180deg, rgba(241, 233, 248, 0.9), rgba(241, 233, 248, 0.55));
  border: 1px solid rgba(67, 16, 109, 0.14);
  border-left: 3px solid rgba(67, 16, 109, 0.72);
  border-radius: var(--radius-md);
}

.closing-line {
  margin: 0;
  color: #362f3d;
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 60ch;
}

.site-footer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.footer-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-line a {
  text-decoration: none;
}

.footer-line a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.footer-label {
  color: var(--text);
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .project-card,
  .project-card::before {
    transition: none;
  }
}

@media (min-width: 900px) {
  .project-card {
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    grid-template-areas:
      "copy media"
      "copy links";
    gap: 18px 24px;
    padding: 24px 26px;
    align-items: start;
  }

  .project-copy {
    grid-area: copy;
    max-width: 60ch;
  }

  .project-media {
    grid-area: media;
    order: unset;
  }

  .project-media img {
    max-height: 320px;
  }

  .project-card-secondary .project-media img {
    max-height: 280px;
  }

  .project-card-photo .project-media img {
    max-height: 320px;
  }

  .project-links {
    grid-area: links;
    order: unset;
    align-content: start;
    padding-top: 10px;
    border-top: 1px solid rgba(67, 16, 109, 0.12);
  }

  .project-card.is-active {
    transform: translateY(-4px);
    background: #fbf7ff;
    border-color: rgba(67, 16, 109, 0.42);
    box-shadow:
      0 22px 52px rgba(22, 16, 28, 0.14),
      0 1px 0 rgba(22, 16, 28, 0.05);
  }

  .project-card.is-active::before {
    opacity: 1;
    width: 7px;
  }

  .project-card.is-active .project-name {
    color: var(--accent);
  }

  .project-card.is-active .project-summary {
    color: #241c2a;
  }

  .project-card.is-active .project-links {
    transform: translateX(2px);
  }
}

@media (max-width: 760px) {
  .intro-layout {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px 20px;
  }

  .headshot {
    width: 138px;
  }

  .project-card-featured,
  .project-card-secondary {
    grid-template-columns: 1fr;
  }

  .project-card {
    padding: 20px;
  }

  .project-card.is-active {
    transform: none;
    background: #f8f3fb;
    box-shadow:
      0 8px 18px rgba(22, 16, 28, 0.05),
      0 1px 0 rgba(22, 16, 28, 0.05);
  }

  .project-card.is-active::before {
    opacity: 0.56;
  }

  .project-copy {
    padding: 0;
  }

  .project-links {
    padding-top: 6px;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(calc(100% - 24px), var(--content-width));
  }

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

  .intro {
    padding: 18px 0 16px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .project-meta-line {
    gap: 6px 8px;
  }

  .closing-note {
    padding: 16px 18px;
  }

  .closing-line {
    font-size: 0.93rem;
  }
}
